@camera.ui/server 0.0.113 → 0.0.117
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-CZtDF9in.js → 404-Boj4Vl-R.js} +1 -1
- package/dist/interface/assets/{About-BzuuHdW1.js → About-C555n8hm.js} +1 -1
- package/dist/interface/assets/{Adminpanel-uj7eTmlN.js → Adminpanel-CzhTcMyI.js} +1 -1
- package/dist/interface/assets/Automation-c-WoDz5p.js +2 -0
- package/dist/interface/assets/{AutomationImport-CR4Vsxkb.js → AutomationImport-TTsCdeBi.js} +2 -2
- package/dist/interface/assets/{AutomationStore-BcMX7WbG.js → AutomationStore-Dfv66tKr.js} +2 -2
- package/dist/interface/assets/{AutomationStoreDetail-D6Ugj8ba.js → AutomationStoreDetail-D6Kxd8qb.js} +2 -2
- package/dist/interface/assets/{Automations-DBACrYHy.js → Automations-B-Vx8ES0.js} +2 -2
- package/dist/interface/assets/{Camera-Cf4QZbsx.js → Camera-D9lOlctO.js} +2 -2
- package/dist/interface/assets/{CameraConsole-uD4aWou8.js → CameraConsole-D7INO7No.js} +1 -1
- package/dist/interface/assets/{Cameras-DbBU5mou.js → Cameras-CoS5FGgt.js} +2 -2
- package/dist/interface/assets/{Camview-CDM4Q_tc.css → Camview-CS2a2okQ.css} +1 -1
- package/dist/interface/assets/{Camview-DD9jLT7-.js → Camview-D9dWFP3P.js} +1 -1
- package/dist/interface/assets/{Config-B9jI0lTQ.js → Config-Bt-dYeu3.js} +1 -1
- package/dist/interface/assets/{ConfigActionCameraControl-D4hJLWmj.js → ConfigActionCameraControl-BG6SX9R7.js} +1 -1
- package/dist/interface/assets/{ConfigActionDelay-DOUAx4lh.js → ConfigActionDelay-aDgo-kGM.js} +1 -1
- package/dist/interface/assets/{ConfigActionHttp-BGz4r_Nr.js → ConfigActionHttp-CO5QD14x.js} +1 -1
- package/dist/interface/assets/{ConfigActionImageInput-BhO3ekJT.js → ConfigActionImageInput-DapP_uBr.js} +1 -1
- package/dist/interface/assets/{ConfigActionNotification-B5cCmBXr.js → ConfigActionNotification-BTO9Mcqc.js} +1 -1
- package/dist/interface/assets/{ConfigActionOutput-P0WY0DlF.js → ConfigActionOutput-CXJ03zBN.js} +1 -1
- package/dist/interface/assets/{ConfigActionPlugin-B7YAbFlf.js → ConfigActionPlugin-BddeoS5Q.js} +1 -1
- package/dist/interface/assets/{ConfigActionSensor-D_Dt1qtt.js → ConfigActionSensor-Bs4CS6z9.js} +1 -1
- package/dist/interface/assets/{ConfigActionSnapshot-ClyCQuB3.js → ConfigActionSnapshot-Ba5eeeDx.js} +1 -1
- package/dist/interface/assets/{ConfigActionVariable-B2BoiQPb.js → ConfigActionVariable-CtDsvCYd.js} +1 -1
- package/dist/interface/assets/{ConfigConditionIfElse-Bhd2FYyz.js → ConfigConditionIfElse-4vRtS2gU.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSensorState-x0M0kHwL.js → ConfigConditionSensorState-DXsn0AoB.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSwitch-CC0w-Hvy.js → ConfigConditionSwitch-BAAlXCNL.js} +1 -1
- package/dist/interface/assets/{ConfigConditionTime-lhWiIy2x.js → ConfigConditionTime-CbGe7r2f.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerDetection-DWjlecON.js → ConfigTriggerDetection-CUvVQzWC.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerGeofence-CTqptMUN.js → ConfigTriggerGeofence-C8JI5HfV.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerManual-ChsUsNCK.js → ConfigTriggerManual-CHe56Uwq.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSchedule-CE47WiIV.js → ConfigTriggerSchedule-CfYWEMEa.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSensor-DuCtavZo.js → ConfigTriggerSensor-CxfydqlA.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSystem-D1oGAhLn.js → ConfigTriggerSystem-CKY5ikOU.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerWebhook-D3cHvW8H.js → ConfigTriggerWebhook-B38CUm9k.js} +1 -1
- package/dist/interface/assets/Console-iQYK1wv3.js +1 -0
- package/dist/interface/assets/{CuiActionButton-Bl7gqhIV.js → CuiActionButton-_24B3o_r.js} +1 -1
- package/dist/interface/assets/{CuiAvatar-of_eVQsv.js → CuiAvatar-Dq7tZWI5.js} +1 -1
- package/dist/interface/assets/{CuiBBoxPlayground-CIU5kteO.js → CuiBBoxPlayground-wkKhVNXF.js} +1 -1
- package/dist/interface/assets/CuiBottomSheet-BCwkNHr0.js +1 -0
- package/dist/interface/assets/{CuiBottomSheet-B7aQ7GCw.js → CuiBottomSheet-CmcHyY52.js} +1 -1
- package/dist/interface/assets/CuiCameraCard-Cjltc6jX.js +1 -0
- package/dist/interface/assets/{CuiCameraPipCard-KUBxGPoU.js → CuiCameraPipCard-Fqb-8bT0.js} +1 -1
- package/dist/interface/assets/CuiCameraRecordings-8rROz71S.js +1 -0
- package/dist/interface/assets/{CuiCameraShares-BCMYN11A.js → CuiCameraShares-CVqgvvb9.js} +1 -1
- package/dist/interface/assets/{CuiCameraSnapshot-DTtvEMy1.js → CuiCameraSnapshot-CDqd-Ncv.js} +1 -1
- package/dist/interface/assets/{CuiCameraTable-B7g53tPM.js → CuiCameraTable-CZI750xd.js} +1 -1
- package/dist/interface/assets/CuiDataTable-N4GSbqxH.js +1 -0
- package/dist/interface/assets/CuiDataTable-W68cyoLf.css +1 -0
- package/dist/interface/assets/{CuiFloatingButton-B5YMdr0X.js → CuiFloatingButton-PyVdoOUT.js} +1 -1
- package/dist/interface/assets/{CuiImage-B97QDAl7.js → CuiImage-kthY6BIz.js} +1 -1
- package/dist/interface/assets/{CuiMenu-Ds6GufVn.js → CuiMenu-9X-MfyCk.js} +1 -1
- package/dist/interface/assets/{CuiPluginCard-D1SylQbM.js → CuiPluginCard-CN3TW6AC.js} +2 -2
- package/dist/interface/assets/CuiPluginCategoryChip-CwNmRXlc.js +1 -0
- package/dist/interface/assets/{CuiPluginOAuthButton-X8ZGFPwW.js → CuiPluginOAuthButton-BBHNQ3Jp.js} +2 -2
- package/dist/interface/assets/{CuiPluginTrustBadge-YhfqGTyR.js → CuiPluginTrustBadge-DX-P6_uN.js} +1 -1
- package/dist/interface/assets/{CuiQRCode-D_31ri5b.js → CuiQRCode-C6O_MBni.js} +1 -1
- package/dist/interface/assets/{CuiRecordingsGrid-CzMzhUXb.js → CuiRecordingsGrid-CwKCU5_u.js} +1 -1
- package/dist/interface/assets/{CuiSchema-CfqOJmDH.js → CuiSchema-VI2Luf-k.js} +1 -1
- package/dist/interface/assets/{CuiTopNavbarItem-Q7M4nMw5.js → CuiTopNavbarItem-Ds70WyHx.js} +1 -1
- package/dist/interface/assets/{CuiTopbarSlot-ac4GLLbf.js → CuiTopbarSlot-B9Et-Pj7.js} +1 -1
- package/dist/interface/assets/{Faces-IVmqcGuF.js → Faces-lzakFq5o.js} +1 -1
- package/dist/interface/assets/{FirstSteps-Boec1bzd.js → FirstSteps-Bqmgm_iz.js} +1 -1
- package/dist/interface/assets/{Instances-kmkRiBrV.js → Instances-qk8oD08W.js} +1 -1
- package/dist/interface/assets/{Logs-DzR8mmLu.js → Logs-72k5RAn7.js} +1 -1
- package/dist/interface/assets/{Menu-Cl-biyd7.js → Menu-1_PvQcZH.js} +1 -1
- package/dist/interface/assets/{OAuthDeviceFlow-Cp9uZWm1.js → OAuthDeviceFlow-DuZPGhPb.js} +1 -1
- package/dist/interface/assets/Plugin-CoIr19GV.js +1 -0
- package/dist/interface/assets/Plugin-DHhrlRqP.css +1 -0
- package/dist/interface/assets/{PluginConsole-BdbmROpF.js → PluginConsole-CnqDVu4K.js} +1 -1
- package/dist/interface/assets/PluginDetail-BSao1Bk3.js +2 -0
- package/dist/interface/assets/PluginDetail-L1Vtmr5x.css +1 -0
- package/dist/interface/assets/{PluginSchema-CWcq67pj.js → PluginSchema-BNB_PpKf.js} +1 -1
- package/dist/interface/assets/PluginSearch-Cq0r9Usy.js +2 -0
- package/dist/interface/assets/{PluginSearch-XjGr5qdW.css → PluginSearch-NuKgD1r3.css} +1 -1
- package/dist/interface/assets/PluginSearch-ZRpBJ3RH.js +1 -0
- package/dist/interface/assets/{Plugins-DMLQY_6J.js → Plugins-Bm0cyXcG.js} +1 -1
- package/dist/interface/assets/Recordings-BArCkOPF.js +1 -0
- package/dist/interface/assets/{Settings-BljKDhYY.js → Settings-CcwljkEU.js} +1 -1
- package/dist/interface/assets/SettingsAccount-UGedhV9S.js +1 -0
- package/dist/interface/assets/{SettingsAccount-DKHO4mDj.js → SettingsAccount-g0Xg9CEA.js} +1 -1
- package/dist/interface/assets/{SettingsAppearance-V5aeQ9c8.js → SettingsAppearance-D7vpw4Pf.js} +1 -1
- package/dist/interface/assets/SettingsAppearance-dUmIIO1_.js +1 -0
- package/dist/interface/assets/SettingsBackup-DDMNMyGv.js +1 -0
- package/dist/interface/assets/{SettingsNotifications-BZ1IXj0a.js → SettingsNotifications-DHXDTw47.js} +1 -1
- package/dist/interface/assets/{SettingsRecordings-BsJ9z-RE.js → SettingsRecordings-B8pVTT97.js} +1 -1
- package/dist/interface/assets/{SettingsRemote-Bf8bqXYs.js → SettingsRemote-Cm72h9O2.js} +1 -1
- package/dist/interface/assets/{SettingsSystem-obAYrm8J.js → SettingsSystem-IU5zzJ8r.js} +2 -2
- package/dist/interface/assets/{SettingsUsers-Ciu1ry18.js → SettingsUsers-Wgu60ci9.js} +1 -1
- package/dist/interface/assets/{Terminal-CD9he5xW.js → Terminal-D1CRBDlt.js} +1 -1
- package/dist/interface/assets/{VariableInput-CFs-kzqd.js → VariableInput-D5330Mfo.js} +1 -1
- package/dist/interface/assets/{VariableSuggestions-PEzupqiE.js → VariableSuggestions-BYRGZZhC.js} +1 -1
- package/dist/interface/assets/VersionsHandler-hDdaLt6c.js +7 -0
- package/dist/interface/assets/Workers-De7GyYLY.js +2 -0
- package/dist/interface/assets/{Workers-DCx1wSq5.css → Workers-E6LM_yAl.css} +1 -1
- package/dist/interface/assets/api-CEmKJS_k.js +2 -0
- package/dist/interface/assets/{api-CbBOEbKQ.js → api-CniTJ7zF.js} +1 -1
- package/dist/interface/assets/api-D7tGlI-z.css +2 -0
- package/dist/interface/assets/{auth-cdPNNpNC.js → auth-XrGrvKJw.js} +1 -1
- package/dist/interface/assets/{automations-E7vwN3kw.js → automations-BTNkOZVN.js} +1 -1
- package/dist/interface/assets/{automations-C309DNNg.js → automations-DBL-AVqV.js} +1 -1
- package/dist/interface/assets/backup-DCACCZlp.js +1 -0
- package/dist/interface/assets/{cameras-CvJDLEZ3.js → cameras-BU1ZCguU.js} +1 -1
- package/dist/interface/assets/{cameras.schema-Clwro_L9.js → cameras.schema-xccbs98C.js} +1 -1
- package/dist/interface/assets/cloudHandoff-l8EehWAq.js +1 -0
- package/dist/interface/assets/{lightbulb-outline-B0CFho4y.js → cog-outline-DUNHSyxs.js} +1 -1
- package/dist/interface/assets/{deviceId-OXLTtG-_.js → deviceId-BDIV3wVa.js} +1 -1
- package/dist/interface/assets/download-D5N3Bjsy.js +1 -0
- package/dist/interface/assets/{hasPermission-P1TgpAur.js → hasPermission-Dt66r7m6.js} +1 -1
- package/dist/interface/assets/{instances-DwnEOXk1.js → instances-Cm2uvc3I.js} +1 -1
- package/dist/interface/assets/lightbulb-outline-CSHur8g1.js +1 -0
- package/dist/interface/assets/{locale-BWvy9Nlz.js → locale-DHFGj38b.js} +1 -1
- package/dist/interface/assets/main-BpXAVhDw.js +3 -0
- package/dist/interface/assets/{main-DudyqPaR.css → main-DYLy_5Pn.css} +1 -1
- package/dist/interface/assets/nodeDefinitions-BvHN6Rgq.js +1 -0
- package/dist/interface/assets/{notifications-DHmx6O_s.js → notifications-CcPAq-AU.js} +1 -1
- package/dist/interface/assets/{plugins-NVAodP6s.js → plugins-Byvz--5u.js} +1 -1
- package/dist/interface/assets/round-restart-alt-BhSxsPhN.css +1 -0
- package/dist/interface/assets/{round-restart-alt-c8MQjhLh.js → round-restart-alt-wY5ZWF_I.js} +1 -1
- package/dist/interface/assets/router-BI5yR4wx.js +2 -0
- package/dist/interface/assets/{router-BUTKN1yM.css → router-qrIK2v9X.css} +1 -1
- package/dist/interface/assets/{routerState-dQtObsFs.js → routerState-1OSE3RrK.js} +1 -1
- package/dist/interface/assets/{server-CRxodRik.js → server-BZ6moxcL.js} +1 -1
- package/dist/interface/assets/{shares-4w6GDwjp.js → shares-Dnb9ln4i.js} +1 -1
- package/dist/interface/assets/{theme-DhaXe7yA.js → theme-CMPHpEel.js} +1 -1
- package/dist/interface/assets/{types-6RvFwckU.js → types-CxqXp8-9.js} +1 -1
- package/dist/interface/assets/types-Dhfpp18Q.js +1 -0
- package/dist/interface/assets/{ui-DrzKhUXW.js → ui-DoqHmuEp.js} +1 -1
- package/dist/interface/assets/{useBiometricCredentials-BGRyKe48.js → useBiometricCredentials-D0zMU6nI.js} +1 -1
- package/dist/interface/assets/{useCameraOptions-CO1HD_gL.js → useCameraOptions-ICvT3348.js} +1 -1
- package/dist/interface/assets/{useCuiCameraDrawer-DnN9lwiy.js → useCuiCameraDrawer-Cz6XoSl4.js} +1 -1
- package/dist/interface/assets/{useCuiDialog-DHktK-mZ.js → useCuiDialog-D3TnoSLA.js} +1 -1
- package/dist/interface/assets/{useFileDownload-Cp1oH80I.js → useFileDownload-s0dzBJ-h.js} +1 -1
- package/dist/interface/assets/{useLogsSocket-OnTDnkPr.js → useLogsSocket-GhBHm7PL.js} +1 -1
- package/dist/interface/assets/{useSharedComposables-gpJ--qZh.js → useSharedComposables-BwzJuqID.js} +1 -1
- package/dist/interface/assets/{useStreamStatus-N--czepD.js → useStreamStatus-DffcpWzm.js} +1 -1
- package/dist/interface/assets/{useUserOptions-CPkl1O0A.js → useUserOptions-Cvb_O9Oh.js} +1 -1
- package/dist/interface/assets/{users.schema-BIL9DqRo.js → users.schema-Csh8aGMQ.js} +1 -1
- package/dist/interface/assets/{vendor-cameraui-DgSMexWY.js → vendor-cameraui-DQVBM-Sz.js} +38 -38
- package/dist/interface/assets/{vendor-core-BKHiXSX7.js → vendor-core-C5n49w0D.js} +1 -1
- package/dist/interface/assets/{vendor-primevue-7iEzPOvf.js → vendor-primevue-CCUVk9_F.js} +1 -1
- package/dist/interface/assets/{view-grid-B0KB2pRf.js → view-grid-CK2x8Wqf.js} +1 -1
- package/dist/interface/index.html +46 -45
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +3 -3
- package/dist/server/requirements.txt +1 -1
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/frames.py +3 -1
- package/dist/server/src/api/controllers/backup.controller.d.ts +7 -1
- package/dist/server/src/api/controllers/backup.controller.js +65 -1
- package/dist/server/src/api/controllers/backup.controller.js.map +1 -1
- package/dist/server/src/api/database/index.d.ts +1 -1
- package/dist/server/src/api/database/index.js +5 -5
- package/dist/server/src/api/database/index.js.map +1 -1
- package/dist/server/src/api/database/types.d.ts +18 -0
- package/dist/server/src/api/routes/backup.routes.js +54 -1
- package/dist/server/src/api/routes/backup.routes.js.map +1 -1
- package/dist/server/src/api/schemas/backup.schema.d.ts +28 -25
- package/dist/server/src/api/schemas/backup.schema.js +23 -60
- package/dist/server/src/api/schemas/backup.schema.js.map +1 -1
- package/dist/server/src/api/schemas/cameras.schema.d.ts +8 -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/services/backup.service.d.ts +1 -1
- package/dist/server/src/api/services/backup.service.js +2 -1
- package/dist/server/src/api/services/backup.service.js.map +1 -1
- package/dist/server/src/api/services/backupScheduler.service.d.ts +31 -0
- package/dist/server/src/api/services/backupScheduler.service.js +203 -0
- package/dist/server/src/api/services/backupScheduler.service.js.map +1 -0
- package/dist/server/src/api/types/index.d.ts +7 -1
- package/dist/server/src/api/websocket/nsp/notifications.js +3 -3
- package/dist/server/src/api/websocket/nsp/notifications.js.map +1 -1
- package/dist/server/src/camera/decoder/detection-coordinator.d.ts +13 -1
- package/dist/server/src/camera/decoder/detection-coordinator.js +242 -242
- package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
- package/dist/server/src/camera/decoder/event-manager.js +41 -18
- package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
- package/dist/server/src/camera/decoder/frame-scaler.d.ts +1 -0
- package/dist/server/src/camera/decoder/frame-scaler.js +2 -2
- package/dist/server/src/camera/decoder/frame-scaler.js.map +1 -1
- package/dist/server/src/camera/decoder/frame-source.js +2 -1
- package/dist/server/src/camera/decoder/frame-source.js.map +1 -1
- package/dist/server/src/camera/decoder/snapshot-source.d.ts +49 -0
- package/dist/server/src/camera/decoder/snapshot-source.js +279 -0
- package/dist/server/src/camera/decoder/snapshot-source.js.map +1 -0
- package/dist/server/src/camera/decoder/worker.d.ts +1 -0
- package/dist/server/src/camera/decoder/worker.js +27 -4
- package/dist/server/src/camera/decoder/worker.js.map +1 -1
- package/dist/server/src/go2rtc/index.js +3 -2
- package/dist/server/src/go2rtc/index.js.map +1 -1
- package/dist/server/src/main.d.ts +1 -0
- package/dist/server/src/main.js +11 -0
- package/dist/server/src/main.js.map +1 -1
- package/dist/server/src/manager/downloadManager.js +2 -2
- package/dist/server/src/manager/downloadManager.js.map +1 -1
- package/dist/server/src/plugins/runtime/python/child.py +11 -0
- package/dist/server/src/plugins/runtime/python/namespaces.py +4 -0
- package/dist/server/src/plugins/runtime/python/proxy/download_manager.py +12 -2
- package/dist/server/src/plugins/runtime/python/proxy/file_serve.py +49 -0
- package/dist/server/src/plugins/worker.js +14 -4
- package/dist/server/src/plugins/worker.js.map +1 -1
- package/dist/server/src/remote/tunnel/client.js +3 -2
- package/dist/server/src/remote/tunnel/client.js.map +1 -1
- package/dist/server/src/rpc/server.d.ts +0 -1
- package/dist/server/src/rpc/server.js +8 -7
- package/dist/server/src/rpc/server.js.map +1 -1
- package/dist/server/src/shutdown-state.d.ts +3 -0
- package/dist/server/src/shutdown-state.js +11 -0
- package/dist/server/src/shutdown-state.js.map +1 -0
- package/dist/server/src/workers/agent.js +4 -4
- package/dist/server/src/workers/agent.js.map +1 -1
- package/dist/server/src/workers/capabilities/plugin-host.js +5 -4
- package/dist/server/src/workers/capabilities/plugin-host.js.map +1 -1
- package/package.json +3 -3
- package/dist/interface/assets/Automation-D0ps_z9e.js +0 -2
- package/dist/interface/assets/Console-DrDqDUtO.js +0 -1
- package/dist/interface/assets/CuiBottomSheet-DKUg_g5x.js +0 -1
- package/dist/interface/assets/CuiCameraCard-IyJNZMGs.js +0 -1
- package/dist/interface/assets/CuiCameraRecordings-iWAFGo8e.js +0 -1
- package/dist/interface/assets/CuiDataTable-DWuXg9Zg.css +0 -1
- package/dist/interface/assets/CuiDataTable-saRt0sBc.js +0 -1
- package/dist/interface/assets/CuiPluginCategoryChip-rfdhCEi-.js +0 -1
- package/dist/interface/assets/Plugin-CeLrucXT.js +0 -1
- package/dist/interface/assets/Plugin-Yv0ZmTNZ.css +0 -1
- package/dist/interface/assets/PluginDetail-DKywYzmS.js +0 -2
- package/dist/interface/assets/PluginDetail-DbYxVe3g.css +0 -1
- package/dist/interface/assets/PluginSearch-BC1L0-VN.js +0 -1
- package/dist/interface/assets/PluginSearch-DCuLwE3v.js +0 -2
- package/dist/interface/assets/Recordings--XaVJZJi.js +0 -1
- package/dist/interface/assets/SettingsAccount-DFMOh1ci.js +0 -1
- package/dist/interface/assets/SettingsAppearance-DzG2tlwK.js +0 -1
- package/dist/interface/assets/SettingsBackup-CfOHDar8.js +0 -1
- package/dist/interface/assets/VersionsHandler-Dpo-L314.js +0 -7
- package/dist/interface/assets/Workers-DiIBLgfr.js +0 -2
- package/dist/interface/assets/api-aSYFKxo6.js +0 -2
- package/dist/interface/assets/api-vCJ1T8Ow.css +0 -2
- package/dist/interface/assets/backup-Co1bwdSv.js +0 -1
- package/dist/interface/assets/cloudHandoff-Bym-XqR1.js +0 -1
- package/dist/interface/assets/main-CIorSaV7.js +0 -3
- package/dist/interface/assets/nodeDefinitions-Dvawtk76.js +0 -1
- package/dist/interface/assets/round-restart-alt-fCNtJi_k.css +0 -1
- package/dist/interface/assets/router-i0r3QZvk.js +0 -2
- package/dist/interface/assets/types-BXo-JDGR.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{Cn as t,Dn as n,Dt as r,Et as i,Ft as a,G as o,H as s,Hn as c,Ht as l,Kt as u,Lt as ee,Mi as te,Nt as d,Pt as ne,Q as f,Qt as p,Rt as m,Si as re,Sn as h,Ti as g,Tt as _,Ut as v,Vn as ie,Vt as ae,Xt as y,Y as b,Yi as oe,_t as se,an as x,bt as ce,cn as S,ct as le,dn as ue,fi as de,fn as fe,ft as pe,gi as me,gn as he,gt as ge,in as _e,jt as ve,kt as C,mn as ye,mt as w,nn as be,on as xe,pt as Se,q as Ce,rn as we,sn as Te,tn as Ee,tt as De,vi as Oe,vn as ke,vt as Ae,wt as je,xi as Me,xn as Ne,xt as Pe,zt as Fe}from"./vendor-cameraui-DgSMexWY.js";import{A as Ie,S as Le,a as Re,f as ze,m as Be}from"./api-aSYFKxo6.js";import{$n as T,$t as Ve,B as He,Cr as E,En as Ue,Er as D,Fn as We,Ln as Ge,Nn as Ke,On as qe,Pn as Je,Rn as Ye,Sr as O,Tr as k,Vn as Xe,Yn as Ze,Zn as Qe,_n as $e,_r as et,an as tt,br as nt,dn as A,en as rt,fn as j,fr as it,gn as at,jn as ot,kn as st,lr as ct,mn as M,mr as N,nn as lt,nr as P,on as F,pn as I,rn as ut,rr as dt,un as L,ur as R,vn as ft,xn as z,yn as B,zn as V}from"./vendor-DoIl6acN.js";import{f as pt,l as mt,r as ht,t as gt}from"./vendor-core-BKHiXSX7.js";import{t as _t}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{a as vt,r as yt,t as bt}from"./useSharedComposables-gpJ--qZh.js";import{t as xt}from"./close-DuwOOM-P.js";import{B as St,G as Ct,H as wt,J as Tt,L as H,R as Et,U as Dt,V as Ot,W as kt,j as At,z as jt}from"./vendor-primevue-7iEzPOvf.js";import{t as Mt}from"./cog-Ce2a8uiA.js";import{n as Nt,t as Pt}from"./lightbulb-outline-B0CFho4y.js";import{t as Ft}from"./useFileDownload-Cp1oH80I.js";import{t as It}from"./CuiCameraSnapshot-DTtvEMy1.js";import{t as Lt}from"./hasPermission-P1TgpAur.js";import{n as Rt,t as zt}from"./types-ByBSoibP.js";import{n as Bt,t as Vt}from"./CuiMenu-Ds6GufVn.js";import{t as Ht}from"./play-solid-BOoBnMaN.js";import{t as Ut}from"./CuiBBoxPlayground-CIU5kteO.js";import{t as Wt}from"./shield-check-ChlSHOnR.js";import{t as Gt}from"./motion-sensor-DD8SfD-m.js";import{t as Kt}from"./vendor-draggabilly-Dl6FWJwx.js";import{i as qt,t as Jt}from"./cameras-CvJDLEZ3.js";import{t as Yt}from"./CuiActionButton-Bl7gqhIV.js";import{t as Xt}from"./copy-16-filled-CZzRMAt_.js";import{t as Zt}from"./shares-4w6GDwjp.js";import{n as Qt}from"./useCuiCameraDrawer-DnN9lwiy.js";import{t as $t}from"./useCuiDialog-DHktK-mZ.js";var en={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function U(e,t){return V(),M(`svg`,en,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 17a2 2 0 0 0 2-2a2 2 0 0 0-2-2a2 2 0 0 0-2 2a2 2 0 0 0 2 2m6-9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h1V6a5 5 0 0 1 5-5a5 5 0 0 1 5 5v2zm-6-5a3 3 0 0 0-3 3v2h6V6a3 3 0 0 0-3-3`},null,-1)]])}var tn=R({name:`mdi-lock`,render:U}),nn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function rn(e,t){return V(),M(`svg`,nn,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M4 19v-9q0-.475.213-.9t.587-.7l6-4.5q.525-.4 1.2-.4t1.2.4l6 4.5q.375.275.588.7T20 10v9q0 .825-.588 1.413T18 21h-3q-.425 0-.712-.288T14 20v-5q0-.425-.288-.712T13 14h-2q-.425 0-.712.288T10 15v5q0 .425-.288.713T9 21H6q-.825 0-1.412-.587T4 19`},null,-1)]])}var W=R({name:`material-symbols-home-rounded`,render:rn}),an={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function G(e,t){return V(),M(`svg`,an,[...t[0]||=[A(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M18 2.75a.75.75 0 0 1 0-1.5h4a.75.75 0 0 1 .53 1.28l-2.72 2.72H22a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1-.53-1.28l2.72-2.72zm-4.5 6a.75.75 0 0 1 0-1.5h3a.75.75 0 0 1 .53 1.28l-1.72 1.72h1.19a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1-.53-1.28l1.72-1.72z`,"clip-rule":`evenodd`},null,-1),A(`path`,{fill:`currentColor`,d:`M12 22c5.523 0 10-4.477 10-10c0-.463-.694-.54-.933-.143a6.5 6.5 0 1 1-8.924-8.924C12.54 2.693 12.463 2 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10`},null,-1)]])}var on=R({name:`solar-moon-sleep-bold`,render:G}),K={viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`};function sn(e,t){return V(),M(`svg`,K,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`m20.923 22.337l7.37 7.37a1 1 0 0 0 1.414-1.414l-26-26a1 1 0 0 0-1.414 1.414L4.884 6.3A4.5 4.5 0 0 0 2 10.5v11A4.5 4.5 0 0 0 6.5 26h10c2.2 0 4.03-1.578 4.423-3.663m1.577-3.374l5.52 5.519c1.056-.134 1.976-1.017 1.976-2.236V9.754c0-1.814-2.036-2.882-3.528-1.852l-3.968 2.74zM9.537 6L21 17.463V10.5A4.5 4.5 0 0 0 16.5 6z`},null,-1)]])}var cn=R({name:`fluent-video-off32-filled`,render:sn}),ln={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function un(e,t){return V(),M(`svg`,ln,[...t[0]||=[A(`g`,{fill:`none`},[A(`path`,{d:`m12.594 23.258l-.012.002l-.071.035l-.02.004l-.014-.004l-.071-.036q-.016-.004-.024.006l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.016-.018m.264-.113l-.014.002l-.184.093l-.01.01l-.003.011l.018.43l.005.012l.008.008l.201.092q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.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.003-.011l.018-.43l-.003-.012l-.01-.01z`}),A(`path`,{fill:`currentColor`,d:`M13 4a1 1 0 1 0-2 0v17a1 1 0 1 0 2 0zM7 4h3v5H7a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m-2 6h5v5H5a2 2 0 0 1-2-2v-1a2 2 0 0 1 2-2m9 0v5h2a2 2 0 0 0 2-2v-1a2 2 0 0 0-2-2zm-6 6h2v5H8a2 2 0 0 1-2-2v-1a2 2 0 0 1 2-2m6 0v5h5a2 2 0 0 0 2-2v-1a2 2 0 0 0-2-2zm0-12v5h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z`})],-1)]])}var dn=R({name:`mingcute-timeline-fill`,render:un}),fn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function q(e,t){return V(),M(`svg`,fn,[...t[0]||=[A(`g`,{fill:`none`},[A(`path`,{d:`m12.594 23.258l-.012.002l-.071.035l-.02.004l-.014-.004l-.071-.036q-.016-.004-.024.006l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.016-.018m.264-.113l-.014.002l-.184.093l-.01.01l-.003.011l.018.43l.005.012l.008.008l.201.092q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.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.003-.011l.018-.43l-.003-.012l-.01-.01z`}),A(`path`,{fill:`currentColor`,d:`M13 4a1 1 0 1 0-2 0v17a1 1 0 1 0 2 0zM7 4h3v2H7v1h3v2H7a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m11 3h-4v2h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4v2h4zm-8 3H5a2 2 0 0 0-2 2v1a2 2 0 0 0 2 2h5v-2H5v-1h5zm4 0v2h2v1h-2v2h2a2 2 0 0 0 2-2v-1a2 2 0 0 0-2-2zm-4 6H8a2 2 0 0 0-2 2v1a2 2 0 0 0 2 2h2v-2H8v-1h2zm4 0v2h5v1h-5v2h5a2 2 0 0 0 2-2v-1a2 2 0 0 0-2-2z`})],-1)]])}var pn=R({name:`mingcute-timeline-line`,render:q}),mn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function hn(e,t){return V(),M(`svg`,mn,[...t[0]||=[$e(`<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="7" height="7" x="3" y="3" rx="1"></rect><rect width="7" height="7" x="14" y="3" rx="1"></rect><rect width="7" height="7" x="14" y="14" rx="1"></rect><rect width="7" height="7" x="3" y="14" rx="1"></rect></g>`,1)]])}var gn=R({name:`lucide-layout-grid`,render:hn}),_n={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function vn(e,t){return V(),M(`svg`,_n,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])}var yn=R({name:`lucide-check`,render:vn}),bn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function xn(e,t){return V(),M(`svg`,bn,[...t[0]||=[A(`g`,{fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[A(`path`,{d:`M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z`}),A(`circle`,{cx:`12`,cy:`12`,r:`4`})],-1)]])}var Sn=R({name:`solar-camera-square-linear`,render:xn}),Cn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function wn(e,t){return V(),M(`svg`,Cn,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M19 11h-8v6h8zm4 8V5c0-1.12-.9-2-2-2H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2m-2 0H3V4.97h18z`},null,-1)]])}var Tn=R({name:`mdi-picture-in-picture-bottom-right`,render:wn}),En={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Dn(e,t){return V(),M(`svg`,En,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M3 12a3 3 0 1 0 6 0a3 3 0 1 0-6 0m12-6a3 3 0 1 0 6 0a3 3 0 1 0-6 0m0 12a3 3 0 1 0 6 0a3 3 0 1 0-6 0m-6.3-7.3l6.6-3.4m-6.6 6l6.6 3.4`},null,-1)]])}var On=R({name:`tabler-share`,render:Dn}),kn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function An(e,t){return V(),M(`svg`,kn,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-width":`2`,d:`M8.5 5.5L12 2l3.5 3.5M22 12H2m3.5-3.5L2 12l3.5 3.5m13 0L22 12l-3.5-3.5M12 22V2M8.5 18.5L12 22l3.5-3.5`},null,-1)]])}var jn=R({name:`grommet-icons-pan`,render:An}),Mn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Nn(e,t){return V(),M(`svg`,Mn,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`m8.471 7.237l3.056 12.992c.233.993 1.63 1.04 1.929.065l2.945-9.58l.384 1.527a1 1 0 0 0 .97.756H21a1 1 0 1 0 0-2h-2.466l-1.069-4.241c-.247-.981-1.628-1.017-1.925-.05l-2.912 9.472L9.475 2.771c-.24-1.02-1.688-1.03-1.943-.014l-2.065 8.24H3a1 1 0 0 0 0 2h3.247a1 1 0 0 0 .97-.757z`},null,-1)]])}var Pn=R({name:`fluent-pulse24-filled`,render:Nn}),Fn={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`};function In(e,t){return V(),M(`svg`,Fn,[...t[0]||=[A(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linejoin":`round`,"stroke-width":`4`},[A(`path`,{fill:`currentColor`,d:`M16.866 7.47A18 18 0 0 0 16 13c0 9.941 8.059 18 18 18a17.9 17.9 0 0 0 7.134-1.47C38.801 36.767 32.012 42 24 42c-9.941 0-18-8.059-18-18c0-7.407 4.473-13.768 10.866-16.53Z`}),A(`path`,{"stroke-linecap":`round`,d:`M31.66 10H41l-10 8h10`})],-1)]])}var Ln=R({name:`icon-park-solid-sleep`,render:In}),Rn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function zn(e,t){return V(),M(`svg`,Rn,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 2a7 7 0 0 1 7 7a7 7 0 0 1-7 7a7 7 0 0 1-7-7a7 7 0 0 1 7-7m0 2a5 5 0 0 0-5 5a5 5 0 0 0 5 5a5 5 0 0 0 5-5a5 5 0 0 0-5-5m0 2a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3M6 22a2 2 0 0 1-2-2c0-.38.1-.73.29-1.03l1.82-3.16A9 9 0 0 0 12 18c2.25 0 4.31-.83 5.89-2.19l1.82 3.16c.19.3.29.65.29 1.03a2 2 0 0 1-2 2z`},null,-1)]])}var Bn=R({name:`mdi-webcam`,render:zn}),Vn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Hn(e,t){return V(),M(`svg`,Vn,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 .36A5.4 5.4 0 0 0 6.62 5.3a5.4 5.4 0 0 0-1.22-.14a5.4 5.4 0 0 0-2.143 10.357a5.4 5.4 0 0 0-.737 2.723a5.4 5.4 0 0 0 9.54 3.466a5.4 5.4 0 0 0 8.833-6.137a5.4 5.4 0 0 0-3.505-10.152A5.4 5.4 0 0 0 12 .36M6.283 7.228h10.592c.746 0 1.352.605 1.352 1.349v7.646a1.35 1.35 0 0 1-1.352 1.348h-3.608l-7.24 3.55l1.1-3.55h-.844a1.35 1.35 0 0 1-1.352-1.348V8.577c0-.744.606-1.349 1.352-1.349`},null,-1)]])}var Un=R({name:`simple-icons-webrtc`,render:Hn}),Wn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Gn(e,t){return V(),M(`svg`,Wn,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M17.41 2H6.59A4.58 4.58 0 0 0 2 6.59v10.82A4.58 4.58 0 0 0 6.59 22h10.82A4.58 4.58 0 0 0 22 17.41V6.59A4.58 4.58 0 0 0 17.41 2m-2.653 12.447a1.924 1.924 0 0 1-1.924 1.923h-5.86a1.924 1.924 0 0 1-1.923-1.923v-4.87a1.923 1.923 0 0 1 1.927-1.924h5.856a1.925 1.925 0 0 1 1.924 1.924Zm4.2.74a.771.771 0 0 1-1.266.59l-2.211-1.854a.85.85 0 0 1-.3-.653v-2.52a.85.85 0 0 1 .31-.657l2.206-1.82a.769.769 0 0 1 1.26.594Z`},null,-1)]])}var Kn=R({name:`cbi-iosfacetime`,render:Gn}),qn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Jn(e,t){return V(),M(`svg`,qn,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M9.367 2.25h5.266c1.092 0 1.958 0 2.655.057c.714.058 1.317.18 1.869.46a4.75 4.75 0 0 1 2.075 2.077c.281.55.403 1.154.461 1.868c.057.697.057 1.563.057 2.655v5.266c0 1.092 0 1.958-.057 2.655c-.058.714-.18 1.317-.46 1.869a4.75 4.75 0 0 1-2.076 2.075c-.552.281-1.155.403-1.869.461c-.697.057-1.563.057-2.655.057H9.367c-1.092 0-1.958 0-2.655-.057c-.714-.058-1.317-.18-1.868-.46a4.75 4.75 0 0 1-2.076-2.076c-.281-.552-.403-1.155-.461-1.869c-.057-.697-.057-1.563-.057-2.655V9.367c0-1.092 0-1.958.057-2.655c.058-.714.18-1.317.46-1.868a4.75 4.75 0 0 1 2.077-2.076c.55-.281 1.154-.403 1.868-.461c.697-.057 1.563-.057 2.655-.057M10.25 8a.75.75 0 0 0-1.5 0v8a.75.75 0 0 0 1.5 0v-3.25h3.5V16a.75.75 0 0 0 1.5 0V8a.75.75 0 0 0-1.5 0v3.25h-3.5z`},null,-1)]])}var Yn=R({name:`mynaui-letter-h-square-solid`,render:Jn}),Xn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Zn(e,t){return V(),M(`svg`,Xn,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M9.367 2.25h5.266c1.092 0 1.958 0 2.655.057c.714.058 1.317.18 1.869.46a4.75 4.75 0 0 1 2.075 2.077c.281.55.403 1.154.461 1.868c.057.697.057 1.563.057 2.655v5.266c0 1.092 0 1.958-.057 2.655c-.058.714-.18 1.317-.46 1.869a4.75 4.75 0 0 1-2.076 2.075c-.552.281-1.155.403-1.869.461c-.697.057-1.563.057-2.655.057H9.367c-1.092 0-1.958 0-2.655-.057c-.714-.058-1.317-.18-1.868-.46a4.75 4.75 0 0 1-2.076-2.076c-.281-.552-.403-1.155-.461-1.869c-.057-.697-.057-1.563-.057-2.655V9.367c0-1.092 0-1.958.057-2.655c.058-.714.18-1.317.46-1.868a4.75 4.75 0 0 1 2.077-2.076c.55-.281 1.154-.403 1.868-.461c.697-.057 1.563-.057 2.655-.057m.233 5.3A.75.75 0 0 0 8.25 8v8a.75.75 0 0 0 1.5 0v-5.75l1.65 2.2a.75.75 0 0 0 1.2 0l1.65-2.2V16a.75.75 0 0 0 1.5 0V8a.75.75 0 0 0-1.35-.45l-2.4 3.2z`},null,-1)]])}var Qn=R({name:`mynaui-letter-m-square-solid`,render:Zn}),$n={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function er(e,t){return V(),M(`svg`,$n,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M9.367 2.25h5.266c1.092 0 1.958 0 2.655.057c.714.058 1.317.18 1.869.46a4.75 4.75 0 0 1 2.075 2.077c.281.55.403 1.154.461 1.868c.057.697.057 1.563.057 2.655v5.266c0 1.092 0 1.958-.057 2.655c-.058.714-.18 1.317-.46 1.869a4.75 4.75 0 0 1-2.076 2.075c-.552.281-1.155.403-1.869.461c-.697.057-1.563.057-2.655.057H9.367c-1.092 0-1.958 0-2.655-.057c-.714-.058-1.317-.18-1.868-.46a4.75 4.75 0 0 1-2.076-2.076c-.281-.552-.403-1.155-.461-1.869c-.057-.697-.057-1.563-.057-2.655V9.367c0-1.092 0-1.958.057-2.655c.058-.714.18-1.317.46-1.868a4.75 4.75 0 0 1 2.077-2.076c.55-.281 1.154-.403 1.868-.461c.697-.057 1.563-.057 2.655-.057M10.25 8a.75.75 0 0 0-1.5 0v7.5c0 .414.336.75.75.75H15a.75.75 0 0 0 0-1.5h-4.75z`},null,-1)]])}var tr=R({name:`mynaui-letter-l-square-solid`,render:er}),nr={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function rr(e,t){return V(),M(`svg`,nr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M3.5 2A2.5 2.5 0 0 0 1 4.5v5A2.5 2.5 0 0 0 3.5 12H7v-2a2 2 0 0 1 2-2h5V4.5A2.5 2.5 0 0 0 11.5 2zM8 10a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1z`},null,-1)]])}var ir=R({name:`fluent-picture-in-picture16-filled`,render:rr}),ar={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function or(e,t){return V(),M(`svg`,ar,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M1 4.5A2.5 2.5 0 0 1 3.5 2h8A2.5 2.5 0 0 1 14 4.5V8h-1V4.5A1.5 1.5 0 0 0 11.5 3h-8A1.5 1.5 0 0 0 2 4.5v5A1.5 1.5 0 0 0 3.5 11H7v1H3.5A2.5 2.5 0 0 1 1 9.5zM9 9a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1z`},null,-1)]])}var sr=R({name:`fluent-picture-in-picture16-regular`,render:or}),cr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function J(e,t){return V(),M(`svg`,cr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 16a3 3 0 0 1-3-3c0-1.12.61-2.1 1.5-2.61l9.71-5.62l-5.53 9.58c-.5.98-1.51 1.65-2.68 1.65m0-13c1.81 0 3.5.5 4.97 1.32l-2.1 1.21C14 5.19 13 5 12 5a8 8 0 0 0-8 8c0 2.21.89 4.21 2.34 5.65h.01c.39.39.39 1.02 0 1.41s-1.03.39-1.42.01A9.97 9.97 0 0 1 2 13A10 10 0 0 1 12 3m10 10c0 2.76-1.12 5.26-2.93 7.07c-.39.38-1.02.38-1.41-.01a.996.996 0 0 1 0-1.41A7.95 7.95 0 0 0 20 13c0-1-.19-2-.54-2.9L20.67 8C21.5 9.5 22 11.18 22 13`},null,-1)]])}var lr=R({name:`mdi-speedometer`,render:J}),ur={viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`};function dr(e,t){return V(),M(`svg`,ur,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M7.75 5.5A2.25 2.25 0 0 0 5.5 7.75v16.5a2.25 2.25 0 0 0 2.25 2.25h16.5a2.25 2.25 0 0 0 2.25-2.25v-5a1.25 1.25 0 1 1 2.5 0v5A4.75 4.75 0 0 1 24.25 29H7.75A4.75 4.75 0 0 1 3 24.25V7.75A4.75 4.75 0 0 1 7.75 3h5a1.25 1.25 0 1 1 0 2.5zM18 4.25c0-.69.56-1.25 1.25-1.25h8.5c.69 0 1.25.56 1.25 1.25v8.5a1.25 1.25 0 1 1-2.5 0V7.268l-6.366 6.366a1.25 1.25 0 1 1-1.768-1.768L24.732 5.5H19.25c-.69 0-1.25-.56-1.25-1.25`},null,-1)]])}var fr=R({name:`fluent-open32-filled`,render:dr}),Y={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function pr(e,t){return V(),M(`svg`,Y,[...t[0]||=[A(`g`,{fill:`none`,"fill-rule":`evenodd`},[A(`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`}),A(`path`,{fill:`currentColor`,d:`M17.5 6.5H20a1.5 1.5 0 0 1 0 3h-3A2.5 2.5 0 0 1 14.5 7V4a1.5 1.5 0 0 1 3 0zM4 6.5h2.5V4a1.5 1.5 0 1 1 3 0v3A2.5 2.5 0 0 1 7 9.5H4a1.5 1.5 0 1 1 0-3m0 11h2.5V20a1.5 1.5 0 0 0 3 0v-3A2.5 2.5 0 0 0 7 14.5H4a1.5 1.5 0 0 0 0 3m16 0h-2.5V20a1.5 1.5 0 0 1-3 0v-3a2.5 2.5 0 0 1 2.5-2.5h3a1.5 1.5 0 0 1 0 3`})],-1)]])}var mr=R({name:`mingcute-fullscreen-exit-fill`,render:pr}),hr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function gr(e,t){return V(),M(`svg`,hr,[...t[0]||=[A(`g`,{fill:`none`,"fill-rule":`evenodd`},[A(`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`}),A(`path`,{fill:`currentColor`,d:`M18.5 5.5H16a1.5 1.5 0 0 1 0-3h3A2.5 2.5 0 0 1 21.5 5v3a1.5 1.5 0 0 1-3 0zM8 5.5H5.5V8a1.5 1.5 0 1 1-3 0V5A2.5 2.5 0 0 1 5 2.5h3a1.5 1.5 0 1 1 0 3m0 13H5.5V16a1.5 1.5 0 0 0-3 0v3A2.5 2.5 0 0 0 5 21.5h3a1.5 1.5 0 0 0 0-3m8 0h2.5V16a1.5 1.5 0 0 1 3 0v3a2.5 2.5 0 0 1-2.5 2.5h-3a1.5 1.5 0 0 1 0-3`})],-1)]])}var _r=R({name:`mingcute-fullscreen-fill`,render:gr}),vr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function yr(e,t){return V(),M(`svg`,vr,[...t[0]||=[A(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[A(`circle`,{cx:`12`,cy:`12`,r:`1`}),A(`circle`,{cx:`12`,cy:`5`,r:`1`}),A(`circle`,{cx:`12`,cy:`19`,r:`1`})],-1)]])}var br=R({name:`lucide-more-vertical`,render:yr}),xr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Sr(e,t){return V(),M(`svg`,xr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M20 5a1 1 0 0 0-1-1h-5a1 1 0 0 0 0 2h2.57l-3.28 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0L18 7.42V10a1 1 0 0 0 1 1a1 1 0 0 0 1-1Zm-9.29 8.29a1 1 0 0 0-1.42 0L6 16.57V14a1 1 0 0 0-1-1a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 0-2H7.42l3.29-3.29a1 1 0 0 0 0-1.42`},null,-1)]])}var Cr=R({name:`eva-expand-outline`,render:Sr}),wr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Tr(e,t){return V(),M(`svg`,wr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M19 9h-2.58l3.29-3.29a1 1 0 1 0-1.42-1.42L15 7.57V5a1 1 0 0 0-1-1a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 0-2m-9 4H5a1 1 0 0 0 0 2h2.57l-3.28 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0L9 16.42V19a1 1 0 0 0 1 1a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1`},null,-1)]])}var Er=R({name:`eva-collapse-outline`,render:Tr}),X={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Dr(e,t){return V(),M(`svg`,X,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M13.986 14.776a.73.73 0 0 1-.66-.4a.74.74 0 0 1 .3-1a2.45 2.45 0 0 0 1-1.001a.739.739 0 0 1 1.359.127a.75.75 0 0 1-.048.563a3.85 3.85 0 0 1-1.611 1.61a.7.7 0 0 1-.34.1`},null,-1),A(`path`,{fill:`currentColor`,d:`M19.409 10.644a7.55 7.55 0 0 1-.7 3.141a7.48 7.48 0 0 1-4.823 4.003a6.4 6.4 0 0 1-1.151.2v2.511h2.892a.75.75 0 0 1 0 1.501H8.342a.75.75 0 0 1 0-1.5h2.892v-2.512a6 6 0 0 1-.57-.07a.752.752 0 0 1 .27-1.481q.442.078.89.08h.33a5.5 5.5 0 0 0 1.341-.19a5.9 5.9 0 0 0 2.282-1.18a5.9 5.9 0 0 0 2.13-4.543a.75.75 0 0 1 1.502 0zM20.52 4.56l-4.363 4.353l-5.623 5.623l-6.004 6.003a.8.8 0 0 1-.53.22a.75.75 0 0 1-.53-.22a.74.74 0 0 1 0-1.06l3.462-3.462l-.18-.2a7.3 7.3 0 0 1-2.172-5.183a.75.75 0 0 1 .74-.76a.76.76 0 0 1 .751.75a5.92 5.92 0 0 0 1.771 4.172l.14.16l.85-.84a4 4 0 0 1-.65-.77a3.66 3.66 0 0 1-.59-1.892V5.851a4.13 4.13 0 0 1 1.45-2.872a4.92 4.92 0 0 1 5.894 0a4.13 4.13 0 0 1 1.441 2.802v.79l3.092-3.091a.74.74 0 0 1 1.06 0a.75.75 0 0 1-.01 1.08`},null,-1)]])}var Or=R({name:`mage-microphone-mute-fill`,render:Dr}),kr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ar(e,t){return V(),M(`svg`,kr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M16.43 5.838v5.57a4.43 4.43 0 0 1-8.78 0v-5.57a4.43 4.43 0 0 1 8.78 0`},null,-1),A(`path`,{fill:`currentColor`,d:`M12.79 17.998v2.5h2.89a.75.75 0 0 1 0 1.5H8.4a.75.75 0 1 1 0-1.5h2.85v-2.5a7.4 7.4 0 0 1-6.67-7.38a.75.75 0 0 1 1.5 0a5.92 5.92 0 1 0 11.84 0a.75.75 0 0 1 1.5 0a7.4 7.4 0 0 1-6.67 7.38z`},null,-1)]])}var jr=R({name:`mage-microphone-fill`,render:Ar}),Mr={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function Nr(e,t){return V(),M(`svg`,Mr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124M11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22l1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94z`},null,-1)]])}var Pr=R({name:`heroicons-speaker-x-mark16-solid`,render:Nr}),Fr={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function Ir(e,t){return V(),M(`svg`,Fr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124m5.393.984a.75.75 0 1 0-1.06 1.06a5.5 5.5 0 0 1 0 7.78a.75.75 0 1 0 1.06 1.06a7 7 0 0 0 0-9.9`},null,-1),A(`path`,{fill:`currentColor`,d:`M10.828 5.172a.75.75 0 1 0-1.06 1.06a2.5 2.5 0 0 1 0 3.536a.75.75 0 1 0 1.06 1.06a4 4 0 0 0 0-5.656`},null,-1)]])}var Lr=R({name:`heroicons-speaker-wave16-solid`,render:Ir}),Rr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function zr(e,t){return V(),M(`svg`,Rr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M11.5 3c-4.65 0-8.58 3.03-9.97 7.22L3.9 11c1.05-3.19 4.06-5.5 7.6-5.5c1.96 0 3.73.72 5.12 1.88L14 10h7V3l-2.6 2.6C16.55 4 14.15 3 11.5 3M19 14v6c0 1.11-.89 2-2 2h-2a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-4 0v6h2v-6zm-4 6a2 2 0 0 1-2 2H5v-2h4v-2H7v-2h2v-2H5v-2h4a2 2 0 0 1 2 2v1.5A1.5 1.5 0 0 1 9.5 17a1.5 1.5 0 0 1 1.5 1.5z`},null,-1)]])}var Br=R({name:`mdi-fast-forward30`,render:zr}),Vr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Hr(e,t){return V(),M(`svg`,Vr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M17.276 5.47c.435.16.724.575.724 1.039V17.49c0 .464-.29.879-.724 1.039a3.7 3.7 0 0 1-2.552 0A1.11 1.11 0 0 1 14 17.491V6.51c0-.464.29-.879.724-1.04a3.7 3.7 0 0 1 2.552 0m-8 0c.435.16.724.575.724 1.039V17.49c0 .464-.29.879-.724 1.039a3.7 3.7 0 0 1-2.552 0A1.11 1.11 0 0 1 6 17.491V6.51c0-.464.29-.879.724-1.04a3.7 3.7 0 0 1 2.552 0`},null,-1)]])}var Ur=R({name:`basil-pause-solid`,render:Hr}),Wr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Gr(e,t){return V(),M(`svg`,Wr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M19 14v6c0 1.11-.89 2-2 2h-2a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-4 0v6h2v-6zm-4 6a2 2 0 0 1-2 2H5v-2h4v-2H7v-2h2v-2H5v-2h4a2 2 0 0 1 2 2v1.5A1.5 1.5 0 0 1 9.5 17a1.5 1.5 0 0 1 1.5 1.5zm1.5-17c4.65 0 8.58 3.03 9.97 7.22L20.1 11c-1.05-3.19-4.06-5.5-7.6-5.5c-1.96 0-3.73.72-5.12 1.88L10 10H3V3l2.6 2.6C7.45 4 9.85 3 12.5 3`},null,-1)]])}var Kr=R({name:`mdi-rewind30`,render:Gr}),qr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Jr(e,t){return V(),M(`svg`,qr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M3.27 2L2 3.27L4.73 6H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12c.2 0 .39-.08.54-.18L19.73 21L21 19.73M21 6.5l-4 4V7a1 1 0 0 0-1-1H9.82L21 17.18z`},null,-1)]])}var Yr=R({name:`mdi-video-off`,render:Jr}),Xr={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Zr(e,t){return V(),M(`svg`,Xr,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M9 10a3.04 3.04 0 0 1 3-3a3.04 3.04 0 0 1 3 3a3.04 3.04 0 0 1-3 3a3.04 3.04 0 0 1-3-3m3 9l4 1v-3.08A7.54 7.54 0 0 1 12 18a7.54 7.54 0 0 1-4-1.08V20m4-16a5.78 5.78 0 0 0-4.24 1.74A5.78 5.78 0 0 0 6 10a5.78 5.78 0 0 0 1.76 4.23A5.78 5.78 0 0 0 12 16a5.78 5.78 0 0 0 4.24-1.77A5.78 5.78 0 0 0 18 10a5.78 5.78 0 0 0-1.76-4.26A5.78 5.78 0 0 0 12 4m8 6a8 8 0 0 1-.57 2.8A7.8 7.8 0 0 1 18 15.28V23l-6-2l-6 2v-7.72A7.9 7.9 0 0 1 4 10a7.68 7.68 0 0 1 2.33-5.64A7.73 7.73 0 0 1 12 2a7.73 7.73 0 0 1 5.67 2.36A7.68 7.68 0 0 1 20 10`},null,-1)]])}var Qr=R({name:`mdi-license`,render:Zr}),$r=z({__name:`CuiHeatmap`,props:{cameraId:{}},setup(e){let t=e,{plugin:n}=v(`@camera.ui/camera-ui-nvr`),r=Qe(`canvasRef`);async function i(){let e=r.value,i=n.value;if(!(!e||!i?.getDetectionHeatmap))try{let n=Date.now(),r=n-1440*60*1e3,o=await i.getDetectionHeatmap(t.cameraId,r,n);if(!o?.points?.length)return;a(e,o.points)}catch{}}function a(e,t){e.width=128,e.height=72;let n=e.getContext(`2d`);if(!n)return;for(let e of t){let t=e.x*128,r=e.y*72,i=n.createRadialGradient(t,r,0,t,r,8);i.addColorStop(0,`rgba(255, 255, 255, 0.15)`),i.addColorStop(1,`rgba(255, 255, 255, 0)`),n.fillStyle=i,n.fillRect(t-8,r-8,16,16)}let r=n.getImageData(0,0,128,72),i=r.data,a=0;for(let e=3;e<i.length;e+=4)i[e]>a&&(a=i[e]);if(a!==0){for(let e=0;e<i.length;e+=4){let t=i[e+3]/a;if(t<.01){i[e]=i[e+1]=i[e+2]=i[e+3]=0;continue}let[n,r,s]=o(t);i[e]=n,i[e+1]=r,i[e+2]=s,i[e+3]=Math.floor(t*200+55)}n.putImageData(r,0,0)}}function o(e){if(e<.25){let t=e/.25;return[0,Math.floor(t*255),255]}else if(e<.5){let t=(e-.25)/.25;return[0,255,Math.floor((1-t)*255)]}else if(e<.75){let t=(e-.5)/.25;return[Math.floor(t*255),255,0]}else{let t=(e-.75)/.25;return[255,Math.floor((1-t)*255),0]}}return Ge(()=>i()),(e,t)=>(V(),M(`canvas`,{ref_key:`canvasRef`,ref:r,class:`absolute inset-0 w-full h-full pointer-events-none z-1`,style:{opacity:`0.6`}},null,512))}}),ei={class:`absolute inset-0 pointer-events-auto`,style:{"z-index":`10`}},ti=[`viewBox`],ni=[`x1`,`x2`,`y2`],ri=[`y1`,`x2`,`y2`],ii=[`x`,`y`,`width`,`height`],ai=[`x`,`y`,`width`,`height`],oi=[`onClick`],si=_t(z({__name:`CuiGridSearch`,props:{modelValue:{},cols:{default:10},rows:{default:11}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=Qe(`svgRef`),a=N(!1),o=N(null),s=N(null),c=L(()=>{let e=new Set;for(let t of n.modelValue)for(let n=t.row;n<t.row+t.h;n++)for(let r=t.col;r<t.col+t.w;r++)e.add(`${r}:${n}`);return e}),l=L(()=>!a.value||!o.value||!s.value?null:ee(o.value,s.value));function u(e,t,n,r){let i=t.col>=e.col?1:-1,a=t.row>=e.row?1:-1,o=e.col,s=e.row;if(r){let r=Math.min(e.row,t.row),c=Math.max(e.row,t.row);for(let a=e.col;i>0?a<=t.col:a>=t.col;a+=i){let e=!1;for(let t=r;t<=c;t++)if(n.has(`${a}:${t}`)){e=!0;break}if(e)break;o=a}let l=Math.min(e.col,o),u=Math.max(e.col,o);for(let r=e.row;a>0?r<=t.row:r>=t.row;r+=a){let e=!1;for(let t=l;t<=u;t++)if(n.has(`${t}:${r}`)){e=!0;break}if(e)break;s=r}}else{let r=Math.min(e.col,t.col),c=Math.max(e.col,t.col);for(let i=e.row;a>0?i<=t.row:i>=t.row;i+=a){let e=!1;for(let t=r;t<=c;t++)if(n.has(`${t}:${i}`)){e=!0;break}if(e)break;s=i}let l=Math.min(e.row,s),u=Math.max(e.row,s);for(let r=e.col;i>0?r<=t.col:r>=t.col;r+=i){let e=!1;for(let t=l;t<=u;t++)if(n.has(`${r}:${t}`)){e=!0;break}if(e)break;o=r}}return te(e,{col:o,row:s})}function ee(e,t){let n=c.value,r=u(e,t,n,!0),i=u(e,t,n,!1);return r.w*r.h>=i.w*i.h?r:i}function te(e,t){let n=Math.min(e.col,t.col),r=Math.max(e.col,t.col),i=Math.min(e.row,t.row),a=Math.max(e.row,t.row);return{col:n,row:i,w:r-n+1,h:a-i+1}}function d(e){let t=i.value;if(!t)return;let r=t.getBoundingClientRect(),a=(e.clientX-r.left)/r.width,o=(e.clientY-r.top)/r.height;if(!(a<0||a>=1||o<0||o>=1))return{col:Math.min(Math.floor(a*n.cols),n.cols-1),row:Math.min(Math.floor(o*n.rows),n.rows-1)}}function ne(e){let t=d(e);t&&(c.value.has(`${t.col}:${t.row}`)||(a.value=!0,o.value=t,s.value=t,e.target?.setPointerCapture?.(e.pointerId)))}function f(e){if(!a.value)return;let t=d(e);t&&(s.value=t)}function p(){a.value&&l.value&&r(`update:modelValue`,[...n.modelValue,l.value]),a.value=!1,o.value=null,s.value=null}function m(e){let t=[...n.modelValue];t.splice(e,1),r(`update:modelValue`,t)}function re(e){let t=e.col===0,r=e.row===0,i=t?e.col+e.w:e.col,a=r?e.row+e.h:e.row;return{left:`${i/n.cols*100}%`,top:`${a/n.rows*100}%`}}return(t,n)=>{let r=xt;return V(),M(`div`,ei,[(V(),M(`svg`,{ref_key:`svgRef`,ref:i,class:`w-full h-full`,viewBox:`0 0 ${e.cols} ${e.rows}`,preserveAspectRatio:`none`,style:{cursor:`crosshair`,"touch-action":`none`},onPointerdown:ne,onPointermove:f,onPointerup:p,onPointerleave:p},[(V(!0),M(F,null,Xe(e.cols-1,t=>(V(),M(`line`,{key:`v${t}`,x1:t,y1:0,x2:t,y2:e.rows,class:`grid-line`},null,8,ni))),128)),(V(!0),M(F,null,Xe(e.rows-1,t=>(V(),M(`line`,{key:`h${t}`,x1:0,y1:t,x2:e.cols,y2:t,class:`grid-line`},null,8,ri))),128)),(V(!0),M(F,null,Xe(e.modelValue,(e,t)=>(V(),M(`rect`,{key:t,x:e.col,y:e.row,width:e.w,height:e.h,class:`grid-region`},null,8,ii))),128)),O(l)?(V(),M(`rect`,{key:0,x:O(l).col,y:O(l).row,width:O(l).w,height:O(l).h,class:`grid-region grid-region-preview`},null,8,ai)):I(``,!0)],40,ti)),(V(!0),M(F,null,Xe(e.modelValue,(e,t)=>(V(),M(`button`,{key:`rm-${t}`,class:`grid-remove-btn`,style:k(re(e)),onClick:tt(e=>m(t),[`stop`]),onPointerdown:n[0]||=tt(()=>{},[`stop`])},[B(r,{class:`w-[10px] h-[10px]`})],44,oi))),128))])}}}),[[`__scopeId`,`data-v-8276ca40`]]),ci=[`id`],li=[`fill`],ui=[`id`],di=[`fill`],fi=[`d`],Z=[`x1`,`y1`,`x2`,`y2`,`stroke`],pi=[`x1`,`y1`,`x2`,`y2`,`stroke`,`marker-end`,`marker-start`],mi=[`x`,`y`,`fill`],hi=[`x`,`y`],gi=[`x`,`y`,`fill`],_i=[`x`,`y`],vi=_t(z({__name:`CuiPolygon`,props:{cameraZones:{},cameraLines:{}},setup(e){let{cameraZones:t}=nt(e),n=Qe(`zoneRef`),r=re(n);function i(e){if(!e)return``;let t=e.map(e=>`${Math.round(e[0]/100*r.width.value)},${Math.round(e[1]/100*r.height.value)}`);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 a(e){let t=r.width.value,n=r.height.value,i=e.points[0][0]/100*t,a=e.points[0][1]/100*n,o=e.points[1][0]/100*t,s=e.points[1][1]/100*n,c=(i+o)/2,l=(a+s)/2,u=o-i,ee=s-a,te=Math.sqrt(u*u+ee*ee)||1,d=-ee,ne=u,f=c-d/2,p=l-ne/2,m=c+d/2,re=l+ne/2,h=d/te,g=ne/te,_=(e,r)=>({x:Math.max(8,Math.min(t-8,e)),y:Math.max(8,Math.min(n-8,r))}),v=_(f-h*18,p-g*18),ie=_(m+h*18,re+g*18);return{h1x:i,h1y:a,h2x:o,h2y:s,ax:v.x+h*13,ay:v.y+g*13,bx:ie.x-h*13,by:ie.y-g*13,labelAx:v.x,labelAy:v.y,labelBx:ie.x,labelBy:ie.y}}return(r,o)=>(V(),M(`svg`,{ref_key:`zoneRef`,ref:n,width:`100%`,height:`100%`,class:`zones-container polygon-container min-w-0`},[A(`defs`,null,[(V(!0),M(F,null,Xe(e.cameraLines??[],(e,t)=>(V(),M(`marker`,{id:`arrow-ab-${t}`,key:`marker-ab-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`5`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[A(`path`,{d:`M0,0 L6,2.5 L0,5 Z`,fill:e.color},null,8,li)],8,ci))),128)),(V(!0),M(F,null,Xe(e.cameraLines??[],(e,t)=>(V(),M(`marker`,{id:`arrow-ba-${t}`,key:`marker-ba-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`1`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[A(`path`,{d:`M6,0 L0,2.5 L6,5 Z`,fill:e.color},null,8,di)],8,ui))),128))]),(V(!0),M(F,null,Xe(O(t),(e,t)=>(V(),M(`path`,{key:`zone-${t}`,d:i(e.points.map(e=>e)),class:E({dash:e.type===`intersect`&&!e.isPrivacyMask}),style:k({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`})},null,14,fi))),128)),(V(!0),M(F,null,Xe(e.cameraLines??[],(e,t)=>(V(),M(F,{key:`line-${t}`},[A(`line`,{x1:a(e).h1x,y1:a(e).h1y,x2:a(e).h2x,y2:a(e).h2y,stroke:e.color,"stroke-width":`2`,"stroke-dasharray":`6,4`,opacity:`0.5`},null,8,Z),A(`line`,{x1:a(e).ax,y1:a(e).ay,x2:a(e).bx,y2:a(e).by,stroke:e.color,"stroke-width":`3`,"marker-end":e.direction===`b-to-a`?void 0:`url(#arrow-ab-${t})`,"marker-start":e.direction===`a-to-b`?void 0:`url(#arrow-ba-${t})`},null,8,pi),A(`rect`,{x:a(e).labelAx-8,y:a(e).labelAy-8,width:`16`,height:`16`,rx:`3`,fill:e.color},null,8,mi),A(`text`,{x:a(e).labelAx,y:a(e).labelAy,fill:`#fff`,"font-size":`10`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},`A`,8,hi),A(`rect`,{x:a(e).labelBx-8,y:a(e).labelBy-8,width:`16`,height:`16`,rx:`3`,fill:e.color},null,8,gi),A(`text`,{x:a(e).labelBx,y:a(e).labelBy,fill:`#fff`,"font-size":`10`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},`B`,8,_i)],64))),128))],512))}}),[[`__scopeId`,`data-v-03a4c212`]]),yi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function bi(e,t){return V(),M(`svg`,yi,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 14c.2-1 .7-1.7 1.5-2.5c1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5c.7.7 1.3 1.5 1.5 2.5m0 4h6m-5 4h4`},null,-1)]])}var xi=R({name:`lucide-lightbulb`,render:bi}),Si={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ci(e,t){return V(),M(`svg`,Si,[...t[0]||=[A(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[A(`path`,{d:`M14 17H5M19 7h-9`}),A(`circle`,{cx:`17`,cy:`17`,r:`3`}),A(`circle`,{cx:`7`,cy:`7`,r:`3`})],-1)]])}var wi=R({name:`lucide-settings2`,render:Ci}),Ti={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ei(e,t){return V(),M(`svg`,Ti,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14m-7-7v14`},null,-1)]])}var Di=R({name:`lucide-plus`,render:Ei}),Oi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ki(e,t){return V(),M(`svg`,Oi,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M13 14h-2V8h2m0 10h-2v-2h2m3.7-12H15V2H9v2H7.3C6.6 4 6 4.6 6 5.3v15.3c0 .8.6 1.4 1.3 1.4h9.3c.7 0 1.3-.6 1.3-1.3V5.3c.1-.7-.5-1.3-1.2-1.3`},null,-1)]])}var Ai=R({name:`mdi-battery-alert`,render:ki}),ji={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Mi(e,t){return V(),M(`svg`,ji,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M16 17H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4`},null,-1)]])}var Ni=R({name:`mdi-battery20`,render:Mi}),Pi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Fi(e,t){return V(),M(`svg`,Pi,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M16 14H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4`},null,-1)]])}var Ii=R({name:`mdi-battery40`,render:Fi}),Li={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ri(e,t){return V(),M(`svg`,Li,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M16 12H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4`},null,-1)]])}var zi=R({name:`mdi-battery60`,render:Ri}),Bi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Vi(e,t){return V(),M(`svg`,Bi,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M16 9H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4`},null,-1)]])}var Hi=R({name:`mdi-battery80`,render:Vi}),Ui={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Wi(e,t){return V(),M(`svg`,Ui,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M16.67 4H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4`},null,-1)]])}var Q=R({name:`mdi-battery`,render:Wi}),Gi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ki(e,t){return V(),M(`svg`,Gi,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M23.05 11h-3V4l-5 10h3v8M12 20H4l.05-14h8m.67-2h-1.67V2h-6v2H3.38a1.33 1.33 0 0 0-1.33 1.33v15.34c0 .73.6 1.33 1.33 1.33h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.72 4`},null,-1)]])}var qi=R({name:`mdi-battery-charging-outline`,render:Ki}),Ji={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Yi(e,t){return V(),M(`svg`,Ji,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M23.05 11h-3V4l-5 10h3v8m-6-5h-8V6h8m.67-2h-1.67V2h-6v2H3.38a1.33 1.33 0 0 0-1.33 1.33v15.34c0 .73.6 1.33 1.33 1.33h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.72 4`},null,-1)]])}var Xi=R({name:`mdi-battery-charging20`,render:Yi}),Zi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qi(e,t){return V(),M(`svg`,Zi,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M13 4h-2V2H5v2H3c-.6 0-1 .4-1 1v16c0 .6.4 1 1 1h10c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1m-1 10.5H4V6h8zM23 11h-3V4l-5 10h3v8`},null,-1)]])}var $i=R({name:`mdi-battery-charging40`,render:Qi}),ea={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ta(e,t){return V(),M(`svg`,ea,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 11H4V6h8m.67-2H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4M23 11h-3V4l-5 10h3v8z`},null,-1)]])}var na=R({name:`mdi-battery-charging60`,render:ta}),ra={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ia(e,t){return V(),M(`svg`,ra,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M23 11h-3V4l-5 10h3v8M12 9H4V6h8m.67-2H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4`},null,-1)]])}var aa=R({name:`mdi-battery-charging80`,render:ia}),oa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function sa(e,t){return V(),M(`svg`,oa,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M23 11h-3V4l-5 10h3v8M12.67 4H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4`},null,-1)]])}var ca=R({name:`mdi-battery-charging100`,render:sa}),la={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ua(e,t){return V(),M(`svg`,la,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`m1 4.27l2 2V11c0 5.55 3.84 10.74 9 12c1.87-.46 3.57-1.44 4.97-2.76l2.26 2.26l1.27-1.28L2.28 3zM12 21c-3.75-1-7-5.46-7-9.78V8.27l10.59 10.59C14.53 19.89 13.3 20.65 12 21m9-16v6c0 2.28-.65 4.5-1.77 6.4l-1.46-1.45c.77-1.45 1.23-3.11 1.23-4.73V6.3l-7-3.12l-4.84 2.16l-1.51-1.52L12 1z`},null,-1)]])}var da=R({name:`mdi-shield-off-outline`,render:ua}),fa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function pa(e,t){return V(),M(`svg`,fa,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 1L3 5v6c0 5.55 3.84 10.74 9 12c5.16-1.26 9-6.45 9-12V5zm3.97 13.41c-1.84 2.17-5.21 2.09-6.97-.07c-2.18-2.72-.64-6.72 2.7-7.34c.34-.05.63.28.51.61c-.46 1.23-.39 2.64.32 3.86a4.51 4.51 0 0 0 3.18 2.2c.34.05.49.47.26.74`},null,-1)]])}var ma=R({name:`mdi-shield-moon`,render:pa}),ha={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ga(e,t){return V(),M(`svg`,ha,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 1L3 5v6c0 5.55 3.84 10.74 9 12c5.16-1.26 9-6.45 9-12V5zm0 6c1.4 0 2.8 1.1 2.8 2.5V11c.6 0 1.2.6 1.2 1.3v3.5c0 .6-.6 1.2-1.3 1.2H9.2c-.6 0-1.2-.6-1.2-1.3v-3.5c0-.6.6-1.2 1.2-1.2V9.5C9.2 8.1 10.6 7 12 7m0 1.2c-.8 0-1.5.5-1.5 1.3V11h3V9.5c0-.8-.7-1.3-1.5-1.3`},null,-1)]])}var _a=R({name:`mdi-shield-lock`,render:ga}),va={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ya(e,t){return V(),M(`svg`,va,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M11 13h2v3h3v-5h2l-6-5l-6 5h2v5h3zm1-12l9 4v6c0 5.55-3.84 10.74-9 12c-5.16-1.26-9-6.45-9-12V5z`},null,-1)]])}var ba=R({name:`mdi-shield-home`,render:ya}),xa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Sa(e,t){return V(),M(`svg`,xa,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 1L3 5v6c0 5.55 3.84 10.74 9 12c5.16-1.26 9-6.45 9-12V5M11 7h2v6h-2m0 2h2v2h-2`},null,-1)]])}var Ca=R({name:`mdi-shield-alert`,render:Sa}),wa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ta(e,t){return V(),M(`svg`,wa,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 10c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m4-8H8c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 18H8V4h8z`},null,-1)]])}var Ea=R({name:`mdi-doorbell`,render:Ta}),Da={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Oa(e,t){return V(),M(`svg`,Da,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M22 9v11h-2v-9H4v9H2V9l10-4zm-3 3H5v2h14zm0 6H5v2h14zm0-3H5v2h14z`},null,-1)]])}var ka=R({name:`mdi-garage-variant`,render:Oa}),Aa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ja(e,t){return V(),M(`svg`,Aa,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M22 9v11h-2v-9H4v9H2V9l10-4zm-3 3H5v2h14z`},null,-1)]])}var Ma=R({name:`mdi-garage-open-variant`,render:ja}),Na={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Pa(e,t){return V(),M(`svg`,Na,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`m20.84 22.73l-4.55-4.55A5.96 5.96 0 0 1 12 20c-3.31 0-6-2.69-6-6c0-1.33.67-2.97 1.55-4.56L1.11 3l1.28-1.27l19.72 19.73zM18 14c0-4-6-10.75-6-10.75s-1.16 1.3-2.45 3.1l8.4 8.4c.05-.25.05-.5.05-.75`},null,-1)]])}var Fa=R({name:`mdi-water-off`,render:Pa}),Ia={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function La(e,t){return V(),M(`svg`,Ia,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M10 3.25S16 10 16 14c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-4 6-10.75 6-10.75M20 7v6h-2V7zm-2 10h2v-2h-2z`},null,-1)]])}var Ra=R({name:`mdi-water-alert`,render:La}),za={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ba(e,t){return V(),M(`svg`,za,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M22.11 21.46L2.39 1.73L1.11 3l2.95 2.95A9.9 9.9 0 0 0 2 12c0 5.5 4.5 10 10 10c2.28 0 4.37-.77 6.05-2.06l2.79 2.79zM12 20c-4.41 0-8-3.59-8-8c0-1.72.56-3.31 1.5-4.62l1.43 1.44A6 6 0 0 0 6 12c0 1.3.42 2.5 1.11 3.47l.72-.72C7.31 13.96 7 13 7 12c0-.89.25-1.72.66-2.45l.74.75c-.25.51-.4 1.09-.4 1.7c0 .74.22 1.43.57 2l.73-.71c-.19-.4-.3-.83-.3-1.29c0-.33.07-.64.18-.93l3.75 3.75c-.29.11-.6.18-.93.18c-.46 0-.89-.11-1.28-.3l-.72.73c.58.36 1.26.57 2 .57c.61 0 1.19-.15 1.71-.4l.74.74c-.73.41-1.56.66-2.45.66c-1 0-1.96-.31-2.75-.83l-.72.72C9.5 17.59 10.7 18 12 18c1.17 0 2.25-.35 3.18-.93l1.44 1.43c-1.3.94-2.9 1.5-4.62 1.5m0-12c.74 0 1.43.22 2 .57l-.71.73c-.33-.15-.69-.24-1.06-.27l-.95-.95c.22-.05.47-.08.72-.08m2.97 3.77c-.03-.37-.11-.73-.27-1.05l.73-.72c.36.58.57 1.26.57 2c0 .25-.03.5-.08.72zm-.22-3.94C13.96 7.31 13 7 12 7c-.54 0-1.06.09-1.55.25l-.76-.75C10.4 6.18 11.18 6 12 6c1.3 0 2.5.42 3.47 1.11zM8.18 5L6.72 3.5C8.25 2.56 10.06 2 12 2c5.5 0 10 4.5 10 10c0 1.94-.56 3.75-1.5 5.28L19 15.83c.65-1.14 1-2.45 1-3.83c0-4.41-3.59-8-8-8c-1.38 0-2.69.35-3.82 1m8.57 8.55c.16-.49.25-1.01.25-1.55c0-1-.31-1.96-.83-2.75l.72-.72C17.59 9.5 18 10.7 18 12c0 .83-.18 1.6-.5 2.32z`},null,-1)]])}var Va=R({name:`mdi-smoke-detector-variant-off`,render:Ba}),Ha={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ua(e,t){return V(),M(`svg`,Ha,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8s-8-3.59-8-8s3.59-8 8-8m0-2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m0 9c-.55 0-1 .45-1 1s.45 1 1 1s1-.45 1-1s-.45-1-1-1m-1.28-1.7c.39-.19.82-.3 1.28-.3s.89.11 1.29.3l.71-.73c-.57-.35-1.26-.57-2-.57s-1.42.22-2 .57zM15 12c0 .46-.11.89-.3 1.29l.73.71c.36-.57.57-1.26.57-2s-.21-1.42-.57-2l-.73.72c.19.39.3.82.3 1.28m-6 0c0-.46.11-.89.3-1.28L8.57 10c-.35.58-.57 1.26-.57 2s.22 1.43.57 2l.73-.71c-.19-.4-.3-.83-.3-1.29m4.29 2.7c-.4.19-.83.3-1.29.3s-.89-.11-1.28-.3l-.72.73c.58.36 1.26.57 2 .57s1.43-.21 2-.57zm3.6-6.17l-.72.72c.52.79.83 1.75.83 2.75s-.31 1.96-.83 2.75l.72.72C17.59 14.5 18 13.3 18 12s-.41-2.5-1.11-3.47m-7.64-.7C10.04 7.31 11 7 12 7s1.96.31 2.75.83l.72-.72a5.98 5.98 0 0 0-6.94 0zm5.5 8.34c-.79.52-1.75.83-2.75.83s-1.96-.31-2.75-.83l-.72.72C9.5 17.59 10.7 18 12 18s2.5-.41 3.47-1.11zm-6.92-1.42C7.31 13.96 7 13 7 12s.31-1.96.83-2.75l-.72-.72a5.98 5.98 0 0 0 0 6.94z`},null,-1)]])}var Wa=R({name:`mdi-smoke-detector-variant`,render:Ua}),Ga={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ka(e,t){return V(),M(`svg`,Ga,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M11.4 8.2H15V10h-1.8zM19.67 1h-1.34c0 2.58 2.09 4.67 4.67 4.67V4.33c-1.84 0-3.33-1.49-3.33-3.33M21 1a2 2 0 0 0 2 2V1zm-4 0h-1.33c0 4.05 3.28 7.33 7.33 7.33V7c-3.31 0-6-2.69-6-6m-7 2.8c1 0 1.8-.8 1.8-1.8S11 .2 10 .2S8.2 1 8.2 2S9 3.8 10 3.8M2.39 1.73L1.11 3l2.35 2.35L2 5.8V11h1.8V7.33l1.25-.39l.63.63L2 22h1.8l2.87-8.11L9 17v5h1.8v-6.41l-2.49-4.54l.19-.68l12.34 12.36l1.27-1.27zm6.99 3.14c-.3-.5-.84-.84-1.46-.84c-.17 0-.34.03-.5.08l-.08.03l4.01 4.01z`},null,-1)]])}var qa=R({name:`mdi-motion-sensor-off`,render:Ka}),Ja={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ya(e,t){return V(),M(`svg`,Ja,[...t[0]||=[A(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[A(`path`,{d:`M7 16.3c2.2 0 4-1.83 4-4.05c0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05`}),A(`path`,{d:`M12.56 6.6A11 11 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97`})],-1)]])}var Xa=R({name:`lucide-droplets`,render:Ya}),Za={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qa(e,t){return V(),M(`svg`,Za,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0`},null,-1)]])}var $a=R({name:`lucide-thermometer`,render:Qa}),eo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function to(e,t){return V(),M(`svg`,eo,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M18 20V10H6v10zm0-12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h9V6a3 3 0 0 0-3-3a3 3 0 0 0-3 3H7a5 5 0 0 1 5-5a5 5 0 0 1 5 5v2zm-6 9a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2`},null,-1)]])}var no=R({name:`mdi-lock-open-outline`,render:to}),ro={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function io(e,t){return V(),M(`svg`,ro,[...t[0]||=[A(`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-6`},null,-1)]])}var ao=R({name:`mdi-alarm-light`,render:io}),oo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function so(e,t){return V(),M(`svg`,oo,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 2v10m6.4-5.4a9 9 0 1 1-12.77.04`},null,-1)]])}var co=R({name:`lucide-power`,render:so}),lo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function uo(e,t){return V(),M(`svg`,lo,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M12 6a6 6 0 0 1 6 6c0 2.22-1.21 4.16-3 5.2V19a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-1.8c-1.79-1.04-3-2.98-3-5.2a6 6 0 0 1 6-6m2 15v1a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-1zm6-10h3v2h-3zM1 11h3v2H1zM13 1v3h-2V1zM4.92 3.5l2.13 2.14l-1.42 1.41L3.5 4.93zm12.03 2.13l2.12-2.13l1.43 1.43l-2.13 2.12z`},null,-1)]])}var fo=R({name:`mdi-lightbulb-on`,render:uo}),po={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function mo(e,t){return V(),M(`svg`,po,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 12h.01M18 20V6a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v14m-4 0h20`},null,-1)]])}var ho=R({name:`lucide-door-closed`,render:mo}),go={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _o(e,t){return V(),M(`svg`,go,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M11 20H2m9-15.438v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561zM11 4H8a2 2 0 0 0-2 2v14m8-8h.01M22 20h-3`},null,-1)]])}var vo=R({name:`lucide-door-open`,render:_o}),yo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function bo(e,t){return V(),M(`svg`,yo,[...t[0]||=[A(`g`,{fill:`none`},[A(`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`}),A(`path`,{fill:`currentColor`,d:`M19.26 16.877c.413.402.74.932.74 1.596c0 .753-.426 1.339-.9 1.745c-.48.408-1.114.731-1.81.983c-1.402.505-3.272.799-5.29.799s-3.888-.294-5.29-.8c-.696-.25-1.33-.574-1.809-.982c-.475-.406-.901-.992-.901-1.745c0-.663.327-1.194.74-1.596A9.97 9.97 0 0 0 12 20c2.859 0 5.438-1.2 7.26-3.123M12 2a8 8 0 1 1 0 16a8 8 0 0 1 0-16m0 4a4 4 0 1 0 0 8a4 4 0 0 0 0-8m0 2a2 2 0 1 1 0 4a2 2 0 0 1 0-4`})],-1)]])}var xo=R({name:`mingcute-computer-camera-fill`,render:bo}),So=new Set([`contact`,`temperature`,`humidity`,`occupancy`,`smoke`,`leak`,`battery`]),Co=new Set([`temperature`,`humidity`,`battery`]),wo=e(Kt(),1),To={class:`snapshot-hover-container flex items-center justify-center relative`},Eo=[`onMouseenter`,`onMouseleave`],Do={class:`flex flex-col gap-1 min-w-[160px]`},Oo=[`onClick`],ko=[`onClick`],Ao=[`onClick`],jo=[`onClick`],Mo={class:`sensor-tooltip`},No={class:`sensor-tooltip-name`},Po={key:0,class:`sensor-tooltip-offline text-orange-500`},Fo={class:`shortcut-menu`},Io=[`onClick`],Lo={key:0,class:`shortcut-menu-item-overlay`},Ro={key:0,class:`shortcut-menu-empty`},zo={class:`shortcut-menu-sensors`},Bo={class:`sensor-menu-icon`},Vo={key:1,class:`shortcut-menu-empty`},Ho=_t(z({__name:`CuiShortcuts`,props:{cameraName:{},visible:{type:Boolean},editing:{type:Boolean},interactionLocked:{type:Boolean}},setup(e){let a=new Jt,l=new Le,ee=e,te=Ie(),d=mt(),{cameraName:p,visible:m,editing:g,interactionLocked:v}=nt(ee),{camera:ae}=ve(p),{sensors:y}=u(ae),oe=ne(),le=b(),de=Lt(void 0,`admin`),me=Ue(o,void 0),{user:xe}=pt(Be());a.toggleQueryActivator(`getCamerasQuery`,!1);let{data:Ce,isBusy:Te}=a.getCameraQuery(p),{data:De,isBusy:Oe}=a.getCamerasQuery({page:1,pageSize:-1}),{data:Me,isBusy:Fe}=l.getShortcutsQuery(xe.value?.username||``,p),{mutate:ze,isPending:Ve}=l.patchShortcutQuery(),{mutate:He,isPending:Ke}=l.createShortcutQuery(),{mutate:qe,isPending:Je}=l.removeShortcutQuery(),Ze=new Map,$e=Qe(`placeholderRef`),rt=Qe(`shortcutContainerRef`),it=Qe(`camerasMenuRef`),st=et({}),lt=et({}),R=et({}),z=et({}),_t=N({}),vt=N(!1),yt=N(),bt=N(!1),xt=N(!1),Tt=N([]),H=N({}),Et=N(!1),At=N(`cameras`),jt=N({}),Mt=N(new Set),Nt=re(rt),Ft=L(()=>me?.isActive.value??!1),Rt=L(()=>Tt.value.filter(e=>e.type===`camera`)),zt=L(()=>Tt.value.filter(e=>e.type===`sensor`)),Vt=L(()=>y.value.filter(e=>Se(e)||C(e)||se(e)||je(e)||r(e)||Ae(e)||ce(e)||Pe(e)||ge(e)||e.type===n.Switch||i(e)||w(e)||_(e)||pe(e))),Ht=L(()=>{let e=y.value;return zt.value.map(t=>{let n=rn(e,t.sensorType,t.sensorName,t.sensorPluginId);return{shortcut:t,sensor:n,isOnline:!!n}})}),Ut=L(()=>Te.value||Fe.value||Ve.value||Oe.value||Ke.value||Je.value),Kt=L(()=>De.value?.result?De.value.result.filter(e=>e.name!==p.value):[]),Yt=L(()=>xe.value?.username??``),Xt=L(()=>{if(Ft.value)return Rt.value.find(e=>H.value[e._id])});function Zt(e){let t=Ze.get(e._id);return t||(t=s(L(()=>e.cameraId),{managed:!0,sourceRole:`scrub`,cameraUi:oe,nvrCtx:le}),Ze.set(e._id,t),t)}function Qt(e){return zt.value.some(t=>t.sensorName===e.name&&String(t.sensorType).toLowerCase()===String(e.type).toLowerCase()&&t.sensorPluginId===e.pluginId)}function $t(e){return Rt.value.some(t=>t.cameraId===e._id)}function en(e){switch(e){case n.Contact:return`Contact Sensor`;case n.Light:return`Light`;case n.Switch:return`Switch`;case n.Siren:return`Siren`;case n.Lock:return`Lock`;case n.Temperature:return`Temperature`;case n.Humidity:return`Humidity`;case n.Occupancy:return`Occupancy`;case n.Smoke:return`Smoke Sensor`;case n.Leak:return`Leak Sensor`;case n.Garage:return`Garage`;case n.Doorbell:return`Doorbell`;case n.SecuritySystem:return`Security System`;case n.Battery:return`Battery`;default:return`Sensor`}}function U(e,t){switch(e){case`light`:return t?{color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 8px rgba(250, 204, 21, 0.8))`}:{color:`var(--text-secondary-color)`};case`siren`:return t?{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 8px rgba(239, 68, 68, 0.8))`}:{color:`var(--text-secondary-color)`};case`switch`:return t?{color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.7))`}:{color:`var(--text-secondary-color)`};case`contact`:return t?{color:`rgb(251, 146, 60)`,filter:`drop-shadow(0 0 8px rgba(251, 146, 60, 0.6))`}:{color:`var(--text-secondary-color)`};case`lock`:return t?{color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.7))`}:{color:`var(--text-secondary-color)`};case`temperature`:return{color:`rgb(6, 182, 212)`};case`humidity`:return{color:`rgb(59, 130, 246)`};case`occupancy`:return t?{color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.7))`}:{color:`var(--text-secondary-color)`};case`smoke`:return t?{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 8px rgba(239, 68, 68, 0.8))`}:{color:`var(--text-secondary-color)`};case`leak`:return t?{color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 8px rgba(59, 130, 246, 0.7))`}:{color:`var(--text-secondary-color)`};case`garage`:return t?{color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.7))`}:{color:`var(--text-secondary-color)`};case`doorbell`:return t?{color:`rgb(234, 179, 8)`,filter:`drop-shadow(0 0 8px rgba(234, 179, 8, 0.8))`}:{color:`var(--text-secondary-color)`};case`securitySystem`:return t?{color:`rgb(168, 85, 247)`,filter:`drop-shadow(0 0 8px rgba(168, 85, 247, 0.7))`}:{color:`var(--text-secondary-color)`};case`battery`:return t?{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 8px rgba(239, 68, 68, 0.8))`}:{color:`var(--text-secondary-color)`};default:return{color:`var(--text-secondary-color)`}}}function nn(e){switch(e){case n.Contact:return`contact`;case n.Light:return`light`;case n.Switch:return`switch`;case n.Siren:return`siren`;case n.Lock:return`lock`;case n.Temperature:return`temperature`;case n.Humidity:return`humidity`;case n.Occupancy:return`occupancy`;case n.Smoke:return`smoke`;case n.Leak:return`leak`;case n.Garage:return`garage`;case n.Doorbell:return`doorbell`;case n.SecuritySystem:return`securitySystem`;case n.Battery:return`battery`;default:return`contact`}}function rn(e,t,n,r){return e.find(e=>{let i=String(e.type).toLowerCase()===String(t).toLowerCase(),a=e.name===n,o=e.pluginId===r;return i&&a&&o})}function W(e){return e?Se(e)?e.getProperty(Ne.Detected)??!1:ce(e)?e.getProperty(fe.On)??!1:e.type===n.Switch?e.getProperty(Ee.On)??!1:i(e)?e.getProperty(we.Active)??!1:Pe(e)?(e.getProperty(ue.TargetState)??0)===0:je(e)?e.getProperty(S.Detected)??!1:r(e)?e.getProperty(be.Detected)??!1:Ae(e)?e.getProperty(ye.Detected)??!1:ge(e)?(e.getProperty(he.TargetState)??1)===0:w(e)?e.getProperty(ke.Ring)??!1:_(e)?(e.getProperty(_e.TargetState)??x.Disarmed)!==x.Disarmed:pe(e)?e.getProperty(h.Low)??!1:!1:!1}async function an(e){let t=rn(y.value,e.shortcut.sensorType,e.shortcut.sensorName,e.shortcut.sensorPluginId);if(!t||!de)return;let r=W(t);try{ce(t)?await t.setProperty(fe.On,!r):t.type===n.Switch?await t.setProperty(Ee.On,!r):i(t)?await t.setProperty(we.Active,!r):Pe(t)?await t.setProperty(ue.TargetState,+!!r):ge(t)?await t.setProperty(he.TargetState,+!!r):w(t)&&await t.setProperty(ke.Ring,!0)}catch(e){te.error(`Failed to toggle sensor:`,e)}}async function G(e,t){let n=rn(y.value,e.shortcut.sensorType,e.shortcut.sensorName,e.shortcut.sensorPluginId);if(!(!n||!de))try{await n.setProperty(_e.TargetState,t)}catch(e){te.error(`Failed to set security system state:`,e)}}function on(e,t){return!e||!_(e)?!1:e.getProperty(_e.TargetState)===t}function K(e){return!e||!_(e)?x.Disarmed:e.getProperty(_e.CurrentState)??e.getProperty(_e.TargetState)??x.Disarmed}function sn(e,t){e&&(R.value[t]=e)}function cn(e){return Co.has(e)}function ln(e){if(!e||!_(e))return`--`;switch(e.getProperty(_e.TargetState)){case x.Disarmed:return`Disarmed`;case x.StayArm:return`Stay Arm`;case x.AwayArm:return`Away Arm`;case x.NightArm:return`Night Arm`;case x.AlarmTriggered:return`ALARM`;default:return`--`}}function un(e){return!e||!pe(e)?`--`:`${e.getProperty(h.Level)??0}%${e.getProperty(h.Charging)===t.Charging?` ⚡`:``}`}function dn(e){return!e||!pe(e)?!1:e.getProperty(h.Charging)===t.Charging}function fn(e){return!e||!pe(e)?0:e.getProperty(h.Level)??0}function q(e){let t=fn(e);return t>=90?100:t>=70?80:t>=50?60:t>=30?40:t>=15?20:0}function pn(e){if(dn(e))return{color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.6))`};let t=fn(e);return t<15?{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.7))`}:t<30?{color:`rgb(251, 146, 60)`}:t<50?{color:`rgb(234, 179, 8)`}:{color:`rgb(34, 197, 94)`}}function mn(e){if(!So.has(e.shortcut.sensorType)&&de){if(e.shortcut.sensorType===`securitySystem`){let t=R.value[e.shortcut._id],n=st.value[e.shortcut._id];t&&n&&t.toggle({currentTarget:n});return}an(e)}}function hn(e,t){vt.value||(a.toggleQueryActivator(`getCamerasQuery`,t),H.value[e]=vt.value?!1:t,t&&Object.entries(H.value).forEach(([t,n])=>{t!==e&&n&&(H.value[t]=!1)}))}function gn(e){vt.value||(jt.value[e._id]=!0,An(e))}function _n(e,t){if(jt.value[t._id]){delete jt.value[t._id];return}if(!e)if(!H.value[t._id])hn(t._id,!0);else{let e=Ft.value&&me?Math.floor(me.currentTimestamp.value/1e3):void 0;hn(t._id,!1),Nn(t.cameraId,e)}}function vn(e,t){vt.value||(H.value[e]=vt.value?!1:t,t&&Object.entries(H.value).forEach(([t,n])=>{t!==e&&n&&(H.value[t]=!1)}))}function bn(e){vt.value||(jt.value[e._id]=!0,Sn(e))}function xn(e){if(jt.value[e.shortcut._id]){delete jt.value[e.shortcut._id];return}vt.value||!So.has(e.shortcut.sensorType)&&de&&mn(e)}function Sn(e){Mt.value.add(e._id),lt.value[e._id]?.hide(),H.value[e._id]=!1,z.value[e._id]?.destroy(),delete z.value[e._id],delete _t.value[e._id],delete st.value[e._id],qe({username:Yt.value,cameraname:p.value,shortcutid:e._id},{onSettled:()=>{Mt.value.delete(e._id)}})}function Cn(){Object.entries(z.value).forEach(([e,t])=>{let n=rt.value;if(!n)return;let r=n.getBoundingClientRect(),i=t.element.getBoundingClientRect(),a=(i.left-r.left)/r.width*100,o=(i.top-r.top)/r.height*100;_t.value[e]={x:Math.max(0,Math.min(a,100)),y:Math.max(0,Math.min(o,100))}})}function wn(){Object.entries(z.value).forEach(([e,t])=>{let n=_t.value[e];if(!n)return;let r=rt.value;if(!r)return;let i=r.getBoundingClientRect(),a=t.element.getBoundingClientRect(),o=i.width-a.width,s=i.height-a.height,c=Math.max(0,Math.min(n.x/100*i.width,o)),l=Math.max(0,Math.min(n.y/100*i.height,s));t.setPosition(c,l)}),xt.value=!1}function Tn(){Object.entries(_t.value).forEach(([e,t])=>{_t.value[e]={x:Math.max(0,Math.min(t.x,100)),y:Math.max(0,Math.min(t.y,100))}}),wn()}function En(){for(let[e,t]of Object.entries(z.value))Tt.value.find(t=>t._id===e)||(t.destroy(),delete z.value[e],delete _t.value[e]);for(let[e]of Object.entries(_t.value))Tt.value.find(t=>t._id===e)||delete _t.value[e];for(let[e,t]of Object.entries(st.value)){let n=Tt.value.find(t=>t._id===e);if(t&&n&&rt.value){z.value[n._id]&&z.value[n._id].destroy();let r=new wo.default(t,{containment:rt.value});v.value&&r.disable(),z.value[n._id]=r;let[i,a]=n.points,o=rt.value.getBoundingClientRect(),s=i/100*o.width,c=a/100*o.height;r.setPosition(s,c),_t.value[n._id]={x:i,y:a},r.on(`dragMove`,()=>{vt.value=!0,lt.value[e]?.alignOverlay()}),r.on(`dragEnd`,()=>{setTimeout(()=>{vt.value=!1},50),Cn();let e=_t.value[n._id];ze({username:Yt.value,cameraname:p.value,shortcutid:n._id,shortcutData:{points:[e.x,e.y]}})})}}wn()}function Dn(e){if(!g.value||!rt.value||v.value)return;bt.value=!0;let t=rt.value.getBoundingClientRect();yt.value={x:Math.max(0,Math.min(e.clientX-t.left-35/2,t.width-35)),y:Math.max(0,Math.min(e.clientY-t.top-35/2,t.height-35))}}async function On(e){if(!$e.value||!rt.value)return;let t=rt.value,n=$e.value,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=i.left-r.left,o=i.top-r.top,s=a/r.width*100,c=o/r.height*100;He({username:Yt.value,cameraname:p.value,shortcutData:{_id:``,type:`camera`,points:[s,c],cameraId:e._id}},{onSettled:()=>{bt.value=!1,yt.value=void 0,it.value?.hide()}})}async function kn(e){if(!$e.value||!rt.value)return;let t=rt.value,n=$e.value,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=i.left-r.left,o=i.top-r.top,s=a/r.width*100,c=o/r.height*100;He({username:Yt.value,cameraname:p.value,shortcutData:{_id:``,type:`sensor`,points:[s,c],sensorType:nn(e.type),sensorName:e.name,sensorPluginId:e.pluginId??``,sensorCameraId:Ce.value?._id??``}},{onSettled:()=>{bt.value=!1,yt.value=void 0,it.value?.hide()}})}function An(e){Mt.value.add(e._id),lt.value[e._id]?.hide(),H.value[e._id]=!1,z.value[e._id]?.destroy(),delete z.value[e._id],delete _t.value[e._id],delete st.value[e._id],qe({username:Yt.value,cameraname:p.value,shortcutid:e._id},{onSettled:()=>{Mt.value.delete(e._id)}})}function jn(e,t){st.value[t]=e}function Mn(e,t){lt.value[t]=e}async function Nn(e,t){if(vt.value)return;let n=(await qt({cameraname:e,signal:new AbortController().signal})).name;n&&(t===void 0?d.push(`/cameras/${n}`):d.push({path:`/cameras/${n}`,query:{startTs:String(t)}}))}function Pn(e){!e&&!bt.value&&(yt.value=void 0),Et.value=e,a.toggleQueryActivator(`getCamerasQuery`,e)}return T([Me,Ce],()=>{Me.value&&Ce.value&&(Tt.value=Re(Me.value))},{immediate:!0,deep:!0}),T([Nt.width,Nt.height],()=>{xt.value=!0,ot(()=>{Tn()})}),T(Tt,()=>{ot(()=>{En()})},{deep:!0,immediate:!0}),T(xt,e=>{e&&(yt.value=void 0)}),T([$e,yt],([e,t])=>{e&&t&&setTimeout(()=>{it.value?.show({currentTarget:e})},50)},{deep:!0}),T(H,()=>{Object.entries(H.value).forEach(([e,t])=>{if(t&<.value[e]){let t=st.value[e];t&<.value[e]?.show({currentTarget:t})}else lt.value[e]?.hide()})},{deep:!0}),T(m,e=>{e||(Object.values(lt.value).forEach(e=>e?.hide()),Object.keys(H.value).forEach(e=>{H.value[e]=!1}))}),T(g,e=>{e||(yt.value=void 0,bt.value=!1,it.value?.hide())}),T(v,e=>{Object.values(z.value).forEach(t=>{e?t.disable():t.enable()}),e&&(yt.value=void 0,bt.value=!1)}),T(Xt,(e,t)=>{t&&Ze.get(t._id)?.stop(),e&&me&&Ft.value&&Zt(e).play(me.currentTimestamp.value,!0)}),T(()=>me?.mode.value,e=>{if(!Xt.value||!me)return;let t=Ze.get(Xt.value._id);if(t)switch(e){case`idle`:t.stop();break;case`play`:t.play(me.currentTimestamp.value,!0);break;case`pause`:t.pause();break}}),T(()=>me?.currentTimestamp.value,e=>{!Xt.value||!me||!e||me.mode.value===`scrub`&&Ze.get(Xt.value._id)?.scrub(e,!0)}),T(()=>me?.speed.value,e=>{!Xt.value||!e||Ze.get(Xt.value._id)?.setSpeed(e)}),We(()=>{st.value={}}),Ge(()=>{ot(()=>{En()})}),Ye(()=>{Object.values(z.value).forEach(e=>e.destroy())}),(e,t)=>{let r=xo,i=c,a=ie,o=Lc,s=f,l=vo,u=ho,ee=fo,te=Pt,d=co,ne=ao,p=tn,re=no,h=$a,_=Xa,ae=Gt,y=qa,b=Wa,oe=Va,se=Ra,ce=Fa,S=Ma,le=ka,ue=Ea,fe=Ca,pe=ba,me=_a,he=ma,ge=da,_e=ca,ve=aa,C=na,ye=$i,w=Xi,be=qi,xe=Q,Se=Hi,Ce=zi,we=Ii,Te=Ni,Ee=Ai,Oe=Di,ke=St,Ae=wi,je=Ot,Me=It,Ne=yn,Pe=wt,Fe=xi,Ie=Wt,Le=Bt,Re=Dt,ze=kt,Be=Ct;return V(),M(`div`,{ref_key:`shortcutContainerRef`,ref:rt,class:E([`shortcut-container min-w-0`,{"!pointer-events-auto":O(g)&&!O(v),hidden:!O(m)}]),style:k({cursor:O(g)&&!O(v)?`pointer`:`default`}),onClick:tt(Dn,[`self`])},[(V(!0),M(F,null,Xe(O(Rt),e=>dt((V(),M(`div`,{ref_for:!0,ref:t=>jn(t,e._id),key:e._id,onMousedown:t[0]||=tt(()=>{},[`stop`]),onTouchstart:t[1]||=tt(()=>{},[`stop`]),onWheel:t[2]||=tt(()=>{},[`stop`]),class:`draggable absolute pointer-events-auto camera-shortcut`,style:k({background:O(H)[e._id]?`#545454`:void 0})},[B(i,{severity:`secondary`,rounded:``,class:`cui-icon-lg shadow-sm pointer-events-auto`},{icon:P(()=>[B(r,{width:`100%`,height:`100%`})]),_:1}),B(s,{ref_for:!0,ref:t=>Mn(t,e._id),class:`shadow-lg cui-rounded-corner overflow-hidden`,pt:{content:{class:`p-0`}}},{default:P(()=>[A(`div`,To,[O(De)?.result.find(t=>t._id===e.cameraId)?(V(),j(o,{key:1,"source-role":O(Ft)?void 0:`low-resolution`,"camera-info":O(De).result.find(t=>t._id===e.cameraId),"nvr-controller":O(Ft)?Zt(e):void 0,toolbar:!1,control:!1,subcontrol:!1,"isolated-stream":!0,"live-indicator-overlay":``,class:`w-full`,"flat-card":``},null,8,[`source-role`,`camera-info`,`nvr-controller`])):(V(),j(a,{key:0,"stroke-width":`5`,class:`w-[30px] h-[30px]`}))])]),_:2},1536)],36)),[[ut,!O(Mt).has(e._id)],[O(gt),[t=>hn(e._id,t),{delayEnter:0,delayLeave:1e3}]],[O(ht),[()=>gn(e),{distanceThreshold:24,delay:500,onMouseUp:(t,n,r)=>_n(r,e)}]]])),128)),(V(!0),M(F,null,Xe(O(Ht),e=>dt((V(),M(`div`,{ref_for:!0,ref:t=>jn(t,e.shortcut._id),key:e.shortcut._id,onMouseenter:t=>vn(e.shortcut._id,!0),onMouseleave:t=>vn(e.shortcut._id,!1),onMousedown:t[3]||=tt(()=>{},[`stop`]),onTouchstart:t[4]||=tt(()=>{},[`stop`]),onWheel:t[5]||=tt(()=>{},[`stop`]),class:E([`draggable absolute pointer-events-auto sensor-shortcut`,{"sensor-active":W(e.sensor),"sensor-offline":!e.isOnline,"sensor-readonly":O(So).has(e.shortcut.sensorType)||!O(de)}]),style:k({background:O(H)[e.shortcut._id]?`#545454`:void 0})},[B(i,{severity:`secondary`,rounded:``,class:`cui-icon-lg shadow-sm pointer-events-auto`},{icon:P(()=>[e.shortcut.sensorType===`contact`&&W(e.sensor)?(V(),j(l,{key:0,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`contact`?(V(),j(u,{key:1,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`light`&&W(e.sensor)?(V(),j(ee,{key:2,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`light`?(V(),j(te,{key:3,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`switch`?(V(),j(d,{key:4,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,W(e.sensor)))},null,8,[`style`])):e.shortcut.sensorType===`siren`?(V(),j(ne,{key:5,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,W(e.sensor)))},null,8,[`style`])):e.shortcut.sensorType===`lock`&&W(e.sensor)?(V(),j(p,{key:6,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`lock`?(V(),j(re,{key:7,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`temperature`?(V(),j(h,{key:8,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`humidity`?(V(),j(_,{key:9,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`occupancy`&&W(e.sensor)?(V(),j(ae,{key:10,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`occupancy`?(V(),j(y,{key:11,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`smoke`&&W(e.sensor)?(V(),j(b,{key:12,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`smoke`?(V(),j(oe,{key:13,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`leak`&&W(e.sensor)?(V(),j(se,{key:14,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`leak`?(V(),j(ce,{key:15,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`garage`&&W(e.sensor)?(V(),j(S,{key:16,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`garage`?(V(),j(le,{key:17,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`doorbell`?(V(),j(ue,{key:18,width:`100%`,height:`100%`,class:E({"doorbell-shake":W(e.sensor)}),style:k(U(e.shortcut.sensorType,W(e.sensor)))},null,8,[`class`,`style`])):e.shortcut.sensorType===`securitySystem`&&K(e.sensor)===O(x).AlarmTriggered?(V(),j(fe,{key:19,width:`100%`,height:`100%`,style:{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 10px rgba(239, 68, 68, 0.9))`},class:`security-alarm-pulse`})):e.shortcut.sensorType===`securitySystem`&&K(e.sensor)===O(x).StayArm?(V(),j(pe,{key:20,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`securitySystem`&&K(e.sensor)===O(x).AwayArm?(V(),j(me,{key:21,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`securitySystem`&&K(e.sensor)===O(x).NightArm?(V(),j(he,{key:22,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!0))},null,8,[`style`])):e.shortcut.sensorType===`securitySystem`?(V(),j(ge,{key:23,width:`100%`,height:`100%`,style:k(U(e.shortcut.sensorType,!1))},null,8,[`style`])):e.shortcut.sensorType===`battery`?(V(),M(F,{key:24},[dn(e.sensor)&&q(e.sensor)===100?(V(),j(_e,{key:0,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):dn(e.sensor)&&q(e.sensor)===80?(V(),j(ve,{key:1,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):dn(e.sensor)&&q(e.sensor)===60?(V(),j(C,{key:2,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):dn(e.sensor)&&q(e.sensor)===40?(V(),j(ye,{key:3,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):dn(e.sensor)&&q(e.sensor)===20?(V(),j(w,{key:4,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):dn(e.sensor)?(V(),j(be,{key:5,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):q(e.sensor)===100?(V(),j(xe,{key:6,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):q(e.sensor)===80?(V(),j(Se,{key:7,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):q(e.sensor)===60?(V(),j(Ce,{key:8,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):q(e.sensor)===40?(V(),j(we,{key:9,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):q(e.sensor)===20?(V(),j(Te,{key:10,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`])):(V(),j(Ee,{key:11,width:`100%`,height:`100%`,style:k(pn(e.sensor))},null,8,[`style`]))],64)):I(``,!0)]),_:2},1024),e.shortcut.sensorType===`securitySystem`?(V(),j(s,{key:0,ref_for:!0,ref:t=>sn(t,e.shortcut._id),class:`shadow-lg cui-rounded-corner`,pt:{content:{class:`p-2`}},"append-to":`body`},{default:P(()=>[A(`div`,Do,[A(`button`,{type:`button`,class:E([`security-state-button`,{"security-state-button--active":on(e.sensor,O(x).Disarmed)}]),onClick:t=>G(e,O(x).Disarmed)},[B(ge,{class:`w-4 h-4`}),t[9]||=A(`span`,{class:`text-sm`},`Disarmed`,-1)],10,Oo),A(`button`,{type:`button`,class:E([`security-state-button`,{"security-state-button--active":on(e.sensor,O(x).StayArm)}]),onClick:t=>G(e,O(x).StayArm)},[B(pe,{class:`w-4 h-4`}),t[10]||=A(`span`,{class:`text-sm`},`Stay Arm`,-1)],10,ko),A(`button`,{type:`button`,class:E([`security-state-button`,{"security-state-button--active":on(e.sensor,O(x).AwayArm)}]),onClick:t=>G(e,O(x).AwayArm)},[B(me,{class:`w-4 h-4`}),t[11]||=A(`span`,{class:`text-sm`},`Away Arm`,-1)],10,Ao),A(`button`,{type:`button`,class:E([`security-state-button`,{"security-state-button--active":on(e.sensor,O(x).NightArm)}]),onClick:t=>G(e,O(x).NightArm)},[B(he,{class:`w-4 h-4`}),t[12]||=A(`span`,{class:`text-sm`},`Night Arm`,-1)],10,jo)])]),_:2},1536)):I(``,!0),B(s,{ref_for:!0,ref:t=>Mn(t,e.shortcut._id),class:`shadow-lg cui-rounded-corner`,pt:{content:{class:`p-2`}}},{default:P(()=>[A(`div`,Mo,[A(`div`,No,D(e.sensor?.displayName.value??e.shortcut.sensorName),1),A(`div`,{class:E([`sensor-tooltip-status`,{"text-color":cn(e.shortcut.sensorType),"text-purple-500":e.shortcut.sensorType===`securitySystem`&&W(e.sensor)&&K(e.sensor)!==O(x).AlarmTriggered,"text-red-500":e.shortcut.sensorType===`securitySystem`&&K(e.sensor)===O(x).AlarmTriggered,"text-green-500":!cn(e.shortcut.sensorType)&&e.shortcut.sensorType!==`securitySystem`&&W(e.sensor),"text-gray-400":!cn(e.shortcut.sensorType)&&e.shortcut.sensorType!==`securitySystem`&&!W(e.sensor)}])},[e.shortcut.sensorType===`contact`?(V(),M(F,{key:0},[ft(D(W(e.sensor)?`Open`:`Closed`),1)],64)):e.shortcut.sensorType===`lock`?(V(),M(F,{key:1},[ft(D(W(e.sensor)?`Locked`:`Unlocked`),1)],64)):e.shortcut.sensorType===`temperature`?(V(),M(F,{key:2},[ft(D(e.sensor?.getProperty(`current`)??`--`)+`°C `,1)],64)):e.shortcut.sensorType===`humidity`?(V(),M(F,{key:3},[ft(D(e.sensor?.getProperty(`current`)??`--`)+`% `,1)],64)):e.shortcut.sensorType===`occupancy`?(V(),M(F,{key:4},[ft(D(W(e.sensor)?`Occupied`:`Empty`),1)],64)):e.shortcut.sensorType===`smoke`?(V(),M(F,{key:5},[ft(D(W(e.sensor)?`Smoke Detected`:`Clear`),1)],64)):e.shortcut.sensorType===`leak`?(V(),M(F,{key:6},[ft(D(W(e.sensor)?`Leak Detected`:`Clear`),1)],64)):e.shortcut.sensorType===`garage`?(V(),M(F,{key:7},[ft(D(W(e.sensor)?`Open`:`Closed`),1)],64)):e.shortcut.sensorType===`doorbell`?(V(),M(F,{key:8},[ft(D(W(e.sensor)?`Ringing`:`Ready`),1)],64)):e.shortcut.sensorType===`securitySystem`?(V(),M(F,{key:9},[ft(D(ln(e.sensor)),1)],64)):e.shortcut.sensorType===`battery`?(V(),M(F,{key:10},[ft(D(un(e.sensor)),1)],64)):(V(),M(F,{key:11},[ft(D(W(e.sensor)?`On`:`Off`),1)],64))],2),e.isOnline?I(``,!0):(V(),M(`div`,Po,`Offline`))])]),_:2},1536)],46,Eo)),[[ut,!O(Mt).has(e.shortcut._id)],[O(ht),[()=>bn(e.shortcut),{distanceThreshold:24,delay:500,onMouseUp:()=>xn(e)}]]])),128)),O(yt)?(V(),M(`div`,{key:0,ref_key:`placeholderRef`,ref:$e,class:`draggable absolute pointer-events-auto`,style:k(`left: ${O(yt).x}px; top: ${O(yt).y}px;`)},[B(i,{severity:`secondary`,rounded:``,class:`cui-icon-lg shadow-sm pointer-events-auto`},{icon:P(()=>[B(Oe,{width:`100%`,height:`100%`})]),_:1})],4)):I(``,!0),O(g)&&!O(vt)&&!O(xt)?(V(),j(s,{key:1,ref_key:`camerasMenuRef`,ref:it,class:`shadow-lg cui-rounded-corner`,"auto-z-index":!0,"append-to":`body`,onShow:t[7]||=e=>Et.value=!0,onHide:t[8]||=e=>Pn(!1)},{default:P(()=>[B(Be,{value:O(At),"onUpdate:value":t[6]||=e=>ct(At)?At.value=e:null,class:`shortcut-menu-tabs`},{default:P(()=>[B(je,{pt:{content:{class:`border-b border-color`}}},{default:P(()=>[B(ke,{value:`cameras`,class:`flex items-center gap-2 px-3 py-2`},{default:P(()=>[B(r,{class:`w-4 h-4`}),t[13]||=A(`span`,{class:`text-sm`},`Cameras`,-1)]),_:1}),B(ke,{value:`sensors`,class:`flex items-center gap-2 px-3 py-2`},{default:P(()=>[B(Ae,{class:`w-4 h-4`}),t[14]||=A(`span`,{class:`text-sm`},`Sensors`,-1)]),_:1})]),_:1}),B(ze,null,{default:P(()=>[B(Pe,{value:`cameras`},{default:P(()=>[A(`div`,Fo,[(V(!0),M(F,null,Xe(O(Kt),e=>(V(),M(`div`,{key:e._id,class:E([`shortcut-menu-item`,{"shortcut-menu-item-disabled":$t(e)}]),onClick:tt(t=>!$t(e)&&On(e),[`prevent`])},[B(Me,{camera:e,width:`100%`,loading:O(Ut)},null,8,[`camera`,`loading`]),$t(e)?(V(),M(`div`,Lo,[B(Ne,{class:`w-6 h-6 text-green-500`})])):I(``,!0)],10,Io))),128)),O(Kt).length===0?(V(),M(`div`,Ro,`No other cameras available`)):I(``,!0)])]),_:1}),B(Pe,{value:`sensors`},{default:P(()=>[A(`div`,zo,[O(Vt).length>0?(V(!0),M(F,{key:0},Xe(O(Vt),(e,t)=>(V(),M(F,{key:e.id},[B(Le,{disabled:Qt(e),onClick:t=>!Qt(e)&&kn(e),"button-props":{pt:{root:{class:`p-0!`}}}},at({prepend:P(()=>[A(`div`,Bo,[e.type===O(n).Contact?(V(),j(u,{key:0,class:`w-5 h-5`})):e.type===O(n).Temperature?(V(),j(h,{key:1,class:`w-5 h-5`})):e.type===O(n).Humidity?(V(),j(_,{key:2,class:`w-5 h-5`})):e.type===O(n).Occupancy?(V(),j(ae,{key:3,class:`w-5 h-5`})):e.type===O(n).Smoke?(V(),j(b,{key:4,class:`w-5 h-5`})):e.type===O(n).Leak?(V(),j(se,{key:5,class:`w-5 h-5`})):e.type===O(n).Light?(V(),j(Fe,{key:6,class:`w-5 h-5`})):e.type===O(n).Switch?(V(),j(d,{key:7,class:`w-5 h-5`})):e.type===O(n).Siren?(V(),j(ne,{key:8,class:`w-5 h-5`})):e.type===O(n).Lock?(V(),j(p,{key:9,class:`w-5 h-5`})):e.type===O(n).Garage?(V(),j(le,{key:10,class:`w-5 h-5`})):e.type===O(n).Doorbell?(V(),j(ue,{key:11,class:`w-5 h-5`})):e.type===O(n).SecuritySystem?(V(),j(Ie,{key:12,class:`w-5 h-5`})):e.type===O(n).Battery?(V(),j(xe,{key:13,class:`w-5 h-5`})):I(``,!0)])]),subtitle:P(()=>[ft(D(en(e.type)),1)]),default:P(()=>[ft(` `+D(e.displayName.value)+` `,1)]),_:2},[Qt(e)?{name:`append`,fn:P(()=>[B(Ne,{class:`w-4 h-4 text-green-500`})]),key:`0`}:void 0]),1032,[`disabled`,`onClick`]),t<O(Vt).length-1?(V(),j(Re,{key:0,class:`!my-1`})):I(``,!0)],64))),128)):(V(),M(`div`,Vo,`No sensors available`))])]),_:1})]),_:1})]),_:1},8,[`value`])]),_:1},512)):I(``,!0)],6)}}}),[[`__scopeId`,`data-v-fde561f7`]]),Uo={viewBox:`0 0 512 512`,width:`1.2em`,height:`1.2em`};function Wo(e,t){return V(),M(`svg`,Uo,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`48`,d:`m184 112l144 144l-144 144`},null,-1)]])}var Go=R({name:`ion-chevron-forward-outline`,render:Wo}),Ko={viewBox:`0 0 512 512`,width:`1.2em`,height:`1.2em`};function qo(e,t){return V(),M(`svg`,Ko,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`48`,d:`M328 112L184 256l144 144`},null,-1)]])}var Jo=R({name:`ion-chevron-back-outline`,render:qo}),Yo={viewBox:`0 0 512 512`,width:`1.2em`,height:`1.2em`};function Xo(e,t){return V(),M(`svg`,Yo,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`48`,d:`m112 184l144 144l144-144`},null,-1)]])}var Zo=R({name:`ion-chevron-down-outline`,render:Xo}),Qo={viewBox:`0 0 512 512`,width:`1.2em`,height:`1.2em`};function $o(e,t){return V(),M(`svg`,Qo,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`48`,d:`m112 328l144-144l144 144`},null,-1)]])}var es=R({name:`ion-chevron-up-outline`,render:$o}),ts={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ns(e,t){return V(),M(`svg`,ts,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M18 12.998H6a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2`},null,-1)]])}var rs=R({name:`ic-round-minus`,render:ns}),is={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function as(e,t){return V(),M(`svg`,is,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M18 12.998h-5v5a1 1 0 0 1-2 0v-5H6a1 1 0 0 1 0-2h5v-5a1 1 0 0 1 2 0v5h5a1 1 0 0 1 0 2`},null,-1)]])}var os=R({name:`ic-round-plus`,render:as}),ss={size:`small`},cs={class:`relative w-full h-full`},ls={class:`absolute top-1`,style:{color:`#646464`}},us={class:`absolute bottom-1`,style:{color:`#646464`}},ds={class:`absolute left-1`,style:{color:`#646464`}},fs={class:`absolute right-1`,style:{color:`#646464`}},ps=100,$=.05,ms=.05,hs=.03,gs=z({__name:`CuiPTZControl`,props:qe({cameraDevice:{},size:{}},ss),emits:[`panTiltChange`,`zoomChange`],setup(e,{expose:t,emit:n}){let r=e,i=n,{cameraDevice:a,size:o}=nt(r),s=Ie(),{sensor:c}=l(a),u=Qe(`panTiltRef`),ee=Qe(`zoomRef`),te=it({x:0,y:0}),d=it({x:0,y:0}),ne=it({x:0,y:0}),f=N(!1),p=N(!1),m=N(0),re=N(0),h=N(0),g=N(!1),_=N(0),v=N(0),ie=N(0),ae=N(0),y=N(0),b=N(0),oe=N(0),se=N(`none`),x=N(0),ce=N(0),S=N(0),le=N(null),ue=N(Date.now()),de=L(()=>f.value||p.value),fe=L(()=>o.value===`small`?45:60),pe=L(()=>o.value===`small`?10:15),me=L(()=>g.value),he=L(()=>c.value?.hasCapability(xe.Pan)??!1),ge=L(()=>c.value?.hasCapability(xe.Tilt)??!1),_e=L(()=>c.value?.hasCapability(xe.Zoom)??!1),ve=L(()=>c.value?.hasCapability(xe.Presets)??!1),C=L(()=>c.value?.hasCapability(xe.Home)??!1),ye=L(()=>he.value||ge.value);function w(e){return Math.round(e*100)/100}function be(e){return w(Math.max(0,Math.min(1,e)))}async function Se(e){let t=Date.now();if(g.value&&t-_.value<ps)return;let n={panSpeed:w(e.panSpeed),tiltSpeed:w(e.tiltSpeed),zoomSpeed:w(e.zoomSpeed)};g.value=!0,_.value=t;try{await c.value?.setProperty(Te.Velocity,n)}catch(e){s.error(`PTZ continuous move failed:`,e)}finally{g.value=!1}}async function Ce(){let e=Date.now();g.value=!0,_.value=e;try{await c.value?.setProperty(Te.Velocity,{panSpeed:0,tiltSpeed:0,zoomSpeed:0})}catch(e){s.error(`PTZ stop failed:`,e)}finally{g.value=!1}}function we(){let e=Date.now(),t=(e-ue.value)/1e3;ue.value=e;let n=!1;if(f.value&&(Math.abs(y.value)>=$||Math.abs(b.value)>=$)){let e=y.value*ms*t*5,r=b.value*ms*t*5;x.value=Math.max(-1,Math.min(1,x.value+e)),ce.value=Math.max(-1,Math.min(1,ce.value+r));let a=w(x.value),o=w(ce.value);(d.x!==a||d.y!==o)&&(d.x=a,d.y=o,i(`panTiltChange`,{x:d.x,y:d.y}),n=!0)}if(p.value&&Math.abs(oe.value)>=$){let e=oe.value*hs*t*10;S.value=Math.max(0,Math.min(1,S.value+e));let r=w(S.value);re.value!==r&&(re.value=r,i(`zoomChange`,r),n=!0)}if(n&&de.value&&Date.now()-_.value>=ps*2){if(f.value&&(Math.abs(y.value)>=$||Math.abs(b.value)>=$)){let e=w(y.value),t=w(b.value);se.value===`pan`?Se({panSpeed:e,tiltSpeed:0,zoomSpeed:0}):se.value===`tilt`?Se({panSpeed:0,tiltSpeed:t,zoomSpeed:0}):Se({panSpeed:e,tiltSpeed:t,zoomSpeed:0})}else if(p.value&&Math.abs(oe.value)>=$){let e=be(Math.abs(oe.value));Se({panSpeed:0,tiltSpeed:0,zoomSpeed:oe.value>0?e:-e})}}de.value&&(le.value=requestAnimationFrame(we))}function Ee(){le.value!==null&&cancelAnimationFrame(le.value),ue.value=Date.now(),le.value=requestAnimationFrame(we)}function De(){le.value!==null&&(cancelAnimationFrame(le.value),le.value=null)}async function Oe(){await new Promise(e=>setTimeout(e,50)),!de.value&&(Math.abs(v.value)>=$||Math.abs(ie.value)>=$||Math.abs(ae.value)>=$)&&(y.value=0,b.value=0,oe.value=0,se.value=`none`,v.value=0,ie.value=0,ae.value=0,await Ce(),De())}async function ke(e){if(!ee.value||!p.value)return;let t=ee.value.getBoundingClientRect(),n=t.top+t.height/2,r=fe.value,i=e-n;i=Math.max(-r,Math.min(r,i)),m.value=i;let a=-i/r;oe.value=a;let o=w(a);if(Math.abs(o)>=$&&Math.abs(o-ae.value)>=$){ae.value=o;let e=o>0,t=be(Math.abs(o));await Se({panSpeed:0,tiltSpeed:0,zoomSpeed:e?t:-t})}else p.value&&Math.abs(o)<$&&Math.abs(ae.value)>=$&&(oe.value=0,ae.value=0,await Ce())}function Ae(e){p.value=!0,ue.value=Date.now(),S.value=re.value,Ee(),e instanceof MouseEvent?ke(e.clientY):ke(e.touches[0].clientY)}async function je(e,t){if(!u.value||!f.value)return;let n=u.value.getBoundingClientRect(),r=n.width/2,i=n.height/2,a=e-n.left-r,o=t-n.top-i,s=Math.min(r,i)-pe.value,c=Math.sqrt(a*a+o*o);c>s&&(a=a/c*s,o=o/c*s),te.x=a,te.y=o;let l=a/s,ee=-o/s,d=Math.abs(l),p=Math.abs(ee);d>=$||p>=$?d>p?(se.value=`pan`,y.value=l,b.value=0):(se.value=`tilt`,y.value=0,b.value=ee):(se.value=`none`,y.value=0,b.value=0),(d>$||p>$)&&(ne.x=y.value,ne.y=b.value);let m=Math.abs(y.value-v.value),re=Math.abs(b.value-ie.value),h=m>=$||re>=$,g=Math.abs(y.value)>=$||Math.abs(b.value)>=$;if(g&&h){v.value=y.value,ie.value=b.value;let e=w(y.value),t=w(b.value);se.value===`pan`?await Se({panSpeed:e,tiltSpeed:0,zoomSpeed:0}):se.value===`tilt`&&await Se({panSpeed:0,tiltSpeed:t,zoomSpeed:0})}else f.value&&!g&&(Math.abs(v.value)>=$||Math.abs(ie.value)>=$)&&(y.value=0,b.value=0,se.value=`none`,v.value=0,ie.value=0,await Ce())}function Me(e){f.value=!0,ue.value=Date.now(),Ee(),e instanceof MouseEvent?je(e.clientX,e.clientY):je(e.touches[0].clientX,e.touches[0].clientY)}function Ne(e){f.value&&je(e.clientX,e.clientY),p.value&&ke(e.clientY)}function Pe(e){e.preventDefault(),f.value&&je(e.touches[0].clientX,e.touches[0].clientY),p.value&&ke(e.touches[0].clientY)}function Fe(){f.value&&(f.value=!1,te.x=0,te.y=0),p.value&&(h.value=re.value,p.value=!1,m.value=0),Oe()}async function Le(e){try{await c.value?.setProperty(Te.TargetPreset,e)}catch(e){s.error(`PTZ go to preset failed:`,e)}}async function Re(){try{await c.value?.setProperty(Te.Position,{pan:0,tilt:0,zoom:0})}catch(e){s.error(`PTZ go home failed:`,e)}}return Ge(()=>{window.addEventListener(`mousemove`,Ne),window.addEventListener(`mouseup`,Fe),window.addEventListener(`touchmove`,Pe,{passive:!1}),window.addEventListener(`touchend`,Fe)}),Ye(()=>{window.removeEventListener(`mousemove`,Ne),window.removeEventListener(`mouseup`,Fe),window.removeEventListener(`touchmove`,Pe),window.removeEventListener(`touchend`,Fe),De(),Ce()}),t({goToPreset:Le,goToHome:Re,isLoading:me,hasPan:he,hasTilt:ge,hasZoom:_e,hasPresets:ve,hasHome:C,hasPanTilt:ye}),(e,t)=>{let n=os,r=rs,i=es,a=Zo,s=Jo,c=Go;return V(),M(`div`,cs,[O(_e)?(V(),M(`div`,{key:0,ref_key:`zoomRef`,ref:ee,class:E([`pointer-events-auto`,[`absolute left-4 bottom-4 bg-black/70 rounded-full flex flex-col items-center justify-center border border-white/10 shadow-md`,O(o)===`small`?`w-12 h-36`:`w-16 h-48`]]),onMousedown:Ae,onTouchstart:tt(Ae,[`prevent`])},[A(`div`,{class:E([`absolute top-4 text-muted`,O(o)===`small`?`text-base`:`text-lg`])},[B(n)],2),A(`div`,{class:E([`absolute bottom-4 text-muted`,O(o)===`small`?`text-base`:`text-lg`])},[B(r)],2),A(`div`,{class:E([`bg-white rounded-full absolute cursor-grab active:cursor-grabbing shadow-lg`,O(o)===`small`?`w-8 h-8`:`w-10 h-10`]),style:k({transform:`translateY(${O(m)}px)`})},null,6)],34)):I(``,!0),O(ye)?(V(),M(`div`,{key:1,ref_key:`panTiltRef`,ref:u,class:E([`pointer-events-auto`,[`absolute right-4 bottom-4 bg-black/70 rounded-full flex items-center justify-center border border-white/10 shadow-md`,O(o)===`small`?`w-24 h-24`:`w-32 h-32`]]),onMousedown:Me,onTouchstart:tt(Me,[`prevent`])},[A(`div`,ls,[B(i)]),A(`div`,us,[B(a)]),A(`div`,ds,[B(s)]),A(`div`,fs,[B(c)]),A(`div`,{class:E([`bg-white rounded-full absolute cursor-grab active:cursor-grabbing shadow-lg transform -translate-x-1/2 -translate-y-1/2`,O(o)===`small`?`w-8 h-8`:`w-10 h-10`]),style:k({left:`calc(50% + ${O(te).x}px)`,top:`calc(50% + ${O(te).y}px)`})},null,6)],34)):I(``,!0)])}}}),_s={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function vs(e,t){return V(),M(`svg`,_s,[...t[0]||=[A(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m14 7l-5 5l5 5`},null,-1)]])}var ys=R({name:`iconamoon-arrow-left2-light`,render:vs}),bs=Ie();async function xs(){return null}async function Ss(){let e=await xs();if(e)try{await e.start()}catch(e){bs.warn(`IntercomService.start failed`,e)}}async function Cs(){let e=await xs();if(e)try{await e.stop()}catch(e){bs.warn(`IntercomService.stop failed`,e)}}var ws={class:`flex flex-col gap-6`},Ts={key:0,class:`flex flex-col gap-4`},Es={class:`flex flex-col field-gap`},Ds={class:`cui-label`},Os={class:`flex flex-col field-gap`},ks={class:`cui-label`},As={class:`flex flex-col field-gap`},js={class:`cui-label`},Ms={class:`flex flex-col field-gap`},Ns={class:`cui-label`},Ps={key:1,class:`flex flex-col gap-4`},Fs={class:`flex flex-col field-gap`},Is={class:`cui-label`},Ls={class:`flex flex-col field-gap`},Rs={class:`cui-label`},zs=z({__name:`ShareForm`,props:{cameraId:{},cameraName:{},sources:{}},setup(e,{expose:t}){let n=new Zt,r=e,{t:i}=de(),{copy:a}=Oe({legacy:!0}),o=Ue(`dialogRefProps`),{mutateAsync:s,isPending:l}=n.createShareQuery(),u=[{label:`1 `+i(`shares.hour`),value:1},{label:`24 `+i(`shares.hours`),value:24},{label:`7 `+i(`shares.days`),value:168},{label:`30 `+i(`shares.days`),value:720}],ee=[{label:i(`shares.unlimited`),value:0},{label:`1`,value:1},{label:`5`,value:5},{label:`10`,value:10}],te=r.sources.map(e=>({label:e.name,value:e._id})),d=N(24),ne=N(0),f=N(``),p=N(r.sources.find(e=>e.role===`high-resolution`)?._id??r.sources[0]?._id??``),m=N(null),re=L(()=>!!navigator.share),h=L(()=>!!(o.loading?.value||l.value));async function g(){if(m.value)try{await navigator.share({title:i(`shares.share_title`),text:`${m.value.link}\n\n${i(`shares.code`)}: ${m.value.code}`})}catch{}}async function _(){if(m.value)return;let e;try{e=await s({shareData:{cameraId:r.cameraId,sourceId:p.value,ttlHours:d.value,maxViewers:ne.value,label:f.value||void 0}})}catch{return null}return m.value=e,o.confirmText.value=i(`shares.done`),null}return t({isLoading:h,onConfirm:_}),(e,t)=>{let n=At,r=De,i=Yt,o=H,s=Et,l=jt,h=c;return V(),M(`div`,ws,[O(m)?(V(),M(`div`,Ps,[A(`div`,Fs,[A(`label`,Is,D(e.$t(`shares.link`)),1),B(s,null,{default:P(()=>[B(r,{"model-value":O(m).link,readonly:``,class:`w-full font-mono text-sm`},null,8,[`model-value`]),B(o,null,{default:P(()=>[B(i,{"action-text":e.$t(`components.form.tooltip.copied`),icon:O(Xt),"button-props":{severity:`secondary`,text:!0},onAction:t[4]||=e=>O(a)(O(m).link)},null,8,[`action-text`,`icon`])]),_:1})]),_:1})]),A(`div`,Ls,[A(`label`,Rs,D(e.$t(`shares.code`)),1),B(s,null,{default:P(()=>[B(r,{"model-value":O(m).code,readonly:``,class:`w-full font-mono text-lg tracking-widest text-center`},null,8,[`model-value`]),B(o,null,{default:P(()=>[B(i,{"action-text":e.$t(`components.form.tooltip.copied`),icon:O(Xt),"button-props":{severity:`secondary`,text:!0},onAction:t[5]||=e=>O(a)(O(m).code)},null,8,[`action-text`,`icon`])]),_:1})]),_:1}),B(l,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:P(()=>[ft(D(e.$t(`shares.code_save_hint`)),1)]),_:1})]),O(re)?(V(),j(h,{key:0,label:e.$t(`shares.share`),class:`w-full cui-button-medium`,onClick:g},null,8,[`label`])):I(``,!0)])):(V(),M(`div`,Ts,[A(`div`,Es,[A(`label`,Ds,D(e.$t(`shares.source`)),1),B(n,{modelValue:O(p),"onUpdate:modelValue":t[0]||=e=>ct(p)?p.value=e:null,options:O(te),"option-label":`label`,"option-value":`value`,class:`w-full`},null,8,[`modelValue`,`options`])]),A(`div`,Os,[A(`label`,ks,D(e.$t(`shares.ttl`)),1),B(n,{modelValue:O(d),"onUpdate:modelValue":t[1]||=e=>ct(d)?d.value=e:null,options:u,"option-label":`label`,"option-value":`value`,class:`w-full`},null,8,[`modelValue`])]),A(`div`,As,[A(`label`,js,D(e.$t(`shares.max_viewers`)),1),B(n,{modelValue:O(ne),"onUpdate:modelValue":t[2]||=e=>ct(ne)?ne.value=e:null,options:ee,"option-label":`label`,"option-value":`value`,class:`w-full`},null,8,[`modelValue`])]),A(`div`,Ms,[A(`label`,Ns,D(e.$t(`shares.label`)),1),B(r,{modelValue:O(f),"onUpdate:modelValue":t[3]||=e=>ct(f)?f.value=e:null,placeholder:e.$t(`shares.label_placeholder`),class:`w-full`},null,8,[`modelValue`,`placeholder`])])]))])}}}),Bs={backButton:!1,doubleClickZoom:!0,expandableCard:!1,flatCard:!1,resizable:!1,pipToggleButton:!1,cardClickAction:`redirect`,viewTransition:!1,cameraNameOverlay:!0,liveIndicatorOverlay:!1,detectionIndicatorOverlay:!1,boundingBoxOverlay:!0,showShortcuts:!1,toolbar:!0,toolbarDetectionButton:!0,toolbarPipToggleButton:!1,toolbarPipToggleActive:!1,toolbarSettingsButton:!0,toolbarShareButton:!0,toolbarShortcutsButton:!0,toolbarSnapshotButton:!0,toolbarTimelineButton:!0,toolbarZoneButton:!0,toolbarDescriptionButton:!1,control:!0,controlFastForwardButton:!0,controlFsButton:!0,controlMicrophoneButton:!0,controlPlayPauseButton:!0,controlPipButton:!0,controlRewindButton:!0,controlSpeakerButton:!0,subcontrol:!0,subcontrolActivityModeButton:!0,subcontrolPtzButton:!0,subcontrolQualityButton:!0,subcontrolStreamingModeButton:!0},Vs={key:`disabled`,class:`absolute inset-0 bg-black/80 flex items-center justify-center z-8 pointer-events-none`},Hs={class:`flex flex-col items-center justify-center text-center gap-2`},Us={key:0,class:`text-white/50 text-sm max-w-xs`},Ws={key:1,class:`text-white/30 text-xs max-w-xs`},Gs={key:`sleep`,class:`absolute inset-0 bg-black/80 flex items-center justify-center z-7 pointer-events-none`},Ks={class:`flex flex-col items-center justify-center text-center`},qs={key:0,class:`text-white/80 text-sm max-w-xs mt-3`},Js={key:`loading`,class:`absolute inset-0 flex flex-col items-center justify-center z-6 pointer-events-none`},Ys={key:0,class:`mt-3 text-white text-sm text-shadow`},Xs={key:`info`,class:`absolute w-full flex justify-center z-6 mt-4 pointer-events-none`},Zs={class:`camera-card-info-box`},Qs={id:`timeline-container`,key:`timeline`,class:`absolute inset-0 z-5`},$s={key:0,class:`ai-description-overlay`},ec={class:`min-w-0`},tc={class:`text-sm font-semibold text-white`},nc={class:`text-xs text-white/85 mt-1`},rc=[`data-zoomable-content`],ic={class:`absolute inset-0 z-3 pointer-events-none`},ac={key:0,class:`absolute inset-0 z-3 pointer-events-none overflow-hidden`},oc={class:`w-full h-full blur-xs`},sc={class:`absolute inset-0 flex items-center justify-center bg-black/60`},cc={class:`flex flex-col items-center justify-center text-center`},lc={key:2,class:`text-white/80 text-sm max-w-xs mt-3`},uc=[`data-player-id`],dc={key:1,class:`text-sm font-semibold p-2 bg-black/60 rounded-xl text-white`},fc={class:`relative flex items-center gap-1 px-3 pb-3 pt-8`},pc={class:`flex items-center gap-0.5`},mc={class:`flex items-center gap-0.5`},hc={class:`flex flex-col min-w-[60px]`},gc=[`onClick`],_c={class:`flex flex-col`},vc=[`disabled`],yc=[`disabled`],bc=[`disabled`],xc=[`disabled`],Sc=[`disabled`],Cc=[`disabled`],wc=[`disabled`],Tc=[`disabled`],Ec=[`disabled`],Dc=[`disabled`],Oc=[`disabled`],kc={class:`flex items-center gap-2`},Ac={class:`text-base font-semibold`},jc=2e3,Mc=300,Nc=50,Pc=5,Fc=200,Ic=350,Lc=_t(z({__name:`CuiCameraCard`,props:st(qe({cameraInfo:{},backButton:{type:Boolean},doubleClickZoom:{type:Boolean},expandableCard:{type:Boolean},expanded:{type:Boolean},flatCard:{type:Boolean},resizable:{type:Boolean},cardProps:{},routerLink:{},cardClickAction:{},viewTransition:{type:Boolean},cardBackgroundColor:{},control:{type:Boolean},controlFastForwardButton:{type:Boolean},controlFsButton:{type:Boolean},controlMicrophoneButton:{type:Boolean},controlPipButton:{type:Boolean},controlPlayPauseButton:{type:Boolean},controlRewindButton:{type:Boolean},controlSpeakerButton:{type:Boolean},subcontrol:{type:Boolean},subcontrolActivityModeButton:{type:Boolean},subcontrolPtzButton:{type:Boolean},subcontrolQualityButton:{type:Boolean},subcontrolStreamingModeButton:{type:Boolean},cameraNameOverlay:{type:Boolean},liveIndicatorOverlay:{type:Boolean},modeOverlay:{type:Boolean},detectionIndicatorOverlay:{type:Boolean},boundingBoxOverlay:{type:Boolean},showShortcuts:{type:Boolean},toolbar:{type:Boolean},toolbarClass:{type:[Boolean,null,String,Object,Array]},toolbarDetectionButton:{type:Boolean},toolbarPipToggleButton:{type:Boolean},toolbarPipToggleActive:{type:Boolean},toolbarSettingsButton:{type:Boolean},toolbarShareButton:{type:Boolean},toolbarShortcutsButton:{type:Boolean},toolbarSnapshotButton:{type:Boolean},toolbarStyle:{type:[Boolean,null,String,Object,Array]},toolbarTimelineButton:{type:Boolean},toolbarZoneButton:{type:Boolean},toolbarDescriptionButton:{type:Boolean},eventDescription:{},pipSourceRole:{},pipToggleButton:{type:Boolean},isolatedStream:{type:Boolean},nvrController:{}},Bs),{activityMode:{default:`always-on`},activityModeModifiers:{},sourceRole:{},sourceRoleModifiers:{},streamingMode:{},streamingModeModifiers:{}}),emits:st([`streamFinishedLoading`,`expand`,`togglePip`,`muteChange`],[`update:activityMode`,`update:sourceRole`,`update:streamingMode`]),setup(e,{expose:t,emit:n}){lt(e=>({v0efb02c0:O(xr)}));let r=new Jt,i=e,s=n,l=Ze(e,`activityMode`),u=Ze(e,`sourceRole`),ne=Ze(e,`streamingMode`),h=Ie(),_=mt(),v=Qt(),b=$t(),{mdBreakpoint:se}=bt(),{isPipSupported:x}=yt(),{height:ce}=vt(),{t:S}=de(),{pressed:ue}=te(),{cameraInfo:fe,backButton:pe,doubleClickZoom:he,expandableCard:ge,flatCard:_e,resizable:C,cardProps:ye,routerLink:w,cardClickAction:be,viewTransition:xe,cardBackgroundColor:Se,cameraNameOverlay:we,liveIndicatorOverlay:Te,detectionIndicatorOverlay:Ee,boundingBoxOverlay:De,control:Oe,controlFastForwardButton:ke,controlFsButton:Ae,controlMicrophoneButton:je,controlPipButton:Ne,controlPlayPauseButton:Pe,controlRewindButton:Le,controlSpeakerButton:Re,subcontrol:Be,subcontrolActivityModeButton:We,subcontrolPtzButton:qe,subcontrolQualityButton:Ye,subcontrolStreamingModeButton:$e,toolbar:tt,toolbarClass:it,toolbarDetectionButton:at,toolbarPipToggleButton:st,toolbarPipToggleActive:R,toolbarSettingsButton:ft,toolbarShareButton:z,toolbarShortcutsButton:pt,toolbarSnapshotButton:ht,toolbarStyle:gt,toolbarTimelineButton:_t,toolbarZoneButton:xt,toolbarDescriptionButton:St,eventDescription:Ct,showShortcuts:wt}=nt(i);r.toggleQueryActivator(`getCameraQuery`,!1);let{data:H,isBusy:Et}=r.getCameraQuery(typeof fe.value==`string`?fe.value:``),Dt=ze(),Ot=[.25,.5,1,2,4,8],kt=N(!1),At=Qe(`streamMenuRef`),jt=Qe(`detectionCanvasRef`),Pt=Qe(`ptzRef`),Bt=Qe(`playerContainerRef`),Wt=Qe(`arBoxRef`),Gt=Qe(`speedPopoverRef`),Kt=Qe(`morePopoverRef`),qt=Ue(Ce,void 0),Yt=Ue(o,void 0),Xt=Ue(zt,void 0),Zt=Me(Bt,{delayLeave:1e3}),en=Me(Bt,{delayLeave:0}),U=re(Bt),tn=re(Wt),nn=N(!1),rn=et(),an=N(!1),G=N({x:0,y:0}),K=N(1),sn=N(1),ln=N(!1),un=N(!1),fn=N(!1),q=N(!1),mn=N(0),hn=N(1),_n=N(!1),vn=N(!1),bn=N({x:0,y:0}),xn=N({x:0,y:0}),Cn=N(!1),wn=N(0),En=N(1),Dn=N({x:0,y:0}),kn=N({x:0,y:0}),An=N(0),Mn=N({x:0,y:0}),Nn=N(!1),Fn=N(!1),In=N(!1),Rn=N(!1),zn=N(!1),Vn=N(!1),Hn=N(!1),Wn=N(!1),Gn=N(!0),qn=N(!0),Jn=N(!1),Xn=N(!1),Zn=N(!1),$n=N(!1),er=N(!1),nr=!1,rr=[],ar=!1,or=L(()=>typeof fe.value==`string`?fe.value:fe.value.name),cr=L(()=>typeof fe.value==`string`?H.value:fe.value),J=L(()=>{if(i.nvrController)return i.nvrController;if(!i.isolatedStream){if(qt){let e=cr.value,t=e?qt.value.get(e._id):void 0;if(t)return t}return Yt}}),ur=L(()=>J.value?.mode.value??`idle`),dr=L(()=>J.value?.currentTimestamp.value??0),Y=L(()=>ur.value!==`idle`),pr=L(()=>Y.value&&(J.value?.licenseRequired.value??!1)),hr=L(()=>Y.value&&!pr.value&&(J.value?.noData.value??!1)),gr=L(()=>Y.value&&(J.value?.loading.value??!1)),vr=L(()=>ne.value??cr.value?.interfaceSettings.streamingMode??`webrtc`),yr=L(()=>u.value??cr.value?.interfaceSettings.streamingSource??`high-resolution`),xr=L(()=>cr.value?.interfaceSettings.aspectRatio.replace(`:`,`/`)??`16/9`),{camera:Sr,isLoading:wr}=ve(or),Tr=y(),X=d({camera:or,mode:vr,resolution:yr,activityMode:()=>l.value??`always-on`,activityConfig:{standbyTimeout:5e3,activityTimeout:5e3},autoStart:()=>ur.value===`idle`&&!cr.value?.disabled,isolated:i.isolatedStream}),{status:Dr,isPlaying:kr,hasAudio:Ar,hasBackchannel:Mr,activeMode:Nr,activeResolution:Fr,isReconnecting:Ir,inStandby:Rr}=X,{start:zr}=oe(()=>{Wn.value=!1},jc,{immediate:!1}),Vr=L(()=>!Y.value&&(De.value&&Zn.value||Ee.value)),Hr=L(()=>Vr.value?Sr.value:void 0),{sensor:Wr}=Fe(Hr),{sensor:Gr}=ae(Hr),{sensor:qr}=ee(Hr),{sensor:Jr}=m(Hr),{sensors:Xr}=a(Hr),Zr=L(()=>({height:X.isFullscreen.value||K.value>1?`auto`:`100%`,aspectRatio:xr.value})),ei=L(()=>!X.paused.value),ti=L(()=>X.isPip.value),ni=L(()=>(Sr.value?.hasPtz.value??!1)&&Lt(void 0,`admin`)),ri=L(()=>Sr.value?.hasMotionSensor.value??!1),ii=L(()=>Sr.value?.hasObjectSensor.value??!1),ai=L(()=>Sr.value?.camera.value?.detectionZones??[]),oi=L(()=>Sr.value?.camera.value?.detectionLines??[]),ci=L(()=>i.expanded??fn.value),li=L(()=>Zn.value?[]:[`__none__`]),ui=L(()=>!!Xt?.active.value),di=L(()=>void 0),fi=L(()=>(Zt.value||Gn.value)&&Oe.value&&!Fn.value),Z=L(()=>cr.value?.disabled===!0),pi=L(()=>cr.value?.detectionSettings?.snooze===!0),mi=L(()=>Z.value?!1:Y.value?gr.value:wr.value||Et.value||!kr.value||Ir.value),hi=L(()=>Z.value?!1:Y.value?gr.value:mi.value),gi=L(()=>Y.value?J.value?.hasAudio.value??!1:Ar.value&&Dr.value!==`error`),_i=L(()=>!!navigator.mediaDevices&&Mr.value),yi=L(()=>!_i.value||mi.value||Y.value),bi=L(()=>Y.value?gr.value||Xn.value:Z.value?!1:!kr.value||Xn.value),xi=L(()=>we.value&&fi.value&&!se.value&&zi.value&&!ui.value),Si=L(()=>Oe.value&&(fi.value||$n.value||er.value)&&!Rr.value&&!Z.value&&U.width.value>=150&&!ui.value),Ci=L(()=>ur.value===`play`?!0:ur.value===`idle`?ei.value:!1),wi=L(()=>In.value&&zi.value&&ni.value),Ti=L(()=>Ee.value&&Wn.value),Ei=L(()=>{let e=xr.value.split(`/`);return{w:parseFloat(e[0])||16,h:parseFloat(e[1])||9}}),Di=L(()=>{let e=(C.value,U.width.value||0);if(!e)return 0;let t=e*(Ei.value.h/Ei.value.w);return C.value?Math.min(t,ce.value*.5):t}),Oi=L(()=>ce.value*.6),ki=L(()=>{if(!C.value)return Pc;let e=U.width.value||0;if(!e)return Pc;let t=Math.min(e*(Ei.value.h/Ei.value.w),ce.value*.5);return t?Math.max(1,Math.min(Pc,Oi.value/t)):Pc}),Ai=L(()=>{if(!C.value)return 0;let e=U.width.value||0;if(!e)return 0;let t=Math.min(e*(Ei.value.h/Ei.value.w),ce.value*.5)*K.value;return Math.min(t,Oi.value)}),ji=L(()=>{if(X.isFullscreen.value||!C.value)return{};let e=Ai.value;return e?{height:`${e}px`}:{}}),Mi=L(()=>({width:tn.width.value||0,height:tn.height.value||0})),Ni=L(()=>{let e=K.value;if(e<=1)return null;let t=G.value,n=U.width.value,r=U.height.value;if(!n||!r)return null;let{width:i,height:a}=Mi.value;if(!i||!a)return null;let o=i*e,s=a*e,c=o>n,l=s>r,u=c?n/o*100:100,ee=l?r/s*100:100,te=c?(1-n/o)/2*100-t.x/o*100:0,d=l?(1-r/s)/2*100-t.y/s*100:0;return{width:`${u}%`,height:`${ee}%`,left:`${te}%`,top:`${d}%`}}),Pi=L(()=>{if(!C.value)return{aspectRatio:xr.value};let e=K.value,t=G.value;return e<=1?{aspectRatio:xr.value}:{aspectRatio:xr.value,transform:`scale(${e}) translate(${t.x/e}px, ${t.y/e}px)`,transformOrigin:`center center`,willChange:`transform`}}),Fi=L(()=>{let e=[];return St.value&&e.push({key:`ai-descriptions`,label:S(`components.player.ai_descriptions`),toggle:!0,toggleState:kt.value,onClick:()=>{kt.value=!kt.value}}),at.value&&(ri.value||ii.value)&&e.push({key:`detections`,label:S(`components.player.detections`),toggle:!0,toggleState:Zn.value,disabled:Y.value,onClick:()=>Da()}),xt.value&&e.push({key:`zones`,label:S(`components.player.zones`),toggle:!0,toggleState:Vn.value,onClick:()=>Oa()}),e.push({key:`edit-shortcuts`,label:S(`components.player.edit_shortcuts`),toggle:!0,toggleState:Fn.value,onClick:()=>{Fn.value?Ra():(Nn.value=!0,Fn.value=!0)}}),(Rn.value||!_t.value)&&e.push({key:`export`,label:S(`components.player.export`),toggle:!0,toggleState:Hn.value,onClick:()=>{Hn.value=!Hn.value}}),e.push({key:`heatmap`,label:S(`components.player.heatmap`),toggle:!0,toggleState:zn.value,onClick:()=>{zn.value=!zn.value}}),e}),Ii=L(()=>Fi.value.some(e=>e.toggle&&e.toggleState)),Li=L(()=>{let e={body:{class:`w-full h-full p-0 overflow-hidden justify-center`,style:{backgroundColor:Se.value}},root:{class:{}},content:{class:`flex flex-col justify-center`}};return _e.value&&(e.root.class={...e.root.class,"!rounded-none !border-0":!0}),p(e,ye.value?.pt)}),Ri=L(()=>U.width.value<Fc),zi=L(()=>U.width.value>=Ic),Bi=L(()=>be.value===`redirect`&&w.value!==void 0),Vi=L(()=>be.value===`expand`&&ge.value),Hi=L(()=>Bi.value||Vi.value),Ui=L(()=>be.value!==`redirect`&&w.value!==void 0),Wi=L(()=>Tr.value??`body`),Q=L(()=>{let e=zi.value;return{rewind:{inline:e,inMenu:!e},fastForward:{inline:e,inMenu:!e},speed:{inline:e,inMenu:!e},speaker:{inline:e,inMenu:!e},expand:{inline:e,inMenu:!e},microphone:{inline:e,inMenu:!e},pip:{inline:!1,inMenu:!0},quality:{inline:!1,inMenu:!0},streamingMode:{inline:!1,inMenu:!0},activityMode:{inline:!1,inMenu:!0},ptz:{inline:!1,inMenu:!0}}}),Gi=L(()=>{let e=Q.value;return e.rewind.inMenu&&Le.value||e.fastForward.inMenu&&ke.value||e.speed.inMenu||e.speaker.inMenu&&Re.value||e.expand.inMenu&&ge.value&&!Vi.value||e.microphone.inMenu&&je.value||e.pip.inMenu&&Ne.value||e.quality.inMenu&&Be.value&&Ye.value||e.streamingMode.inMenu&&Be.value&&$e.value||e.activityMode.inMenu&&Be.value&&We.value||e.ptz.inMenu&&Be.value&&qe.value&&ni.value}),Ki=L(()=>yr.value);function qi(){Bi.value?_.push(w.value):Vi.value&&ra()}function Ji(){X.toggleFullscreen()}function Yi(){let e=_.options.history.state.back;typeof e==`string`&&e.startsWith(`/camview`)?_.back():_.push(`/home`)}function Xi(){return l.value===`always-on`?S(`components.player.activity_mode_always_on`):l.value===`standby`?S(`components.player.activity_mode_standby`):S(`components.player.activity_mode_activity`)}function Zi(){return Nr.value===`mse`?S(`components.player.streaming_mode_mse`):Nr.value===`webrtc`||Nr.value===`webrtc/tcp`?S(`components.player.streaming_mode_webrtc`):Nr.value===`webcodecs`?S(`components.player.streaming_mode_webcodecs`):S(`components.player.streaming_mode_unknown`)}function Qi(){return Ki.value===`high-resolution`?S(`components.player.source_role_high`):Ki.value===`mid-resolution`?S(`components.player.source_role_mid`):Ki.value===`low-resolution`?S(`components.player.source_role_low`):S(`components.player.source_role_unknown`)}function $i(e){if(!Bt.value||e<=1)return{x:0,y:0};let t=Bt.value.getBoundingClientRect(),{width:n,height:r}=Mi.value,i=n*e,a=r*e;return{x:Math.max(0,(i-t.width)/2),y:Math.max(0,(a-t.height)/2)}}function ea(e,t){let n=$i(t);return{x:Math.max(-n.x,Math.min(n.x,e.x)),y:Math.max(-n.y,Math.min(n.y,e.y))}}function ta(e,t){let n=$i(t);return{x:Math.max(-n.x,Math.min(n.x,e.x)),y:Math.max(-n.y,Math.min(n.y,e.y))}}function na(e){if(!Bt.value||ln.value)return;let t=ki.value,n=Math.max(1,Math.min(e.zoom,t));n<1.02&&(n=1);let r={x:e.pan.x,y:e.pan.y},i=sn.value,a=Math.abs(e.zoom-n)>.001;if(n<=1){sn.value=1,(G.value.x!==0||G.value.y!==0||K.value!==1)&&(ln.value=!0,G.value={x:0,y:0},K.value=1,requestAnimationFrame(()=>setTimeout(()=>ln.value=!1,150)));return}if(n<i&&i>1){let e=(n-1)/(i-1);r.x=G.value.x*e,r.y=G.value.y*e}sn.value=n;let o=ea(r,n);a?(ln.value=!0,K.value=n,G.value=o,requestAnimationFrame(()=>setTimeout(()=>ln.value=!1,100))):G.value=o}function ra(){if(!ge.value)return;let e=!ci.value;i.expanded===void 0&&(fn.value=e),s(`expand`,e)}function ia(e){C.value&&(q.value=!0,mn.value=e.clientY,hn.value=K.value,document.addEventListener(`mousemove`,sa),document.addEventListener(`mouseup`,la))}function aa(e){C.value&&(q.value=!0,mn.value=e.touches[0].clientY,hn.value=K.value,document.addEventListener(`touchmove`,ca,{passive:!1}),document.addEventListener(`touchend`,ua))}function oa(e){let t=Di.value;if(!t)return hn.value;let n=e/t;return Math.max(1,Math.min(ki.value,hn.value+n))}function sa(e){if(!q.value)return;let t=oa(e.clientY-mn.value);K.value=t,sn.value=t}function ca(e){if(!q.value)return;e.preventDefault();let t=oa(e.touches[0].clientY-mn.value);K.value=t,sn.value=t}function la(){q.value=!1,document.removeEventListener(`mousemove`,sa),document.removeEventListener(`mouseup`,la)}function ua(){q.value=!1,document.removeEventListener(`touchmove`,ca),document.removeEventListener(`touchend`,ua)}function da(e){let t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)}function fa(e){return{x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}}function pa(e){if(C.value){if(vn.value=!1,e.touches.length===2){_n.value=!1,Cn.value=!0,wn.value=da(e.touches),En.value=K.value,Dn.value={...G.value},kn.value=fa(e.touches);return}e.touches.length===1&&K.value>1&&(_n.value=!0,bn.value={x:e.touches[0].clientX,y:e.touches[0].clientY},xn.value={...G.value})}}function ma(e){if(C.value){if(Cn.value&&e.touches.length===2){e.preventDefault();let t=da(e.touches)/wn.value,n=Math.max(1,Math.min(ki.value,En.value*t));if(n>K.value&&(un.value=!0),Bt.value){let t=Bt.value.getBoundingClientRect(),r=fa(e.touches),i=t.left+t.width/2,a=t.top+t.height/2,o=r.x-i,s=r.y-a,c=n/En.value,l={x:Dn.value.x-o*(c-1),y:Dn.value.y-s*(c-1)};K.value=n,sn.value=n,G.value=ta(l,n)}else K.value=n,sn.value=n;return}if(_n.value&&e.touches.length===1){let t=e.touches[0].clientX-bn.value.x,n=e.touches[0].clientY-bn.value.y;(Math.abs(t)>10||Math.abs(n)>10)&&(vn.value=!0),G.value=ta({x:xn.value.x+t,y:xn.value.y+n},K.value)}}}function ha(e){if(e.touches.length===1&&Cn.value){Cn.value=!1,un.value=!1,K.value>1&&(_n.value=!0,vn.value=!1,bn.value={x:e.touches[0].clientX,y:e.touches[0].clientY},xn.value={...G.value});return}if(e.touches.length===0&&e.changedTouches.length===1&&!vn.value&&!Cn.value){let t=e.changedTouches[0],n=Date.now(),r={x:t.clientX,y:t.clientY},i=n-An.value,a=Math.sqrt((r.x-Mn.value.x)**2+(r.y-Mn.value.y)**2);i<Mc&&a<Nc?(ba({clientX:r.x,clientY:r.y,preventDefault:()=>{},stopPropagation:()=>{}}),An.value=0,Mn.value={x:0,y:0}):(An.value=n,Mn.value=r)}_n.value=!1,vn.value=!1,Cn.value=!1,un.value=!1}function ga(e){!C.value||K.value<=1||(document.removeEventListener(`mousemove`,_a),document.removeEventListener(`mouseup`,va),_n.value=!0,bn.value={x:e.clientX,y:e.clientY},xn.value={...G.value},document.addEventListener(`mousemove`,_a),document.addEventListener(`mouseup`,va))}function _a(e){if(!_n.value)return;let t=e.clientX-bn.value.x,n=e.clientY-bn.value.y;G.value=ta({x:xn.value.x+t,y:xn.value.y+n},K.value)}function va(){_n.value=!1,document.removeEventListener(`mousemove`,_a),document.removeEventListener(`mouseup`,va)}function ya(e){if(!C.value)return;e.preventDefault();let t=-e.deltaY*.002,n=Math.max(1,Math.min(ki.value,K.value+t));if(n<1.02&&(n=1),n===K.value)return;let r=K.value;if(n<=1)K.value=1,G.value={x:0,y:0};else if(n<r&&r>1){let e=(n-1)/(r-1),t={x:G.value.x*e,y:G.value.y*e};K.value=n,G.value=ta(t,n)}else K.value=n;sn.value=K.value}function ba(e){if(he.value&&!(!C.value&&!en.value||Rn.value||wi.value||Rr.value||Z.value)){if(e.preventDefault(),e.stopPropagation(),ln.value=!0,K.value>1.01)K.value=1,G.value={x:0,y:0},sn.value=1;else{if(!Bt.value)return;C.value&&(un.value=!0);let t=Bt.value.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=t.width/2,a=t.height/2,o=ki.value,s=(i-n)*(o-1),c=(a-r)*(o-1);if(K.value=o,sn.value=o,C.value){let e=Math.max(0,(t.width*o-t.width)/2);G.value={x:Math.max(-e,Math.min(e,s)),y:Math.max(-0,Math.min(0,c))}}else{let e=$i(o);G.value={x:Math.max(-e.x,Math.min(e.x,s)),y:Math.max(-e.y,Math.min(e.y,c))}}}setTimeout(()=>{ln.value=!1,un.value=!1},200)}}function xa(e){X.reportActivity(!!e?.length)}function Sa(e){e?.length&&(Wn.value=!0,zr())}function Ca(){Z.value||X.resumeFromStandby()}async function wa(){let e=X.captureScreenshot();e&&await Ft({dataUrl:e,filename:`${or.value.replace(/ /g,`_`).toLowerCase()}_${new Date().toISOString()}.png`,mimeType:`image/png`})}function Ta(){jt.value?.clear()}function Ea(e,t){!kr.value||Y.value||jt.value?.draw(e,t)}function Da(e){Zn.value=e??!Zn.value}function Oa(e){Vn.value=e??!Vn.value}function ka(e){qn.value=e===void 0?!qn.value:e,s(`muteChange`,qn.value)}async function Aa(e,t=!1){if(Mr.value)if(Jn.value=e===void 0?!Jn.value:e,Jn.value)try{rn.value=await navigator.mediaDevices.getUserMedia({audio:!0});let e=rn.value.getAudioTracks()[0];qn.value=!t,await X.setMicrophone(e),Ss()}catch(e){h.warn(or.value,e),Jn.value=!1}else rn.value?.getTracks().forEach(e=>e.stop()),rn.value=void 0,await X.setMicrophone(null),Cs()}function ja(e){l.value=e||(l.value===`always-on`?`standby`:l.value===`standby`?`activity`:`always-on`)}async function Ma(e){nr=!0;try{if(e){u.value=e,await X.setResolution(e);return}let t=[];if(Sr.value?.lowResolutionSource.value&&t.push(`low-resolution`),Sr.value?.midResolutionSource.value&&t.push(`mid-resolution`),Sr.value?.highResolutionSource.value&&t.push(`high-resolution`),t.length===0)return;let n=Ki.value,r=t[(t.indexOf(n)+1)%t.length];u.value=r,await X.setResolution(r)}finally{setTimeout(()=>nr=!1,2e3)}}async function Na(e){let t=Nr.value,n=e||(t===`mse`?`webrtc`:`mse`);await X.setMode(n),ne.value=n}function Pa(){X.togglePip()}function Fa(){if(ur.value!==`idle`){ur.value===`play`?J.value?.pause():ur.value===`pause`?J.value?.resume():ur.value===`scrub`&&J.value?.play(dr.value);return}X.paused.value?X.play():X.pause()}function Ia(){Ji()}function La(e){Nn.value=e===void 0?!Nn.value:e,Nn.value||(Fn.value=!1)}function Ra(){Fn.value&&=(Nn.value=!0,!1)}function za(){In.value=!In.value}function Ba(){Rn.value=!Rn.value,Rn.value||(Hn.value=!1)}function Va(){if(J.value){if(ur.value===`idle`){let e=Date.now()*1e3;J.value.play(e-3e7);return}J.value.seek(J.value.currentTimestamp.value-3e7)}}function Ha(){!J.value||ur.value===`idle`||J.value.seek(J.value.currentTimestamp.value+3e7)}function Ua(e){Xn.value=e}function Wa(e){Kt.value?.hide(),ot(()=>Gt.value?.toggle(e))}function Ga(){let e=Sr.value?.id;if(!e)return;let t=(Sr.value?.sources.value??[]).filter(e=>e.role!==`snapshot`).map(e=>({_id:e._id,name:e.name,role:e.role}));b.openComponentDialog(zs,{data:{title:S(`shares.create_share`),confirmText:S(`shares.create`),contentProps:{cameraId:e,cameraName:or.value,sources:t}},dialogSize:{desktop:{width:`450px`}}})}return T(Bt,e=>{X.fullscreenElement.value=e??void 0},{immediate:!0}),T(qn,e=>X.setMuted(e),{immediate:!0}),T([J,()=>X.containerElement.value],([e,t],[n])=>{n&&n!==e&&n.containerRef.value===t&&(n.containerRef.value=null),e&&t&&(e.containerRef.value=t)},{immediate:!0,flush:`post`}),T([J,qn],([e,t])=>{e&&(e.muted.value=t)},{immediate:!0}),T(Y,e=>{ar||(e?X.stop():X.start())},{flush:`sync`}),T([u,Fr],([e,t])=>{nr||e&&t&&e!==t&&(u.value=t)}),T([()=>Y.value,dr],([e])=>{if(!e)return;let t=X.containerElement.value;if(!t)return;let n=t.querySelector(`canvas`);n&&n.width>0&&n.height>0&&(X.nativeWidth.value!==n.width||X.nativeHeight.value!==n.height)&&(X.nativeWidth.value=n.width,X.nativeHeight.value=n.height)},{flush:`post`}),T(Ir,async e=>{e&&await Aa(!1,!1)}),T(yi,async e=>{e&&Jn.value&&await Aa(!1,!1)}),T(kr,e=>{e||Ta(),s(`streamFinishedLoading`,e)}),T(l,e=>{e&&X.setActivityMode(e)}),T(()=>Wr.value?.properties.detections,e=>{if(H.value?.detectionZones.length===0)return;let t=e??[];xa(t),Sa(t),Ea(`motion`,t)},{deep:!0}),T(()=>Gr.value?.properties.detections,e=>{if(H.value?.detectionZones.length===0)return;let t=e??[];xa(t),Sa(t),Ea(`object`,t)},{deep:!0}),T(()=>qr.value?.properties.detections,e=>{Ea(`face`,e??[])},{deep:!0}),T(()=>Jr.value?.properties.detections,e=>{Ea(`license_plate`,e??[])},{deep:!0}),T(Xr,e=>{rr.forEach(e=>e()),rr=e.map(e=>T(()=>e.properties.detections,e=>{Ea(`classifier`,e??[])},{deep:!0}))}),T(se,()=>{se.value&&(Rn.value=!1)}),T(C,()=>{K.value=1,G.value={x:0,y:0},sn.value=1,_n.value=!1,q.value=!1,ln.value=!1,un.value=!1,document.removeEventListener(`mousemove`,_a),document.removeEventListener(`mouseup`,va),document.removeEventListener(`mousemove`,sa),document.removeEventListener(`mouseup`,la),document.removeEventListener(`touchmove`,ca),document.removeEventListener(`touchend`,ua)}),T(()=>[en.value,Rn.value,wi.value,Rr.value,Z.value],([e,t,n,r,i])=>{_n.value||q.value||ue.value||(C.value?t||n||r||i:!e||t||n||r||i)&&(K.value!==1||G.value.x!==0||G.value.y!==0)&&(ln.value=!0,K.value=1,G.value={x:0,y:0},sn.value=1,setTimeout(()=>ln.value=!1,200))}),T(K,(e,t)=>{ln.value||(e<=1?G.value={x:0,y:0}:e<t&&(G.value=ta(G.value,e)))}),T(Dr,e=>{e===`connecting`||e===`reconnecting`?an.value=!0:e===`connected`&&(an.value=!1)}),T(()=>X.error.value,e=>{e&&h.error(or.value,e)}),T(Z,(e,t)=>{t&&!e?X.stream.value?.restart():!t&&e&&X.stop()}),g(window,`blur`,()=>{_n.value&&(_n.value=!1,document.removeEventListener(`mousemove`,_a),document.removeEventListener(`mouseup`,va)),q.value&&(q.value=!1,document.removeEventListener(`mousemove`,sa),document.removeEventListener(`mouseup`,la),document.removeEventListener(`touchmove`,ca),document.removeEventListener(`touchend`,ua))}),me(`Escape`,()=>Ra()),Ke(()=>{nn.value=_.currentRoute.value.path.includes(or.value),typeof fe.value==`string`&&r.toggleQueryActivator(`getCameraQuery`,!0)}),Ge(()=>{setTimeout(()=>Gn.value=!1,1500)}),Je(()=>{ar=!0,document.removeEventListener(`mousemove`,sa),document.removeEventListener(`mouseup`,la),document.removeEventListener(`touchmove`,ca),document.removeEventListener(`touchend`,ua),document.removeEventListener(`mousemove`,_a),document.removeEventListener(`mouseup`,va),rn.value?.getTracks().forEach(e=>e.stop()),rn.value=void 0,rr.forEach(e=>e()),rr=[]}),t({activeResolution:Fr,showControl:Si,micActive:Jn,streamHasIntercom:_i,micButtonDisabled:yi,isFullscreen:X.isFullscreen,togglePlay:Fa,toggleSourceRole:Ma,togglePictureInPicture:Pa,toggleActivityMode:ja,toggleStreamingMode:Na,toggleFs:Ia,toggleMute:ka,toggleMicrophone:Aa,toggleShortcuts:La,togglePtz:za,toggleFastForward:Ha,toggleRewind:Va,toggleBbox:Da,toggleZones:Oa,toggleTimeline:Ba,timelineState:Rn,timelineScroll:Ua,captureScreenshot:wa,trimMode:Hn}),(e,t)=>{let n=ys,r=c,i=cn,a=on,o=ie,u=gs,ee=Rt,te=Ho,d=Ut,ne=vi,p=si,m=$r,re=It,h=Qr,g=Yr,_=Kr,ae=Ht,y=Ur,b=Br,oe=Lr,se=Pr,ce=jr,S=Or,ue=Er,de=Cr,fe=br,me=_r,he=mr,_e=fr,ve=f,ye=lr,be=sr,Se=ir,Ce=tr,we=Qn,Ee=Yn,Oe=Kn,Me=Un,Fe=Bn,Ie=Ln,ze=Pn,T=jn,Ue=W,Ge=On,Ke=Tn,Je=Sn,Ze=yn,Qe=gn,et=pn,nt=dn,at=Nt,ot=Mt,N=le,lt=Vt,L=Tt;return V(),M(`div`,{style:k({viewTransitionName:O(xe)?`camera-card-${O(or).replace(/[^a-zA-Z0-9-_]/g,`-`)}`:void 0,viewTransitionClass:O(nn)&&O(xe)?`active-transition`:void 0})},[B(N,{class:`cui-card`,pt:O(Li)},{content:P(()=>[O(pe)?(V(),j(r,{key:0,class:`dark-mode absolute top-[10px] left-4 z-6 bg-black/20 hover:bg-black/40 active:bg-black/60`,rounded:``,text:``,severity:`contrast`,onClick:Yi},{icon:P(()=>[B(n,{class:`w-6 h-6`})]),_:1})):I(``,!0),A(`div`,{id:`video-container`,ref_key:`playerContainerRef`,ref:Bt,class:E([`bg-black flex items-center justify-center relative min-w-0`,{"detection-detected":O(Ti),"edit-mode":O(Fn),"overflow-visible":O(un),"overflow-hidden":!O(un),"resizable-mode":O(C)}]),style:k([O(ji),{"--cam-ar-w":O(Ei).w,"--cam-ar-h":O(Ei).h}]),onClick:Ca},[B(rt,{name:`fade`},{default:P(()=>[O(Z)&&!O(Y)?(V(),M(`div`,Vs,[A(`div`,Hs,[B(i,{class:`text-white/60 w-[50px] h-[50px]`}),O(zi)?(V(),M(`p`,Us,D(e.$t(`views.camera.camera_disabled`)),1)):I(``,!0),O(zi)?(V(),M(`p`,Ws,D(e.$t(`views.camera.camera_disabled_hint`)),1)):I(``,!0)])])):I(``,!0),O(Rr)&&!O(cr)?.disabled?(V(),M(`div`,Gs,[A(`div`,Ks,[B(a,{class:`text-white w-[50px] h-[50px]`}),O(zi)?(V(),M(`p`,qs,D(e.$t(`components.player.stream_paused`)),1)):I(``,!0)])])):I(``,!0),O(hi)&&!O(Rr)&&!O(Z)?(V(),M(`div`,Js,[B(o,{class:E([`w-[30px] h-[30px] m-0`,O(Y)?`nvr-spinner`:``]),"stroke-width":`5`},null,8,[`class`]),O(Ir)&&!O(Y)&&O(zi)?(V(),M(`span`,Ys,D(e.$t(`components.player.reconnecting`))+`...`,1)):I(``,!0)])):I(``,!0),O(di)&&!O(Rr)&&!O(Z)?(V(),M(`div`,Xs,[A(`span`,Zs,D(O(di)),1)])):I(``,!0),dt(A(`div`,Qs,null,512),[[ut,O(Rn)&&!O(wi)&&!O(Rr)&&!O(ui)&&!O(X).isFullscreen.value]]),O(wi)&&!O(Rn)&&!O(Rr)&&!O(ui)&&O(Sr)?(V(),M(`div`,{key:`ptz`,class:`absolute top-0 left-0 right-0 z-7`,style:k({bottom:O(Si)?`48px`:`0px`,transition:`bottom 0.2s ease`})},[B(u,{ref_key:`ptzRef`,ref:Pt,"camera-device":O(Sr)},null,8,[`camera-device`])],4)):I(``,!0)]),_:1}),B(Ve,{"enter-active-class":`transition-all duration-300 ease-out`,"enter-from-class":`opacity-0 -translate-y-2`,"enter-to-class":`opacity-100 translate-y-0`,"leave-active-class":`transition-all duration-200 ease-in`,"leave-from-class":`opacity-100 translate-y-0`,"leave-to-class":`opacity-0 -translate-y-2`},{default:P(()=>[O(kt)&&O(Ct)?(V(),M(`div`,$s,[B(ee,{class:`w-4 h-4 text-white/90 shrink-0 mt-0.5`}),A(`div`,ec,[A(`p`,tc,D(O(Ct).title),1),A(`p`,nc,D(O(Ct).description),1)])])):I(``,!0)]),_:1}),B(O(He),{ref_key:`arBoxRef`,ref:Wt,pan:O(G),"onUpdate:pan":t[1]||=e=>ct(G)?G.value=e:null,zoom:O(K),"onUpdate:zoom":t[2]||=e=>ct(K)?K.value=e:null,disabled:O(C)||O(ge)&&!O(ci)||!O(en)||O(Rn)||O(wi)||O(Rr)||O(ui)||O(Z),"pan-enabled":O(K)>1,"enable-control-button":!1,"dbl-click-enabled":!1,"min-zoom":1,"max-zoom":O(ki),selector:O(C)?`disabled`:`[data-zoomable-content='${O(Dt)}']`,"zoom-origin":`pointer`,class:E([`ar-box flex items-center justify-center`,{"zoom-constraining":O(ln),"touch-none":O(C)}]),style:k(O(Zr)),onPanned:na,onZoom:na,onDblclick:ba,onTouchstart:pa,onTouchmove:ma,onTouchend:ha,onMousedown:ga,onWheel:ya},{default:P(()=>[A(`div`,{"data-zoomable-content":O(Dt),class:`relative h-full min-w-0`,style:k(O(Pi))},[A(`div`,ic,[!O(Rr)&&!O(Z)&&O(wt)?(V(),j(te,{key:0,"camera-name":O(or),visible:O(Nn),editing:O(Fn),"interaction-locked":O(K)>1},null,8,[`camera-name`,`visible`,`editing`,`interaction-locked`])):I(``,!0),O(De)&&!O(Rr)&&!O(Y)&&!O(Z)?(V(),j(d,{key:1,ref_key:`detectionCanvasRef`,ref:jt,classes:O(li)},null,8,[`classes`])):I(``,!0),O(Vn)&&!O(Rr)&&!O(Z)?(V(),j(ne,{key:2,"camera-zones":O(ai),"camera-lines":O(oi)},null,8,[`camera-zones`,`camera-lines`])):I(``,!0),O(Xt)?.active.value&&!O(Z)?(V(),j(p,{key:3,"model-value":O(Xt).regions.value,"onUpdate:modelValue":t[0]||=e=>{O(Xt)&&(O(Xt).regions.value=e)}},null,8,[`model-value`])):I(``,!0),O(zn)&&O(cr)&&!O(Z)?(V(),j(m,{key:4,"camera-id":O(cr)._id},null,8,[`camera-id`])):I(``,!0)]),O(hr)||O(pr)?(V(),M(`div`,ac,[A(`div`,oc,[O(cr)?(V(),j(re,{key:0,camera:O(cr),"show-loading-screen":!1,"image-style":{objectFit:`fill`}},null,8,[`camera`])):I(``,!0)]),A(`div`,sc,[A(`div`,cc,[O(pr)?(V(),j(h,{key:0,class:`text-white w-[50px] h-[50px]`})):(V(),j(g,{key:1,class:`text-white w-[50px] h-[50px]`})),O(zi)?(V(),M(`p`,lc,D(O(pr)?e.$t(`components.player.license_required`):e.$t(`components.player.no_recording`)),1)):I(``,!0)])])])):I(``,!0),O(cr)?(V(),j(re,{key:`snapshot`,ref:`snapshotRef`,camera:O(cr),"show-loading-screen":!1,class:E([`absolute inset-0 cursor-[inherit] z-0`,{"cursor-pointer":O(Hi),"pointer-events-none":!O(Hi)}]),"image-style":{objectFit:`fill`},onClick:qi},null,8,[`camera`,`class`])):I(``,!0),A(`div`,{ref:e=>{e&&(O(X).containerElement.value=e)},"data-player-id":O(Dt),class:E([`w-full h-full cursor-[inherit] relative z-1`,{"cursor-pointer":O(Hi)}]),onClick:qi},null,10,uc)],12,rc)]),_:1},8,[`pan`,`zoom`,`disabled`,`pan-enabled`,`max-zoom`,`selector`,`style`,`class`]),!O(Rr)&&(O(xi)||O(Te))?(V(),M(`div`,{key:0,class:E([`absolute top-0 w-full p-4 flex items-center justify-between gap-2 pointer-events-none`,O(Z)?`z-9`:`z-6`])},[O(Te)?(V(),M(`div`,{key:0,class:E([`w-[10px] h-[10px] rounded-full shadow-md`,O(Z)?`bg-gray-500`:O(Y)?`bg-sky-500`:O(kr)?`bg-red-500`:`bg-gray-500`])},null,2)):I(``,!0),O(xi)?(V(),M(`span`,dc,D(O(or)),1)):I(``,!0)],2)):I(``,!0),B(Ve,{name:`fade-2`},{default:P(()=>[O(Si)&&!O(Rn)?(V(),M(`div`,{key:0,class:E([`absolute bottom-0 inset-x-0 z-6 dark-mode`,{"control-bar-tiny":O(Ri)}])},[t[29]||=A(`div`,{class:`control-bar-gradient pointer-events-none`},null,-1),A(`div`,fc,[A(`div`,pc,[O(Le)&&O(Q).rewind.inline?(V(),j(r,{key:0,disabled:!O(J),fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,onClick:Va},{icon:P(()=>[B(_,{class:`w-[18px] h-[18px]`})]),_:1},8,[`disabled`])):I(``,!0),O(Pe)?(V(),j(r,{key:1,disabled:O(mi),fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,onClick:Fa},{icon:P(()=>[O(Ci)?(V(),j(y,{key:1,class:`w-[18px] h-[18px]`})):(V(),j(ae,{key:0,class:`w-[18px] h-[18px]`}))]),_:1},8,[`disabled`])):I(``,!0),O(ke)&&O(Q).fastForward.inline?(V(),j(r,{key:2,disabled:O(ur)===`idle`,fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,onClick:Ha},{icon:P(()=>[B(b,{class:`w-[18px] h-[18px]`})]),_:1},8,[`disabled`])):I(``,!0),O(Q).speed.inline?(V(),j(r,{key:3,disabled:O(ur)===`idle`,fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,style:{"font-size":`12px`,"font-weight":`600`},onClick:t[3]||=e=>O(Gt)?.toggle(e)},{icon:P(()=>[A(`span`,null,D(O(J)?.speed.value??1)+`×`,1)]),_:1},8,[`disabled`])):I(``,!0)]),t[28]||=A(`div`,{class:`flex-1`},null,-1),A(`div`,mc,[O(Re)&&O(Q).speaker.inline?(V(),j(r,{key:0,disabled:!O(gi)||O(mi),fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,onClick:t[4]||=e=>ka()},{icon:P(()=>[O(qn)?(V(),j(se,{key:1,class:`w-[18px] h-[18px]`})):(V(),j(oe,{key:0,class:`w-[18px] h-[18px]`}))]),_:1},8,[`disabled`])):I(``,!0),O(je)&&O(Q).microphone.inline?(V(),j(r,{key:1,disabled:O(yi),fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,onClick:t[5]||=e=>Aa(void 0,!0)},{icon:P(()=>[O(Jn)?(V(),j(ce,{key:0,class:`w-[18px] h-[18px]`})):(V(),j(S,{key:1,class:`w-[18px] h-[18px]`}))]),_:1},8,[`disabled`])):I(``,!0),O(ge)&&O(Q).expand.inline&&!O(Vi)?dt((V(),j(r,{key:2,fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,onClick:ra},{icon:P(()=>[O(ci)?(V(),j(ue,{key:0,class:`w-[18px] h-[18px]`})):(V(),j(de,{key:1,class:`w-[18px] h-[18px]`}))]),_:1})),[[L,{value:O(ci)?e.$t(`components.player.shrink`):e.$t(`components.player.expand`)},void 0,{top:!0}]]):I(``,!0),O(Gi)?(V(),j(r,{key:3,fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,onClick:t[6]||=e=>O(Kt)?.toggle(e)},{icon:P(()=>[B(fe,{class:`w-[18px] h-[18px]`})]),_:1})):I(``,!0),O(Ae)?(V(),j(r,{key:4,disabled:O(mi),fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,onClick:Ia},{icon:P(()=>[O(X).isFullscreen.value?(V(),j(he,{key:1,class:`w-[18px] h-[18px]`})):(V(),j(me,{key:0,class:`w-[18px] h-[18px]`}))]),_:1},8,[`disabled`])):I(``,!0),O(Ui)?dt((V(),j(r,{key:5,fluid:``,text:``,severity:`contrast`,class:`control-bar-btn`,onClick:t[7]||=t=>e.$router.push(O(w))},{icon:P(()=>[B(_e,{class:`w-[18px] h-[18px]`})]),_:1})),[[L,{value:e.$t(`components.player.open_camera`)},void 0,{top:!0}]]):I(``,!0)])]),B(ve,{ref_key:`speedPopoverRef`,ref:Gt,class:`more-menu-popover`,"append-to":O(Wi),onShow:t[8]||=e=>$n.value=!0,onHide:t[9]||=e=>$n.value=!1},{default:P(()=>[A(`div`,hc,[(V(),M(F,null,Xe(Ot,e=>A(`button`,{key:e,class:E([`more-menu-item justify-center`,{"more-menu-item-active":(O(J)?.speed.value??1)===e}]),onClick:t=>{O(J)?.setSpeed(e),O(Gt)?.hide()}},D(e)+`× `,11,gc)),64))])]),_:1},8,[`append-to`]),B(ve,{ref_key:`morePopoverRef`,ref:Kt,class:`more-menu-popover`,"append-to":O(Wi),onShow:t[22]||=e=>er.value=!0,onHide:t[23]||=e=>er.value=!1},{default:P(()=>[A(`div`,_c,[O(Le)&&O(Q).rewind.inMenu?(V(),M(`button`,{key:0,disabled:!O(J),class:`more-menu-item`,onClick:t[10]||=e=>{Va(),O(Kt)?.hide()}},[B(_,{class:`w-[18px] h-[18px] shrink-0`}),A(`span`,null,D(e.$t(`components.player.rewind`)),1)],8,vc)):I(``,!0),O(ke)&&O(Q).fastForward.inMenu?(V(),M(`button`,{key:1,disabled:O(ur)===`idle`,class:`more-menu-item`,onClick:t[11]||=e=>{Ha(),O(Kt)?.hide()}},[B(b,{class:`w-[18px] h-[18px] shrink-0`}),A(`span`,null,D(e.$t(`components.player.fast_forward`)),1)],8,yc)):I(``,!0),O(Q).speed.inMenu?(V(),M(`button`,{key:2,disabled:O(ur)===`idle`,class:`more-menu-item`,onClick:t[12]||=e=>Wa(e)},[B(ye,{class:`w-[18px] h-[18px] shrink-0`}),A(`span`,null,D(e.$t(`components.player.speed`))+` (`+D(O(J)?.speed.value??1)+`×)`,1)],8,bc)):I(``,!0),O(Re)&&O(Q).speaker.inMenu?(V(),M(`button`,{key:3,disabled:!O(gi)||O(mi),class:`more-menu-item`,onClick:t[13]||=e=>{ka(),O(Kt)?.hide()}},[O(qn)?(V(),j(se,{key:1,class:`w-[18px] h-[18px] shrink-0`})):(V(),j(oe,{key:0,class:`w-[18px] h-[18px] shrink-0`})),A(`span`,null,D(O(qn)?e.$t(`components.form.tooltip.unmute`):e.$t(`components.form.tooltip.mute`)),1)],8,xc)):I(``,!0),O(ge)&&O(Q).expand.inMenu&&!O(Vi)?(V(),M(`button`,{key:4,class:`more-menu-item`,onClick:t[14]||=e=>{ra(),O(Kt)?.hide()}},[O(ci)?(V(),j(ue,{key:0,class:`w-[18px] h-[18px] shrink-0`})):(V(),j(de,{key:1,class:`w-[18px] h-[18px] shrink-0`})),A(`span`,null,D(O(ci)?e.$t(`components.player.shrink`):e.$t(`components.player.expand`)),1)])):I(``,!0),O(je)&&O(Q).microphone.inMenu?(V(),M(`button`,{key:5,disabled:O(yi),class:`more-menu-item`,onClick:t[15]||=e=>{Aa(void 0,!0),O(Kt)?.hide()}},[O(Jn)?(V(),j(ce,{key:0,class:`w-[18px] h-[18px] shrink-0`})):(V(),j(S,{key:1,class:`w-[18px] h-[18px] shrink-0`})),A(`span`,null,D(e.$t(`components.form.tooltip.intercom`)),1)],8,Sc)):I(``,!0),O(Ne)&&O(Q).pip.inMenu?(V(),M(`button`,{key:6,disabled:!O(x)||O(mi)||O(Y),class:`more-menu-item`,onClick:t[16]||=e=>{Pa(),O(Kt)?.hide()}},[O(ti)?(V(),j(Se,{key:1,class:`w-[18px] h-[18px] shrink-0`})):(V(),j(be,{key:0,class:`w-[18px] h-[18px] shrink-0`})),A(`span`,null,D(O(ti)?e.$t(`components.player.hide_pip`):e.$t(`components.player.show_pip`)),1)],8,Cc)):I(``,!0),O(Be)&&O(Ye)&&O(Q).quality.inMenu?(V(),M(`button`,{key:7,disabled:O(mi),class:`more-menu-item`,onClick:t[17]||=e=>{Ma(),O(Kt)?.hide()}},[O(Ki)===`low-resolution`?(V(),j(Ce,{key:0,class:`w-[18px] h-[18px] shrink-0`})):O(Ki)===`mid-resolution`?(V(),j(we,{key:1,class:`w-[18px] h-[18px] shrink-0`})):(V(),j(Ee,{key:2,class:`w-[18px] h-[18px] shrink-0`})),A(`span`,null,D(Qi()),1)],8,wc)):I(``,!0),O(Be)&&O($e)&&O(Q).streamingMode.inMenu?(V(),M(`button`,{key:8,disabled:O(mi)||O(Y),class:`more-menu-item`,onClick:t[18]||=e=>{Na(),O(Kt)?.hide()}},[O(Nr)===`mse`?(V(),j(Oe,{key:0,class:`w-[18px] h-[18px] shrink-0`})):(V(),j(Me,{key:1,class:`w-[18px] h-[18px] shrink-0`})),A(`span`,null,D(Zi()),1)],8,Tc)):I(``,!0),O(Be)&&O(We)&&O(Q).activityMode.inMenu?(V(),M(`button`,{key:9,disabled:O(mi)||O(Y),class:`more-menu-item`,onClick:t[19]||=e=>{ja(),O(Kt)?.hide()}},[l.value===`always-on`?(V(),j(Fe,{key:0,class:`w-[18px] h-[18px] shrink-0`})):l.value===`standby`?(V(),j(Ie,{key:1,class:`w-[18px] h-[18px] shrink-0`})):(V(),j(ze,{key:2,class:`w-[18px] h-[18px] shrink-0`})),A(`span`,null,D(Xi()),1)],8,Ec)):I(``,!0),O(Be)&&O(qe)&&O(ni)&&O(Q).ptz.inMenu?(V(),M(`button`,{key:10,disabled:O(mi)||O(Rn)||O(Y),class:E([`more-menu-item`,{"more-menu-item-active":O(In)}]),onClick:t[20]||=e=>{za(),O(Kt)?.hide()}},[B(T,{class:`w-[18px] h-[18px] shrink-0`}),A(`span`,null,D(e.$t(`components.player.ptz`)),1)],10,Dc)):I(``,!0),O(In)&&O(ni)&&O(Pt)?.hasHome?(V(),M(`button`,{key:11,disabled:O(mi)||O(Pt)?.isLoading||O(Y),class:`more-menu-item`,onClick:t[21]||=e=>{O(Pt)?.goToHome(),O(Kt)?.hide()}},[B(Ue,{class:`w-[18px] h-[18px] shrink-0`}),A(`span`,null,D(e.$t(`components.player.ptz_go_to_home`)),1)],8,Oc)):I(``,!0)])]),_:1},8,[`append-to`])],2)):I(``,!0)]),_:1}),B(Ve,{name:`fade-2`},{default:P(()=>[O(Ni)?(V(),M(`div`,{key:0,class:E([`zoom-minimap`,{"zoom-minimap-raised":O(Si)}])},[A(`div`,{class:`zoom-minimap-viewport`,style:k(O(Ni))},null,4)],2)):I(``,!0)]),_:1})],6),O(tt)?(V(),M(`div`,{key:1,class:E([`relative w-full min-h-[60px] h-[60px] camera-toolbar-background border-t-[1px] border-color flex items-center justify-between py-2 px-4 gap-1 z-10`,O(it),{"pointer-events-none opacity-50":O(ui)}]),style:k([O(gt)])},[O(C)?(V(),M(`div`,{key:0,class:`absolute left-0 right-0 top-0.5 h-5 flex items-center justify-center cursor-ns-resize touch-none z-20`,onMousedown:ia,onTouchstartPassive:aa},[...t[30]||=[A(`div`,{class:`w-9 h-1 rounded-full bg-surface-400/50`},null,-1)]],32)):I(``,!0),A(`div`,kc,[O(bi)?(V(),j(o,{key:0,"stroke-width":`5`,class:E([`w-[10px] h-[10px]`,O(Y)?`nvr-spinner`:``])},null,8,[`class`])):(V(),M(`div`,{key:1,class:E([`w-[10px] h-[10px] rounded-full`,O(Z)&&!O(Y)?`bg-gray-500`:O(Y)?`bg-sky-500`:`bg-primary-500`])},null,2)),A(`span`,Ac,D(O(or)),1),O(Z)?dt((V(),j(i,{key:2,class:`w-4 h-4 text-red-400`},null,512)),[[L,{value:e.$t(`views.camera.camera_disabled`)},void 0,{top:!0}]]):O(pi)?dt((V(),j(a,{key:3,class:`w-4 h-4 text-amber-400`},null,512)),[[L,{value:e.$t(`views.camera.camera_snoozed`)},void 0,{top:!0}]]):I(``,!0)]),t[31]||=A(`div`,{class:`ml-auto`},null,-1),O(Z)?I(``,!0):(V(),M(F,{key:1},[O(z)&&(`hasPermission`in e?e.hasPermission:O(Lt))(void 0,`admin`)?dt((V(),j(r,{key:0,fluid:``,text:``,severity:`contrast`,class:`cui-icon-lg not-hover:text-surface-400`,onClick:t[24]||=e=>Ga()},{icon:P(()=>[B(Ge,{width:`100%`,height:`100%`})]),_:1})),[[L,{value:e.$t(`components.player.share_camera`)},void 0,{top:!0}]]):I(``,!0),O(st)?dt((V(),j(r,{key:1,fluid:``,text:``,severity:`contrast`,class:E([`cui-icon-lg not-hover:text-surface-400 flipped-h`,{active:O(R)}]),onClick:t[25]||=e=>s(`togglePip`)},{icon:P(()=>[B(Ke,{width:`100%`,height:`100%`})]),_:1},8,[`class`])),[[L,{value:e.$t(`components.player.toggle_pip`)},void 0,{top:!0}]]):I(``,!0),O(ht)?dt((V(),j(r,{key:2,fluid:``,text:``,severity:`contrast`,class:`cui-icon-lg not-hover:text-surface-400`,onClick:wa},{icon:P(()=>[B(Je,{width:`100%`,height:`100%`})]),_:1})),[[L,{value:e.$t(`components.player.capture_snapshot`)},void 0,{top:!0}]]):I(``,!0),O(pt)?dt((V(),j(r,{key:3,fluid:``,text:``,severity:O(Fn)?`danger`:`contrast`,class:E([`cui-icon-lg`,{"not-hover:text-surface-400":!O(Fn),active:O(Nn)&&!O(Fn)}]),onClick:t[26]||=e=>O(Fn)?Ra():La()},{icon:P(()=>[O(Fn)?(V(),j(Ze,{key:0,width:`100%`,height:`100%`})):O(Nn)?(V(),j(Qe,{key:2,width:`100%`,height:`100%`})):(V(),j(Qe,{key:1,width:`100%`,height:`100%`}))]),_:1},8,[`severity`,`class`])),[[L,{value:O(Fn)?e.$t(`components.player.finish_editing`):e.$t(`components.player.shortcuts`)},void 0,{top:!0}]]):I(``,!0)],64)),O(_t)?dt((V(),j(r,{key:2,disabled:O(wi),fluid:``,text:``,severity:`contrast`,class:E([`cui-icon-lg not-hover:text-surface-400`,{active:O(Rn)}]),onClick:Ba},{icon:P(()=>[O(Rn)?(V(),j(nt,{key:1,width:`100%`,height:`100%`})):(V(),j(et,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`disabled`,`class`])),[[L,{value:O(Rn)?e.$t(`components.player.hide_timeline`):e.$t(`components.player.show_timeline`)},void 0,{top:!0}]]):I(``,!0),O(Z)?I(``,!0):dt((V(),j(r,{key:3,fluid:``,text:``,severity:`contrast`,class:E([`cui-icon-lg`,O(Ii)?`!text-primary`:`not-hover:text-surface-400`]),onClick:O(At)?.toggleMenu},{icon:P(()=>[B(fe,{width:`100%`,height:`100%`})]),_:1},8,[`class`,`onClick`])),[[L,{value:e.$t(`components.player.options`)},void 0,{top:!0}]]),O(ft)&&(`hasPermission`in e?e.hasPermission:O(Lt))(void 0,`admin`)?dt((V(),j(r,{key:4,fluid:``,text:``,severity:`contrast`,class:E([`cui-icon-lg not-hover:text-surface-400`,{active:O(v).isOpen.value}]),onClick:t[27]||=e=>O(v).open({cameraName:O(or)})},{icon:P(()=>[O(v).isOpen.value?(V(),j(ot,{key:1,width:`100%`,height:`100%`})):(V(),j(at,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`class`])),[[L,{value:e.$t(`components.player.settings`)},void 0,{top:!0}]]):I(``,!0)],6)):I(``,!0)]),_:1},8,[`pt`]),B(lt,{ref_key:`streamMenuRef`,ref:At,items:O(Fi),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`])],4)}}}),[[`__scopeId`,`data-v-c914f86c`]]);export{Un as A,Or as C,Qn as D,tr as E,cn as F,on as I,W as L,Ln as M,pn as N,Yn as O,dn as P,tn as R,jr as S,mr as T,ka as _,fo as a,da as b,no as c,qa as d,Wa as f,Ma as g,Fa as h,ho as i,Bn as j,Kn as k,$a as l,Ra as m,Bs as n,co as o,Va as p,vo as r,ao as s,Lc as t,Xa as u,Ea as v,_r as w,si as x,Ca as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Hn as t,J as n,Ki as r,L as i,O as a,Q as ee,R as o,X as te,Z as ne,bn as s,fi as c,tt as re,yn as l,z as u}from"./vendor-cameraui-DgSMexWY.js";import{Bn as d,En as f,Er as p,Gn as ie,Sr as m,Zn as h,dn as g,fn as _,jn as v,lr as y,mn as b,mr as x,nr as S,on as ae,pn as C,rr as w,un as T,ur as E,xn as D,yn as O,zn as k}from"./vendor-DoIl6acN.js";import{t as A}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{r as j}from"./useSharedComposables-gpJ--qZh.js";import{F as oe,J as se,P as ce,U as le}from"./vendor-primevue-7iEzPOvf.js";import{t as M}from"./eventIcons-CtTopM6B.js";import{t as N}from"./types-ByBSoibP.js";import{t as ue}from"./ring-resize-DQajal-Z.js";import{n as de,t as fe}from"./CuiRecordingsGrid-CzMzhUXb.js";var P={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function F(e,t){return k(),b(`svg`,P,[...t[0]||=[g(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[g(`path`,{d:`m3 3l18 18m-6-10v-1l4.553-2.276A1 1 0 0 1 21 8.618v6.764a1 1 0 0 1-.675.946`}),g(`path`,{d:`M10 6h3a2 2 0 0 1 2 2v3m0 4v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h1`})],-1)]])}var pe=E({name:`tabler-video-off`,render:F}),I={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function L(e,t){return k(),b(`svg`,I,[...t[0]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M16 17a1 1 0 1 0 2 0a1 1 0 1 0-2 0M6 7a1 1 0 1 0 2 0a1 1 0 1 0-2 0m0 11L18 6`},null,-1)]])}var me=E({name:`tabler-percentage`,render:L}),R={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function z(e,t){return k(),b(`svg`,R,[...t[0]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm12-4v4M8 3v4m-4 4h16m-9 4h1m0 0v3`},null,-1)]])}var he=E({name:`tabler-calendar`,render:z}),B={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function V(e,t){return k(),b(`svg`,B,[...t[0]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 8v8m4-8v8m-6-6h8m-8 4h8M3 7V5a2 2 0 0 1 2-2h2M3 17v2a2 2 0 0 0 2 2h2M17 3h2a2 2 0 0 1 2 2v2m-4 14h2a2 2 0 0 0 2-2v-2`},null,-1)]])}var ge=E({name:`tabler-grid-scan`,render:V}),H={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function U(e,t){return k(),b(`svg`,H,[...t[0]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m18 11l-6-6`},null,-1)]])}var _e=E({name:`tabler-search`,render:U}),W={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function G(e,t){return k(),b(`svg`,W,[...t[0]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14M5 12l6 6m-6-6l6-6`},null,-1)]])}var ve=E({name:`tabler-arrow-left`,render:G}),ye={class:`flex flex-col h-full`},be={class:`recordings-toolbar flex flex-col gap-1 py-1.5`},xe={key:0,class:`flex items-center gap-1`},Se={key:0,class:`flex items-center gap-1`},Ce={key:1,class:`flex items-center gap-1`},we={class:`flex items-center`},Te={class:`flex items-center gap-1 shrink-0`},Ee={class:`flex items-center`},De={class:`max-w-[305px]`},Oe={class:`w-48 flex flex-col gap-2`},ke={class:`flex items-center justify-between text-xs`},Ae={class:`text-muted`},je={class:`font-mono`},Me={class:`flex-1 min-h-0 flex flex-col mt-3`},Ne={key:1,class:`flex justify-center py-4`},Pe={key:2,class:`flex flex-col items-center justify-center py-10 gap-3`},Fe={class:`text-muted text-sm`},Ie=10,Le=11,K=A(D({__name:`CuiCameraRecordings`,props:{cameraId:{},cameraName:{},camera:{},compact:{type:Boolean,default:!1}},emits:[`scrollToEvent`],setup(E,{emit:D}){let A=E,P=D,{t:F}=c(),{isTouch:I}=j(),L=f(N,void 0);if(!I.value&&typeof VideoDecoder<`u`){let e=u({cacheSize:10});d(o,e),r(()=>e.dispose())}let{icons:R,generic:z}=M(),B=new Set([`motion`,`audio`]),V=new Set(l),H=[...s.filter(e=>!B.has(e)).map(e=>({label:F(`views.recordings.type_${e}`),value:e,icon:R[e]??z})),...l.map(e=>({label:F(`views.recordings.attr_${e}`),value:e,icon:R[e]??z})),{label:F(`views.recordings.type_other`),value:n,icon:R.other??z}],U=x(!1),W=h(`mobileSearchInputRef`),G=x(``),K=x([]),q=x([]),J=x(),Y=x(0),X=h(`datePopoverRef`),Z=h(`confidencePopoverRef`),Re=T(()=>[A.cameraId]),{events:ze,isLoading:Be,hasMore:Ve,loadMore:He,loadThumbnails:Ue}=a({availableCameraIds:Re,cameraIds:Re,realtime:!0,pageSize:30,filter:T(()=>{let e=K.value.filter(e=>V.has(e)),t=K.value.length>0||q.value.length>0;return{types:K.value.length>0?K.value.filter(e=>!V.has(e)):void 0,triggers:q.value.length>0?q.value:void 0,attributes:e.length>0?e:void 0,search:G.value||void 0,state:`ended`,hasDetections:!t}})}),We=T(()=>J.value?J.value.toLocaleDateString([],{day:`2-digit`,month:`2-digit`,year:`numeric`}):``),Q=T(()=>{let e=ze.value.filter(e=>e.state===`ended`);if(J.value){let t=J.value,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),r=n+1440*60*1e3;e=e.filter(e=>e.startTime>=n&&e.startTime<r)}Y.value>0&&(e=e.filter(e=>i(e)>=Y.value));let t=L?.regions.value;return t&&t.length>0&&(e=e.filter(e=>e.segments.some(e=>e.detections.some(e=>e.box&&Ge(e.box,t))))),e});function Ge(e,t){let n=1/Ie,r=1/Le,i=e.x/n,a=(e.x+e.width)/n,ee=e.y/r,o=(e.y+e.height)/r;for(let e of t)if(a>e.col&&i<e.col+e.w&&o>e.row&&ee<e.row+e.h)return!0;return!1}function $(){L&&(L.active.value=!L.active.value,L.active.value||(L.regions.value=[]))}function Ke(){U.value=!0,v(()=>W.value?.$el?.querySelector(`input`)?.focus())}function qe(){U.value=!1,G.value=``}return(n,r)=>{let i=ve,a=t,o=_e,s=ce,c=re,l=oe,u=ge,d=he,f=me,h=ne,v=le,x=e,T=ee,D=te,A=de,j=ue,M=pe,N=se;return k(),b(`div`,ye,[g(`div`,be,[m(U)?(k(),b(`div`,xe,[O(a,{text:``,rounded:``,severity:`secondary`,class:`shrink-0 cui-icon-md`,onClick:qe},{icon:S(()=>[O(i,{width:`100%`,height:`100%`})]),_:1}),O(l,{class:`flex-1 min-w-0`},{default:S(()=>[O(s,null,{default:S(()=>[O(o,{class:`w-3.5 h-3.5`})]),_:1}),O(c,{ref_key:`mobileSearchInputRef`,ref:W,modelValue:m(G),"onUpdate:modelValue":r[0]||=e=>y(G)?G.value=e:null,placeholder:n.$t(`views.recordings.search_placeholder`),class:`w-full !text-xs !py-1.5`},null,8,[`modelValue`,`placeholder`])]),_:1})])):(k(),b(ae,{key:1},[E.compact?(k(),b(`div`,Se,[O(l,{class:`flex-1 min-w-0`},{default:S(()=>[O(s,null,{default:S(()=>[O(o,{class:`w-3.5 h-3.5`})]),_:1}),O(c,{modelValue:m(G),"onUpdate:modelValue":r[1]||=e=>y(G)?G.value=e:null,placeholder:n.$t(`views.recordings.search_placeholder`),class:`w-full !text-xs !py-1.5`},null,8,[`modelValue`,`placeholder`])]),_:1}),m(L)?w((k(),_(a,{key:0,text:``,rounded:``,class:`cui-icon-md shrink-0`,severity:m(L).active.value?`primary`:`secondary`,onClick:$},{icon:S(()=>[O(u,{width:`100%`,height:`100%`})]),_:1},8,[`severity`])),[[N,{value:n.$t(`views.recordings.grid_search`)},void 0,{top:!0}]]):C(``,!0),w((k(),_(a,{text:``,rounded:``,class:`cui-icon-md shrink-0`,severity:m(J)?`primary`:`secondary`,onClick:r[2]||=e=>m(X)?.toggle(e)},{icon:S(()=>[O(d,{width:`100%`,height:`100%`})]),_:1},8,[`severity`])),[[N,{value:m(J)?m(We):n.$t(`views.recordings.date`)},void 0,{top:!0}]]),w((k(),_(a,{text:``,rounded:``,class:`cui-icon-md shrink-0`,severity:m(Y)>0?`primary`:`secondary`,onClick:r[3]||=e=>m(Z)?.toggle(e)},{icon:S(()=>[O(f,{width:`100%`,height:`100%`})]),_:1},8,[`severity`])),[[N,{value:n.$t(`views.recordings.confidence`)},void 0,{top:!0}]])])):C(``,!0),E.compact?C(``,!0):(k(),b(`div`,Ce,[O(h,{modelValue:m(K),"onUpdate:modelValue":r[4]||=e=>y(K)?K.value=e:null,options:H,"option-label":`label`,"option-value":`value`,multiple:``,pt:{root:{class:`flex gap-0.5`},pcToggleButton:{root:{class:`!px-2 !py-1.5 !text-xs`}}}},{option:S(({option:e})=>[w((k(),b(`div`,we,[(k(),_(ie(e.icon),{class:`w-3.5 h-3.5`}))])),[[N,e.label,void 0,{top:!0}]])]),_:1},8,[`modelValue`]),O(v,{class:`ml-auto`,layout:`vertical`}),g(`div`,Te,[m(L)?w((k(),_(a,{key:0,text:``,rounded:``,class:`cui-icon-md`,severity:m(L).active.value?`primary`:`secondary`,onClick:$},{icon:S(()=>[O(u,{width:`100%`,height:`100%`})]),_:1},8,[`severity`])),[[N,{value:n.$t(`views.recordings.grid_search`)},void 0,{top:!0}]]):C(``,!0),w((k(),_(a,{text:``,rounded:``,class:`cui-icon-md`,severity:m(J)?`primary`:`secondary`,onClick:r[5]||=e=>m(X)?.toggle(e)},{icon:S(()=>[O(d,{width:`100%`,height:`100%`})]),_:1},8,[`severity`])),[[N,{value:m(J)?m(We):n.$t(`views.recordings.date`)},void 0,{top:!0}]]),w((k(),_(a,{text:``,rounded:``,class:`cui-icon-md`,severity:m(Y)>0?`primary`:`secondary`,onClick:r[6]||=e=>m(Z)?.toggle(e)},{icon:S(()=>[O(f,{width:`100%`,height:`100%`})]),_:1},8,[`severity`])),[[N,{value:n.$t(`views.recordings.confidence`)},void 0,{top:!0}]]),O(l,{class:`hidden xl:flex`},{default:S(()=>[O(s,null,{default:S(()=>[O(o,{class:`w-3.5 h-3.5`})]),_:1}),O(c,{modelValue:m(G),"onUpdate:modelValue":r[7]||=e=>y(G)?G.value=e:null,placeholder:n.$t(`views.recordings.search_placeholder`),class:`!text-xs !py-1.5 !w-36`},null,8,[`modelValue`,`placeholder`])]),_:1}),w((k(),_(a,{text:``,rounded:``,severity:`secondary`,class:`xl:hidden cui-icon-md`,onClick:Ke},{icon:S(()=>[O(o,{width:`100%`,height:`100%`})]),_:1})),[[N,{value:n.$t(`views.recordings.search`)},void 0,{top:!0}]])])])),E.compact?(k(),_(h,{key:2,modelValue:m(K),"onUpdate:modelValue":r[8]||=e=>y(K)?K.value=e:null,options:H,"option-label":`label`,"option-value":`value`,fluid:``,multiple:``,pt:{root:{class:`flex gap-0.5 flex-wrap`},pcToggleButton:{root:{class:`!px-2 !py-1.5 !text-xs`}}}},{option:S(({option:e})=>[w((k(),b(`div`,Ee,[(k(),_(ie(e.icon),{class:`w-3.5 h-3.5`}))])),[[N,e.label,void 0,{top:!0}]])]),_:1},8,[`modelValue`])):C(``,!0)],64))]),O(T,{ref_key:`datePopoverRef`,ref:X,class:`border-none`,pt:{content:{class:`p-0`}}},{default:S(()=>[g(`div`,De,[O(x,{modelValue:m(J),"onUpdate:modelValue":r[9]||=e=>y(J)?J.value=e:null,"max-date":new Date,inline:``,"clear-button-props":{class:`hidden`},class:`hover:text-primary active:text-primary focus:text-primary text-muted-color`,pt:{pcInputText:{root:{class:`text-sm !text-color`}},inputIconContainer:{class:`transition-all text-current`}}},null,8,[`modelValue`,`max-date`]),m(J)?(k(),_(a,{key:0,label:n.$t(`views.recordings.grid_clear`),severity:`secondary`,outlined:``,size:`small`,class:`text-xs mt-2`,fluid:``,onClick:r[10]||=e=>J.value=void 0},null,8,[`label`])):C(``,!0)])]),_:1},512),O(T,{ref_key:`confidencePopoverRef`,ref:Z,pt:{content:{class:`p-3`}}},{default:S(()=>[g(`div`,Oe,[g(`div`,ke,[g(`span`,Ae,p(n.$t(`views.recordings.confidence`)),1),g(`span`,je,p(Math.round(m(Y)*100))+`%`,1)]),O(D,{modelValue:m(Y),"onUpdate:modelValue":r[11]||=e=>y(Y)?Y.value=e:null,min:0,max:1,step:.05,class:`w-full`},null,8,[`modelValue`]),m(Y)>0?(k(),_(a,{key:0,label:n.$t(`views.recordings.grid_clear`),severity:`secondary`,outlined:``,size:`small`,class:`text-xs`,fluid:``,onClick:r[12]||=e=>Y.value=0},null,8,[`label`])):C(``,!0)])]),_:1},512),g(`div`,Me,[m(Q).length?(k(),_(fe,{key:0,items:m(Q),"min-item-width":150,gap:8,"has-more":m(Ve),"load-more":m(He),"item-key":e=>e.id,class:`flex-1 min-h-0`},{item:S(({item:e})=>[O(A,{event:e,"camera-name":E.cameraName,camera:E.camera,"load-thumbnails":m(Ue),onScrollToEvent:r[13]||=e=>P(`scrollToEvent`,e)},null,8,[`event`,`camera-name`,`camera`,`load-thumbnails`])]),_:1},8,[`items`,`has-more`,`load-more`,`item-key`])):C(``,!0),m(Be)?(k(),b(`div`,Ne,[O(j,{width:`24px`,height:`24px`,class:`text-muted`})])):C(``,!0),!m(Q).length&&!m(Be)?(k(),b(`div`,Pe,[O(M,{class:`w-12 h-12 text-muted opacity-30`}),g(`p`,Fe,p(n.$t(`views.recordings.no_recordings`)),1)])):C(``,!0)])])}}}),[[`__scopeId`,`data-v-cb65cf5f`]]);export{K as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.cui-datatable[data-v-ea2919a3] .p-datatable-empty-message>td{text-align:center}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Pi as e,Ti as t}from"./vendor-cameraui-DgSMexWY.js";import{$n as n,$t as r,An as i,Cn as a,Hn as o,Ln as s,On as c,Sr as l,Vn as u,Zn as d,gn as f,jn as p,mn as m,mr as h,nr as g,pn as _,un as v,wr as y,xn as b,yn as x,zn as S}from"./vendor-DoIl6acN.js";import{t as C}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{h as w}from"./vendor-primevue-7iEzPOvf.js";import{t as T}from"./arrow-right-outline-CliUt84m.js";var E={rows:15,paginatorTemplate:`FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink`},D={key:0,class:`pointer-events-none absolute right-[20px] top-[5px] z-2`},O=C(b({inheritAttrs:!1,__name:`CuiDataTable`,props:c({value:{},rows:{},paginator:{type:Boolean},paginatorTemplate:{}},E),setup(c){let b=c,C=d(`root`),E=h(!1),O=v(()=>b.paginator??(b.value?.length??0)>b.rows);function k(){let e=C.value?.querySelector(`.p-datatable-table-container`);E.value=e?e.scrollWidth-e.clientWidth-Math.ceil(e.scrollLeft)>1:!1}return t(C,`scroll`,k,{capture:!0,passive:!0}),e(C,k),n(()=>b.value,()=>p(k)),s(()=>p(k)),(e,t)=>{let n=T,s=w;return S(),m(`div`,{ref_key:`root`,ref:C,class:`cui-datatable relative w-full`},[x(r,{name:`fade`},{default:g(()=>[l(E)?(S(),m(`div`,D,[x(n,{width:`20px`,height:`20px`,class:`opacity-15`})])):_(``,!0)]),_:1}),x(s,i(e.$attrs,{value:c.value,rows:c.rows,paginator:l(O),"paginator-template":c.paginatorTemplate}),f({_:2},[u(e.$slots,(t,n)=>({name:n,fn:g(t=>[o(e.$slots,n,y(a(t??{})),void 0,!0)])}))]),1040,[`value`,`rows`,`paginator`,`paginator-template`])],512)}}}),[[`__scopeId`,`data-v-ea2919a3`]]);export{O as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Er as e,Gn as t,Sr as n,dn as r,fn as i,mn as a,pn as o,un as s,ur as c,xn as l,zn as u}from"./vendor-DoIl6acN.js";import{t as d}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as f}from"./motion-sensor-DD8SfD-m.js";import{t as p}from"./cctv-CBtg_v6o.js";import{t as m}from"./bell-ring-CenQn4Yt.js";import{i as h,n as g,r as _}from"./CuiPluginTrustBadge-YhfqGTyR.js";var v={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function y(e,t){return u(),a(`svg`,v,[...t[0]||=[r(`g`,{fill:`none`},[r(`rect`,{width:`16.5`,height:`16.5`,x:`3.75`,y:`3.75`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,rx:`2`}),r(`path`,{fill:`currentColor`,d:`M12 9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v11.25h-4z`})],-1)]])}var b=c({name:`proicons-npm`,render:y}),x={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function S(e,t){return u(),a(`svg`,x,[...t[0]||=[r(`path`,{fill:`currentColor`,d:`M5 20h14v-2H5m14-9h-4V3H9v6H5l7 7z`},null,-1)]])}var C=c({name:`mdi-download`,render:S}),w={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function T(e,t){return u(),a(`svg`,w,[...t[0]||=[r(`path`,{fill:`currentColor`,d:`M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7h1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-1H2a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h1a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 0 1 2-2M7.5 13A2.5 2.5 0 0 0 5 15.5A2.5 2.5 0 0 0 7.5 18a2.5 2.5 0 0 0 2.5-2.5A2.5 2.5 0 0 0 7.5 13m9 0a2.5 2.5 0 0 0-2.5 2.5a2.5 2.5 0 0 0 2.5 2.5a2.5 2.5 0 0 0 2.5-2.5a2.5 2.5 0 0 0-2.5-2.5`},null,-1)]])}var E=c({name:`mdi-robot`,render:T}),D={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function O(e,t){return u(),a(`svg`,D,[...t[0]||=[r(`path`,{fill:`currentColor`,d:`M21.33 12.91c.09 1.55-.62 3.04-1.89 3.95l.77 1.49c.23.45.26.98.06 1.45c-.19.47-.58.84-1.06 1l-.79.25a1.69 1.69 0 0 1-1.86-.55L14.44 18c-.89-.15-1.73-.53-2.44-1.1c-.5.15-1 .23-1.5.23c-.88 0-1.76-.27-2.5-.79c-.53.16-1.07.23-1.62.22c-.79.01-1.57-.15-2.3-.45a4.1 4.1 0 0 1-2.43-3.61c-.08-.72.04-1.45.35-2.11c-.29-.75-.32-1.57-.07-2.33C2.3 7.11 3 6.32 3.87 5.82c.58-1.69 2.21-2.82 4-2.7c1.6-1.5 4.05-1.66 5.83-.37c.42-.11.86-.17 1.3-.17c1.36-.03 2.65.57 3.5 1.64c2.04.53 3.5 2.35 3.58 4.47c.05 1.11-.25 2.2-.86 3.13c.07.36.11.72.11 1.09m-5-1.41c.57.07 1.02.5 1.02 1.07a1 1 0 0 1-1 1h-.63c-.32.9-.88 1.69-1.62 2.29c.25.09.51.14.77.21c5.13-.07 4.53-3.2 4.53-3.25a2.59 2.59 0 0 0-2.69-2.49a1 1 0 0 1-1-1a1 1 0 0 1 1-1c1.23.03 2.41.49 3.33 1.3c.05-.29.08-.59.08-.89c-.06-1.24-.62-2.32-2.87-2.53c-1.25-2.96-4.4-1.32-4.4-.4c-.03.23.21.72.25.75a1 1 0 0 1 1 1c0 .55-.45 1-1 1c-.53-.02-1.03-.22-1.43-.56c-.48.31-1.03.5-1.6.56c-.57.05-1.04-.35-1.07-.9a.97.97 0 0 1 .88-1.1c.16-.02.94-.14.94-.77c0-.66.25-1.29.68-1.79c-.92-.25-1.91.08-2.91 1.29C6.75 5 6 5.25 5.45 7.2C4.5 7.67 4 8 3.78 9c1.08-.22 2.19-.13 3.22.25c.5.19.78.75.59 1.29c-.19.52-.77.78-1.29.59c-.73-.32-1.55-.34-2.3-.06c-.32.27-.32.83-.32 1.27c0 .74.37 1.43 1 1.83c.53.27 1.12.41 1.71.4q-.225-.39-.39-.81a1.038 1.038 0 0 1 1.96-.68c.4 1.14 1.42 1.92 2.62 2.05c1.37-.07 2.59-.88 3.19-2.13c.23-1.38 1.34-1.5 2.56-1.5m2 7.47l-.62-1.3l-.71.16l1 1.25zm-4.65-8.61a1 1 0 0 0-.91-1.03c-.71-.04-1.4.2-1.93.67c-.57.58-.87 1.38-.84 2.19a1 1 0 0 0 1 1c.57 0 1-.45 1-1c0-.27.07-.54.23-.76c.12-.1.27-.15.43-.15c.55.03 1.02-.38 1.02-.92`},null,-1)]])}var k=c({name:`mdi-brain`,render:O}),A={detection:{icon:f,labelKey:`components.plugin_search.category_detection`},"camera-source":{icon:p,labelKey:`components.plugin_search.category_camera_source`},notification:{icon:m,labelKey:`components.plugin_search.category_notification`},recording:{icon:_,labelKey:`components.plugin_search.category_recording`},automation:{icon:E,labelKey:`components.plugin_search.category_automation`},"ai-model":{icon:k,labelKey:`components.plugin_search.category_ai_model`},utility:{icon:g,labelKey:`components.plugin_search.category_utility`},other:{icon:h,labelKey:`components.plugin_search.category_other`}},j=[`detection`,`camera-source`,`notification`,`recording`,`automation`,`ai-model`,`utility`,`other`];function M(e){return e&&e in A?A[e]:A.other}var N={key:0,class:`cui-category-chip`},P={class:`cui-category-chip-label`},F=d(l({__name:`CuiPluginCategoryChip`,props:{category:{}},setup(c){let l=c,d=s(()=>M(l.category));return(s,l)=>c.category?(u(),a(`span`,N,[(u(),i(t(n(d).icon),{class:`cui-category-chip-icon`})),r(`span`,P,e(s.$t(n(d).labelKey)),1)])):o(``,!0)}}),[[`__scopeId`,`data-v-651645bf`]]);export{b as a,C as i,A as n,j as r,F as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Hn as e,Mn as t,Nn as n,On as r,Ut as i,Vn as a,Wt as o,ct as s,fi as c,jn as l,tt as u}from"./vendor-cameraui-DgSMexWY.js";import{A as d,T as ee,d as f,m as p}from"./api-aSYFKxo6.js";import{$n as m,An as h,Cr as g,Er as _,Gn as te,Ln as v,Rn as y,Sr as b,Un as ne,Vn as x,Zn as S,_r as C,an as w,ar as T,br as re,dn as E,fn as D,fr as O,gn as k,in as A,jn as j,lr as M,mn as N,mr as P,nr as F,on as I,pn as L,rr as R,un as z,ur as B,vn as ie,xn as V,yn as H,zn as U}from"./vendor-DoIl6acN.js";import{c as ae,f as W}from"./vendor-core-BKHiXSX7.js";import{t as G}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as K}from"./useSharedComposables-gpJ--qZh.js";import{B as oe,G as se,H as ce,J as le,K as ue,V as de,W as fe,a as q,i as pe,j as me,u as he}from"./vendor-primevue-7iEzPOvf.js";import{t as ge}from"./cctv-BsGdaLfw.js";import{t as _e}from"./bell-ChE83DC8.js";import{t as ve}from"./cog-Ce2a8uiA.js";import{t as ye}from"./hasPermission-P1TgpAur.js";import{n as be}from"./CuiMenu-Ds6GufVn.js";import{t as xe}from"./CuiBBoxPlayground-CIU5kteO.js";import{t as Se}from"./cameras-CvJDLEZ3.js";import{n as Ce}from"./useCuiCameraDrawer-DnN9lwiy.js";import{t as we}from"./useCuiDialog-DHktK-mZ.js";import{t as Te}from"./CuiTopbarSlot-ac4GLLbf.js";import{F as Ee,G as J,H as Y,K as De,U as Oe,W as ke,a as Ae,q as je}from"./types-BXo-JDGR.js";import{t as Me}from"./CuiSchema-CfqOJmDH.js";import{t as Ne}from"./plugins-NVAodP6s.js";import{t as Pe}from"./PluginSchema-CWcq67pj.js";import{t as Fe}from"./information-outline-ChTb2u7w.js";import{t as Ie}from"./plus-Dqgz6pez.js";import{t as Le}from"./close-circle-ClG7lNzZ.js";import{a as Re,i as ze,n as Be,o as Ve,r as He,t as Ue}from"./vendor-markdown-UV_ycMZu.js";import{t as We}from"./back-filled-DqCMpeEk.js";import{n as Ge,t as Ke}from"./CuiPluginCard-D1SylQbM.js";var X={class:`text-base font-semibold border-b-[1px] border-color mb-3 pb-3`},Z={class:`flex flex-col gap-4`},Q={class:`flex flex-col field-gap`},qe={class:`cui-label`},Je={key:0,class:`text-red-500 text-sm`},Ye={class:`flex flex-col field-gap`},$={class:`cui-label`},Xe={class:`flex flex-col field-gap`},Ze={class:`cui-label`},Qe={class:`flex flex-col field-gap`},$e={class:`cui-label`},et={class:`flex flex-col field-gap`},tt={class:`cui-label`},nt={class:`flex flex-col field-gap`},rt={class:`cui-label`},it={class:`flex flex-col field-gap`},at={class:`cui-label`},ot={class:`flex flex-col field-gap`},st={class:`cui-label`},ct={class:`mt-8`},lt={class:`text-base font-semibold border-b-[1px] border-color mb-3 pb-3`},ut={key:0,class:`flex items-center justify-center w-full py-4`},dt={key:1,class:`flex items-center justify-center text-sm text-muted py-4 text-center`},ft={key:2,class:`flex flex-col field-gap`},pt={class:`text-xs text-muted`},mt={key:0,class:`mt-8`},ht={class:`text-base font-semibold border-b-[1px] border-color mb-3 pb-3`},gt=V({__name:`CuiNotificationInterface`,props:{pluginName:{}},setup(t){let n=t,o=d(),{t:s}=c(),l=ee(),{user:f}=W(p()),{pluginName:h}=re(n),{plugin:g}=i(h),te=z(()=>Object.values(r).map(e=>({label:s(`components.notification_interface.severity_${e}`),value:e}))),v=O({title:`Test notification`,subtitle:``,body:`This is a test notification from camera.ui`,severity:r.Info,tag:``,imageUrl:``,deepLink:``}),y=P([]),ne=P(!1),S=P(!1),w=C([]),T=P(!1),D=P([]),k=C(),A=P(!1),j=z(()=>w.value.map(e=>({id:e.id,label:e.name})));async function R(){if(!(!g.value||!f.value?._id)){T.value=!0;try{let e=ye(void 0,`admin`)?[]:[f.value._id];w.value=await g.value.getDevices?.(e)??[]}catch(e){o.error(`Failed to load notifier devices:`,e),w.value=[]}finally{T.value=!1}}}async function B(){if(g.value){A.value=!0;try{k.value=await g.value.notificationSettings?.()}catch(e){o.error(`Failed to load notification settings schema:`,e),k.value=void 0}finally{A.value=!1}}}function ie(){y.value.push({key:``,value:``})}function V(e){y.value.splice(e,1)}function ae(){let e={};for(let t of y.value)t.key.trim()&&(e[t.key.trim()]=t.value);return{title:v.title.trim(),subtitle:v.subtitle.trim()||void 0,body:v.body.trim()||void 0,severity:v.severity,tag:v.tag.trim()||void 0,imageUrl:v.imageUrl.trim()||void 0,deepLink:v.deepLink.trim()||void 0,data:Object.keys(e).length?e:void 0}}async function G(){let e=g.value;if(!(!e||S.value)){if(!v.title.trim()){ne.value=!0;return}S.value=!0;try{let t=ae(),n=D.value.length?D.value:w.value.map(e=>e.id);await e.sendNotification?.(n,t),l.add({severity:`success`,detail:s(`components.notification_interface.sent`),life:3e3})}catch(e){l.add({severity:`error`,detail:e,life:3e3})}finally{S.value=!1}}}return m(g,e=>{e&&(R(),B())},{immediate:!0}),(t,n)=>{let r=u,i=pe,o=me,s=Le,c=e,l=Ie,d=a,ee=he,f=Me;return U(),N(`div`,null,[E(`h3`,X,_(t.$t(`components.notification_interface.template`)),1),E(`div`,Z,[E(`div`,Q,[E(`label`,qe,_(t.$t(`components.notification_interface.title`)),1),H(r,{modelValue:b(v).title,"onUpdate:modelValue":[n[0]||=e=>b(v).title=e,n[1]||=e=>ne.value=!1],placeholder:t.$t(`components.notification_interface.title`),invalid:b(ne),class:`w-full`},null,8,[`modelValue`,`placeholder`,`invalid`]),b(ne)?(U(),N(`p`,Je,_(t.$t(`components.notification_interface.title_required`)),1)):L(``,!0)]),E(`div`,Ye,[E(`label`,$,_(t.$t(`components.notification_interface.subtitle`)),1),H(r,{modelValue:b(v).subtitle,"onUpdate:modelValue":n[2]||=e=>b(v).subtitle=e,placeholder:t.$t(`components.notification_interface.subtitle`),class:`w-full`},null,8,[`modelValue`,`placeholder`])]),E(`div`,Xe,[E(`label`,Ze,_(t.$t(`components.notification_interface.body`)),1),H(i,{modelValue:b(v).body,"onUpdate:modelValue":n[3]||=e=>b(v).body=e,placeholder:t.$t(`components.notification_interface.body`),rows:`3`,class:`w-full`},null,8,[`modelValue`,`placeholder`])]),E(`div`,Qe,[E(`label`,$e,_(t.$t(`components.notification_interface.severity`)),1),H(o,{modelValue:b(v).severity,"onUpdate:modelValue":n[4]||=e=>b(v).severity=e,options:b(te),"option-label":`label`,"option-value":`value`,class:`w-full`},null,8,[`modelValue`,`options`])]),E(`div`,et,[E(`label`,tt,_(t.$t(`components.notification_interface.tag`)),1),H(r,{modelValue:b(v).tag,"onUpdate:modelValue":n[5]||=e=>b(v).tag=e,placeholder:`motion:cam-1`,class:`w-full`},null,8,[`modelValue`])]),E(`div`,nt,[E(`label`,rt,_(t.$t(`components.notification_interface.image_url`)),1),H(r,{modelValue:b(v).imageUrl,"onUpdate:modelValue":n[6]||=e=>b(v).imageUrl=e,placeholder:`https://…`,class:`w-full`},null,8,[`modelValue`])]),E(`div`,it,[E(`label`,at,_(t.$t(`components.notification_interface.deep_link`)),1),H(r,{modelValue:b(v).deepLink,"onUpdate:modelValue":n[7]||=e=>b(v).deepLink=e,placeholder:`/cameras/cam-1`,class:`w-full`},null,8,[`modelValue`])]),E(`div`,ot,[E(`label`,st,_(t.$t(`components.notification_interface.data`)),1),(U(!0),N(I,null,x(b(y),(e,n)=>(U(),N(`div`,{key:n,class:`flex gap-2 items-center`},[H(r,{modelValue:e.key,"onUpdate:modelValue":t=>e.key=t,placeholder:t.$t(`components.notification_interface.data_key`),class:`flex-1 min-w-0`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`]),H(r,{modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,placeholder:t.$t(`components.notification_interface.data_value`),class:`flex-1 min-w-0`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`]),H(c,{text:``,rounded:``,severity:`danger`,class:`cui-icon-md shrink-0`,onClick:e=>V(n)},{icon:F(()=>[H(s,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])]))),128)),H(c,{severity:`secondary`,outlined:``,fluid:``,class:`cui-button-medium`,label:t.$t(`components.notification_interface.add_data`),onClick:ie},{icon:F(()=>[H(l,{class:`w-4 h-4`})]),_:1},8,[`label`])])]),E(`div`,ct,[E(`h3`,lt,_(t.$t(`components.notification_interface.targets`)),1),b(T)?(U(),N(`div`,ut,[H(d,{class:`w-[24px] h-[24px] m-0`,"stroke-width":`5`})])):b(j).length?(U(),N(`div`,ft,[E(`span`,pt,_(t.$t(`components.notification_interface.targets_hint`)),1),H(ee,{modelValue:b(D),"onUpdate:modelValue":n[8]||=e=>M(D)?D.value=e:null,options:b(j),"option-label":`label`,"option-value":`id`,placeholder:t.$t(`components.notification_interface.all_devices`),display:`chip`,filter:``,class:`w-full`},null,8,[`modelValue`,`options`,`placeholder`])])):(U(),N(`div`,dt,_(t.$t(`components.notification_interface.no_devices`)),1))]),b(k)?.length?(U(),N(`div`,mt,[E(`h3`,ht,_(t.$t(`components.notification_interface.settings`)),1),H(f,{"schema-form":{schema:b(k),config:{}},loading:b(A)},null,8,[`schema-form`,`loading`])])):L(``,!0),H(c,{fluid:``,class:`mt-8 cui-button-medium`,severity:`success`,loading:b(S),disabled:!b(g)||b(S),label:t.$t(`components.notification_interface.send_test`),onClick:G},null,8,[`loading`,`disabled`,`label`])])}}}),_t=.15,vt=.38,yt={class:`mb-4 rounded-xl overflow-hidden`},bt=[`src`],xt={class:`text-sm text-muted mb-4`},St={key:0,class:`ml-1`},Ct={class:`flex gap-2 mb-4`},wt={key:0,class:`flex flex-col gap-2`},Tt={class:`text-sm truncate flex-1 mr-3`},Et={class:`flex items-center gap-2 shrink-0`},Dt=V({__name:`PluginClipInterface`,props:{src:{},response:{},onTextSearch:{type:Function}},setup(t,{expose:n}){let r=t,i=d(),a=P(``),o=P(!1),s=P([]);function c(e){return Math.max(0,Math.min(1,(e-_t)/(vt-_t)))}async function l(){let e=a.value.trim();if(!(!e||o.value)){o.value=!0;try{let{score:t}=await r.onTextSearch(e);s.value.unshift({query:e,rawScore:t,displayScore:c(t)}),a.value=``}catch(e){i.error(`CLIP text search failed:`,e)}finally{o.value=!1}}}return n({}),(n,r)=>{let i=u,c=e,d=q;return U(),N(`div`,null,[E(`div`,yt,[E(`img`,{src:t.src,alt:`CLIP test image`,class:`w-full object-contain`},null,8,bt)]),E(`div`,xt,[ie(_(t.response.embeddings.length)+` embedding(s), `+_(t.response.embeddings[0]?.embedding?.length??0)+`-dim `,1),t.response.embeddingModel?(U(),N(`span`,St,`(`+_(t.response.embeddingModel)+`)`,1)):L(``,!0)]),E(`div`,Ct,[H(i,{modelValue:b(a),"onUpdate:modelValue":r[0]||=e=>M(a)?a.value=e:null,class:`flex-1`,placeholder:n.$t(`components.clip_interface.enter_query`),onKeyup:A(l,[`enter`])},null,8,[`modelValue`,`placeholder`]),H(c,{class:`cui-button-medium`,label:n.$t(`components.clip_interface.search`),loading:b(o),onClick:l},null,8,[`label`,`loading`])]),b(s).length?(U(),N(`div`,wt,[(U(!0),N(I,null,x(b(s),(e,t)=>(U(),N(`div`,{key:t,class:`flex items-center justify-between p-3 rounded-lg content-background`},[E(`span`,Tt,_(e.query),1),E(`div`,Et,[E(`div`,{class:g([`text-sm font-medium`,e.displayScore>=.5?`text-green-500`:e.displayScore>=.25?`text-yellow-500`:`text-red-400`])},_((e.displayScore*100).toFixed(0))+`% `,3),H(d,{value:e.displayScore>=.5?`Match`:e.displayScore>=.25?`Possible`:`No match`,severity:e.displayScore>=.5?`success`:e.displayScore>=.25?`warn`:`danger`,class:`text-xs`},null,8,[`value`,`severity`])])]))),128))])):L(``,!0)])}}}),Ot=V({__name:`PluginMotionInterface`,props:{response:{}},setup(e){let{response:t}=re(e),n=S(`videoPlayerRef`);return v(()=>{if(n.value){let e=new Blob([t.value.videoData],{type:`video/mp4`});n.value.src=URL.createObjectURL(e),n.value.load()}}),(e,t)=>(U(),N(`div`,null,[E(`video`,{ref_key:`videoPlayerRef`,ref:n,controls:``,class:`w-full`},`Your browser does not support the video tag.`,512)]))}}),kt={class:`mb-5 h-min`},At=[`src`],jt=V({__name:`PluginObjectInterface`,props:{src:{},response:{}},setup(e){let{response:t,src:n}=re(e),r=z(()=>t.value.detections);return(e,t)=>{let i=xe;return U(),N(`div`,kt,[H(i,{detections:b(r)},null,8,[`detections`]),E(`img`,{src:b(n),alt:`Preview`,class:`w-full`},null,8,At)])}}}),Mt={key:0,class:`w-full`},Nt={class:`flex flex-col justify-center items-center mb-5`},Pt={for:`restoreInput`,class:`cursor-pointer text-center text-sm`},Ft=[`accept`],It={key:0,class:`text-red-500 text-sm`},Lt={key:1,class:`w-full flex flex-col items-center justify-center`},Rt={key:0,class:`relative mb-4`},zt=[`src`],Bt={key:1,class:`relative mb-4 w-full`},Vt={key:2,class:`relative mb-4 w-full`},Ht=[`src`,`type`],Ut={class:`flex items-center justify-center`},Wt={class:`mx-2`},Gt={class:`text-muted`},Kt={class:`flex items-center justify-center mt-2 text-xs text-muted`},qt={class:`mt-10`},Jt={class:`text-base font-semibold border-b-[1px] border-color mb-3 pb-3`},Yt={key:0,class:`flex items-center justify-center text-sm text-muted mt-5`},Xt=V({__name:`CuiDetectionInterface`,props:{type:{},pluginName:{}},emits:[`update:file`,`update:metadata`],setup(t,{emit:n}){let r=t,a=n,o=d(),{t:s}=c(),l=ee(),u=we(),{type:f,pluginName:p}=re(r),{plugin:h,isLoading:te}=i(p),v=S(`fileInputRef`),y=S(`videoPlayerRef`),ne=S(`audioPlayerRef`),x=C([]),T=P(!1),O=P(!1),k=P(!1),A=P(!1),M=P(``),I=P(!1),R=P(),B=P(!0),V=C(),ae=P(!1),W=z(()=>ae.value||te.value||I.value),G=z(()=>{switch(f.value){case`objectDetection`:case`faceDetection`:case`licensePlateDetection`:case`classifierDetection`:case`clipDetection`:return`image`;case`motionDetection`:return`video`;case`audioDetection`:return`audio`;default:return`image`}}),K=z(()=>{switch(G.value){case`image`:return ke;case`video`:return Oe;case`audio`:return Y;default:return[]}}),oe=z(()=>{switch(G.value){case`image`:return Ee;case`video`:return De;case`audio`:return J;default:return 0}}),se=z(()=>K.value.join(`,`));async function ce(){if(h.value){ae.value=!0;try{let e;switch(f.value){case`motionDetection`:e=await h.value.motionDetectionSettings?.();break;case`objectDetection`:e=await h.value.objectDetectionSettings?.();break;case`audioDetection`:e=await h.value.audioDetectionSettings?.();break;case`faceDetection`:e=await h.value.faceDetectionSettings?.();break;case`licensePlateDetection`:e=await h.value.licensePlateDetectionSettings?.();break;case`classifierDetection`:e=await h.value.classifierDetectionSettings?.();break;case`clipDetection`:e=await h.value.clipSettings?.();break}V.value=e}catch(e){o.error(`Failed to load interface schema:`,e),V.value=void 0}finally{ae.value=!1}}}function le(e){let t=x.value.findIndex(t=>t.name===e);t>-1&&(x.value.splice(t,1),fe(),M.value=``,G.value===`video`&&y.value&&(y.value.src=``),R.value=void 0,a(`update:file`,null),a(`update:metadata`,null))}function ue(e){if(T.value=!1,O.value=!1,A.value=!1,x.value=[],e.dataTransfer)if(e.dataTransfer.files.length>1)O.value=!0;else{let t=e.dataTransfer.files[0];(K.value.length===0||K.value.includes(t.type))&&t.size<=oe.value?(x.value.push(t),j(()=>{q(t)})):t.size>oe.value?A.value=!0:O.value=!0}}function de(e){O.value=!1,A.value=!1,x.value=[];let t=e.target;if(t&&t.files){if(t.files?.length>1)O.value=!0;else if(t.files.length===1){let e=t.files[0],n=K.value.length===0||K.value.includes(e.type);e.size<=oe.value&&n?(x.value.push(e),j(()=>{q(e)})):e.size>oe.value?A.value=!0:O.value=!0}}}function fe(){v.value&&(v.value.value=``)}function q(e){I.value=!0;let t=URL.createObjectURL(e);switch(G.value){case`image`:pe(e,t);break;case`video`:me(e,t);break;case`audio`:he(e,t);break}}function pe(e,t){let n=new Image;n.src=t,n.onload=()=>{M.value=n.src;let t={width:n.width,height:n.height};R.value=t,a(`update:metadata`,t),a(`update:file`,e),I.value=!1}}function me(e,t){y.value&&(y.value.src=t,y.value.load(),y.value.onloadeddata=()=>{a(`update:file`,e),I.value=!1})}function he(e,t){M.value=t;let n=new Audio;n.src=t,n.onloadedmetadata=()=>{let t={mimeType:e.type};R.value=t,a(`update:metadata`,t),a(`update:file`,e),I.value=!1}}function ge(e){return e<1024?e+` bytes`:e<1048576?(e/1024).toFixed(1)+` KB`:(e/1048576).toFixed(1)+` MB`}function _e(e,t){let n=0,r=0,i=0;for(let a=0;a<e.length;a++)n+=e[a]*t[a],r+=e[a]*e[a],i+=t[a]*t[a];return r&&i?n/(Math.sqrt(r)*Math.sqrt(i)):0}async function ve(e){if(!x.value.length){k.value=!0;return}if(!h.value){o.error(`Plugin not connected`);return}I.value=!0;try{let t=await x.value[0].arrayBuffer();if(f.value===`audioDetection`){let n=await h.value.testAudioDetection?.(new Uint8Array(t),R.value,e);if(!n){o.warn(`No audio detection interface available`);return}if(n.detected&&n.detections?.length){let e=n.detections.map(e=>`${e.label} (${Math.round(e.confidence*100)}%)`).join(`, `),t=n.decibels==null?``:` | ${n.decibels.toFixed(1)} dBFS`;l.add({severity:`success`,detail:`${e}${t}`,life:3e3})}else l.add({severity:`info`,detail:s(`components.detection_interface.audio_not_detected`),life:3e3})}else if(f.value===`motionDetection`){let n=await h.value.testMotionDetection?.(new Uint8Array(t),e);if(!n){o.warn(`No motion detection interface available`);return}u.openComponentDialog(Ot,{data:{title:s(`components.dialog.title.result`),hideConfirmButton:!0,contentProps:{response:n}}})}else if(f.value===`faceDetection`){let n=await h.value.testFaceDetection?.(new Uint8Array(t),R.value,e);if(!n){o.warn(`No face detection interface available`);return}u.openComponentDialog(jt,{data:{title:s(`components.dialog.title.result`),hideConfirmButton:!0,contentProps:{src:M,response:n}}})}else if(f.value===`licensePlateDetection`){let n=await h.value.testLicensePlateDetection?.(new Uint8Array(t),R.value,e);if(!n){o.warn(`No license plate detection interface available`);return}u.openComponentDialog(jt,{data:{title:s(`components.dialog.title.result`),hideConfirmButton:!0,contentProps:{src:M,response:n}}})}else if(f.value===`classifierDetection`){let n=await h.value.testClassifierDetection?.(new Uint8Array(t),R.value,e);if(!n){o.warn(`No classifier detection interface available`);return}u.openComponentDialog(jt,{data:{title:s(`components.dialog.title.result`),hideConfirmButton:!0,contentProps:{src:M,response:n}}})}else if(f.value===`clipDetection`){let n=await h.value.testClipEmbedding?.(new Uint8Array(t),R.value,e);if(!n){o.warn(`No CLIP detection interface available`);return}if(!n.embeddings?.length){l.add({severity:`info`,detail:s(`components.detection_interface.no_detections`),life:3e3});return}let r=n.embeddings[0].embedding;u.openComponentDialog(Dt,{data:{title:s(`components.dialog.title.result`),hideConfirmButton:!0,contentProps:{src:M,response:n,onTextSearch:async e=>{let t=await h.value.getTextEmbedding(e);return t?.embedding?.length?{score:_e(r,t.embedding)}:{score:0}}}}})}else{let n=await h.value.testObjectDetection?.(new Uint8Array(t),R.value,e);if(!n){o.warn(`No object detection interface available`);return}u.openComponentDialog(jt,{data:{title:s(`components.dialog.title.result`),hideConfirmButton:!0,contentProps:{src:M,response:n}}})}}catch(e){l.add({severity:`error`,detail:e,life:3e3})}finally{I.value=!1}}return m(h,e=>{e&&ce()},{immediate:!0}),m(x,e=>{e.length>0?(k.value=!1,B.value=!1):(M.value=``,R.value=void 0,B.value=!0)},{immediate:!0,deep:!0}),(t,n)=>{let r=Le,i=e,a=Me;return U(),N(`div`,null,[E(`div`,{class:`file-upload-box`,onDrop:n[1]||=w(e=>ue(e),[`prevent`]),onDragover:n[2]||=w(e=>T.value=!0,[`prevent`]),onDragenter:n[3]||=w(e=>T.value=!0,[`prevent`]),onDragleave:n[4]||=w(e=>T.value=!1,[`prevent`])},[b(x).length?(U(),N(`div`,Lt,[b(G)===`image`?(U(),N(`div`,Rt,[E(`img`,{src:b(M),alt:`Preview`,class:`w-full`},null,8,zt)])):b(G)===`video`?(U(),N(`div`,Bt,[E(`video`,{ref_key:`videoPlayerRef`,ref:y,controls:``,class:`w-full`},`Your browser does not support the video tag.`,512)])):b(G)===`audio`?(U(),N(`div`,Vt,[E(`audio`,{ref_key:`audioPlayerRef`,ref:ne,controls:``,class:`w-full`},[E(`source`,{src:b(M),type:b(x)[0].type},null,8,Ht),n[5]||=ie(` Your browser does not support the audio element. `,-1)],512)])):L(``,!0),E(`div`,Ut,[H(i,{text:``,rounded:``,severity:`danger`,class:`cui-icon-md shrink-0`,onClick:n[0]||=w(e=>le(b(x)[0].name),[`stop`])},{icon:F(()=>[H(r,{width:`100%`,height:`100%`})]),_:1}),E(`b`,Wt,_(b(x)[0].name),1),E(`span`,Gt,`(`+_(ge(b(x)[0].size))+`)`,1)])])):(U(),N(`div`,Mt,[E(`div`,Nt,[E(`label`,Pt,_(t.$t(`components.detection_interface.drop_or_select_${b(G)}_to_detect${b(G)===`image`?`_objects`:b(G)===`video`?`_motion`:``}`)),1),E(`input`,{id:`restoreInput`,ref_key:`fileInputRef`,ref:v,type:`file`,class:`hidden`,accept:b(se),onChange:de},null,40,Ft),b(O)?(U(),N(`p`,It,_(t.$t(`components.detection_interface.only_one_${b(G)}_allowed`)),1)):L(``,!0),b(k)?(U(),N(`p`,{key:1,class:g([`text-red-500 text-sm`,{"mt-2":b(O)}])},_(t.$t(`components.detection_interface.${b(G)}_required`)),3)):L(``,!0),b(A)?(U(),N(`p`,{key:2,class:g([`text-red-500 text-sm`,{"mt-2":b(O)||b(k)}])},_(t.$t(`components.detection_interface.file_size_error`)),3)):L(``,!0)])]))],32),E(`div`,Kt,[E(`span`,null,`(`+_(b(oe)/1024/1024)+`MB, `+_(b(K).join(`, `))+`)`,1)]),E(`div`,qt,[E(`h3`,Jt,_(t.$t(`components.detection_interface.interface_config`)),1),b(V)?.length?(U(),D(a,{key:1,"schema-form":{schema:b(V),config:{}},loading:b(W),"save-button-label":t.$t(`components.detection_interface.detect`),"disable-button":b(B),"show-button":``,onOnFormSubmit:ve},null,8,[`schema-form`,`loading`,`save-button-label`,`disable-button`])):(U(),N(`div`,Yt,_(t.$t(`components.detection_interface.no_interface_config`)),1))])])}}}),Zt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qt(e,t){return U(),N(`svg`,Zt,[...t[0]||=[E(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M2 10v3m4-7v11m4-14v18m4-13v7m4-10v13m4-8v3`},null,-1)]])}var $t=B({name:`lucide-audio-lines`,render:Qt}),en={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function tn(e,t){return U(),N(`svg`,en,[...t[0]||=[E(`path`,{fill:`currentColor`,d:`M2 7V4q0-.825.588-1.412T4 2h3v2H4v3zm5 15H4q-.825 0-1.412-.587T2 20v-3h2v3h3zm10 0v-2h3v-3h2v3q0 .825-.587 1.413T20 22zm3-15V4h-3V2h3q.825 0 1.413.588T22 4v3zm-7.913 1.913Q11.5 8.325 11.5 7.5t.588-1.412T13.5 5.5t1.413.588T15.5 7.5t-.587 1.413T13.5 9.5t-1.412-.587M12.8 18h-4l1-5.1l-1.8.7V17H6v-4.7l3.95-1.7q.875-.375 1.288-.487T12 10q.525 0 .975.275T13.7 11l1 1.6q.65 1.05 1.763 1.725T19 15v2q-1.65 0-3.088-.687T13.5 14.5z`},null,-1)]])}var nn=B({name:`material-symbols-detection-and-zone`,render:tn}),rn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function an(e,t){return U(),N(`svg`,rn,[...t[0]||=[E(`path`,{fill:`currentColor`,d:`M8.113 13.888Q7.75 13.525 7.75 13t.363-.888T9 11.75t.888.363t.362.887t-.363.888T9 14.25t-.888-.363m6 0q-.362-.362-.362-.887t.363-.888t.887-.362t.888.363t.362.887t-.363.888t-.887.362t-.888-.363M12 20q3.35 0 5.675-2.325T20 12q0-.6-.075-1.162T19.65 9.75q-.525.125-1.05.188T17.5 10q-2.275 0-4.3-.975T9.75 6.3q-.8 1.95-2.287 3.388T4 11.85V12q0 3.35 2.325 5.675T12 20m0 2q-2.075 0-3.9-.787t-3.175-2.138T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22`},null,-1)]])}var on=B({name:`material-symbols-face`,render:an}),sn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function cn(e,t){return U(),N(`svg`,sn,[...t[0]||=[E(`path`,{fill:`currentColor`,d:`M8 17q-.425 0-.712-.288T7 16t.288-.712T8 15h5q-.35-.425-.562-.925T12.1 13H10q-.425 0-.712-.288T9 12t.288-.712T10 11h2.1q.125-.575.338-1.075T13 9H4q-.425 0-.712-.288T3 8t.288-.712T4 7h13q2.075 0 3.538 1.463T22 12t-1.463 3.538T17 17zm9-2q1.25 0 2.125-.875T20 12t-.875-2.125T17 9t-2.125.875T14 12t.875 2.125T17 15M3 13q-.425 0-.712-.288T2 12t.288-.712T3 11h4q.425 0 .713.288T8 12t-.288.713T7 13zm1 4q-.425 0-.712-.288T3 16t.288-.712T4 15h1q.425 0 .713.288T6 16t-.288.713T5 17z`},null,-1)]])}var ln=B({name:`material-symbols-motion-blur-rounded`,render:cn}),un={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function dn(e,t){return U(),N(`svg`,un,[...t[0]||=[E(`g`,{fill:`none`,"fill-rule":`evenodd`},[E(`path`,{d:`m12.594 23.258l-.012.002l-.071.035l-.02.004l-.014-.004l-.071-.036q-.016-.004-.024.006l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.016-.018m.264-.113l-.014.002l-.184.093l-.01.01l-.003.011l.018.43l.005.012l.008.008l.201.092q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.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.003-.011l.018-.43l-.003-.012l-.01-.01z`}),E(`path`,{fill:`currentColor`,d:`M15.586 2.757a2 2 0 0 1 2.828 0l2.829 2.829a2 2 0 0 1 0 2.828l-2.829 2.829a2 2 0 0 1-2.828 0l-2.829-2.829a2 2 0 0 1 0-2.828zM9 3a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm12 12a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2zM9 13a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2z`})],-1)]])}var fn=B({name:`mingcute-classify-2-fill`,render:dn}),pn={viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`};function mn(e,t){return U(),N(`svg`,pn,[...t[0]||=[E(`path`,{fill:`currentColor`,d:`M200 156c0 6.5-7.33 12-16 12s-16-5.5-16-12s7.33-12 16-12s16 5.5 16 12m32-100v144a16 16 0 0 1-16 16H40a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h176a16 16 0 0 1 16 16m-88.63 116.88l-44-104a8 8 0 0 0-14.74 0l-44 104a8 8 0 0 0 14.74 6.24L66.84 152h50.32l11.47 27.12a8 8 0 0 0 14.74-6.24M216 124c0-15.44-14.36-28-32-28a34.86 34.86 0 0 0-20.78 6.68a8 8 0 0 0 9.56 12.83A18.84 18.84 0 0 1 184 112c8.56 0 15.8 5.36 16 11.76v8a35.24 35.24 0 0 0-16-3.76c-17.64 0-32 12.56-32 28s14.36 28 32 28a35.1 35.1 0 0 0 16.93-4.26A8 8 0 0 0 216 176ZM73.61 136h36.78L92 92.53Z`},null,-1)]])}var hn=B({name:`ph-text-aa-fill`,render:mn}),gn={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _n(e,t){return U(),N(`svg`,gn,[...t[0]||=[E(`path`,{fill:`currentColor`,d:`M12.75 3a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0z`},null,-1),E(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M22.75 12.057c0 1.837 0 3.293-.153 4.432c-.158 1.172-.49 2.121-1.238 2.87c-.749.748-1.698 1.08-2.87 1.238c-1.14.153-2.595.153-4.433.153H9.944c-1.837 0-3.293 0-4.432-.153c-1.172-.158-2.121-.49-2.87-1.238c-.748-.749-1.08-1.698-1.238-2.87c-.153-1.14-.153-2.595-.153-4.433v-.926q.001-.575.008-1.096c.014-.975.05-1.81.145-2.523c.158-1.172.49-2.121 1.238-2.87c.749-.748 1.698-1.08 2.87-1.238c.716-.096 1.558-.132 2.541-.145l.697-.005a1 1 0 0 1 1.001.999V5a2.25 2.25 0 0 0 4.5 0v-.75c0-.552.448-1 1-.998c1.29.006 2.359.033 3.239.151c1.172.158 2.121.49 2.87 1.238c.748.749 1.08 1.698 1.238 2.87c.153 1.14.153 2.595.153 4.433zM8 9.75a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5zm0 3.5a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z`,"clip-rule":`evenodd`},null,-1)]])}var vn=B({name:`solar-plate-bold`,render:_n}),yn={class:`font-semibold text-xl truncate`},bn={class:`lg:col-span-2 order-1 !h-[220px]`},xn={class:`flex w-full h-full items-center justify-center`},Sn={class:`lg:col-span-1 lg:row-span-3 order-2`},Cn={class:`lg:!hidden card-title`},wn={key:0,class:`w-full h-full flex items-center justify-center`},Tn={key:1},En={class:`hidden lg:block text-base font-semibold border-b-[1px] border-color mb-3 pb-3`},Dn={key:0,class:`flex items-center justify-center w-full h-full text-muted text-sm`},On=[`onClick`],kn={key:0,class:`w-full h-full`},An={key:0,class:`flex flex-col items-center justify-center w-full h-full text-muted text-sm gap-1 text-center`},jn={key:2,class:`flex items-center justify-center w-full h-full text-muted text-sm`},Mn={key:9,class:`w-full h-full`},Nn={key:0,class:`flex items-center gap-2 text-muted text-sm mb-3`},Pn={key:1,class:`flex items-center justify-center w-full h-full text-muted text-sm`},Fn={class:`lg:col-span-2 order-3`},In={class:`lg:!hidden card-title`},Ln={class:`hidden lg:block text-base font-semibold border-b-[1px] border-color mb-3 pb-3`},Rn={key:0,class:`flex w-full h-full items-center justify-center`},zn=[`innerHTML`],Bn={class:`lg:col-span-2 order-4`},Vn={class:`lg:!hidden card-title`},Hn={class:`hidden lg:block text-base font-semibold border-b-[1px] border-color mb-3 pb-3`},Un={key:0,class:`flex w-full h-full items-center justify-center`},Wn=[`innerHTML`],Gn=G(V({__name:`Plugin`,setup(r){let u=new Se,p=new Ne,v=d(),S=Ce(),C=ae(),w=ee(),re=we(),{lgBreakpoint:O}=K(),{t:A}=c(),j=P(C.params.scope),B=P(C.params.pluginname),V=z(()=>j.value?`${j.value}/${B.value}`:B.value),{contract:W,error:G}=i(V);p.toggleQueryActivator(`getPluginContractQuery`,!1);let{data:q,isBusy:pe}=p.getPluginQuery(V),{data:me,isBusy:he}=p.getPluginReadmeQuery(V),{data:ye,isBusy:xe}=p.getPluginChangelogQuery(V),{data:Ee}=p.getPluginContractQuery(V),J=o(V),Y=J.config,De=J.isLoading,{mutate:Oe,isPending:ke}=u.addCameraExtensionQuery(),{mutate:Ie,isPending:Le}=u.removeCameraExtensionQuery(),X=P(`settings`),Z=P([]),Q=P([]),qe=P(je.UNKNOWN),Je,Ye=z(()=>!!W.value&&l(W.value,n.NVR)),$=z(()=>qe.value===je.READY||qe.value===je.STARTED),Xe=z(()=>$.value?Ye.value||Y.value?.schema?.length?!0:De.value:!1),Ze=Ue(`commonmark`,{highlight(e,t){if(t&&Ve.getLanguage(t))try{return`<pre><code class="hljs">`+Ve.highlight(e,{language:t,ignoreIllegals:!0}).value+`</code></pre>`}catch{}return`<pre><code class="hljs">`+Ze.utils.escapeHtml(e)+`</code></pre>`}});Ve.registerLanguage(`typescript`,He),Ve.registerLanguage(`yaml`,Be),Ve.registerLanguage(`json`,Re),Ve.registerLanguage(`python`,ze);function Qe(e,t){return e.pluginInfo?.name===t}async function $e(e){try{await J.setValue(e.key,void 0),w.add({severity:`success`,detail:A(`components.toast.config_updated`),life:3e3})}catch(e){w.add({severity:`error`,detail:e,life:3e3})}}async function et(e){try{let t=await J.submitValue(e.key,e.payload);if(t?.toast){let e=f(t.toast.type);w.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema?.length&&re.openComponentDialog(Pe,{data:{title:A(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:V.value,buttonKey:e.key}}})}catch(e){w.add({severity:`error`,detail:e,life:3e3})}}async function tt(e){if(Y.value?.schema.length)try{let t=Ae(Y.value.schema,e);await J.setConfig(t),w.add({severity:`success`,detail:A(`components.toast.config_updated`),life:3e3})}catch(e){w.add({severity:`error`,detail:e,life:3e3})}}async function nt(e){if(q.value&&q.value.contract){let n=t(q.value.contract)?[`hub`]:q.value.contract.provides;if(Q.value.includes(e.name))for(let t of n)Ie({cameraname:e.name,pluginname:q.value.pluginName,type:t},{onSuccess:()=>{Q.value=Q.value.filter(t=>t!==e.name)}});else for(let t of n)Oe({cameraname:e.name,pluginname:q.value.pluginName,type:t},{onSuccess:()=>{Q.value=[...Q.value,e.name]}})}}return m(q,e=>{if(!e||e.disabled){let e=Z.value.some(e=>e.name===`settings`),t=Z.value.some(e=>e.name===`cameras`);e?X.value=`settings`:t&&(X.value=`cameras`)}},{deep:!0}),m(C,()=>{B.value=C.params.pluginname},{deep:!0,immediate:!0}),m([q,J.isConnected],async([e,t])=>{e&&!e.disabled&&t&&await J.getConfig()},{immediate:!0}),m(V,e=>{Je?.stop(),e&&(Je=T(),Je.run(()=>{let t=Ge(e);t.connect(),m(t.status,e=>qe.value=e,{immediate:!0})}))},{immediate:!0}),m(Y,()=>{Y.value?p.toggleQueryActivator(`getPluginContractQuery`,!0):p.toggleQueryActivator(`getPluginContractQuery`,!1)},{deep:!0,immediate:!0}),m([Ee,Y,W,Xe,$],()=>{let e=[],t=!1;Xe.value&&e.push({name:`settings`,icon:ve,isInterface:!1,tooltip:A(`views.plugin.settings_tab_tooltip`)}),$.value&&W.value&&l(W.value,n.MotionDetection)&&(t=!0,e.push({name:`motion_detection`,icon:ln,isInterface:!0,tooltip:A(`views.plugin.motion_detection_tab_tooltip`)})),$.value&&W.value&&l(W.value,n.ObjectDetection)&&(t=!0,e.push({name:`object_detection`,icon:nn,isInterface:!0,tooltip:A(`views.plugin.object_detection_tab_tooltip`)})),$.value&&W.value&&l(W.value,n.AudioDetection)&&(t=!0,e.push({name:`audio_detection`,icon:$t,isInterface:!0,tooltip:A(`views.plugin.audio_detection_tab_tooltip`)})),$.value&&W.value&&l(W.value,n.FaceDetection)&&(t=!0,e.push({name:`face_detection`,icon:on,isInterface:!0,tooltip:A(`views.plugin.face_detection_tab_tooltip`)})),$.value&&W.value&&l(W.value,n.LicensePlateDetection)&&(t=!0,e.push({name:`license_plate_detection`,icon:vn,isInterface:!0,tooltip:A(`views.plugin.license_plate_detection_tab_tooltip`)})),$.value&&W.value&&l(W.value,n.ClassifierDetection)&&(t=!0,e.push({name:`classifier_detection`,icon:fn,isInterface:!0,tooltip:A(`views.plugin.classifier_detection_tab_tooltip`)})),$.value&&W.value&&l(W.value,n.ClipDetection)&&(t=!0,e.push({name:`clip_detection`,icon:hn,isInterface:!0,tooltip:A(`views.plugin.clip_detection_tab_tooltip`)})),$.value&&W.value&&l(W.value,n.Notifier)&&(t=!0,e.push({name:`notification`,icon:_e,isInterface:!0,tooltip:A(`views.plugin.notification_tab_tooltip`)})),e.push({name:`cameras`,icon:ge,isInterface:!1,tooltip:A(`views.plugin.cameras_tab_tooltip`)}),Ee.value?.cameras.length&&(Q.value=Ee.value.cameras.filter(e=>e.plugins?.some(e=>e.name===V.value)).map(e=>e.name)),Z.value=[...e],q.value?.disabled||(Xe.value?X.value=`settings`:t?X.value=Z.value.filter(e=>e.isInterface)[0].name:X.value=`cameras`)},{deep:!0,immediate:!0}),m(G,e=>{e&&q.value&&!q.value.disabled&&v.error(`Error connecting to plugin:`,e)}),y(()=>Je?.stop()),(t,n)=>{let r=We,i=e,o=Te,c=a,l=s,u=Ke,d=oe,ee=de,f=ne(`RouterLink`),p=Me,m=Xt,v=gt,y=Fe,C=ue,w=be,T=ce,re=fe,A=se,j=le;return U(),N(`div`,{key:b(V)},[H(o,{position:`left`},{default:F(()=>[H(i,{severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:n[0]||=e=>t.$router.push(`/plugins`)},{icon:F(()=>[H(r,{class:`w-6 h-6`})]),_:1})]),_:1}),H(o,{position:`center`},{default:F(()=>[E(`span`,yn,_(t.$t(`views.plugin.title`)),1)]),_:1}),E(`div`,{class:g([`grid grid-auto grid-cols-1 lg:grid-cols-3 gap-6 lg:h-full`,{"!gap-2":b(O)}])},[E(`div`,bn,[b(q)?(U(),D(u,{key:1,plugin:b(q),class:`h-[220px]`},null,8,[`plugin`])):(U(),D(l,{key:0,class:`cui-card items-center justify-center !h-[220px]`},{content:F(()=>[E(`div`,xn,[H(c,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])]),_:1}))]),E(`div`,Sn,[E(`span`,Cn,_(t.$t(`views.plugin.settings`)),1),H(l,{class:g([`cui-card !h-auto lg:!h-full`,{"items-center justify-center":b(pe)||b(De)}])},{content:F(()=>[b(pe)||b(De)?(U(),N(`div`,wn,[H(c,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(U(),N(`div`,Tn,[E(`h3`,En,_(t.$t(`views.plugin.settings`)),1),b(q)?.disabled?(U(),N(`div`,Dn,[E(`span`,null,_(t.$t(`views.plugin.disabled_info`)),1)])):(U(),D(A,{key:1,value:b(X),"onUpdate:value":n[1]||=e=>M(X)?X.value=e:null,scrollable:``},{default:F(()=>[H(ee,{class:`justify-between`,pt:{activeBar:{class:`!w-auto`},content:{class:`border-[1px] border-color cui-rounded-corner overflow-hidden`}}},{default:F(()=>[(U(!0),N(I,null,x(b(Z),(e,t)=>(U(),D(d,{key:t,disabled:e.isInterface&&b(q)?.disabled,value:e.name,"as-child":``},{default:F(t=>[R((U(),N(`div`,h({ref_for:!0},t.a11yAttrs,{class:[`flex flex-col items-center justify-center flex-1 content-background !py-3 h-[55px]`,[{"hover:!text-color active:!text-color focus:!text-color":!t.active},t.class]],onClick:t.onClick}),[(U(),D(te(e.icon),{class:`w-5 h-5`}))],16,On)),[[j,{value:e.tooltip}]])]),_:2},1032,[`disabled`,`value`]))),128))]),_:1}),H(re,{class:`px-0 pb-0`},{default:F(()=>[(U(!0),N(I,null,x(b(Z),(e,n)=>(U(),D(T,{key:n,value:e.name,"as-child":``},{default:F(n=>[n.active?(U(),N(`div`,h({key:0,class:n.class},{ref_for:!0},n.a11yAttrs),[e.name===`settings`?(U(),N(`div`,kn,[b(Ye)?(U(),N(`div`,An,[E(`span`,null,_(t.$t(`views.plugin.nvr_settings_hint`)),1),H(f,{to:`/settings/recordings`,class:`text-primary-500 hover:underline`},{default:F(()=>[ie(_(t.$t(`views.plugin.nvr_settings_link`)),1)]),_:1})])):b(Y)?.schema?.length?(U(),D(p,{key:1,"schema-form":{schema:b(Y).schema,config:b(Y).config},loading:b(J).isLoading.value,"save-button-color":`success`,onOnAction:$e,onOnSubmit:et,onOnFormSubmit:tt},null,8,[`schema-form`,`loading`])):(U(),N(`div`,jn,[E(`span`,null,_(t.$t(`views.plugin.no_settings`)),1)]))])):e.name===`motion_detection`?(U(),D(m,{key:1,"plugin-name":b(V),type:`motionDetection`},null,8,[`plugin-name`])):e.name===`object_detection`?(U(),D(m,{key:2,"plugin-name":b(V),type:`objectDetection`},null,8,[`plugin-name`])):e.name===`audio_detection`?(U(),D(m,{key:3,"plugin-name":b(V),type:`audioDetection`},null,8,[`plugin-name`])):e.name===`face_detection`?(U(),D(m,{key:4,"plugin-name":b(V),type:`faceDetection`},null,8,[`plugin-name`])):e.name===`license_plate_detection`?(U(),D(m,{key:5,"plugin-name":b(V),type:`licensePlateDetection`},null,8,[`plugin-name`])):e.name===`classifier_detection`?(U(),D(m,{key:6,"plugin-name":b(V),type:`classifierDetection`},null,8,[`plugin-name`])):e.name===`clip_detection`?(U(),D(m,{key:7,"plugin-name":b(V),type:`clipDetection`},null,8,[`plugin-name`])):e.name===`notification`?(U(),D(v,{key:8,"plugin-name":b(V)},null,8,[`plugin-name`])):e.name===`cameras`?(U(),N(`div`,Mn,[b($)?L(``,!0):(U(),N(`div`,Nn,[H(y,{class:`w-4 h-4 flex-shrink-0`}),E(`span`,null,_(t.$t(`views.plugin.assignment_requires_running`)),1)])),b(Ee)?.cameras?.length?(U(!0),N(I,{key:2},x(b(Ee).cameras,e=>(U(),N(`div`,{key:e.name,class:`cui-list-item`},[H(w,{disabled:b(ke)||b(Le)||b(J).isLoading.value,active:b(Q).includes(e.name),class:`h-14`,onClick:t=>b(S).open({cameraName:e.name})},k({default:F(()=>[E(`span`,null,_(e.name),1)]),_:2},[!b(q)||!Qe(e,b(q).pluginName)?{name:`append`,fn:F(()=>[H(C,{"model-value":b(Q).includes(e.name),disabled:b(ke)||b(Le)||b(J).isLoading.value||!b($),"onUpdate:modelValue":()=>nt(e)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]),key:`0`}:void 0]),1032,[`disabled`,`active`,`onClick`])]))),128)):(U(),N(`div`,Pn,[E(`span`,null,_(t.$t(`views.plugin.no_cameras`)),1)]))])):L(``,!0)],16)):L(``,!0)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`value`]))]))]),_:1},8,[`class`])]),E(`div`,Fn,[E(`span`,In,_(t.$t(`views.plugin.readme`)),1),H(l,{class:`cui-card !h-auto lg:!h-full`},{content:F(()=>[E(`h3`,Ln,_(t.$t(`views.plugin.readme`)),1),b(he)?(U(),N(`div`,Rn,[H(c,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(U(),N(`div`,{key:1,class:`markdown-body`,innerHTML:b(Ze).render(b(me)||t.$t(`views.plugin.no_readme`))},null,8,zn))]),_:1})]),E(`div`,Bn,[E(`span`,Vn,_(t.$t(`views.plugin.changelog`)),1),H(l,{class:`cui-card !h-auto lg:!h-full`},{content:F(()=>[E(`h3`,Hn,_(t.$t(`views.plugin.changelog`)),1),b(xe)?(U(),N(`div`,Un,[H(c,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(U(),N(`div`,{key:1,class:`markdown-body`,innerHTML:b(Ze).render(b(ye)||t.$t(`views.plugin.no_changelog`))},null,8,Wn))]),_:1})])],2)])}}}),[[`__scopeId`,`data-v-86c2c159`]]);export{Gn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.grid-auto[data-v-86c2c159]{grid-template-rows:220px auto}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/VersionsHandler-Dpo-L314.js","assets/vendor-cameraui-DgSMexWY.js","assets/rolldown-runtime-DAXXjFlN.js","assets/vendor-DoIl6acN.js","assets/api-aSYFKxo6.js","assets/vendor-core-BKHiXSX7.js","assets/api-vCJ1T8Ow.css","assets/useSharedComposables-gpJ--qZh.js","assets/ui-DrzKhUXW.js","assets/vendor-primevue-7iEzPOvf.js","assets/plugins-NVAodP6s.js","assets/useLogsSocket-OnTDnkPr.js","assets/_plugin-vue_export-helper-BDNMzG2s.js","assets/vendor-xterm-BRN-hOYD.js","assets/vendor-xterm-BrP-ENHg.css","assets/useLogsSocket-4F2-d9fa.css","assets/vendor-markdown-UV_ycMZu.js","assets/vendor-markdown-DtOhvyRx.css","assets/platformLabels-D-cF6OTP.js","assets/server-CRxodRik.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{Hn as e,Vn as t,fi as n}from"./vendor-cameraui-DgSMexWY.js";import{c as r,s as i}from"./api-aSYFKxo6.js";import{Er as a,Sr as o,Vn as s,Wt as c,br as l,dn as u,fn as d,mn as f,nr as p,on as m,pn as h,rr as g,un as _,ur as v,vn as y,xn as b,yn as x,zn as S}from"./vendor-DoIl6acN.js";import{t as C}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{J as ee,U as te,a as ne,q as re}from"./vendor-primevue-7iEzPOvf.js";import{t as ie}from"./CuiImage-B97QDAl7.js";import{t as ae}from"./bug-DPw8k4Lk.js";import{n as w,t as T}from"./useCuiDialog-DHktK-mZ.js";import{t as E}from"./plugins-NVAodP6s.js";import{t as oe}from"./home-Dey3bw1P.js";import{t as se}from"./clock-outline-MhJC2-0d.js";import{t as ce}from"./source-branch-Cd8fHY0E.js";import{t as D}from"./CuiPluginTrustBadge-YhfqGTyR.js";import{t as O}from"./account-DqOHQKv8.js";import{t as k}from"./check-circle-BauXcL6H.js";import{t as le}from"./CuiMarkdownContent-DaJ8HzaP.js";import{t as ue}from"./alert-circle-azHizGIK.js";import{a as de,i as fe,t as pe}from"./CuiPluginCategoryChip-rfdhCEi-.js";import{n as A,r as j}from"./platformLabels-D-cF6OTP.js";var M={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function N(e,t){return S(),f(`svg`,M,[...t[0]||=[u(`path`,{fill:`currentColor`,d:`M12 3c-1.27 0-2.4.8-2.82 2H3v2h1.95L2 14c-.47 2 1 3 3.5 3s4.06-1 3.5-3L6.05 7h3.12c.33.85.98 1.5 1.83 1.83V20H2v2h20v-2h-9V8.82c.85-.32 1.5-.97 1.82-1.82h3.13L15 14c-.47 2 1 3 3.5 3s4.06-1 3.5-3l-2.95-7H21V5h-6.17C14.4 3.8 13.27 3 12 3m0 2a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m-6.5 5.25L7 14H4zm13 0L20 14h-3z`},null,-1)]])}var P=v({name:`mdi-scale-balance`,render:N}),F={class:`plugin-detail`},I={class:`flex items-start gap-4`},L={class:`w-16 h-16 relative rounded-2xl flex-shrink-0 border-2 border-color overflow-hidden`},R={class:`flex flex-col min-w-0 flex-1`},z={class:`flex items-center gap-2 flex-wrap`},B={class:`text-xl font-semibold truncate`},me={class:`text-sm text-muted truncate`},he={key:0,class:`text-sm mt-1`},ge={class:`flex flex-wrap items-center gap-2 mt-4`},_e={key:0,class:`detail-meta`},ve={key:1,class:`detail-meta`},ye={key:2,class:`detail-meta`},V={key:3,class:`detail-meta`},be={key:0,class:`flex flex-wrap items-center gap-1 mt-4`},xe={key:1,class:`mt-4 flex flex-col gap-2`},Se={class:`flex items-center gap-1`},Ce={key:0,class:`flex flex-wrap items-center gap-1`},we={key:1,class:`ml-4 list-disc`},Te={key:2,class:`mt-5`},Ee={class:`text-base font-semibold mb-2`},De={class:`screenshots-row custom-scrollbar`},Oe={class:`readme-section`},ke={key:0,class:`flex w-full items-center justify-center py-10`},H=C(b({__name:`PluginDetail`,props:{plugin:{}},setup(v,{expose:b}){let C=w(()=>c(()=>import(`./VersionsHandler-Dpo-L314.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),M=new E,N=v,H=T(),{t:U}=n(),{plugin:W}=l(N),{data:G}=M.getPluginLogoQuery(W.value.pluginName),{data:Ae,isBusy:je}=M.getPluginReadmeQuery(W.value.pluginName),{data:K}=M.getPluginCompatQuery(W.value.pluginName),Me=_(()=>W.value.logo||G.value),q=_(()=>{let e=W.value.downloads?.weekly;return typeof e==`number`?U(`components.plugin_search.downloads_per_week`,{count:i(e)}):void 0}),J=_(()=>W.value.lastUpdated?r(W.value.lastUpdated):void 0),Ne=_(()=>!!(W.value.links?.npm||W.value.links?.repository||W.value.links?.homepage||W.value.links?.bugs)),Y=_(()=>(K.value?.os??[]).map(j)),X=_(()=>(K.value?.cpu??[]).map(A)),Z=_(()=>K.value?.platformCompatible??!0),Pe=_(()=>!!K.value&&(Y.value.length>0||X.value.length>0||!Z.value||(K.value?.issues?.length??0)>0));function Q(){H.openComponentDialog(C,{data:{title:U(`components.dialog.title.install`),confirmText:U(`components.form.button.install`),contentProps:{target:o(W),installVersion:`latest`,isNewPlugin:!0}}})}return b({onConfirm:Q}),(n,r)=>{let i=ie,c=D,l=pe,_=fe,v=se,b=P,C=O,w=de,T=e,E=ce,A=oe,j=ae,M=k,N=ue,H=ne,U=re,G=te,Q=t,Fe=le,$=ee;return S(),f(`div`,F,[u(`div`,I,[u(`div`,L,[x(i,{src:o(Me),alt:`Plugin icon`,class:`block w-full h-full`,"image-container-class":`w-full h-full`,"image-class":`object-contain`},null,8,[`src`])]),u(`div`,R,[u(`div`,z,[u(`h2`,B,a(o(W).displayName),1),x(c,{trust:o(W).trust,"show-label":!1},null,8,[`trust`])]),u(`div`,me,a(o(W).pluginName),1),o(W).tagline||o(W).description?(S(),f(`p`,he,a(o(W).tagline||o(W).description),1)):h(``,!0)])]),u(`div`,ge,[x(l,{category:o(W).category},null,8,[`category`]),o(q)?(S(),f(`span`,_e,[x(_,{class:`detail-meta-icon`}),y(` `+a(o(q)),1)])):h(``,!0),o(J)?(S(),f(`span`,ve,[x(v,{class:`detail-meta-icon`}),y(` `+a(n.$t(`components.plugin_search.updated_ago`,{time:o(J)})),1)])):h(``,!0),o(W).license?(S(),f(`span`,ye,[x(b,{class:`detail-meta-icon`}),y(` `+a(o(W).license),1)])):h(``,!0),o(W).author?(S(),f(`span`,V,[x(C,{class:`detail-meta-icon`}),y(` `+a(o(W).author),1)])):h(``,!0)]),o(Ne)?(S(),f(`div`,be,[o(W).links?.npm?g((S(),d(T,{key:0,text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`,onClick:r[0]||=e=>n.$router.absUrl(o(W).links.npm,!0)},{icon:p(()=>[x(w,{width:`100%`,height:`100%`})]),_:1})),[[$,{value:`NPM`},void 0,{top:!0}]]):h(``,!0),o(W).links?.repository?g((S(),d(T,{key:1,text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`,onClick:r[1]||=e=>n.$router.absUrl(o(W).links.repository,!0)},{icon:p(()=>[x(E,{width:`100%`,height:`100%`})]),_:1})),[[$,{value:n.$t(`components.plugin_search.repository`)},void 0,{top:!0}]]):h(``,!0),o(W).links?.homepage?g((S(),d(T,{key:2,text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`,onClick:r[2]||=e=>n.$router.absUrl(o(W).links.homepage,!0)},{icon:p(()=>[x(A,{width:`100%`,height:`100%`})]),_:1})),[[$,{value:n.$t(`components.plugin_search.homepage`)},void 0,{top:!0}]]):h(``,!0),o(W).links?.bugs?g((S(),d(T,{key:3,text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`,onClick:r[3]||=e=>n.$router.absUrl(o(W).links.bugs,!0)},{icon:p(()=>[x(j,{width:`100%`,height:`100%`})]),_:1})),[[$,{value:n.$t(`components.plugin_search.bugs`)},void 0,{top:!0}]]):h(``,!0)])):h(``,!0),o(Pe)?(S(),f(`div`,xe,[x(H,{severity:o(Z)?`success`:`danger`},{default:p(()=>[u(`span`,Se,[o(Z)?(S(),d(M,{key:0})):(S(),d(N,{key:1})),y(` `+a(o(Z)?n.$t(`components.plugin_search.compatible_system`):n.$t(`components.plugin_search.incompatible_system`)),1)])]),_:1},8,[`severity`]),o(Y).length||o(X).length?(S(),f(`div`,Ce,[(S(!0),f(m,null,s(o(Y),e=>(S(),d(H,{key:`os-${e}`,severity:`secondary`,value:e},null,8,[`value`]))),128)),(S(!0),f(m,null,s(o(X),e=>(S(),d(H,{key:`cpu-${e}`,severity:`secondary`,value:e},null,8,[`value`]))),128))])):h(``,!0),o(K)?.issues?.length?(S(),f(`ul`,we,[(S(!0),f(m,null,s(o(K).issues,e=>(S(),f(`li`,{key:e.engine,class:`text-xs text-muted`},a(n.$t(`components.dialog.message.compatibility_engine`,{engine:e.engine,required:e.required,current:e.current})),1))),128))])):h(``,!0)])):h(``,!0),o(W).screenshots?.length?(S(),f(`div`,Te,[u(`h3`,Ee,a(n.$t(`components.plugin_search.screenshots`)),1),u(`div`,De,[(S(!0),f(m,null,s(o(W).screenshots,(e,t)=>(S(),d(U,{key:t,src:e,alt:`Screenshot`,preview:``,class:`screenshot-thumb`},null,8,[`src`]))),128))])])):h(``,!0),x(G),u(`div`,Oe,[o(je)?(S(),f(`div`,ke,[x(Q,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(S(),d(Fe,{key:1,content:o(Ae)||n.$t(`views.plugin.no_readme`)},null,8,[`content`]))])])}}}),[[`__scopeId`,`data-v-059f0867`]]);export{H as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.detail-meta[data-v-059f0867]{color:var(--text-muted-color);align-items:center;gap:.25rem;font-size:.75rem;display:inline-flex}.detail-meta-icon[data-v-059f0867]{width:.9rem;height:.9rem}.screenshots-row[data-v-059f0867]{gap:.5rem;padding-bottom:.25rem;display:flex;overflow-x:auto}.screenshot-thumb[data-v-059f0867] img{border-radius:var(--border-radius-md);border:1px solid var(--border-color-inner);object-fit:cover;width:auto;height:140px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./PluginSearch-DCuLwE3v.js";export{e as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/VersionsHandler-Dpo-L314.js","assets/vendor-cameraui-DgSMexWY.js","assets/rolldown-runtime-DAXXjFlN.js","assets/vendor-DoIl6acN.js","assets/api-aSYFKxo6.js","assets/vendor-core-BKHiXSX7.js","assets/api-vCJ1T8Ow.css","assets/useSharedComposables-gpJ--qZh.js","assets/ui-DrzKhUXW.js","assets/vendor-primevue-7iEzPOvf.js","assets/plugins-NVAodP6s.js","assets/useLogsSocket-OnTDnkPr.js","assets/_plugin-vue_export-helper-BDNMzG2s.js","assets/vendor-xterm-BRN-hOYD.js","assets/vendor-xterm-BrP-ENHg.css","assets/useLogsSocket-4F2-d9fa.css","assets/vendor-markdown-UV_ycMZu.js","assets/vendor-markdown-DtOhvyRx.css","assets/platformLabels-D-cF6OTP.js","assets/server-CRxodRik.js","assets/PluginDetail-DKywYzmS.js","assets/CuiImage-B97QDAl7.js","assets/CuiImage-Bxf7z2N4.css","assets/bug-DPw8k4Lk.js","assets/useCuiDialog-DHktK-mZ.js","assets/close-DuwOOM-P.js","assets/useElectron-mh8HQUAI.js","assets/home-Dey3bw1P.js","assets/clock-outline-MhJC2-0d.js","assets/source-branch-Cd8fHY0E.js","assets/CuiPluginTrustBadge-YhfqGTyR.js","assets/shield-check-ChlSHOnR.js","assets/CuiPluginTrustBadge-QHTLaN1n.css","assets/account-DqOHQKv8.js","assets/check-circle-BauXcL6H.js","assets/CuiMarkdownContent-DaJ8HzaP.js","assets/alert-circle-azHizGIK.js","assets/CuiPluginCategoryChip-rfdhCEi-.js","assets/motion-sensor-DD8SfD-m.js","assets/cctv-CBtg_v6o.js","assets/bell-ring-CenQn4Yt.js","assets/CuiPluginCategoryChip-CdGrTCxH.css","assets/PluginDetail-DbYxVe3g.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{Hn as e,Kn as t,fi as n,lt as r,tt as i}from"./vendor-cameraui-DgSMexWY.js";import{c as a,s as o}from"./api-aSYFKxo6.js";import{$n as s,Cr as c,En as l,Er as u,Sr as d,Vn as f,Wt as p,an as m,dn as h,fn as g,in as _,lr as v,mn as y,mr as b,nr as x,on as S,pn as C,rr as w,un as T,ur as E,vn as D,xn as O,yn as k,zn as A}from"./vendor-DoIl6acN.js";import{t as j}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ee}from"./close-DuwOOM-P.js";import{J as M,L as te,R as ne,U as re,a as N,j as ie,s as ae}from"./vendor-primevue-7iEzPOvf.js";import{t as P}from"./CuiImage-B97QDAl7.js";import{t as oe}from"./refresh-rounded-Bqiw9DUu.js";import{n as F,t as se}from"./useCuiDialog-DHktK-mZ.js";import{t as I}from"./github-DLhaVazy.js";import{t as ce}from"./plugins-NVAodP6s.js";import{t as L}from"./clock-outline-MhJC2-0d.js";import{t as R}from"./CuiPluginTrustBadge-YhfqGTyR.js";import{a as z,i as B,n as le,r as ue,t as V}from"./CuiPluginCategoryChip-rfdhCEi-.js";var H={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function U(e,t){return A(),y(`svg`,H,[...t[0]||=[h(`path`,{fill:`currentColor`,d:`M13 15.6c.3.2.7.2 1 0l5-2.9v.3c.7 0 1.4.1 2 .4v-1.8l1-.6c.5-.3.6-.9.4-1.4l-1.5-2.5c-.1-.2-.2-.4-.4-.5l-7.9-4.4c-.2-.1-.4-.2-.6-.2s-.4.1-.6.2L3.6 6.6c-.2.1-.4.2-.5.4L1.6 9.6c-.3.5-.1 1.1.4 1.4c.3.2.7.2 1 0v5.5c0 .4.2.7.5.9l7.9 4.4c.2.1.4.2.6.2s.4-.1.6-.2l.9-.5c-.3-.6-.4-1.3-.5-2m-2 0l-6-3.4V9.2l6 3.4zm9.1-9.6l-6.3 3.6l-.6-1l6.3-3.6zM12 10.8V4.2l6 3.3zm8 4.2v3h3v2h-3v3h-2v-3h-3v-2h3v-3z`},null,-1)]])}var de=E({name:`mdi-package-variant-plus`,render:U}),W={class:`plugin-store-card-body`},G={class:`flex items-start gap-3 min-w-0`},K={class:`plugin-store-icon flex-shrink-0`},q={class:`min-w-0 flex-1`},J={class:`flex items-center gap-2 min-w-0`},fe={class:`font-medium text-base truncate`},pe={class:`text-sm text-muted truncate`},me={class:`plugin-store-card-description`},Y={class:`flex flex-wrap items-center gap-x-3 gap-y-1 mt-auto pt-2`},X={key:1,class:`plugin-store-meta`},Z={key:2,class:`plugin-store-meta`},Q={class:`flex gap-1`},he=j(O({__name:`CuiPluginStoreCard`,props:{plugin:{},inProgress:{type:Boolean}},emits:[`open`,`install`],setup(t,{emit:r}){let i=t,s=r,{t:l}=n(),f=T(()=>i.plugin),p=T(()=>{let e=f.value.downloads?.weekly;return typeof e==`number`?l(`components.plugin_search.downloads_per_week`,{count:o(e)}):void 0}),v=T(()=>f.value.lastUpdated?a(f.value.lastUpdated):void 0);return(n,r)=>{let i=P,a=R,o=N,l=V,b=B,S=L,T=I,E=e,O=z,j=M;return A(),y(`div`,{class:c([`plugin-store-card shadow-sm transition-default card-background custom-scrollbar`,{"opacity-50 in-progress":t.inProgress}]),role:`button`,tabindex:`0`,onClick:r[4]||=e=>s(`open`,d(f)),onKeydown:r[5]||=_(e=>s(`open`,d(f)),[`enter`])},[h(`div`,W,[h(`div`,G,[h(`div`,K,[k(i,{src:d(f).logo,alt:`Plugin logo`,class:`block w-full h-full`,"image-container-class":`w-full h-full`,"image-class":`object-contain`},null,8,[`src`])]),h(`div`,q,[h(`div`,J,[h(`h4`,fe,u(d(f).displayName),1),k(a,{trust:d(f).trust,"show-label":!1,class:`flex-shrink-0`},null,8,[`trust`])]),h(`div`,pe,u(d(f).pluginName),1)])]),h(`p`,me,u(d(f).tagline||d(f).description),1),h(`div`,Y,[d(f).compatible===!1?w((A(),g(o,{key:0,severity:`danger`,value:n.$t(`components.plugin_search.incompatible`)},null,8,[`value`])),[[j,{value:n.$t(`components.plugin_search.incompatible_system`)},void 0,{top:!0}]]):C(``,!0),k(l,{category:d(f).category},null,8,[`category`]),d(p)?(A(),y(`span`,X,[k(b,{class:`plugin-store-meta-icon`}),D(` `+u(d(p)),1)])):C(``,!0),d(v)?(A(),y(`span`,Z,[k(S,{class:`plugin-store-meta-icon`}),D(` `+u(n.$t(`components.plugin_search.updated_ago`,{time:d(v)})),1)])):C(``,!0)])]),h(`div`,{class:`plugin-store-card-actions`,onClick:r[3]||=m(()=>{},[`stop`])},[h(`div`,Q,[d(f).links?.repository||d(f).links?.homepage?w((A(),g(E,{key:0,text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`,onClick:r[0]||=e=>n.$router.absUrl(d(f).links?.repository||d(f).links?.homepage,!0)},{icon:x(()=>[k(T,{width:`100%`,height:`100%`})]),_:1})),[[j,{value:`Github`},void 0,{top:!0}]]):C(``,!0),d(f).links?.npm?w((A(),g(E,{key:1,text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`,onClick:r[1]||=e=>n.$router.absUrl(d(f).links.npm,!0)},{icon:x(()=>[k(O,{width:`100%`,height:`100%`})]),_:1})),[[j,{value:`NPM`},void 0,{top:!0}]]):C(``,!0)]),k(E,{class:`cui-button-medium ml-auto`,label:n.$t(`components.form.button.install`),disabled:t.inProgress,onClick:r[2]||=e=>s(`install`,d(f))},null,8,[`label`,`disabled`])])],34)}}}),[[`__scopeId`,`data-v-bed15028`]]),ge={class:`cui-label`},_e={class:`flex flex-wrap gap-2 mt-4`},ve={key:0,class:`mt-6`},ye={class:`featured-row custom-scrollbar mt-3`},be={class:`flex flex-row items-center justify-center w-full mt-8`},xe={key:3,class:`text-center py-10`},Se={class:`text-muted mb-2`},Ce={class:`text-muted`},we={key:4,class:`w-full`},Te={key:5,class:`w-full plugin-list`},$=j(O({__name:`PluginSearch`,setup(a,{expose:o}){let c=F(()=>p(()=>import(`./VersionsHandler-Dpo-L314.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),_=F(()=>p(()=>import(`./PluginDetail-DKywYzmS.js`),__vite__mapDeps([20,1,2,3,4,5,6,12,9,21,22,23,24,7,8,25,26,10,27,28,29,30,31,32,33,34,35,16,17,36,37,38,39,40,41,18,42]))),E=new ce,D=se(),{t:O}=n(),j=l(`dialogRefProps`),N=b(``),P=b({}),I=b([]),L=b(`all`),R=b(`all`),z=b(`name`),B=b(!1),{data:V,isBusy:H,refetch:U}=E.searchPluginsQuery(P,{page:1,pageSize:-1},B),{data:W,isBusy:G,refetch:K}=E.getPluginsProgressQuery({page:1,pageSize:-1}),q=T(()=>H.value||G.value),J=T(()=>!!(j.loading?.value||q.value)),fe=T(()=>[{label:O(`components.plugin_search.filter_all_categories`),value:`all`},...ue.map(e=>({label:O(le[e].labelKey),value:e}))]),pe=T(()=>[{label:O(`components.plugin_search.filter_all_trust`),value:`all`},{label:O(`components.plugin_search.trust_official`),value:`official`},{label:O(`components.plugin_search.trust_verified`),value:`verified`},{label:O(`components.plugin_search.trust_community`),value:`community`}]),me=T(()=>[{label:O(`components.plugin_search.sort_name`),value:`name`},{label:O(`components.plugin_search.sort_downloads`),value:`downloads`},{label:O(`components.plugin_search.sort_updated`),value:`updated`}]),Y=T(()=>{let e=I.value.slice();return L.value!==`all`&&(e=e.filter(e=>e.category===L.value)),R.value!==`all`&&(e=e.filter(e=>e.trust===R.value)),e.sort((e,t)=>{switch(z.value){case`downloads`:return(t.downloads?.weekly??0)-(e.downloads?.weekly??0);case`updated`:return new Date(t.lastUpdated??0).getTime()-new Date(e.lastUpdated??0).getTime();default:return(e.displayName||e.pluginName).localeCompare(t.displayName||t.pluginName)}}),e}),X=T(()=>Y.value.filter(e=>e.featured)),Z=T(()=>Y.value.filter(e=>!e.featured));function Q(e){return W.value?.result.some(t=>t.pluginName===e)}function $(e){e?.preventDefault(),P.value.pluginname=N.value??``}function Ee(){N.value=``,P.value={},L.value=`all`,R.value=`all`,z.value=`name`,$()}function De(){B.value=!0,Promise.all([U(),K()]).finally(()=>{B.value=!1})}function Oe(e){D.openComponentDialog(c,{data:{title:O(`components.dialog.title.install`),loading:J,contentProps:{target:d(e),installVersion:`latest`,isNewPlugin:!0}}})}function ke(e){D.openComponentDialog(_,{data:{title:O(`components.dialog.title.details`),confirmText:O(`components.form.button.install`),contentProps:{plugin:d(e)}}})}return s(V,e=>{e?.result&&(I.value=e.result.filter(e=>!e.installPath))},{immediate:!0,deep:!0}),o({isLoading:J}),(n,a)=>{let o=i,s=ee,c=e,l=te,p=ne,_=ie,b=he,T=oe,E=t,D=ae,O=re,j=de,P=r,F=M;return A(),y(`div`,null,[h(`form`,{onSubmit:m($,[`prevent`])},[h(`label`,ge,u(n.$t(`components.form.label.name`)),1),k(p,null,{default:x(()=>[k(o,{modelValue:d(N),"onUpdate:modelValue":a[0]||=e=>v(N)?N.value=e:null,modelModifiers:{trim:!0},loading:d(q),placeholder:`camera-ui-`,type:`text`},null,8,[`modelValue`,`loading`]),k(l,null,{default:x(()=>[k(c,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`,onClick:Ee},{icon:x(()=>[k(s,{width:`100%`,height:`100%`})]),_:1})]),_:1})]),_:1})],32),h(`div`,_e,[k(_,{modelValue:d(L),"onUpdate:modelValue":a[1]||=e=>v(L)?L.value=e:null,options:d(fe),"option-label":`label`,"option-value":`value`,class:`flex-1 min-w-[140px]`,placeholder:n.$t(`components.plugin_search.filter_category`)},null,8,[`modelValue`,`options`,`placeholder`]),k(_,{modelValue:d(R),"onUpdate:modelValue":a[2]||=e=>v(R)?R.value=e:null,options:d(pe),"option-label":`label`,"option-value":`value`,class:`flex-1 min-w-[140px]`,placeholder:n.$t(`components.plugin_search.filter_trust`)},null,8,[`modelValue`,`options`,`placeholder`]),k(_,{modelValue:d(z),"onUpdate:modelValue":a[3]||=e=>v(z)?z.value=e:null,options:d(me),"option-label":`label`,"option-value":`value`,class:`flex-1 min-w-[140px]`,placeholder:n.$t(`components.plugin_search.sort_by`)},null,8,[`modelValue`,`options`,`placeholder`])]),!d(q)&&d(X).length?(A(),y(`div`,ve,[h(`h3`,null,u(n.$t(`components.plugin_search.featured`)),1),h(`div`,ye,[(A(!0),y(S,null,f(d(X),(e,t)=>(A(),y(`div`,{key:t,class:`featured-item`},[k(b,{plugin:e,"in-progress":Q(e.pluginName),onOpen:ke,onInstall:Oe},null,8,[`plugin`,`in-progress`])]))),128))])])):C(``,!0),h(`div`,be,[h(`h3`,null,u(n.$t(`components.plugin_search.plugins`)),1),w((A(),g(c,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md ml-auto`,onClick:De},{icon:x(()=>[k(T,{width:`100%`,height:`100%`})]),_:1})),[[F,{value:n.$t(`components.plugin_search.refresh`)},void 0,{left:!0}]]),k(E,{size:`small`,class:`ml-2 rounded-full`,value:String(d(Z).length)},null,8,[`value`])]),d(q)?(A(),g(D,{key:1,mode:`indeterminate`,class:`my-3 !h-[1px]`})):(A(),g(O,{key:2,class:`m-0 py-3`})),!d(q)&&!d(Z).length?(A(),y(`div`,xe,[h(`div`,Se,[k(j,{class:`w-12 h-12 mx-auto opacity-30`})]),h(`p`,Ce,u(n.$t(`views.plugins.no_plugins`)),1)])):d(q)?(A(),y(`div`,we,[(A(),y(S,null,f(6,e=>k(P,{key:e,class:`mb-2`,height:`132px`})),64))])):(A(),y(`div`,Te,[(A(!0),y(S,null,f(d(Z),(e,t)=>w((A(),g(b,{key:t,plugin:e,"in-progress":Q(e.pluginName),onOpen:ke,onInstall:Oe},null,8,[`plugin`,`in-progress`])),[[F,{value:Q(e.pluginName)?n.$t(`components.plugin_search.in_progress`):void 0}]])),128))]))])}}}),[[`__scopeId`,`data-v-ebbed596`]]);export{$ as t};
|