@camera.ui/server 2.0.9 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/interface/assets/{404-Bwt4L1PJ.js → 404-COkoHYdK.js} +1 -1
- package/dist/interface/assets/{About-DXvLHUof.js → About-qJICwbGH.js} +1 -1
- package/dist/interface/assets/{Adminpanel-BIcl_Mwn.js → Adminpanel-D58GDcYK.js} +1 -1
- package/dist/interface/assets/{Automation-Csu8t0D7.css → Automation-Cm62xfWQ.css} +1 -1
- package/dist/interface/assets/Automation-Dp_xaEqJ.js +2 -0
- package/dist/interface/assets/{AutomationImport-BlBlNStY.js → AutomationImport-jG2DzCAw.js} +2 -2
- package/dist/interface/assets/AutomationStore-4JFCinMU.js +2 -0
- package/dist/interface/assets/{AutomationStoreDetail-BT1wMcK2.js → AutomationStoreDetail-yBtpTcZc.js} +2 -2
- package/dist/interface/assets/Automations-BGsRPCnO.js +2 -0
- package/dist/interface/assets/{Camera-osDYTJPw.js → Camera-C1_jdI_c.js} +2 -2
- package/dist/interface/assets/{CameraConsole-DGQ3V0iM.js → CameraConsole-BjtK8-Jv.js} +2 -2
- package/dist/interface/assets/{Cameras-DNsE3_T0.js → Cameras-BmjWXAZ8.js} +2 -2
- package/dist/interface/assets/Camview-wGaYaDmi.js +1 -0
- package/dist/interface/assets/{Config-o6JSaUcr.js → Config-CuF6eGTD.js} +1 -1
- package/dist/interface/assets/{ConfigActionCameraControl-N-w9YidE.js → ConfigActionCameraControl-DjD6pSYf.js} +1 -1
- package/dist/interface/assets/{ConfigActionDelay-1kd69ysm.js → ConfigActionDelay-DGZlBe84.js} +1 -1
- package/dist/interface/assets/ConfigActionHttp-h5zpYYny.js +1 -0
- package/dist/interface/assets/ConfigActionImageInput-xab5Mae-.js +1 -0
- package/dist/interface/assets/ConfigActionMqtt-BnNmQUNe.js +1 -0
- package/dist/interface/assets/ConfigActionNotification-DGwL1eKM.js +1 -0
- package/dist/interface/assets/ConfigActionOutput-h2IebNMX.js +1 -0
- package/dist/interface/assets/ConfigActionPlugin-B6pIqGWe.js +1 -0
- package/dist/interface/assets/ConfigActionSensor-DBf7_RrD.js +1 -0
- package/dist/interface/assets/{ConfigActionSnapshot-MHiUaSA7.js → ConfigActionSnapshot-Cs2TG5fZ.js} +1 -1
- package/dist/interface/assets/ConfigActionVariable-BPK-FHZ-.js +1 -0
- package/dist/interface/assets/ConfigConditionIfElse-BNfUIXNh.js +1 -0
- package/dist/interface/assets/ConfigConditionSensorState-D1IWa7jK.js +1 -0
- package/dist/interface/assets/{ConfigConditionSwitch-Dfr-9vLZ.js → ConfigConditionSwitch-C7_-2l4Z.js} +1 -1
- package/dist/interface/assets/{ConfigConditionTime-Ce8AortY.js → ConfigConditionTime-DCTdB9RZ.js} +1 -1
- package/dist/interface/assets/ConfigSensorValueInput-Dt09C19b.js +1 -0
- package/dist/interface/assets/{ConfigTriggerDetection-Cv22vFn6.js → ConfigTriggerDetection-CVTb6TEu.js} +1 -1
- package/dist/interface/assets/ConfigTriggerGeofence-Cb62v6rf.js +1 -0
- package/dist/interface/assets/{ConfigTriggerManual-DZPdLXoe.js → ConfigTriggerManual-agJhIaCy.js} +1 -1
- package/dist/interface/assets/ConfigTriggerMqtt-DWZ79tPv.js +1 -0
- package/dist/interface/assets/{ConfigTriggerSchedule-DQX6czW4.js → ConfigTriggerSchedule-C38lrm2R.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSensor-BrYITWwc.js → ConfigTriggerSensor-BKXoFFFT.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSystem-DJ0lU8F0.js → ConfigTriggerSystem-DqoMfULb.js} +1 -1
- package/dist/interface/assets/ConfigTriggerWebhook-DunygdEo.js +1 -0
- package/dist/interface/assets/Console-DL4o8TCN.js +1 -0
- package/dist/interface/assets/{CuiActionButton-BAlSwXzv.js → CuiActionButton-iaZkXylf.js} +1 -1
- package/dist/interface/assets/{CuiAvatar-1UQTTFMr.js → CuiAvatar--d4yBFev.js} +1 -1
- package/dist/interface/assets/{CuiBBoxPlayground-yYOBCXTq.js → CuiBBoxPlayground-BuDfU2lQ.js} +1 -1
- package/dist/interface/assets/CuiBottomSheet-DluJK839.js +1 -0
- package/dist/interface/assets/{CuiBottomSheet-D1F_ll0S.js → CuiBottomSheet-o1iNIub8.js} +1 -1
- package/dist/interface/assets/CuiCameraCard-CNkJcJNk.js +1 -0
- package/dist/interface/assets/{CuiCameraPipCard-ULjqsCqF.js → CuiCameraPipCard-NA4CctaN.js} +1 -1
- package/dist/interface/assets/{CuiCameraRecordings-D2SS0ZeD.js → CuiCameraRecordings-Dg_xNATQ.js} +1 -1
- package/dist/interface/assets/CuiCameraShares-BSdoTLlP.js +1 -0
- package/dist/interface/assets/CuiCameraSnapshot-Dp6cLkMa.js +1 -0
- package/dist/interface/assets/{CuiCameraTable-BZbdmy4s.js → CuiCameraTable-16e0lAA5.js} +1 -1
- package/dist/interface/assets/{CuiDataTable-CB7aMmp9.js → CuiDataTable-BDb1Qvzm.js} +1 -1
- package/dist/interface/assets/{CuiFloatingButton-DdI-E8dh.js → CuiFloatingButton-B64PYWE2.js} +1 -1
- package/dist/interface/assets/{CuiImage-BVVPyvep.js → CuiImage-D_DDxN1t.js} +1 -1
- package/dist/interface/assets/{CuiMenu-D9y4WDoP.js → CuiMenu-BmgnEZun.js} +1 -1
- package/dist/interface/assets/{CuiPluginCard-BkhKzqHn.js → CuiPluginCard-C0GXkGJ3.js} +2 -2
- package/dist/interface/assets/{CuiPluginCategoryChip-yMnZpSGr.js → CuiPluginCategoryChip-R5WUBAUw.js} +1 -1
- package/dist/interface/assets/CuiPluginOAuthButton-CY3c3HRs.js +2 -0
- package/dist/interface/assets/{CuiPluginTrustBadge-Bcnptf84.js → CuiPluginTrustBadge-QRsixP01.js} +1 -1
- package/dist/interface/assets/{CuiQRCode-CBD3pXKm.js → CuiQRCode-CsxVDVaU.js} +1 -1
- package/dist/interface/assets/{CuiRecordingsGrid-C7b258rk.js → CuiRecordingsGrid-DycYYi7W.js} +1 -1
- package/dist/interface/assets/CuiSchema-D1-Z2sTy.js +1 -0
- package/dist/interface/assets/{CuiTopNavbarItem--MOi9UUw.js → CuiTopNavbarItem-CIO_h1T0.js} +1 -1
- package/dist/interface/assets/{CuiTopbarSlot-Bcw46PzA.js → CuiTopbarSlot-C6t4NmW-.js} +1 -1
- package/dist/interface/assets/Faces-QSA5E6EG.js +1 -0
- package/dist/interface/assets/FirstSteps-CP26tE1m.js +1 -0
- package/dist/interface/assets/Instances-Bdy0n3fB.js +1 -0
- package/dist/interface/assets/Logs-Bs0C7Yu1.js +6 -0
- package/dist/interface/assets/{Menu-Ci8FIulr.js → Menu-DX0KhBBs.js} +1 -1
- package/dist/interface/assets/OAuthDeviceFlow-Cci9ex4G.js +1 -0
- package/dist/interface/assets/Plugin-CG02A29i.js +1 -0
- package/dist/interface/assets/{PluginConsole-C8GuAzBZ.js → PluginConsole-Fffl7Yh_.js} +2 -2
- package/dist/interface/assets/PluginDetail-CRCMotvN.js +2 -0
- package/dist/interface/assets/{PluginSchema-DM406ULU.js → PluginSchema-BNEfEDJU.js} +1 -1
- package/dist/interface/assets/PluginSearch-CwNCQedL.js +2 -0
- package/dist/interface/assets/PluginSearch-GD7qtALl.js +1 -0
- package/dist/interface/assets/Plugins-BNiQus_y.js +1 -0
- package/dist/interface/assets/{Recordings-DvECWzpM.js → Recordings-dY0k4i3E.js} +1 -1
- package/dist/interface/assets/{Settings-nhIKBth_2.js → Settings-TkiQG2I9.js} +1 -1
- package/dist/interface/assets/{SettingsAccount-Y7hpH8Y3.css → SettingsAccount-CBJ_h7eM.css} +1 -1
- package/dist/interface/assets/SettingsAccount-Cln0bZPI.js +1 -0
- package/dist/interface/assets/SettingsAccount-DvrdANbI.js +1 -0
- package/dist/interface/assets/SettingsAppearance-CVMAyxFr.js +1 -0
- package/dist/interface/assets/{SettingsAppearance-D9VGcz8w.js → SettingsAppearance-CWWSQkIY.js} +1 -1
- package/dist/interface/assets/{SettingsBackup-kZQoQ4RY.js → SettingsBackup-CZEKi84z.js} +1 -1
- package/dist/interface/assets/SettingsMqtt-CeurNe8m.js +1 -0
- package/dist/interface/assets/{SettingsNotifications-CZigp16N.js → SettingsNotifications-BBYcFlOe.js} +1 -1
- package/dist/interface/assets/{SettingsRecordings-CLk_8Yeo.js → SettingsRecordings-8JRnUwvv.js} +1 -1
- package/dist/interface/assets/SettingsRemote-BXLy9grM.js +1 -0
- package/dist/interface/assets/SettingsRemote-DYld6-1F.css +1 -0
- package/dist/interface/assets/SettingsSystem-BwVJ2-Ws.js +2 -0
- package/dist/interface/assets/{SettingsUsers-CUd4VvGK.js → SettingsUsers-CMsX8YO6.js} +1 -1
- package/dist/interface/assets/{Terminal-1yUKu_cE.js → Terminal-CNAaV5h5.js} +3 -3
- package/dist/interface/assets/VariableInput-BuXTKXXC.js +1 -0
- package/dist/interface/assets/{VariableSuggestions-DwhFBKzJ.js → VariableSuggestions-BIPtw8GW.js} +1 -1
- package/dist/interface/assets/VersionsHandler-0Ol7oxfg.js +7 -0
- package/dist/interface/assets/Workers-BYGXvih8.js +2 -0
- package/dist/interface/assets/{Workers-E6LM_yAl.css → Workers-DmcQx0L8.css} +1 -1
- package/dist/interface/assets/api-BEwr0GLC.css +2 -0
- package/dist/interface/assets/api-CeJqvqFj.js +2 -0
- package/dist/interface/assets/{api-BkmWxHU6.js → api-DudQz5TK.js} +1 -1
- package/dist/interface/assets/auth-BKlPnLfY.js +1 -0
- package/dist/interface/assets/automations-Dtp3-KSy.js +1 -0
- package/dist/interface/assets/{automations-Dd-6vvka.js → automations-eQnuQOEs.js} +1 -1
- package/dist/interface/assets/availableVariables-D9VhvJZ1.js +1 -0
- package/dist/interface/assets/bell-outline-CHhIZudN.js +1 -0
- package/dist/interface/assets/{cameras-C0LS9WsX.js → cameras-BySMxwdP.js} +1 -1
- package/dist/interface/assets/cameras.schema-DVnsQl9j.js +1 -0
- package/dist/interface/assets/cloudHandoff-DOYq2IS2.js +1 -0
- package/dist/interface/assets/{config-C6KVzOJb.js → config-CDCKrp2V.js} +1 -1
- package/dist/interface/assets/{deviceId-DT9HiB_U.js → deviceId-O-kfs3nO.js} +1 -1
- package/dist/interface/assets/{hasPermission-DWgF7Hjs.js → hasPermission-DADXQ_dj.js} +1 -1
- package/dist/interface/assets/instances-DVk8sRuN.js +1 -0
- package/dist/interface/assets/main-DHUUsPUM.js +3 -0
- package/dist/interface/assets/nodeDefinitions-DUlwYSC1.js +1 -0
- package/dist/interface/assets/{notifications-CeVyOoSN.js → notifications-Dnh_ylVF.js} +1 -1
- package/dist/interface/assets/plugins-CHRZiPTq.js +1 -0
- package/dist/interface/assets/{round-restart-alt-BfvIzoUm.js → round-restart-alt-BRh54UpI.js} +1 -1
- package/dist/interface/assets/router-B6AZz5fb.js +2 -0
- package/dist/interface/assets/{router-qrIK2v9X.css → router-M08TaIji.css} +1 -1
- package/dist/interface/assets/{routerState-B08WcvfU.js → routerState-CencmCOo.js} +1 -1
- package/dist/interface/assets/{server-DWE6V3df.js → server-zkNDKqjz.js} +1 -1
- package/dist/interface/assets/shares-DooKpXt5.js +1 -0
- package/dist/interface/assets/{theme-57Z8cefl.js → theme-Dlx1uc6I.js} +1 -1
- package/dist/interface/assets/transit-connection-variant-DfztpRMW.js +1 -0
- package/dist/interface/assets/types-DwLgLlNL.js +1 -0
- package/dist/interface/assets/{ui-Cv0M3koY.js → ui-BajsbwJJ.js} +1 -1
- package/dist/interface/assets/{useAppVersion-DSG8IzPH.js → useAppVersion-Vx2rWjdR.js} +1 -1
- package/dist/interface/assets/useBackupRestore-CtDDTNYM.js +1 -0
- package/dist/interface/assets/{useBiometricCredentials-Cq0kbhwW.js → useBiometricCredentials-DnEuKj2Y.js} +1 -1
- package/dist/interface/assets/useCameraOptions-CurEfrEs.js +1 -0
- package/dist/interface/assets/{useCuiCameraDrawer-BcAYizqy.js → useCuiCameraDrawer-eH0m75Mk.js} +1 -1
- package/dist/interface/assets/{useCuiDialog-BrXNUR_F.js → useCuiDialog-CGak2kyV.js} +1 -1
- package/dist/interface/assets/{useFileDownload-DmEs3ezY.js → useFileDownload-CaB5Myfa.js} +1 -1
- package/dist/interface/assets/useLogsSocket-B47qvN41.js +5 -0
- package/dist/interface/assets/useLogsSocket-CoA-Nq-_.css +1 -0
- package/dist/interface/assets/{useServerRestart-7GFofrfB.js → useServerRestart-COGxcO4B.js} +1 -1
- package/dist/interface/assets/{useSharedComposables-ffwWlpSL.js → useSharedComposables-DC7dAxBt.js} +1 -1
- package/dist/interface/assets/{useStreamStatus-CELgmbpk.js → useStreamStatus-Cr_bBYAe.js} +1 -1
- package/dist/interface/assets/{useUpdateChannel-BscyY2G0.js → useUpdateChannel-D_SN9IPN.js} +1 -1
- package/dist/interface/assets/{useUserOptions-CVGaxYdb.js → useUserOptions-CtgFdv3y.js} +1 -1
- package/dist/interface/assets/{users.schema-DiUkDzPj.js → users.schema-vs5FAhpT.js} +1 -1
- package/dist/interface/assets/variable-C2Yu30iz.js +1 -0
- package/dist/interface/assets/vendor-cameraui-D5fd9Ars.js +1978 -0
- package/dist/interface/assets/{vendor-core-CZuWsjWr.js → vendor-core-D9amXF-u.js} +1 -1
- package/dist/interface/assets/{vendor-primevue-DB14kOh6.js → vendor-primevue-Ba4LruKV.js} +1 -1
- package/dist/interface/assets/{view-grid-DIwBs1jl.js → view-grid-jcP3VugM.js} +1 -1
- package/dist/interface/index.html +46 -45
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +8 -8
- package/dist/server/requirements.txt +2 -2
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/config.py +4 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/device.py +2 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/camera_config_internal.py +2 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/base.py +10 -2
- package/dist/server/src/api/controllers/instances.controller.d.ts +2 -2
- package/dist/server/src/api/controllers/instances.controller.js +7 -7
- package/dist/server/src/api/controllers/instances.controller.js.map +1 -1
- package/dist/server/src/api/controllers/plugins.controller.js +1 -1
- package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
- package/dist/server/src/api/database/index.js +11 -12
- package/dist/server/src/api/database/index.js.map +1 -1
- package/dist/server/src/api/database/types.d.ts +8 -0
- package/dist/server/src/api/routes/instances.routes.js +2 -1
- package/dist/server/src/api/routes/instances.routes.js.map +1 -1
- package/dist/server/src/api/schemas/automations.schema.d.ts +6 -0
- package/dist/server/src/api/schemas/automations.schema.js +2 -0
- package/dist/server/src/api/schemas/automations.schema.js.map +1 -1
- package/dist/server/src/api/schemas/cameras.schema.d.ts +9 -0
- package/dist/server/src/api/schemas/cameras.schema.js +2 -0
- package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
- package/dist/server/src/api/schemas/config.schema.d.ts +2 -0
- package/dist/server/src/api/schemas/config.schema.js +1 -0
- package/dist/server/src/api/schemas/config.schema.js.map +1 -1
- package/dist/server/src/api/schemas/instances.schema.d.ts +4 -0
- package/dist/server/src/api/schemas/instances.schema.js +5 -0
- package/dist/server/src/api/schemas/instances.schema.js.map +1 -1
- package/dist/server/src/api/services/backupScheduler.service.js +1 -1
- package/dist/server/src/api/services/backupScheduler.service.js.map +1 -1
- package/dist/server/src/api/services/cameras.service.js +10 -17
- package/dist/server/src/api/services/cameras.service.js.map +1 -1
- package/dist/server/src/api/services/instances.service.d.ts +12 -3
- package/dist/server/src/api/services/instances.service.js +123 -36
- package/dist/server/src/api/services/instances.service.js.map +1 -1
- package/dist/server/src/api/services/plugins.service.js +14 -2
- package/dist/server/src/api/services/plugins.service.js.map +1 -1
- package/dist/server/src/api/services/virtualsensors.service.js +2 -2
- package/dist/server/src/api/services/virtualsensors.service.js.map +1 -1
- package/dist/server/src/api/types/index.d.ts +4 -1
- package/dist/server/src/api/websocket/nsp/server.d.ts +1 -0
- package/dist/server/src/api/websocket/nsp/server.js +3 -1
- package/dist/server/src/api/websocket/nsp/server.js.map +1 -1
- package/dist/server/src/automations/triggers/mqtt.js +50 -3
- package/dist/server/src/automations/triggers/mqtt.js.map +1 -1
- package/dist/server/src/camera/controller.d.ts +2 -1
- package/dist/server/src/camera/controller.js +20 -6
- package/dist/server/src/camera/controller.js.map +1 -1
- package/dist/server/src/camera/decoder/detection-coordinator.d.ts +1 -0
- package/dist/server/src/camera/decoder/detection-coordinator.js +37 -6
- package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
- package/dist/server/src/camera/decoder/frame-source.d.ts +4 -0
- package/dist/server/src/camera/decoder/frame-source.js +22 -1
- package/dist/server/src/camera/decoder/frame-source.js.map +1 -1
- package/dist/server/src/camera/decoder/worker.d.ts +1 -0
- package/dist/server/src/camera/decoder/worker.js +7 -0
- package/dist/server/src/camera/decoder/worker.js.map +1 -1
- package/dist/server/src/camera/index.d.ts +5 -1
- package/dist/server/src/camera/index.js.map +1 -1
- package/dist/server/src/camera/sensors/controller.js +4 -3
- package/dist/server/src/camera/sensors/controller.js.map +1 -1
- package/dist/server/src/go2rtc/api/routes/snapshot.d.ts +3 -3
- package/dist/server/src/go2rtc/api/routes/snapshot.js +1 -1
- package/dist/server/src/go2rtc/api/routes/snapshot.js.map +1 -1
- package/dist/server/src/go2rtc/types.d.ts +3 -0
- package/dist/server/src/go2rtc/types.js.map +1 -1
- package/dist/server/src/mqtt/bridge.js +1 -1
- package/dist/server/src/mqtt/bridge.js.map +1 -1
- package/dist/server/src/plugins/runtime/python/proxy/camera_device.py +1 -0
- package/dist/server/src/plugins/schema.js +1 -1
- package/dist/server/src/plugins/schema.js.map +1 -1
- package/dist/server/src/remote/services/cloudflare-managed.js +16 -5
- package/dist/server/src/remote/services/cloudflare-managed.js.map +1 -1
- package/dist/server/src/remote/services/cloudflare.d.ts +2 -2
- package/dist/server/src/remote/services/cloudflare.js +16 -17
- package/dist/server/src/remote/services/cloudflare.js.map +1 -1
- package/dist/server/src/remote/services/cloudflaredBinary.d.ts +2 -0
- package/dist/server/src/remote/services/cloudflaredBinary.js +20 -0
- package/dist/server/src/remote/services/cloudflaredBinary.js.map +1 -0
- package/dist/server/src/remote/services/index.d.ts +1 -0
- package/dist/server/src/remote/services/index.js +20 -5
- package/dist/server/src/remote/services/index.js.map +1 -1
- package/dist/server/src/remote/services/urlReadiness.d.ts +11 -0
- package/dist/server/src/remote/services/urlReadiness.js +129 -0
- package/dist/server/src/remote/services/urlReadiness.js.map +1 -0
- package/dist/server/src/rpc/interfaces/device.d.ts +6 -0
- package/dist/server/src/services/config/defaults.d.ts +1 -1
- package/dist/server/src/services/config/defaults.js +2 -1
- package/dist/server/src/services/config/defaults.js.map +1 -1
- package/dist/server/src/services/config/types.d.ts +1 -0
- package/dist/server/src/utils/camera.d.ts +4 -0
- package/dist/server/src/utils/camera.js +17 -0
- package/dist/server/src/utils/camera.js.map +1 -1
- package/dist/server/src/utils/npm/index.d.ts +1 -1
- package/dist/server/src/utils/npm/index.js +3 -3
- package/dist/server/src/utils/npm/index.js.map +1 -1
- package/dist/server/src/utils/pythonInstaller.js +3 -3
- package/dist/server/src/utils/pythonInstaller.js.map +1 -1
- package/package.json +8 -8
- package/dist/interface/assets/Automation-DZIieg3O.js +0 -2
- package/dist/interface/assets/AutomationStore-CkSq2Gra.js +0 -2
- package/dist/interface/assets/Automations-DSeK-PfA.js +0 -2
- package/dist/interface/assets/Camview-Dpe-mn9j.js +0 -1
- package/dist/interface/assets/ConfigActionHttp-qUm57oW4.js +0 -1
- package/dist/interface/assets/ConfigActionImageInput-Cr8faOB5.js +0 -1
- package/dist/interface/assets/ConfigActionMqtt-uRSh5B2A.js +0 -1
- package/dist/interface/assets/ConfigActionNotification-DrWQGvXh.js +0 -1
- package/dist/interface/assets/ConfigActionOutput-NPiNPB7G.js +0 -1
- package/dist/interface/assets/ConfigActionPlugin-fETPjKeY.js +0 -1
- package/dist/interface/assets/ConfigActionSensor-BU01CTIY.js +0 -1
- package/dist/interface/assets/ConfigActionVariable-Du5R50EA.js +0 -1
- package/dist/interface/assets/ConfigConditionIfElse-DjNPMKsc.js +0 -1
- package/dist/interface/assets/ConfigConditionSensorState-CAAfaSvc.js +0 -1
- package/dist/interface/assets/ConfigSensorValueInput-MZiAptuc.js +0 -1
- package/dist/interface/assets/ConfigTriggerGeofence-BtPyKte4.js +0 -1
- package/dist/interface/assets/ConfigTriggerMqtt-p4FUGJg6.js +0 -1
- package/dist/interface/assets/ConfigTriggerWebhook-Czyo2Bs-.js +0 -1
- package/dist/interface/assets/Console-ChT_3diZ.js +0 -1
- package/dist/interface/assets/CuiBottomSheet-1GDyn88O.js +0 -1
- package/dist/interface/assets/CuiCameraCard-8iX_qqBM.js +0 -1
- package/dist/interface/assets/CuiCameraShares-DoX75x2g.js +0 -1
- package/dist/interface/assets/CuiCameraSnapshot-Duouoet1.js +0 -1
- package/dist/interface/assets/CuiPluginOAuthButton-BzoWSejV.js +0 -2
- package/dist/interface/assets/CuiSchema-sipNW_5x.js +0 -1
- package/dist/interface/assets/Faces-BV-dx0a6.js +0 -1
- package/dist/interface/assets/FirstSteps-L8ko4cum.js +0 -1
- package/dist/interface/assets/Instances-CWdIVekg.js +0 -1
- package/dist/interface/assets/Logs-DjtSfpCe.js +0 -6
- package/dist/interface/assets/OAuthDeviceFlow-bevFeCiw.js +0 -1
- package/dist/interface/assets/Plugin-DYR_1oRT.js +0 -1
- package/dist/interface/assets/PluginDetail-COgvgpQg.js +0 -2
- package/dist/interface/assets/PluginSearch-DowK0yhn.js +0 -2
- package/dist/interface/assets/PluginSearch-dkPdwrjj.js +0 -1
- package/dist/interface/assets/Plugins-BUgOxY_-.js +0 -1
- package/dist/interface/assets/SettingsAccount-B3yFFMS8.js +0 -1
- package/dist/interface/assets/SettingsAccount-Bh6QsmCo.js +0 -1
- package/dist/interface/assets/SettingsAppearance-CWAGTnDU.js +0 -1
- package/dist/interface/assets/SettingsMqtt-C234dN5h.js +0 -1
- package/dist/interface/assets/SettingsRemote-HTQY2mvW.js +0 -1
- package/dist/interface/assets/SettingsRemote-T38YVHal.css +0 -1
- package/dist/interface/assets/SettingsSystem-D52Vn9V5.js +0 -2
- package/dist/interface/assets/VariableInput-fT57kg7f.js +0 -1
- package/dist/interface/assets/VersionsHandler-CuV7deaY.js +0 -7
- package/dist/interface/assets/Workers-FgWY2jig.js +0 -2
- package/dist/interface/assets/api-BxUTlh4_.js +0 -2
- package/dist/interface/assets/api-C31uUd3g.css +0 -2
- package/dist/interface/assets/auth-DZBJ2qjy.js +0 -1
- package/dist/interface/assets/automations-BnCx_cHm.js +0 -1
- package/dist/interface/assets/cameras.schema-B1jQYShz.js +0 -1
- package/dist/interface/assets/cloudHandoff-CHjHRMBL.js +0 -1
- package/dist/interface/assets/instances-BURHqdgB.js +0 -1
- package/dist/interface/assets/main-Dk5JAon5.js +0 -3
- package/dist/interface/assets/nodeDefinitions-DSoFiL7W.js +0 -1
- package/dist/interface/assets/plugins-DmYBke-a.js +0 -1
- package/dist/interface/assets/router-Cfm3yxgM.js +0 -2
- package/dist/interface/assets/shares-Cz-SRsRm.js +0 -1
- package/dist/interface/assets/transit-connection-variant-CXkATe8I.js +0 -1
- package/dist/interface/assets/types-Dyn_Sb2s.js +0 -1
- package/dist/interface/assets/useBackupRestore-Cjv5ehJg.js +0 -1
- package/dist/interface/assets/useCameraOptions-DBsYZ6gv.js +0 -1
- package/dist/interface/assets/useLogsSocket-4F2-d9fa.css +0 -1
- package/dist/interface/assets/useLogsSocket-CochcRpr.js +0 -5
- package/dist/interface/assets/vendor-cameraui-DDdtrYBn.js +0 -1978
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cloudHandoff-DOYq2IS2.js","assets/api-CeJqvqFj.js","assets/rolldown-runtime-DAXXjFlN.js","assets/vendor-cameraui-D5fd9Ars.js","assets/vendor-ClrOISZp.js","assets/vendor-zod-XsuaxHRY.js","assets/vendor-core-D9amXF-u.js","assets/vendor-primevue-Ba4LruKV.js","assets/api-BEwr0GLC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{$ as t,$t as n,Ai as r,At as i,B as a,Bt as o,C as s,Dt as c,Ft as l,G as u,Gi as d,H as f,Ht as p,Ii as m,Ir as h,It as ee,J as g,K as _,Ki as v,Kt as y,L as b,Li as x,Lt as S,O as C,Ot as te,Q as ne,R as w,Rt as re,T,U as E,Ui as ie,Ut as D,V as ae,Vt as O,W as oe,Wi as se,Wt as ce,X as le,Xt as k,Y as A,Yt as ue,Z as de,Zt as fe,_a as pe,_n as me,an as he,at as ge,bn as _e,dn as j,et as ve,fi as ye,gn as be,ha as xe,in as Se,it as Ce,ji as we,jt as Te,kt as Ee,n as De,nn as Oe,nt as ke,q as Ae,qt as je,rn as Me,sn as Ne,tt as Pe,va as Fe,vi as Ie,vt as Le,w as Re,ya as ze,yt as Be,z as Ve}from"./vendor-cameraui-D5fd9Ars.js";import{$ as He,C as Ue,Ct as We,D as Ge,E as Ke,Mt as qe,O as Je,Pt as Ye,Q as Xe,T as Ze,Tt as Qe,X as $e,Z as et,_ as tt,d as nt,et as rt,f as it,g as at,h as ot,i as st,jt as ct,kt as lt,n as ut,nt as dt,o as ft,q as pt,r as mt,t as ht,u as gt}from"./api-CeJqvqFj.js";import{$ as _t,$n as M,$t as N,An as vt,Cr as P,En as yt,Er as F,F as I,G as bt,Gn as xt,I as St,J as Ct,Ln as wt,Nn as Tt,On as Et,P as L,Pn as Dt,Q as Ot,Rn as kt,Sr as R,Tr as z,Un as At,Vn as B,W as jt,Wt as Mt,Yn as Nt,Z as Pt,Zn as Ft,_r as It,an as Lt,ar as Rt,br as zt,cn as Bt,dn as V,fn as H,fr as Vt,jn as Ht,kn as Ut,lr as Wt,mn as U,mr as W,nr as G,on as K,pn as q,rn as Gt,rr as Kt,tn as qt,un as J,ur as Y,v as Jt,vn as X,xn as Z,y as Yt,yn as Q,zn as $}from"./vendor-ClrOISZp.js";import{c as Xt,f as Zt,l as Qt,n as $t,t as en,u as tn}from"./vendor-core-D9amXF-u.js";import{B as nn,C as rn,E as an,F as on,G as sn,H as cn,I as ln,K as un,L as dn,N as fn,O as pn,P as mn,R as hn,T as gn,V as _n,W as vn,_ as yn,a as bn,d as xn,f as Sn,g as Cn,h as wn,l as Tn,n as En,p as Dn,r as On,t as kn,v as An,w as jn,y as Mn,z as Nn}from"./vendor-primevue-Ba4LruKV.js";import{F as Pn,I as Fn,R as In,_ as Ln,a as Rn,b as zn,c as Bn,d as Vn,f as Hn,g as Un,h as Wn,i as Gn,l as Kn,m as qn,o as Jn,p as Yn,r as Xn,s as Zn,t as Qn,u as $n,v as er,y as tr}from"./CuiCameraCard-CNkJcJNk.js";import{t as nr}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as rr,t as ir}from"./useBackupRestore-CtDDTNYM.js";import{n as ar,t as or}from"./useServerRestart-COGxcO4B.js";import{n as sr,o as cr,r as lr,s as ur,t as dr}from"./useSharedComposables-DC7dAxBt.js";import{n as fr,t as pr}from"./ui-BajsbwJJ.js";import{a as mr,i as hr,n as gr,o as _r,r as vr,t as yr}from"./router-B6AZz5fb.js";import{t as br}from"./cloud-outline-BooRVJGO.js";import{t as xr}from"./close-BTPBtoEq.js";import{t as Sr}from"./chevron-down-Bu7d-Y9N.js";import{t as Cr}from"./power-CH_DVgfm.js";import{t as wr}from"./CuiAvatar--d4yBFev.js";import{t as Tr}from"./api-DudQz5TK.js";import{t as Er}from"./instances-DVk8sRuN.js";import{t as Dr}from"./cctv-DbFrrwEm.js";import{t as Or}from"./cog-BOiZ8Brk.js";import{t as kr}from"./face-recognition-CPwwcApe.js";import{t as Ar}from"./puzzle-filled-BsJvAZrD.js";import{t as jr}from"./CuiCameraSnapshot-Dp6cLkMa.js";import{t as Mr}from"./hasPermission-DADXQ_dj.js";import{n as Nr,t as Pr}from"./CuiMenu-BmgnEZun.js";import{t as Fr}from"./shield-check-0hUJRszq.js";import{t as Ir}from"./motion-sensor-D9ErhY-p.js";import{t as Lr}from"./lightbulb-outline-DPjpJn5F.js";import{t as Rr}from"./vendor-draggabilly-CPB8E5_r.js";import{a as zr,t as Br}from"./cameras-BySMxwdP.js";import{t as Vr}from"./CuiActionButton-iaZkXylf.js";import{t as Hr}from"./copy-16-filled-DfOe7jyi.js";import{n as Ur,t as Wr}from"./useCuiCameraDrawer-eH0m75Mk.js";import{t as Gr}from"./useCuiDialog-CGak2kyV.js";import{n as Kr}from"./CuiTopbarSlot-C6t4NmW-.js";import{t as qr}from"./theme-Dlx1uc6I.js";import{t as Jr}from"./check-COWE52r_.js";import{t as Yr}from"./trash2-tuK9V5bO.js";import{t as Xr}from"./notifications-Dnh_ylVF.js";import{n as Zr,t as Qr}from"./microphone-DJsihw9n.js";import{a as $r,i as ei,r as ti,t as ni}from"./CuiSchema-D1-Z2sTy.js";import{t as ri}from"./plugins-CHRZiPTq.js";import{t as ii}from"./PluginSchema-BNEfEDJU.js";import{t as ai}from"./information-outline-BaVRQ1WL.js";import{t as oi}from"./trash-can-outline-gVM4WyHG.js";import{t as si}from"./plus-CJzoaVfR.js";import{a as ci,i as li,n as ui,t as di}from"./cameras.schema-DVnsQl9j.js";import{t as fi}from"./cctv-BZIDJlxZ.js";import{t as pi}from"./delete-BEupTYe7.js";import{t as mi}from"./useStreamStatus-Cr_bBYAe.js";import{t as hi}from"./bell-ring-DgLkBDcU.js";import{t as gi}from"./home-DTNk2yog.js";import{t as _i}from"./CuiDataTable-BDb1Qvzm.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),xe(localStorage),ze(),typeof window<`u`&&window.addEventListener(`pagehide`,pe);async function vi(e,t={}){let n=window.location.hash.startsWith(`#`)?window.location.hash.substring(1):window.location.hash,r=new URLSearchParams(n),i=r.get(`auth`);if(!i)return!1;r.delete(`auth`);let a=r.toString(),o=a?`#${a}`:``;window.history.replaceState(null,``,window.location.pathname+window.location.search+o);let s;try{s=JSON.parse(atob(i))}catch{return!1}s._sourceUrl&&t.onRedirectInfo?.({sourceUrl:s._sourceUrl,instanceName:s._instanceName??`Remote`});let c=!1;if(s.access_token&&s._id&&s.username&&s.role){let n={access:s.access_token,refresh:s.refresh_token,accessExpiresAt:s.access_token_expires_at,refreshExpiresAt:s.refresh_token_expires_at},r={url:window.location.origin,mode:`direct-lan`,priority:0};await e.seedAndRetry({endpoint:r,tokens:n},`home`),c=!0,t.onUser?.({_id:s._id,username:s.username,email:s.email,role:s.role,firstLogin:s.firstLogin,avatar:s.avatar})}return s._reset&&t.onReset?.(),c}function yi(e){_t.setEventListener(t=>M(()=>e.phase.value.kind===`online`,e=>t(e),{immediate:!0}))}var bi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function xi(e,t){return $(),U(`svg`,bi,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12 3c-1.97 0-3.85.47-5.56 1.41c-.24.13-.54.04-.68-.2a.506.506 0 0 1 .2-.68C7.82 2.5 9.86 2 12 2s4 .47 6.04 1.5c.25.15.34.45.21.69a.48.48 0 0 1-.44.28M3.5 9.72c-.1 0-.2-.03-.29-.09a.517.517 0 0 1-.12-.7c.99-1.4 2.25-2.5 3.75-3.27C10 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.85 3.75 3.25c.16.22.1.54-.12.7c-.23.16-.54.11-.7-.1a9.26 9.26 0 0 0-3.39-2.96c-2.87-1.47-6.54-1.47-9.4.01c-1.36.7-2.5 1.7-3.4 2.95c-.08.15-.23.22-.39.22m6.25 12.07c-.13 0-.25-.05-.35-.15c-.87-.87-1.34-1.43-2.01-2.64c-.69-1.23-1.05-2.73-1.05-4.34c0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39a.5.5 0 0 1-.5.5a.5.5 0 0 1-.5-.5c0-2.42-2.09-4.39-4.66-4.39s-4.66 1.97-4.66 4.39c0 1.44.32 2.77.93 3.84c.64 1.16 1.08 1.65 1.85 2.43c.19.2.19.51 0 .71c-.12.1-.24.15-.37.15m7.17-1.85c-1.19 0-2.24-.3-3.1-.89c-1.49-1.01-2.38-2.65-2.38-4.39a.5.5 0 0 1 .5-.5a.5.5 0 0 1 .5.5c0 1.41.72 2.74 1.94 3.56c.71.48 1.54.71 2.54.71c.24 0 .64-.03 1.04-.1c.27-.05.54.13.58.41c.05.26-.13.53-.41.58c-.57.11-1.07.12-1.21.12M14.91 22h-.13c-1.59-.46-2.63-1.05-3.72-2.12a7.28 7.28 0 0 1-2.17-5.22c0-1.62 1.38-2.94 3.08-2.94s3.08 1.32 3.08 2.94c0 1.07.95 1.94 2.08 1.94c1.15 0 2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83c-2.84 0-5.46 1.58-6.61 4.03c-.39.81-.59 1.76-.59 2.8c0 .78.07 2.01.67 3.61c.1.26-.03.55-.29.64a.504.504 0 0 1-.64-.29c-.5-1.31-.73-2.62-.73-3.96c0-1.2.23-2.29.68-3.24c1.33-2.79 4.28-4.6 7.51-4.6c4.54 0 8.25 3.51 8.25 7.83c0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51c.95.94 1.86 1.46 3.27 1.84c.27.08.42.36.35.62c-.05.23-.26.38-.47.38`},null,-1)]])}var Si=Y({name:`mdi-fingerprint`,render:xi}),Ci=`cameraui:unlocked`;function wi(){try{sessionStorage.setItem(Ci,`1`)}catch{}}var Ti=W(!1),Ei=W(!1);function Di(){return{isLocked:Ti,isAvailable:Ei,unlock:Oi,init:ki}}async function Oi(){return Ti.value=!1,wi(),!0}async function ki(){}var Ai={key:0,class:`app-lock-overlay`},ji={class:`flex flex-col items-center gap-6 p-8`},Mi={class:`text-center`},Ni={class:`text-lg font-semibold`},Pi={class:`text-sm text-muted mt-2`},Fi=nr(Z({__name:`CuiAppLockOverlay`,setup(e){let{isLocked:t,unlock:n}=Di(),r=W(!1);async function i(){r.value=!0;try{await n()}finally{r.value=!1}}return M(t,async e=>{e&&(await Ht(),await i())},{immediate:!0}),(e,n)=>{let a=In,o=Si,s=me;return R(t)?($(),U(`div`,Ai,[V(`div`,ji,[Q(a,{class:`w-16 h-16 text-muted`}),V(`div`,Mi,[V(`h2`,Ni,F(e.$t(`views.app_lock.title`)),1),V(`p`,Pi,F(e.$t(`views.app_lock.subtitle`)),1)]),Q(s,{label:e.$t(`views.app_lock.unlock`),loading:R(r),fluid:``,class:`cui-button-medium`,onClick:i},{icon:G(()=>[Q(o,{class:`mr-2`})]),_:1},8,[`label`,`loading`])])])):q(``,!0)}}}),[[`__scopeId`,`data-v-baef4383`]]),Ii={key:0,class:`cui-restore-overlay`},Li={class:`cui-restore-overlay__card shadow-xl`},Ri={class:`text-lg font-semibold`},zi={class:`text-sm text-muted`},Bi={class:`text-xs text-muted`},Vi=nr(Z({__name:`CuiRestoreOverlay`,setup(e){let{t}=h(),{active:n,phase:r,uploadPercent:i}=rr(),a=J(()=>{switch(r.value){case`uploading`:return t(`restore.phase_uploading`);case`restarting`:return t(`restore.phase_restarting`);default:return t(`restore.phase_restoring`)}});return(e,t)=>{let o=sn;return $(),H(N,{name:`fade`},{default:G(()=>[R(n)?($(),U(`div`,Ii,[V(`div`,Li,[Q(R(bt),{src:R(gt)(`logo_animated.svg`),width:`52px`,height:`58px`,title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`]),V(`span`,Ri,F(e.$t(`restore.title`)),1),V(`span`,zi,F(R(a)),1),R(r)===`uploading`?($(),H(o,{key:0,value:R(i),class:`w-full`},null,8,[`value`])):($(),H(o,{key:1,mode:`indeterminate`,class:`w-full`,style:{height:`6px`}})),V(`span`,Bi,F(e.$t(`restore.dont_close`)),1)])])):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-0c1a6c8d`]]),Hi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ui(e,t){return $(),U(`svg`,Hi,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6 20h12M12 4v12m0 0l3.5-3.5M12 16l-3.5-3.5`},null,-1)]])}var Wi=Y({name:`iconoir-download`,render:Ui}),Gi={class:`cui-update-indicator__content`},Ki={class:`cui-update-indicator__text`},qi=nr(Z({__name:`CuiUpdateIndicator`,setup(e){let{t}=h(),{bottombarHeight:n}=sr(),{updateAvailable:r,isApplying:i,applyUpdate:a}=_r(),{isLoggedIn:o}=Zt(ot()),s=We(),c=J(()=>o.value&&r.value&&s.bannerMode.value===null),l=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);function u(){a()}return(e,n)=>{let r=be,a=Wi,o=me;return $(),H(N,{name:`fade`},{default:G(()=>[R(c)?($(),U(`div`,{key:0,class:`cui-update-indicator shadow-xl`,style:z({bottom:R(l)})},[V(`div`,Gi,[R(i)?($(),H(r,{key:0,class:`cui-update-indicator__spinner`,"stroke-width":`5`})):($(),H(a,{key:1,class:`cui-update-indicator__icon`})),V(`span`,Ki,F(R(i)?R(t)(`components.toast.update_applying`):R(t)(`components.toast.update_available_title`)),1),R(i)?q(``,!0):($(),H(o,{key:2,size:`small`,class:`cui-update-indicator__button`,label:R(t)(`components.toast.update_now`),onClick:u},null,8,[`label`]))])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-8ce1000d`]]),Ji={class:`cui-connection-indicator__content`},Yi={class:`cui-connection-indicator__text`},Xi=nr(Z({__name:`CuiConnectionIndicator`,setup(e){let{t}=h(),{bottombarHeight:n}=sr(),{bannerMode:r,inTrouble:i}=We(),{restarting:a}=ar(),o=mt(),{isLoggedIn:s}=Zt(ot()),c=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`),l=J(()=>s.value&&(r.value!==null||a.value)),u=J(()=>r.value===`connecting`?t(`connection.connecting_remote`):r.value===null?t(`connection.restarting`):t(`connection.reconnecting`)),d=J(()=>i.value&&o===`cloud`);async function f(){let{bounceToCloudFrontend:e}=await Mt(async()=>{let{bounceToCloudFrontend:e}=await import(`./cloudHandoff-DOYq2IS2.js`);return{bounceToCloudFrontend:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));await e()}return(e,n)=>{let r=be,i=br,a=me;return $(),H(N,{name:`fade`},{default:G(()=>[R(l)?($(),U(`div`,{key:0,class:`cui-connection-indicator shadow-xl`,style:z({bottom:R(c)})},[V(`div`,Ji,[Q(r,{class:`!w-5 !h-5 shrink-0`,"stroke-width":`5`}),V(`span`,Yi,F(R(u)),1),R(d)?($(),H(a,{key:0,size:`small`,rounded:``,class:`cui-connection-indicator__button`,"aria-label":R(t)(`connection.pick_server`),onClick:f},{default:G(()=>[Q(i,{class:`w-4 h-4`})]),_:1},8,[`aria-label`])):q(``,!0)])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-7f082560`]]),Zi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qi(e,t){return $(),U(`svg`,Zi,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M5.41 7.41L10 12l-4.59 4.59L4 15.17L7.17 12L4 8.83zm13.18 9.18L14 12l4.59-4.58L20 8.83L16.83 12L20 15.17z`},null,-1)]])}var $i=Y({name:`mdi-unfold-less-vertical`,render:Qi}),ea={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ta(e,t){return $(),U(`svg`,ea,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 18.17L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15M12 5.83L15.17 9l1.41-1.41L12 3L7.41 7.59L8.83 9z`},null,-1)]])}var na=Y({name:`mdi-unfold-more-horizontal`,render:ta}),ra={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ia(e,t){return $(),U(`svg`,ra,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M19 13H5v-2h14z`},null,-1)]])}var aa=Y({name:`mdi-minus`,render:ia}),oa={class:`fixed flex flex-row items-center z-[99999] top-0 left-[7px] gap-2 p-2 pl-[0.4rem]! non-draggable-region`},sa=nr(Z({__name:`CuiWindowButtons`,setup(e){let{electron:t}=tt(),n=W(!1),r=W(!1);function i(){r.value||t?.send(`change-window`,`minify`)}function a(){t?.send(`change-window`,`close`)}function o(){t?.send(`change-window`,`expand`)}function s(e,t){r.value=t}return wt(()=>{t?.on(`fullscreen`,s)}),Dt(()=>{t?.removeListener(`fullscreen`,s)}),(e,t)=>{let s=xr,c=aa,l=na,u=$i;return Kt(($(),U(`div`,oa,[V(`div`,{class:`close-button`,onClick:a},[Q(s,{color:`#7f050a`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`])]),V(`div`,{class:P({"disabled-button":R(r),"minify-button":!R(r)}),onClick:i},[R(r)?q(``,!0):($(),H(c,{key:0,color:`#995712`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`]))],2),V(`div`,{class:`expand-button`,style:z(`${R(r)?`transform: rotate(45deg)`:`transform: rotate(-45deg)`}`),onClick:o},[R(r)?($(),H(u,{key:1,color:`#0d650d`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`])):($(),H(l,{key:0,color:`#0d650d`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`]))],4)])),[[R(en),e=>n.value=e]])}}}),[[`__scopeId`,`data-v-d1e31a06`]]),ca={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function la(e,t){return $(),U(`svg`,ca,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z`},null,-1)]])}var ua=Y({name:`mdi-chevron-up`,render:la}),da={key:0,class:`shrink-0 relative left-[-9px]`},fa={key:1,class:`shrink-0`},pa={key:2,class:`shrink-0`},ma={key:0,class:`overflow-hidden flex-1 ml-10`},ha={class:`flex flex-row items-center justify-between`},ga={class:`text-start flex-1`},_a={key:0,class:`text-xs text-muted`},va=nr(Z({__name:`CuiNavItem`,props:{label:{},to:{},expanded:{type:Boolean},description:{},icon:{},iconSize:{default:24},iconClass:{},labelClass:{},activeIcon:{},avatar:{},avatarSize:{default:24},showLogout:{type:Boolean},darkMode:{type:Boolean},buttonProps:{},showTooltip:{type:Boolean},fallbackActivePath:{},activeColor:{},activeIconColor:{},bottomBar:{type:Boolean}},setup(e){let t=e,n=Xt(),r=ot(),{icon:i,iconSize:a,iconClass:o,activeIcon:s,avatarSize:c,avatar:l,labelClass:u,label:d,description:f,expanded:p,to:m,showLogout:h,darkMode:ee,buttonProps:g,showTooltip:_,fallbackActivePath:v,activeColor:y,activeIconColor:b,bottomBar:x}=zt(t),S=J(()=>n.path===m.value||m.value!==`/`&&(n.path.startsWith(m.value+`/`)||n.path.startsWith((v.value??m.value)+`/`)));function C(){r.logout()}return(e,t)=>{let n=wr,r=Cr,v=me,te=At(`RouterLink`),ne=vn;return $(),H(te,{to:R(m)},{default:G(({isActive:e})=>[Kt(($(),H(v,vt({text:``,severity:`secondary`,class:[`cui-button navitem-button w-full h-full flex items-center relative`,{"dark-mode":R(ee),"!text-white navitem-active":(e||R(S))&&!R(l),"hover:!text-color active:!text-color focus:!text-color":!e&&!R(S),"navitem-inactive":!e&&!R(S)}],style:R(y)&&(e||R(S))?{"--navitem-active-color":R(y)}:void 0,fluid:``},R(g)),{default:G(()=>[V(`div`,{class:P([`flex items-center justify-center h-full`,{"absolute left-[14px]":!R(x)}])},[R(l)?($(),U(`div`,da,[Q(n,{src:R(l),size:R(c),style:z({width:`${R(c)}px`,height:`${R(c)}px`})},null,8,[`src`,`size`,`style`])])):R(i)&&!e&&!R(S)||!R(s)?($(),U(`div`,fa,[Q(R(i),{class:P(R(o)),style:z({width:`${R(a)}px`,height:`${R(a)}px`,color:(e||R(S))&&R(b)?R(b):void 0})},null,8,[`class`,`style`])])):R(s)&&(e||R(S))?($(),U(`div`,pa,[Q(R(s),{style:z({width:`${R(a)}px`,height:`${R(a)}px`,color:R(b)})},null,8,[`style`])])):q(``,!0)],2),Q(N,{name:`fade`},{default:G(()=>[R(p)?($(),U(`div`,ma,[V(`div`,ha,[V(`div`,ga,[V(`div`,{class:P([`text-sm max-w-100 truncate font-semibold`,[R(u),{"text-color font-bold":R(l)}]])},F(R(d)),3),R(f)?($(),U(`div`,_a,F(R(f)),1)):q(``,!0)]),R(h)?($(),H(v,{key:0,text:``,rounded:``,class:`dark-mode cui-icon-md`,onClick:Lt(C,[`stop`,`prevent`])},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1})):q(``,!0)])])):q(``,!0)]),_:1})]),_:2},1040,[`class`,`style`])),[[ne,{value:R(_)&&!R(p)?R(d):``,pt:{root:{class:`dark-mode`}}}]])]),_:1},8,[`to`])}}}),[[`__scopeId`,`data-v-9e0c467b`]]),{isElectronApp:ya}=tt(),ba=ya?25:0,xa={CLOSED:0,MINIFIED:60,EXPANDED:288},Sa=Vt({serverUpdateAvailable:!1,pluginUpdateAvailable:!1,serverUpdate:null,pluginUpdates:[]}),Ca=null,wa=null;async function Ta(){if(wa?.ready.value)try{let e=await wa.request(`get-updates`);Sa.pluginUpdates=e.plugins,Sa.pluginUpdateAvailable=e.plugins.length>0,Sa.serverUpdate=e.server,Sa.serverUpdateAvailable=e.server.updateAvailable||e.server.betaUpdateAvailable||!1}catch{}}function Ea(){return wa||(Ca=Rt(!0),Ca.run(()=>{let e=Ue(`/server`);wa=e,e.on(`plugin-updates`,e=>{Sa.pluginUpdates=e,Sa.pluginUpdateAvailable=e.length>0}),e.on(`server-updates`,e=>{Sa.serverUpdate=e,Sa.serverUpdateAvailable=e.updateAvailable||e.betaUpdateAvailable||!1}),e.onReady(()=>{Ta()})}),wa)}function Da(){function e(){Ea()}function t(){}return{isConnected:J(()=>wa?.connected.value??!1),serverUpdateAvailable:J(()=>Sa.serverUpdateAvailable),pluginUpdateAvailable:J(()=>Sa.pluginUpdateAvailable),serverUpdate:J(()=>Sa.serverUpdate),pluginUpdates:J(()=>Sa.pluginUpdates),connect:e,disconnect:t,fetchUpdates:Ta}}var Oa={class:`h-full flex flex-col overflow-y-scroll`},ka={class:`w-full flex items-center shrink-0 h-[60px]`},Aa={class:`overflow-hidden w-full pr-4`},ja={key:0,class:`ml-2 w-full flex flex-row items-center`},Ma={class:`flex flex-col flex-1 my-4 px-1`},Na={class:`flex flex-col space-y-1`},Pa={class:`flex flex-col space-y-1`},Fa={class:`w-full h-[50px]`},Ia={class:`flex items-center justify-center h-full absolute left-[14px]`},La={key:0,class:`flex flex-col space-y-1 overflow-hidden`},Ra={class:`w-full h-[50px] relative`},za=nr(Z({__name:`CuiNavbar`,setup(e,{expose:t}){let n=Qt(),{bus:r}=cr(),{mdBreakpoint:i,xlBreakpoint:a}=dr(),{navbarState:o}=sr(),{isElectronApp:s,electron:c}=tt(),{user:l}=Zt(ot()),{uiSettings:u}=Zt(fr()),d=Da(),{data:f}=new Tr().apiInfoQuery(),p=Ft(`navbarRef`),m=W(`closed`),h=W(!1),ee=W(!1),g=W(!1),_=J(()=>f.value?.electron??!1),v=J(()=>s&&_.value),y=J(()=>{let e=u.value.interface.selectedSettingsView;return pr.includes(e)?e:`account`}),b=e=>_.value&&!!e.meta?.disabledInElectron,x=J(()=>gr.filter(e=>e.meta?.navbar?.position===`top`&&e.meta&&Mr(e)&&!b(e))),S=J(()=>gr.filter(e=>e.meta?.navbar?.position===`bottom`&&Mr(e)&&!b(e))),C=J(()=>S.value.filter(e=>!e.meta?.navbar?.group)),te=J(()=>S.value.filter(e=>e.meta?.navbar?.group===`more`)),ne=J(()=>te.value.some(e=>n.currentRoute.value.path===e.path||n.currentRoute.value.path.startsWith(e.path+`/`))),w=J(()=>u.value.interface.navbarStayCollapsed&&m.value!==`opened`?`closed`:a.value?`opened`:m.value),re=J(()=>w.value===`closed`?i.value?xa.CLOSED:xa.MINIFIED:xa.EXPANDED);function T(){g.value=!g.value,g.value?setTimeout(()=>{let e=p.value?.firstElementChild;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},250):setTimeout(()=>ae(),250)}function E(){r.emit({navbarState:`closed`})}function ie(e,t){v.value&&t.channel===`update-check`&&t.status===`available`&&(h.value=!0)}async function D(){if(v.value){c.removeListener(`app-status`,ie),c.on(`app-status`,ie),c.send(`check-for-updates`);try{let e=await c.invoke(`get-update-available`);h.value=e.isUpdateAvailable}catch{}}}function ae(){Ht(()=>{let e=p.value?.querySelector(`.navitem-active`);e&&e.scrollIntoView({block:`center`,behavior:`smooth`})})}let O=se(ae,100);return ye(p,e=>{if(w.value!==`opened`)return;let t=e.target,n=t.closest(`#menu-icon`),r=t.closest(`#submenu-icon`),i=t.closest(`#navbar-icon`);!n&&!r&&!i&&E()}),we(p,()=>{O()}),M(ne,e=>{e&&(g.value=!0)},{immediate:!0}),M(d.serverUpdateAvailable,e=>{v.value||(h.value=e)},{immediate:!0}),M(v,e=>{e&&D()},{immediate:!0}),M(d.pluginUpdateAvailable,e=>{ee.value=e}),M(o,e=>{e&&e!==m.value&&(m.value=e===`minified`||e===`closed`?`closed`:`opened`)}),M(n.currentRoute,(e,t)=>{e.path!==t.path&&E()}),M(l,()=>{l.value?.role===`admin`||l.value?.role===`master`?d.connect():d.disconnect()},{deep:!0,immediate:!0}),wt(()=>{ae()}),kt(()=>{c?.removeListener(`app-status`,ie)}),t({navbarState:w}),(e,t)=>{let n=At(`RouterLink`),r=_e,a=va,o=Sr,s=ua,c=me;return $(),U(`nav`,{ref_key:`navbarRef`,ref:p,class:P([`navbar-background fixed transition-[width,left] duration-200 overflow-x-hidden overflow-y-scroll shadow shadow-black/20 overflow-hidden border-[1px] border-base-color rounded-[15px] [clip-path:inset(0_round_15px)] before:content-[''] before:absolute before:top-0 before:left-0 before:right-0 before:h-[20px] before:blur-2xl before:opacity-70 before:bg-primary-500 before:-z-1`,{"shadow-xl":R(i)&&R(re)===R(xa).EXPANDED}]),style:z({top:`calc(max(8px, env(safe-area-inset-top, 0px)) + ${R(ba)}px)`,left:R(re)===R(xa).CLOSED?`-2px`:`max(8px, env(safe-area-inset-left, 0px))`,width:`${R(re)}px`,height:`calc(100dvh - max(8px, env(safe-area-inset-top, 0px)) - max(8px, env(safe-area-inset-bottom, 0px)) - ${R(ba)}px)`,viewTransitionName:`cui-navbar`})},[V(`div`,Oa,[V(`div`,ka,[Q(n,{to:`/home`,class:`pl-[13px]`},{default:G(()=>[Q(R(bt),{src:R(gt)(`logo_animated.svg`),width:`32px`,height:`32px`,title:`camera.ui`,"aria-label":`camera.ui`,class:`hover:scale-105 active:scale-105 focus:scale-105 transition-all non-draggable-region`},null,8,[`src`])]),_:1}),V(`div`,Aa,[Q(N,{name:`fade`},{default:G(()=>[R(re)===R(xa).EXPANDED?($(),U(`div`,ja,[Q(n,{to:`/home`,class:`text-white font-bold text-lg text-shadow`},{default:G(()=>[...t[0]||=[X(`camera.ui`,-1)]]),_:1})])):q(``,!0)]),_:1})])]),V(`div`,Ma,[V(`div`,Na,[($(!0),U(K,null,B(R(x),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[R(ee)&&t.name===`Plugins`?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):q(``,!0),Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(re)===R(xa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(re)===R(xa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))]),t[2]||=V(`div`,{class:`flex-1 mt-10`},null,-1),V(`div`,Pa,[R(te).length?($(),U(K,{key:0},[V(`div`,Fa,[Q(c,{text:``,severity:`secondary`,class:P([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":R(g)||R(ne),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!R(g)&&!R(ne)}]),style:{color:`#a4a4a4`},onClick:T},{default:G(()=>[V(`div`,Ia,[R(g)?($(),H(o,{key:0,class:`w-[22px] h-[22px]`})):($(),H(s,{key:1,class:`w-[22px] h-[22px]`}))])]),_:1},8,[`class`])]),Q(N,{name:`navbar-group`},{default:G(()=>[R(g)?($(),U(`div`,La,[($(!0),U(K,null,B(R(te),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(re)===R(xa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(re)===R(xa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):q(``,!0)]),_:1})],64)):q(``,!0),($(!0),U(K,null,B(R(C),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[R(h)&&t.name===`Settings`?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):q(``,!0),Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path===`/settings`?`/settings/${R(y)}`:t.path,"fallback-active-path":t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(re)===R(xa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(re)===R(xa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`fallback-active-path`,`label`,`expanded`,`class`])]))),128)),t[1]||=V(`div`,{class:`mb-4 mt-2`,style:{borderTop:`1px solid #313131`}},null,-1),V(`div`,Ra,[Q(a,{avatar:`avatar`,label:R(l)?.username??`unknown`,description:R(l)?.role??`unknown`,expanded:R(re)===R(xa).EXPANDED,"show-logout":``,to:`/settings/account`,"dark-mode":``,"avatar-size":38,class:P([`w-[50px] h-[50px]`,{"w-full":R(re)===R(xa).EXPANDED}])},null,8,[`label`,`description`,`expanded`,`class`])])])])])],6)}}}),[[`__scopeId`,`data-v-ea8e8020`]]),Ba={class:`px-2 h-full flex items-center justify-around`,style:{paddingBottom:`calc(max(8px, env(safe-area-inset-bottom, 0px)))`}},Va=nr(Z({__name:`CuiBottombar`,setup(e,{expose:t}){let{bottombarHeight:n}=sr(),r=Ft(`bottombarRef`),i=J(()=>gr.filter(e=>e.meta?.bottombar&&e.meta.auth&&Mr(e)));return t({bottombarRef:r}),(e,t)=>{let a=va;return $(),U(`nav`,{ref_key:`bottombarRef`,ref:r,class:`cui-bottombar bottombar-background fixed bottom-0 left-0 right-0 border-t-[1px] border-color bottombar-background`,style:z({height:`calc(${R(n)}px + env(safe-area-inset-bottom, 0px))`,viewTransitionName:`cui-bottombar`})},[V(`div`,Ba,[($(!0),U(K,null,B(R(i),e=>($(),H(a,{key:e.name,icon:e.meta.bottombar.icon.default,"active-icon":e.meta.bottombar.icon.active,"active-icon-color":`var(--p-primary-color)`,to:e.path,label:``,expanded:!1,"icon-class":`text-color`,class:`w-[50px] h-[50px] transition-all duration-300`,"bottom-bar":``},null,8,[`icon`,`active-icon`,`to`]))),128))])],4)}}}),[[`__scopeId`,`data-v-b0d768aa`]]),Ha={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ua(e,t){return $(),U(`svg`,Ha,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M8.463 15.538Q7 14.075 7 12t1.463-3.537T12 7t3.538 1.463T17 12t-1.463 3.538T12 17t-3.537-1.463M2 13q-.425 0-.712-.288T1 12t.288-.712T2 11h2q.425 0 .713.288T5 12t-.288.713T4 13zm18 0q-.425 0-.712-.288T19 12t.288-.712T20 11h2q.425 0 .713.288T23 12t-.288.713T22 13zm-8.712-8.287Q11 4.425 11 4V2q0-.425.288-.712T12 1t.713.288T13 2v2q0 .425-.288.713T12 5t-.712-.288m0 18Q11 22.426 11 22v-2q0-.425.288-.712T12 19t.713.288T13 20v2q0 .425-.288.713T12 23t-.712-.288M5.65 7.05L4.575 6q-.3-.275-.288-.7t.288-.725q.3-.3.725-.3t.7.3L7.05 5.65q.275.3.275.7t-.275.7t-.687.288t-.713-.288M18 19.425l-1.05-1.075q-.275-.3-.275-.712t.275-.688q.275-.3.688-.287t.712.287L19.425 18q.3.275.288.7t-.288.725q-.3.3-.725.3t-.7-.3M16.95 7.05q-.3-.275-.288-.687t.288-.713L18 4.575q.275-.3.7-.288t.725.288q.3.3.3.725t-.3.7L18.35 7.05q-.3.275-.7.275t-.7-.275M4.575 19.425q-.3-.3-.3-.725t.3-.7l1.075-1.05q.3-.275.712-.275t.688.275q.3.275.288.688t-.288.712L6 19.425q-.275.3-.7.288t-.725-.288`},null,-1)]])}var Wa=Y({name:`material-symbols-light-mode-rounded`,render:Ua}),Ga={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ka(e,t){return $(),U(`svg`,Ga,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 21q-3.75 0-6.375-2.625T3 12t2.625-6.375T12 3q.35 0 .688.025t.662.075q-1.025.725-1.638 1.888T11.1 7.5q0 2.25 1.575 3.825T16.5 12.9q1.375 0 2.525-.613T20.9 10.65q.05.325.075.662T21 12q0 3.75-2.625 6.375T12 21`},null,-1)]])}var qa=Y({name:`material-symbols-dark-mode`,render:Ka}),Ja={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`},Ya=[`id`],Xa=[`mask`];function Za(e,t){return $(),U(`svg`,Ja,[V(`defs`,null,[V(`mask`,{id:e.idMap.SVGh8KaKdEb},[...t[0]||=[V(`g`,{fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`4`},[V(`path`,{fill:`#fff`,stroke:`#fff`,d:`m24.003 4l5.27 5.27h9.457v9.456l5.27 5.27l-5.27 5.278v9.456h-9.456L24.004 44l-5.278-5.27H9.27v-9.456L4 23.997l5.27-5.27V9.27h9.456z`}),V(`path`,{fill:`#000`,stroke:`#000`,d:`M27 17c0 8-5 9-10 9c0 4 6.5 8 12 4s2-13-2-13`})],-1)]],8,Ya)]),V(`path`,{fill:`currentColor`,d:`M0 0h48v48H0z`,mask:`url(#`+e.idMap.SVGh8KaKdEb+`)`},null,8,Xa)])}var Qa=Y({name:`icon-park-solid-dark-mode`,render:Za,setup(){return{idMap:{SVGh8KaKdEb:`uicons-`+Math.random().toString(36).substr(2,10)}}}}),$a=Z({__name:`CuiThemeSwitch`,setup(e){let t=qr(),{theme:n,autoMode:r}=Zt(t);function i(){t.toggleTheme()}return(e,t)=>{let a=Qa,o=qa,s=Wa,c=me;return $(),H(c,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:i},{default:G(()=>[R(r)?($(),H(a,{key:0,class:`w-6 h-6`})):R(n)===`dark`?($(),H(o,{key:1,class:`w-6 h-6`})):R(n)===`light`?($(),H(s,{key:2,class:`w-6 h-6`})):q(``,!0)]),_:1})}}}),eo={class:`relative flex overflow-hidden items-center justify-center w-5 h-5`},to={class:`flex flex-col justify-between w-4 h-3 transform transition-all duration-100 origin-center overflow-hidden`},no=Z({__name:`CuiNavbarToggle`,setup(e){let{bus:t}=cr(),{navbarState:n}=sr(),{xlBreakpoint:r}=dr(),{uiSettings:i}=Zt(fr()),a=W(`closed`),o=J(()=>a.value===`opened`);function s(){t.emit({navbarState:a.value===`opened`?`closed`:`opened`})}return M(n,e=>{e&&e!==a.value&&(a.value=e===`minified`||e===`closed`?`closed`:`opened`)}),(e,t)=>{let n=me;return!R(r)||R(i).interface.navbarStayCollapsed?($(),H(n,{key:0,id:`menu-icon`,class:`cui-button relative group p-2 transition-colors duration-100`,severity:`secondary`,text:``,onClick:s},{default:G(()=>[V(`div`,eo,[V(`div`,to,[V(`div`,{class:P([`h-0.5 w-2 transform transition-all duration-100 origin-center`,{"w-4 rotate-45 translate-y-[5px]":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),V(`div`,{class:P([`h-0.5 w-4 rounded transform transition-all duration-100`,{"opacity-0":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),V(`div`,{class:P([`h-0.5 w-3 transform transition-all duration-100 origin-center`,{"w-4 -rotate-45 -translate-y-[5px]":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2)])])]),_:1})):q(``,!0)}}}),ro={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function io(e,t){return $(),U(`svg`,ro,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z`},null,-1)]])}var ao=Y({name:`mdi-check-all`,render:io}),oo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function so(e,t){return $(),U(`svg`,oo,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M22.11 21.46L2.39 1.73L1.11 3l4.72 4.72A7 7 0 0 0 5 11v6l-2 2v1h15.11l2.73 2.73zM7 18v-7c0-.61.11-1.21.34-1.77L16.11 18zm3 3h4a2 2 0 0 1-2 2a2 2 0 0 1-2-2M8.29 5.09c.53-.34 1.11-.59 1.71-.8V4a2 2 0 0 1 2-2a2 2 0 0 1 2 2v.29c2.97.88 5 3.61 5 6.71v4.8l-2-2V11a5 5 0 0 0-5-5c-.78 0-1.55.2-2.24.56z`},null,-1)]])}var co=Y({name:`mdi-bell-off-outline`,render:so}),lo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function uo(e,t){return $(),U(`svg`,lo,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M8.352 20.242A4.63 4.63 0 0 0 12 22a4.63 4.63 0 0 0 3.648-1.758a27.2 27.2 0 0 1-7.296 0M18.75 9v.704c0 .845.24 1.671.692 2.374l1.108 1.723c1.011 1.574.239 3.713-1.52 4.21a25.8 25.8 0 0 1-14.06 0c-1.759-.497-2.531-2.636-1.52-4.21l1.108-1.723a4.4 4.4 0 0 0 .693-2.374V9c0-3.866 3.022-7 6.749-7s6.75 3.134 6.75 7`},null,-1)]])}var fo=Y({name:`solar-bell-bold`,render:uo}),po=`/pwa/favicon-64.ico`,mo=64,ho=`#ea5455`,go=14,_o=null,vo=null,yo=null,bo=!1,xo=0;function So(){return _o??=Array.from(document.querySelectorAll(`link[rel="icon"]`)).map(e=>({el:e,href:e.href,type:e.type})),_o}function Co(){return vo??=new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=()=>t(Error(`failed to load ${po}`)),n.src=po}),vo}function wo(e){let t=document.createElement(`canvas`);t.width=mo,t.height=mo;let n=t.getContext(`2d`);return n?(n.drawImage(e,0,0,mo,mo),n.beginPath(),n.arc(mo-go-1,mo-go-1,go,0,Math.PI*2),n.fillStyle=ho,n.fill(),t.toDataURL(`image/png`)):null}async function To(e){if(typeof document>`u`)return;let t=++xo;if(e===bo)return;let n=So();if(n.length!==0){if(!e){bo=!1;for(let{el:e,href:t,type:r}of n)e.href=t,e.type=r;return}if(!yo)try{yo=wo(await Co())}catch{return}if(!(!yo||t!==xo)){bo=!0;for(let{el:e}of n)e.href=yo,e.type=`image/png`}}}var Eo=100,Do=Vt({notifications:[]}),Oo=null,ko=null;function Ao(){return ko||(Oo=Rt(!0),Oo.run(()=>{let e=Ue(`/notifications`);ko=e,e.on(`notification`,e=>{if(e.tag){let t=Do.notifications.findIndex(t=>t.tag===e.tag);t!==-1&&Do.notifications.splice(t,1)}Do.notifications.unshift(e),Do.notifications.length>Eo&&(Do.notifications.length=Eo),jo(e)}),e.on(`history`,e=>{Do.notifications=e}),e.onReady(()=>{No()}),M(()=>Do.notifications.filter(e=>e.seenAt==null).length,e=>{Mo(e),To(e>0)},{immediate:!0})}),ko)}function jo(e){let{isElectronApp:t,electron:n}=tt();!t||!n||n.send(`show-notification`,{id:e.id,title:e.title,subtitle:e.subtitle,body:e.body,deepLink:e.deepLink,tag:e.tag,severity:e.severity})}async function Mo(e){let{isElectronApp:t,electron:n}=tt();t&&n&&n.send(`set-badge-count`,e)}async function No(){if(ko?.ready.value)try{Do.notifications=await ko.request(`get-notifications`)}catch{}}function Po(){function e(){Ao()}function t(){}function n(e){let t=Do.notifications.findIndex(t=>t.id===e.id);t!==-1&&Do.notifications.splice(t,1),e.tag&&ko?.emit(`remove-notification`,e.tag)}function r(){Do.notifications.splice(0,Do.notifications.length),ko?.emit(`clear-notifications`)}function i(){let e=Date.now();for(let t of Do.notifications)t.seenAt??=e;ko?.emit(`mark-all-seen`)}function a(e){let t=Do.notifications.find(t=>t.id===e.id);t&&t.seenAt==null&&(t.seenAt=Date.now()),ko?.emit(`mark-seen`,e.id)}function o(e){Do.notifications.find(t=>t.id===e.id)||Do.notifications.unshift(e)}return{isConnected:J(()=>ko?.connected.value??!1),notifications:J(()=>Do.notifications),notificationCount:J(()=>Do.notifications.length),unreadCount:J(()=>Do.notifications.filter(e=>e.seenAt==null).length),connect:e,disconnect:t,fetchNotifications:No,removeNotification:n,clearNotifications:r,markAllSeen:i,markSeen:a,addLocalNotification:o}}function Fo(){Oo?.stop(),Oo=null,ko=null,Do.notifications=[]}var Io={key:0,class:`flex items-center justify-center py-8`},Lo={key:1,class:`flex flex-col items-center text-center gap-3 py-6 px-2`},Ro={class:`text-sm font-semibold text-color`},zo={class:`text-xs text-muted mt-1`},Bo={class:`flex justify-between items-center mb-4 h-9`},Vo={class:`flex items-center gap-2`},Ho={class:`text-base font-semibold`},Uo={class:`flex items-center gap-1`},Wo={class:`overflow-y-auto`,style:{maxHeight:`234px`}},Go={class:`flex gap-3`},Ko={class:`flex-1 min-w-0`},qo={class:`flex justify-between items-center gap-2`},Jo={class:`flex items-center gap-1.5 shrink-0`},Yo={key:0,class:`w-2 h-2 rounded-full bg-primary-500`},Xo={class:`text-xs text-muted`},Zo={class:`text-xs text-muted mt-1 text-left line-clamp-2 overflow-hidden`},Qo={key:0,class:`text-center py-8 text-muted text-sm`},$o=Z({__name:`CuiNotificationMenu`,setup(e){let t=Qt(),n=Gr(),{t:i}=h(),{isTouch:a}=lr(),{isElectronApp:o,electron:s}=tt(),c=new Xr,l=Po(),{data:u,isLoading:d}=c.getSettingsQuery(),f=Ft(`notificationsMenuRef`),p=W({}),ee=J(()=>l.notifications.value),g=J(()=>l.unreadCount.value),_=J(()=>u.value?.enabled??!1),v=J(()=>!d.value||u.value!==void 0);function y(e,[t]){if(!t.isIntersecting){p.value[e]?.resetFn(),p.value[e]?.stopFn(),delete p.value[e];return}if(p.value[e])return;let n=t.target;if(!n.parentElement)return;let i=ye(n,()=>{p.value[e]&&p.value[e].resetFn()}),o,{direction:s,stop:c}=(a.value?m:r)(n,{threshold:10,disableTextSelect:!0,onSwipe(){for(let t in p.value)t!==e&&p.value[t]?.resetFn();s.value===`left`?p.value[e]={left:`-75px`,opacity:1,deleteOpacity:1,isSwiping:!0,resetFn(){this.left=`0`,this.opacity=1,this.deleteOpacity=0},stopFn:()=>{delete p.value[e],c(),i(),clearTimeout(o)}}:p.value[e]?.resetFn()},onSwipeEnd(){clearTimeout(o),o=setTimeout(()=>{p.value[e]&&(p.value[e].isSwiping=!1)},10)}})}function b(e){f.value?.toggle(e)}function x(){l.markAllSeen()}function S(e){l.markSeen(e)}function C(){f.value?.hide(),t.push({path:`/settings/notifications`})}function te(e){let t=Date.now()-e,n=Math.floor(t/(1e3*60)),r=Math.floor(t/(1e3*60*60)),a=Math.floor(t/(1e3*60*60*24));return n<60?`${n}${i(`components.notification_menu.short_minutes`)}`:r<24?`${r}${i(`components.notification_menu.short_hours`)}`:a<7?`${a}${i(`components.notification_menu.short_days`)}`:a<30?`${Math.floor(a/7)}${i(`components.notification_menu.short_weeks`)}`:a<365?`${Math.floor(a/30)}${i(`components.notification_menu.short_months`)}`:`${Math.floor(a/365)}${i(`components.notification_menu.short_years`)}`}function ne(e){let n=e.deepLink;f.value?.hide(),w(e),n&&t.push(n)}function w(e){e&&(p.value[e.id]?.stopFn(),l.removeNotification(e))}function re(){for(let e in p.value)p.value[e]?.stopFn();l.clearNotifications()}function E(e){switch(e){case Me.Info:return`rgb(33, 150, 243)`;case Me.Warn:return`rgb(251, 140, 0)`;case Me.Error:case Me.Critical:return`rgb(176, 0, 32)`;default:return`rgb(69, 69, 69)`}}function ie(e){if(p.value[e.id]?.isSwiping)return;let t=[e.subtitle,e.body].filter(Boolean).join(`
|
|
3
|
+
`);n.openTextDialog({data:{title:e.title,contentText:t,confirmText:e?.deepLink?i(`components.form.button.go_to_message`):i(`components.form.button.mark_as_read`)},onConfirm:()=>ne(e),onCancel:()=>w(e)})}function D(){for(let e in p.value)p.value[e]?.resetFn(),p.value[e]?.stopFn()}function ae(){return{id:`electron-update`,title:`Update`,body:`New camera.ui app update available`,severity:Me.Info,deepLink:`/settings/system`,tag:`electron-update`,createdAt:Date.now(),seenAt:null,source:{kind:`system`,id:`system.electron.update_available`}}}function O(e,t){o&&t.channel===`update-check`&&t.status===`available`&&l.addLocalNotification(ae())}async function oe(){if(o){s.removeListener(`app-status`,O),s.on(`app-status`,O),s.send(`check-for-updates`);try{(await s.invoke(`get-update-available`)).isUpdateAvailable&&l.addLocalNotification(ae())}catch{}}}return M(_,e=>{e?l.connect():Fo()},{immediate:!0}),wt(()=>{o&&oe()}),kt(()=>{s?.removeListener(`app-status`,O)}),(e,t)=>{let n=fo,r=_e,i=me,a=be,o=co,s=ao,c=Yr,l=Jr,u=Nn,d=T,m=vn;return $(),U(`div`,null,[Q(i,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:b},{icon:G(()=>[Q(n,{class:`w-6 h-6`}),R(_)&&R(g)?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] right-[10px] top-[7px]`})):q(``,!0)]),_:1}),Q(d,{ref_key:`notificationsMenuRef`,ref:f,"append-to":`self`,class:`w-[20rem] shadow-lg cui-rounded-corner notification-menu isolate overscroll-contain non-draggable-region`,onHide:D},{default:G(()=>[R(v)?R(_)?($(),U(K,{key:2},[V(`div`,Bo,[V(`div`,Vo,[V(`h3`,Ho,F(e.$t(`components.notification_menu.notifications`)),1),Q(r,{class:`rounded-full text-xs p-1`,value:R(ee).length>99?`99+`:String(R(ee).length)},null,8,[`value`])]),V(`div`,Uo,[R(g)?Kt(($(),H(i,{key:0,severity:`secondary`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:x},{icon:G(()=>[Q(s,{width:`100%`,height:`100%`})]),_:1})),[[m,{value:e.$t(`components.notification_menu.mark_all_read`)},void 0,{left:!0}]]):q(``,!0),R(ee).length?Kt(($(),H(i,{key:1,severity:`danger`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:re},{icon:G(()=>[Q(c,{width:`100%`,height:`100%`})]),_:1})),[[m,{value:e.$t(`components.notification_menu.clear_notifications`)},void 0,{left:!0}]]):q(``,!0)])]),V(`div`,Wo,[($(!0),U(K,null,B(R(ee),t=>($(),U(`div`,{key:t.id,class:`relative overflow-hidden`},[Kt(($(),U(`div`,{class:`relative transition-all duration-200`,style:z({left:R(p)[t.id]?.left||`0`,opacity:R(p)[t.id]?.opacity||1})},[Q(i,{severity:`secondary`,text:``,class:`cui-button p-2 block w-full`,onClick:e=>ie(t)},{default:G(()=>[V(`div`,Go,[V(`div`,{class:`w-2 h-2 rounded-full mt-2`,style:z({backgroundColor:E(t.severity)})},null,4),V(`div`,Ko,[V(`div`,qo,[V(`h4`,{class:P([`text-sm truncate max-w-[200px]`,t.seenAt==null?`font-semibold text-color`:`font-medium text-muted`])},F(t.title),3),V(`div`,Jo,[t.seenAt==null?($(),U(`span`,Yo)):q(``,!0),V(`span`,Xo,F(te(t.createdAt)),1)])]),V(`p`,Zo,F(t.subtitle||t.body),1)])])]),_:2},1032,[`onClick`])],4)),[[R($t),e=>y(t.id,e)]]),V(`div`,{class:`absolute right-0 top-0 h-full flex items-center gap-1 pr-4`,style:z({opacity:R(p)[t.id]?.deleteOpacity||0,pointerEvents:(R(p)[t.id]?.deleteOpacity||0)>0?`auto`:`none`})},[t.seenAt==null?Kt(($(),H(i,{key:0,severity:`secondary`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>S(t)},{icon:G(()=>[Q(l,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[m,{value:e.$t(`components.notification_menu.mark_read`)},void 0,{left:!0}]]):q(``,!0),Kt(($(),H(i,{severity:`danger`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>w(t)},{icon:G(()=>[Q(c,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[m,{value:e.$t(`components.notification_menu.delete`)},void 0,{left:!0}]])],4),R(ee).indexOf(t)===R(ee).length-1?q(``,!0):($(),H(u,{key:0,class:`my-0 py-1`}))]))),128))]),R(ee).length===0?($(),U(`div`,Qo,F(e.$t(`components.notification_menu.no_notifications`)),1)):q(``,!0)],64)):($(),U(`div`,Lo,[Q(o,{class:`w-8 h-8 text-muted`}),V(`div`,null,[V(`h3`,Ro,F(e.$t(`components.notification_menu.disabled`)),1),V(`p`,zo,F(e.$t(`components.notification_menu.disabled_hint`)),1)]),Q(i,{class:`cui-button-small`,label:e.$t(`components.notification_menu.open_settings`),onClick:C},null,8,[`label`])])):($(),U(`div`,Io,[Q(a,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))]),_:1},512)])}}}),es={key:0},ts={class:`text-sm font-medium truncate max-w-40 pointer-events-none`},ns=Z({__name:`CuiInstanceSwitcher`,setup(e){let{t}=h(),{smBreakpoint:n}=dr(),r=Er(),i={style:`background: color-mix(in srgb,var(--p-red-500),transparent 84%); color: var(--p-red-400);`},a=Ft(`menuRef`),o=Vt({}),s=null,c=J(()=>{let e=r.activeInstance,n=!r.isHomeActive||r.redirectInfo,a={label:e.name,position:`header`,active:!0},s=r.favoriteInstances.filter(e=>e.id!==r.activeId).map(e=>{let t=o[e.id],n=e.hasCredentials&&t===`checking`,a=e.hasCredentials&&t===`offline`,s,c;return a&&(s=`Offline`,c=i),{label:e.name,badge:s,badgeProps:c,loading:n,disabled:n||a,onClick:()=>r.switchInstance(e.id)}}),c=n?[{label:t(`components.instance_switcher.go_back`),icon:vr,position:`footer`,onClick:()=>{let e=r.redirectInfo;e?window.location.href=e.sourceUrl:r.switchInstance(null)}}]:[],l={label:t(`components.instance_switcher.manage`),icon:Or,position:`footer`,to:`/instances`};return[a,...s,...c,l]});function l(){s?.abort(),s=new AbortController;let{signal:e}=s,t=r.favoriteInstances.filter(e=>e.id!==r.activeId&&e.hasCredentials);for(let e of t)o[e.id]=`checking`;for(let n of t)r.probeInstance(n.id,e).then(t=>{e.aborted||(o[n.id]=t?`online`:`offline`)}).catch(()=>{e.aborted||(o[n.id]=`offline`)})}return(e,t)=>{let i=hr,o=me,s=Sr,u=ua,d=Pr;return R(r).isMultiInstance?($(),U(`div`,es,[R(n)?($(),H(o,{key:0,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:R(a)?.toggleMenu},{icon:G(()=>[Q(i,{class:`w-6 h-6`})]),_:1},8,[`onClick`])):($(),H(o,{key:1,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:R(a)?.toggleMenu},{default:G(()=>[Q(i,{class:`w-5 h-5 shrink-0 pointer-events-none`}),V(`span`,ts,F(R(r).activeInstance?.name??`Local`),1),R(a)?.isOpen?R(a)?.isOpen?($(),H(u,{key:1,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`})):q(``,!0):($(),H(s,{key:0,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`}))]),_:1},8,[`onClick`])),Q(d,{ref_key:`menuRef`,ref:a,items:R(c),popover:{appendTo:`body`,pt:{root:{class:`w-[18rem]`},content:{class:`p-0! rounded-xl! overflow-hidden!`}}},onShow:l,dividers:`sections`},null,8,[`items`])])):q(``,!0)}}}),rs={key:0,class:`flex flex-row items-center flex-1 p-2 gap-1`},is={class:`flex-1 flex items-center justify-start min-w-0`},as={key:0,class:`cui-topbar-default font-semibold text-xl truncate`},os={class:`flex-1 flex items-center justify-end min-w-0`},ss={class:`cui-topbar-default`},cs=nr(Z({__name:`CuiTopbar`,props:{offsetLeft:{},animate:{type:Boolean},background:{}},setup(e){let t=e,n=Qt(),{smBreakpoint:r}=dr(),{hasSlot:i,scrollToTop:a}=Kr(),{minifiedTopbar:o}=ur(),{topbarHeight:s}=sr(),{isElectronApp:c}=tt(),{isMultiInstance:l}=Zt(Er()),{offsetLeft:u,animate:d}=zt(t);return(e,t)=>{let f=ns,p=$o,m=no,h=$a;return $(),U(`header`,{class:P([`cui-topbar fixed flex flex-row items-center top-0 left-0 right-0 pt-safe pr-safe draggable-region`,{"!border-none":R(r)}]),style:z({height:`calc(${R(s)}px + env(safe-area-inset-top, 0px) + ${R(c)?`30px`:`0px`})`,viewTransitionName:`cui-topbar`,background:R(r)?`var(--ground-background)`:void 0,paddingTop:R(c)?`calc(30px + env(safe-area-inset-top, 0px))`:void 0})},[R(r)&&!R(o)?($(),U(`div`,rs,[V(`div`,is,[!R(i)(`left`)&&(`hasPermission`in e?e.hasPermission:R(Mr))(void 0,`admin`)&&R(n).currentRoute.value.name===`Home`&&R(l)?($(),H(f,{key:0,class:`cui-topbar-default non-draggable-region`})):q(``,!0),t[1]||=V(`div`,{id:`cui-topbar-left`,class:`cui-topbar-slot non-draggable-region`},null,-1)]),V(`div`,{class:`shrink-0 flex items-center justify-center min-w-0 cursor-pointer`,onClick:t[0]||=(...e)=>R(a)&&R(a)(...e)},[t[2]||=V(`div`,{id:`cui-topbar-center`,class:`cui-topbar-slot truncate non-draggable-region`},null,-1),R(i)(`center`)?q(``,!0):($(),U(`span`,as,F(e.$t(`views.${String(e.$route.name).toLowerCase()}.title`)),1))]),V(`div`,os,[t[3]||=V(`div`,{id:`cui-topbar-right`,class:`cui-topbar-slot non-draggable-region`},null,-1),V(`div`,ss,[Q(p,{class:`non-draggable-region`})])])])):R(o)?q(``,!0):($(),U(`div`,{key:1,class:`flex flex-row items-center flex-1 p-2`,style:z({"margin-left":`calc(${R(u)}px + max(8px, env(safe-area-inset-left, 0px)))`,transition:R(d)?`margin-left 200ms`:void 0})},[Q(m,{class:`non-draggable-region`}),(`hasPermission`in e?e.hasPermission:R(Mr))(void 0,`admin`)&&R(l)?($(),H(f,{key:0,class:`non-draggable-region`})):q(``,!0),Q(h,{class:`ml-auto non-draggable-region`}),Q(p,{class:`non-draggable-region`})],4))],6)}}}),[[`__scopeId`,`data-v-20013c43`]]),ls={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function us(e,t){return $(),U(`svg`,ls,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4m-8-2l8-8m0 0v5m0-5h-5`},null,-1)]])}var ds=Y({name:`majesticons-open`,render:us}),fs={class:`flex flex-col gap-2 w-full`},ps={for:`sensorDisplayName`,class:`cui-label`},ms=Z({__name:`RenameSensor`,props:{currentDisplayName:{}},setup(e,{expose:t}){let n=W(e.currentDisplayName);return t({onConfirm:async()=>n.value.trim()||null}),(e,t)=>{let r=C;return $(),U(`div`,fs,[V(`label`,ps,F(e.$t(`components.camera_options.sensor_display_name`)),1),Q(r,{id:`sensorDisplayName`,modelValue:R(n),"onUpdate:modelValue":t[0]||=e=>Wt(n)?n.value=e:null,class:`w-full`,autofocus:``},null,8,[`modelValue`])])}}}),hs={class:`p-4 flex flex-col gap-2`},gs={class:`cui-label`},_s={key:0,class:`flex flex-col gap-2`},vs={class:`cui-label`},ys={class:`text-sm text-muted text-center min-h-[30px]`},bs={class:`cui-label`},xs={class:`cui-label`},Ss={key:0,class:`w-full flex items-center justify-center my-5`},Cs={key:1,class:`text-sm text-muted text-center`},ws={key:1,class:`flex flex-col gap-2`},Ts={class:`cui-label`},Es={class:`text-sm text-muted text-center min-h-[30px]`},Ds={class:`cui-label`},Os={class:`cui-label`},ks={key:0,class:`w-full flex items-center justify-center my-5`},As={key:1,class:`text-sm text-muted text-center`},js={key:2,class:`flex flex-col gap-2`},Ms={class:`cui-label`},Ns={class:`text-sm text-muted text-center min-h-[30px]`},Ps={class:`cui-label`},Fs={class:`cui-label`},Is={class:`cui-label`},Ls={key:0,class:`w-full flex items-center justify-center my-5`},Rs={key:1,class:`text-sm text-muted text-center`},zs={class:`cui-label`},Bs={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Vs={class:`cui-label`},Hs={key:0,class:`w-full flex items-center justify-center my-5`},Us={key:1,class:`text-sm text-muted text-center`},Ws={key:3,class:`flex flex-col gap-2`},Gs={class:`cui-label`},Ks={class:`text-sm text-muted text-center min-h-[30px]`},qs={class:`cui-label`},Js={class:`cui-label`},Ys={class:`cui-label`},Xs={key:0,class:`w-full flex items-center justify-center my-5`},Zs={key:1,class:`text-sm text-muted text-center`},Qs={class:`cui-label`},$s={key:2,class:`text-sm text-muted text-center min-h-[30px]`},ec={class:`cui-label`},tc={key:0,class:`w-full flex items-center justify-center my-5`},nc={key:1,class:`text-sm text-muted text-center`},rc={key:4,class:`flex flex-col gap-2`},ic={class:`cui-label`},ac={class:`text-sm text-muted text-center min-h-[30px]`},oc={class:`cui-label`},sc={class:`cui-label`},cc={class:`cui-label`},lc={key:0,class:`w-full flex items-center justify-center my-5`},uc={key:1,class:`text-sm text-muted text-center`},dc={class:`cui-label`},fc={key:2,class:`text-sm text-muted text-center min-h-[30px]`},pc={class:`cui-label`},mc={key:0,class:`w-full flex items-center justify-center my-5`},hc={key:1,class:`text-sm text-muted text-center`},gc={key:5,class:`flex flex-col gap-2`},_c={class:`cui-label`},vc={key:0,class:`w-full flex items-center justify-center`},yc={key:1,class:`text-sm text-muted text-center`},bc={key:1,class:`w-full h-full`},xc={class:`cui-list-item`},Sc=Z({__name:`Plugins`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},emits:[`close`],setup(e){let t=rt(),n=He(),r=et(),i=new Br,a=new ri,o=e,s=Ge(),c=Gr(),{t:l}=h(),{camera:u,cameraDevice:d,loading:f}=zt(o),{data:p}=a.getPluginsQuery({page:1,pageSize:-1}),{data:m,isBusy:ee,suspense:g}=i.getCameraExtensionsQuery(u.value.name),{data:_,isBusy:v}=a.getPluginsExtensionsQuery({page:1,pageSize:-1}),{mutateAsync:y,isPending:b}=i.enableCameraExtensionQuery(),{mutateAsync:x,isPending:S}=i.disableCameraExtensionQuery(),{mutateAsync:C,isPending:te}=i.activateCameraExtensionQuery(),{mutateAsync:ne,isPending:w}=i.deactivateCameraExtensionQuery(),{sensors:re}=Be(d),T=Ft(`schemaRef`),E=W(`hub`),ie=W([`hub`,`detection`,`core`,`accessories`,`more`]),D=W(``),ae=W(),O=W(),oe=W(),se=W(),ce=W(),le=W(),k=W(),A=W(),ue=W(),de=W(),fe=J(()=>{if(!k.value)return``;let e=Ce.value.find(e=>e.id===k.value);return e?.pluginId&&vt(e.pluginId)||``}),pe=J(()=>k.value&&Ce.value.find(e=>e.id===k.value)?.pluginId||``),_e=J(()=>m.value?.filter(e=>r.some(t=>e.contract.provides.includes(t)))||[]),j=J(()=>{let e=new Set;for(let t of _e.value)for(let n of r)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).sort((e,t)=>{let n=l(`components.camera_options.sensor_type_${e}`),r=l(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),ve=J(()=>{let e=le.value;return e?yt(m.value?.filter(t=>t.contract.provides.includes(e))||[]):[]}),ye=J(()=>le.value?dt(le.value):!1),xe=J(()=>{if(!le.value)return[];let e=Xe(le.value),t=u.value.assignments[e],n=[];Array.isArray(t)?n=t.map(e=>e.name):t&&typeof t==`object`&&`name`in t&&(n=[t.name]);let r=ve.value.map(e=>e.pluginName);return n.sort((e,t)=>r.indexOf(e)-r.indexOf(t))}),Ce=J(()=>re.value.filter(e=>e.type===le.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),we=ge(d,D),Te=we.config,Ee=we.isLoading,De=Le(d,k,pe),Oe=De.config,ke=De.isLoading,Ae=J(()=>ee.value||v.value||b.value||S.value||te.value||w.value),je=J(()=>Ae.value||f.value||we.isLoading.value||De.isLoading.value||$e.isLoading.value||at.isLoading.value||ct.isLoading.value||ft.isLoading.value||ht.isLoading.value),Me=J(()=>(_.value?.result.filter(e=>Se(e.contract)&&e.pluginName===u.value.pluginInfo?.name)||[])[0]),Pe=J(()=>yt(m.value?.filter(e=>Ne(e.contract))||[])),Fe=J(()=>Me.value&&P(Me.value.pluginName)?[Me.value]:[]),Ie=J(()=>m.value?.filter(e=>t.some(t=>e.contract.provides.includes(t)))||[]),Re=J(()=>{let e=new Set;for(let n of Ie.value)for(let r of t)n.contract.provides.includes(r)&&e.add(r);return Array.from(e).sort((e,t)=>{let n=l(`components.camera_options.sensor_type_${e}`),r=l(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),ze=J(()=>{let e=O.value;return e?yt(m.value?.filter(t=>t.contract.provides.includes(e))||[]):[]}),Ve=J(()=>re.value.filter(e=>e.type===O.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),Ue=J(()=>{if(!A.value)return``;let e=Ve.value.find(e=>e.id===A.value);return e?.pluginId&&vt(e.pluginId)||``}),We=J(()=>A.value&&Ve.value.find(e=>e.id===A.value)?.pluginId||``),Ke=J(()=>m.value?.filter(e=>n.some(t=>e.contract.provides.includes(t)))||[]),qe=J(()=>{let e=new Set;for(let t of Ke.value)for(let r of n)t.contract.provides.includes(r)&&e.add(r);return Array.from(e).sort((e,t)=>{let n=l(`components.camera_options.sensor_type_${e}`),r=l(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Je=J(()=>{let e=se.value;return e?yt(m.value?.filter(t=>t.contract.provides.includes(e))||[]):[]}),Ye=J(()=>re.value.filter(e=>e.type===se.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),Ze=J(()=>{if(!ue.value)return``;let e=Ye.value.find(e=>e.id===ue.value);return e?.pluginId&&vt(e.pluginId)||``}),Qe=J(()=>ue.value&&Ye.value.find(e=>e.id===ue.value)?.pluginId||``),$e=ge(d,J(()=>oe.value??``)),tt=$e.config,nt=$e.isLoading,at=Le(d,A,We),ot=at.config,st=at.isLoading,ct=ge(d,J(()=>ce.value??``)),lt=ct.config,ut=ct.isLoading,ft=Le(d,ue,Qe),pt=ft.config,mt=ft.isLoading,ht=ge(d,J(()=>de.value??``)),gt=ht.config,_t=ht.isLoading,N=J(()=>{let e=p.value?.result||[];return(_.value?.result||[]).filter(t=>{let n=e.find(e=>e.pluginName===t.pluginName),r=t.contract.provides.length>0,i=t.contract.consumes.length>0;return u.value.pluginInfo?.name===t.pluginName||Se(t.contract)&&!he(t.contract)?!1:n&&(r||i||Ne(t.contract))})});function vt(e){return u.value.plugins.find(t=>t.id===e)?.name}function P(e){let t=typeof e==`string`?e:e?.name;if(t&&p.value&&p.value.result.some(e=>e.pluginName===t&&!e.disabled))return t}function yt(e){return e.sort((e,t)=>!P(e.pluginName)&&P(t.pluginName)?1:P(e.pluginName)&&!P(t.pluginName)?-1:e.displayName.localeCompare(t.displayName))}function I(e){let t=Xe(e),n=u.value.assignments[t];return Array.isArray(n)?void 0:n}function bt(e){let t=Xe(e),n=u.value.assignments[t];return Array.isArray(n)?void 0:n}async function xt(e){if(e!==void 0)D.value=e;else switch(E.value){case`cameraController`:D.value=P(Me.value?.pluginName)||``;break;case`hub`:D.value=P(Pe.value[0]?.pluginName)||``;break;case`detection`:{let e=P(O.value?I(O.value):void 0);D.value=e||``,oe.value=e||void 0;break}case`core`:{let e=P(se.value?bt(se.value):void 0);D.value=e||``,ce.value=e||void 0;break}case`accessories`:D.value=``;break;default:D.value=``;break}D.value&&E.value!==`accessories`&&P(D.value)&&await we.getConfig()}function St(){switch(E.value){case`cameraController`:Fe.value.length&&!D.value&&(D.value=Fe.value[0].pluginName);break;case`hub`:if(Pe.value.length){let e=Pe.value.find(e=>P(e.pluginName));ae.value=e?.pluginName}break;case`detection`:{Re.value.length&&(!O.value||!Re.value.includes(O.value))&&(O.value=Re.value[0]);let e=O.value?I(O.value):void 0;e&&P(e.name)?oe.value=e.name:oe.value=void 0,Ht(()=>{Ve.value.length&&!A.value&&(A.value=Ve.value[0].id)});break}case`core`:{qe.value.length&&(!se.value||!qe.value.includes(se.value))&&(se.value=qe.value[0]);let e=se.value?bt(se.value):void 0;e&&P(e.name)?ce.value=e.name:ce.value=void 0,Ht(()=>{Ye.value.length&&!ue.value&&(ue.value=Ye.value[0].id)});break}case`accessories`:j.value.length&&(!le.value||!j.value.includes(le.value))&&(le.value=j.value[0]),Ht(()=>{xe.value.length&&!de.value&&(de.value=xe.value[0])}),Ht(()=>{Ce.value.length&&!k.value&&(k.value=Ce.value[0].id)});break}}async function Ct(e){m.value&&(m.value.some(t=>t.pluginName===e.pluginName)?(await ne({cameraname:u.value.name,pluginname:e.pluginName}),T.value?.reset()):await C({cameraname:u.value.name,pluginname:e.pluginName}))}async function wt(e){if(!le.value)return;let t=xe.value;if(ye.value){let n=e,r=t[0];if(n===r)return;r&&(await x({cameraname:u.value.name,pluginname:r,type:le.value}),k.value=void 0),n?(await y({cameraname:u.value.name,pluginname:n,type:le.value}),de.value=n):de.value=void 0;return}let n=e||[],r=n.filter(e=>!t.includes(e)),i=t.filter(e=>!n.includes(e));for(let e of r)await y({cameraname:u.value.name,pluginname:e,type:le.value});for(let e of i){if(await x({cameraname:u.value.name,pluginname:e,type:le.value}),k.value){let t=Ce.value.find(e=>e.id===k.value);t&&vt(t.pluginId||``)===e&&(k.value=void 0)}de.value===e&&(de.value=void 0)}r.length&&!de.value?de.value=r[0]:n.length&&!de.value&&(de.value=n[0])}async function Et(e,t){try{await we.setValue(e.key,void 0),s.add({severity:`success`,detail:l(`components.toast.config_updated`),life:3e3})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function L(e,t){try{let n=await we.submitValue(e.key,e.payload);if(n?.toast){let e=it(n.toast.type);s.add({severity:e,detail:n.toast.message,life:3e3})}n?.schema&&n.schema.length&&c.openComponentDialog(ii,{data:{title:l(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:n.schema,config:e.payload},pluginName:t,cameraName:u.value.name,buttonKey:e.key}}})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function Dt(e,t){try{await we.setConfig(t),s.add({severity:`success`,detail:l(`components.toast.config_updated`),life:3e3})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function Ot(e){if(!(!We.value||!A.value))try{await at.setValue(e.key,void 0),s.add({severity:`success`,detail:l(`components.toast.config_updated`),life:3e3})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function kt(e){if(!(!We.value||!A.value))try{let t=await at.submitValue(e.key,e.payload);if(t?.toast){let e=it(t.toast.type);s.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function z(e){if(!(!We.value||!A.value))try{await at.setConfig(e),s.add({severity:`success`,detail:l(`components.toast.config_updated`),life:3e3})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function At(e){if(!(!Qe.value||!ue.value))try{await ft.setValue(e.key,void 0),s.add({severity:`success`,detail:l(`components.toast.config_updated`),life:3e3})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function jt(e){if(!(!Qe.value||!ue.value))try{let t=await ft.submitValue(e.key,e.payload);if(t?.toast){let e=it(t.toast.type);s.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function Mt(e){if(!(!Qe.value||!ue.value))try{await ft.setConfig(e),s.add({severity:`success`,detail:l(`components.toast.config_updated`),life:3e3})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function Nt(e){if(!(!pe.value||!k.value))try{await De.setValue(e.key,void 0),s.add({severity:`success`,detail:l(`components.toast.config_updated`),life:3e3})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function Pt(e){if(!(!pe.value||!k.value))try{let t=await De.submitValue(e.key,e.payload);if(t?.toast){let e=it(t.toast.type);s.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&c.openComponentDialog(ii,{data:{title:l(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:fe.value,cameraName:u.value.name,buttonKey:e.key,sensorId:k.value,pluginId:pe.value}}})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function It(e){if(!(!pe.value||!k.value))try{await De.setConfig(e),s.add({severity:`success`,detail:l(`components.toast.config_updated`),life:3e3})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function Rt(e){oe.value&&await $e.setValue(e.key,void 0)}async function Bt(e){if(oe.value)try{let t=await $e.submitValue(e.key,e.payload);if(t?.toast){let e=it(t.toast.type);s.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&c.openComponentDialog(ii,{data:{title:l(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:oe.value,cameraName:u.value.name,buttonKey:e.key}}})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function Vt(e){oe.value&&await $e.setConfig(e)}async function Ut(e){ce.value&&await ct.setValue(e.key,void 0)}async function Gt(e){if(ce.value)try{let t=await ct.submitValue(e.key,e.payload);if(t?.toast){let e=it(t.toast.type);s.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&c.openComponentDialog(ii,{data:{title:l(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:ce.value,cameraName:u.value.name,buttonKey:e.key}}})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function qt(e){ce.value&&await ct.setConfig(e)}async function Y(e){de.value&&await ht.setValue(e.key,void 0)}async function Jt(e){if(de.value)try{let t=await ht.submitValue(e.key,e.payload);if(t?.toast){let e=it(t.toast.type);s.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&c.openComponentDialog(ii,{data:{title:l(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:de.value,cameraName:u.value.name,buttonKey:e.key}}})}catch(e){s.add({severity:`error`,detail:e,life:3e3})}}async function Z(e){de.value&&await ht.setConfig(e)}function Yt(e){e&&c.openComponentDialog(ms,{data:{title:l(`components.camera_options.sensor_display_name`),confirmText:l(`components.form.button.save`),contentProps:{currentDisplayName:e.displayName.value}},onConfirm:async t=>{t&&t!==e.displayName.value&&await e.setDisplayName(t)}})}return M(E,()=>{Ht(()=>{St(),xt()})},{immediate:!0}),M([Pe,p],async([e,t])=>{if(E.value===`hub`&&e.length&&t?.result&&!ae.value){let t=e.find(e=>P(e.pluginName));t&&(ae.value=t.pluginName,D.value=t.pluginName,await we.getConfig())}},{immediate:!0}),M([Fe,()=>E.value],async([e,t])=>{t===`cameraController`&&e.length&&!D.value&&(D.value=e[0].pluginName,await we.getConfig())},{immediate:!0}),M(()=>D.value,async(e,t)=>{E.value===`cameraController`&&e&&e!==t&&await we.getConfig()}),M(ae,async(e,t)=>{e&&e!==t&&P(e)&&(D.value=e,await we.getConfig())}),M(O,()=>{if(A.value=void 0,O.value){let e=I(O.value);e&&P(e.name)?oe.value=e.name:oe.value=void 0}else oe.value=void 0;xt(),Ht(()=>{Ve.value.length&&(A.value=Ve.value[0].id)})}),M(oe,async(e,t)=>{if(e!==t&&O.value){let n=I(O.value);!e&&t?(await x({cameraname:u.value.name,pluginname:t,type:O.value}),T.value?.reset(),A.value=void 0):e&&(n?.name!==e&&await y({cameraname:u.value.name,pluginname:e,type:O.value}),await $e.getConfig()),Ht(()=>xt(e)),Ht(()=>{Ve.value.length&&(A.value=Ve.value[0].id)})}}),M(se,()=>{if(ue.value=void 0,se.value){let e=bt(se.value);e&&P(e.name)?ce.value=e.name:ce.value=void 0}else ce.value=void 0;xt(),Ht(()=>{Ye.value.length&&(ue.value=Ye.value[0].id)})}),M(ce,async(e,t)=>{if(e!==t&&se.value){let n=bt(se.value);!e&&t?(await x({cameraname:u.value.name,pluginname:t,type:se.value}),T.value?.reset(),ue.value=void 0):e&&(n?.name!==e&&await y({cameraname:u.value.name,pluginname:e,type:se.value}),await ct.getConfig()),Ht(()=>xt(e)),Ht(()=>{Ye.value.length&&(ue.value=Ye.value[0].id)})}}),M([A,We],async([e,t])=>{e&&t&&await at.getConfig()}),M([ue,Qe],async([e,t])=>{e&&t&&await ft.getConfig()}),M(le,()=>{k.value=void 0,xe.value.length?de.value=xe.value[0]:de.value=void 0,Ce.value.length&&(k.value=Ce.value[0].id)}),M(de,async e=>{e&&await ht.getConfig()}),M(k,async e=>{e&&pe.value&&await De.getConfig()}),M(Fe,e=>{let t=ie.value.indexOf(`cameraController`)!==-1;e.length&&!t?(ie.value.unshift(`cameraController`),(!E.value||E.value===`hub`)&&(E.value=`cameraController`,e.length&&!D.value&&(D.value=e[0].pluginName))):!e.length&&t&&(ie.value=ie.value.filter(e=>e!==`cameraController`),E.value===`cameraController`&&(E.value=`hub`))},{immediate:!0}),Tt(async()=>{await g(),St(),xt()}),(e,t)=>{let n=ei,r=$r,i=Nn,a=be,o=Zr,s=me,c=cn,l=Nr,d=ds,f=vn;return $(),U(`div`,hs,[V(`span`,gs,F(e.$t(`components.camera_options.categories`)),1),Q(r,{modelValue:R(E),"onUpdate:modelValue":[t[0]||=e=>Wt(E)?E.value=e:null,t[1]||=e=>xt()],disabled:R(Ae),mandatory:``},{default:G(()=>[($(!0),U(K,null,B(R(ie),t=>($(),H(n,{key:t,size:`small`,disabled:R(je),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.chip_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(i,{class:`m-0 py-3`}),R(E)===`cameraController`?($(),U(`div`,_s,[R(Fe).length?($(),U(K,{key:1},[V(`span`,bs,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(D),"onUpdate:modelValue":t[2]||=e=>Wt(D)?D.value=e:null,disabled:R(Ae),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Fe),e=>($(),H(n,{key:e.pluginName,size:`small`,disabled:!P(e.pluginName)||R(je),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(i,{class:`m-0 py-3`}),V(`span`,xs,F(e.$t(`components.camera_options.plugin_settings`)),1),!R(D)||!R(Te)?.schema?.length?($(),U(`div`,Ss,[R(Ee)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Cs,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{ref_key:`schemaRef`,ref:T,key:R(D),"schema-form":{schema:R(Te).schema,config:R(Te).config},loading:R(je),onOnFormSubmit:t[3]||=e=>Dt(R(D),e),onOnSubmit:t[4]||=e=>L(e,R(D)),onOnAction:t[5]||=e=>Et(e,R(D))},null,8,[`schema-form`,`loading`]))],64)):($(),U(K,{key:0},[V(`span`,vs,F(e.$t(`components.camera_options.chip_plugins`)),1),V(`span`,ys,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(E)===`hub`?($(),U(`div`,ws,[R(Pe).length?($(),U(K,{key:1},[V(`span`,Ds,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(ae),"onUpdate:modelValue":t[6]||=e=>Wt(ae)?ae.value=e:null,disabled:R(Ae),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Pe),e=>($(),H(n,{key:e.pluginName,size:`small`,disabled:!P(e.pluginName)||R(je),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(i,{class:`m-0 py-3`}),V(`span`,Os,F(e.$t(`components.camera_options.plugin_settings`)),1),!R(D)||!R(Te)?.schema?.length?($(),U(`div`,ks,[R(Ee)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,As,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{ref_key:`schemaRef`,ref:T,key:R(D),"schema-form":{schema:R(Te).schema,config:R(Te).config},loading:R(je),onOnFormSubmit:t[7]||=e=>Dt(R(D),e),onOnSubmit:t[8]||=e=>L(e,R(D)),onOnAction:t[9]||=e=>Et(e,R(D))},null,8,[`schema-form`,`loading`]))],64)):($(),U(K,{key:0},[V(`span`,Ts,F(e.$t(`components.camera_options.chip_plugins`)),1),V(`span`,Es,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(E)===`detection`?($(),U(`div`,js,[R(Re).length?($(),U(K,{key:1},[V(`span`,Ps,F(e.$t(`components.camera_options.sensor_types`)),1),Q(r,{modelValue:R(O),"onUpdate:modelValue":t[10]||=e=>Wt(O)?O.value=e:null,disabled:R(Ae),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Re),t=>($(),H(n,{key:t,size:`small`,disabled:R(je),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(ze).length?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,Fs,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(oe),"onUpdate:modelValue":t[11]||=e=>Wt(oe)?oe.value=e:null,disabled:R(Ae),class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(ze),e=>($(),H(n,{key:e.pluginName,size:`small`,filter:``,disabled:!P(e.pluginName)||R(je),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(oe)&&R(oe)!==R(u).pluginInfo?.name?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,Is,F(e.$t(`components.camera_options.plugin_settings`)),1),R(tt)?.schema?.length?($(),H(ni,{key:`detection-plugin-${R(oe)}`,"schema-form":{schema:R(tt).schema,config:R(tt).config},loading:R(je),onOnFormSubmit:t[12]||=e=>Vt(e),onOnSubmit:t[13]||=e=>Bt(e),onOnAction:t[14]||=e=>Rt(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,Ls,[R(nt)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Rs,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0),Q(i,{class:`m-0 py-3`}),V(`span`,zs,F(e.$t(`components.camera_options.sensors`)),1),R(Ve).length?($(),H(r,{key:1,modelValue:R(A),"onUpdate:modelValue":t[15]||=e=>Wt(A)?A.value=e:null,disabled:R(Ae),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ve),e=>($(),H(n,{key:e.id,size:`small`,disabled:R(je),value:e.id},{append:G(()=>[Q(s,{text:R(k)!==e.id,rounded:``,severity:R(k)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Lt(t=>Yt(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,Bs,F(e.$t(`components.camera_options.no_sensors`)),1)),R(A)?($(),U(K,{key:3},[Q(i,{class:`m-0 py-3`}),V(`span`,Vs,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(Ue)||!R(ot)?.schema?.length?($(),U(`div`,Hs,[R(st)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Us,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{key:`sensor-${R(A)}`,"schema-form":{schema:R(ot).schema,config:R(ot).config},loading:R(je),onOnFormSubmit:t[16]||=e=>z(e),onOnSubmit:t[17]||=e=>kt(e),onOnAction:t[18]||=e=>Ot(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,Ms,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,Ns,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(E)===`core`?($(),U(`div`,Ws,[R(qe).length?($(),U(K,{key:1},[V(`span`,qs,F(e.$t(`components.camera_options.sensor_types`)),1),Q(r,{modelValue:R(se),"onUpdate:modelValue":t[19]||=e=>Wt(se)?se.value=e:null,disabled:R(Ae),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(qe),t=>($(),H(n,{key:t,size:`small`,disabled:R(je),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(Je).length?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,Js,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(ce),"onUpdate:modelValue":t[20]||=e=>Wt(ce)?ce.value=e:null,disabled:R(Ae),class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Je),e=>($(),H(n,{key:e.pluginName,size:`small`,filter:``,disabled:!P(e.pluginName)||R(je),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(ce)&&R(ce)!==R(u).pluginInfo?.name?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,Ys,F(e.$t(`components.camera_options.plugin_settings`)),1),R(lt)?.schema?.length?($(),H(ni,{key:`core-plugin-${R(ce)}`,"schema-form":{schema:R(lt).schema,config:R(lt).config},loading:R(je),onOnFormSubmit:t[21]||=e=>qt(e),onOnSubmit:t[22]||=e=>Gt(e),onOnAction:t[23]||=e=>Ut(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,Xs,[R(ut)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Zs,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0),Q(i,{class:`m-0 py-3`}),V(`span`,Qs,F(e.$t(`components.camera_options.sensors`)),1),R(Ye).length?($(),H(r,{key:1,modelValue:R(ue),"onUpdate:modelValue":t[24]||=e=>Wt(ue)?ue.value=e:null,disabled:R(Ae),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ye),e=>($(),H(n,{key:e.id,size:`small`,disabled:R(je),value:e.id},{append:G(()=>[Q(s,{text:R(k)!==e.id,rounded:``,severity:R(k)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Lt(t=>Yt(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,$s,F(e.$t(`components.camera_options.no_sensors`)),1)),R(ue)?($(),U(K,{key:3},[Q(i,{class:`m-0 py-3`}),V(`span`,ec,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(Ze)||!R(pt)?.schema?.length?($(),U(`div`,tc,[R(mt)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,nc,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{key:`sensor-${R(ue)}`,"schema-form":{schema:R(pt).schema,config:R(pt).config},loading:R(je),onOnFormSubmit:t[25]||=e=>Mt(e),onOnSubmit:t[26]||=e=>jt(e),onOnAction:t[27]||=e=>At(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,Gs,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,Ks,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(E)===`accessories`?($(),U(`div`,rc,[R(j).length?($(),U(K,{key:1},[V(`span`,oc,F(e.$t(`components.camera_options.sensor_types`)),1),Q(r,{modelValue:R(le),"onUpdate:modelValue":t[28]||=e=>Wt(le)?le.value=e:null,disabled:R(Ae),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(j),t=>($(),H(n,{key:t,size:`small`,disabled:R(je),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(ve).length?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,sc,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{"model-value":R(ye)?R(xe)[0]:R(xe),disabled:R(Ae),multiple:!R(ye),class:`min-h-[30px]`,"onUpdate:modelValue":wt},{default:G(()=>[($(!0),U(K,null,B(R(ve),e=>($(),H(n,{key:e.pluginName,size:`small`,filter:``,disabled:!P(e.pluginName)||R(je),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`model-value`,`disabled`,`multiple`]),R(de)&&R(de)!==R(u).pluginInfo?.name?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,cc,F(e.$t(`components.camera_options.plugin_settings`)),1),R(gt)?.schema?.length?($(),H(ni,{key:`accessory-plugin-${R(de)}`,"schema-form":{schema:R(gt).schema,config:R(gt).config},loading:R(je),onOnFormSubmit:t[29]||=e=>Z(e),onOnSubmit:t[30]||=e=>Jt(e),onOnAction:t[31]||=e=>Y(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,lc,[R(_t)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,uc,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0)],64)):q(``,!0),Q(i,{class:`m-0 py-3`}),V(`span`,dc,F(e.$t(`components.camera_options.sensors`)),1),R(Ce).length?($(),H(r,{key:1,modelValue:R(k),"onUpdate:modelValue":t[32]||=e=>Wt(k)?k.value=e:null,disabled:R(Ae),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ce),e=>($(),H(n,{key:e.id,size:`small`,disabled:R(je),value:e.id},{append:G(()=>[Q(s,{text:R(k)!==e.id,rounded:``,severity:R(k)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Lt(t=>Yt(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,fc,F(e.$t(`components.camera_options.no_sensors`)),1)),R(k)?($(),U(K,{key:3},[Q(i,{class:`m-0 py-3`}),V(`span`,pc,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(fe)||!R(Oe)?.schema?.length?($(),U(`div`,mc,[R(ke)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,hc,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{key:`sensor-${R(k)}`,"schema-form":{schema:R(Oe).schema,config:R(Oe).config},loading:R(je),onOnFormSubmit:t[33]||=e=>It(e),onOnSubmit:t[34]||=e=>Pt(e),onOnAction:t[35]||=e=>Nt(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,ic,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,ac,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(E)===`more`?($(),U(`div`,gc,[V(`span`,_c,F(e.$t(`components.camera_options.manage_plugins`)),1),R(v)||!R(N).length?($(),U(`div`,vc,[R(v)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,yc,F(e.$t(`components.camera_options.no_plugins_found`)),1))])):($(),U(`div`,bc,[($(!0),U(K,null,B(R(N),t=>Kt(($(),U(`div`,{key:t.pluginName,class:`cui-list-item`},[Q(l,{disabled:R(Ae)||!P(t.pluginName),class:`h-14`,onClick:n=>e.$router.push(`/plugins/${t.pluginName}`)},{append:G(()=>[Q(c,{"model-value":R(m)?.some(e=>e.pluginName===t.pluginName),disabled:R(Ae)||!P(t.pluginName),"onUpdate:modelValue":e=>Ct(t)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]),default:G(()=>[V(`span`,null,F(t.displayName),1)]),_:2},1032,[`disabled`,`onClick`])])),[[f,{value:P(t.pluginName)===void 0?e.$t(`components.form.tooltip.disabled`):``},void 0,{top:!0}]])),128))])),V(`div`,xc,[Q(l,{class:`h-14`,onClick:t[36]||=t=>e.$router.push(`/plugins`)},{append:G(()=>[Q(s,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`},{icon:G(()=>[Q(d,{width:`100%`,height:`100%`})]),_:1})]),default:G(()=>[V(`span`,null,F(e.$t(`components.camera_options.more_plugins`)),1)]),_:1})])])):q(``,!0)])}}});async function Cc({signal:e}){return(await lt.get(`/virtual-sensors`,{signal:e})).data}async function wc({data:e}){return(await lt.post(`/virtual-sensors`,e)).data}async function Tc({id:e,data:t}){return(await lt.patch(`/virtual-sensors/${e}`,t)).data}async function Ec({id:e}){await lt.delete(`/virtual-sensors/${e}`)}var Dc=class{_queryClient=Ot();t=Je.global.t;toast=Ge();queryActivator=W([{name:`getVirtualSensorsQuery`,enabled:!0}]);getVirtualSensorsQuery(){return Ze({queryKey:[`virtualSensorsList`],queryFn:({signal:e})=>Cc({signal:e}),placeholderData:e=>e,enabled:()=>this.queryActivator.value.some(e=>e.name===`getVirtualSensorsQuery`&&e.enabled)})}createVirtualSensorQuery(){return Ct({mutationFn:wc,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]}),await this._queryClient.refetchQueries({queryKey:[`camerasList`]}),this.toast.add({severity:`success`,detail:this.t(`components.camera_options.virtual_sensor_created`),life:3e3})}})}patchVirtualSensorQuery(){return Ct({mutationFn:Tc,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]})}})}deleteVirtualSensorQuery(){return Ct({mutationFn:Ec,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]}),await this._queryClient.refetchQueries({queryKey:[`camerasList`]})}})}},Oc={for:`virtualSensorType`,class:`cui-label`},kc={for:`virtualSensorName`,class:`cui-label`},Ac=Z({__name:`VirtualSensorCreate`,props:{cameraId:{}},setup(e,{expose:t}){let n=e,{t:r}=h(),i=Ge(),a=pt.omit({cameraId:!0}),o=Ft(`formRef`),s=W($e[0]),c=W(``),l=J(()=>$e.map(e=>({label:r(`components.camera_options.sensor_type_${e}`),value:e})));return t({onConfirm:async()=>(await o.value?.validate())?.valid?{cameraId:n.cameraId,type:s.value,name:c.value.trim()}:(i.add({severity:`error`,detail:r(`components.toast.validation_failed`),life:3e3}),null)}),(e,t)=>{let n=pn,r=C;return $(),H(R(St),{ref_key:`formRef`,ref:o,class:`flex flex-col gap-4 w-full`,"validation-schema":R(a)},{default:G(()=>[Q(R(I),{"model-value":R(s),name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:r})=>[V(`label`,Oc,F(e.$t(`components.form.label.type`)),1),Q(n,{id:`virtualSensorType`,"model-value":R(s),options:R(l),"option-label":`label`,"option-value":`value`,invalid:r.length>0,class:`w-full`,onValueChange:t[0]||=e=>s.value=e},null,8,[`model-value`,`options`,`invalid`]),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{modelValue:R(c),"onUpdate:modelValue":t[1]||=e=>Wt(c)?c.value=e:null,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,kc,F(e.$t(`components.form.label.name`)),1),Q(r,vt({id:`virtualSensorName`},t,{invalid:n.length>0,class:`w-full`,placeholder:e.$t(`components.camera_options.virtual_sensor_name_placeholder`)}),null,16,[`invalid`,`placeholder`]),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])]),_:1},8,[`validation-schema`])}}}),jc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Mc(e,t){return $(),U(`svg`,jc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H5V5h14zm-2-2H7V7h10z`},null,-1)]])}var Nc=Y({name:`mdi-checkbox-intermediate`,render:Mc}),Pc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Fc(e,t){return $(),U(`svg`,Pc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M3.14 1A2.14 2.14 0 0 0 1 3.14V5h2V3h2V1zM7 1v2h3V1zm5 0v2h2v2h2V3.14C16 1.96 15.04 1 13.86 1zM1 7v3h2V7zm8 0c-1.11 0-2 .89-2 2v7h6.86A2.14 2.14 0 0 0 16 13.86V7zm9 0v2h2v2h2V9c0-1.11-.89-2-2-2zM9 9h5v5H9zm-8 3v1.86C1 15.04 1.96 16 3.14 16H5v-2H3v-2zm19 1v3h2v-3zM7 18v2c0 1.11.89 2 2 2h2v-2H9v-2zm13 0v2h-2v2h2c1.11 0 2-.89 2-2v-2zm-7 2v2h3v-2z`},null,-1)]])}var Ic=Y({name:`mdi-vector-intersection`,render:Fc}),Lc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Rc(e,t){return $(),U(`svg`,Lc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M4 6v13h16V6zm14 11H6V8h12z`},null,-1)]])}var zc=Y({name:`mdi-rectangle-outline`,render:Rc}),Bc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Vc(e,t){return $(),U(`svg`,Bc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M4 6v13h16V6z`},null,-1)]])}var Hc=Y({name:`mdi-rectangle`,render:Vc}),Uc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Wc(e,t){return $(),U(`svg`,Uc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M20.84 22.73L18.11 20H17c-1.1 0-2-.9-2-2v-1.11l-2.34-2.34l-.85.49c-.95.55-2.18.22-2.73-.73l-1.5-2.6c-.4-.71-.33-1.53.1-2.14L1.11 3l1.28-1.27l19.72 19.73zM18.5 13c0-.57-.2-1.1-.53-1.5l1.97-1.15c1.01-.59 1.36-1.88.77-2.89l-1.38-2.4a2.125 2.125 0 0 0-2.89-.78l-5.67 3.29l7.09 7.09c.4-.44.64-1.02.64-1.66M2 12.62l3.5 6.06l2.53-3.18l-2-3.47z`},null,-1)]])}var Gc=Y({name:`mdi-cctv-off`,render:Wc}),Kc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function qc(e,t){return $(),U(`svg`,Kc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 2c5.5 0 10 4.5 10 10s-4.5 10-10 10S2 17.5 2 12S6.5 2 12 2m0 2c-1.9 0-3.6.6-4.9 1.7l11.2 11.2c1-1.4 1.7-3.1 1.7-4.9c0-4.4-3.6-8-8-8m4.9 14.3L5.7 7.1C4.6 8.4 4 10.1 4 12c0 4.4 3.6 8 8 8c1.9 0 3.6-.6 4.9-1.7`},null,-1)]])}var Jc=Y({name:`mdi-cancel`,render:qc}),Yc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Xc(e,t){return $(),U(`svg`,Yc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`},null,-1)]])}var Zc=Y({name:`mdi-undo`,render:Xc}),Qc=e(Rr(),1),$c=[`audio`],el=[`audio`,`motion`],tl={ref:`container`,class:`w-full h-full relative min-w-0`},nl={class:`flex flex-col justify-center items-center`},rl={class:`relative w-full`},il={class:`relative w-full flex flex-col items-center justify-center`},al={class:`absolute top-0 left-0 right-0 bottom-0`},ol={class:`sandbox w-full h-full`},sl={class:`handles`},cl=[`data-id`,`data-point`,`data-point-index`,`data-zone-index`,`onDblclick`],ll={class:`clipboard`},ul={width:`100%`,height:`100%`,class:`polygon-container`},dl=[`d`,`onClick`,`onDblclick`,`onMousedown`,`onTouchstart`],fl=[`id`],pl=[`fill`],ml=[`id`],hl=[`fill`],gl=[`x1`,`y1`,`x2`,`y2`,`stroke`],_l=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-opacity`,`marker-end`,`marker-start`,`onClick`],vl=[`x`,`y`,`fill`],yl=[`x`,`y`],bl=[`x`,`y`,`fill`],xl=[`x`,`y`],Sl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Cl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],wl={class:`w-full h-full flex flex-col items-center justify-center min-w-0`,style:{width:`calc(100% - 20px)`,"margin-top":`10px`,"margin-bottom":`10px`}},Tl={class:`flex flex-col field-gap w-full`},El=[`for`],Dl={key:0,class:`cui-input-error`},Ol={class:`flex flex-col field-gap w-full`},kl=[`for`],Al={class:`flex flex-col field-gap w-full`},jl=[`for`],Ml={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},Nl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},Pl={class:`flex flex-col field-gap w-full`},Fl=[`for`],Il={key:0,class:`cui-input-error`},Ll={class:`flex flex-col field-gap w-full`},Rl=[`for`],zl={class:`flex flex-col field-gap w-full`},Bl=[`for`],Vl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},Hl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},Ul=nr(Z({__name:`ZoneEditor`,props:{cameraName:{},zones:{},lines:{},initialTab:{},initialSelection:{}},setup(e,{expose:t}){let n=new Br,r=e,i=Ge(),{t:a}=h(),o=yt(`dialogRefProps`),{mutateAsync:s,isPending:c}=n.patchZonesQuery(),{mutateAsync:l,isPending:u}=n.patchLinesQuery(),{cameraName:d,zones:f}=zt(r),p=Ft(`cameraCardRef`),m=Ft(`container`),ee=Ft(`draggablesRef`),g=Ft(`outsideRef`),_=Ft(`playgroundContainerRef`),v=W(r.initialTab??`zones`),y=It([]),b=W([]),x=W([]),S=W(!1),te=W([]),ne=W(void 0),w=W(-1),re=W(-1),T=W(-1);r.initialSelection!==void 0&&((r.initialTab??`zones`)===`zones`?w.value=r.initialSelection:T.value=r.initialSelection);let E={x:0,y:0},ie=!1,D=null,ae=Ie(m),O=Ie(_),oe=ui.element.shape.name,se=di.element.shape.name,ce=J(()=>{if(w.value<0)return``;let e=b.value[w.value];if(!e||e.isPrivacyMask)return``;let t=oe.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),le=J(()=>{if(T.value<0)return``;let e=x.value[T.value];if(!e)return``;let t=se.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),k=J(()=>Math.max(0,O.width.value-20)),A=J(()=>Math.max(0,O.height.value-20)),de=J(()=>[{label:a(`components.zone_editor.tab_zones`),value:`zones`},{label:a(`components.zone_editor.tab_lines`),value:`lines`}]),fe=J(()=>{let e=ue.filter(e=>!$c.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),pe=J(()=>{let e=ue.filter(e=>!el.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),he=J(()=>!!(o.loading?.value||c.value||u.value)),ge=J(()=>{let e=[];return S.value&&e.push(`customizing`),b.value?.length||e.push(`start`),e.join(` `)});function _e(){if(b.value){if(b.value.length===0){te.value=[];return}te.value=b.value.flatMap((e,t)=>e.points.map((e,n)=>({_id:`z${t}-p${n}`,zoneIndex:t,pointIndex:n,point:[e[0],e[1]]})))}}function j(e){if(`touches`in e){let t=e.touches[0];return{x:t.clientX,y:t.clientY}}return{x:e.clientX,y:e.clientY}}function ve(e,t){if(e.stopPropagation(),!_.value)return;ke(S.value),ie=!0,w.value=t;let n=_.value.getBoundingClientRect(),{x:r,y:i}=j(e),a=k.value,o=A.value;E.x=(r-n.left-10)/a*100,E.y=(i-n.top-10)/o*100}function be(e){if(!ie||!_.value||w.value===-1||!b.value.length)return;let t=_.value.getBoundingClientRect(),{x:n,y:r}=j(e),i=k.value,a=A.value,o=(n-t.left-10)/i*100,s=(r-t.top-10)/a*100,c=o-E.x,l=s-E.y,u=b.value[w.value].points,d=!1;for(let e=0;e<u.length;e++){let t=u[e][0]+c,n=u[e][1]+l;if(t<0||t>100||n<0||n>100){d=!0;break}}if(!d)for(let e=0;e<u.length;e++){u[e][0]+=c,u[e][1]+=l,u[e][0]=Math.max(0,Math.min(100,u[e][0])),u[e][1]=Math.max(0,Math.min(100,u[e][1]));let t=u[e][0]/100*i,n=u[e][1]/100*a;y.value.find(t=>t.id===`z${w.value}-p${e}`)?.setPosition(t,n)}E.x=o,E.y=s}function xe(){setTimeout(()=>{ie=!1},100)}function Se(){!b.value.length||w.value===-1||(b.value[w.value].isPrivacyMask=!b.value[w.value].isPrivacyMask)}function Ce(){b.value[w.value]&&(b.value[w.value].filter=b.value[w.value].filter===`include`?`exclude`:`include`)}function we(){b.value[w.value]&&(b.value[w.value].type=b.value[w.value].type===`intersect`?`contain`:`intersect`)}function Te(e){if(!S.value||ie)return;let t=ne.value===void 0?b.value.length:ne.value,n=Math.min(Math.max(Math.round((e.offsetX-10)/k.value*100),0),100),r=Math.min(Math.max(Math.round((e.offsetY-10)/A.value*100),0),100);if(ne.value===void 0){let e=`zone-${Date.now()}`;b.value.push({name:e,points:[],filter:`include`,type:`contain`,labels:[`motion`,`person`,`vehicle`,`animal`],isPrivacyMask:!1,color:Pe()}),ne.value=b.value.length-1}b.value[t].points.push([n,r]),_e(),Ht(()=>{let e=b.value[t].points.length-1;Ee({_id:`z${t}-p${e}`,zoneIndex:t,pointIndex:e,point:[n,r]})})}function Ee(e){if(e.zoneIndex===void 0||e.pointIndex===void 0)return;let t=ee.value?.filter(t=>t.dataset.pointIndex===e.pointIndex.toString()&&t.dataset.zoneIndex===e.zoneIndex.toString());!t||t.length===0||He(t[0],e.point)}function De(e){if(!b.value.length)return;let t=Math.round(e.point[0]/k.value*100),n=Math.round(e.point[1]/A.value*100);b.value[e.zoneIndex].points[e.pointIndex]=[t,n]}function Oe(){S.value=!0,ne.value=void 0}function ke(e){if(ne.value===void 0){S.value=!1;return}S.value=e||!1;let t=ne.value;!b.value[t]||!b.value[t].points||(b.value[t].points.length<3?(b.value.splice(t,1),_e()):(ee.value?.forEach(e=>We(e)),w.value=t),ne.value=void 0)}function Ae(){S.value=!0,ne.value=w.value}function je(){w.value===-1||!b.value.length||(b.value.splice(w.value,1),w.value=Math.max(-1,w.value-1),_e(),Ht(()=>{ze()}))}function Me(){if(b.value?.length){if(S.value&&ne.value!==void 0){let e=b.value[ne.value];e.points.length&&(e.points.pop(),e.points.length===0&&(b.value.splice(ne.value,1),ne.value=void 0),_e());return}b.value.length>0&&(b.value.pop(),_e(),Ht(()=>{ze()}))}}function Ne(){ie=!1,S.value=!1,ne.value=void 0,b.value&&(b.value.length=0,te.value=[],Ht(()=>{Be()}))}function Pe(){return`#`+[Math.floor(Math.random()*256),Math.floor(Math.random()*256),Math.floor(Math.random()*256)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Fe(e){if(!e||!e.length)return``;let t=e.map(e=>{let t=Math.round(e[0]/100*k.value),n=Math.round(e[1]/100*A.value);return`${t+10},${n+10}`});if(t.length===0)return``;let n=`M ${t[0]}`;for(let e=1;e<t.length;e++)n+=` L ${t[e]}`;return n+=` Z`,n}function Le(e){S.value||(w.value=e)}function ze(){Be(),ee.value?.forEach(e=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex)return;let t=parseInt(e.dataset.zoneIndex),n=parseInt(e.dataset.pointIndex);if(!b.value[t]||!b.value[t].points[n])return;let r=b.value[t].points[n];r&&(He(e,r),We(e))})}function Be(){y.value.forEach(e=>e.destroy()),y.value=[]}function Ve(e){!b.value.length||!b.value[e.zoneIndex]||b.value[e.zoneIndex].points.length<4||(b.value[e.zoneIndex].points.splice(e.pointIndex,1),_e(),Ht(()=>{ze()}))}function He(e,t){Object.assign(e.style,Ue(t))}function Ue(e){return{left:Math.round(e[0]/100*k.value)+`px`,top:Math.round(e[1]/100*A.value)+`px`}}function We(e){e.classList.add(`draggable`);let t=new Qc.default(e,{containment:!0,grid:[0,0]}).on(`pointerDown`,()=>{document.querySelectorAll(`[data-point="${e.dataset.zoneIndex}-${e.dataset.pointIndex}"]`)[0]?.classList.add(`changing`)}).on(`dragMove`,()=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex||!e.dataset.id)return;let n=t.position.x,r=t.position.y;De({_id:e.dataset.id,point:[n,r],pointIndex:parseInt(e.dataset.pointIndex),zoneIndex:parseInt(e.dataset.zoneIndex)})}).on(`pointerUp`,()=>{document.querySelectorAll(`.point`).forEach(e=>e.classList.remove(`changing`))});t.id=e.dataset.id,y.value.push(t)}function Ke(e,t,n){e.preventDefault(),T.value=t,D={lineIndex:t,pointIndex:n};let r=e=>{if(!D||!_.value)return;let t=_.value.getBoundingClientRect(),{x:n,y:r}=j(e),i=Math.min(Math.max((n-t.left-10)/k.value*100,0),100),a=Math.min(Math.max((r-t.top-10)/A.value*100,0),100);x.value[D.lineIndex].points[D.pointIndex]=[Math.round(i),Math.round(a)]},i=()=>{D=null,document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),document.removeEventListener(`touchmove`,r),document.removeEventListener(`touchend`,i)};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i),document.addEventListener(`touchmove`,r),document.addEventListener(`touchend`,i)}function qe(){x.value.push({name:`line-${Date.now()}`,points:[[40,30],[60,70]],direction:`both`,labels:[`person`,`vehicle`,`animal`,`package`],color:Pe()}),T.value=x.value.length-1}function Je(){T.value<0||!x.value.length||(x.value.splice(T.value,1),T.value=Math.max(-1,T.value-1))}function Ye(){if(T.value<0)return;let e=x.value[T.value];if(!e)return;let t=[`both`,`a-to-b`,`b-to-a`];e.direction=t[(t.indexOf(e.direction)+1)%t.length]}function Xe(e){let t=k.value,n=A.value,r=e.points[0][0]/100*t+10,i=e.points[0][1]/100*n+10,a=e.points[1][0]/100*t+10,o=e.points[1][1]/100*n+10,s=(r+a)/2,c=(i+o)/2,l=a-r,u=o-i,d=Math.sqrt(l*l+u*u)||1,f=-u,p=l,m=s-f/2,h=c-p/2,ee=s+f/2,g=c+p/2,_=f/d,v=p/d,y=10+t,b=10+n,x=(e,t)=>({x:Math.max(19,Math.min(y-9,e)),y:Math.max(19,Math.min(b-9,t))}),S=x(m-_*21,h-v*21),C=x(ee+_*21,g+v*21);return{h1x:r,h1y:i,h2x:a,h2y:o,ax:S.x+_*15,ay:S.y+v*15,bx:C.x-_*15,by:C.y-v*15,labelAx:S.x,labelAy:S.y,labelBx:C.x,labelBy:C.y}}async function Ze(){try{let e=[];e.push(s({cameraname:d.value,zoneData:b.value})),e.push(l({cameraname:d.value,lineData:x.value})),await Promise.all(e)}catch(e){return i.add({severity:`error`,detail:e,life:3e3}),null}}return ye(g,e=>{let t=e.target,n=t.closest(`.polygon`),r=t.closest(`.edit-button`),i=t.closest(`.remove-button`),a=t.closest(`.handle`),o=t.closest(`.zone-buttons`),s=t.closest(`.p-multiselect-list`),c=t.closest(`.p-colorpicker-panel`);!n&&!r&&!i&&!a&&!S.value&&!o&&!s&&!c&&(w.value=-1)}),M(re,()=>{re.value=-1}),M(w,(e,t)=>{if(e===-1&&b.value?.length&&b.value[t]){w.value=t;return}e===-1&&b.value?.length&&(re.value=0)}),M(f,()=>{b.value=ft(f.value),_e()},{deep:!0,immediate:!0}),M(()=>r.lines,()=>{x.value=ft(r.lines)},{deep:!0,immediate:!0}),M(v,e=>{e===`zones`?b.value.length&&(w.value<0||w.value>=b.value.length)&&(w.value=0):x.value.length&&(T.value<0||T.value>=x.value.length)&&(T.value=0)},{immediate:!0}),M([O.width,O.height],()=>{ze()}),wt(async()=>{setTimeout(()=>{ze()})}),t({isLoading:he,onConfirm:Ze}),(e,t)=>{let n=Qn,r=Re,i=C,a=mn,o=Tn,s=Mn,c=fn,l=si,u=me,f=pi,m=Jr,h=Zr,y=Zc,re=Jc,E=Gc,ie=fi,D=Hc,O=zc,oe=Ic,se=Nc,k=vn;return $(),U(`div`,tl,[V(`div`,nl,[V(`div`,rl,[V(`div`,{ref_key:`outsideRef`,ref:g},null,512),V(`div`,{class:P([`w-full flex justify-center gap-3`,{"flex-row items-stretch":R(ae).width.value>740,"flex-col":R(ae).width.value<=740}])},[V(`div`,il,[V(`div`,al,[V(`div`,{ref_key:`playgroundContainerRef`,ref:_,class:`playground-container flex w-full h-full min-w-0`},[V(`section`,{class:P([`playground w-full h-full`,R(ge)]),onClick:Te},[V(`div`,ol,[V(`div`,sl,[($(!0),U(K,null,B(R(te),e=>Kt(($(),U(`div`,{key:e._id,ref_for:!0,ref_key:`draggablesRef`,ref:ee,class:`handle`,"data-id":e._id,"data-point":`${e.zoneIndex}-${e.pointIndex}`,"data-point-index":e.pointIndex,"data-zone-index":e.zoneIndex,onDblclick:Lt(t=>Ve(e),[`prevent`])},[...t[8]||=[V(`div`,{class:`delete-point`},null,-1)]],40,cl)),[[Gt,R(v)===`zones`]])),128)),V(`div`,ll,[($(),U(`svg`,ul,[R(v)===`zones`?($(!0),U(K,{key:0},B(R(b),(e,t)=>($(),U(`path`,{key:`zone-${t}`,d:Fe(e.points),class:P([`cursor-pointer`,{dash:e.type===`intersect`&&!e.isPrivacyMask,selected:R(w)===t}]),style:z({fill:e.isPrivacyMask?`rgba(16, 16, 16, 0.9)`:e.filter===`exclude`?`transparent`:`${e.color}4D`,stroke:e.isPrivacyMask?`#333333`:e.color,"stroke-width":`2`}),onClick:e=>Le(t),onDblclick:()=>e.isPrivacyMask=!e.isPrivacyMask,onMousedown:e=>ve(e,t),onMousemove:be,onMouseup:xe,onTouchstart:e=>ve(e,t),onTouchmove:be,onTouchend:xe},null,46,dl))),128)):q(``,!0),R(v)===`lines`?($(),U(K,{key:1},[V(`defs`,null,[($(!0),U(K,null,B(R(x),(e,t)=>($(),U(`marker`,{id:`editor-arrow-ab-${t}`,key:`marker-ab-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`5`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[V(`path`,{d:`M0,0 L6,2.5 L0,5 Z`,fill:e.color},null,8,pl)],8,fl))),128)),($(!0),U(K,null,B(R(x),(e,t)=>($(),U(`marker`,{id:`editor-arrow-ba-${t}`,key:`marker-ba-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`1`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[V(`path`,{d:`M6,0 L0,2.5 L6,5 Z`,fill:e.color},null,8,hl)],8,ml))),128))]),($(!0),U(K,null,B(R(x),(e,t)=>($(),U(K,{key:`line-${t}`},[V(`line`,{x1:Xe(e).h1x,y1:Xe(e).h1y,x2:Xe(e).h2x,y2:Xe(e).h2y,stroke:e.color,"stroke-width":`2`,"stroke-dasharray":`6,4`,opacity:`0.6`},null,8,gl),V(`line`,{x1:Xe(e).ax,y1:Xe(e).ay,x2:Xe(e).bx,y2:Xe(e).by,stroke:e.color,"stroke-width":`3`,class:`cursor-pointer`,"stroke-opacity":R(T)===t?1:.7,"marker-end":e.direction===`b-to-a`?void 0:`url(#editor-arrow-ab-${t})`,"marker-start":e.direction===`a-to-b`?void 0:`url(#editor-arrow-ba-${t})`,onClick:e=>T.value=t},null,8,_l),V(`rect`,{x:Xe(e).labelAx-9,y:Xe(e).labelAy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,vl),V(`text`,{x:Xe(e).labelAx,y:Xe(e).labelAy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` A `,8,yl),V(`rect`,{x:Xe(e).labelBx-9,y:Xe(e).labelBy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,bl),V(`text`,{x:Xe(e).labelBx,y:Xe(e).labelBy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` B `,8,xl),V(`circle`,{cx:Xe(e).h1x,cy:Xe(e).h1y,r:`8`,fill:e.color,stroke:R(T)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:Lt(e=>Ke(e,t,0),[`stop`]),onTouchstart:Lt(e=>Ke(e,t,0),[`stop`])},null,40,Sl),V(`circle`,{cx:Xe(e).h2x,cy:Xe(e).h2y,r:`8`,fill:e.color,stroke:R(T)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:Lt(e=>Ke(e,t,1),[`stop`]),onTouchstart:Lt(e=>Ke(e,t,1),[`stop`])},null,40,Cl)],64))),128))],64)):q(``,!0)]))])]),t[9]||=V(`div`,{class:`shadowboard on`},null,-1)])],2)],512)]),V(`div`,wl,[Q(n,{ref_key:`cameraCardRef`,ref:p,"camera-info":R(d),"source-role":`low-resolution`,"streaming-mode":`webrtc`,toolbar:!1,control:!1,subcontrol:!1,"flat-card":``,class:`w-full h-full border-[1px] border-color-inner`,"card-background-color":`#000`},null,8,[`camera-info`])])]),V(`div`,{class:P([`w-full flex flex-col gap-6 zone-buttons items-center self-stretch`,{"!gap-3":R(ae).width.value>740}]),style:z({"max-width":R(ae).width.value>740?`300px`:void 0})},[Q(r,{modelValue:R(v),"onUpdate:modelValue":t[0]||=e=>Wt(v)?v.value=e:null,options:R(de),"option-label":`label`,"option-value":`value`,class:`w-full`,pt:{root:{class:`flex w-full`},pcToggleButton:{root:{class:`flex-1 !text-sm`}}}},null,8,[`modelValue`,`options`]),R(v)===`lines`?($(),U(K,{key:0},[V(`div`,Tl,[V(`label`,{for:`line[${R(T)}].name`,class:`cui-label`},F(e.$t(`components.form.label.name`)),9,El),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(x)[R(T)]?.name,invalid:!!R(le),loading:R(he),disabled:R(T)<0,type:`text`,onValueChange:t[1]||=e=>{R(x)[R(T)]&&(R(x)[R(T)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Q(N,{name:`fade`},{default:G(()=>[R(le)?($(),U(`span`,Dl,F(R(le)),1)):q(``,!0)]),_:1})]),V(`div`,Ol,[V(`label`,{for:`line[${R(T)}].labels`,class:`cui-label`},F(e.$t(`components.form.label.labels`)),9,kl),Q(a,null,{default:G(()=>[Q(o,{"model-value":R(x)[R(T)]?.labels,options:R(pe),loading:R(he),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,"option-group-label":`label`,"option-group-children":`items`,"show-clear":``,type:`text`,onValueChange:t[2]||=e=>{R(x)[R(T)]&&(R(x)[R(T)].labels=e)}},null,8,[`model-value`,`options`,`loading`])]),_:1})]),V(`div`,Al,[V(`label`,{for:`line[${R(T)}].color`,class:`cui-label`},F(e.$t(`components.form.label.color`)),9,jl),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(x)[R(T)]?.color,loading:R(he),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(c,null,{default:G(()=>[($(),H(s,{key:R(T),"model-value":R(x)[R(T)]?.color,format:`hex`,onValueChange:t[3]||=e=>e&&R(x)[R(T)]?R(x)[R(T)].color=`#${e}`:null},null,8,[`model-value`]))]),_:1})]),_:1})]),V(`div`,Ml,[Kt(($(),H(u,{loading:R(he),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:qe},{icon:G(()=>[Q(l,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[k,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Kt(($(),H(u,{loading:R(he),disabled:!R(x).length||R(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Je},{icon:G(()=>[Q(f,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]])]),V(`div`,Nl,[Kt(($(),H(u,{loading:R(he),disabled:R(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[80px] text-sm`,onClick:Ye},{default:G(()=>[X(F(R(x)[R(T)]?.direction===`both`?`A ↔ B`:R(x)[R(T)]?.direction===`a-to-b`?`A → B`:`B → A`),1)]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(x)[R(T)]?.direction===`both`?`A ↔ B`:R(x)[R(T)]?.direction===`a-to-b`?`A → B`:`B → A`},void 0,{top:!0}]])])],64)):q(``,!0),R(v)===`zones`?($(),U(K,{key:1},[V(`div`,Pl,[V(`label`,{for:`zone[${R(w)}].name`,class:`cui-label`},F(e.$t(`components.form.label.name`)),9,Fl),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(b)[R(w)]?.name,invalid:!!R(ce),loading:R(he),disabled:R(w)<0||R(b)[R(w)]?.isPrivacyMask,type:`text`,onValueChange:t[4]||=e=>{R(b)[R(w)]&&(R(b)[R(w)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Q(N,{name:`fade`},{default:G(()=>[R(ce)?($(),U(`span`,Il,F(R(ce)),1)):q(``,!0)]),_:1})]),V(`div`,Ll,[V(`label`,{for:`zone[${R(w)}].labels`,class:`cui-label`},F(e.$t(`components.form.label.labels`)),9,Rl),Q(a,null,{default:G(()=>[Q(o,{"model-value":R(b)[R(w)]?.labels,options:R(fe),disabled:R(b)[R(w)]?.isPrivacyMask,loading:R(he),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,"option-group-label":`label`,"option-group-children":`items`,"show-clear":``,type:`text`,onValueChange:t[5]||=e=>R(b)[R(w)].labels=e},null,8,[`model-value`,`options`,`disabled`,`loading`])]),_:1})]),V(`div`,zl,[V(`label`,{for:`zone[${R(w)}].color`,class:`cui-label`},F(e.$t(`components.form.label.color`)),9,Bl),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(b)[R(w)]?.color,disabled:R(b)[R(w)]?.isPrivacyMask,loading:R(he),readonly:``,type:`text`},null,8,[`model-value`,`disabled`,`loading`]),Q(c,null,{default:G(()=>[($(),H(s,{key:R(w),"model-value":R(b)[R(w)]?.color,format:`hex`,disabled:R(b)[R(w)]?.isPrivacyMask,onValueChange:t[6]||=e=>e?R(b)[R(w)].color=`#${e}`:null},null,8,[`model-value`,`disabled`]))]),_:1})]),_:1})]),V(`div`,Vl,[R(S)?Kt(($(),H(u,{key:1,disabled:R(ne)!==void 0&&R(b)[R(ne)]?.points?.length<3,loading:R(he),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:t[7]||=e=>ke(!1)},{icon:G(()=>[Q(m,{width:`20px`,height:`20px`})]),_:1},8,[`disabled`,`loading`])),[[k,{value:e.$t(`components.form.tooltip.finish`)},void 0,{top:!0}]]):Kt(($(),H(u,{key:0,loading:R(he),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Oe},{icon:G(()=>[Q(l,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[k,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Kt(($(),H(u,{loading:R(he),disabled:!R(b).length||R(w)<0||R(S),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ae},{icon:G(()=>[Q(h,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.edit`)},void 0,{top:!0}]]),Kt(($(),H(u,{loading:R(he),disabled:!R(b).length||R(w)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:je},{icon:G(()=>[Q(f,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]]),Kt(($(),H(u,{loading:R(he),disabled:!R(b).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Me},{icon:G(()=>[Q(y,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.undo`)},void 0,{top:!0}]]),Kt(($(),H(u,{loading:R(he),disabled:!R(b).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ne},{icon:G(()=>[Q(re,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.clear`)},void 0,{top:!0}]])]),V(`div`,Hl,[Kt(($(),H(u,{loading:R(he),disabled:!(R(b).length&&R(w)>=0&&R(b)[R(w)]),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Se},{icon:G(()=>[R(b)[R(w)]?.isPrivacyMask?($(),H(E,{key:0,width:`20px`,height:`20px`})):($(),H(ie,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(b)[R(w)]?.isPrivacyMask?e.$t(`components.form.tooltip.privacy_mask`):e.$t(`components.form.tooltip.public_mask`)},void 0,{top:!0}]]),Kt(($(),H(u,{loading:R(he),disabled:R(b)[R(w)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ce},{icon:G(()=>[R(b)[R(w)]?.filter===`include`?($(),H(D,{key:0,width:`20px`,height:`20px`})):($(),H(O,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(b)[R(w)]?.filter===`include`?e.$t(`components.form.tooltip.include`):e.$t(`components.form.tooltip.exclude`)},void 0,{top:!0}]]),Kt(($(),H(u,{loading:R(he),disabled:R(b)[R(w)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:we},{icon:G(()=>[R(b)[R(w)]?.type===`intersect`?($(),H(oe,{key:0,width:`20px`,height:`20px`})):($(),H(se,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(b)[R(w)]?.type===`intersect`?e.$t(`components.form.tooltip.intersect`):e.$t(`components.form.tooltip.contain`)},void 0,{top:!0}]])])],64)):q(``,!0)],6)],2)])])],512)}}}),[[`__scopeId`,`data-v-5f061a75`]]),Wl={class:`text-color font-normal`},Gl={class:`flex flex-col gap-6`},Kl={for:`name`,class:`cui-label`},ql={for:`room`,class:`cui-label`},Jl={class:`flex gap-2`},Yl={for:`type`,class:`cui-label`},Xl={class:`w-full flex flex-col gap-2`},Zl={class:`flex items-center gap-4`},Ql={class:`flex flex-col field-switch-gap`},$l={for:`disabled`,class:`cui-label-switch`},eu={class:`text-color font-normal`},tu={class:`flex flex-col gap-6`},nu={for:`info.manufacturer`,class:`cui-label`},ru={for:`info.model`,class:`cui-label`},iu={for:`info.hardware`,class:`cui-label`},au={for:`info.serialNumber`,class:`cui-label`},ou={for:`info.firmwareVersion`,class:`cui-label`},su={for:`info.supportUrl`,class:`cui-label`},cu={class:`text-color font-normal`},lu={class:`flex flex-col gap-6`},uu={for:`interfaceSettings.streamingMode`,class:`cui-label`},du={for:`interfaceSettings.streamingSource`,class:`cui-label`},fu={for:`interfaceSettings.aspectRatio`,class:`cui-label`},pu={class:`text-color font-normal`},mu={class:`flex flex-col gap-6`},hu={class:`w-full flex flex-col gap-2`},gu={class:`flex items-center gap-4`},_u={class:`flex flex-col field-switch-gap`},vu={for:`detectionSettings.snooze`,class:`cui-label-switch`},yu={for:`detectionSettings.motion.resolution`,class:`cui-label`},bu={for:`detectionSettings.motion.timeout`,class:`cui-label`},xu={for:`detectionSettings.object.confidence`,class:`cui-label`},Su={for:`detectionSettings.audio.minDecibels`,class:`cui-label`},Cu={for:`detectionSettings.audio.timeout`,class:`cui-label`},wu={for:`detectionSettings.sensor.timeout`,class:`cui-label`},Tu={for:`detectionSettings.sensor.triggers`,class:`cui-label`},Eu={class:`text-color font-normal`},Du={class:`flex flex-col gap-4`},Ou={key:0,class:`flex flex-col gap-2`},ku={class:`flex flex-col flex-1 min-w-0`},Au={class:`text-sm font-medium truncate`},ju={class:`text-xs text-muted`},Mu={key:1,class:`text-sm text-muted text-center min-h-[30px]`},Nu={class:`text-color font-normal`},Pu={class:`flex flex-col gap-4`},Fu={key:0,class:`flex flex-col gap-2`},Iu={class:`flex flex-col flex-1 min-w-0`},Lu={class:`text-sm font-medium truncate`},Ru={class:`text-xs text-muted`},zu={key:1,class:`text-sm text-muted text-center min-h-[30px]`},Bu={class:`text-color font-normal`},Vu={class:`w-full flex flex-col gap-4`},Hu={class:`flex items-center gap-4`},Uu={class:`flex flex-col field-switch-gap`},Wu={for:`ptzAutotrack.enabled`,class:`cui-label-switch`},Gu={class:`cui-label`},Ku={class:`cui-label`},qu={class:`cui-label`},Ju={class:`cui-label`},Yu={class:`cui-label`},Xu={class:`cui-label`},Zu={class:`flex items-center gap-4`},Qu={class:`flex flex-col field-switch-gap`},$u={for:`ptzAutotrack.returnToHome`,class:`cui-label-switch`},ed={class:`cui-label`},td={class:`text-color font-normal`},nd={class:`flex flex-col gap-6`},rd={class:`w-full flex flex-col gap-2`},id={class:`flex items-center gap-4`},ad={class:`flex flex-col field-switch-gap`},od={for:`snapshotSettings.autoRefresh`,class:`cui-label-switch`},sd={for:`snapshotSettings.ttl`,class:`cui-label`},cd={for:`snapshotSettings.interval`,class:`cui-label`},ld={class:`text-color font-normal`},ud={class:`flex flex-col gap-6`},dd={for:`frameWorkerSettings.fps`,class:`cui-label`},fd={class:`w-full flex flex-col gap-2`},pd={class:`flex items-center gap-4`},md={class:`flex flex-col field-switch-gap`},hd={for:`frameWorkerSettings.hqSnapshots`,class:`cui-label-switch`},gd=Z({__name:`Settings`,props:Ut({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Ut([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=new Set([Oe.Contact,Oe.Occupancy,Oe.Smoke,Oe.Leak,Oe.Doorbell,Oe.Switch,Oe.Light,Oe.Siren,Oe.Lock,Oe.Garage,Oe.SecuritySystem]),r=new Br,i=new Br,a=new Dc,o=e,s=t,c=Nt(e,`modelValue`),l=Xt(),u=Qt(),d=Gr(),{t:f}=h(),{camera:p,cameraDevice:m,loading:ee}=zt(o),{sensors:g}=Be(m),{data:_,isBusy:v}=i.getRoomsQuery(),{mutateAsync:y,isPending:b}=r.removeCameraQuery(),{mutateAsync:x,isPending:S}=r.patchZonesQuery(),{mutateAsync:te,isPending:ne}=r.patchLinesQuery(),{data:w}=a.getVirtualSensorsQuery(),{mutateAsync:re,isPending:T}=a.createVirtualSensorQuery(),{mutateAsync:E}=a.patchVirtualSensorQuery(),{mutateAsync:ie,isPending:D}=a.deleteVirtualSensorQuery(),ae=W([`camera`,`doorbell`]),O=W([`auto`,`mse`,`webrtc`,`webrtc/tcp`]),oe=W([`high-resolution`,`mid-resolution`,`low-resolution`]),se=W([`16:9`,`9:16`,`8:3`,`4:3`,`1:1`]),ce=W([`low`,`medium`,`high`]),le=W([]),k=J(()=>g.value.some(e=>e.type===Oe.PTZ)),A=J(()=>(w.value??[]).filter(e=>e.cameraId===c.value._id)),ue=J(()=>S.value||ne.value),de=J(()=>[...(p.value.detectionZones??[]).map((e,t)=>({kind:`zone`,index:t,name:e.name,color:e.color,typeLabel:e.isPrivacyMask?f(`components.camera_options.zone_entry_privacy_mask`):f(`components.camera_options.zone_entry_zone`)})),...(p.value.detectionLines??[]).map((e,t)=>({kind:`line`,index:t,name:e.name,color:e.color,typeLabel:f(`components.camera_options.zone_entry_line`)}))]),fe=J(()=>[{label:f(`components.automation_nodes.label_person`),value:`person`},{label:f(`components.automation_nodes.label_vehicle`),value:`vehicle`},{label:f(`components.automation_nodes.label_animal`),value:`animal`},{label:f(`components.automation_nodes.label_package`),value:`package`}]),pe=J(()=>g.value.filter(e=>n.has(e.type)).map(e=>({label:e.displayName.value,value:ve(e.type,e.name,e.pluginId)}))),he=J(()=>new Set(pe.value.map(e=>e.value))),ge=J(()=>(c.value.detectionSettings.sensor?.triggers??[]).map(e=>ve(e.sensorType,e.sensorName,e.pluginId)).filter(e=>he.value.has(e))),_e=J(()=>{let e=_.value??[`Default`],t=new Set(e.map(e=>e.toLowerCase()));return[...e,...le.value.filter(e=>!t.has(e.toLowerCase()))].map(e=>({label:e===`Default`?f(`components.form.label.room_default`):e,value:e}))}),j=J(()=>ee.value||b.value);function ve(e,t,n){return`${e}::${t}::${n}`}function ye(e){let t=(c.value.detectionSettings.sensor?.triggers??[]).filter(e=>!he.value.has(ve(e.sensorType,e.sensorName,e.pluginId))),n=e.map(e=>{let[t,n,r]=e.split(`::`);return{sensorType:t,sensorName:n,pluginId:r}});c.value.detectionSettings.sensor||(c.value.detectionSettings.sensor={timeout:30,triggers:[]}),c.value.detectionSettings.sensor.triggers=[...t,...n]}function be(){d.openComponentDialog(ci,{data:{title:f(`components.dialog.title.create_room`),confirmText:f(`components.form.button.add`),contentProps:{}},onConfirm:e=>{if(!e)return;let t=_e.value.find(t=>t.value.toLowerCase()===e.toLowerCase()),n=t?.value??e;t||le.value.push(n),c.value.room=n}})}function xe(){d.openComponentDialog(Ac,{data:{title:f(`components.camera_options.virtual_sensor_create`),confirmText:f(`components.form.button.save`),loading:T,contentProps:{cameraId:c.value._id}},onConfirm:async e=>{e&&await re({data:e})}})}function Se(e){d.openComponentDialog(ms,{data:{title:f(`components.camera_options.sensor_display_name`),confirmText:f(`components.form.button.save`),contentProps:{currentDisplayName:e.displayName||e.name}},onConfirm:async t=>{t&&t!==e.displayName&&await E({id:e._id,data:{displayName:t}})}})}function Ce(e){d.openTextDialog({data:{title:f(`components.camera_options.virtual_sensor_delete`),contentText:f(`components.camera_options.virtual_sensor_delete_confirm`),confirmText:f(`components.form.button.remove`),loading:D},onConfirm:async()=>{await ie({id:e._id})}})}function we(){d.openTextDialog({data:{title:f(`components.dialog.title.confirm`),confirmText:f(`components.form.button.remove`),contentText:f(`components.dialog.message.confirm_remove`),confirmButtonProps:{severity:`danger`}},onConfirm:async()=>{try{await y({cameraname:p.value.name}),l.path.includes(p.value.name)&&u.push({path:`/home`}),s(`close`)}catch{}}})}function Te(e=[]){d.openComponentDialog(Ul,{data:{title:f(`components.zone_editor.edit_zones`),loading:j,contentProps:{cameraName:p.value.name,zones:e,lines:p.value.detectionLines??[]}}})}function Ee(e){d.openComponentDialog(Ul,{data:{title:f(`components.zone_editor.edit_zones`),loading:j,contentProps:{cameraName:p.value.name,zones:p.value.detectionZones??[],lines:p.value.detectionLines??[],initialTab:e.kind===`line`?`lines`:`zones`,initialSelection:e.index}}})}function De(e){d.openTextDialog({data:{title:f(`components.camera_options.zone_entry_delete`),contentText:f(`components.camera_options.zone_entry_delete_confirm`),confirmText:f(`components.form.button.remove`),loading:ue},onConfirm:async()=>{if(e.kind===`zone`){let t=(p.value.detectionZones??[]).filter((t,n)=>n!==e.index);await x({cameraname:p.value.name,zoneData:t})}else{let t=(p.value.detectionLines??[]).filter((t,n)=>n!==e.index);await te({cameraname:p.value.name,lineData:t})}}})}return(e,t)=>{let n=gn,r=on,i=C,a=mn,o=pn,s=si,l=me,u=cn,d=an,f=jn,m=wn,h=Tn,ee=Zr,g=oi,_=ai,y=rn,b=vn;return $(),H(y,{multiple:``,class:`p-4`},{default:G(()=>[Q(f,{value:`general`},{default:G(()=>[Q(n,{class:`px-0 pt-0`},{default:G(()=>[V(`span`,Wl,F(e.$t(`components.camera_options.general`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Gl,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.general_hint`)),1)]),_:1}),Q(R(I),{modelValue:c.value.name,"onUpdate:modelValue":t[0]||=e=>c.value.name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,Kl,F(e.$t(`components.form.label.name`)),1),Q(a,null,{default:G(()=>[Q(i,vt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{"model-value":c.value.room,name:`room`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,ql,F(e.$t(`components.form.label.room`)),1),V(`div`,Jl,[Q(o,{"model-value":c.value.room,options:R(_e),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:R(v),class:`w-full`,"onUpdate:modelValue":t[1]||=e=>c.value.room=e},null,8,[`model-value`,`options`,`invalid`,`loading`]),Kt(($(),H(l,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:be},{icon:G(()=>[Q(s,{class:`w-4 h-4`})]),_:1})),[[b,e.$t(`components.form.button.create_room`),void 0,{top:!0}]])]),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.room`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.type,name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Yl,F(e.$t(`components.form.label.type`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":c.value.type,options:R(ae),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[2]||=e=>c.value.type=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),V(`div`,Xl,[Q(R(I),{"model-value":c.value.disabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`disabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:i})=>[V(`div`,Zl,[V(`div`,Ql,[V(`label`,$l,F(e.$t(`components.form.label.disabled`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.disable_camera`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`disabled`,class:`cui-input-switch-error`})]),_:1})]),Q(u,vt({"model-value":c.value.disabled},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[3]||=e=>c.value.disabled=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(l,{fluid:``,severity:`danger`,loading:R(j),class:`cui-button-medium`,label:e.$t(`components.form.button.remove`),onClick:t[4]||=e=>we()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Q(f,{value:`branding`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,eu,F(e.$t(`components.camera_options.branding`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,tu,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.branding_hint`)),1)]),_:1}),Q(R(I),{modelValue:c.value.info.manufacturer,"onUpdate:modelValue":t[5]||=e=>c.value.info.manufacturer=e,modelModifiers:{trim:!0},name:`info.manufacturer`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,nu,F(e.$t(`components.form.label.manufacturer`)),1),Q(a,null,{default:G(()=>[Q(i,vt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.manufacturer`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{modelValue:c.value.info.model,"onUpdate:modelValue":t[6]||=e=>c.value.info.model=e,modelModifiers:{trim:!0},name:`info.model`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,ru,F(e.$t(`components.form.label.model`)),1),Q(a,null,{default:G(()=>[Q(i,vt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.model`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{modelValue:c.value.info.hardware,"onUpdate:modelValue":t[7]||=e=>c.value.info.hardware=e,modelModifiers:{trim:!0},name:`info.hardware`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,iu,F(e.$t(`components.form.label.hardware_version`)),1),Q(a,null,{default:G(()=>[Q(i,vt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.hardware`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{modelValue:c.value.info.serialNumber,"onUpdate:modelValue":t[8]||=e=>c.value.info.serialNumber=e,modelModifiers:{trim:!0},name:`info.serialNumber`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,au,F(e.$t(`components.form.label.serial_number`)),1),Q(a,null,{default:G(()=>[Q(i,vt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.serialNumber`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{modelValue:c.value.info.firmwareVersion,"onUpdate:modelValue":t[9]||=e=>c.value.info.firmwareVersion=e,modelModifiers:{trim:!0},name:`info.firmwareVersion`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,ou,F(e.$t(`components.form.label.firmware_version`)),1),Q(a,null,{default:G(()=>[Q(i,vt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.firmwareVersion`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{modelValue:c.value.info.supportUrl,"onUpdate:modelValue":t[10]||=e=>c.value.info.supportUrl=e,modelModifiers:{trim:!0},name:`info.supportUrl`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,su,F(e.$t(`components.form.label.support_url`)),1),Q(a,null,{default:G(()=>[Q(i,vt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.supportUrl`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])])]),_:1})]),_:1}),Q(f,{value:`interface`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,cu,F(e.$t(`components.camera_options.interface`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,lu,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.interface_hint`)),1)]),_:1}),Q(R(I),{"model-value":c.value.interfaceSettings.streamingMode,name:`interfaceSettings.streamingMode`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,uu,F(e.$t(`components.form.label.streaming_mode`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":c.value.interfaceSettings.streamingMode,options:R(O),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[11]||=e=>c.value.interfaceSettings.streamingMode=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`interfaceSettings.streamingMode`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.streaming_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.interfaceSettings.streamingSource,name:`interfaceSettings.streamingSource`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,du,F(e.$t(`components.form.label.streaming_source`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":c.value.interfaceSettings.streamingSource,options:R(oe),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[12]||=e=>c.value.interfaceSettings.streamingSource=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`interfaceSettings.streamingSource`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.streaming_source`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.interfaceSettings.aspectRatio,name:`interfaceSettings.aspectRatio`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,fu,F(e.$t(`components.form.label.aspect_ratio`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":c.value.interfaceSettings.aspectRatio,options:R(se),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[13]||=e=>c.value.interfaceSettings.aspectRatio=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`interfaceSettings.aspectRatio`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.aspect_ratio`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(f,{value:`detection`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,pu,F(e.$t(`components.camera_options.detection`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,mu,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.detection_hint`)),1)]),_:1}),V(`div`,hu,[Q(R(I),{"model-value":c.value.detectionSettings?.snooze,value:!0,"unchecked-value":!1,type:`checkbox`,name:`detectionSettings.snooze`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:i})=>[V(`div`,gu,[V(`div`,_u,[V(`label`,vu,F(e.$t(`components.form.label.snooze`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.snooze_camera`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.snooze`,class:`cui-input-switch-error`})]),_:1})]),Q(u,vt({"model-value":c.value.detectionSettings?.snooze},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[14]||=e=>{c.value.detectionSettings&&(c.value.detectionSettings.snooze=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(R(I),{"model-value":c.value.detectionSettings.motion.resolution,name:`detectionSettings.motion.resolution`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,yu,F(e.$t(`components.form.label.motion_resolution`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":c.value.detectionSettings.motion.resolution,options:R(ce),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[15]||=e=>c.value.detectionSettings.motion.resolution=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.motion.resolution`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.motion_resolution`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.detectionSettings.motion.timeout,name:`detectionSettings.motion.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,bu,F(e.$t(`components.form.label.motion_timeout`)),1),Q(a,null,{default:G(()=>[Q(m,{"model-value":c.value.detectionSettings.motion.timeout,invalid:n.length>0,loading:R(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[16]||=e=>c.value.detectionSettings.motion.timeout=e??void 0,onInput:t[17]||=e=>c.value.detectionSettings.motion.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.motion.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.motion_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.detectionSettings.object.confidence,name:`detectionSettings.object.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,xu,F(e.$t(`components.form.label.confidence`)),1),Q(a,null,{default:G(()=>[Q(m,{"model-value":c.value.detectionSettings.object.confidence,invalid:n.length>0,loading:R(j),"show-buttons":``,step:.01,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[18]||=e=>c.value.detectionSettings.object.confidence=e??void 0,onInput:t[19]||=e=>c.value.detectionSettings.object.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.object.confidence`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.detectionSettings.audio.minDecibels,name:`detectionSettings.audio.minDecibels`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Su,F(e.$t(`components.form.label.audio_min_decibels`)),1),Q(a,null,{default:G(()=>[Q(m,{"model-value":c.value.detectionSettings.audio.minDecibels,invalid:n.length>0,loading:R(j),"show-buttons":``,step:1,min:-100,max:0,mode:`decimal`,"use-grouping":!1,onValueChange:t[20]||=e=>c.value.detectionSettings.audio.minDecibels=e??void 0,onInput:t[21]||=e=>c.value.detectionSettings.audio.minDecibels=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.audio.minDecibels`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_min_decibels`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.detectionSettings.audio.timeout,name:`detectionSettings.audio.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Cu,F(e.$t(`components.form.label.audio_timeout`)),1),Q(a,null,{default:G(()=>[Q(m,{"model-value":c.value.detectionSettings.audio.timeout,invalid:n.length>0,loading:R(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[22]||=e=>c.value.detectionSettings.audio.timeout=e??void 0,onInput:t[23]||=e=>c.value.detectionSettings.audio.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.audio.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.detectionSettings.sensor?.timeout,name:`detectionSettings.sensor.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,wu,F(e.$t(`components.form.label.sensor_timeout`)),1),Q(a,null,{default:G(()=>[Q(m,{"model-value":c.value.detectionSettings.sensor?.timeout,invalid:n.length>0,loading:R(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[24]||=e=>{c.value.detectionSettings.sensor||(c.value.detectionSettings.sensor={timeout:30,triggers:[]}),c.value.detectionSettings.sensor.timeout=e??30},onInput:t[25]||=e=>{c.value.detectionSettings.sensor||(c.value.detectionSettings.sensor={timeout:30,triggers:[]}),c.value.detectionSettings.sensor.timeout=e.value??30}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.sensor.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.sensor_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.detectionSettings.sensor?.triggers??[],name:`detectionSettings.sensor.triggers`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:t})=>[V(`label`,Tu,F(e.$t(`components.form.label.sensor_triggers`)),1),Q(h,{"model-value":R(ge),invalid:t.length>0,options:R(pe),"option-label":`label`,"option-value":`value`,placeholder:e.$t(`components.form.hint.sensor_triggers_placeholder`),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":ye},null,8,[`model-value`,`invalid`,`options`,`placeholder`]),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.sensor.triggers`,class:`cui-input-error`})]),_:1}),t.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.sensor_triggers`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(f,{value:`sensors`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Eu,F(e.$t(`components.camera_options.virtual_sensors`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Du,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.virtual_sensors_hint`)),1)]),_:1}),R(A).length?($(),U(`div`,Ou,[($(!0),U(K,null,B(R(A),t=>($(),U(`div`,{key:t._id,class:`flex items-center gap-2 p-2 rounded-md border-color`},[V(`div`,ku,[V(`span`,Au,F(t.displayName||t.name),1),V(`span`,ju,F(e.$t(`components.camera_options.sensor_type_${t.type}`)),1)]),Kt(($(),H(l,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>Se(t)},{icon:G(()=>[Q(ee,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[b,e.$t(`components.camera_options.sensor_display_name`),void 0,{top:!0}]]),Kt(($(),H(l,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>Ce(t)},{icon:G(()=>[Q(g,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[b,e.$t(`components.camera_options.virtual_sensor_delete`),void 0,{top:!0}]])]))),128))])):($(),U(`span`,Mu,F(e.$t(`components.camera_options.virtual_sensors_empty`)),1)),Q(l,{fluid:``,class:`cui-button-medium`,label:e.$t(`components.camera_options.virtual_sensor_create`),onClick:xe},null,8,[`label`])])]),_:1})]),_:1}),Q(f,{value:`zones`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Nu,F(e.$t(`components.camera_options.zones`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Pu,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.zones_hint`)),1)]),_:1}),R(de).length?($(),U(`div`,Fu,[($(!0),U(K,null,B(R(de),t=>($(),U(`div`,{key:`${t.kind}-${t.index}`,class:`flex items-center gap-2 p-2 rounded-md border-color`},[V(`span`,{class:`w-2.5 h-2.5 rounded-full shrink-0`,style:z({background:t.color})},null,4),V(`div`,Iu,[V(`span`,Lu,F(t.name),1),V(`span`,Ru,F(t.typeLabel),1)]),Kt(($(),H(l,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>Ee(t)},{icon:G(()=>[Q(ee,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[b,e.$t(`components.zone_editor.edit_zones`),void 0,{top:!0}]]),Kt(($(),H(l,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>De(t)},{icon:G(()=>[Q(g,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[b,e.$t(`components.camera_options.zone_entry_delete`),void 0,{top:!0}]])]))),128))])):($(),U(`span`,zu,F(e.$t(`components.camera_options.zones_empty`)),1)),Q(l,{fluid:``,class:`cui-button-medium`,loading:R(j),label:e.$t(`components.form.button.edit_zones`),onClick:t[26]||=e=>Te(R(p).detectionZones)},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Q(f,{value:`ptzAutotrack`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Bu,F(e.$t(`components.camera_options.ptz_autotrack`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Vu,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.ptz_autotrack_hint`)),1)]),_:1}),R(k)?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:G(()=>[Q(_,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),X(` `+F(e.$t(`components.form.hint.ptz_autotrack_requires`)),1)]),_:1})),Q(R(I),{"model-value":c.value.ptzAutotrack?.enabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.enabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:i})=>[V(`div`,Hu,[V(`div`,Uu,[V(`label`,Wu,F(e.$t(`components.form.label.ptz_autotrack_enabled`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`ptzAutotrack.enabled`,class:`cui-input-switch-error`})]),_:1})]),Q(u,vt({"model-value":c.value.ptzAutotrack?.enabled},n,{invalid:i.length>0,loading:R(j),disabled:!R(k),class:`ml-auto shrink-0`,onValueChange:t[27]||=e=>{c.value.ptzAutotrack&&(c.value.ptzAutotrack.enabled=e)}}),null,16,[`model-value`,`invalid`,`loading`,`disabled`])])]),_:1},8,[`model-value`]),c.value.ptzAutotrack?.enabled&&R(k)?($(),U(K,{key:1},[Q(R(I),{"model-value":c.value.ptzAutotrack?.targetLabels,name:`ptzAutotrack.targetLabels`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Gu,F(e.$t(`components.form.label.ptz_autotrack_target_labels`)),1),Q(h,{"model-value":c.value.ptzAutotrack?.targetLabels,options:R(fe),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[28]||=e=>{c.value.ptzAutotrack&&(c.value.ptzAutotrack.targetLabels=e)}},null,8,[`model-value`,`options`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_target_labels`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.ptzAutotrack?.minConfidence,name:`ptzAutotrack.minConfidence`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Ku,F(e.$t(`components.form.label.ptz_autotrack_min_confidence`)),1),Q(m,{"model-value":c.value.ptzAutotrack?.minConfidence,min:.3,max:1,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[29]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.minConfidence=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_min_confidence`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.ptzAutotrack?.triggerDeadZone,name:`ptzAutotrack.triggerDeadZone`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,qu,F(e.$t(`components.form.label.ptz_autotrack_trigger_dead_zone`)),1),Q(m,{"model-value":c.value.ptzAutotrack?.triggerDeadZone,min:0,max:.3,step:.01,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[30]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.triggerDeadZone=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_trigger_dead_zone`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.ptzAutotrack?.trackingSpeed,name:`ptzAutotrack.trackingSpeed`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Ju,F(e.$t(`components.form.label.ptz_autotrack_tracking_speed`)),1),Q(m,{"model-value":c.value.ptzAutotrack?.trackingSpeed,min:1,max:5,step:.5,"min-fraction-digits":1,"max-fraction-digits":1,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[31]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.trackingSpeed=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_tracking_speed`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.ptzAutotrack?.leadFrames,name:`ptzAutotrack.leadFrames`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Yu,F(e.$t(`components.form.label.ptz_autotrack_lead_frames`)),1),Q(m,{"model-value":c.value.ptzAutotrack?.leadFrames,min:0,max:6,step:1,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[32]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.leadFrames=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_lead_frames`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.ptzAutotrack?.panRate,name:`ptzAutotrack.panRate`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Xu,F(e.$t(`components.form.label.ptz_autotrack_pan_rate`)),1),Q(m,{"model-value":c.value.ptzAutotrack?.panRate,min:.1,max:3,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[33]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.panRate=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_pan_rate`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.ptzAutotrack?.returnToHome,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.returnToHome`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:i})=>[V(`div`,Zu,[V(`div`,Qu,[V(`label`,$u,F(e.$t(`components.form.label.ptz_autotrack_return_home`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_return_home`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`ptzAutotrack.returnToHome`,class:`cui-input-switch-error`})]),_:1})]),Q(u,vt({"model-value":c.value.ptzAutotrack?.returnToHome},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[34]||=e=>{c.value.ptzAutotrack&&(c.value.ptzAutotrack.returnToHome=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),c.value.ptzAutotrack?.returnToHome?($(),H(R(I),{key:0,"model-value":c.value.ptzAutotrack?.homeWaitMs,name:`ptzAutotrack.homeWaitMs`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,ed,F(e.$t(`components.form.label.ptz_autotrack_home_wait`)),1),Q(m,{"model-value":(c.value.ptzAutotrack?.homeWaitMs??0)/1e3,min:1,max:60,step:1,suffix:` s`,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[35]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.homeWaitMs=e*1e3)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_home_wait`)),1)]),_:1})]),_:1},8,[`model-value`])):q(``,!0)],64)):q(``,!0)])]),_:1})]),_:1}),Q(f,{value:`snapshot`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,td,F(e.$t(`components.camera_options.snapshot`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,nd,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.snapshot_hint`)),1)]),_:1}),V(`div`,rd,[Q(R(I),{"model-value":c.value.snapshotSettings.autoRefresh,value:!0,"unchecked-value":!1,type:`checkbox`,name:`snapshotSettings.autoRefresh`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:i})=>[V(`div`,id,[V(`div`,ad,[V(`label`,od,F(e.$t(`components.form.label.auto_refresh`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.auto_refresh`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`snapshotSettings.autoRefresh`,class:`cui-input-switch-error`})]),_:1})]),Q(u,vt({"model-value":c.value.snapshotSettings.autoRefresh},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[36]||=e=>c.value.snapshotSettings.autoRefresh=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(R(I),{"model-value":c.value.snapshotSettings.ttl,name:`snapshotSettings.ttl`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,sd,F(e.$t(`components.form.label.cache_time`)),1),Q(a,null,{default:G(()=>[Q(m,{"model-value":c.value.snapshotSettings.ttl,invalid:n.length>0,loading:R(j),min:10,"show-buttons":``,"use-grouping":!1,onValueChange:t[37]||=e=>c.value.snapshotSettings.ttl=e??10,onInput:t[38]||=e=>c.value.snapshotSettings.ttl=e.value??10},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`snapshotSettings.ttl`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.cache_time`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":c.value.snapshotSettings.interval,name:`snapshotSettings.interval`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,cd,F(e.$t(`components.form.label.refresh_interval`)),1),Q(a,null,{default:G(()=>[Q(m,{"model-value":c.value.snapshotSettings.interval,invalid:n.length>0,loading:R(j),min:10,max:60,"show-buttons":``,"use-grouping":!1,onValueChange:t[39]||=e=>c.value.snapshotSettings.interval=e??30,onInput:t[40]||=e=>c.value.snapshotSettings.interval=e.value??30},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`snapshotSettings.interval`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.refresh_interval`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(f,{value:`frameworker`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,ld,F(e.$t(`components.camera_options.frame_worker`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,ud,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.frame_worker_hint`)),1)]),_:1}),Q(R(I),{"model-value":c.value.frameWorkerSettings.fps,name:`frameWorkerSettings.fps`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,dd,F(e.$t(`components.form.label.fps`)),1),Q(a,null,{default:G(()=>[Q(m,{"model-value":c.value.frameWorkerSettings.fps,invalid:n.length>0,loading:R(j),min:0,"show-buttons":``,"use-grouping":!1,onValueChange:t[41]||=e=>c.value.frameWorkerSettings.fps=e??void 0,onInput:t[42]||=e=>c.value.frameWorkerSettings.fps=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`frameWorkerSettings.fps`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.frameworker_fps`)),1)]),_:1}))]),_:1},8,[`model-value`]),V(`div`,fd,[Q(R(I),{"model-value":c.value.frameWorkerSettings.hqSnapshots,value:!0,"unchecked-value":!1,type:`checkbox`,name:`frameWorkerSettings.hqSnapshots`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:i})=>[V(`div`,pd,[V(`div`,md,[V(`label`,hd,F(e.$t(`components.form.label.hq_snapshots`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.hq_snapshots`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`frameWorkerSettings.hqSnapshots`,class:`cui-input-switch-error`})]),_:1})]),Q(u,vt({"model-value":c.value.frameWorkerSettings.hqSnapshots},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[43]||=e=>c.value.frameWorkerSettings.hqSnapshots=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])])])]),_:1})]),_:1})]),_:1})}}}),_d={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function vd(e,t){return $(),U(`svg`,_d,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M6.97.47a.75.75 0 0 1 1.06 0l1.75 1.75a.75.75 0 0 1 0 1.06L8.03 5.03a.75.75 0 0 1-1.06-1.06l.43-.43a4.5 4.5 0 0 0-2.28 7.918a.75.75 0 0 1-.961 1.152A6 6 0 0 1 7.463 2.024L6.97 1.53a.75.75 0 0 1 0-1.06m3.815 3.016a.75.75 0 0 1 1.056-.096a6 6 0 0 1-3.304 10.586l.493.494a.75.75 0 1 1-1.06 1.06l-1.75-1.75a.75.75 0 0 1 0-1.06l1.75-1.75a.75.75 0 0 1 1.06 1.06l-.43.43a4.5 4.5 0 0 0 2.28-7.918a.75.75 0 0 1-.095-1.056`},null,-1)]])}var yd=Y({name:`fluent-arrow-sync-16-filled`,render:vd}),bd={class:`flex items-center justify-between`},xd={class:`cui-label`},Sd={class:`flex flex-col field-gap`},Cd={class:`cui-label`},wd={class:`cui-label`},Td={class:`cui-label`},Ed={key:0,class:`flex flex-col field-gap`},Dd={class:`cui-label`},Od={key:1,class:`flex flex-col field-gap`},kd={class:`cui-label`},Ad=Z({__name:`CameraSource`,props:{cameraId:{},cameraName:{},source:{},loading:{type:Boolean}},setup(e){let t=new Br,n=e,{t:r}=h(),{getSourceStatus:i,connect:a}=mi(),o=Ot(),s=Ge(),c=[`probe`,`preload`],{cameraId:l,cameraName:u,source:d,loading:f}=zt(n),p=W(!1),{data:m,isBusy:ee}=t.probeCameraSourceQuery(u.value,d.value.name,{video:!0,audio:!0,microphone:!0});a();let g=J(()=>i(l.value,d.value.name)),_=J(()=>{switch(g.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;default:return`secondary`}}),v=J(()=>{switch(g.value){case`connected`:return r(`components.camera_table.online`);case`connecting`:return r(`components.camera_table.connecting`);case`error`:return r(`components.camera_table.error`);default:return r(`components.camera_table.idle`)}}),y=J(()=>!!(f.value||ee.value)),b=J(()=>m.value?.probe.consumers.filter(e=>!c.includes(e.format_name)).length||0),x=J(()=>te(`video`)),S=J(()=>te(`audio`));function te(e){let t=(m.value?.probe.producers??[]).flatMap(e=>e.receivers??[]).filter(t=>t.codec.codec_type===e).map(e=>e.codec.codec_name);return[...new Set(t)]}async function ne(){if(!p.value){p.value=!0;try{let e=await zr({cameraname:u.value,sourcename:d.value.name,probeConfig:{video:!0,audio:!0,microphone:!0},force:!0});o.setQueryData([`cameras`,u.value,`probe`,d.value.name],e)}catch{s.add({severity:`error`,detail:r(`components.toast.probe_failed`),life:3e3})}finally{p.value=!1}}}return(e,t)=>{let n=bn,r=C,i=me,a=fn,o=mn,s=on,c=Vr,l=vn;return $(),U(K,null,[V(`div`,bd,[V(`label`,xd,F(e.$t(`components.form.label.stream_status`)),1),Q(n,{severity:R(_),value:R(v)},null,8,[`severity`,`value`])]),V(`div`,Sd,[V(`label`,Cd,F(e.$t(`components.form.label.connections`)),1),Q(o,null,{default:G(()=>[Q(r,{value:R(b),loading:R(y),readonly:``,type:`text`},null,8,[`value`,`loading`]),Q(a,null,{default:G(()=>[Kt(($(),H(i,{severity:`secondary`,text:``,loading:R(p),disabled:R(y),onClick:ne},{icon:G(()=>[Q(R(yd),{class:`w-4 h-4`})]),_:1},8,[`loading`,`disabled`])),[[l,e.$t(`components.form.button.reload`),void 0,{left:!0}]])]),_:1})]),_:1}),Q(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.connections`)),1)]),_:1})]),($(!0),U(K,null,B(R(x),(t,n)=>($(),U(`div`,{key:n,class:`flex flex-col field-gap`},[V(`label`,wd,F(e.$t(`components.form.label.video_codec`)),1),Q(o,null,{default:G(()=>[Q(r,{"model-value":t,loading:R(y),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===R(x).length-1?($(),H(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.video_codec`)),1)]),_:1})):q(``,!0)]))),128)),($(!0),U(K,null,B(R(S),(t,n)=>($(),U(`div`,{key:n,class:`flex flex-col field-gap`},[V(`label`,Td,F(e.$t(`components.form.label.audio_codec`)),1),Q(o,null,{default:G(()=>[Q(r,{"model-value":t,loading:R(y),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===R(S).length-1?($(),H(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_codec`)),1)]),_:1})):q(``,!0)]))),128)),R(d).role===`snapshot`?q(``,!0):($(),U(`div`,Ed,[V(`label`,Dd,F(e.$t(`components.form.label.rtsp_url`)),1),Q(o,null,{default:G(()=>[Q(r,{"model-value":R(m)?.rtspUrl,loading:R(y),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(a,null,{default:G(()=>[Q(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:R(Hr),"button-props":{severity:`secondary`,disabled:!R(m)?.rtspUrl,loading:R(y),text:!0},onAction:t[0]||=e=>R(st)(R(m).rtspUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Q(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.rtsp_url`)),1)]),_:1})])),R(d).role===`snapshot`?q(``,!0):($(),U(`div`,Od,[V(`label`,kd,F(e.$t(`components.form.label.onvif_url`)),1),Q(o,null,{default:G(()=>[Q(r,{"model-value":R(m)?.onvifUrl,loading:R(y),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(a,null,{default:G(()=>[Q(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:R(Hr),"button-props":{severity:`secondary`,disabled:!R(m)?.onvifUrl,loading:R(y),text:!0},onAction:t[1]||=e=>R(st)(R(m).onvifUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Q(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.onvif_url`)),1)]),_:1})]))],64)}}}),jd={class:`flex gap-2 items-center w-full`},Md={class:`text-color font-normal`},Nd={class:`flex flex-col gap-6`},Pd=[`for`],Fd=[`for`],Id={class:`w-full flex flex-col gap-2`},Ld={class:`flex items-center gap-4`},Rd={class:`flex flex-col field-switch-gap`},zd=[`for`],Bd={class:`flex items-center gap-4`},Vd={class:`flex flex-col field-switch-gap`},Hd=[`for`],Ud={class:`flex items-center gap-4`},Wd={class:`flex flex-col field-switch-gap`},Gd=[`for`],Kd={class:`flex items-center gap-4`},qd={class:`flex flex-col field-switch-gap`},Jd=[`for`],Yd=[`for`],Xd={class:`flex flex-col gap-6`},Zd={class:`flex flex-col field-gap`},Qd=[`for`],$d={class:`w-full flex items-center justify-center my-3`},ef=Z({__name:`Sources`,props:Ut({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Ut([`close`],[`update:modelValue`]),setup(e){let t=e,n=Nt(e,`modelValue`),{t:r}=h(),{camera:i,loading:a}=zt(t),o=W([`high-resolution`,`mid-resolution`,`low-resolution`,`snapshot`]);function s(e){return e.name.replace(/ /g,`_`).toLowerCase()}function c(e){let t=[{label:r(`components.form.label.none`),value:void 0}],i=n.value.sources[e],a=n.value;for(let e of a.sources)e.role!==`snapshot`&&e._id!==i._id&&(!e.name||!e._id||t.push({label:e.name,value:e._id}));return t}function l(e){return n.value.sources[e].childSourceId}function u(e,t){t==null?n.value.sources[e].childSourceId=null:n.value.sources[e].childSourceId=t}function d(e){n.value.sources[e].urls.push(``)}function f(e){n.value.sources.splice(e,1)}function p(e,t){n.value.sources[e].urls.splice(t,1)}function m(){n.value&&n.value.sources.push({_id:``,name:``,role:null,urls:[],useForSnapshot:!1,hotMode:!0,preload:!0,muted:!1})}return(e,t)=>{let r=xr,h=me,ee=gn,g=C,_=mn,v=on,y=Ad,b=pn,x=cn,S=fn,te=an,ne=jn,w=rn,re=ti;return $(),U(K,null,[Q(w,{multiple:``,class:`p-4`},{default:G(()=>[($(!0),U(K,null,B(n.value.sources,(t,m)=>($(),H(ne,{key:m,value:m},{default:G(()=>[Q(ee,{class:P({"px-0 pt-0":m===0,"px-0":m!==0})},{default:G(()=>[V(`div`,jd,[V(`span`,Md,F(e.$t(`components.camera_options.source`)+`: `+s(t)),1),Q(h,{text:``,rounded:``,loading:R(a),disabled:n.value.sources.length<2,severity:`danger`,class:`cui-icon-md ml-auto mr-2`,onClick:e=>f(m)},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:2},1032,[`class`]),Q(te,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Nd,[Q(R(I),{modelValue:t.name,"onUpdate:modelValue":e=>t.name=e,modelModifiers:{trim:!0},name:`sources[${m}].name`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:n,errors:r})=>[V(`label`,{for:`sources[${m}].name`,class:`cui-label`},F(e.$t(`components.form.label.source_name`)),9,Pd),Q(_,null,{default:G(()=>[Q(g,vt({ref_for:!0},n,{invalid:r.length>0,loading:R(a),readonly:R(i).sources.some(e=>e.name===t.name),type:`text`}),null,16,[`invalid`,`loading`,`readonly`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${m}].name`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):($(),H(v,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_name`)),1)]),_:1}))]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]),t._id?($(),H(y,{key:0,"camera-id":R(i)._id,"camera-name":R(i).name,source:t,loading:R(a)},null,8,[`camera-id`,`camera-name`,`source`,`loading`])):q(``,!0),Q(R(I),{"model-value":t.role,name:`sources[${m}].role`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:r})=>[V(`label`,{for:`sources[${m}].role`,class:`cui-label`},F(e.$t(`components.form.label.source_role`)),9,Fd),Q(_,null,{default:G(()=>[Q(b,{"model-value":t.role,options:R(o).filter(e=>!n.value.sources.some(n=>n.role===e&&n._id!==t._id)),invalid:r.length>0,loading:R(a),onValueChange:e=>t.role=e},null,8,[`model-value`,`options`,`invalid`,`loading`,`onValueChange`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${m}].role`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):($(),H(v,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_role`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`]),V(`div`,Id,[t.role!==`snapshot`&&n.value.sources.length>1?($(),H(R(I),{key:0,"model-value":t.useForSnapshot,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${m}].useForSnapshot`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:r,errors:i})=>[V(`div`,Ld,[V(`div`,Rd,[V(`label`,{for:`sources[${m}].useForSnapshot`,class:`cui-label-switch`},F(e.$t(`components.form.label.use_for_snapshot`)),9,zd),Q(v,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.use_for_snapshot`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${m}].useForSnapshot`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(x,vt({"model-value":t.useForSnapshot},{ref_for:!0},r,{invalid:i.length>0,loading:R(a),disabled:n.value.sources.some(e=>(e.useForSnapshot||e.role===`snapshot`)&&e._id!==t._id),class:`ml-auto shrink-0`,onValueChange:e=>t.useForSnapshot=e}),null,16,[`model-value`,`invalid`,`loading`,`disabled`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])):q(``,!0),t.role===`snapshot`?q(``,!0):($(),H(R(I),{key:1,"model-value":t.hotMode,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${m}].hotMode`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Bd,[V(`div`,Vd,[V(`label`,{for:`sources[${m}].hotMode`,class:`cui-label-switch`},F(e.$t(`components.form.label.hot_mode`)),9,Hd),Q(v,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.hot_mode`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${m}].hotMode`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(x,vt({"model-value":t.hotMode},{ref_for:!0},n,{invalid:r.length>0,loading:R(a),class:`ml-auto shrink-0`,onValueChange:e=>t.hotMode=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?q(``,!0):($(),H(R(I),{key:2,"model-value":t.preload,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${m}].preload`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Ud,[V(`div`,Wd,[V(`label`,{for:`sources[${m}].preload`,class:`cui-label-switch`},F(e.$t(`components.form.label.preload`)),9,Gd),Q(v,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.preload`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${m}].preload`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(x,vt({"model-value":t.preload},{ref_for:!0},n,{invalid:r.length>0,loading:R(a),class:`ml-auto shrink-0`,onValueChange:e=>t.preload=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?q(``,!0):($(),H(R(I),{key:3,"model-value":t.muted,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${m}].muted`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Kd,[V(`div`,qd,[V(`label`,{for:`sources[${m}].muted`,class:`cui-label-switch`},F(e.$t(`components.form.label.muted`)),9,Jd),Q(v,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.muted`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${m}].muted`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(x,vt({"model-value":t.muted},{ref_for:!0},n,{invalid:r.length>0,loading:R(a),class:`ml-auto shrink-0`,onValueChange:e=>t.muted=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`]))]),t.role===`snapshot`?q(``,!0):($(),H(R(I),{key:1,"model-value":l(m),name:`sources[${m}].childSourceId`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:t})=>[V(`label`,{for:`sources[${m}].childSourceId`,class:`cui-label`},F(e.$t(`components.form.label.pip_source`)),9,Yd),Q(_,null,{default:G(()=>[Q(b,{"model-value":l(m),options:c(m),"option-label":`label`,"option-value":`value`,invalid:t.length>0,loading:R(a),placeholder:e.$t(`components.form.label.none`),"show-clear":``,onValueChange:e=>u(m,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`placeholder`,`onValueChange`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${m}].childSourceId`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),t.length?q(``,!0):($(),H(v,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.pip_source`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),V(`div`,Xd,[V(`div`,Zd,[V(`label`,{for:`sources[${m}].urls[]`,class:`cui-label`},F(e.$t(`components.form.label.sources`)),9,Qd),Q(v,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_urls`)),1)]),_:1})]),($(!0),U(K,null,B(t.urls,(e,n)=>($(),H(R(I),{key:n,modelValue:t.urls[n],"onUpdate:modelValue":e=>t.urls[n]=e,modelModifiers:{trim:!0},name:`sources[${m}].urls[${n}]`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:e,errors:i})=>[Q(_,null,{default:G(()=>[Q(g,vt({ref_for:!0},e,{invalid:i.length>0,loading:R(a),type:`text`}),null,16,[`invalid`,`loading`]),t.urls.length>1?($(),H(S,{key:0},{default:G(()=>[Q(h,{text:``,severity:`secondary`,loading:R(a),class:`cui-icon-md`,onClick:e=>p(m,n)},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`onClick`])]),_:2},1024)):q(``,!0)]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${m}].urls[${n}]`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]))),128)),Q(h,{loading:R(a),label:e.$t(`components.form.button.add_source`),class:`ml-auto cui-button-medium`,onClick:e=>d(m)},null,8,[`loading`,`label`,`onClick`])])])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1}),V(`div`,$d,[Q(h,{text:``,rounded:``,loading:R(a),class:`cui-icon-xl`,onClick:m},{icon:G(()=>[Q(re,{width:`100%`,height:`100%`})]),_:1},8,[`loading`])])],64)}}}),tf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function nf(e,t){return $(),U(`svg`,tf,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 17h.01M10 7v6m4-7h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2m8-4v-4M6 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2`},null,-1)]])}var rf=Y({name:`lucide-battery-warning`,render:nf}),af={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function of(e,t){return $(),U(`svg`,af,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M22 14v-4M6 14v-4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var sf=Y({name:`lucide-battery-low`,render:of}),cf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function lf(e,t){return $(),U(`svg`,cf,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M10 14v-4m12 4v-4M6 14v-4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var uf=Y({name:`lucide-battery-medium`,render:lf}),df={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ff(e,t){return $(),U(`svg`,df,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M10 10v4m4-4v4m8 0v-4M6 10v4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var pf=Y({name:`lucide-battery-full`,render:ff}),mf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function hf(e,t){return $(),U(`svg`,mf,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m11 7l-3 5h4l-3 5m5.856-11H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935M22 14v-4M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936`},null,-1)]])}var gf=Y({name:`lucide-battery-charging`,render:hf}),_f={class:`cui-battery-info__header`},vf={class:`cui-battery-info__icon`},yf={class:`cui-battery-info__info`},bf={key:0,class:`cui-battery-info__label`},xf={class:`cui-battery-info__bar`},Sf=nr(Z({__name:`CuiBatteryInfo`,props:{level:{default:100},charging:{default:`NOT_CHARGING`},low:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let t=e,{t:n}=h(),{level:r,label:i,disabled:a,size:o,charging:s,low:c}=zt(t),l=J(()=>s.value===`CHARGING`),u=J(()=>s.value===`FULL`||r.value===100),d=J(()=>c.value||r.value<=20),f=J(()=>s.value===`CHARGING`?n(`components.battery_info.charging`):s.value===`FULL`?n(`components.battery_info.fully_charged`):s.value===`NOT_CHARGEABLE`?n(`components.battery_info.not_chargeable`):r.value<=10?n(`components.battery_info.critically_low`):r.value<=20?n(`components.battery_info.low`):n(`components.battery_info.ready`)),p=J(()=>l.value?`cui-battery-info__status--charging`:u.value?`cui-battery-info__status--full`:r.value<=10?`cui-battery-info__status--critical`:d.value?`cui-battery-info__status--low`:``),m=J(()=>l.value?`cui-battery-info__level--charging`:u.value?`cui-battery-info__level--full`:r.value<=10?`cui-battery-info__level--critical`:d.value?`cui-battery-info__level--low`:``),ee=J(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),g=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),_=J(()=>({color:`rgb(34, 197, 94)`})),v=J(()=>({color:`rgb(234, 179, 8)`})),y=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),b=J(()=>{let e=`rgb(34, 197, 94)`;return l.value?e=`rgb(59, 130, 246)`:r.value<=10?e=`rgb(239, 68, 68)`:r.value<=20&&(e=`rgb(234, 179, 8)`),{width:`${r.value}%`,backgroundColor:e}});return(e,t)=>{let n=gf,s=pf,c=uf,u=sf,h=rf;return $(),U(`div`,{class:P([`cui-battery-info`,[`cui-battery-info--${R(o)}`,{"cui-battery-info--disabled":R(a),"cui-battery-info--low":R(d),"cui-battery-info--charging":R(l)}]])},[V(`div`,_f,[V(`div`,vf,[R(l)?($(),H(n,{key:0,class:`cui-battery-info__icon-svg`,style:z(R(ee))},null,8,[`style`])):R(r)>=90?($(),H(s,{key:1,class:`cui-battery-info__icon-svg`,style:z(R(g))},null,8,[`style`])):R(r)>=50?($(),H(c,{key:2,class:`cui-battery-info__icon-svg`,style:z(R(_))},null,8,[`style`])):R(r)>=20?($(),H(u,{key:3,class:`cui-battery-info__icon-svg`,style:z(R(v))},null,8,[`style`])):($(),H(h,{key:4,class:`cui-battery-info__icon-svg cui-battery-info__icon-svg--critical`,style:z(R(y))},null,8,[`style`]))]),V(`div`,yf,[R(i)?($(),U(`span`,bf,F(R(i)),1)):q(``,!0),V(`span`,{class:P([`cui-battery-info__status`,R(p)])},F(R(f)),3)]),V(`div`,{class:P([`cui-battery-info__level`,R(m)])},F(R(r))+`%`,3)]),V(`div`,xf,[V(`div`,{class:`cui-battery-info__bar-fill`,style:z(R(b))},null,4)])],2)}}}),[[`__scopeId`,`data-v-c181f3d4`]]),Cf={class:`cui-humidity-info__header`},wf={class:`cui-humidity-info__icon`},Tf={class:`cui-humidity-info__info`},Ef={key:0,class:`cui-humidity-info__label`},Df=nr(Z({__name:`CuiHumidityInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=zt(e),a=J(()=>n.value==null?`rgb(156, 163, 175)`:n.value<30?`rgb(251, 146, 60)`:n.value<=60?`rgb(34, 197, 94)`:`rgb(59, 130, 246)`),o=J(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=J(()=>({color:a.value}));return(e,c)=>{let l=$n;return $(),U(`div`,{class:P([`cui-humidity-info`,[`cui-humidity-info--${R(i)}`,{"cui-humidity-info--disabled":R(r)}]])},[V(`div`,Cf,[V(`div`,wf,[Q(l,{class:`cui-humidity-info__icon-svg`,style:z(R(o))},null,8,[`style`])]),V(`div`,Tf,[R(t)?($(),U(`span`,Ef,F(R(t)),1)):q(``,!0),V(`span`,{class:`cui-humidity-info__status`,style:z({color:R(a)})},F(R(n)==null?`--`:`${R(n)}%`),5)]),V(`div`,{class:`cui-humidity-info__value`,style:z(R(s))},F(R(n)==null?`--`:`${R(n)}%`),5)])],2)}}}),[[`__scopeId`,`data-v-1f41d794`]]),Of={class:`cui-temperature-info__header`},kf={class:`cui-temperature-info__icon`},Af={class:`cui-temperature-info__info`},jf={key:0,class:`cui-temperature-info__label`},Mf=nr(Z({__name:`CuiTemperatureInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=zt(e),a=J(()=>n.value==null?`rgb(156, 163, 175)`:n.value<5?`rgb(59, 130, 246)`:n.value<15?`rgb(6, 182, 212)`:n.value<25?`rgb(34, 197, 94)`:n.value<35?`rgb(251, 146, 60)`:`rgb(239, 68, 68)`),o=J(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=J(()=>({color:a.value}));return(e,c)=>{let l=Kn;return $(),U(`div`,{class:P([`cui-temperature-info`,[`cui-temperature-info--${R(i)}`,{"cui-temperature-info--disabled":R(r)}]])},[V(`div`,Of,[V(`div`,kf,[Q(l,{class:`cui-temperature-info__icon-svg`,style:z(R(o))},null,8,[`style`])]),V(`div`,Af,[R(t)?($(),U(`span`,jf,F(R(t)),1)):q(``,!0),V(`span`,{class:`cui-temperature-info__status`,style:z({color:R(a)})},F(R(n)==null?`--`:`${R(n)}°C`),5)]),V(`div`,{class:`cui-temperature-info__value`,style:z(R(s))},F(R(n)==null?`--`:`${R(n)}°C`),5)])],2)}}}),[[`__scopeId`,`data-v-0edddec9`]]),Nf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Pf(e,t){return $(),U(`svg`,Nf,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M20 9v11h-2v-9H2v9H0V9l10-4zm-3 3H3v2h14zm0 3H3v2h14zm5 0v-5h2v5zm0 4v-2h2v2z`},null,-1)]])}var Ff=Y({name:`mdi-garage-alert-variant`,render:Pf}),If=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e[e.Opening=2]=`Opening`,e[e.Closing=3]=`Closing`,e[e.Stopped=4]=`Stopped`,e}({}),Lf=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e}({}),Rf={currentState:1,targetState:1,obstructionDetected:!1,disabled:!1,size:`medium`},zf={class:`cui-garage-control__header`},Bf={class:`cui-garage-control__icon`},Vf={key:3,class:`cui-garage-control__obstruction`},Hf={class:`cui-garage-control__info`},Uf={key:0,class:`cui-garage-control__label`},Wf=nr(Z({__name:`CuiGarageControl`,props:Et({currentState:{},targetState:{},obstructionDetected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Rf),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=h(),{currentState:a}=zt(n),o=J(()=>a.value===If.Open||a.value===If.Opening),s=J(()=>{switch(a.value){case If.Open:return i(`components.garage_control.open`);case If.Closed:return i(`components.garage_control.closed`);case If.Opening:return i(`components.garage_control.opening`);case If.Closing:return i(`components.garage_control.closing`);case If.Stopped:return i(`components.garage_control.stopped`);default:return``}}),c=J(()=>{switch(a.value){case If.Open:return`cui-garage-control__status--open`;case If.Opening:case If.Closing:return`cui-garage-control__status--transitioning`;case If.Stopped:return`cui-garage-control__status--stopped`;default:return``}}),l=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`})),u=J(()=>({color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 8px rgba(250, 204, 21, 0.5))`})),d=J(()=>({color:`rgb(251, 146, 60)`}));function f(e){r(`update:targetState`,e?Lf.Open:Lf.Closed)}return(t,n)=>{let r=Ff,i=Un,p=Ln,m=cn;return $(),U(`div`,{class:P([`cui-garage-control`,[`cui-garage-control--${e.size}`,{"cui-garage-control--disabled":e.disabled}]])},[V(`div`,zf,[V(`div`,Bf,[R(a)===R(If).Stopped?($(),H(r,{key:0,class:`cui-garage-control__icon-svg`,style:z(R(d))},null,8,[`style`])):R(a)===R(If).Open||R(a)===R(If).Opening?($(),H(i,{key:1,class:`cui-garage-control__icon-svg`,style:z(R(a)===R(If).Open?R(l):R(u))},null,8,[`style`])):($(),H(p,{key:2,class:`cui-garage-control__icon-svg`,style:z(R(a)===R(If).Closing?R(u):void 0)},null,8,[`style`])),e.obstructionDetected?($(),U(`span`,Vf)):q(``,!0)]),V(`div`,Hf,[e.label?($(),U(`span`,Uf,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-garage-control__status`,R(c)])},F(R(s)),3)]),Q(m,{"model-value":R(o),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4c6505c2`]]),Gf={detected:!1,disabled:!1,size:`medium`},Kf={class:`cui-leak-sensor__header`},qf={class:`cui-leak-sensor__icon`},Jf={class:`cui-leak-sensor__info`},Yf={key:0,class:`cui-leak-sensor__label`},Xf=nr(Z({__name:`CuiLeakSensor`,props:Et({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Gf),setup(e){let t=e,{t:n}=h(),{detected:r}=zt(t),i=J(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),a=J(()=>({color:`var(--text-secondary-color)`})),o=J(()=>r.value?`cui-leak-sensor__status--detected`:`cui-leak-sensor__status--clear`),s=J(()=>r.value?`cui-leak-sensor__indicator--detected`:`cui-leak-sensor__indicator--clear`);return(t,c)=>{let l=qn,u=Wn;return $(),U(`div`,{class:P([`cui-leak-sensor`,[`cui-leak-sensor--${e.size}`,{"cui-leak-sensor--disabled":e.disabled,"cui-leak-sensor--clear":!R(r),"cui-leak-sensor--detected":R(r)}]])},[V(`div`,Kf,[V(`div`,qf,[R(r)?($(),H(l,{key:0,class:`cui-leak-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-leak-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,Jf,[e.label?($(),U(`span`,Yf,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-leak-sensor__status`,R(o)])},F(R(r)?R(n)(`components.leak_sensor.detected`):R(n)(`components.leak_sensor.clear`)),3)]),V(`div`,{class:P([`cui-leak-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-14a46a3f`]]),Zf={detected:!1,disabled:!1,size:`medium`},Qf={class:`cui-smoke-sensor__header`},$f={class:`cui-smoke-sensor__icon`},ep={class:`cui-smoke-sensor__info`},tp={key:0,class:`cui-smoke-sensor__label`},np=nr(Z({__name:`CuiSmokeSensor`,props:Et({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Zf),setup(e){let t=e,{t:n}=h(),{detected:r}=zt(t),i=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),a=J(()=>({color:`var(--text-secondary-color)`})),o=J(()=>r.value?`cui-smoke-sensor__status--detected`:`cui-smoke-sensor__status--clear`),s=J(()=>r.value?`cui-smoke-sensor__indicator--detected`:`cui-smoke-sensor__indicator--clear`);return(t,c)=>{let l=Hn,u=Yn;return $(),U(`div`,{class:P([`cui-smoke-sensor`,[`cui-smoke-sensor--${e.size}`,{"cui-smoke-sensor--disabled":e.disabled,"cui-smoke-sensor--clear":!R(r),"cui-smoke-sensor--detected":R(r)}]])},[V(`div`,Qf,[V(`div`,$f,[R(r)?($(),H(l,{key:0,class:`cui-smoke-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-smoke-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,ep,[e.label?($(),U(`span`,tp,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-smoke-sensor__status`,R(o)])},F(R(r)?R(n)(`components.smoke_sensor.detected`):R(n)(`components.smoke_sensor.clear`)),3)]),V(`div`,{class:P([`cui-smoke-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-4db50b68`]]),rp={detected:!1,disabled:!1,size:`medium`},ip={class:`cui-occupancy-sensor__header`},ap={class:`cui-occupancy-sensor__icon`},op={class:`cui-occupancy-sensor__info`},sp={key:0,class:`cui-occupancy-sensor__label`},cp=nr(Z({__name:`CuiOccupancySensor`,props:Et({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},rp),setup(e){let t=e,{t:n}=h(),{detected:r}=zt(t),i=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=J(()=>({color:`var(--text-secondary-color)`})),o=J(()=>r.value?`cui-occupancy-sensor__status--occupied`:`cui-occupancy-sensor__status--empty`),s=J(()=>r.value?`cui-occupancy-sensor__indicator--occupied`:`cui-occupancy-sensor__indicator--empty`);return(t,c)=>{let l=Ir,u=Vn;return $(),U(`div`,{class:P([`cui-occupancy-sensor`,[`cui-occupancy-sensor--${e.size}`,{"cui-occupancy-sensor--disabled":e.disabled,"cui-occupancy-sensor--empty":!R(r),"cui-occupancy-sensor--occupied":R(r)}]])},[V(`div`,ip,[V(`div`,ap,[R(r)?($(),H(l,{key:0,class:`cui-occupancy-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-occupancy-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,op,[e.label?($(),U(`span`,sp,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-occupancy-sensor__status`,R(o)])},F(R(r)?R(n)(`components.occupancy_sensor.occupied`):R(n)(`components.occupancy_sensor.empty`)),3)]),V(`div`,{class:P([`cui-occupancy-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-8ca5a1ce`]]),lp={detected:!1,disabled:!1,size:`medium`},up={class:`cui-contact-sensor__header`},dp={class:`cui-contact-sensor__icon`},fp={class:`cui-contact-sensor__info`},pp={key:0,class:`cui-contact-sensor__label`},mp=nr(Z({__name:`CuiContactSensor`,props:Et({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},lp),setup(e){let t=e,{t:n}=h(),{detected:r}=zt(t),i=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=J(()=>({color:`rgb(251, 146, 60)`,filter:`drop-shadow(0 0 8px rgba(251, 146, 60, 0.6))`})),o=J(()=>r.value?`cui-contact-sensor__status--closed`:`cui-contact-sensor__status--open`),s=J(()=>r.value?`cui-contact-sensor__indicator--closed`:`cui-contact-sensor__indicator--open`);return(t,c)=>{let l=Gn,u=Xn;return $(),U(`div`,{class:P([`cui-contact-sensor`,[`cui-contact-sensor--${e.size}`,{"cui-contact-sensor--disabled":e.disabled,"cui-contact-sensor--open":!R(r),"cui-contact-sensor--closed":R(r)}]])},[V(`div`,up,[V(`div`,dp,[R(r)?($(),H(l,{key:0,class:`cui-contact-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-contact-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,fp,[e.label?($(),U(`span`,pp,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-contact-sensor__status`,R(o)])},F(R(r)?R(n)(`components.contact_sensor.closed`):R(n)(`components.contact_sensor.open`)),3)]),V(`div`,{class:P([`cui-contact-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-0cc50676`]]),hp={ring:!1,disabled:!1,size:`medium`},gp={class:`cui-doorbell__header`},_p={class:`cui-doorbell__icon`},vp={class:`cui-doorbell__info`},yp={key:0,class:`cui-doorbell__label`},bp=nr(Z({__name:`CuiDoorbellTrigger`,props:Et({ring:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},hp),emits:[`update:ring`,`trigger`],setup(e,{emit:t}){let n=e,r=t,{t:i}=h(),{ring:a}=zt(n),o=J(()=>a.value),s=J(()=>({color:`rgb(234, 179, 8)`,filter:`drop-shadow(0 0 10px rgba(234, 179, 8, 0.8))`}));function c(){r(`update:ring`,!0),r(`trigger`),setTimeout(()=>{r(`update:ring`,!1)},2e3)}return(t,n)=>{let r=er,a=hi,l=me;return $(),U(`div`,{class:P([`cui-doorbell`,[`cui-doorbell--${e.size}`,{"cui-doorbell--disabled":e.disabled,"cui-doorbell--ringing":R(o)}]])},[V(`div`,gp,[V(`div`,_p,[R(o)?($(),H(r,{key:0,class:`cui-doorbell__icon-svg cui-doorbell__icon-svg--ringing`,style:z(R(s))},null,8,[`style`])):($(),H(r,{key:1,class:`cui-doorbell__icon-svg`}))]),V(`div`,vp,[e.label?($(),U(`span`,yp,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-doorbell__status`,{"cui-doorbell__status--ringing":R(o)}])},F(R(o)?R(i)(`components.doorbell_trigger.ringing`):R(i)(`components.doorbell_trigger.ready`)),3)]),Q(l,{disabled:e.disabled||R(o),size:`small`,severity:`warn`,class:`cui-doorbell__button`,onClick:c},{icon:G(()=>[Q(a,{class:`cui-doorbell__button-icon`})]),_:1},8,[`disabled`])])],2)}}}),[[`__scopeId`,`data-v-b227d18a`]]),xp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Sp(e,t){return $(),U(`svg`,xp,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`m17.75 4.09l-2.53 1.94l.91 3.06l-2.63-1.81l-2.63 1.81l.91-3.06l-2.53-1.94L12.44 4l1.06-3l1.06 3zm3.5 6.91l-1.64 1.25l.59 1.98l-1.7-1.17l-1.7 1.17l.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85c-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14c.4-.4.82-.76 1.27-1.08c.75-.53 1.93.36 1.85 1.19c-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82c-2.81 3.14-2.7 7.96.31 10.98c3.02 3.01 7.84 3.12 10.98.31`},null,-1)]])}var Cp=Y({name:`mdi-weather-night`,render:Sp}),wp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Tp(e,t){return $(),U(`svg`,wp,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M13.34 8.17c-.93 0-1.69-.77-1.69-1.7a1.69 1.69 0 0 1 1.69-1.69c.94 0 1.7.76 1.7 1.69s-.76 1.7-1.7 1.7M10.3 19.93l-5.93-1.18l.34-1.7l4.15.85l1.35-6.86l-1.52.6v2.86H7v-3.96l4.4-1.87l.67-.08c.6 0 1.1.34 1.43.85l.86 1.35c.68 1.21 2.03 2.03 3.64 2.03v1.68c-1.86 0-3.56-.83-4.66-2.1l-.5 2.54l1.77 1.69V23h-1.69v-5.1l-1.78-1.69zM21 23h-2V3H6v13.11l-2-.42V1h17zM6 23H4v-3.22l2 .42z`},null,-1)]])}var Ep=Y({name:`mdi-exit-run`,render:Tp}),Dp=function(e){return e[e.StayArm=0]=`StayArm`,e[e.AwayArm=1]=`AwayArm`,e[e.NightArm=2]=`NightArm`,e[e.Disarmed=3]=`Disarmed`,e[e.AlarmTriggered=4]=`AlarmTriggered`,e}({}),Op={class:`cui-security-system__header`},kp={class:`cui-security-system__icon`},Ap={class:`cui-security-system__info`},jp={key:0,class:`cui-security-system__label`},Mp={key:0,class:`cui-security-system__alarm`},Np={class:`cui-security-system__modes`},Pp=[`disabled`],Fp=[`disabled`],Ip=[`disabled`],Lp=[`disabled`],Rp=nr(Z({__name:`CuiSecuritySystem`,props:{currentState:{default:Dp.Disarmed},targetState:{default:Dp.Disarmed},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:currentState`,`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=h(),{currentState:a,targetState:o}=zt(n),s=J({get:()=>a.value,set:e=>r(`update:currentState`,e)}),c=J({get:()=>o.value,set:e=>r(`update:targetState`,e)}),l=J(()=>s.value===Dp.AlarmTriggered),u=J(()=>s.value===Dp.StayArm||s.value===Dp.AwayArm||s.value===Dp.NightArm),d=J(()=>!l.value&&c.value!==s.value),f=J(()=>{if(d.value)return c.value===Dp.Disarmed?i(`components.security_system.status_disarming`):i(`components.security_system.status_arming`);switch(s.value){case Dp.StayArm:return i(`components.security_system.status_home_armed`);case Dp.AwayArm:return i(`components.security_system.status_away_armed`);case Dp.NightArm:return i(`components.security_system.status_night_armed`);case Dp.Disarmed:return i(`components.security_system.status_disarmed`);case Dp.AlarmTriggered:return i(`components.security_system.status_alarm`);default:return i(`components.security_system.status_unknown`)}}),p=J(()=>l.value?`cui-security-system__status--alarm`:d.value?`cui-security-system__status--transitioning`:u.value?`cui-security-system__status--armed`:`cui-security-system__status--disarmed`),m=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 12px rgba(239, 68, 68, 0.8))`,animation:`pulse 0.5s ease-in-out infinite alternate`})),ee=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function g(e){c.value=e}function _(){s.value=c.value}return(t,n)=>{let r=tr,a=Fr,o=zn,s=Zn,d=me,h=gi,v=Ep,y=Cp;return $(),U(`div`,{class:P([`cui-security-system`,[`cui-security-system--${e.size}`,{"cui-security-system--disabled":e.disabled}]])},[V(`div`,Op,[V(`div`,kp,[R(l)?($(),H(r,{key:0,class:`cui-security-system__icon-svg`,style:z(R(m))},null,8,[`style`])):R(u)?($(),H(a,{key:1,class:`cui-security-system__icon-svg`,style:z(R(ee))},null,8,[`style`])):($(),H(o,{key:2,class:`cui-security-system__icon-svg`}))]),V(`div`,Ap,[e.label?($(),U(`span`,jp,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-security-system__status`,R(p)])},F(R(f)),3)])]),R(l)?($(),U(`div`,Mp,[Q(s,{class:`cui-security-system__alarm-icon`}),V(`span`,null,F(R(i)(`components.security_system.alarm_triggered`)),1),Q(d,{size:`small`,severity:`danger`,label:R(i)(`components.security_system.reset`),onClick:_},null,8,[`label`])])):q(``,!0),V(`div`,Np,[V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(c)===R(Dp).Disarmed}]),disabled:e.disabled||R(l),onClick:n[0]||=e=>g(R(Dp).Disarmed)},[Q(o,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.off`)),1)],10,Pp),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(c)===R(Dp).StayArm}]),disabled:e.disabled||R(l),onClick:n[1]||=e=>g(R(Dp).StayArm)},[Q(h,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.home`)),1)],10,Fp),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(c)===R(Dp).AwayArm}]),disabled:e.disabled||R(l),onClick:n[2]||=e=>g(R(Dp).AwayArm)},[Q(v,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.away`)),1)],10,Ip),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(c)===R(Dp).NightArm}]),disabled:e.disabled||R(l),onClick:n[3]||=e=>g(R(Dp).NightArm)},[Q(y,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.night`)),1)],10,Lp)])],2)}}}),[[`__scopeId`,`data-v-67cacde3`]]),zp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Bp(e,t){return $(),U(`svg`,zp,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.84-5 6.7v2.07c4-.91 7-4.49 7-8.77s-3-7.86-7-8.77M16.5 12c0-1.77-1-3.29-2.5-4.03V16c1.5-.71 2.5-2.24 2.5-4M3 9v6h4l5 5V4L7 9z`},null,-1)]])}var Vp=Y({name:`mdi-volume-high`,render:Bp}),Hp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Up(e,t){return $(),U(`svg`,Hp,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M6 6.9L3.87 4.78l1.41-1.41L7.4 5.5zM13 1v3h-2V1zm7.13 3.78L18 6.9l-1.4-1.4l2.12-2.13zM4.5 10.5v2h-3v-2zm15 0h3v2h-3zM6 20h12a2 2 0 0 1 2 2H4a2 2 0 0 1 2-2m6-15a6 6 0 0 1 6 6v8H6v-8a6 6 0 0 1 6-6m0 2a4 4 0 0 0-4 4v6h8v-6a4 4 0 0 0-4-4`},null,-1)]])}var Wp=Y({name:`mdi-alarm-light-outline`,render:Up}),Gp={active:!1,volume:100,hasVolume:!1,disabled:!1,size:`medium`},Kp={class:`cui-siren-control__header`},qp={class:`cui-siren-control__icon`},Jp={key:0,class:`cui-siren-control__label`},Yp={key:0,class:`cui-siren-control__volume`},Xp={class:`cui-siren-control__volume-header`},Zp={class:`cui-siren-control__volume-value`},Qp=nr(Z({__name:`CuiSirenControl`,props:Et({active:{type:Boolean},volume:{},hasVolume:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Gp),emits:[`update:active`,`update:volume`],setup(e,{emit:t}){let n=e,r=t,{active:i,volume:a,hasVolume:o}=zt(n),c=J({get:()=>i.value,set:e=>r(`update:active`,e)}),l=J({get:()=>a.value,set:e=>r(`update:volume`,e)}),u=J(()=>{let e=(o.value?a.value:100)/100;return{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(239, 68, 68, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=Zn,i=Wp,a=cn,d=Vp,f=s;return $(),U(`div`,{class:P([`cui-siren-control`,[`cui-siren-control--${e.size}`,{"cui-siren-control--disabled":e.disabled}]])},[V(`div`,Kp,[V(`div`,qp,[R(c)?($(),H(r,{key:0,class:`cui-siren-control__icon-svg cui-siren-control__icon-svg--active`,style:z(R(u))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-siren-control__icon-svg`}))]),e.label?($(),U(`span`,Jp,F(e.label),1)):q(``,!0),Q(a,{modelValue:R(c),"onUpdate:modelValue":n[0]||=e=>Wt(c)?c.value=e:null,disabled:e.disabled,class:`cui-siren-control__toggle`},null,8,[`modelValue`,`disabled`])]),R(o)?($(),U(`div`,Yp,[V(`div`,Xp,[Q(d,{class:`cui-siren-control__volume-icon`}),V(`span`,Zp,F(R(l))+`%`,1)]),Q(f,{modelValue:R(l),"onUpdate:modelValue":n[1]||=e=>Wt(l)?l.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-siren-control__slider`},null,8,[`modelValue`,`disabled`])])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-7f88e563`]]),$p=function(e){return e[e.Secured=0]=`Secured`,e[e.Unsecured=1]=`Unsecured`,e[e.Unknown=2]=`Unknown`,e}({}),em={currentState:2,targetState:0,disabled:!1,size:`medium`},tm={class:`cui-lock-control__header`},nm={class:`cui-lock-control__icon`},rm={class:`cui-lock-control__info`},im={key:0,class:`cui-lock-control__label`},am=nr(Z({__name:`CuiLockControl`,props:Et({currentState:{},targetState:{},label:{},disabled:{type:Boolean},size:{}},em),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=h(),{currentState:a,targetState:o}=zt(n),s=J(()=>o.value===$p.Secured),c=J(()=>a.value!==o.value&&a.value!==$p.Unknown),l=J(()=>{if(c.value)return o.value===$p.Secured?i(`components.lock.status_locking`):i(`components.lock.status_unlocking`);switch(a.value){case $p.Secured:return i(`components.lock.status_locked`);case $p.Unsecured:return i(`components.lock.status_unlocked`);default:return i(`components.lock.status_unknown`)}}),u=J(()=>c.value?`cui-lock-control__status--transitioning`:a.value===$p.Secured?`cui-lock-control__status--secured`:a.value===$p.Unsecured?`cui-lock-control__status--unsecured`:``),d=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function f(e){r(`update:targetState`,e?$p.Secured:$p.Unsecured)}return(t,n)=>{let r=In,i=Bn,a=cn;return $(),U(`div`,{class:P([`cui-lock-control`,[`cui-lock-control--${e.size}`,{"cui-lock-control--disabled":e.disabled}]])},[V(`div`,tm,[V(`div`,nm,[R(s)?($(),H(r,{key:0,class:`cui-lock-control__icon-svg`,style:z(R(d))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-lock-control__icon-svg`}))]),V(`div`,rm,[e.label?($(),U(`span`,im,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-lock-control__status`,R(u)])},F(R(l)),3)]),Q(a,{"model-value":R(s),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4b2a60ff`]]),om={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function sm(e,t){return $(),U(`svg`,om,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18.36 6.64A9 9 0 0 1 20.77 15M6.16 6.16a9 9 0 1 0 12.68 12.68M12 2v4M2 2l20 20`},null,-1)]])}var cm=Y({name:`lucide-power-off`,render:sm}),lm={class:`cui-switch-control__header`},um={class:`cui-switch-control__icon`},dm={key:0,class:`cui-switch-control__label`},fm=nr(Z({__name:`CuiSwitchControl`,props:{on:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:on`],setup(e,{emit:t}){let n=e,r=t,{on:i,size:a}=zt(n),o=J({get:()=>i.value,set:e=>r(`update:on`,e)}),s=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 10px rgba(34, 197, 94, 0.7))`}));return(t,n)=>{let r=Jn,i=cm,c=cn;return $(),U(`div`,{class:P([`cui-switch-control`,[`cui-switch-control--${R(a)}`,{"cui-switch-control--disabled":e.disabled}]])},[V(`div`,lm,[V(`div`,um,[R(o)?($(),H(r,{key:0,class:`cui-switch-control__icon-svg cui-switch-control__icon-svg--on`,style:z(R(s))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-switch-control__icon-svg`}))]),e.label?($(),U(`span`,dm,F(e.label),1)):q(``,!0),Q(c,{modelValue:R(o),"onUpdate:modelValue":n[0]||=e=>Wt(o)?o.value=e:null,disabled:e.disabled,class:`cui-switch-control__toggle`},null,8,[`modelValue`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-86992927`]]),pm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function mm(e,t){return $(),U(`svg`,pm,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 18V6a6 6 0 0 1 6 6a6 6 0 0 1-6 6m8-2.69L23.31 12L20 8.69V4h-4.69L12 .69L8.69 4H4v4.69L.69 12L4 15.31V20h4.69L12 23.31L15.31 20H20z`},null,-1)]])}var hm=Y({name:`mdi-brightness6`,render:mm}),gm={on:!1,brightness:100,hasBrightness:!1,disabled:!1,size:`medium`},_m={class:`cui-light-control__header`},vm={class:`cui-light-control__icon`},ym={key:0,class:`cui-light-control__label`},bm={key:0,class:`cui-light-control__brightness`},xm={class:`cui-light-control__brightness-header`},Sm={class:`cui-light-control__brightness-value`},Cm=nr(Z({__name:`CuiLightControl`,props:Et({on:{type:Boolean},brightness:{},hasBrightness:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},gm),emits:[`update:on`,`update:brightness`],setup(e,{emit:t}){let n=e,r=t,{on:i,brightness:a,hasBrightness:o}=zt(n),c=W(a.value>0?a.value:100),l=J({get:()=>i.value,set:e=>{r(`update:on`,e),e&&a.value===0&&r(`update:brightness`,c.value)}}),u=J({get:()=>a.value,set:e=>{e>0&&(c.value=e),r(`update:brightness`,e),e===0&&i.value?r(`update:on`,!1):e>0&&!i.value&&r(`update:on`,!0)}}),d=J(()=>{let e=(o.value?a.value:100)/100;return{color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(250, 204, 21, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=Rn,i=Lr,a=cn,c=hm,f=s;return $(),U(`div`,{class:P([`cui-light-control`,[`cui-light-control--${e.size}`,{"cui-light-control--disabled":e.disabled}]])},[V(`div`,_m,[V(`div`,vm,[R(l)?($(),H(r,{key:0,class:`cui-light-control__icon-svg cui-light-control__icon-svg--on`,style:z(R(d))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-light-control__icon-svg`}))]),e.label?($(),U(`span`,ym,F(e.label),1)):q(``,!0),Q(a,{modelValue:R(l),"onUpdate:modelValue":n[0]||=e=>Wt(l)?l.value=e:null,disabled:e.disabled,class:`cui-light-control__toggle`},null,8,[`modelValue`,`disabled`])]),R(o)?($(),U(`div`,bm,[V(`div`,xm,[Q(c,{class:`cui-light-control__brightness-icon`}),V(`span`,Sm,F(R(u))+`%`,1)]),Q(f,{modelValue:R(u),"onUpdate:modelValue":n[1]||=e=>Wt(u)?u.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-light-control__slider`},null,8,[`modelValue`,`disabled`])])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-231e0be1`]]),wm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Tm(e,t){return $(),U(`svg`,wm,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`m5 11l1.5-4.5h11L19 11m-1.5 5a1.5 1.5 0 0 1-1.5-1.5a1.5 1.5 0 0 1 1.5-1.5a1.5 1.5 0 0 1 1.5 1.5a1.5 1.5 0 0 1-1.5 1.5m-11 0A1.5 1.5 0 0 1 5 14.5A1.5 1.5 0 0 1 6.5 13A1.5 1.5 0 0 1 8 14.5A1.5 1.5 0 0 1 6.5 16M18.92 6c-.2-.58-.76-1-1.42-1h-11c-.66 0-1.22.42-1.42 1L3 12v8a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-8z`},null,-1)]])}var Em=Y({name:`mdi-car`,render:Tm}),Dm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Om(e,t){return $(),U(`svg`,Dm,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M17 22v-2h3v-3h2v3.5c0 .39-.16.74-.46 1.04s-.65.46-1.04.46zM7 22H3.5c-.39 0-.74-.16-1.04-.46S2 20.89 2 20.5V17h2v3h3zM17 2h3.5c.39 0 .74.16 1.04.46s.46.65.46 1.04V7h-2V4h-3zM7 2v2H4v3H2V3.5c0-.39.16-.74.46-1.04S3.11 2 3.5 2zm6 15.25l4-2.3v-4.59l-4 2.3zm-1-6.33l4-2.29l-4-2.35l-4 2.35zm-5 4.03l4 2.3v-4.59l-4-2.3zm11.23-7.36c.5.32.77.75.77 1.32v6.32c0 .57-.27 1-.77 1.32l-5.48 3.18q-.75.48-1.5 0l-5.48-3.18c-.5-.32-.77-.75-.77-1.32V8.91c0-.57.27-1 .77-1.32l5.48-3.18c.25-.13.5-.19.75-.19s.5.06.75.19z`},null,-1)]])}var km=Y({name:`mdi-cube-scan`,render:Om}),Am={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function jm(e,t){return $(),U(`svg`,Am,[...t[0]||=[V(`g`,{fill:`none`},[V(`path`,{d:`m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z`}),V(`path`,{fill:`currentColor`,d:`M13 2a3 3 0 0 1 .64 5.932l-.171.032l1.436 2.297l1.724-.69a1 1 0 0 1 .848 1.808l-.106.05l-1.723.689a2 2 0 0 1-2.343-.657l-.096-.14l-.163-.26l-.606 2.424a2 2 0 0 1-.256.595l-.09.13l1.653 1.228a2 2 0 0 1 .766 1.202l.029.182l.353 3.178H15a1 1 0 0 1 .117 1.993L15 22h-.91a1.1 1.1 0 0 1-1.074-.861l-.02-.117l-.442-3.979l-3.15-2.34a1 1 0 0 1-.154-.14a2 2 0 0 1-.723-1.891l.033-.157l.794-3.177l-1.57.47l-.835 2.508a1 1 0 0 1-1.928-.52l.03-.112l.836-2.508a2 2 0 0 1 1.17-1.23l.153-.053l3.437-1.031A3 3 0 0 1 13 2M9.6 15.2a1 1 0 0 1 .2 1.4l-1.216 1.622a1.5 1.5 0 0 1-2.032.348l-1.93-1.287a1 1 0 0 1-1.33-1.49l.495-.494a1.01 1.01 0 0 1 1.275-.127l2.206 1.471L8.2 15.4a1 1 0 0 1 1.4-.2`})],-1)]])}var Mm=Y({name:`mingcute-run-fill`,render:jm}),Nm={detected:!1,disabled:!1,size:`medium`},Pm={class:`cui-detection__header`},Fm={class:`cui-detection__info`},Im={key:0,class:`cui-detection__label`},Lm={key:0,class:`cui-detection__detections`},Rm=nr(Z({__name:`CuiDetection`,props:Et({type:{},label:{},detected:{type:Boolean},detections:{},size:{},disabled:{type:Boolean}},Nm),setup(e){let t=e,{t:n}=h(),{detected:r}=zt(t),i=J(()=>r.value?n(`components.detection.detected`):n(`components.detection.idle`));return(t,n)=>{let a=Mm,o=km,s=Qr,c=kr,l=Em;return $(),U(`div`,{class:P([`cui-detection`,[`cui-detection--${e.size}`,`cui-detection--${e.type}`,{"cui-detection--disabled":e.disabled,"cui-detection--detected":R(r)}]])},[V(`div`,Pm,[V(`div`,{class:P([`cui-detection__icon`,{"cui-detection__icon--detected":R(r)}])},[e.type===`motion`?($(),H(a,{key:0,class:`cui-detection__icon-svg`})):e.type===`object`?($(),H(o,{key:1,class:`cui-detection__icon-svg`})):e.type===`audio`?($(),H(s,{key:2,class:`cui-detection__icon-svg`})):e.type===`face`?($(),H(c,{key:3,class:`cui-detection__icon-svg`})):e.type===`licensePlate`?($(),H(l,{key:4,class:`cui-detection__icon-svg`})):q(``,!0)],2),V(`div`,Fm,[e.label?($(),U(`span`,Im,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-detection__status`,{"cui-detection__status--detected":R(r)}])},F(R(i)),3)]),V(`div`,{class:P([`cui-detection__indicator`,{"cui-detection__indicator--detected":R(r)}])},null,2)]),e.detections&&e.detections.length>0?($(),U(`div`,Lm,[($(!0),U(K,null,B(e.detections,(e,t)=>($(),U(`span`,{key:t,class:`cui-detection__detection-tag`},F(e),1))),128))])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-4bdc871b`]]),zm={key:0,class:`flex items-center justify-center h-full`},Bm={key:1,class:`overview-container`},Vm={class:`relative`},Hm={key:0,class:`absolute inset-0 z-2 flex items-center justify-center bg-black/80 pointer-events-none`},Um={key:1,class:`absolute top-2 right-2 z-3 flex items-center gap-1 px-2 py-1 bg-black/60 rounded-full pointer-events-none`},Wm={class:`text-xs text-white/80`},Gm={key:2,class:`absolute top-2 right-2 z-2 flex items-center gap-1 px-2 py-1 bg-black/60 rounded-full pointer-events-none`},Km={class:`text-xs text-white/80`},qm={class:`overview-section`},Jm={class:`overview-section-title`},Ym={key:1},Xm={key:0,class:`overview-section`},Zm={class:`overview-section-title`},Qm={class:`flex flex-col gap-2`},$m={key:1,class:`overview-section`},eh={class:`overview-section-title`},th={class:`flex flex-col gap-2`},nh={key:2,class:`overview-section`},rh={class:`overview-section-title`},ih={class:`flex flex-col gap-2`},ah={key:3,class:`overview-section`},oh={class:`overview-section-title`},sh={class:`flex flex-col gap-2`},ch={key:4,class:`overview-section`},lh={class:`overview-section-title`},uh={class:`flex flex-col gap-2`},dh={key:5,class:`overview-section`},fh={class:`overview-section-title`},ph={class:`flex flex-col gap-2`},mh={key:6,class:`overview-section`},hh={class:`overview-section-title`},gh={class:`flex flex-col gap-2`},_h={key:7,class:`overview-section`},vh={class:`overview-section-title`},yh={class:`flex flex-col gap-2`},bh={key:8,class:`overview-section`},xh={class:`overview-section-title`},Sh={class:`flex flex-col gap-2`},Ch={key:9,class:`overview-section`},wh={class:`overview-section-title`},Th={class:`flex flex-col gap-2`},Eh={key:10,class:`overview-section`},Dh={class:`overview-section-title`},Oh={class:`flex flex-col gap-2`},kh={key:11,class:`overview-section`},Ah={class:`overview-section-title`},jh={class:`flex flex-col gap-2`},Mh={key:12,class:`overview-section`},Nh={class:`overview-section-title`},Ph={class:`flex flex-col gap-2`},Fh={key:13,class:`overview-section`},Ih={class:`overview-section-title`},Lh={class:`flex flex-col gap-2`},Rh={key:14,class:`overview-section`},zh={class:`overview-section-title`},Bh={class:`flex flex-col gap-2`},Vh={key:15,class:`overview-section`},Hh={class:`no-sensors`},Uh=nr(Z({__name:`Overview`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},setup(e){let r=e,{t:s}=h(),{getCameraStatus:d,connect:m}=mi(),{cameraDevice:v,latestSnapshotSrc:b}=zt(r),{sensors:C}=Be(v);m();let T=J(()=>v.value?.camera.value),ie=J(()=>d(T.value?._id)),se=J(()=>{switch(ie.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;case`partial`:return`contrast`;default:return`secondary`}}),ue=J(()=>{switch(ie.value){case`connected`:return s(`components.camera_table.online`);case`connecting`:return s(`components.camera_table.connecting`);case`error`:return s(`components.camera_table.error`);case`partial`:return s(`components.camera_table.partial`);default:return s(`components.camera_table.idle`)}}),pe=J(()=>C.value.filter(A)),me=J(()=>C.value.filter(le)),he=J(()=>C.value.filter(w)),ge=J(()=>C.value.filter(f)),_e=J(()=>C.value.filter(_)),j=J(()=>C.value.filter(Ve)),ye=J(()=>C.value.filter(Ae)),xe=J(()=>C.value.filter(t)),Se=J(()=>C.value.filter(Pe)),Ce=J(()=>C.value.filter(g)),we=J(()=>C.value.filter(ae)),De=J(()=>C.value.filter(a)),Oe=J(()=>C.value.filter(ke)),Me=J(()=>C.value.filter(oe)),Ne=J(()=>C.value.filter(de)),Fe=J(()=>C.value.filter(ve)),Ie=J(()=>C.value.filter(u)),Le=J(()=>C.value.filter(E)),Re=J(()=>C.value.filter(ne)),ze=J(()=>pe.value.some(e=>e.getProperty(S.Detected))),He=J(()=>{let e;for(let t of pe.value){let n=t.getProperty(S.LastTriggered);n&&(!e||n>e)&&(e=n)}return e}),Ue=x(J(()=>new Date(He.value??0))),We=J(()=>{let e=[{label:s(`components.camera_options.overview_status`),value:ue.value,tag:!0,tagSeverity:se.value},{label:s(`components.camera_options.overview_sources`),value:String(T.value?.sources.length??0)}],t=T.value?.info;return t?.manufacturer&&e.push({label:s(`components.form.label.manufacturer`),value:t.manufacturer}),t?.model&&e.push({label:s(`components.camera_options.model`),value:t.model}),t?.hardware&&e.push({label:s(`components.form.label.hardware_version`),value:t.hardware}),t?.serialNumber&&e.push({label:s(`components.form.label.serial_number`),value:t.serialNumber}),t?.firmwareVersion&&e.push({label:s(`components.form.label.firmware_version`),value:t.firmwareVersion}),t?.supportUrl&&e.push({label:s(`components.form.label.support_url`),value:t.supportUrl}),pe.value.length>0&&(ze.value?e.push({label:s(`components.camera_options.overview_last_motion`),value:s(`components.camera_options.overview_motion_active`),tag:!0,tagSeverity:`danger`}):He.value?e.push({label:s(`components.camera_options.overview_last_motion`),value:Ue.value}):e.push({label:s(`components.camera_options.overview_last_motion`),value:s(`components.camera_options.overview_no_motion`)})),e}),Ge=J(()=>pe.value.length>0||me.value.length>0||he.value.length>0||ge.value.length>0||_e.value.length>0),Ke=J(()=>j.value.length>0||Oe.value.length>0||Me.value.length>0||Ne.value.length>0||Fe.value.length>0||Ie.value.length>0||ye.value.length>0||Ce.value.length>0||Le.value.length>0||xe.value.length>0||Se.value.length>0||we.value.length>0||De.value.length>0||Re.value.length>0);return(e,t)=>{let r=be,a=Pn,s=Fn,u=jr,d=An,f=bn,m=_i,h=Cm,g=fm,_=am,v=Qp,x=Rp,C=bp,ne=mp,w=cp,E=np,ie=Xf,ae=Wf,oe=Mf,se=Df,le=Sf;return R(T)?($(),U(`div`,Bm,[V(`div`,Vm,[R(T)?.disabled?($(),U(`div`,Hm,[Q(a,{class:`w-8 h-8 text-white/60`})])):q(``,!0),R(T)?.disabled?($(),U(`div`,Um,[Q(a,{class:`w-3.5 h-3.5 text-red-400`}),V(`span`,Wm,F(e.$t(`views.camera.camera_disabled`)),1)])):R(T)?.detectionSettings?.snooze?($(),U(`div`,Gm,[Q(s,{class:`w-3.5 h-3.5 text-amber-400`}),V(`span`,Km,F(e.$t(`views.camera.camera_snoozed`)),1)])):q(``,!0),Q(u,{camera:R(T),src:R(b)},null,8,[`camera`,`src`])]),V(`div`,qm,[V(`h3`,Jm,F(e.$t(`components.camera_options.overview`)),1),Q(m,{value:R(We),"striped-rows":``,"show-headers":!1,class:`card-border rounded-lg overflow-hidden`},{default:G(()=>[Q(d,{field:`label`,class:`p-2 font-medium text-sm`}),Q(d,{field:`value`,class:`p-2 text-muted text-sm text-right`},{body:G(({data:e})=>[e.tag?($(),H(f,{key:0,severity:e.tagSeverity,value:e.value},null,8,[`severity`,`value`])):($(),U(`span`,Ym,F(e.value),1))]),_:1})]),_:1},8,[`value`])]),R(Ge)?($(),U(`div`,Xm,[V(`h3`,Zm,F(e.$t(`components.camera_options.detection`)),1),V(`div`,Qm,[($(!0),U(K,null,B(R(pe),e=>($(),H(Rm,{key:e.id,type:`motion`,label:e.displayName.value,detected:e.getProperty(R(S).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),($(!0),U(K,null,B(R(me),e=>($(),H(Rm,{key:e.id,type:`object`,label:e.displayName.value,detected:(e.getProperty(R(ee).Detections)?.length??0)>0,detections:e.getProperty(R(ee).Detections)?.map(e=>e.label??e.class??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),($(!0),U(K,null,B(R(he),e=>($(),H(Rm,{key:e.id,type:`audio`,label:e.displayName.value,detected:e.getProperty(R(n).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),($(!0),U(K,null,B(R(ge),e=>($(),H(Rm,{key:e.id,type:`face`,label:e.displayName.value,detected:e.getProperty(R(y).Detected)??!1,detections:e.getProperty(R(y).Detections)?.map(e=>e.identity??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),($(!0),U(K,null,B(R(_e),e=>($(),H(Rm,{key:e.id,type:`licensePlate`,label:e.displayName.value,detected:e.getProperty(R(O).Detected)??!1,detections:e.getProperty(R(O).Detections)?.map(e=>e.plateText??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128))])])):q(``,!0),R(ye).length?($(),U(`div`,$m,[V(`h3`,eh,F(e.$t(`components.camera_options.sensor_type_light`)),1),V(`div`,th,[($(!0),U(K,null,B(R(ye),e=>($(),H(h,{key:e.id,label:e.displayName.value,on:e.getProperty(R(o).On)??!1,brightness:e.getProperty(R(o).Brightness)??100,"has-brightness":e.hasCapability(`brightness`),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(R(o).On,t),"onUpdate:brightness":t=>e.setProperty(R(o).Brightness,t)},null,8,[`label`,`on`,`brightness`,`has-brightness`,`onUpdate:on`,`onUpdate:brightness`]))),128))])])):q(``,!0),R(Se).length?($(),U(`div`,nh,[V(`h3`,rh,F(e.$t(`components.camera_options.sensor_type_switch`)),1),V(`div`,ih,[($(!0),U(K,null,B(R(Se),e=>($(),H(g,{key:e.id,label:e.displayName.value,on:e.getProperty(R(te).On)??!1,size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(R(te).On,t)},null,8,[`label`,`on`,`onUpdate:on`]))),128))])])):q(``,!0),R(Ce).length?($(),U(`div`,ah,[V(`h3`,oh,F(e.$t(`components.camera_options.sensor_type_lock`)),1),V(`div`,sh,[($(!0),U(K,null,B(R(Ce),e=>($(),H(_,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(re).CurrentState)??2,"target-state":e.getProperty(R(re).TargetState)??0,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(re).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(xe).length?($(),U(`div`,ch,[V(`h3`,lh,F(e.$t(`components.camera_options.sensor_type_siren`)),1),V(`div`,uh,[($(!0),U(K,null,B(R(xe),e=>($(),H(v,{key:e.id,label:e.displayName.value,active:e.getProperty(R(i).Active)??!1,volume:e.getProperty(R(i).Volume)??100,"has-volume":e.hasCapability(`volume`),size:`small`,class:`card-border`,"onUpdate:active":t=>e.setProperty(R(i).Active,t),"onUpdate:volume":t=>e.setProperty(R(i).Volume,t)},null,8,[`label`,`active`,`volume`,`has-volume`,`onUpdate:active`,`onUpdate:volume`]))),128))])])):q(``,!0),R(Re).length?($(),U(`div`,dh,[V(`h3`,fh,F(e.$t(`components.camera_options.sensor_type_securitySystem`)),1),V(`div`,ph,[($(!0),U(K,null,B(R(Re),e=>($(),H(x,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(Te).CurrentState)??3,"target-state":e.getProperty(R(Te).TargetState)??3,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(Te).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(we).length?($(),U(`div`,mh,[V(`h3`,hh,F(e.$t(`components.camera_options.sensor_type_doorbell`)),1),V(`div`,gh,[($(!0),U(K,null,B(R(we),e=>($(),H(C,{key:e.id,label:e.displayName.value,ring:e.getProperty(R(je).Ring)??!1,size:`small`,class:`card-border`,onTrigger:()=>e.setProperty(R(je).Ring,!0)},null,8,[`label`,`ring`,`onTrigger`]))),128))])])):q(``,!0),R(De).length?($(),U(`div`,_h,[V(`h3`,vh,F(e.$t(`components.camera_options.sensor_type_contact`)),1),V(`div`,yh,[($(!0),U(K,null,B(R(De),e=>($(),H(ne,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(k).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Ne).length?($(),U(`div`,bh,[V(`h3`,xh,F(e.$t(`components.camera_options.sensor_type_occupancy`)),1),V(`div`,Sh,[($(!0),U(K,null,B(R(Ne),e=>($(),H(w,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(l).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Fe).length?($(),U(`div`,Ch,[V(`h3`,wh,F(e.$t(`components.camera_options.sensor_type_smoke`)),1),V(`div`,Th,[($(!0),U(K,null,B(R(Fe),e=>($(),H(E,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(Ee).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Ie).length?($(),U(`div`,Eh,[V(`h3`,Dh,F(e.$t(`components.camera_options.sensor_type_leak`)),1),V(`div`,Oh,[($(!0),U(K,null,B(R(Ie),e=>($(),H(ie,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(p).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Le).length?($(),U(`div`,kh,[V(`h3`,Ah,F(e.$t(`components.camera_options.sensor_type_garage`)),1),V(`div`,jh,[($(!0),U(K,null,B(R(Le),e=>($(),H(ae,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(ce).CurrentState)??1,"target-state":e.getProperty(R(ce).TargetState)??1,"obstruction-detected":e.getProperty(R(ce).ObstructionDetected)??!1,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(ce).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`obstruction-detected`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(Oe).length?($(),U(`div`,Mh,[V(`h3`,Nh,F(e.$t(`components.camera_options.sensor_type_temperature`)),1),V(`div`,Ph,[($(!0),U(K,null,B(R(Oe),e=>($(),H(oe,{key:e.id,label:e.displayName.value,current:e.getProperty(R(c).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),R(Me).length?($(),U(`div`,Fh,[V(`h3`,Ih,F(e.$t(`components.camera_options.sensor_type_humidity`)),1),V(`div`,Lh,[($(!0),U(K,null,B(R(Me),e=>($(),H(se,{key:e.id,label:e.displayName.value,current:e.getProperty(R(D).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),R(j).length?($(),U(`div`,Rh,[V(`h3`,zh,F(e.$t(`components.camera_options.sensor_type_battery`)),1),V(`div`,Bh,[($(!0),U(K,null,B(R(j),e=>($(),H(le,{key:e.id,label:e.displayName.value,level:e.getProperty(R(fe).Level)??100,charging:e.getProperty(R(fe).Charging)??`NOT_CHARGING`,low:e.getProperty(R(fe).Low)??!1,size:`small`,class:`card-border`},null,8,[`label`,`level`,`charging`,`low`]))),128))])])):q(``,!0),!R(Ke)&&!R(Ge)?($(),U(`div`,Vh,[V(`div`,Hh,F(e.$t(`components.camera_options.no_sensors`)),1)])):q(``,!0)])):($(),U(`div`,zm,[Q(r,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))}}}),[[`__scopeId`,`data-v-5d86732a`]]),Wh={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Gh(e,t){return $(),U(`svg`,Wh,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[V(`path`,{"stroke-width":`3`,d:`M5 10h.01M5 16h.01`}),V(`path`,{"stroke-width":`2`,d:`m10 17l4-10m2 10l4-10`})],-1)]])}var Kh=Y({name:`humbleicons-url`,render:Gh}),qh={class:`drawer-header flex items-center w-full h-[45px] border-b-[1px] border-color px-3`},Jh={class:`font-semibold text-lg truncate`},Yh=[`onClick`],Xh={class:`text-xs truncate`},Zh={class:`w-full h-full max-h-full overflow-y-scroll`},Qh={key:0,class:`flex w-full h-full items-center justify-center mt-5`},$h={key:1,class:`w-full h-full`},eg={key:0,class:`w-full flex items-center justify-center p-4 h-[70px]`},tg=nr(Z({__name:`CameraOptions`,props:{cameraName:{},latestSnapshotSrc:{}},emits:[`close`],setup(e,{emit:t}){let n=new Br,r=e,i=t,a=Qe(),o=Ge(),{t:s}=h(),{cameraName:c,latestSnapshotSrc:l}=zt(r),{camera:u,isLoading:d}=Ce(c),{data:f,isBusy:p}=n.getCameraQuery(c),{mutate:m,isPending:ee}=n.patchCameraQuery(),g=Ft(`formRef`),_=W(),v=W(`overview`),y=W([{name:`overview`,icon:Dr},{name:`sources`,icon:Kh},{name:`settings`,icon:Or},{name:`plugins`,icon:Ar}]),b=J(()=>p.value||d.value||ee.value),x=J(()=>v.value===`sources`||v.value===`settings`);async function S(){let e=await g.value?.validate();e?.valid&&e.values?m({cameraname:c.value,cameraData:e.values}):(a.error(`Validation failed`,e),o.add({severity:`error`,detail:s(`components.toast.validation_failed`),life:3e3}))}return M(f,e=>{e&&(_.value=ft(e))},{deep:!0,immediate:!0}),(e,t)=>{let n=xr,r=me,a=ln,o=dn,s=be,d=Uh,p=ef,m=gd,h=Sc,ee=hn,C=nn,te=_n;return $(),U(K,null,[V(`div`,qh,[V(`span`,Jh,F(R(c)),1),Q(r,{text:``,rounded:``,severity:`secondary`,class:`ml-auto cui-icon-md shrink-0`,onClick:t[0]||=e=>i(`close`)},{icon:G(()=>[Q(n,{width:`100%`,height:`100%`})]),_:1})]),Q(R(St),{ref_key:`formRef`,ref:g,class:`w-full`,style:z({height:`calc(100% - 45px - ${R(x)?`70px`:`0px`})`}),"validation-schema":R(li)},{default:G(()=>[Q(te,{value:R(v),"onUpdate:value":t[7]||=e=>Wt(v)?v.value=e:null,scrollable:``,class:`w-full h-full`},{default:G(()=>[Q(o,{class:`justify-between`,pt:{tablist:{class:`h-[65px]`},activeBar:{class:`!w-auto`}}},{default:G(()=>[($(!0),U(K,null,B(R(y),(t,n)=>($(),H(a,{key:n,value:t.name,"as-child":``},{default:G(n=>[V(`div`,vt({ref_for:!0},n.a11yAttrs,{class:[`flex flex-col items-center justify-center flex-1 content-background !py-3`,[{"hover:!text-color active:!text-color focus:!text-color":!n.active},n.class]],onClick:n.onClick}),[($(),H(xt(t.icon),{class:`w-5 h-5`})),V(`span`,Xh,F(e.$t(`components.options_sidebar.segment_tab_${t.name}`)),1)],16,Yh)]),_:2},1032,[`value`]))),128))]),_:1}),Q(C,{class:`p-0 h-[calc(100%-65px)]`},{default:G(()=>[V(`div`,Zh,[($(!0),U(K,null,B(R(y),(e,n)=>($(),H(ee,{key:n,value:e.name,"as-child":``},{default:G(e=>[e.active?($(),U(`div`,vt({key:0,class:e.class},{ref_for:!0},e.a11yAttrs),[!R(_)||!R(f)||!R(u)?($(),U(`div`,Qh,[Q(s,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):($(),U(`div`,$h,[R(v)===`overview`?($(),H(d,{key:0,camera:R(f),"camera-device":R(u),loading:R(b),"latest-snapshot-src":R(l),onClose:t[1]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`,`latest-snapshot-src`])):q(``,!0),R(v)===`sources`?($(),H(p,{key:1,modelValue:R(_),"onUpdate:modelValue":t[2]||=e=>Wt(_)?_.value=e:null,camera:R(f),"camera-device":R(u),loading:R(b),onClose:t[3]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):q(``,!0),R(v)===`settings`?($(),H(m,{key:2,modelValue:R(_),"onUpdate:modelValue":t[4]||=e=>Wt(_)?_.value=e:null,camera:R(f),"camera-device":R(u),loading:R(b),onClose:t[5]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):q(``,!0),R(v)===`plugins`?($(),H(h,{key:3,camera:R(f),"camera-device":R(u),loading:R(b),onClose:t[6]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`])):q(``,!0)]))],16)):q(``,!0)]),_:1},8,[`value`]))),128))])]),_:1})]),_:1},8,[`value`]),R(x)?($(),U(`div`,eg,[Q(r,{fluid:``,severity:`success`,class:`cui-button-medium`,label:e.$t(`components.form.button.save`),onClick:S},null,8,[`label`])])):q(``,!0)]),_:1},8,[`style`,`validation-schema`])],64)}}}),[[`__scopeId`,`data-v-38cd7548`]]),ng={class:`w-full h-full p-safe !pb-0 md:!pl-0 non-draggable-region`},rg={class:`w-full h-full border-0 md:border-r-[1px] border-color overflow-y-auto pb-safe`},ig=Z({__name:`CuiCameraDrawer`,setup(e){let t=Qt(),n=Ur(),r=n.getEventBus(),i=W(!1),a=W(),o=W(),s=J(()=>Wr.pt);function c(){i.value=!1,n.close()}return M(t.currentRoute,(e,t)=>{e.path!==t.path&&n.close()}),wt(()=>{r.on(e=>{e.type===`open`?(a.value=e.options,o.value=e.props,i.value=!0):e.type===`close`&&(i.value=!1,a.value=void 0)})}),(e,t)=>{let n=tg,r=Sn;return $(),H(r,vt({visible:R(i),"onUpdate:visible":t[0]||=e=>Wt(i)?i.value=e:null},R(o),{class:`border-0 md:border-l-[1px]`,pt:R(s),onHide:c}),{container:G(({closeCallback:e})=>[V(`div`,ng,[V(`div`,rg,[R(a)?($(),H(n,vt({key:0},R(a),{onClose:e}),null,16,[`onClose`])):q(``,!0)])])]),_:1},16,[`visible`,`pt`])}}}),ag=Z({__name:`CuiToast`,setup(e){let t=Qe(),{t:n}=h(),{mdBreakpoint:r}=dr(),{theme:i}=Zt(qr()),a={success:Yt.success,error:Yt.error,warn:Yt.warning,warning:Yt.warning,info:Yt.info};function o(e){return n(`components.toast.title_${e===`warning`?`warn`:e}`)}function s(e){return e.type===`dismiss`}return ie(Ke.on(e=>{if(s(e)){Yt.dismiss(e.id);return}let r=e,i=a[r.severity]||Yt,c=r.summary||o(r.severity),l;if(r.action){let{label:e,loadingLabel:i,onClick:a}=r.action,o=r.id;l={label:e,onClick:r=>{r.preventDefault(),r.stopPropagation();let s=a();s instanceof Promise&&o&&(Yt.loading(i??e,{id:o,duration:1/0}),s.catch(e=>{t.error(`action failed`,e),Yt.error(n(`components.toast.title_error`),{id:o})}))}}}i(c,{id:r.id,description:r.detail,duration:r.persistent?1/0:r.life??3e3,action:l})})),(e,t)=>($(),H(R(Jt),{"rich-colors":``,position:R(r)?`top-center`:`bottom-right`,"visible-toasts":3,theme:R(i)},null,8,[`position`,`theme`]))}}),og={class:`loader flex flex-col justify-center items-center`},sg={key:0,class:`absolute flex flex-col items-center justify-center pb-safe bottom-10`},cg={key:0,class:`offline`},lg={key:1,class:`text-center text-white text-sm font-bold mt-2`},ug=nr(Z({__name:`CuiLoadingScreen`,props:{reload:{type:Boolean,default:!1},height:{default:`200px`},width:{default:`200px`},text:{},icon:{}},setup(e){let{reload:t,width:n,height:r,text:i,icon:a}=zt(e),{start:o}=v(()=>{document.getElementById(`lens`)?.classList.add(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.add(`cameraLetter`)},100,{immediate:!1}),{resume:s}=d(()=>{document.getElementById(`lens`)?.classList.remove(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.remove(`cameraLetter`),o()},2300,{immediate:!1});return wt(()=>{t.value&&s()}),(e,t)=>($(),U(`div`,og,[Q(R(bt),{src:R(gt)(`logo_loading_circle.svg`),width:R(n),height:R(r),title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`,`width`,`height`]),R(a)||R(i)?($(),U(`div`,sg,[R(a)?($(),U(`div`,cg,[($(),H(xt(R(a)),{class:`w-8 h-8 text-primary`}))])):q(``,!0),R(i)?($(),U(`div`,lg,F(R(i)),1)):q(``,!0)])):q(``,!0)]))}}),[[`__scopeId`,`data-v-839ba1ea`]]);Qe(`PushHandler`);function dg(){let e=Qt(),{isElectronApp:t,electron:n}=tt();function r(t,n){n?.deepLink&&e.push(n.deepLink)}wt(()=>{!t||!n||(n.removeListener(`notification-click`,r),n.on(`notification-click`,r))}),kt(()=>{n?.removeListener(`notification-click`,r)})}function fg(){let e=Qt(),{isElectronApp:t,electron:n}=tt();function r(t,n){n?.path&&e.push(n.path)}wt(()=>{!t||!n||(n.removeListener(`deep-link`,r),n.on(`deep-link`,r))}),kt(()=>{n?.removeListener(`deep-link`,r)})}var pg={key:1,class:`app`},mg=nr(Z({__name:`App`,setup(e){let{navbarState:t,subbarState:n,showBottombar:r,showNavbar:i,showTopbar:a}=sr(),o=ur(),s=Xt(),c=Qt(),{mdBreakpoint:l}=dr(),{isPWA:u}=lr(),{t:d}=h(),f=We(),{isElectronApp:p}=tt();at(),mr(),dg(),fg();let{theme:m}=Zt(qr()),{isLoggedIn:ee}=Zt(ot()),g=Er(),_=Ft(`navbarRef`),v=Ft(`topbarRef`),y=Ft(`bottombarRef`),b=W(!0),x=W(!1),S=Ie(v,{width:0,height:0},{box:`border-box`}),C=Ie(y,{width:0,height:0},{box:`border-box`}),te=J(()=>t.value===`closed`||t.value===`minified`?l.value?xa.CLOSED:xa.MINIFIED:xa.EXPANDED),ne=J(()=>t.value===`closed`?0:8),w=J(()=>!_.value||l.value?`env(safe-area-inset-left, 0px)`:`calc(${te.value}px + max(${ne.value}px, env(safe-area-inset-left, 0px)))`),re=J(()=>o.showTopbar.value?`var(--topbar-background)`:o.background.value?o.background.value:`var(--ground-background)`),T=J(()=>`calc(100dvh - ${v.value?`${S.height.value}px`:`env(safe-area-inset-top, 0px)`} - ${y.value?`${C.height.value}px`:o.ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`} - ${y.value||!o.disableScroll.value||o.noExtraPadding.value?`0px`:`8px`})`),E=J(()=>s.meta.auth?.requiresAuth&&!ee.value||b.value||g.isSwitching),ie=J(()=>{if(!(!g.isSwitching||!g.switchTargetName))return`${d(`components.instance_switcher.switching_to`)} ${g.switchTargetName}...`});async function D(){}return M([ee,()=>f.isOnline.value],([e,t],n)=>{if(g.isSwitching)return;let r=n?.[0]===!0&&n?.[1]===!0;e&&t&&!r&&(g.saveCurrentTokens(),g.fetchInstances())},{immediate:!0}),M([re,m],()=>{Ht(()=>{if(/^var\([^)]+\)$/.test(re.value)){let e=window.getComputedStyle(document.body),t=re.value.split(`var(`)[1].split(`)`)[0],n=e.getPropertyValue(t);document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,n)}else document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,re.value)})},{immediate:!0}),M(()=>o.disableScroll.value,e=>{document.body.classList.toggle(`disable-overflow-scroll`,e),document.documentElement.classList.toggle(`disable-overflow-scroll`,e)},{immediate:!0}),wt(async()=>{await c.isReady(),D(),b.value=!1,requestAnimationFrame(()=>{x.value=!0})}),(e,s)=>{let c=ug,d=ag,f=Cn,m=xn,h=ig,ee=cs,b=Va,re=za,D=At(`RouterView`),ae=sa,O=Xi,oe=qi,se=Vi,ce=Fi;return R(E)?($(),U(`div`,{key:0,class:`flex w-full h-full justify-center items-center absolute z-50`,style:z({minHeight:R(u)?`100vh !important`:`100dvh !important`})},[Q(c,{reload:``,text:R(ie)},null,8,[`text`])],4)):($(),U(`div`,pg,[Q(d),Q(f),Q(m),Q(h),R(a)?($(),H(ee,{key:0,ref_key:`topbarRef`,ref:v,class:`z-2 top-0`,"offset-left":R(l)?0:R(te),animate:R(x)},null,8,[`offset-left`,`animate`])):q(``,!0),R(r)?($(),H(b,{key:1,ref_key:`bottombarRef`,ref:y,class:`z-2`},null,512)):q(``,!0),R(i)?($(),H(re,{key:2,ref_key:`navbarRef`,ref:_,class:`z-3 top-0 left-0`},null,512)):q(``,!0),V(`main`,{id:`container`,class:`relative w-dvw z-1 overflow-x-hidden`,style:z({transition:R(x)?`padding-left 200ms`:void 0,paddingTop:R(v)?`${R(S).height.value}px`:`env(safe-area-inset-top, 0px)`,paddingLeft:R(w),paddingRight:`env(safe-area-inset-right, 0px)`,paddingBottom:R(y)?`${R(C).height.value}px`:R(o).ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`})},[V(`div`,{class:P([`w-full max-w-full h-full grid`,{"p-2":R(o).padding.value,"pt-0":R(o).paddingTop.value===!1,"pb-0":R(o).paddingBottom.value===!1&&!R(y),"pb-4":(R(o).paddingBottom.value||R(y))&&!R(o).disableScroll,"pl-0":R(o).paddingLeft.value===!1,"pr-0":R(o).paddingRight.value===!1}]),style:z({minHeight:R(T),maxHeight:R(o).disableScroll.value?R(T):void 0,height:R(o).disableScroll.value?R(T):void 0,overflow:R(o).disableScroll.value?`hidden`:void 0})},[Q(D,null,{default:G(({Component:e})=>[($(),H(xt(e),{key:R(g).switchKey,class:P([`w-full h-full relative min-w-0`,{"overflow-x-hidden":!R(o).allowOverflowX.value}]),"navbar-width":R(te),"navbar-left":R(ne)},null,8,[`class`,`navbar-width`,`navbar-left`]))]),_:1})],6)],4),R(p)?($(),H(ae,{key:3})):q(``,!0),R(t)===`opened`||R(n)===`opened`&&R(l)?($(),H(Bt,{key:4,to:R(t)===`opened`?`#app`:`#container`,defer:``},[R(l)?($(),U(`div`,{key:0,class:P([`fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1`,{"z-2":R(t)===`opened`}])},null,2)):q(``,!0)],8,[`to`])):q(``,!0),V(`div`,{class:`fixed-bg`,style:z({background:R(o).background.value})},null,4),Q(O),Q(oe),Q(se),Q(ce)]))}}}),[[`__scopeId`,`data-v-d25eaf46`]]);function hg(e,t){e.use(b({natsTransport:t.nats,target:t.target,wsTransport:t.ws})),e.use(De({natsTransport:t.nats,target:t.target,wsTransport:t.ws,workerBridge:ct(),workerRegistry:Ye}))}var gg=tn(),_g=En(kn,{primitive:{borderRadius:{none:`0`,xs:`2px`,sm:`4px`,md:`6px`,lg:`8px`,xl:`12px`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`},slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`}},semantic:{transitionDuration:`0.2s`,focusRing:{width:`1px`,style:`solid`,color:`{primary.color}`,offset:`2px`,shadow:`none`},disabledOpacity:`0.6`,iconSize:`1rem`,anchorGutter:`2px`,primary:{50:`#fdf4f6`,100:`#f7ccd4`,200:`#f1a3b2`,300:`#eb7b90`,400:`#e5526e`,500:`#df2a4c`,600:`#be2441`,700:`#9c1d35`,800:`#7b172a`,900:`#59111e`,950:`#380b13`},formField:{paddingX:`0.75rem`,paddingY:`0.5rem`,sm:{fontSize:`0.875rem`,paddingX:`0.625rem`,paddingY:`0.375rem`},lg:{fontSize:`1.125rem`,paddingX:`0.875rem`,paddingY:`0.625rem`},borderRadius:`{border.radius.md}`,focusRing:{width:`0`,style:`none`,color:`transparent`,offset:`0`,shadow:`none`},transitionDuration:`{transition.duration}`},list:{padding:`0.25rem 0.25rem`,gap:`2px`,header:{padding:`0.5rem 1rem 0.25rem 1rem`},option:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`},optionGroup:{padding:`0.5rem 0.75rem`,fontWeight:`600`}},content:{borderRadius:`{border.radius.md}`},mask:{transitionDuration:`0.15s`},navigation:{list:{padding:`0.25rem 0.25rem`,gap:`2px`},item:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`,gap:`0.5rem`},submenuLabel:{padding:`0.5rem 0.75rem`,fontWeight:`600`},submenuIcon:{size:`0.875rem`}},overlay:{select:{borderRadius:`{border.radius.md}`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},popover:{borderRadius:`{border.radius.md}`,padding:`0.75rem`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},modal:{borderRadius:`{border.radius.xl}`,padding:`1.25rem`,shadow:`0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)`},navigation:{shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}},colorScheme:{light:{surface:{0:`#ffffff`,50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,850:`#0f172a`,900:`#0f172a`,925:`#0c1421`,950:`#020617`,1e3:`#000000`},primary:{color:`{primary.500}`,contrastColor:`#ffffff`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`{primary.50}`,focusBackground:`{primary.100}`,color:`{primary.700}`,focusColor:`{primary.800}`},mask:{background:`rgba(0,0,0,0.4)`,color:`{surface.200}`},formField:{background:`{surface.50}`,disabledBackground:`{surface.200}`,filledBackground:`{surface.50}`,filledHoverBackground:`{surface.50}`,filledFocusBackground:`{surface.50}`,borderColor:`{surface.300}`,hoverBorderColor:`{surface.400}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.400}`,color:`{surface.700}`,disabledColor:`{surface.500}`,placeholderColor:`{surface.500}`,invalidPlaceholderColor:`{red.600}`,floatLabelColor:`{surface.500}`,floatLabelFocusColor:`{primary.600}`,floatLabelActiveColor:`{surface.500}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.700}`,hoverColor:`{surface.800}`,mutedColor:`{surface.500}`,hoverMutedColor:`{surface.600}`},content:{background:`{surface.0}`,hoverBackground:`{surface.100}`,borderColor:`{surface.200}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},popover:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},modal:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.100}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.100}`,activeBackground:`{surface.100}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}}},dark:{surface:{0:`#ffffff`,50:`#f5f5f5`,100:`#d1d1d1`,200:`#adadad`,300:`#898989`,400:`#646464`,500:`#404040`,600:`#363636`,700:`#2d2d2d`,800:`#232323`,850:`#1d1d1d`,900:`#1a1a1a`,925:`#161616`,950:`#101010`,1e3:`#0d0d0d`},primary:{color:`{primary.500}`,contrastColor:`{surface.900}`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`color-mix(in srgb, {primary.400}, transparent 84%)`,focusBackground:`color-mix(in srgb, {primary.400}, transparent 76%)`,color:`rgba(255,255,255,.87)`,focusColor:`rgba(255,255,255,.87)`},mask:{background:`rgba(0,0,0,0.6)`,color:`{surface.200}`},formField:{background:`{surface.925}`,disabledBackground:`{surface.700}`,filledBackground:`{surface.800}`,filledHoverBackground:`{surface.800}`,filledFocusBackground:`{surface.800}`,borderColor:`{surface.800}`,hoverBorderColor:`{surface.500}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.300}`,color:`{surface.0}`,disabledColor:`{surface.400}`,placeholderColor:`{surface.400}`,invalidPlaceholderColor:`{red.400}`,floatLabelColor:`{surface.400}`,floatLabelFocusColor:`{primary.color}`,floatLabelActiveColor:`{surface.400}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.0}`,hoverColor:`{surface.0}`,mutedColor:`{surface.400}`,hoverMutedColor:`{surface.300}`},content:{background:`{surface.900}`,hoverBackground:`{surface.800}`,borderColor:`{surface.700}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},popover:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},modal:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.800}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.800}`,activeBackground:`{surface.800}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}}}}}});function vg(e){nt(e)||ir.value||or.value||Ge().add({severity:`error`,detail:e,life:3e3})}function yg(){return{enableDevtoolsV6Plugin:!0,queryClientConfig:{defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!0,gcTime:300*1e3,staleTime:1e4,networkMode:`online`,retry:(e,t)=>bg(t)===401?!1:e<2?!0:(vg(t),!1)},mutations:{retry:0,networkMode:`online`,onError:vg}}}}}function bg(e){if(typeof e==`object`&&e&&`response`in e){let t=e.response;if(typeof t?.status==`number`)return t.status}}function xg(){return{theme:{preset:_g,options:{cssLayer:{name:`primevue`,order:`theme, base, primevue`},darkModeSelector:`.dark-mode`}}}}function Sg(e){e.directive(`tooltip`,vn).directive(`focustrap`,j),e.use(On).use(yn).use(Dn).use(un,xg()).use(Je).use(jt()).use(Pt,yg()).use(gg)}window.addEventListener(`vite:preloadError`,()=>{sessionStorage.getItem(`cui-chunk-reload`)||(sessionStorage.setItem(`cui-chunk-reload`,`1`),window.location.reload())});var{connection:Cg}=await ut({logger:new Fe(`Connection`)});ht();var wg=qt(mg),Tg=new Fe(`Vue`);wg.config.errorHandler=(e,t,n)=>Tg.error(`[${n}]`,e),Sg(wg),yi(Cg),hg(wg,Cg),wg.use(yr),Er().restoreActiveOverride();var Eg=await vi(Cg,{onUser:e=>ot().setUserFromLogin(e),onRedirectInfo:e=>{Er().redirectInfo=e},onReset:()=>{Er().activeId=null,qe.value=null}});wg.mount(`#app`),Eg||Cg.boot(`default`);
|