@camera.ui/server 2.1.16 → 2.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/dist/interface/assets/{404-CqZDSHs_.js → 404-Cg1J2LX8.js} +1 -1
  2. package/dist/interface/assets/{About-Dk4SUTxo.js → About-CW7G6onF.js} +1 -1
  3. package/dist/interface/assets/Automation-CIwBJK1Y.js +3 -0
  4. package/dist/interface/assets/{AutomationImport-DDywNuRK.js → AutomationImport-CHkNv7C-.js} +2 -2
  5. package/dist/interface/assets/{AutomationStore-o0JYwGRr.js → AutomationStore-5bTym-Gl.js} +2 -2
  6. package/dist/interface/assets/{AutomationStoreDetail-DeAGahaF.js → AutomationStoreDetail-BF8UoG_l.js} +2 -2
  7. package/dist/interface/assets/Automations-CaX2fHhJ.js +2 -0
  8. package/dist/interface/assets/Camera-1zdmJnP-.js +2 -0
  9. package/dist/interface/assets/Camera-DSyI4J5-.css +1 -0
  10. package/dist/interface/assets/{CameraConsole-32WtMX1a.js → CameraConsole-CB1HEFKJ.js} +2 -2
  11. package/dist/interface/assets/{Cameras-zffI0fD9.js → Cameras-CyCY0rW9.js} +2 -2
  12. package/dist/interface/assets/Camview-Dia7G1u_.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-Dg0V9Hei.js → CertificateUpload-jP-JIxmY.js} +1 -1
  14. package/dist/interface/assets/{Config-CKrqFe-g.js → Config-DOa7WHyQ.js} +1 -1
  15. package/dist/interface/assets/{ConfigActionCameraControl-sbvBJQr3.js → ConfigActionCameraControl-BmCE3XLC.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionDelay-CiPxydTn.js → ConfigActionDelay-CfHCZ0uf.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionHttp-UqiZm0kq.js → ConfigActionHttp-DdM7gEb0.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionImageInput-DkGVZ-ti.js → ConfigActionImageInput-CrPPNT4K.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionMqtt-DQu5H4bY.js → ConfigActionMqtt-D7-u4zri.js} +1 -1
  20. package/dist/interface/assets/ConfigActionNotification-BSuUI2FP.js +1 -0
  21. package/dist/interface/assets/{ConfigActionNotificationControl-B_EpM5m9.js → ConfigActionNotificationControl-DfvAxKnx.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionOutput-DeOsk0T1.js → ConfigActionOutput-DPplSpm_.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionPlugin-CSZHcNQ6.js → ConfigActionPlugin-BnRn_p26.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionSensor-Dx7DcDVr.js → ConfigActionSensor-CoEoqFAY.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSnapshot-Baj-r4Cd.js → ConfigActionSnapshot-wXdFiyU-.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionVariable-Ccu___aS.js → ConfigActionVariable-BqJvOOHH.js} +1 -1
  27. package/dist/interface/assets/{ConfigConditionIfElse-0hU7UW8q.js → ConfigConditionIfElse-DG2Kgqn5.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionSensorState-BX19KYLJ.js → ConfigConditionSensorState-BytECo6r.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSwitch-D-XUhwcE.js → ConfigConditionSwitch-DaSt9uZE.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionTime-B6OO8cmh.js → ConfigConditionTime-D42OsshU.js} +1 -1
  31. package/dist/interface/assets/{ConfigSensorValueInput-DZHYQez8.js → ConfigSensorValueInput-BtEmtZSm.js} +1 -1
  32. package/dist/interface/assets/{ConfigTriggerDetection-BNyR5aOG.js → ConfigTriggerDetection-CDH2fzsu.js} +1 -1
  33. package/dist/interface/assets/ConfigTriggerGeofence-Dopegic5.js +1 -0
  34. package/dist/interface/assets/{ConfigTriggerManual-DFSTAuUt.js → ConfigTriggerManual-DAtWfH0-.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerMqtt-D_O8RyrQ.js → ConfigTriggerMqtt-CB3_PxqD.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerSchedule-BFZnBfCM.js → ConfigTriggerSchedule-BUzOrF23.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSensor-D1Tst2wQ.js → ConfigTriggerSensor-D5kRIb7I.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSystem-BNfatCp8.js → ConfigTriggerSystem-Cud77VMR.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerWebhook--nEO_Odl.js → ConfigTriggerWebhook-CeG5R3kV.js} +1 -1
  40. package/dist/interface/assets/Console-DdOD6Pd5.js +1 -0
  41. package/dist/interface/assets/{CuiAutomationRunsDialog-CkMRT1C8.js → CuiAutomationRunsDialog-Cym6xMVJ.js} +1 -1
  42. package/dist/interface/assets/CuiBottomSheet-B3QSHp4-.js +1 -0
  43. package/dist/interface/assets/{CuiBottomSheet-mKu68LHd.js → CuiBottomSheet-BSoMhymR.js} +1 -1
  44. package/dist/interface/assets/{CuiCameraPipCard-Djp8qBvZ.js → CuiCameraPipCard-DGgrxZJd.js} +1 -1
  45. package/dist/interface/assets/CuiCameraRecordings-Bu68AFdM.js +1 -0
  46. package/dist/interface/assets/{CuiCameraShares-B73pWIFh.js → CuiCameraShares-BOhfTcxQ.js} +1 -1
  47. package/dist/interface/assets/CuiCameraTable-C1CHYnda.js +1 -0
  48. package/dist/interface/assets/{CuiCameraTable-DripFD6D.js → CuiCameraTable-D0lc0VAJ.js} +2 -2
  49. package/dist/interface/assets/{CuiChartTable-DyyQV7mt.js → CuiChartTable-DcrFI8tT.js} +1 -1
  50. package/dist/interface/assets/{CuiConsole-UxJwQqNG.js → CuiConsole-ICLBq4Q-.js} +2 -2
  51. package/dist/interface/assets/{CuiDataTable-DZm0I8k7.js → CuiDataTable-BooFPsGH.js} +1 -1
  52. package/dist/interface/assets/{CuiLightControl-CB3l0ZLj.js → CuiLightControl-D1ih2hO-.js} +1 -1
  53. package/dist/interface/assets/{CuiList-DMQgYqaU.js → CuiList-ChI82KjI.js} +1 -1
  54. package/dist/interface/assets/{CuiPluginCard-HpQMNND1.js → CuiPluginCard-DqdSWrwb.js} +2 -2
  55. package/dist/interface/assets/{CuiPluginCategoryChip-C6aEP-ug.js → CuiPluginCategoryChip-DsRcMb72.js} +1 -1
  56. package/dist/interface/assets/{CuiPluginOAuthButton-DpGacvsa.js → CuiPluginOAuthButton-BSvRKUSY.js} +2 -2
  57. package/dist/interface/assets/{CuiPluginTrustBadge-Dl1PEsm6.js → CuiPluginTrustBadge-DXL7N1LC.js} +1 -1
  58. package/dist/interface/assets/CuiQRCode-DHln6Lo9.js +1 -0
  59. package/dist/interface/assets/CuiSchema-B7i2O3Fy.js +1 -0
  60. package/dist/interface/assets/{CuiTopNavbarItem-qPj6XwXr.js → CuiTopNavbarItem-TMfTyt8u.js} +1 -1
  61. package/dist/interface/assets/{Faces-DRWIPDfH.js → Faces-CyTkMqMW.js} +1 -1
  62. package/dist/interface/assets/FirstSteps-B4gb7Sgn.js +1 -0
  63. package/dist/interface/assets/Floorplan-DBwWnuys.js +1 -0
  64. package/dist/interface/assets/{Instances-VC4-anOF.js → Instances-D9fnwItz.js} +1 -1
  65. package/dist/interface/assets/{Logs-DROgZxLH.js → Logs-Brk6fJa0.js} +2 -2
  66. package/dist/interface/assets/{Menu-CmTk2or7.js → Menu-CrdBz1Er.js} +1 -1
  67. package/dist/interface/assets/Metrics-DXMgfNIL.js +9 -0
  68. package/dist/interface/assets/{OAuthDeviceFlow-BrdiDoCh.js → OAuthDeviceFlow-D5hSwHeO.js} +1 -1
  69. package/dist/interface/assets/Plugin-C65oNZ9N.js +1 -0
  70. package/dist/interface/assets/{PluginConsole-CxiW1w6K.js → PluginConsole-Bs3Z5u9-.js} +2 -2
  71. package/dist/interface/assets/PluginDetail-C3KUrHvq.js +2 -0
  72. package/dist/interface/assets/{PluginSchema-BgVZ_4if.js → PluginSchema-D22zRDkZ.js} +1 -1
  73. package/dist/interface/assets/PluginSearch-4ngDmZQ2.js +1 -0
  74. package/dist/interface/assets/PluginSearch-D7XYJzl4.js +2 -0
  75. package/dist/interface/assets/{PluginUpdateProgress-DEcle8-x.js → PluginUpdateProgress-MEdR7mID.js} +1 -1
  76. package/dist/interface/assets/Plugins-DQTlb12n.js +1 -0
  77. package/dist/interface/assets/Recordings-CqBwRvn-.js +1 -0
  78. package/dist/interface/assets/SensorEdit-BM2zHAM7.js +1 -0
  79. package/dist/interface/assets/{SensorHistory-H03yZia0.js → SensorHistory-Dbv2ODqn.js} +1 -1
  80. package/dist/interface/assets/Sensors-B4YzyU7R.js +2 -0
  81. package/dist/interface/assets/{Sensors-DzGV2Ngo.css → Sensors-DETviyjO.css} +1 -1
  82. package/dist/interface/assets/{Settings-9nC18KH8.js → Settings--wgPYOyK.js} +1 -1
  83. package/dist/interface/assets/{SettingsAccount-BTYvhCJP.js → SettingsAccount-BF6Cp8Rt.js} +1 -1
  84. package/dist/interface/assets/SettingsAccount-D7CHP0f1.js +1 -0
  85. package/dist/interface/assets/SettingsAppearance-Ba0jbbVW.js +1 -0
  86. package/dist/interface/assets/SettingsAppearance-BpXZwBjO.js +1 -0
  87. package/dist/interface/assets/{SettingsBackup-Bu48xw4v.js → SettingsBackup-qEYm-6De.js} +1 -1
  88. package/dist/interface/assets/{SettingsList-74c5OMQf.js → SettingsList-1brGZ2E_.js} +1 -1
  89. package/dist/interface/assets/{SettingsMqtt-81rJ4zV6.js → SettingsMqtt-Ds8YpoLA.js} +1 -1
  90. package/dist/interface/assets/SettingsNotifications-Diqpfbrh.js +1 -0
  91. package/dist/interface/assets/{SettingsPermissions-DqyVtVKE.js → SettingsPermissions-GmGacrLc.js} +1 -1
  92. package/dist/interface/assets/{SettingsRecordings-Bxn28Frz.js → SettingsRecordings-CtEm_7PE.js} +1 -1
  93. package/dist/interface/assets/SettingsRemote-CENHI51U.js +2 -0
  94. package/dist/interface/assets/SettingsSystem-YkigO2-V.js +2 -0
  95. package/dist/interface/assets/{SettingsUsers-DUOJN7uO.js → SettingsUsers-BNPa87gu.js} +1 -1
  96. package/dist/interface/assets/{Terminal-45QW5yPE.js → Terminal-uxOHZpUp.js} +3 -3
  97. package/dist/interface/assets/Training-BRZKDa8S.js +1 -0
  98. package/dist/interface/assets/Training-DMNjB3uX.css +1 -0
  99. package/dist/interface/assets/{Updates-B32Pra5E.js → Updates-CbscgL60.js} +1 -1
  100. package/dist/interface/assets/{VariableInput-CyTGQFtz.js → VariableInput-Dqg4sqBD.js} +1 -1
  101. package/dist/interface/assets/{VariableSuggestions-BLlD4F87.js → VariableSuggestions-DZCkPAVs.js} +1 -1
  102. package/dist/interface/assets/{VersionsHandler-CIq6v6lE.js → VersionsHandler-BYFshrhO.js} +2 -2
  103. package/dist/interface/assets/{VirtualSensorCreate-Di2IyYAg.js → VirtualSensorCreate-CQ-C4si3.js} +1 -1
  104. package/dist/interface/assets/{Workers-tb039NGc.js → Workers-DC77SjZQ.js} +2 -2
  105. package/dist/interface/assets/api-Cb8_C_se.js +4 -0
  106. package/dist/interface/assets/{api-4JRK8ya0.js → api-CbYNh0N1.js} +1 -1
  107. package/dist/interface/assets/api-DIyogyx5.css +2 -0
  108. package/dist/interface/assets/{auth-ISkWvJbZ.js → auth-Bev1OdHw.js} +1 -1
  109. package/dist/interface/assets/{automations-CeH81DN-.js → automations-DrpESBB_.js} +1 -1
  110. package/dist/interface/assets/cameraSources-QF2xqMxX.js +1 -0
  111. package/dist/interface/assets/cloudHandoff-BknPGUc0.js +1 -0
  112. package/dist/interface/assets/{config-DthCyQJv.js → config-DCK7k2P4.js} +1 -1
  113. package/dist/interface/assets/{flowSchema-DZ2bDhJt.js → flowSchema-D3Ddm5sW.js} +1 -1
  114. package/dist/interface/assets/{intercomService-Bd71KwsB.js → intercomService-DIwpkwG4.js} +1 -1
  115. package/dist/interface/assets/{main-ExPfCNlz.css → main-Cb5Z8N7b.css} +1 -1
  116. package/dist/interface/assets/main-DVwdxi04.js +3 -0
  117. package/dist/interface/assets/{mqtt-oPORDio9.js → mqtt-COWs_r7k.js} +1 -1
  118. package/dist/interface/assets/{notifications-BirFkpbF.js → notifications-sIv1-H85.js} +1 -1
  119. package/dist/interface/assets/{plugins-vyA7MMhx.js → plugins-CXQj6XQt.js} +1 -1
  120. package/dist/interface/assets/{rooms-MfPQPywT.js → rooms-DScX89Ks.js} +1 -1
  121. package/dist/interface/assets/{sensorIcons-B4H11BbT.js → sensorIcons-CvVtOgZB.js} +1 -1
  122. package/dist/interface/assets/sensorSlots-DsfKs8_k.js +1 -0
  123. package/dist/interface/assets/{sensors-xryx8Wvn.js → sensors-Bf_gYmB5.js} +1 -1
  124. package/dist/interface/assets/{server-BK9gwxH8.js → server-CahE6_Pv.js} +1 -1
  125. package/dist/interface/assets/{theme-DQeAzJ1v.js → theme-DmUc7UHl.js} +1 -1
  126. package/dist/interface/assets/{types-Bcj_K26s.js → types-D4kUDpid.js} +1 -1
  127. package/dist/interface/assets/{types-kN1Tn2Og.js → types-Dse8_nTX.js} +1 -1
  128. package/dist/interface/assets/{types-D626ASim.js → types-hwOSxlNg.js} +1 -1
  129. package/dist/interface/assets/ungrouped-Byxe4LNR.js +1 -0
  130. package/dist/interface/assets/ungrouped-n3OnGhCH.css +1 -0
  131. package/dist/interface/assets/{updates-Dzqxen12.js → updates-C4gAnNY6.js} +1 -1
  132. package/dist/interface/assets/{useAppVersion-JY7cdzlr.js → useAppVersion--b5Zj7tl.js} +1 -1
  133. package/dist/interface/assets/{useBackupRestore-CeShFVWy.js → useBackupRestore-Bx13MgrJ.js} +1 -1
  134. package/dist/interface/assets/{useCameraOptions-BeUNT5Rz.js → useCameraOptions-DN4gJjIl.js} +1 -1
  135. package/dist/interface/assets/{useLogsSocket-DDSuX00j.js → useLogsSocket-DqVa6Hky.js} +1 -1
  136. package/dist/interface/assets/{useNavLayout-DgAgRNq2.js → useNavLayout-CuQ9F9cj.js} +1 -1
  137. package/dist/interface/assets/{usePermissions-DFzwIs8L.js → usePermissions-C1L7m3Nc.js} +1 -1
  138. package/dist/interface/assets/{usePluginUpdates-Bb-LOOyL.js → usePluginUpdates-CvQPy02x.js} +1 -1
  139. package/dist/interface/assets/{usePushRegistration-iverdyzz.js → usePushRegistration-BKvefMFq.js} +1 -1
  140. package/dist/interface/assets/{useServerRestart-BchofDLe.js → useServerRestart-ByN6484v.js} +1 -1
  141. package/dist/interface/assets/{useStreamStatus-BOJt1v1c.js → useStreamStatus-BbtTnidZ.js} +1 -1
  142. package/dist/interface/assets/{useTabSwipe-v0Yet-YZ.js → useTabSwipe-D9udGzPx.js} +1 -1
  143. package/dist/interface/assets/{useUpdateChannel-K9ADk5yx.js → useUpdateChannel-8t3W9dNr.js} +1 -1
  144. package/dist/interface/assets/{useUpdatesSocket-sj1-DmFM.js → useUpdatesSocket-D9s_5T3l.js} +1 -1
  145. package/dist/interface/assets/{useUserOptions-BnF_qBdZ.js → useUserOptions-CEPYkuSm.js} +1 -1
  146. package/dist/interface/assets/{vendor-cameraui-BPX4wReW.js → vendor-cameraui-Dlzn4pyz.js} +26 -26
  147. package/dist/interface/assets/vendor-core-COMSlypG.js +1 -0
  148. package/dist/interface/assets/{vendor-primevue-iEFYdXsu.js → vendor-primevue-DF71EsUM.js} +55 -55
  149. package/dist/interface/ha/{404-DlQnv9jN.js → 404-Bm-oxxip.js} +1 -1
  150. package/dist/interface/ha/{About-BLQJmllv.js → About-CDcN0Q2J.js} +3 -3
  151. package/dist/interface/ha/{Automation-DLMPArOd.js → Automation-BQd4b0ym.js} +102 -102
  152. package/dist/interface/ha/{AutomationImport-Qzz3Ta4D.js → AutomationImport-CX1C76Wb.js} +6 -6
  153. package/dist/interface/ha/{AutomationStore-DNXC9s6h.js → AutomationStore-D4B0KpoW.js} +56 -56
  154. package/dist/interface/ha/{AutomationStoreDetail-CTqydRKj.js → AutomationStoreDetail-B53Giz4B.js} +6 -6
  155. package/dist/interface/ha/{Automations-DRxe1fli.js → Automations-BXlwOElS.js} +124 -124
  156. package/dist/interface/ha/{Camera-OrI4Wf4F.js → Camera-CauwMneE.js} +21 -19
  157. package/dist/interface/ha/{CameraConsole-6yGhoHmu.js → CameraConsole-CmsMjuIR.js} +5 -5
  158. package/dist/interface/ha/{Cameras-DpEaKKDG.js → Cameras-CyHDmgs0.js} +259 -259
  159. package/dist/interface/ha/{Camview-CnPz4cGs.js → Camview-BwwvU5k8.js} +70 -70
  160. package/dist/interface/ha/{Config-Bb2ERyAA.js → Config-C_Zuyeoc.js} +10 -10
  161. package/dist/interface/ha/{ConfigActionCameraControl-CC2tWFz2.js → ConfigActionCameraControl-C1_QyuX8.js} +3 -3
  162. package/dist/interface/ha/{ConfigActionHttp-DBsEL44i.js → ConfigActionHttp-C0d433mh.js} +2 -2
  163. package/dist/interface/ha/{ConfigActionImageInput-Rt3AOJ3I.js → ConfigActionImageInput-BYys2FwC.js} +1 -1
  164. package/dist/interface/ha/{ConfigActionMqtt-BYSSc954.js → ConfigActionMqtt-DznDfzze.js} +4 -4
  165. package/dist/interface/ha/{ConfigActionNotification-DKlIsZJd.js → ConfigActionNotification-CC2qfBLm.js} +3 -3
  166. package/dist/interface/ha/{ConfigActionNotificationControl-D5AVW2tR.js → ConfigActionNotificationControl-3jlm7_A4.js} +2 -2
  167. package/dist/interface/ha/{ConfigActionOutput-DIlu8Ujc.js → ConfigActionOutput-BEf1U3_l.js} +1 -1
  168. package/dist/interface/ha/{ConfigActionPlugin-o1YNBh-g.js → ConfigActionPlugin-C57BUrJD.js} +5 -5
  169. package/dist/interface/ha/{ConfigActionSensor-BEvwg0tf.js → ConfigActionSensor-BkoSPCUJ.js} +5 -5
  170. package/dist/interface/ha/{ConfigActionSnapshot-Bnw0JNNj.js → ConfigActionSnapshot-CC3EpmCq.js} +2 -2
  171. package/dist/interface/ha/{ConfigActionVariable-oGPagsvF.js → ConfigActionVariable-JDyDhSzZ.js} +1 -1
  172. package/dist/interface/ha/{ConfigConditionIfElse-7LCDNDvS.js → ConfigConditionIfElse-BVg-TUpv.js} +3 -3
  173. package/dist/interface/ha/{ConfigConditionSensorState-nO-s7wi6.js → ConfigConditionSensorState-YYeWly1H.js} +4 -4
  174. package/dist/interface/ha/{ConfigConditionSwitch-GrIKkY-P.js → ConfigConditionSwitch-DQHXX-4U.js} +5 -5
  175. package/dist/interface/ha/{ConfigSensorValueInput-Cthp3KXt.js → ConfigSensorValueInput-BuuzQ1nJ.js} +4 -4
  176. package/dist/interface/ha/{ConfigTriggerDetection-CJE9QFaK.js → ConfigTriggerDetection-CUvkAmpJ.js} +12 -12
  177. package/dist/interface/ha/{ConfigTriggerGeofence-Cyeu7Cit.js → ConfigTriggerGeofence-CCHELnfy.js} +7 -7
  178. package/dist/interface/ha/{ConfigTriggerMqtt-D5EoOztE.js → ConfigTriggerMqtt-BfLnCiWZ.js} +1 -1
  179. package/dist/interface/ha/{ConfigTriggerSensor-DYg_HRjO.js → ConfigTriggerSensor-Bi-Jld2G.js} +1 -1
  180. package/dist/interface/ha/{ConfigTriggerSystem-DzpajiyS.js → ConfigTriggerSystem-_HXrWjaJ.js} +2 -2
  181. package/dist/interface/ha/{ConfigTriggerWebhook-IE4PVb4O.js → ConfigTriggerWebhook-CFYsVF_r.js} +1 -1
  182. package/dist/interface/ha/{Console-BYgny5Dy.js → Console-CR95JZFd.js} +8 -8
  183. package/dist/interface/ha/{CuiAutomationRunsDialog-CoYgpbW0.js → CuiAutomationRunsDialog--mpkPFmw.js} +2 -2
  184. package/dist/interface/ha/{CuiBottomSheet-C4cK3fYK.js → CuiBottomSheet-DfFzwDjq.js} +1 -1
  185. package/dist/interface/ha/{CuiCameraRecordings-BAxchc71.js → CuiCameraRecordings-DCIFFbFk.js} +17 -18
  186. package/dist/interface/ha/{CuiCameraShares-CfQr1iyX.js → CuiCameraShares-Dwv_XtX4.js} +2 -2
  187. package/dist/interface/ha/{CuiCameraTable-B60mcEl_.js → CuiCameraTable-L6wd-VYz.js} +2 -2
  188. package/dist/interface/ha/{CuiChartTable-CbUVz-Cj.js → CuiChartTable-CxJR8u6U.js} +42 -42
  189. package/dist/interface/ha/{CuiConsole-DEjAQFwC.js → CuiConsole-CvL9TXZY.js} +20 -20
  190. package/dist/interface/ha/{CuiDataTable-005ptLsa.js → CuiDataTable-Bn80WJXi.js} +6 -6
  191. package/dist/interface/ha/{CuiPluginCard-BWwPLJ6m.js → CuiPluginCard-CtOzPAal.js} +18 -18
  192. package/dist/interface/ha/{CuiPluginOAuthButton-CgmDgRY9.js → CuiPluginOAuthButton-1LgNMLII.js} +3 -3
  193. package/dist/interface/ha/{CuiPluginTrustBadge-BWnP1whX.js → CuiPluginTrustBadge-mHuy3ab9.js} +1 -1
  194. package/dist/interface/ha/{CuiQRCode-ONkk6Wqy.js → CuiQRCode-CloepWte.js} +2 -2
  195. package/dist/interface/ha/{CuiSchema-C3uI1GwG.js → CuiSchema-CJsEWewj.js} +19 -19
  196. package/dist/interface/ha/{CuiTopNavbarItem-Bhws0XkE.js → CuiTopNavbarItem-B2EM-tmz.js} +1 -1
  197. package/dist/interface/ha/{Faces-DuxYlZGd.js → Faces-BMkZfxDm.js} +107 -107
  198. package/dist/interface/ha/{FirstSteps-BAlqShSK.js → FirstSteps-BH0mga3u.js} +11 -11
  199. package/dist/interface/ha/{Floorplan-BVwSNFd6.js → Floorplan-CyfIUI4Z.js} +275 -275
  200. package/dist/interface/ha/{Instances-BM9sRNSP.js → Instances-BwNXc91J.js} +70 -70
  201. package/dist/interface/ha/{Logs-KISz4BU-.js → Logs-CcSiN16r.js} +8 -8
  202. package/dist/interface/ha/{Menu-DYI6PeIn.js → Menu-qdN0OBb7.js} +10 -10
  203. package/dist/interface/ha/{Metrics-BjpKFunA.js → Metrics-ClM5lhvC.js} +89 -89
  204. package/dist/interface/ha/{OAuthDeviceFlow-DG-KUGZj.js → OAuthDeviceFlow-BBr-rER_.js} +3 -3
  205. package/dist/interface/ha/{Plugin-BjWyUUhe.js → Plugin-BBkSXygO.js} +50 -50
  206. package/dist/interface/ha/{PluginConsole-BK3cotea.js → PluginConsole-DqrBnXSX.js} +6 -6
  207. package/dist/interface/ha/{PluginDetail-BDzDeShX.js → PluginDetail-Clu6nv-B.js} +9 -9
  208. package/dist/interface/ha/{PluginSearch-DsFUuPC-.js → PluginSearch-Dn-24FLX.js} +32 -32
  209. package/dist/interface/ha/{PluginUpdateProgress-BMrdkjRq.js → PluginUpdateProgress-CzhHUKDg.js} +3 -3
  210. package/dist/interface/ha/{Plugins-3WPnsHXw.js → Plugins-qYJD5ioU.js} +16 -16
  211. package/dist/interface/ha/{Recordings-0wDF4ArK.js → Recordings-CBIt3vL7.js} +354 -355
  212. package/dist/interface/ha/{SensorEdit-B0L2zIha.js → SensorEdit-BbG6apZA.js} +349 -349
  213. package/dist/interface/ha/{SensorHistory-CQJEY1sW.js → SensorHistory-CqGsnQPW.js} +2 -2
  214. package/dist/interface/ha/{Sensors-BYdBTCLo.js → Sensors-mKWkCDF8.js} +474 -448
  215. package/dist/interface/ha/{Settings-BaqGiBCa.js → Settings-C5J4ubiA.js} +10 -10
  216. package/dist/interface/ha/{SettingsAccount-B0Sth0EF.js → SettingsAccount-tCyZsBxG.js} +39 -39
  217. package/dist/interface/ha/{SettingsAppearance-B_oylmTa.js → SettingsAppearance-DqJp4Clt.js} +6 -6
  218. package/dist/interface/ha/{SettingsBackup-BLmoV5AW.js → SettingsBackup-CHnCKYgz.js} +5 -5
  219. package/dist/interface/ha/{SettingsList-CMX7wMye.js → SettingsList-DsQOPeKW.js} +1 -1
  220. package/dist/interface/ha/{SettingsMqtt-C-sGwxOZ.js → SettingsMqtt-TPIsEcXe.js} +180 -180
  221. package/dist/interface/ha/{SettingsNotifications-tc9FCCUF.js → SettingsNotifications-DH3T_xyh.js} +3 -3
  222. package/dist/interface/ha/{SettingsRecordings-DDs16z2A.js → SettingsRecordings-Ay8lj8Lm.js} +4 -4
  223. package/dist/interface/ha/{SettingsRemote-0c0umjFJ.js → SettingsRemote-CHiBADuu.js} +314 -314
  224. package/dist/interface/ha/{SettingsSystem-DfXxWXQk.js → SettingsSystem-tqs40pUW.js} +8 -8
  225. package/dist/interface/ha/{SettingsUsers-CmjC0zsF.js → SettingsUsers-BUbC_Qc7.js} +39 -39
  226. package/dist/interface/ha/{Terminal-nbUX6PPZ.js → Terminal-f_b-089t.js} +4 -4
  227. package/dist/interface/ha/Training-Dcxo9PFi.js +1479 -0
  228. package/dist/interface/ha/{Updates-UaxBGn6D.js → Updates-aGl5hy8Q.js} +11 -11
  229. package/dist/interface/ha/{VariableInput-0bF2H1Bm.js → VariableInput-yJGbaZEo.js} +1 -1
  230. package/dist/interface/ha/{VersionsHandler-CnXVnfBl.js → VersionsHandler-Q4PfRpbs.js} +10 -10
  231. package/dist/interface/ha/{VirtualSensorCreate-BE60rAkJ.js → VirtualSensorCreate-Gbi6aJBh.js} +8 -8
  232. package/dist/interface/ha/{Workers-CaX3Z3w-.js → Workers-BbBqOc0H.js} +129 -129
  233. package/dist/interface/ha/{api-CmcbBFTx.js → api-DBu4gh4_.js} +8390 -8315
  234. package/dist/interface/ha/{api-S-NnjUWl.js → api-DY0z6Sp_.js} +3 -3
  235. package/dist/interface/ha/{auth-CqYE7s1-.js → auth-C2V-kpRp.js} +38 -38
  236. package/dist/interface/ha/{automationBlueprint-Dmp54JD1.js → automationBlueprint-MGUZJTFY.js} +4 -4
  237. package/dist/interface/ha/cameraui-cards.js +1 -1
  238. package/dist/interface/ha/{cards-MnCBmBIR.js → cards-BA6g_9R5.js} +566 -566
  239. package/dist/interface/ha/{config-C94KN4WM.js → config-BGlhgEOa.js} +15 -15
  240. package/dist/interface/ha/{dist-BQFunPaA.js → dist-BqTZri2H.js} +743 -725
  241. package/dist/interface/ha/{mqtt-HDLqlOJt.js → mqtt-BLKZNA-E.js} +15 -15
  242. package/dist/interface/ha/{notifications-C2_2_NRh.js → notifications-BW0RNMnG.js} +22 -22
  243. package/dist/interface/ha/{pinia-DLNUke3Q.js → pinia-DINxhtY-.js} +168 -165
  244. package/dist/interface/ha/{plugins-l2i4DgqO.js → plugins-Cj-B4Nwy.js} +68 -68
  245. package/dist/interface/ha/{rooms-Bp1ZVAzT.js → rooms-C32i51p-.js} +8 -8
  246. package/dist/interface/ha/{server-BsduJDAB.js → server-CfbE_0Z9.js} +32 -32
  247. package/dist/interface/ha/{types-iZUCCt1P.js → types-Ry6RjBNa.js} +17 -17
  248. package/dist/interface/ha/ungrouped-CO29-tSV.js +1320 -0
  249. package/dist/interface/ha/{updates-CDsPvhpo.js → updates-CZPI8XJ1.js} +37 -37
  250. package/dist/interface/ha/{useAppVersion-BJtSGn4X.js → useAppVersion-9jfqRo_z.js} +1 -1
  251. package/dist/interface/ha/{useLogsSocket-Ck-ZQpQD.js → useLogsSocket-B0E7a3ys.js} +1 -1
  252. package/dist/interface/ha/{useNavLayout-Bn6HYs-i.js → useNavLayout-B2wfeha-.js} +2 -2
  253. package/dist/interface/ha/{useServerRestart-fff_KK9Y.js → useServerRestart-CCH-yMWR.js} +1 -1
  254. package/dist/interface/ha/{useTabSwipe-B1CQZuyT.js → useTabSwipe-D2uqGEvR.js} +1 -1
  255. package/dist/interface/ha/{useUpdateChannel-DUBmGEDe.js → useUpdateChannel--SP3Wjym.js} +2 -2
  256. package/dist/interface/ha/{useUpdatesSocket-DoLb2kcJ.js → useUpdatesSocket-BBbUCMU-.js} +1 -1
  257. package/dist/interface/ha/{useUserOptions-D0kNSHFH.js → useUserOptions-Bh54UAkH.js} +1 -1
  258. package/dist/interface/index.html +28 -27
  259. package/dist/interface/sw.js +1 -1
  260. package/dist/server/package.json +1 -1
  261. package/dist/server/src/api/controllers/training.controller.d.ts +4 -2
  262. package/dist/server/src/api/controllers/training.controller.js +2 -2
  263. package/dist/server/src/api/controllers/training.controller.js.map +1 -1
  264. package/dist/server/src/api/database/record-schemas.d.ts +1 -0
  265. package/dist/server/src/api/database/record-schemas.js +1 -0
  266. package/dist/server/src/api/database/record-schemas.js.map +1 -1
  267. package/dist/server/src/api/routes/training.routes.js +3 -2
  268. package/dist/server/src/api/routes/training.routes.js.map +1 -1
  269. package/dist/server/src/api/schemas/training.schema.d.ts +4 -0
  270. package/dist/server/src/api/schemas/training.schema.js +3 -0
  271. package/dist/server/src/api/schemas/training.schema.js.map +1 -1
  272. package/dist/server/src/api/services/sensors.service.d.ts +1 -0
  273. package/dist/server/src/api/services/sensors.service.js +1 -0
  274. package/dist/server/src/api/services/sensors.service.js.map +1 -1
  275. package/dist/server/src/api/types/index.d.ts +2 -1
  276. package/dist/server/src/camera/decoder/detection-coordinator.js +23 -7
  277. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
  278. package/dist/server/src/camera/decoder/detection-window.d.ts +5 -0
  279. package/dist/server/src/camera/decoder/detection-window.js +5 -5
  280. package/dist/server/src/camera/decoder/detection-window.js.map +1 -1
  281. package/dist/server/src/camera/decoder/event-manager.d.ts +5 -1
  282. package/dist/server/src/camera/decoder/event-manager.js +21 -14
  283. package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
  284. package/dist/server/src/camera/decoder/training-sink.d.ts +14 -3
  285. package/dist/server/src/camera/decoder/training-sink.js +32 -17
  286. package/dist/server/src/camera/decoder/training-sink.js.map +1 -1
  287. package/dist/server/src/camera/decoder/types.d.ts +1 -1
  288. package/dist/server/src/camera/decoder/types.js +2 -6
  289. package/dist/server/src/camera/decoder/types.js.map +1 -1
  290. package/dist/server/src/manager/trainingCandidateManager.d.ts +2 -3
  291. package/dist/server/src/manager/trainingCandidateManager.js +17 -18
  292. package/dist/server/src/manager/trainingCandidateManager.js.map +1 -1
  293. package/dist/server/src/manager/types.d.ts +5 -0
  294. package/dist/server/src/remote/api/routes/train.d.ts +6 -1
  295. package/dist/server/src/remote/api/routes/train.js +6 -2
  296. package/dist/server/src/remote/api/routes/train.js.map +1 -1
  297. package/dist/server/src/sensors/registry.d.ts +1 -0
  298. package/dist/server/src/sensors/registry.js +10 -0
  299. package/dist/server/src/sensors/registry.js.map +1 -1
  300. package/package.json +1 -1
  301. package/dist/interface/assets/Automation-CDvt2MXN.js +0 -3
  302. package/dist/interface/assets/Automations-2K-7hZfK.js +0 -2
  303. package/dist/interface/assets/Camera-B72IU-UF.js +0 -2
  304. package/dist/interface/assets/Camera-Cm9I0H6c.css +0 -1
  305. package/dist/interface/assets/Camview-KzzN0Q1w.js +0 -1
  306. package/dist/interface/assets/ConfigActionNotification-C2uXIMpm.js +0 -1
  307. package/dist/interface/assets/ConfigTriggerGeofence-Cuq1SnOZ.js +0 -1
  308. package/dist/interface/assets/Console-DkylrXI4.js +0 -1
  309. package/dist/interface/assets/CuiBottomSheet-DILQuWKb.js +0 -1
  310. package/dist/interface/assets/CuiCameraRecordings-Bi0I7jeO.js +0 -1
  311. package/dist/interface/assets/CuiCameraTable-CUdAnRJP.js +0 -1
  312. package/dist/interface/assets/CuiQRCode-D04Onyhk.js +0 -1
  313. package/dist/interface/assets/CuiRecordingsGrid-BhATIjIf.css +0 -1
  314. package/dist/interface/assets/CuiRecordingsGrid-BzyJWpFt.js +0 -1
  315. package/dist/interface/assets/CuiSchema-thjfmEWw.js +0 -1
  316. package/dist/interface/assets/FirstSteps-C6GVpZVr.js +0 -1
  317. package/dist/interface/assets/Floorplan-Q-UYDnrE.js +0 -1
  318. package/dist/interface/assets/Metrics-CYZF-em9.js +0 -9
  319. package/dist/interface/assets/Plugin-DuPHiiYJ.js +0 -1
  320. package/dist/interface/assets/PluginDetail-DWP7_hNa.js +0 -2
  321. package/dist/interface/assets/PluginSearch-1djFQUjL.js +0 -1
  322. package/dist/interface/assets/PluginSearch-Ba-hQHxm.js +0 -2
  323. package/dist/interface/assets/Plugins-BZ3U4pcG.js +0 -1
  324. package/dist/interface/assets/Recordings-CI5MIFR-.js +0 -1
  325. package/dist/interface/assets/SensorEdit-B6s-VZ3F.js +0 -1
  326. package/dist/interface/assets/Sensors-DDPUwbb-.js +0 -2
  327. package/dist/interface/assets/SettingsAccount-CKi0z3Bm.js +0 -1
  328. package/dist/interface/assets/SettingsAppearance-CDbQnSvl.js +0 -1
  329. package/dist/interface/assets/SettingsAppearance-D9Y28zzz.js +0 -1
  330. package/dist/interface/assets/SettingsNotifications-xHV5KiZg.js +0 -1
  331. package/dist/interface/assets/SettingsRemote-7h2dKJlF.js +0 -2
  332. package/dist/interface/assets/SettingsSystem-D-MLhCdN.js +0 -2
  333. package/dist/interface/assets/Training-B5SzDUAC.css +0 -1
  334. package/dist/interface/assets/Training-DWrQVSS0.js +0 -1
  335. package/dist/interface/assets/api-CFf063x3.js +0 -4
  336. package/dist/interface/assets/api-eoOLTOnS.css +0 -2
  337. package/dist/interface/assets/cameraSources-CgAEmb37.js +0 -1
  338. package/dist/interface/assets/cloudHandoff-B_kCnm4R.js +0 -1
  339. package/dist/interface/assets/main--lW4P3A4.js +0 -3
  340. package/dist/interface/assets/ungrouped-C6pQb0X4.css +0 -1
  341. package/dist/interface/assets/ungrouped-C_gJm6d7.js +0 -1
  342. package/dist/interface/assets/vendor-core-D0ANiY7g.js +0 -1
  343. package/dist/interface/ha/CuiRecordingsGrid-D6HHyF1D.js +0 -735
  344. package/dist/interface/ha/Training-GMcD4Qg9.js +0 -1440
  345. package/dist/interface/ha/ungrouped-wz-KNJpA.js +0 -426
@@ -1,1440 +0,0 @@
1
- import { m as e } from "./ripple-BilzxWfY.js";
2
- import { G as t, H as n, I as r, Jt as i, Wt as a, Y as o, _t as s, d as c, f as l, ft as u, gt as d, kt as f, l as p, lt as m, ot as h, p as g, qt as _, r as v, rt as y, u as b, ut as x, v as S, x as C, xt as w, y as T, yt as E } from "./runtime-core.esm-bundler-D8slQ3BU.js";
3
- import { t as ee } from "./tooltip-BIrD_hC8.js";
4
- import { t as D } from "./chevron-down-P5MtUhJO.js";
5
- import { t as te } from "./tag-CXgC9OZ6.js";
6
- import { $i as O, Ar as ne, B as re, Bi as k, Ci as A, Cr as j, G as ie, L as M, Mn as ae, Mt as oe, Nt as se, Qt as N, R as ce, Si as P, Sr as F, V as I, bi as L, c as le, d as ue, dr as de, ei as R, fr as fe, jr as z, jt as B, kr as pe, nt as me, p as he, pi as V, ua as H, ut as ge, yn as _e, z as ve } from "./api-CmcbBFTx.js";
7
- import { _ as U, b as ye, i as be, w as xe } from "./intercomService-jB2mTgsn.js";
8
- import { n as Se } from "./vue-i18n-Dcb07o5U.js";
9
- import { t as Ce } from "./button-BlYuI0Q7.js";
10
- import { n as we, t as Te } from "./inputicon-6-vaPLbw.js";
11
- import { t as Ee } from "./inputtext-DGIESrd0.js";
12
- import { a as De } from "./datepicker-BuvKhBWJ.js";
13
- import { t as Oe } from "./close-Eq3txTBS.js";
14
- import { t as ke } from "./progressbar-CIoPoMSe.js";
15
- import { t as Ae } from "./ring-resize-VS4MSeBv.js";
16
- import { t as je } from "./CuiRecordingsGrid-D6HHyF1D.js";
17
- import { t as W } from "./search-CoOsbgeb.js";
18
- import { n as Me, t as Ne } from "./cloud-check-BFJzoUtz.js";
19
- import { t as Pe } from "./trash-can-outline-DCqsCOd2.js";
20
- import { t as Fe } from "./back-filled-Cxzg5vQg.js";
21
- import { t as Ie } from "./settings-EKkSQLzv.js";
22
- //#region ~icons/mdi/cloud-check-outline
23
- var Le = {
24
- viewBox: "0 0 24 24",
25
- width: "1.2em",
26
- height: "1.2em"
27
- };
28
- function Re(e, t) {
29
- return n(), g("svg", Le, [...t[0] ||= [b("path", {
30
- fill: "currentColor",
31
- d: "M13 19c0 .34.04.67.09 1H6.5c-1.5 0-2.81-.5-3.89-1.57C1.54 17.38 1 16.09 1 14.58q0-1.95 1.17-3.48C3.34 9.57 4 9.43 5.25 9.15c.42-1.53 1.25-2.77 2.5-3.72S10.42 4 12 4c1.95 0 3.6.68 4.96 2.04S19 9.05 19 11c1.15.13 2.1.63 2.86 1.5c.51.57.84 1.21 1 1.92A5.9 5.9 0 0 0 19 13h-2v-2c0-1.38-.5-2.56-1.46-3.54C14.56 6.5 13.38 6 12 6s-2.56.5-3.54 1.46C7.5 8.44 7 9.62 7 11h-.5c-.97 0-1.79.34-2.47 1.03c-.69.68-1.03 1.5-1.03 2.47s.34 1.79 1.03 2.5c.68.66 1.5 1 2.47 1h6.59c-.05.33-.09.66-.09 1m4.75.43l-1.59-1.59L15 19l2.75 3l4.75-4.75l-1.16-1.41z"
32
- }, null, -1)]]);
33
- }
34
- var ze = s({
35
- name: "mdi-cloud-check-outline",
36
- render: Re
37
- }), Be = {
38
- viewBox: "0 0 24 24",
39
- width: "1.2em",
40
- height: "1.2em"
41
- };
42
- function G(e, t) {
43
- return n(), g("svg", Be, [...t[0] ||= [b("path", {
44
- fill: "currentColor",
45
- d: "M6.5 20q-2.28 0-3.89-1.57Q1 16.85 1 14.58q0-1.95 1.17-3.48q1.18-1.53 3.08-1.95q.63-2.3 2.5-3.72Q9.63 4 12 4q2.93 0 4.96 2.04Q19 8.07 19 11q1.73.2 2.86 1.5q1.14 1.28 1.14 3q0 1.88-1.31 3.19T18.5 20H13q-.82 0-1.41-.59Q11 18.83 11 18v-5.15L9.4 14.4L8 13l4-4l4 4l-1.4 1.4l-1.6-1.55V18h5.5q1.05 0 1.77-.73q.73-.72.73-1.77t-.73-1.77Q19.55 13 18.5 13H17v-2q0-2.07-1.46-3.54Q14.08 6 12 6Q9.93 6 8.46 7.46Q7 8.93 7 11h-.5q-1.45 0-2.47 1.03Q3 13.05 3 14.5T4.03 17q1.02 1 2.47 1H9v2m3-7"
46
- }, null, -1)]]);
47
- }
48
- var Ve = s({
49
- name: "mdi-cloud-upload-outline",
50
- render: G
51
- });
52
- //#endregion
53
- //#region src/api/routes/training.ts
54
- async function K(e = {}, { signal: t } = {}) {
55
- return (await O.get("/training/candidates", {
56
- params: e,
57
- signal: t
58
- })).data;
59
- }
60
- async function q(e, t) {
61
- return (await O.patch(`/training/candidates/${e}`, t)).data;
62
- }
63
- async function He(e) {
64
- await O.delete(`/training/candidates/${e}`);
65
- }
66
- async function J(e) {
67
- return (await O.post("/training/candidates/submit", { ids: e })).data;
68
- }
69
- async function Ue({ signal: e } = {}) {
70
- return (await O.get("/training/submissions", { signal: e })).data;
71
- }
72
- async function Y(e) {
73
- await O.delete(`/training/submissions/${e}`);
74
- }
75
- async function X({ signal: e } = {}) {
76
- return (await O.get("/training/settings", { signal: e })).data;
77
- }
78
- async function Z(e) {
79
- return (await O.patch("/training/settings", e)).data;
80
- }
81
- var We = class {
82
- queryClient = k();
83
- getCandidatesQuery() {
84
- return L({
85
- queryKey: ["training-candidates"],
86
- queryFn: ({ signal: e }) => K({}, { signal: e }),
87
- staleTime: 5e3
88
- });
89
- }
90
- getSettingsQuery() {
91
- return L({
92
- queryKey: ["training-settings"],
93
- queryFn: ({ signal: e }) => X({ signal: e }),
94
- staleTime: 3e4
95
- });
96
- }
97
- getSubmissionsQuery() {
98
- return L({
99
- queryKey: ["training-submissions"],
100
- queryFn: ({ signal: e }) => Ue({ signal: e }),
101
- staleTime: 3e4,
102
- retry: !1
103
- });
104
- }
105
- patchCandidateMutation() {
106
- return A({
107
- mutationFn: ({ id: e, patch: t }) => q(e, t),
108
- onSuccess: async () => {
109
- await this.queryClient.refetchQueries({
110
- queryKey: ["training-candidates"],
111
- exact: !0
112
- });
113
- }
114
- });
115
- }
116
- deleteCandidateMutation() {
117
- return A({
118
- mutationFn: He,
119
- onSuccess: async () => {
120
- await this.queryClient.refetchQueries({
121
- queryKey: ["training-candidates"],
122
- exact: !0
123
- });
124
- }
125
- });
126
- }
127
- deleteSubmissionMutation() {
128
- return A({
129
- mutationFn: Y,
130
- onSuccess: async () => {
131
- await this.queryClient.refetchQueries({
132
- queryKey: ["training-submissions"],
133
- exact: !0
134
- });
135
- }
136
- });
137
- }
138
- submitCandidatesMutation() {
139
- return A({
140
- mutationFn: J,
141
- onSuccess: async () => {
142
- await this.queryClient.refetchQueries({
143
- queryKey: ["training-candidates"],
144
- exact: !0
145
- });
146
- }
147
- });
148
- }
149
- patchSettingsMutation() {
150
- return A({
151
- mutationFn: Z,
152
- onSuccess: async () => {
153
- await this.queryClient.refetchQueries({
154
- queryKey: ["training-settings"],
155
- exact: !0
156
- });
157
- }
158
- });
159
- }
160
- }, Ge = {
161
- viewBox: "0 0 24 24",
162
- width: "1.2em",
163
- height: "1.2em"
164
- };
165
- function Ke(e, t) {
166
- return n(), g("svg", Ge, [...t[0] ||= [b("path", {
167
- fill: "currentColor",
168
- d: "M11 18h2v-2h-2zm1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2a2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4"
169
- }, null, -1)]]);
170
- }
171
- var qe = s({
172
- name: "mdi-help-circle-outline",
173
- render: Ke
174
- }), Je = [
175
- "person",
176
- "vehicle",
177
- "animal",
178
- "package",
179
- "face",
180
- "license_plate"
181
- ], Q = { desktop: {
182
- maxWidth: "1280px",
183
- width: "85vw"
184
- } }, Ye = { class: "flex items-center justify-between gap-2 text-sm" }, Xe = { class: "min-w-0 flex items-center gap-2" }, Ze = { class: "font-medium truncate" }, Qe = { class: "text-muted shrink-0" }, $e = { class: "text-muted tabular-nums shrink-0" }, et = ["data-stage-zoom"], tt = ["src"], nt = [
185
- "x",
186
- "y",
187
- "width",
188
- "height",
189
- "stroke",
190
- "fill",
191
- "fill-opacity",
192
- "stroke-width",
193
- "onPointerdown"
194
- ], rt = ["onPointerdown"], it = ["cx", "cy"], at = [
195
- "cx",
196
- "cy",
197
- "fill"
198
- ], ot = [
199
- "x",
200
- "y",
201
- "width",
202
- "height",
203
- "stroke",
204
- "fill"
205
- ], st = ["data-box-label", "onClick"], ct = { class: "bbox-label-text" }, lt = {
206
- key: 0,
207
- class: "bbox-label-confidence"
208
- }, ut = {
209
- key: 1,
210
- class: "bbox-label-confidence"
211
- }, dt = ["src"], ft = { class: "absolute inset-0 w-full h-full" }, pt = [
212
- "x",
213
- "y",
214
- "width",
215
- "height",
216
- "stroke",
217
- "fill"
218
- ], mt = [
219
- "x",
220
- "y",
221
- "width",
222
- "height",
223
- "stroke",
224
- "fill"
225
- ], ht = {
226
- key: 2,
227
- class: "absolute left-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
228
- }, gt = {
229
- key: 3,
230
- class: "absolute right-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
231
- }, _t = {
232
- key: 0,
233
- class: "flex items-center justify-center gap-2"
234
- }, vt = {
235
- class: "text-muted text-sm",
236
- for: "plate-text"
237
- }, yt = { class: "flex items-center justify-center gap-1.5" }, bt = { class: "text-muted text-sm text-center" }, xt = {
238
- key: 1,
239
- class: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 justify-center mx-auto text-sm text-muted"
240
- }, St = .01, Ct = .006, wt = 26, Tt = 60, Et = 400, Dt = 110, Ot = 2, kt = 80, At = 50, jt = .003, Mt = /*#__PURE__*/ j(/* @__PURE__ */ C({
241
- __name: "TrainingBoxEditor",
242
- props: {
243
- candidates: {},
244
- startId: {},
245
- cameraName: { type: Function },
246
- imageUrl: { type: Function },
247
- onSave: { type: Function },
248
- onDelete: { type: Function }
249
- },
250
- setup(r, { expose: s }) {
251
- let u = r, { t: x, te: C } = Se(), ee = [
252
- "nw",
253
- "ne",
254
- "sw",
255
- "se"
256
- ], D = /* @__PURE__ */ new Map(), O = E(/* @__PURE__ */ new Set()), ne = E(/* @__PURE__ */ new Set()), re = Math.max(0, u.candidates.findIndex((e) => e.id === u.startId)), k = he(), A = y("rootRef"), j = y("labelMenuRef"), ie = y("stageRef"), M = y("frameRef"), oe = y("svgRef"), N = w(u.candidates[re]?.boxes.map((e) => ({ ...e })) ?? []), ce = w({
257
- w: 16,
258
- h: 9
259
- }), P = w(null), F = w(null), I = w(-1), L = w(!1), ue = xe("(any-pointer: fine)"), R = w(null), z = null, B = w(-1), pe = w("person"), V = w(re), { zoom: H, pan: ge, constraining: ve, minimapStyle: be, minimapBoxStyle: we, onZoomPan: Te, onDoubleClick: De, onTouchStart: Oe, onTouchEnd: ke, reset: Ae } = me(ie, M), { height: je } = U(M), W = p(() => u.candidates[V.value]), Me = p(() => u.candidates.slice(0, V.value + 1).filter((e) => !O.has(e.id)).length), Ne = p(() => u.candidates.filter((e) => !O.has(e.id)).length), Fe = p(() => u.candidates.slice(0, V.value).some((e) => !O.has(e.id))), Ie = p(() => u.candidates.slice(V.value + 1).some((e) => !O.has(e.id))), Le = p(() => ne.has(W.value.id) ? "verified" : W.value.status), Re = p(() => {
260
- let e = N.value[I.value];
261
- return e?.label === "license_plate" ? e : null;
262
- }), ze = p(() => [...Je.map((e) => ({
263
- key: e,
264
- label: Ve(e),
265
- icon: _e(e).icon,
266
- iconProps: { style: { color: _e(e).color } },
267
- active: N.value[B.value]?.label === e,
268
- onClick: () => Bt(e)
269
- })), {
270
- key: "remove",
271
- label: x("components.training_editor.remove_box"),
272
- icon: Pe,
273
- iconProps: { class: "text-red-500" },
274
- labelProps: { class: "text-red-500" },
275
- onClick: () => Ht(B.value)
276
- }]), Be = p(() => (e) => {
277
- let t = je.value || 360;
278
- return e.y * t >= wt ? "above" : t - (e.y + e.height) * t >= wt ? "below" : "inside";
279
- }), G = p(() => (e) => e.x > .7);
280
- function Ve(e) {
281
- let t = `components.training_editor.labels.${e}`;
282
- return C(t) ? x(t) : e;
283
- }
284
- function K(e) {
285
- return _e(e);
286
- }
287
- function q(e) {
288
- return `${e * 100}%`;
289
- }
290
- function He(e, t) {
291
- return q(t === "nw" || t === "sw" ? e.x : e.x + e.width);
292
- }
293
- function J(e, t) {
294
- return q(t === "nw" || t === "ne" ? e.y : e.y + e.height);
295
- }
296
- function Ue(e) {
297
- let t = { backgroundColor: K(e.label).color };
298
- G.value(e) ? t.right = q(1 - e.x - e.width) : t.left = q(e.x);
299
- let n = Be.value(e);
300
- return t.top = n === "above" ? q(e.y) : n === "below" ? q(e.y + e.height) : `calc(${q(e.y)} + 2px)`, t;
301
- }
302
- function Y(e) {
303
- let t = e.target;
304
- t.naturalWidth && t.naturalHeight && (ce.value = {
305
- w: t.naturalWidth,
306
- h: t.naturalHeight
307
- });
308
- }
309
- function X(e) {
310
- let t = oe.value?.getBoundingClientRect();
311
- return !t || t.width === 0 || t.height === 0 ? {
312
- x: 0,
313
- y: 0
314
- } : {
315
- x: Math.min(1, Math.max(0, (e.clientX - t.left) / t.width)),
316
- y: Math.min(1, Math.max(0, (e.clientY - t.top) / t.height))
317
- };
318
- }
319
- function Z(e, t) {
320
- P.value = {
321
- ...t,
322
- moved: !1
323
- }, oe.value?.setPointerCapture(e.pointerId);
324
- }
325
- function We(e) {
326
- if (H.value > 1) return;
327
- let { x: t, y: n } = X(e);
328
- Z(e, {
329
- mode: "draw",
330
- index: -1,
331
- startX: t,
332
- startY: n,
333
- origin: {
334
- label: pe.value,
335
- confidence: 1,
336
- x: t,
337
- y: n,
338
- width: 0,
339
- height: 0
340
- }
341
- });
342
- }
343
- function Ge(e, t) {
344
- let { x: n, y: r } = X(t);
345
- I.value = e, Z(t, {
346
- mode: "move",
347
- index: e,
348
- startX: n,
349
- startY: r,
350
- origin: { ...N.value[e] }
351
- });
352
- }
353
- function Ke(e, t, n) {
354
- let { x: r, y: i } = X(n);
355
- I.value = e, Z(n, {
356
- mode: "resize",
357
- index: e,
358
- corner: t,
359
- startX: r,
360
- startY: i,
361
- origin: { ...N.value[e] }
362
- });
363
- }
364
- function Q(e) {
365
- let t = P.value;
366
- if (!t) return;
367
- let { x: n, y: r } = X(e);
368
- if (Math.hypot(n - t.startX, r - t.startY) > Ct && (t.moved = !0), e.pointerType === "touch" && t.moved && (Nt(t) ? Pt(e) : R.value = null), t.mode === "draw") {
369
- if (t.moved) {
370
- let e = Rt(t.startX, t.startY, n, r);
371
- F.value = e.width >= St && e.height >= St ? {
372
- label: pe.value,
373
- confidence: 1,
374
- ...e
375
- } : null;
376
- }
377
- return;
378
- }
379
- if (t.mode === "move") {
380
- if (!t.moved) return;
381
- let e = N.value[t.index];
382
- e.x = Math.min(1 - t.origin.width, Math.max(0, t.origin.x + (n - t.startX))), e.y = Math.min(1 - t.origin.height, Math.max(0, t.origin.y + (r - t.startY)));
383
- return;
384
- }
385
- let i = t.corner === "nw" || t.corner === "sw" ? t.origin.x + t.origin.width : t.origin.x, a = t.corner === "nw" || t.corner === "ne" ? t.origin.y + t.origin.height : t.origin.y;
386
- Object.assign(N.value[t.index], Rt(i, a, n, r));
387
- }
388
- function Mt(e) {
389
- let t = P.value;
390
- if (P.value = null, R.value = null, t) {
391
- if (t.mode === "draw") {
392
- F.value && F.value.width >= St && F.value.height >= St ? (N.value.push({ ...F.value }), I.value = N.value.length - 1) : t.moved || (I.value = -1), F.value = null;
393
- return;
394
- }
395
- t.mode === "move" && !t.moved && zt(t.index, e);
396
- }
397
- }
398
- function Nt(e) {
399
- let t = oe.value?.getBoundingClientRect();
400
- if (!t || t.width === 0) return !1;
401
- let n = e.mode === "draw" ? F.value : N.value[e.index];
402
- return !n || Math.max(n.width * t.width, n.height * t.height) <= At;
403
- }
404
- function Pt(e) {
405
- let t = M.value?.getBoundingClientRect(), n = ie.value?.getBoundingClientRect();
406
- if (!t || !n || t.width === 0 || t.height === 0) {
407
- R.value = null;
408
- return;
409
- }
410
- let r = Dt / 2, i = Math.min(Math.max(e.clientX - n.left, 59), n.width - r - 4), a = e.clientY - n.top - kt;
411
- a - r < 4 && (a = e.clientY - n.top + kt), R.value = {
412
- x: i,
413
- y: a,
414
- frameW: t.width,
415
- frameH: t.height,
416
- tx: r - (e.clientX - t.left) * Ot,
417
- ty: r - (e.clientY - t.top) * Ot
418
- };
419
- }
420
- function Ft(e) {
421
- let t = e instanceof HTMLElement || e instanceof SVGElement ? e : null;
422
- if (!t || ie.value?.contains(t) || t.closest(".p-dialog-header") || t.closest("button")) return !1;
423
- let n = A.value?.closest(".p-dialog-content")?.lastElementChild;
424
- return !(n && n !== A.value && n.contains(t));
425
- }
426
- function It(e) {
427
- if (z = null, e.touches.length !== 1 || !Ft(e.target)) return;
428
- let t = e.touches[0];
429
- z = {
430
- x: t.clientX,
431
- y: t.clientY,
432
- at: Date.now()
433
- };
434
- }
435
- function Lt(e) {
436
- let t = z;
437
- if (z = null, !t || e.changedTouches.length !== 1) return;
438
- let n = e.changedTouches[0], r = n.clientX - t.x, i = n.clientY - t.y;
439
- Date.now() - t.at <= Et && Math.abs(r) >= Tt && Math.abs(r) > 2 * Math.abs(i) && $(r < 0 ? 1 : -1);
440
- }
441
- function Rt(e, t, n, r) {
442
- return {
443
- x: Math.min(e, n),
444
- y: Math.min(t, r),
445
- width: Math.abs(n - e),
446
- height: Math.abs(r - t)
447
- };
448
- }
449
- function zt(e, t) {
450
- B.value = e;
451
- let n = M.value?.querySelector(`[data-box-label="${e}"]`);
452
- j.value?.toggleMenu(t, n ?? void 0);
453
- }
454
- function Bt(e) {
455
- let t = N.value[B.value];
456
- t && (t.label = e, t.confidence = 1, pe.value = e);
457
- }
458
- function Vt(e) {
459
- let t = N.value[I.value];
460
- t && (t.text = (e ?? "").toUpperCase().replace(/[^A-Z0-9ÄÖÜ\- ]/g, "") || void 0);
461
- }
462
- function Ht(e) {
463
- e < 0 || e >= N.value.length || (N.value.splice(e, 1), I.value = -1);
464
- }
465
- function Ut(e, t = !0) {
466
- e < 0 || e >= u.candidates.length || (t && D.set(W.value.id, N.value.map((e) => ({ ...e }))), V.value = e, N.value = (D.get(W.value.id) ?? W.value.boxes).map((e) => ({ ...e })), F.value = null, P.value = null, R.value = null, I.value = -1, B.value = -1, j.value?.hide(), Ae());
467
- }
468
- async function Wt(e) {
469
- return await u.onSave(W.value.id, N.value.map((e) => ({ ...e })), e), D.set(W.value.id, N.value.map((e) => ({ ...e }))), e === "verified" && ne.add(W.value.id), $(1, !1) ? null : void 0;
470
- }
471
- function $(e, t = !0) {
472
- let n = V.value + e;
473
- for (; n >= 0 && n < u.candidates.length && O.has(u.candidates[n].id);) n += e;
474
- return n < 0 || n >= u.candidates.length ? !1 : (Ut(n, t), !0);
475
- }
476
- async function Gt() {
477
- let e = W.value.id;
478
- return await u.onDelete(e), D.delete(e), O.add(e), $(1, !1) || $(-1, !1) ? null : void 0;
479
- }
480
- function Kt() {
481
- for (let e of [1, -1]) {
482
- let t = V.value + e;
483
- for (; t >= 0 && t < u.candidates.length && O.has(u.candidates[t].id);) t += e;
484
- let n = u.candidates[t];
485
- n && (new Image().src = u.imageUrl(n.id));
486
- }
487
- }
488
- function qt(e) {
489
- N.value.length && (I.value = (I.value + e + N.value.length) % N.value.length);
490
- }
491
- function Jt(e) {
492
- let t = N.value[I.value];
493
- if (!t) return;
494
- let n = Je, r = n[(n.indexOf(t.label) + e + n.length) % n.length];
495
- t.label = r, t.confidence = 1, pe.value = r;
496
- }
497
- function Yt(e, t, n) {
498
- let r = N.value[I.value];
499
- r && (n ? (r.width = Math.min(1 - r.x, Math.max(St, r.width + e)), r.height = Math.min(1 - r.y, Math.max(St, r.height + t))) : (r.x = Math.min(1 - r.width, Math.max(0, r.x + e)), r.y = Math.min(1 - r.height, Math.max(0, r.y + t))));
500
- }
501
- return h(V, Kt, { immediate: !0 }), ye(window, "keydown", (e) => {
502
- if (e.target?.closest?.("input, textarea")) return;
503
- let t = {
504
- ArrowLeft: [-.003, 0],
505
- ArrowRight: [jt, 0],
506
- ArrowUp: [0, -.003],
507
- ArrowDown: [0, jt]
508
- };
509
- if (t[e.key]) {
510
- if (I.value >= 0) {
511
- e.preventDefault();
512
- let [n, r] = t[e.key];
513
- Yt(n, r, e.shiftKey);
514
- } else !e.repeat && e.key === "ArrowLeft" ? $(-1) : !e.repeat && e.key === "ArrowRight" && $(1);
515
- return;
516
- }
517
- e.repeat || (e.key === "Tab" ? (e.preventDefault(), qt(e.shiftKey ? -1 : 1)) : e.key === "Escape" ? (I.value = -1, j.value?.hide()) : (e.key === "Delete" || e.key === "Backspace") && I.value >= 0 ? Ht(I.value) : e.key === "s" || e.key === "S" ? Jt(e.shiftKey ? -1 : 1) : e.key === " " && !j.value?.isOpen && (e.preventDefault(), Wt("verified")));
518
- }), ye(() => A.value?.closest(".p-dialog-content") ?? void 0, "touchstart", It, { passive: !0 }), ye(() => A.value?.closest(".p-dialog-content") ?? void 0, "touchend", Lt, { passive: !0 }), s({
519
- onConfirm: () => Wt("verified"),
520
- onCancel: () => Gt()
521
- }), (s, u) => {
522
- let p = te, h = de, y = Ce, x = fe, C = Ee, w = qe;
523
- return n(), g("div", {
524
- ref_key: "rootRef",
525
- ref: A,
526
- class: "flex flex-col gap-3 h-full min-h-0"
527
- }, [
528
- b("div", Ye, [b("div", Xe, [
529
- T(p, {
530
- severity: f(Le) === "verified" ? "success" : "info",
531
- value: s.$t(`views.training.status_${f(Le)}`),
532
- class: "shrink-0"
533
- }, null, 8, ["severity", "value"]),
534
- b("span", Ze, i(r.cameraName(f(W).cameraId)), 1),
535
- b("span", Qe, i(f(le)(f(W).createdAt)), 1)
536
- ]), b("span", $e, i(f(Me)) + " / " + i(f(Ne)), 1)]),
537
- b("div", {
538
- ref_key: "stageRef",
539
- ref: ie,
540
- class: "stage relative w-full bg-black rounded-lg shrink-0 overflow-hidden select-none"
541
- }, [
542
- T(f(se), {
543
- pan: f(ge),
544
- "onUpdate:pan": u[7] ||= (e) => d(ge) ? ge.value = e : null,
545
- zoom: f(H),
546
- "onUpdate:zoom": u[8] ||= (e) => d(H) ? H.value = e : null,
547
- "pan-enabled": f(H) > 1 && !f(P),
548
- "enable-control-button": !1,
549
- "dbl-click-enabled": !1,
550
- "min-zoom": 1,
551
- "max-zoom": f(5),
552
- selector: `[data-stage-zoom='${f(k)}']`,
553
- "zoom-origin": "pointer",
554
- class: a(["absolute inset-0 flex items-center justify-center", { "zoom-constraining": f(ve) }]),
555
- onPanned: f(Te),
556
- onZoom: f(Te),
557
- onDblclick: f(De),
558
- onTouchstart: f(Oe),
559
- onTouchend: f(ke)
560
- }, {
561
- default: m(() => [b("div", {
562
- ref_key: "frameRef",
563
- ref: M,
564
- "data-stage-zoom": f(k),
565
- class: "frame relative",
566
- style: _({
567
- "--ar-w": f(ce).w,
568
- "--ar-h": f(ce).h
569
- })
570
- }, [
571
- b("img", {
572
- src: r.imageUrl(f(W).id),
573
- class: "absolute inset-0 w-full h-full",
574
- draggable: "false",
575
- onLoad: Y
576
- }, null, 40, tt),
577
- (n(), g("svg", {
578
- ref_key: "svgRef",
579
- ref: oe,
580
- class: a(["absolute inset-0 w-full h-full touch-none", f(H) > 1 ? "cursor-grab" : "cursor-crosshair"]),
581
- onPointerdown: We,
582
- onPointermove: Q,
583
- onPointerup: Mt,
584
- onPointercancel: Mt
585
- }, [(n(!0), g(v, null, t(f(N), (r, i) => (n(), g("g", { key: i }, [b("rect", {
586
- x: q(r.x),
587
- y: q(r.y),
588
- width: q(r.width),
589
- height: q(r.height),
590
- stroke: K(r.label).color,
591
- fill: K(r.label).color,
592
- "fill-opacity": i === f(I) ? .22 : .12,
593
- "stroke-width": i === f(I) ? 3.5 : 2,
594
- "vector-effect": "non-scaling-stroke",
595
- class: "cursor-move",
596
- onPointerdown: e((e) => Ge(i, e), ["stop"]),
597
- onTouchstart: u[0] ||= e(() => {}, ["stop"]),
598
- onMousedown: u[1] ||= e(() => {}, ["stop"])
599
- }, null, 40, nt), (n(), g(v, null, t(ee, (t) => b("g", {
600
- key: t,
601
- class: "cursor-nwse-resize",
602
- onPointerdown: e((e) => Ke(i, t, e), ["stop"]),
603
- onTouchstart: u[2] ||= e(() => {}, ["stop"]),
604
- onMousedown: u[3] ||= e(() => {}, ["stop"])
605
- }, [b("circle", {
606
- cx: He(r, t),
607
- cy: J(r, t),
608
- r: "14",
609
- fill: "transparent"
610
- }, null, 8, it), b("circle", {
611
- cx: He(r, t),
612
- cy: J(r, t),
613
- r: "4.5",
614
- fill: K(r.label).color
615
- }, null, 8, at)], 40, rt)), 64))]))), 128)), f(F) ? (n(), g("rect", {
616
- key: 0,
617
- x: q(f(F).x),
618
- y: q(f(F).y),
619
- width: q(f(F).width),
620
- height: q(f(F).height),
621
- stroke: K(f(F).label).color,
622
- fill: K(f(F).label).color,
623
- "fill-opacity": "0.1",
624
- "stroke-dasharray": "6 4",
625
- "stroke-width": "2",
626
- "vector-effect": "non-scaling-stroke"
627
- }, null, 8, ot)) : l("", !0)], 34)),
628
- (n(!0), g(v, null, t(f(N), (t, r) => (n(), g("div", {
629
- key: `label-${r}`,
630
- class: a(["bbox-label cursor-pointer", {
631
- "label-bottom": f(Be)(t) === "below",
632
- "label-inside": f(Be)(t) === "inside",
633
- "label-right": f(G)(t)
634
- }]),
635
- "data-box-label": r,
636
- onPointerdown: u[4] ||= e(() => {}, ["stop"]),
637
- onTouchstart: u[5] ||= e(() => {}, ["stop"]),
638
- onMousedown: u[6] ||= e(() => {}, ["stop"]),
639
- onClick: e((e) => zt(r, e), ["stop"]),
640
- style: _(Ue(t))
641
- }, [
642
- (n(), c(o(K(t.label).icon), { class: "bbox-label-icon" })),
643
- b("span", ct, i(Ve(t.label)), 1),
644
- t.text ? (n(), g("span", lt, i(t.text), 1)) : t.confidence < 1 ? (n(), g("span", ut, i(Math.round(t.confidence * 100)) + "%", 1)) : l("", !0)
645
- ], 46, st))), 128))
646
- ], 12, et)]),
647
- _: 1
648
- }, 8, [
649
- "pan",
650
- "zoom",
651
- "pan-enabled",
652
- "max-zoom",
653
- "selector",
654
- "class",
655
- "onPanned",
656
- "onZoom",
657
- "onDblclick",
658
- "onTouchstart",
659
- "onTouchend"
660
- ]),
661
- f(be) ? (n(), g("div", {
662
- key: 0,
663
- class: "zoom-minimap",
664
- style: _(f(we) ?? void 0)
665
- }, [b("div", {
666
- class: "zoom-minimap-viewport",
667
- style: _(f(be))
668
- }, null, 4)], 4)) : l("", !0),
669
- f(R) ? (n(), g("div", {
670
- key: 1,
671
- class: "loupe",
672
- style: _({
673
- left: `${f(R).x}px`,
674
- top: `${f(R).y}px`
675
- })
676
- }, [b("div", {
677
- class: "loupe-content",
678
- style: _({
679
- width: `${f(R).frameW}px`,
680
- height: `${f(R).frameH}px`,
681
- transform: `translate(${f(R).tx}px, ${f(R).ty}px) scale(${Ot})`
682
- })
683
- }, [b("img", {
684
- src: r.imageUrl(f(W).id),
685
- class: "absolute inset-0 w-full h-full",
686
- draggable: "false"
687
- }, null, 8, dt), (n(), g("svg", ft, [(n(!0), g(v, null, t(f(N), (e, t) => (n(), g("rect", {
688
- key: t,
689
- x: q(e.x),
690
- y: q(e.y),
691
- width: q(e.width),
692
- height: q(e.height),
693
- stroke: K(e.label).color,
694
- fill: K(e.label).color,
695
- "fill-opacity": "0.1",
696
- "stroke-width": "1.5"
697
- }, null, 8, pt))), 128)), f(F) ? (n(), g("rect", {
698
- key: 0,
699
- x: q(f(F).x),
700
- y: q(f(F).y),
701
- width: q(f(F).width),
702
- height: q(f(F).height),
703
- stroke: K(f(F).label).color,
704
- fill: K(f(F).label).color,
705
- "fill-opacity": "0.1",
706
- "stroke-dasharray": "4 3",
707
- "stroke-width": "1.5"
708
- }, null, 8, mt)) : l("", !0)]))], 4), u[12] ||= b("div", { class: "loupe-crosshair" }, null, -1)], 4)) : l("", !0),
709
- f(Fe) ? (n(), g("div", ht, [T(y, {
710
- severity: "secondary",
711
- rounded: "",
712
- class: "cui-icon-md opacity-60 hover:opacity-100",
713
- onClick: u[9] ||= e((e) => $(-1), ["stop"])
714
- }, {
715
- icon: m(() => [T(h, {
716
- width: "100%",
717
- height: "100%"
718
- })]),
719
- _: 1
720
- })])) : l("", !0),
721
- f(Ie) ? (n(), g("div", gt, [T(y, {
722
- severity: "secondary",
723
- rounded: "",
724
- class: "cui-icon-md opacity-60 hover:opacity-100",
725
- onClick: u[10] ||= e((e) => $(1), ["stop"])
726
- }, {
727
- icon: m(() => [T(x, {
728
- width: "100%",
729
- height: "100%"
730
- })]),
731
- _: 1
732
- })])) : l("", !0)
733
- ], 512),
734
- f(Re) ? (n(), g("div", _t, [b("label", vt, i(s.$t("components.training_editor.plate_text")), 1), T(C, {
735
- id: "plate-text",
736
- "model-value": f(Re).text ?? "",
737
- size: "small",
738
- maxlength: "12",
739
- class: "w-40 uppercase",
740
- placeholder: "ABC 1234",
741
- "onUpdate:modelValue": Vt
742
- }, null, 8, ["model-value"])])) : l("", !0),
743
- b("div", yt, [b("span", bt, i(s.$t("components.training_editor.hint")), 1), f(ue) ? (n(), c(y, {
744
- key: 0,
745
- severity: "secondary",
746
- text: "",
747
- rounded: "",
748
- class: "cui-icon-sm shrink-0",
749
- onClick: u[11] ||= (e) => L.value = !f(L)
750
- }, {
751
- icon: m(() => [T(w, { class: "w-4 h-4" })]),
752
- _: 1
753
- })) : l("", !0)]),
754
- f(ue) && f(L) ? (n(), g("div", xt, [
755
- u[13] ||= b("span", null, [b("kbd", null, "Tab")], -1),
756
- b("span", null, i(s.$t("components.training_editor.sc_select")), 1),
757
- u[14] ||= S(),
758
- u[15] ||= b("span", null, [b("kbd", null, "←↑→↓")], -1),
759
- b("span", null, i(s.$t("components.training_editor.sc_move")), 1),
760
- u[16] ||= S(),
761
- u[17] ||= b("span", null, [
762
- b("kbd", null, "Shift"),
763
- S(" + "),
764
- b("kbd", null, "←↑→↓")
765
- ], -1),
766
- b("span", null, i(s.$t("components.training_editor.sc_resize")), 1),
767
- u[18] ||= S(),
768
- u[19] ||= b("span", null, [b("kbd", null, "S")], -1),
769
- b("span", null, i(s.$t("components.training_editor.sc_label")), 1),
770
- u[20] ||= S(),
771
- u[21] ||= b("span", null, [b("kbd", null, "Del")], -1),
772
- b("span", null, i(s.$t("components.training_editor.sc_delete")), 1),
773
- u[22] ||= S(),
774
- u[23] ||= b("span", null, [b("kbd", null, "Esc")], -1),
775
- b("span", null, i(s.$t("components.training_editor.sc_deselect")), 1),
776
- u[24] ||= S(),
777
- u[25] ||= b("span", null, [b("kbd", null, "Space")], -1),
778
- b("span", null, i(s.$t("components.training_editor.sc_verify")), 1),
779
- u[26] ||= S(),
780
- u[27] ||= b("span", null, [
781
- b("kbd", null, "←"),
782
- S(" / "),
783
- b("kbd", null, "→")
784
- ], -1),
785
- b("span", null, i(s.$t("components.training_editor.sc_nav")), 1)
786
- ])) : l("", !0),
787
- T(ae, {
788
- ref_key: "labelMenuRef",
789
- ref: j,
790
- items: f(ze),
791
- popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
792
- }, null, 8, ["items"])
793
- ], 512);
794
- };
795
- }
796
- }), [["__scopeId", "data-v-0a1cd189"]]), Nt = { class: "flex flex-col gap-3" }, Pt = {
797
- key: 0,
798
- class: "flex flex-col gap-2"
799
- }, Ft = {
800
- key: 1,
801
- class: "flex flex-col items-center gap-3 py-10"
802
- }, It = { class: "text-muted text-sm text-center max-w-sm" }, Lt = {
803
- key: 2,
804
- class: "flex flex-col items-center gap-3 py-10"
805
- }, Rt = { class: "text-muted text-sm text-center max-w-sm" }, zt = { class: "text-muted text-sm" }, Bt = { class: "w-24 aspect-video rounded-lg overflow-hidden bg-black/5 dark:bg-black/30 shrink-0" }, Vt = { class: "flex-1 min-w-0" }, Ht = { class: "flex flex-wrap items-center gap-1" }, Ut = { class: "text-xs text-muted mt-1" }, Wt = /* @__PURE__ */ C({
806
- __name: "TrainingSubmissions",
807
- setup(e) {
808
- let r = new We(), { t: a, te: o } = Se(), s = P(), l = r.getSubmissionsQuery(), u = r.deleteSubmissionMutation(), d = w(""), h = p(() => l.data.value ?? []);
809
- function y(e) {
810
- let t = {};
811
- for (let n of e.labels) t[n.label] = (t[n.label] ?? 0) + 1;
812
- return t;
813
- }
814
- function S(e) {
815
- let t = `components.training_editor.labels.${e}`;
816
- return o(t) ? a(t) : e;
817
- }
818
- async function C(e) {
819
- d.value = e;
820
- try {
821
- await u.mutateAsync(e);
822
- } catch (e) {
823
- s.add({
824
- severity: "error",
825
- detail: e?.message ?? String(e),
826
- life: 5e3
827
- });
828
- } finally {
829
- d.value = "";
830
- }
831
- }
832
- return (e, r) => {
833
- let a = H, o = Me, s = M, p = F, w = te, E = Pe, D = Ce, O = ee;
834
- return n(), g("div", Nt, [f(l).isLoading.value ? (n(), g("div", Pt, [(n(), g(v, null, t(4, (e) => T(a, {
835
- key: e,
836
- height: "72px",
837
- "border-radius": "12px"
838
- })), 64))])) : f(l).isError.value ? (n(), g("div", Ft, [T(o, { class: "w-10 h-10 text-muted" }), b("span", It, i(e.$t("components.training_submissions.load_failed")), 1)])) : f(h).length ? (n(), g(v, { key: 3 }, [b("span", zt, i(e.$t("components.training_submissions.count", f(h).length)), 1), (n(!0), g(v, null, t(f(h), (r) => (n(), g("div", {
839
- key: r.id,
840
- class: "cui-card h-auto! shrink-0 p-2 flex items-center gap-3"
841
- }, [
842
- b("div", Bt, [T(p, {
843
- src: r.imageUrl,
844
- "image-container-class": "w-full h-full",
845
- "image-style": { objectFit: "cover" }
846
- }, null, 8, ["src"])]),
847
- b("div", Vt, [b("div", Ht, [(n(!0), g(v, null, t(y(r), (e, t) => (n(), g("span", {
848
- key: t,
849
- class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
850
- style: _({ backgroundColor: f(_e)(String(t)).color })
851
- }, i(S(String(t))) + " ×" + i(e), 5))), 128))]), b("div", Ut, i(f(le)(new Date(r.createdAt).getTime())), 1)]),
852
- T(w, {
853
- severity: r.usedInWave ? "success" : "info",
854
- value: r.usedInWave ? e.$t("components.training_submissions.status_trained") : e.$t("components.training_submissions.status_pool"),
855
- class: "shrink-0"
856
- }, null, 8, ["severity", "value"]),
857
- x((n(), c(D, {
858
- severity: "danger",
859
- text: "",
860
- rounded: "",
861
- class: "cui-icon-sm shrink-0",
862
- loading: f(u).isPending.value && f(d) === r.id,
863
- onClick: (e) => C(r.id)
864
- }, {
865
- icon: m(() => [T(E, {
866
- width: "100%",
867
- height: "100%"
868
- })]),
869
- _: 1
870
- }, 8, ["loading", "onClick"])), [[
871
- O,
872
- e.$t("components.training_submissions.delete"),
873
- void 0,
874
- { left: !0 }
875
- ]])
876
- ]))), 128))], 64)) : (n(), g("div", Lt, [T(s, { class: "w-10 h-10 text-muted" }), b("span", Rt, i(e.$t("components.training_submissions.empty")), 1)]))]);
877
- };
878
- }
879
- }), $ = { desktop: {
880
- maxWidth: "720px",
881
- width: "90vw"
882
- } }, Gt = E({ progress: null }), Kt = null, qt = null, Jt = /* @__PURE__ */ new Set();
883
- function Yt() {
884
- for (let e of Jt) try {
885
- e();
886
- } catch {}
887
- }
888
- async function Xt() {
889
- if (qt?.ready.value) try {
890
- let e = await qt.request("get-submit-progress");
891
- e.active && (Gt.progress = e);
892
- } catch {}
893
- }
894
- function Zt() {
895
- return qt || (Kt = u(!0), Kt.run(() => {
896
- let e = V("/training");
897
- qt = e, e.on("candidates-changed", () => Yt()), e.on("submit-progress", (e) => {
898
- Gt.progress = e, Yt();
899
- }), e.onReady(() => {
900
- Xt(), Yt();
901
- });
902
- }), qt);
903
- }
904
- function Qt() {
905
- function e() {
906
- Zt();
907
- }
908
- function t(e) {
909
- return Jt.add(e), () => Jt.delete(e);
910
- }
911
- function n() {
912
- Gt.progress = null;
913
- }
914
- return {
915
- submitProgress: p(() => Gt.progress),
916
- connect: e,
917
- onCandidatesChanged: t,
918
- dismissProgress: n
919
- };
920
- }
921
- //#endregion
922
- //#region src/views/Training.vue?vue&type=script&setup=true&lang.ts
923
- var $t = { class: "flex flex-col h-full min-h-0" }, en = {
924
- key: 0,
925
- class: "page-title"
926
- }, tn = { class: "font-semibold text-xl truncate" }, nn = { class: "flex gap-2 mb-4" }, rn = {
927
- key: 1,
928
- class: "cui-card h-auto! shrink-0 px-3 py-2 mb-4 flex items-center gap-3"
929
- }, an = { class: "flex-1 min-w-0" }, on = { class: "text-sm" }, sn = { class: "flex-1 text-sm" }, cn = { class: "p-3" }, ln = {
930
- key: 3,
931
- class: "flex flex-1 min-h-0 flex-col items-center justify-center w-full gap-4 py-16"
932
- }, un = { class: "text-muted text-sm text-center max-w-md" }, dn = { class: "relative flex-1 min-h-0 overflow-hidden bg-black/5 dark:bg-black/30" }, fn = { class: "absolute top-1.5 left-1.5 flex flex-wrap gap-1" }, pn = {
933
- key: 0,
934
- class: "absolute bottom-1.5 left-1.5"
935
- }, mn = {
936
- key: 1,
937
- class: "absolute top-1.5 right-1.5 dark-mode"
938
- }, hn = { class: "flex items-center justify-between gap-2" }, gn = { class: "flex items-center gap-2 min-w-0" }, _n = { class: "min-w-0" }, vn = { class: "font-medium truncate" }, yn = { class: "text-xs text-muted" }, bn = 40, xn = /* @__PURE__ */ C({
939
- __name: "Training",
940
- setup(o) {
941
- let s = new N(), u = new We(), { t: C, te: E } = Se(), O = ge(), k = P(), { smBreakpoint: A } = z(), j = u.getCandidatesQuery(), M = u.getSettingsQuery(), se = u.patchCandidateMutation(), L = u.deleteCandidateMutation(), de = u.patchSettingsMutation(), fe = u.submitCandidatesMutation(), me = Qt(), { data: he } = s.getCamerasQuery({
942
- page: 1,
943
- pageSize: -1
944
- }), V = w(""), U = w(bn), ye = y("cameraMenuRef"), xe = y("settingsMenuRef"), Le = p(() => ({ gridTemplateColumns: `repeat(auto-fill, minmax(${A.value ? "220px" : "260px"}, 1fr))` })), Re = p(() => {
945
- let e = [...new Set((j.data.value ?? []).map((e) => Qe(e.cameraId)))].sort((e, t) => e.localeCompare(t));
946
- return [{
947
- key: "all",
948
- label: C("views.training.all_cameras"),
949
- active: V.value === "",
950
- onClick: () => {
951
- V.value = "";
952
- }
953
- }, ...e.map((e) => ({
954
- key: e,
955
- label: e,
956
- active: V.value === e,
957
- onClick: () => {
958
- V.value = e;
959
- }
960
- }))];
961
- }), Be = p(() => [{
962
- key: "collect",
963
- label: C("views.training.collection_enabled"),
964
- description: C("views.training.collection_hint"),
965
- toggle: !0,
966
- toggleState: M.data.value?.enabled ?? !0,
967
- onClick: () => {
968
- ut(!(M.data.value?.enabled ?? !0));
969
- }
970
- }]), G = p(() => {
971
- let e = V.value.trim().toLowerCase();
972
- return e ? (j.data.value ?? []).filter((t) => Qe(t.cameraId).toLowerCase().includes(e)) : j.data.value ?? [];
973
- }), K = p(() => G.value.slice(0, U.value)), q = p(() => G.value.length > K.value.length), He = p(() => (j.data.value ?? []).filter((e) => Y(e)).length), J = p(() => me.submitProgress.value ? me.submitProgress.value : He.value > 0 ? {
974
- active: !0,
975
- total: He.value,
976
- done: 0,
977
- failed: 0
978
- } : null), Ue = p(() => G.value.filter((e) => !Y(e)));
979
- function Y(e) {
980
- return e.upload === "queued" || e.upload === "uploading";
981
- }
982
- let { selectionMode: X, selectedIds: Z, allSelected: Ge, bulkBusy: Ke, enterSelectionMode: qe, exitSelectionMode: Je, toggleSelectAll: Ye, toggleSelection: Xe } = ce(Ue, (e) => e.id), Ze = p(() => [...Z.value].filter((e) => j.data.value?.find((t) => t.id === e)?.status === "verified"));
983
- function Qe(e) {
984
- return he.value?.result?.find((t) => t._id === e)?.name ?? e;
985
- }
986
- function $e(e) {
987
- return ue(`/api/training/candidates/${e}/image`) ?? "";
988
- }
989
- function et(e) {
990
- let t = `components.training_editor.labels.${e}`;
991
- return E(t) ? C(t) : e;
992
- }
993
- function tt(e) {
994
- let t = {};
995
- for (let n of e.boxes) t[n.label] = (t[n.label] ?? 0) + 1;
996
- return t;
997
- }
998
- function nt(e) {
999
- return e === "verified" ? "success" : "info";
1000
- }
1001
- function rt() {
1002
- U.value += bn;
1003
- }
1004
- function it(e) {
1005
- if (!Y(e)) {
1006
- if (X.value) {
1007
- Xe(e.id);
1008
- return;
1009
- }
1010
- at(e);
1011
- }
1012
- }
1013
- function at(e) {
1014
- O.openComponentDialog(Mt, {
1015
- data: {
1016
- title: C("views.training.title"),
1017
- cancelText: C("components.form.button.remove"),
1018
- confirmText: C("components.training_editor.verify"),
1019
- cancelButtonProps: { severity: "danger" },
1020
- contentProps: {
1021
- candidates: G.value.map((e) => ({ ...e })),
1022
- startId: e.id,
1023
- cameraName: Qe,
1024
- imageUrl: $e,
1025
- onSave: async (e, t, n) => {
1026
- await se.mutateAsync({
1027
- id: e,
1028
- patch: {
1029
- boxes: t,
1030
- status: n
1031
- }
1032
- });
1033
- },
1034
- onDelete: async (e) => {
1035
- await L.mutateAsync(e);
1036
- }
1037
- }
1038
- },
1039
- dialogSize: Q
1040
- });
1041
- }
1042
- function ot() {
1043
- O.openComponentDialog(Wt, {
1044
- data: {
1045
- title: C("views.training.submissions"),
1046
- hideConfirmButton: !0,
1047
- cancelText: C("components.form.button.close"),
1048
- contentProps: {}
1049
- },
1050
- dialogSize: $
1051
- });
1052
- }
1053
- function st() {
1054
- let e = Ze.value;
1055
- !e.length || fe.isPending.value || O.openTextDialog({
1056
- data: {
1057
- title: C("components.dialog.title.confirm"),
1058
- contentText: C("views.training.submit_confirm", { count: e.length }),
1059
- confirmText: C("views.training.submit")
1060
- },
1061
- onConfirm: async () => {
1062
- try {
1063
- await fe.mutateAsync(e), Je();
1064
- } catch (e) {
1065
- k.add({
1066
- severity: "error",
1067
- detail: e?.message ?? String(e),
1068
- life: 8e3
1069
- });
1070
- }
1071
- }
1072
- });
1073
- }
1074
- function ct() {
1075
- let e = [...Z.value];
1076
- !e.length || Ke.value || O.openTextDialog({
1077
- data: {
1078
- title: C("components.dialog.title.confirm"),
1079
- contentText: C("views.training.delete_selected_confirm", { count: e.length }),
1080
- confirmText: C("components.form.button.remove"),
1081
- confirmButtonProps: { severity: "danger" }
1082
- },
1083
- onConfirm: async () => {
1084
- Ke.value = !0;
1085
- try {
1086
- for (let t of e) await L.mutateAsync(t);
1087
- Je(), k.add({
1088
- severity: "success",
1089
- detail: C("views.training.delete_selected_done", { count: e.length }),
1090
- life: 5e3
1091
- });
1092
- } catch (e) {
1093
- k.add({
1094
- severity: "error",
1095
- detail: e?.message ?? String(e),
1096
- life: 5e3
1097
- });
1098
- } finally {
1099
- Ke.value = !1;
1100
- }
1101
- }
1102
- });
1103
- }
1104
- async function lt(e) {
1105
- await L.mutateAsync(e.id);
1106
- }
1107
- async function ut(e) {
1108
- await de.mutateAsync({ enabled: e });
1109
- }
1110
- h(V, () => {
1111
- U.value = bn;
1112
- }), me.connect();
1113
- let dt = me.onCandidatesChanged(() => {
1114
- j.refetch();
1115
- });
1116
- return r(() => {
1117
- dt();
1118
- }), (r, o) => {
1119
- let s = Fe, u = Ce, p = ie, h = W, y = Te, w = Ee, E = we, O = D, k = B, M = oe, se = ze, N = Ie, ce = Ae, P = ke, L = Me, ue = Ne, de = Oe, z = H, he = R, ge = F, U = te, Se = Pe, He = De, Ue = be, We = je, Q = pe, at = ne, ut = ee;
1120
- return n(), g("div", $t, [
1121
- f(A) ? l("", !0) : (n(), g("h1", en, i(r.$t("views.training.title")), 1)),
1122
- T(p, { position: "left" }, {
1123
- default: m(() => [T(u, {
1124
- severity: "secondary",
1125
- text: "",
1126
- class: "cui-button p-2 text-color non-draggable-region",
1127
- onClick: o[0] ||= (e) => r.$router.push("/menu")
1128
- }, {
1129
- icon: m(() => [T(s, { class: "w-6 h-6" })]),
1130
- _: 1
1131
- })]),
1132
- _: 1
1133
- }),
1134
- T(p, { position: "center" }, {
1135
- default: m(() => [b("span", tn, i(r.$t("views.training.title")), 1)]),
1136
- _: 1
1137
- }),
1138
- b("div", nn, [
1139
- T(M, { class: "flex-1" }, {
1140
- default: m(() => [T(E, { class: "flex-1" }, {
1141
- default: m(() => [T(y, null, {
1142
- default: m(() => [T(h, { class: "w-4 h-4" })]),
1143
- _: 1
1144
- }), T(w, {
1145
- modelValue: f(V),
1146
- "onUpdate:modelValue": o[1] ||= (e) => d(V) ? V.value = e : null,
1147
- placeholder: f(C)("views.training.search"),
1148
- class: "w-full"
1149
- }, null, 8, ["modelValue", "placeholder"])]),
1150
- _: 1
1151
- }), T(k, null, {
1152
- default: m(() => [T(u, {
1153
- severity: "secondary",
1154
- text: "",
1155
- class: "text-color",
1156
- onClick: o[2] ||= (e) => f(ye)?.toggleMenu(e)
1157
- }, {
1158
- icon: m(() => [T(O, { class: a(["w-4 h-4 transform transition-transform duration-300", { "rotate-180": f(ye)?.isOpen }]) }, null, 8, ["class"])]),
1159
- _: 1
1160
- })]),
1161
- _: 1
1162
- })]),
1163
- _: 1
1164
- }),
1165
- x((n(), c(u, {
1166
- severity: "secondary",
1167
- outlined: "",
1168
- class: "cui-button shrink-0",
1169
- onClick: ot
1170
- }, {
1171
- icon: m(() => [T(se, { class: "w-4.5 h-4.5" })]),
1172
- _: 1
1173
- })), [[
1174
- ut,
1175
- { value: r.$t("views.training.submissions") },
1176
- void 0,
1177
- { left: !0 }
1178
- ]]),
1179
- x((n(), c(u, {
1180
- severity: "secondary",
1181
- outlined: "",
1182
- class: "cui-button shrink-0",
1183
- onClick: o[3] ||= (e) => f(xe)?.toggleMenu(e)
1184
- }, {
1185
- icon: m(() => [T(N, { class: "w-4.5 h-4.5" })]),
1186
- _: 1
1187
- })), [[
1188
- ut,
1189
- { value: r.$t("views.training.collection") },
1190
- void 0,
1191
- { left: !0 }
1192
- ]])
1193
- ]),
1194
- f(J) ? (n(), g("div", rn, [f(J).active ? (n(), g(v, { key: 0 }, [T(ce, { class: "w-4 h-4 text-primary shrink-0" }), b("div", an, [b("div", on, i(r.$t("views.training.upload_progress", {
1195
- done: f(J).done + f(J).failed,
1196
- total: f(J).total
1197
- })), 1), T(P, {
1198
- value: f(J).total ? Math.round((f(J).done + f(J).failed) / f(J).total * 100) : 0,
1199
- "show-value": !1,
1200
- style: { height: "6px" },
1201
- class: "mt-1.5"
1202
- }, null, 8, ["value"])])], 64)) : (n(), g(v, { key: 1 }, [
1203
- f(J).failed ? (n(), c(L, {
1204
- key: 0,
1205
- class: "w-5 h-5 text-red-500 shrink-0"
1206
- })) : (n(), c(ue, {
1207
- key: 1,
1208
- class: "w-5 h-5 text-green-500 shrink-0"
1209
- })),
1210
- b("span", sn, [S(i(r.$t("views.training.submit_done", f(J).done)), 1), f(J).failed ? (n(), g(v, { key: 0 }, [S(" · " + i(r.$t("views.training.upload_failed_summary", { count: f(J).failed })), 1)], 64)) : l("", !0)]),
1211
- T(u, {
1212
- severity: "secondary",
1213
- text: "",
1214
- rounded: "",
1215
- class: "cui-icon-sm shrink-0",
1216
- onClick: o[4] ||= (e) => f(me).dismissProgress()
1217
- }, {
1218
- icon: m(() => [T(de, { class: "w-4 h-4" })]),
1219
- _: 1
1220
- })
1221
- ], 64))])) : l("", !0),
1222
- f(j).isLoading.value && !f(j).data.value ? (n(), g("div", {
1223
- key: 2,
1224
- class: "grid w-full gap-3 p-px",
1225
- style: _(f(Le))
1226
- }, [(n(), g(v, null, t(8, (e) => b("div", {
1227
- key: e,
1228
- class: "cui-card overflow-hidden"
1229
- }, [T(z, {
1230
- class: "aspect-video",
1231
- width: "100%",
1232
- height: "100%"
1233
- }), b("div", cn, [T(z, {
1234
- height: "14px",
1235
- width: "70%",
1236
- class: "mb-1"
1237
- }), T(z, {
1238
- height: "12px",
1239
- width: "40%"
1240
- })])])), 64))], 4)) : f(G).length === 0 ? (n(), g("div", ln, [T(he, { class: "w-12 h-12 text-muted" }), b("span", un, i(r.$t("views.training.no_candidates")), 1)])) : (n(), c(We, {
1241
- key: 4,
1242
- items: f(K),
1243
- "min-item-width": f(A) ? 220 : 250,
1244
- "aspect-ratio": 1.17,
1245
- gap: 12,
1246
- "has-more": f(q),
1247
- "load-more": rt,
1248
- "item-key": (e) => e.id,
1249
- class: "flex-1 min-h-0"
1250
- }, {
1251
- item: m(({ item: a }) => [T(Ue, {
1252
- class: "cui-card overflow-hidden transition-shadow cursor-pointer hover:shadow-md h-full flex flex-col",
1253
- pt: {
1254
- header: { class: "flex-1 min-h-0 flex" },
1255
- body: {
1256
- class: "shrink-0",
1257
- style: "height: auto"
1258
- }
1259
- },
1260
- onClick: (e) => it(a)
1261
- }, {
1262
- header: m(() => [b("div", dn, [
1263
- T(ge, {
1264
- class: "absolute inset-0",
1265
- src: $e(a.id),
1266
- alt: Qe(a.cameraId),
1267
- "image-container-class": "w-full h-full",
1268
- "image-style": { objectFit: "cover" }
1269
- }, null, 8, ["src", "alt"]),
1270
- b("div", fn, [(n(!0), g(v, null, t(tt(a), (e, t) => (n(), g("span", {
1271
- key: t,
1272
- class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
1273
- style: _({ backgroundColor: f(_e)(String(t)).color })
1274
- }, i(et(String(t))) + " ×" + i(e), 5))), 128))]),
1275
- a.upload ? (n(), g("div", pn, [a.upload === "failed" ? x((n(), c(U, {
1276
- key: 0,
1277
- severity: "danger",
1278
- value: r.$t("views.training.upload_failed")
1279
- }, null, 8, ["value"])), [[
1280
- ut,
1281
- a.uploadError,
1282
- void 0,
1283
- { top: !0 }
1284
- ]]) : a.upload === "uploading" ? (n(), c(U, {
1285
- key: 1,
1286
- severity: "info",
1287
- value: r.$t("views.training.upload_uploading")
1288
- }, null, 8, ["value"])) : (n(), c(U, {
1289
- key: 2,
1290
- severity: "secondary",
1291
- value: r.$t("views.training.upload_queued")
1292
- }, null, 8, ["value"]))])) : l("", !0),
1293
- !f(X) && !Y(a) ? (n(), g("div", mn, [x((n(), c(u, {
1294
- severity: "secondary",
1295
- rounded: "",
1296
- size: "small",
1297
- class: "cui-icon-sm text-white",
1298
- onClick: e((e) => lt(a), ["stop"])
1299
- }, {
1300
- icon: m(() => [T(Se, {
1301
- width: "100%",
1302
- height: "100%"
1303
- })]),
1304
- _: 1
1305
- }, 8, ["onClick"])), [[
1306
- ut,
1307
- r.$t("views.training.delete_candidate"),
1308
- void 0,
1309
- { top: !0 }
1310
- ]])])) : l("", !0)
1311
- ])]),
1312
- content: m(() => [b("div", hn, [b("div", gn, [f(X) && !Y(a) ? (n(), c(He, {
1313
- key: 0,
1314
- "model-value": f(Z).has(a.id),
1315
- binary: "",
1316
- size: "small",
1317
- onClick: o[5] ||= e(() => {}, ["stop"]),
1318
- "onUpdate:modelValue": (e) => f(Xe)(a.id)
1319
- }, null, 8, ["model-value", "onUpdate:modelValue"])) : l("", !0), b("div", _n, [b("div", vn, i(Qe(a.cameraId)), 1), b("div", yn, i(f(le)(a.createdAt)), 1)])]), T(U, {
1320
- severity: nt(a.status),
1321
- value: r.$t(`views.training.status_${a.status}`)
1322
- }, null, 8, ["severity", "value"])])]),
1323
- _: 2
1324
- }, 1032, ["onClick"])]),
1325
- _: 1
1326
- }, 8, [
1327
- "items",
1328
- "min-item-width",
1329
- "has-more",
1330
- "item-key"
1331
- ])),
1332
- f(G).length || f(X) ? (n(), c(at, {
1333
- key: 5,
1334
- "force-visible": f(X)
1335
- }, {
1336
- default: m(() => [f(X) ? (n(), g(v, { key: 1 }, [
1337
- T(Q, {
1338
- grouped: "",
1339
- "tooltip-props": { value: r.$t("components.form.tooltip.cancel_selection") },
1340
- "button-props": { severity: "secondary" },
1341
- icon: f(Oe),
1342
- "icon-props": {
1343
- width: "100%",
1344
- height: "100%"
1345
- },
1346
- onClick: f(Je)
1347
- }, null, 8, [
1348
- "tooltip-props",
1349
- "icon",
1350
- "onClick"
1351
- ]),
1352
- T(Q, {
1353
- grouped: "",
1354
- "tooltip-props": { value: f(Ge) ? r.$t("views.training.deselect_all") : r.$t("views.training.select_all") },
1355
- "button-props": { severity: f(Ge) ? "primary" : "secondary" },
1356
- icon: f(I),
1357
- "icon-props": {
1358
- width: "100%",
1359
- height: "100%"
1360
- },
1361
- onClick: f(Ye)
1362
- }, null, 8, [
1363
- "tooltip-props",
1364
- "button-props",
1365
- "icon",
1366
- "onClick"
1367
- ]),
1368
- T(Q, {
1369
- grouped: "",
1370
- "tooltip-props": { value: r.$t("views.training.submit_selected") },
1371
- "button-props": { disabled: !f(Ze).length || f(fe).isPending.value },
1372
- icon: f(Ve),
1373
- "icon-props": {
1374
- width: "100%",
1375
- height: "100%"
1376
- },
1377
- onClick: st
1378
- }, null, 8, [
1379
- "tooltip-props",
1380
- "button-props",
1381
- "icon"
1382
- ]),
1383
- T(Q, {
1384
- grouped: "",
1385
- "tooltip-props": { value: r.$t("views.training.delete_selected") },
1386
- "button-props": {
1387
- severity: "danger",
1388
- disabled: !f(Z).size || f(Ke)
1389
- },
1390
- icon: f(re),
1391
- "icon-props": {
1392
- width: "100%",
1393
- height: "100%"
1394
- },
1395
- onClick: ct
1396
- }, null, 8, [
1397
- "tooltip-props",
1398
- "button-props",
1399
- "icon"
1400
- ])
1401
- ], 64)) : (n(), c(Q, {
1402
- key: 0,
1403
- grouped: "",
1404
- "tooltip-props": { value: r.$t("views.training.select") },
1405
- "button-props": { severity: "secondary" },
1406
- icon: f(ve),
1407
- "icon-props": {
1408
- width: "100%",
1409
- height: "100%"
1410
- },
1411
- onClick: f(qe)
1412
- }, null, 8, [
1413
- "tooltip-props",
1414
- "icon",
1415
- "onClick"
1416
- ]))]),
1417
- _: 1
1418
- }, 8, ["force-visible"])) : l("", !0),
1419
- T(ae, {
1420
- ref_key: "cameraMenuRef",
1421
- ref: ye,
1422
- items: f(Re),
1423
- popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
1424
- }, null, 8, ["items"]),
1425
- T(ae, {
1426
- ref_key: "settingsMenuRef",
1427
- ref: xe,
1428
- items: f(Be),
1429
- "auto-hide": !1,
1430
- popover: { pt: {
1431
- root: { class: "w-[22rem]" },
1432
- content: { class: "p-0! rounded-xl! overflow-hidden!" }
1433
- } }
1434
- }, null, 8, ["items"])
1435
- ]);
1436
- };
1437
- }
1438
- });
1439
- //#endregion
1440
- export { xn as default };