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

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 (420) hide show
  1. package/dist/interface/assets/{404-BDvtK1qR.js → 404-YZOLos9r.js} +1 -1
  2. package/dist/interface/assets/{About-B4A35rRx.js → About-HtxMc8JZ.js} +1 -1
  3. package/dist/interface/assets/Assistant-bB8RBo-m.js +1 -0
  4. package/dist/interface/assets/Automation-D3DcUyui.js +3 -0
  5. package/dist/interface/assets/{AutomationImport-CEJdhE_d.js → AutomationImport-Dp_hT6hQ.js} +2 -2
  6. package/dist/interface/assets/AutomationStore-BKR7GXMk.js +2 -0
  7. package/dist/interface/assets/{AutomationStoreDetail-BenRMMtV.js → AutomationStoreDetail-B9yh51WQ.js} +2 -2
  8. package/dist/interface/assets/Automations-BdZZW2eN.js +2 -0
  9. package/dist/interface/assets/Camera-Ct7ndOxr.js +2 -0
  10. package/dist/interface/assets/{CameraConsole-D24yXOQn.js → CameraConsole-BI93OaRt.js} +2 -2
  11. package/dist/interface/assets/Cameras-Ctub8sVt.js +651 -0
  12. package/dist/interface/assets/Camview-BjQdTHNh.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-26LAL4MY.js → CertificateUpload-xW55NA1Q.js} +1 -1
  14. package/dist/interface/assets/Config-CBTbYd5v.js +2 -0
  15. package/dist/interface/assets/{ConfigActionAssistant-Cl_kr3hp.js → ConfigActionAssistant-B488rOp5.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionCameraControl-CL4vXcNe.js → ConfigActionCameraControl-ZMUuBxOs.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionDelay-DtPgmqWh.js → ConfigActionDelay-BJ11xvOW.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionHttp-DnkZTP5l.js → ConfigActionHttp-DOUo69OR.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionImageInput-3svn6YP9.js → ConfigActionImageInput-BMzuVZW9.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionMqtt-BTsFTLgm.js → ConfigActionMqtt-Co_uksca.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionNotification-Cr4xJrZp.js → ConfigActionNotification-CcZkstYx.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionNotificationControl-Cxkb_g8p.js → ConfigActionNotificationControl--VeucoTw.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionOutput-WTr7FGf_.js → ConfigActionOutput-CyDa1LGA.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionPlugin-BpcJepbD.js → ConfigActionPlugin-Kfg3ZEQF.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSensor-BgD_F-hD.js → ConfigActionSensor-DhAF0HPw.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionSnapshot-DjR-Z08N.js → ConfigActionSnapshot-zMe3SPvW.js} +1 -1
  27. package/dist/interface/assets/{ConfigActionVariable-gPuPbjpm.js → ConfigActionVariable-BE5q3NwY.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionIfElse-CUHKJmPx.js → ConfigConditionIfElse-BNIRtSVD.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSensorState-D-gPRqMu.js → ConfigConditionSensorState-DTNd-SzI.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionSwitch-BRf1T5tJ.js → ConfigConditionSwitch-BU5wWMU1.js} +1 -1
  31. package/dist/interface/assets/{ConfigConditionTime-BC0n6sWO.js → ConfigConditionTime-KXTCIVIV.js} +1 -1
  32. package/dist/interface/assets/{ConfigSensorValueInput-BUHapx4M.js → ConfigSensorValueInput-BC1FpMm-.js} +1 -1
  33. package/dist/interface/assets/{ConfigTriggerDetection-Byd6SLGg.js → ConfigTriggerDetection-hIN1hi53.js} +1 -1
  34. package/dist/interface/assets/ConfigTriggerGeofence-Bl2ZacbY.js +1 -0
  35. package/dist/interface/assets/{ConfigTriggerManual-B2dWcFrl.js → ConfigTriggerManual-C5vwxS-e.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerMqtt-B_aUDBu4.js → ConfigTriggerMqtt-B4PtWC3E.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSchedule-DAZo1PLj.js → ConfigTriggerSchedule-BZzUdGBa.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSensor-BCqAiPu4.js → ConfigTriggerSensor-D18nwMsj.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerSystem-DuBydCiq.js → ConfigTriggerSystem-BhygWLB4.js} +1 -1
  40. package/dist/interface/assets/{ConfigTriggerWebhook-DDsnpwJr.js → ConfigTriggerWebhook-yyuBuhLD.js} +1 -1
  41. package/dist/interface/assets/Console-Cfk9MA9m.js +1 -0
  42. package/dist/interface/assets/CuiAssistantConversation-BHK_i56I.js +5 -0
  43. package/dist/interface/assets/CuiAssistantConversation-lkpZg3ML.css +1 -0
  44. package/dist/interface/assets/{CuiAutomationRunsDialog-C_sMg7E1.js → CuiAutomationRunsDialog-B0ohEHw0.js} +1 -1
  45. package/dist/interface/assets/{CuiBottomSheet-D_0LrjA_.js → CuiBottomSheet-DWefGWK2.js} +1 -1
  46. package/dist/interface/assets/CuiBottomSheet-NgX7VFao.js +1 -0
  47. package/dist/interface/assets/CuiCameraPipCard-C2qaGJlH.js +1 -0
  48. package/dist/interface/assets/CuiCameraRecordings-BTD-CQAg.js +1 -0
  49. package/dist/interface/assets/{CuiCameraShares-BIUB1xMa.js → CuiCameraShares-DcqOcePX.js} +1 -1
  50. package/dist/interface/assets/{CuiCameraTable-D-UhqHk4.js → CuiCameraTable-BOkfp_5M.js} +2 -2
  51. package/dist/interface/assets/CuiCameraTable-KPk46Xcl.js +1 -0
  52. package/dist/interface/assets/{CuiChartTable-CSK4Mzn3.js → CuiChartTable-DP38uBwK.js} +1 -1
  53. package/dist/interface/assets/{CuiConsole-DAbJXJBq.js → CuiConsole-C7xE_nQg.js} +2 -2
  54. package/dist/interface/assets/{CuiDataTable-DgcJsG-K.js → CuiDataTable-CsqH-RB1.js} +1 -1
  55. package/dist/interface/assets/CuiLightControl-ChGYpQAK.js +1 -0
  56. package/dist/interface/assets/{CuiLightControl-DFrZm_sv.css → CuiLightControl-D9sm8NZb.css} +1 -1
  57. package/dist/interface/assets/{CuiList-HdsA9vV1.js → CuiList-DJp0__mV.js} +1 -1
  58. package/dist/interface/assets/CuiPluginCard-CWImTZ6l.js +2 -0
  59. package/dist/interface/assets/{CuiPluginCategoryChip-C7R1jP7r.js → CuiPluginCategoryChip-Ch_upS6Y.js} +1 -1
  60. package/dist/interface/assets/{CuiPluginOAuthButton-BJJw0IaC.js → CuiPluginOAuthButton-DEQ9xILN.js} +2 -2
  61. package/dist/interface/assets/{CuiPluginTrustBadge-Bmm1qYdC.js → CuiPluginTrustBadge-sVWdvHcM.js} +1 -1
  62. package/dist/interface/assets/{CuiQRCode-DTSEFMBt.js → CuiQRCode-DqSF4SkD.js} +1 -1
  63. package/dist/interface/assets/CuiSchema-ytExUVhI.js +1 -0
  64. package/dist/interface/assets/CuiTopNavbarItem-B_KWykgq.js +1 -0
  65. package/dist/interface/assets/Faces-Cb6XMxDC.js +1 -0
  66. package/dist/interface/assets/FirstSteps-QNYTkEJo.js +1 -0
  67. package/dist/interface/assets/Floorplan-DbqADtN1.js +1 -0
  68. package/dist/interface/assets/Instances-DrMzPD65.js +1 -0
  69. package/dist/interface/assets/{Logs-BjcfuMQV.js → Logs-BSPT80vP.js} +2 -2
  70. package/dist/interface/assets/{Menu-BjjnSgdP.js → Menu-HHtuhIS2.js} +1 -1
  71. package/dist/interface/assets/Metrics-CqhUnVRA.js +12 -0
  72. package/dist/interface/assets/{OAuthDeviceFlow-9v-Czy_u.js → OAuthDeviceFlow-Bn1nlWNa.js} +1 -1
  73. package/dist/interface/assets/Plugin-DyOg_fbg.js +1 -0
  74. package/dist/interface/assets/{PluginConsole-C7sO42RG.js → PluginConsole-Cv-uhnPY.js} +2 -2
  75. package/dist/interface/assets/PluginDetail-cpOz7FkA.js +2 -0
  76. package/dist/interface/assets/{PluginSchema-D0eL9H-b.js → PluginSchema-DW3TGeTM.js} +1 -1
  77. package/dist/interface/assets/PluginSearch-BgecD9Ob.js +2 -0
  78. package/dist/interface/assets/PluginSearch-C8xHKikH.js +1 -0
  79. package/dist/interface/assets/{PluginUpdateProgress--MM9D8hs.js → PluginUpdateProgress-n6q6vzyd.js} +1 -1
  80. package/dist/interface/assets/Plugins-CuujWEtM.js +1 -0
  81. package/dist/interface/assets/{RecentEventsFilter-CvIJS8Se.js → RecentEventsFilter-CTR5JK_P.js} +1 -1
  82. package/dist/interface/assets/Recordings-ths9khZr.js +1 -0
  83. package/dist/interface/assets/SensorEdit-BzoIH7QC.js +1 -0
  84. package/dist/interface/assets/{SensorHistory-Efw0bZ-X.js → SensorHistory-9CdOpCPs.js} +1 -1
  85. package/dist/interface/assets/Sensors-CK5uExfU.js +2 -0
  86. package/dist/interface/assets/Settings-DN5hFtw_.js +1 -0
  87. package/dist/interface/assets/SettingsAccount-BCrmon5O.js +1 -0
  88. package/dist/interface/assets/SettingsAccount-CSy1BAIH.js +1 -0
  89. package/dist/interface/assets/{SettingsAccount-si-6gWl5.css → SettingsAccount-CY8YE_cy.css} +1 -1
  90. package/dist/interface/assets/SettingsAppearance-BY1xQMx4.js +1 -0
  91. package/dist/interface/assets/SettingsAppearance-h_XPZfQl.js +1 -0
  92. package/dist/interface/assets/SettingsAssistant-D8FmVbUL.js +1 -0
  93. package/dist/interface/assets/{SettingsBackup-BqKBKis5.js → SettingsBackup-D_weokqu.js} +1 -1
  94. package/dist/interface/assets/{SettingsList-BU191rmt.js → SettingsList-Bq24WTDU.js} +1 -1
  95. package/dist/interface/assets/SettingsMqtt-DCkLIYpF.js +1 -0
  96. package/dist/interface/assets/SettingsNotifications-8TZOUxg2.js +1 -0
  97. package/dist/interface/assets/{SettingsPermissions-sI64FPZG.js → SettingsPermissions-M8u_jrN0.js} +1 -1
  98. package/dist/interface/assets/{SettingsRecordings-CghrKErw.js → SettingsRecordings-C1Kp5xW_.js} +1 -1
  99. package/dist/interface/assets/SettingsRemote-DXlQKwlT.js +2 -0
  100. package/dist/interface/assets/{SettingsSystem-DP1p1Xns.js → SettingsSystem-Cetu2faJ.js} +2 -2
  101. package/dist/interface/assets/{SettingsUsers-Dpej-he1.js → SettingsUsers-CDwtQLdV.js} +1 -1
  102. package/dist/interface/assets/{Terminal-DPRPXCSt.js → Terminal-Dl-aAZME.js} +2 -2
  103. package/dist/interface/assets/{Training-Dwf5rXyC.css → Training-B1oQjAr8.css} +1 -1
  104. package/dist/interface/assets/Training-DdZjXgt1.js +1 -0
  105. package/dist/interface/assets/{Updates-QTvCp1aS.js → Updates-CkB1lXuo.js} +1 -1
  106. package/dist/interface/assets/{VariableInput-DhusSZPw.js → VariableInput-BxPj5wo6.js} +1 -1
  107. package/dist/interface/assets/{VariableSuggestions-Bkzz4Mv3.js → VariableSuggestions-CbizvAkz.js} +1 -1
  108. package/dist/interface/assets/{VersionsHandler-DjNSpSYy.js → VersionsHandler-CePyEUVO.js} +2 -2
  109. package/dist/interface/assets/{VirtualSensorCreate-soGT6h2c.js → VirtualSensorCreate-D_GVoeL7.js} +1 -1
  110. package/dist/interface/assets/Workers-7yiebNkl.js +2 -0
  111. package/dist/interface/assets/api-DK2Bav9D.js +4 -0
  112. package/dist/interface/assets/api-DTCqDA-h.css +2 -0
  113. package/dist/interface/assets/{api-CK2tonlH.js → api-DW2niHRN.js} +1 -1
  114. package/dist/interface/assets/{assistant-BEe1ExZL.js → assistant-BJ6xKcw_.js} +1 -1
  115. package/dist/interface/assets/{auth-QEpUGkWd.js → auth-Dc8bUpc-.js} +1 -1
  116. package/dist/interface/assets/{automations-BBIBV4Uu.js → automations-DXrjbArj.js} +1 -1
  117. package/dist/interface/assets/{cameraSources-Cm18cW9L.js → cameraSources-QJfUDOQJ.js} +1 -1
  118. package/dist/interface/assets/cloudHandoff-DtlquYGZ.js +1 -0
  119. package/dist/interface/assets/{config-vwkU8aqP.js → config-CiQDwB4t.js} +1 -1
  120. package/dist/interface/assets/{flowSchema-rzBroL0H.js → flowSchema-BRTZHQ1w.js} +1 -1
  121. package/dist/interface/assets/{intercomService-Du8V_HxF.js → intercomService-BnA-FQ0Q.js} +1 -1
  122. package/dist/interface/assets/{main-XHFrBKKz.css → main-BoGhBedC.css} +1 -1
  123. package/dist/interface/assets/main-D74mRIxc.js +3 -0
  124. package/dist/interface/assets/mqtt-iD9XHYO_.js +1 -0
  125. package/dist/interface/assets/{notifications-CN6eTJb_.js → notifications-CbAJX7RF.js} +1 -1
  126. package/dist/interface/assets/{plugins-DKtX7zQp.js → plugins-eIUrXNeM.js} +1 -1
  127. package/dist/interface/assets/rooms-BqPyo8jc.js +1 -0
  128. package/dist/interface/assets/{sensorIcons-ztqlMLDc.js → sensorIcons-DQVgryYP.js} +1 -1
  129. package/dist/interface/assets/{sensorSlots-D-uxjuv3.js → sensorSlots-BZCXtnb6.js} +1 -1
  130. package/dist/interface/assets/{sensors-DV2Z0IJt.js → sensors-DttBNEEt.js} +1 -1
  131. package/dist/interface/assets/{server-CfZnIVzn.js → server-DUFhf2c_.js} +1 -1
  132. package/dist/interface/assets/{theme-Bi7qdjBK.js → theme-BMmjtQ4w.js} +1 -1
  133. package/dist/interface/assets/{types-CNLAvgyw.js → types-5rE8Tz0_.js} +1 -1
  134. package/dist/interface/assets/{types-DwbeYXvn.js → types-CXw7CEzu.js} +1 -1
  135. package/dist/interface/assets/{types-DuwD8xp5.js → types-DWTSNJ79.js} +1 -1
  136. package/dist/interface/assets/ungrouped-D56FGIrg.js +1 -0
  137. package/dist/interface/assets/ungrouped-DHMJ9Rg1.css +1 -0
  138. package/dist/interface/assets/{updates-BqCH6Vr8.js → updates-TIPWXKzL.js} +1 -1
  139. package/dist/interface/assets/{useAppVersion-B-rmq3Bb.js → useAppVersion-BIz44Bg4.js} +1 -1
  140. package/dist/interface/assets/{useAssistantActions-Kf-5ijVf.js → useAssistantActions-CLkkw9kB.js} +1 -1
  141. package/dist/interface/assets/useBackupRestore-Crfd592q.js +1 -0
  142. package/dist/interface/assets/{useCameraOptions-Dt2J8sP_.js → useCameraOptions-A97teAIr.js} +1 -1
  143. package/dist/interface/assets/{useKeyboardInset-DtD3I2WC.js → useKeyboardInset-DXVi1dLG.js} +1 -1
  144. package/dist/interface/assets/{useLogsSocket-CEhUQdiY.js → useLogsSocket-BlFxVXjF.js} +1 -1
  145. package/dist/interface/assets/{useNavLayout-CtpYjS5W.js → useNavLayout-C5obaCNv.js} +1 -1
  146. package/dist/interface/assets/{usePermissions-CJzuagwD.js → usePermissions-C8hB_pG1.js} +1 -1
  147. package/dist/interface/assets/{usePluginUpdates-BwoWN5yb.js → usePluginUpdates-DO0-Gk4Q.js} +1 -1
  148. package/dist/interface/assets/{usePushRegistration-ANx4BS6_.js → usePushRegistration-BUttCraQ.js} +1 -1
  149. package/dist/interface/assets/{useServerRestart-7edyD8M0.js → useServerRestart-Cz9eVHUE.js} +1 -1
  150. package/dist/interface/assets/{useStreamStatus-DCSWHdbW.js → useStreamStatus-BhS_MCCB.js} +1 -1
  151. package/dist/interface/assets/{useTabSwipe-DfS3R3uP.js → useTabSwipe-D4k8lm1M.js} +1 -1
  152. package/dist/interface/assets/{useUpdateChannel-Cr9mSIRC.js → useUpdateChannel-D9lhfW0y.js} +1 -1
  153. package/dist/interface/assets/{useUpdatesSocket-B5Rm9syb.js → useUpdatesSocket-DnH9sON5.js} +1 -1
  154. package/dist/interface/assets/{useUserOptions-CJjImz8V.js → useUserOptions-BTRBUuE2.js} +1 -1
  155. package/dist/interface/assets/{vendor-cameraui-BbGOMenD.js → vendor-cameraui-QXD8jkcj.js} +26 -26
  156. package/dist/interface/assets/{vendor-core-tgH2YubJ.js → vendor-core-CnhnyKDl.js} +1 -1
  157. package/dist/interface/assets/{vendor-primevue-DNJJiEZl.js → vendor-primevue-CCUqY55W.js} +207 -207
  158. package/dist/interface/ha/{404-Dl6JtQWv.js → 404-DLhJqxRl.js} +1 -1
  159. package/dist/interface/ha/{About-wjv4kCO3.js → About-DC0i1iE4.js} +3 -3
  160. package/dist/interface/ha/{Assistant-Dpb4IsDC.js → Assistant-BmazMPIg.js} +821 -825
  161. package/dist/interface/ha/{Automation-CqTPjCUh.js → Automation-gabF9YzQ.js} +336 -336
  162. package/dist/interface/ha/{AutomationImport-CvdeneoU.js → AutomationImport-DaqZNs9s.js} +8 -8
  163. package/dist/interface/ha/{AutomationStore-bVPE68io.js → AutomationStore-DzM4huo5.js} +54 -54
  164. package/dist/interface/ha/{AutomationStoreDetail-BYaNUjoH.js → AutomationStoreDetail-CpzQMt_D.js} +7 -7
  165. package/dist/interface/ha/{Automations-BfsYh2A_.js → Automations-Dcm4Us50.js} +81 -81
  166. package/dist/interface/ha/{Camera-C70onr_O.js → Camera-CNK3QR7l.js} +198 -198
  167. package/dist/interface/ha/{CameraConsole-Dg3lV-wq.js → CameraConsole-CpcF0411.js} +5 -5
  168. package/dist/interface/ha/{Cameras-DpM6gt3G.js → Cameras-Cf9rwRyf.js} +293 -294
  169. package/dist/interface/ha/{Camview-CO_bHntH.js → Camview-BFKR2t6C.js} +87 -87
  170. package/dist/interface/ha/{Config-D-cpocuH.js → Config-1XH3zfr2.js} +11 -11
  171. package/dist/interface/ha/{ConfigActionAssistant-DVVVfVvT.js → ConfigActionAssistant-C0-NFoTB.js} +5 -5
  172. package/dist/interface/ha/{ConfigActionCameraControl-BPpzE9-F.js → ConfigActionCameraControl-DNSKZPSZ.js} +5 -5
  173. package/dist/interface/ha/{ConfigActionDelay-zU6H75hY.js → ConfigActionDelay-iZ3lPGzw.js} +1 -1
  174. package/dist/interface/ha/{ConfigActionHttp-BsNy03j4.js → ConfigActionHttp-DVJAcGkl.js} +3 -3
  175. package/dist/interface/ha/{ConfigActionImageInput-JUvNYn0w.js → ConfigActionImageInput-VVbHHHZs.js} +3 -3
  176. package/dist/interface/ha/{ConfigActionMqtt-PZqAKfTo.js → ConfigActionMqtt-N5OUJDzM.js} +4 -4
  177. package/dist/interface/ha/{ConfigActionNotification-DIL7abEm.js → ConfigActionNotification-s142tQoU.js} +6 -6
  178. package/dist/interface/ha/{ConfigActionNotificationControl-BQ2w5yeg.js → ConfigActionNotificationControl-Dh7kaKVP.js} +3 -3
  179. package/dist/interface/ha/{ConfigActionOutput-DVilKhPV.js → ConfigActionOutput-B4HHTg5C.js} +1 -1
  180. package/dist/interface/ha/{ConfigActionPlugin-BUfTEJQ_.js → ConfigActionPlugin-D20G2Dqf.js} +5 -5
  181. package/dist/interface/ha/{ConfigActionSensor-Dzp16VyX.js → ConfigActionSensor-BS3jrFaG.js} +6 -6
  182. package/dist/interface/ha/{ConfigActionSnapshot-CRjD5AMC.js → ConfigActionSnapshot-CInLAcwK.js} +3 -3
  183. package/dist/interface/ha/{ConfigActionVariable-CR8g7gEh.js → ConfigActionVariable-C5vADGNF.js} +2 -2
  184. package/dist/interface/ha/{ConfigConditionIfElse-CHoSgzXF.js → ConfigConditionIfElse-CPeWDD31.js} +4 -4
  185. package/dist/interface/ha/{ConfigConditionSensorState-Dn8_OhQe.js → ConfigConditionSensorState-BM5GmpN6.js} +6 -6
  186. package/dist/interface/ha/{ConfigConditionSwitch-Ds-nqWeU.js → ConfigConditionSwitch-Dmz9FduJ.js} +4 -4
  187. package/dist/interface/ha/{ConfigConditionTime-DWNfEluj.js → ConfigConditionTime-DF6llIJq.js} +2 -2
  188. package/dist/interface/ha/{ConfigSensorValueInput-DwXM9wP1.js → ConfigSensorValueInput-Ch5njvtv.js} +7 -7
  189. package/dist/interface/ha/{ConfigTriggerDetection-D37OkR_u.js → ConfigTriggerDetection-BR2QWNyO.js} +5 -5
  190. package/dist/interface/ha/{ConfigTriggerGeofence-EbXy_y3Q.js → ConfigTriggerGeofence-CaImOjyW.js} +9 -9
  191. package/dist/interface/ha/{ConfigTriggerMqtt-BX6uNEZy.js → ConfigTriggerMqtt-DWz1XwZQ.js} +2 -2
  192. package/dist/interface/ha/{ConfigTriggerSensor-BFGEtBVF.js → ConfigTriggerSensor-lfnhz0im.js} +3 -3
  193. package/dist/interface/ha/{ConfigTriggerSystem-fRnAgUGR.js → ConfigTriggerSystem-CwUhyFAj.js} +3 -3
  194. package/dist/interface/ha/{ConfigTriggerWebhook-DegifRdj.js → ConfigTriggerWebhook-J6Xts7GQ.js} +2 -2
  195. package/dist/interface/ha/{Console-Bo6S5psN.js → Console-BSdKFm6Y.js} +8 -8
  196. package/dist/interface/ha/{CuiAutomationRunsDialog-DXpNJqDE.js → CuiAutomationRunsDialog-BU8sympp.js} +3 -3
  197. package/dist/interface/ha/{CuiBottomSheet-DLkC2OmT.js → CuiBottomSheet-Bnp7ta7V.js} +1 -1
  198. package/dist/interface/ha/{CuiCameraRecordings-9tdkxXiT.js → CuiCameraRecordings-E-mMqKSs.js} +18 -19
  199. package/dist/interface/ha/{CuiCameraShares-BbqY_2b7.js → CuiCameraShares-DcNwd2OC.js} +8 -8
  200. package/dist/interface/ha/{CuiCameraTable-BmH1yAgl.js → CuiCameraTable-DNW9Vm_A.js} +6 -6
  201. package/dist/interface/ha/{CuiChartTable-BjBBI7Fo.js → CuiChartTable-muC7jL2H.js} +6 -6
  202. package/dist/interface/ha/{CuiConsole-By3m4UbE.js → CuiConsole-ND8bcuTg.js} +2 -2
  203. package/dist/interface/ha/{CuiDataTable-C_ndu5My.js → CuiDataTable-CN4T8DgP.js} +13 -13
  204. package/dist/interface/ha/{CuiPluginCard-BLQ1galy.js → CuiPluginCard-nIQiyQvH.js} +31 -31
  205. package/dist/interface/ha/{CuiPluginOAuthButton-BDghklSy.js → CuiPluginOAuthButton-FJ49NfUh.js} +3 -3
  206. package/dist/interface/ha/{CuiPluginTrustBadge-DolANNao.js → CuiPluginTrustBadge-D6eanMyI.js} +2 -2
  207. package/dist/interface/ha/{CuiQRCode-CcjPngXI.js → CuiQRCode-BdJzeeoE.js} +2 -2
  208. package/dist/interface/ha/{CuiSchema-D9JFf0dp.js → CuiSchema-DY0V-8xP.js} +67 -67
  209. package/dist/interface/ha/{CuiTopNavbarItem-DcUEq-4e.js → CuiTopNavbarItem-DT5pAKHp.js} +7 -8
  210. package/dist/interface/ha/{Faces-DjXHzr77.js → Faces-C_svyTrr.js} +92 -92
  211. package/dist/interface/ha/{FirstSteps-CQAP9Siw.js → FirstSteps-yS2M2cor.js} +9 -9
  212. package/dist/interface/ha/{Floorplan-DyaPzlQO.js → Floorplan-DSOeScjI.js} +194 -194
  213. package/dist/interface/ha/{Instances-DWjaU5gj.js → Instances-B4h5EKpF.js} +20 -20
  214. package/dist/interface/ha/{Logs-Dlx-X1NS.js → Logs-BH0Lxvs6.js} +12 -12
  215. package/dist/interface/ha/{Menu-iqEe01qO.js → Menu-COH7QXuE.js} +13 -13
  216. package/dist/interface/ha/{Metrics-Br2Dyvzh.js → Metrics-BtnRqL_I.js} +136 -136
  217. package/dist/interface/ha/{OAuthDeviceFlow-CIGk92FD.js → OAuthDeviceFlow-D2QJ9MnP.js} +8 -8
  218. package/dist/interface/ha/{Plugin-DklIr7j2.js → Plugin-EfUSqwyh.js} +85 -85
  219. package/dist/interface/ha/{PluginConsole-DCfxPtGU.js → PluginConsole-hh_o15f7.js} +4 -4
  220. package/dist/interface/ha/PluginDetail-DFiXGkrY.js +805 -0
  221. package/dist/interface/ha/{PluginSearch-BTKBnjxb.js → PluginSearch-Cdrfubrj.js} +54 -54
  222. package/dist/interface/ha/{PluginUpdateProgress-Dej5AcCt.js → PluginUpdateProgress-BD2g2kVj.js} +3 -3
  223. package/dist/interface/ha/{Plugins-C2fONspm.js → Plugins-qFiHW-Nk.js} +45 -45
  224. package/dist/interface/ha/{RecentEventsFilter-ylgjiDo8.js → RecentEventsFilter-UWrXnvfq.js} +1 -1
  225. package/dist/interface/ha/{Recordings-w39I43cc.js → Recordings-BzeC6tOz.js} +437 -419
  226. package/dist/interface/ha/{SensorEdit-BkKi1l-A.js → SensorEdit-BSgy7lkZ.js} +360 -360
  227. package/dist/interface/ha/{SensorHistory-BGJjMlc3.js → SensorHistory-IDvP8LKH.js} +2 -2
  228. package/dist/interface/ha/{Sensors-D_Wi9XPa.js → Sensors-Diqp4oZ0.js} +96 -97
  229. package/dist/interface/ha/{Settings-Bn7WLWf0.js → Settings-BgDsxAlx.js} +11 -11
  230. package/dist/interface/ha/{SettingsAccount-CRTex-1j.js → SettingsAccount-DBXMQPYk.js} +159 -159
  231. package/dist/interface/ha/{SettingsAppearance-B1qmJnYk.js → SettingsAppearance-VmbjnT3o.js} +6 -6
  232. package/dist/interface/ha/{SettingsAssistant-DDd1X0BC.js → SettingsAssistant-C2R4ZetE.js} +133 -133
  233. package/dist/interface/ha/{SettingsBackup-DZbhSB13.js → SettingsBackup-BqY9TwYn.js} +20 -20
  234. package/dist/interface/ha/{SettingsList-BQdyPe0H.js → SettingsList-CzHcfo2N.js} +4 -4
  235. package/dist/interface/ha/{SettingsMqtt-CSZcY6ht.js → SettingsMqtt-DqV3h3Ow.js} +149 -149
  236. package/dist/interface/ha/{SettingsNotifications-CfEhl0-y.js → SettingsNotifications-yn5fIR_7.js} +6 -6
  237. package/dist/interface/ha/{SettingsRecordings-BnAGDvcH.js → SettingsRecordings-DDs1lyfY.js} +8 -8
  238. package/dist/interface/ha/{SettingsRemote-w86TQVUA.js → SettingsRemote-jBw3l5E0.js} +172 -172
  239. package/dist/interface/ha/{SettingsSystem-CENjHL3k.js → SettingsSystem-BOv9hNlk.js} +9 -9
  240. package/dist/interface/ha/{SettingsUsers-CqSHRklV.js → SettingsUsers-Biv-2F4C.js} +90 -90
  241. package/dist/interface/ha/{Terminal-WsuxG3k-.js → Terminal-CmcrGEV0.js} +4 -4
  242. package/dist/interface/ha/Training-BEzPiXZg.js +1512 -0
  243. package/dist/interface/ha/{Updates-Dl_lLLR2.js → Updates-DJAcmDQJ.js} +12 -12
  244. package/dist/interface/ha/{VariableInput-C8Q81GUt.js → VariableInput-DlYg7t0m.js} +2 -2
  245. package/dist/interface/ha/{VersionsHandler-BOvjesvp.js → VersionsHandler-UnrAWn-b.js} +11 -11
  246. package/dist/interface/ha/{VirtualSensorCreate-sgwATaky.js → VirtualSensorCreate-CssxeaCC.js} +2 -2
  247. package/dist/interface/ha/{Workers-CkDuQ9NG.js → Workers-CLpqLugC.js} +14 -14
  248. package/dist/interface/ha/{accordion-Xem2SzgR.js → accordion-BylV-jUK.js} +2 -2
  249. package/dist/interface/ha/{api-BmYisoxj.js → api-BP7mlzjP.js} +11181 -11736
  250. package/dist/interface/ha/{api-oqpIZTkx.js → api-B_tDa73J.js} +1 -1
  251. package/dist/interface/ha/{assistant-0jE4C19U.js → assistant-Cb6ACguQ.js} +1 -1
  252. package/dist/interface/ha/{auth-B4Msg7R-.js → auth-DOYDRgFm.js} +1 -1
  253. package/dist/interface/ha/{autocomplete-B94Amei3.js → autocomplete-Cp3u2Ywa.js} +4 -4
  254. package/dist/interface/ha/{automationBlueprint-C-12Yjl7.js → automationBlueprint-CbbG_ku4.js} +1 -1
  255. package/dist/interface/ha/cameraui-cards.js +1 -1
  256. package/dist/interface/ha/{cards-BrOcoiQJ.js → cards-BpBP1zVW.js} +1206 -1198
  257. package/dist/interface/ha/{config-IG56wp6m.js → config-DroY1HBs.js} +1 -1
  258. package/dist/interface/ha/{datepicker-B4Azs5zr.js → datepicker-DXk97lTw.js} +4 -4
  259. package/dist/interface/ha/{mqtt-pl13wSmG.js → mqtt-NJTVdd53.js} +1 -1
  260. package/dist/interface/ha/{multiselect-Dp4XDBRR.js → multiselect-BOb4ScAZ.js} +4 -4
  261. package/dist/interface/ha/{notifications-B6wxSmou.js → notifications-BPTvvgvv.js} +1 -1
  262. package/dist/interface/ha/{plugins-BwwaWxye.js → plugins-B29K3nQP.js} +1 -1
  263. package/dist/interface/ha/{rooms-NIzjFYAd.js → rooms-DLw0WUy_.js} +1 -1
  264. package/dist/interface/ha/{select-UR3ZRDew.js → select-DV7p2EDj.js} +4 -4
  265. package/dist/interface/ha/{server-YOLwDVAW.js → server-B4b5_Ecu.js} +1 -1
  266. package/dist/interface/ha/{speeddial-LCbl5g8p.js → speeddial-B5p0fuqL.js} +1 -1
  267. package/dist/interface/ha/{tooltip-Z7VN-E1u.js → tooltip-BDrlgLof.js} +1 -1
  268. package/dist/interface/ha/{types-B8B9MqK0.js → types-DJHHL7nn.js} +1 -1
  269. package/dist/interface/ha/{ungrouped-DttNEB62.js → ungrouped-xyK1QrsM.js} +344 -376
  270. package/dist/interface/ha/{updates-DVhiQhMM.js → updates-XFSu9Tfm.js} +5 -5
  271. package/dist/interface/ha/{useAppVersion-CG4D44Aa.js → useAppVersion-BH3rU1zz.js} +1 -1
  272. package/dist/interface/ha/{useLogsSocket-PKsRDttg.js → useLogsSocket-CaTRzvgU.js} +1 -1
  273. package/dist/interface/ha/{useNavLayout-DoEcPx9Z.js → useNavLayout-DV0_OQx0.js} +1 -1
  274. package/dist/interface/ha/{useServerRestart-CMl589qX.js → useServerRestart-C8tynLUf.js} +1 -1
  275. package/dist/interface/ha/{useTabSwipe-Cmqdn0J5.js → useTabSwipe-CFoLDp3j.js} +1 -1
  276. package/dist/interface/ha/{useUpdateChannel-BBW2EX7N.js → useUpdateChannel-DSG2RTPe.js} +2 -2
  277. package/dist/interface/ha/{useUpdatesSocket-B6ICpKKC.js → useUpdatesSocket-CSQ0g7-6.js} +1 -1
  278. package/dist/interface/ha/{useUserOptions-CzclRfar.js → useUserOptions-CFaCy6L1.js} +1 -1
  279. package/dist/interface/ha/{virtualscroller-C5j7FXj4.js → virtualscroller-B-UQZDMJ.js} +88 -88
  280. package/dist/interface/index.html +34 -34
  281. package/dist/interface/sw.js +1 -1
  282. package/dist/server/package.json +22 -20
  283. package/dist/server/requirements.txt +1 -1
  284. package/dist/server/src/api/controllers/auth.controller.js +5 -6
  285. package/dist/server/src/api/controllers/auth.controller.js.map +1 -1
  286. package/dist/server/src/api/controllers/plugins.controller.js +5 -5
  287. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  288. package/dist/server/src/api/database/checks.js +20 -8
  289. package/dist/server/src/api/database/checks.js.map +1 -1
  290. package/dist/server/src/api/database/selfcheck.js +2 -2
  291. package/dist/server/src/api/database/selfcheck.js.map +1 -1
  292. package/dist/server/src/api/index.js +8 -6
  293. package/dist/server/src/api/index.js.map +1 -1
  294. package/dist/server/src/api/plugins/logger.plugin.js +11 -11
  295. package/dist/server/src/api/plugins/logger.plugin.js.map +1 -1
  296. package/dist/server/src/api/services/twoFactor.service.d.ts +4 -5
  297. package/dist/server/src/api/services/twoFactor.service.js +16 -17
  298. package/dist/server/src/api/services/twoFactor.service.js.map +1 -1
  299. package/dist/server/src/api/types/index.d.ts +0 -1
  300. package/dist/server/src/api/utils/cert.js +128 -135
  301. package/dist/server/src/api/utils/cert.js.map +1 -1
  302. package/dist/server/src/api/utils/form-body.d.ts +2 -0
  303. package/dist/server/src/api/utils/form-body.js +22 -0
  304. package/dist/server/src/api/utils/form-body.js.map +1 -0
  305. package/dist/server/src/api/utils/install-logger.js +12 -12
  306. package/dist/server/src/api/utils/install-logger.js.map +1 -1
  307. package/dist/server/src/api/websocket/nsp/logs.d.ts +7 -3
  308. package/dist/server/src/api/websocket/nsp/logs.js +76 -62
  309. package/dist/server/src/api/websocket/nsp/logs.js.map +1 -1
  310. package/dist/server/src/assistant/history.d.ts +2 -0
  311. package/dist/server/src/assistant/history.js +46 -0
  312. package/dist/server/src/assistant/history.js.map +1 -0
  313. package/dist/server/src/assistant/manager.js +2 -1
  314. package/dist/server/src/assistant/manager.js.map +1 -1
  315. package/dist/server/src/camera/controller.d.ts +1 -0
  316. package/dist/server/src/camera/controller.js +23 -18
  317. package/dist/server/src/camera/controller.js.map +1 -1
  318. package/dist/server/src/camera/decoder/worker.d.ts +3 -0
  319. package/dist/server/src/camera/decoder/worker.js +42 -5
  320. package/dist/server/src/camera/decoder/worker.js.map +1 -1
  321. package/dist/server/src/go2rtc/index.js +2 -2
  322. package/dist/server/src/go2rtc/index.js.map +1 -1
  323. package/dist/server/src/main.js +5 -5
  324. package/dist/server/src/main.js.map +1 -1
  325. package/dist/server/src/manager/discoveryManager.js +2 -2
  326. package/dist/server/src/manager/discoveryManager.js.map +1 -1
  327. package/dist/server/src/remote/services/cloudflare-managed.js +6 -3
  328. package/dist/server/src/remote/services/cloudflare-managed.js.map +1 -1
  329. package/dist/server/src/remote/services/cloudflare.d.ts +0 -1
  330. package/dist/server/src/remote/services/cloudflare.js +9 -20
  331. package/dist/server/src/remote/services/cloudflare.js.map +1 -1
  332. package/dist/server/src/remote/services/cloudflaredBinary.d.ts +3 -2
  333. package/dist/server/src/remote/services/cloudflaredBinary.js +9 -16
  334. package/dist/server/src/remote/services/cloudflaredBinary.js.map +1 -1
  335. package/dist/server/src/rpc/server.js +2 -2
  336. package/dist/server/src/rpc/server.js.map +1 -1
  337. package/dist/server/src/utils/automation-registry/index.js +3 -3
  338. package/dist/server/src/utils/automation-registry/index.js.map +1 -1
  339. package/dist/server/src/utils/colors.d.ts +2 -0
  340. package/dist/server/src/utils/colors.js +8 -0
  341. package/dist/server/src/utils/colors.js.map +1 -0
  342. package/dist/server/src/utils/npm/auth.d.ts +3 -2
  343. package/dist/server/src/utils/npm/auth.js +1 -1
  344. package/dist/server/src/utils/npm/auth.js.map +1 -1
  345. package/dist/server/src/utils/npm/index.d.ts +3 -15
  346. package/dist/server/src/utils/npm/index.js +26 -17
  347. package/dist/server/src/utils/npm/index.js.map +1 -1
  348. package/dist/server/src/utils/npm/registry.d.ts +69 -0
  349. package/dist/server/src/utils/npm/registry.js +240 -0
  350. package/dist/server/src/utils/npm/registry.js.map +1 -0
  351. package/dist/server/src/utils/plugin-registry/index.js +3 -3
  352. package/dist/server/src/utils/plugin-registry/index.js.map +1 -1
  353. package/dist/server/src/utils/process.d.ts +10 -0
  354. package/dist/server/src/utils/process.js +112 -0
  355. package/dist/server/src/utils/process.js.map +1 -0
  356. package/dist/server/src/utils/totp.d.ts +12 -0
  357. package/dist/server/src/utils/totp.js +71 -0
  358. package/dist/server/src/utils/totp.js.map +1 -0
  359. package/dist/server/src/utils/ttl-cache.d.ts +20 -0
  360. package/dist/server/src/utils/ttl-cache.js +63 -0
  361. package/dist/server/src/utils/ttl-cache.js.map +1 -0
  362. package/npm-shrinkwrap.json +6427 -0
  363. package/package.json +22 -20
  364. package/dist/interface/assets/Assistant-BKxssfw-.js +0 -1
  365. package/dist/interface/assets/Automation-CP59cgP7.js +0 -3
  366. package/dist/interface/assets/AutomationStore-BZGR_5Xl.js +0 -2
  367. package/dist/interface/assets/Automations-BpXorYAS.js +0 -2
  368. package/dist/interface/assets/Camera-UBUfaR5a.js +0 -2
  369. package/dist/interface/assets/Cameras-B21Y8MdQ.js +0 -651
  370. package/dist/interface/assets/Camview-BySyPtU5.js +0 -1
  371. package/dist/interface/assets/Config-BGyGmukb.js +0 -2
  372. package/dist/interface/assets/ConfigTriggerGeofence-CkzTFEZn.js +0 -1
  373. package/dist/interface/assets/Console-HXmKYaK_.js +0 -1
  374. package/dist/interface/assets/CuiAssistantConversation-2qrRCsgw.js +0 -5
  375. package/dist/interface/assets/CuiAssistantConversation-DmSdiv1b.css +0 -1
  376. package/dist/interface/assets/CuiBottomSheet-CTr-KHC8.js +0 -1
  377. package/dist/interface/assets/CuiCameraPipCard-BZCayhy_.js +0 -1
  378. package/dist/interface/assets/CuiCameraRecordings-BbaEL2ST.js +0 -1
  379. package/dist/interface/assets/CuiCameraTable-C5tQHs63.js +0 -1
  380. package/dist/interface/assets/CuiLightControl-v6k9hVGl.js +0 -1
  381. package/dist/interface/assets/CuiPluginCard-5MRYJcF2.js +0 -2
  382. package/dist/interface/assets/CuiSchema-BDXeXora.js +0 -1
  383. package/dist/interface/assets/CuiTopNavbarItem-BVknLbRO.js +0 -1
  384. package/dist/interface/assets/Faces-BEpYvbB0.js +0 -1
  385. package/dist/interface/assets/FirstSteps-U93RDOcP.js +0 -1
  386. package/dist/interface/assets/Floorplan-D8XoCNOB.js +0 -1
  387. package/dist/interface/assets/Instances-CFwZotvU.js +0 -1
  388. package/dist/interface/assets/Metrics-Ca_d5CbP.js +0 -12
  389. package/dist/interface/assets/Plugin-BjLw46Sw.js +0 -1
  390. package/dist/interface/assets/PluginDetail-BuLW4lkN.js +0 -2
  391. package/dist/interface/assets/PluginSearch--LLMEeyx.js +0 -2
  392. package/dist/interface/assets/PluginSearch-0akjE0ef.js +0 -1
  393. package/dist/interface/assets/Plugins-26O511gf.js +0 -1
  394. package/dist/interface/assets/Recordings-DQOGeSFm.js +0 -1
  395. package/dist/interface/assets/SensorEdit-DEW5D80x.js +0 -1
  396. package/dist/interface/assets/Sensors-C8yOyAwo.js +0 -2
  397. package/dist/interface/assets/Settings-B-RgMeVm.js +0 -1
  398. package/dist/interface/assets/SettingsAccount-B6aXFx3F.js +0 -1
  399. package/dist/interface/assets/SettingsAccount-_0ccrXYU.js +0 -1
  400. package/dist/interface/assets/SettingsAppearance-CkDwzx6f.js +0 -1
  401. package/dist/interface/assets/SettingsAppearance-DBFE3uVH.js +0 -1
  402. package/dist/interface/assets/SettingsAssistant-DN5OUJqt.js +0 -1
  403. package/dist/interface/assets/SettingsMqtt-hsKZkU-o.js +0 -1
  404. package/dist/interface/assets/SettingsNotifications-DIeiUEAk.js +0 -1
  405. package/dist/interface/assets/SettingsRemote-Doa0aBMC.js +0 -2
  406. package/dist/interface/assets/Training-DYlefOX1.js +0 -1
  407. package/dist/interface/assets/Workers-CUVvTuts.js +0 -2
  408. package/dist/interface/assets/api-B0wYDGQj.css +0 -2
  409. package/dist/interface/assets/api-BNrZVfeD.js +0 -4
  410. package/dist/interface/assets/cloudHandoff-Dnndt2el.js +0 -1
  411. package/dist/interface/assets/main-CRlC4FBY.js +0 -3
  412. package/dist/interface/assets/mqtt-BY6-Hrbv.js +0 -1
  413. package/dist/interface/assets/ring-resize-DyqCo2UN.js +0 -1
  414. package/dist/interface/assets/rooms-BHP4q6yf.js +0 -1
  415. package/dist/interface/assets/ungrouped-DBRZ-Ori.css +0 -1
  416. package/dist/interface/assets/ungrouped-DHLAmt__.js +0 -1
  417. package/dist/interface/assets/useBackupRestore-Dj-ZXODq.js +0 -1
  418. package/dist/interface/ha/PluginDetail-BFfRnkdG.js +0 -230
  419. package/dist/interface/ha/Training-hu_XOYBk.js +0 -1505
  420. package/dist/interface/ha/ring-resize-Dr2PxWIg.js +0 -16
@@ -1,1505 +0,0 @@
1
- import { m as e } from "./ripple-ZDATPc2w.js";
2
- import { D as t, G as n, H as r, I as i, Jt as a, St as o, Tt as s, Wt as c, Y as l, _t as u, d, f, ft as p, gt as m, kt as h, l as g, lt as _, ot as v, p as y, qt as b, r as x, rt as S, u as C, ut as w, v as T, x as E, xt as D, y as O, yt as k } from "./runtime-core.esm-bundler-_TfE0DWz.js";
3
- import { t as ee } from "./tooltip-Z7VN-E1u.js";
4
- import { t as te } from "./chevron-down-BNj8w2js.js";
5
- import { t as ne } from "./tag-mchuCAPR.js";
6
- import { B as re, Dt as ie, En as ae, Er as oe, Et as se, J as A, Or as ce, Ot as j, R as M, Ri as le, Tr as ue, V as de, W as fe, Zi as N, Zr as pe, ar as me, bi as he, c as ge, ca as P, d as _e, ht as F, m as ve, mn as ye, or as be, qt as I, st as xe, ui as L, vi as R, vr as z, xi as B, yr as Se, z as V } from "./api-BmYisoxj.js";
7
- import { S as Ce, _ as we, b as Te, i as Ee, w as De } from "./intercomService-B7HkLs6z.js";
8
- import { n as Oe } from "./vue-i18n-D5EAy78K.js";
9
- import { t as ke } from "./button-BouAFgf5.js";
10
- import { n as Ae, t as H } from "./inputicon-1w06U-Jl.js";
11
- import { t as je } from "./inputtext-C_ygnPrC.js";
12
- import { t as Me } from "./checkbox-CAKzZcqk.js";
13
- import { t as Ne } from "./close-CxFbonhd.js";
14
- import { t as Pe } from "./progressbar-CaUaM8Bt.js";
15
- import { t as Fe } from "./ring-resize-Dr2PxWIg.js";
16
- import { t as Ie } from "./search-BViwEHdF.js";
17
- import { n as Le, t as Re } from "./cloud-check-aaxn1VZr.js";
18
- import { t as ze } from "./trash-can-outline-CBwv40Ck.js";
19
- import { t as Be } from "./back-filled-CaxrZv0Q.js";
20
- import { t as Ve } from "./help-circle-outline-BniRuJRv.js";
21
- import { t as He } from "./settings-lWJfHaif.js";
22
- //#region ~icons/mdi/cloud-check-outline
23
- var U = {
24
- viewBox: "0 0 24 24",
25
- width: "1.2em",
26
- height: "1.2em"
27
- };
28
- function Ue(e, t) {
29
- return r(), y("svg", U, [...t[0] ||= [C("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 W = u({
35
- name: "mdi-cloud-check-outline",
36
- render: Ue
37
- }), We = {
38
- viewBox: "0 0 24 24",
39
- width: "1.2em",
40
- height: "1.2em"
41
- };
42
- function Ge(e, t) {
43
- return r(), y("svg", We, [...t[0] ||= [C("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 Ke = u({
49
- name: "mdi-cloud-upload-outline",
50
- render: Ge
51
- }), G = 200;
52
- async function K(e = {}, { signal: t } = {}) {
53
- return (await N.get("/training/candidates", {
54
- params: e,
55
- signal: t
56
- })).data;
57
- }
58
- async function q(e, t) {
59
- return (await N.patch(`/training/candidates/${e}`, t)).data;
60
- }
61
- async function J(e) {
62
- await N.delete(`/training/candidates/${e}`);
63
- }
64
- async function qe(e) {
65
- let t = 0;
66
- for (let n = 0; n < e.length; n += G) {
67
- let r = await N.post("/training/candidates/submit", { ids: e.slice(n, n + G) });
68
- t += r.data.queued;
69
- }
70
- return { queued: t };
71
- }
72
- async function Je({ cursor: e, signal: t } = {}) {
73
- return (await N.get("/training/submissions", {
74
- params: e ? { cursor: e } : void 0,
75
- signal: t
76
- })).data;
77
- }
78
- async function Ye(e) {
79
- await N.delete(`/training/submissions/${e}`);
80
- }
81
- async function Xe({ signal: e } = {}) {
82
- return (await N.get("/training/settings", { signal: e })).data;
83
- }
84
- async function Ze(e) {
85
- return (await N.patch("/training/settings", e)).data;
86
- }
87
- var Qe = class {
88
- queryClient = le();
89
- getCandidatesQuery() {
90
- return R({
91
- queryKey: ["training-candidates"],
92
- queryFn: ({ signal: e }) => K({}, { signal: e }),
93
- staleTime: 5e3
94
- });
95
- }
96
- getSettingsQuery() {
97
- return R({
98
- queryKey: ["training-settings"],
99
- queryFn: ({ signal: e }) => Xe({ signal: e }),
100
- staleTime: 3e4
101
- });
102
- }
103
- patchCandidateMutation() {
104
- return B({
105
- mutationFn: ({ id: e, patch: t }) => q(e, t),
106
- onSuccess: async () => {
107
- await this.queryClient.refetchQueries({
108
- queryKey: ["training-candidates"],
109
- exact: !0
110
- });
111
- }
112
- });
113
- }
114
- deleteCandidateMutation() {
115
- return B({
116
- mutationFn: J,
117
- onSuccess: async () => {
118
- await this.queryClient.refetchQueries({
119
- queryKey: ["training-candidates"],
120
- exact: !0
121
- });
122
- }
123
- });
124
- }
125
- deleteSubmissionMutation() {
126
- return B({ mutationFn: Ye });
127
- }
128
- submitCandidatesMutation() {
129
- return B({
130
- mutationFn: qe,
131
- onSuccess: async () => {
132
- await this.queryClient.refetchQueries({
133
- queryKey: ["training-candidates"],
134
- exact: !0
135
- });
136
- }
137
- });
138
- }
139
- patchSettingsMutation() {
140
- return B({
141
- mutationFn: Ze,
142
- onSuccess: async () => {
143
- await this.queryClient.refetchQueries({
144
- queryKey: ["training-settings"],
145
- exact: !0
146
- });
147
- }
148
- });
149
- }
150
- }, $e = [
151
- "person",
152
- "vehicle",
153
- "animal",
154
- "package",
155
- "face",
156
- "license_plate"
157
- ], et = { desktop: {
158
- maxWidth: "1280px",
159
- width: "85vw"
160
- } }, Y = k({ progress: null }), X = null, Z = null, Q = /* @__PURE__ */ new Set(), tt = /* @__PURE__ */ new Set();
161
- function nt(e, t) {
162
- for (let n of e) try {
163
- n(t);
164
- } catch {}
165
- }
166
- async function rt() {
167
- if (Z?.ready.value) try {
168
- let e = await Z.request("get-submit-progress");
169
- e.active ? Y.progress = e : Y.progress?.active && (Y.progress = null);
170
- } catch {}
171
- }
172
- function it() {
173
- rt(), nt(Q, {}), nt(tt, void 0);
174
- }
175
- function at() {
176
- return Z || (X = p(!0), X.run(() => {
177
- let e = L("/training");
178
- Z = e, e.on("candidates-changed", (e) => nt(Q, e ?? {})), e.on("submit-progress", (e) => {
179
- Y.progress = e, nt(Q, {});
180
- }), e.onReady(it);
181
- }), Z);
182
- }
183
- function ot() {
184
- function e() {
185
- at();
186
- }
187
- function t(e) {
188
- return Q.add(e), () => Q.delete(e);
189
- }
190
- function n(e) {
191
- return tt.add(e), () => tt.delete(e);
192
- }
193
- function r() {
194
- Y.progress = null;
195
- }
196
- return {
197
- submitProgress: g(() => Y.progress),
198
- connect: e,
199
- onCandidatesChanged: t,
200
- onResync: n,
201
- dismissProgress: r
202
- };
203
- }
204
- //#endregion
205
- //#region src/components/CuiDialog/templates/TrainingBoxEditor/TrainingBoxEditor.vue?vue&type=script&setup=true&lang.ts
206
- var st = { class: "flex items-center justify-between gap-2 text-sm" }, ct = { class: "min-w-0 flex items-center gap-2" }, lt = { class: "font-medium truncate" }, ut = { class: "text-muted shrink-0" }, dt = { class: "text-muted tabular-nums shrink-0" }, ft = ["data-stage-zoom"], pt = ["src"], mt = [
207
- "x",
208
- "y",
209
- "width",
210
- "height",
211
- "stroke",
212
- "fill",
213
- "fill-opacity",
214
- "stroke-width",
215
- "onPointerdown"
216
- ], ht = ["onPointerdown"], gt = ["cx", "cy"], _t = [
217
- "cx",
218
- "cy",
219
- "fill"
220
- ], vt = [
221
- "x",
222
- "y",
223
- "width",
224
- "height",
225
- "stroke",
226
- "fill"
227
- ], yt = ["data-box-label", "onPointerdown"], bt = { class: "bbox-label-text" }, xt = {
228
- key: 0,
229
- class: "bbox-label-confidence"
230
- }, St = {
231
- key: 1,
232
- class: "bbox-label-confidence"
233
- }, Ct = ["src"], wt = { class: "absolute inset-0 w-full h-full" }, Tt = [
234
- "x",
235
- "y",
236
- "width",
237
- "height",
238
- "stroke",
239
- "fill"
240
- ], Et = [
241
- "x",
242
- "y",
243
- "width",
244
- "height",
245
- "stroke",
246
- "fill"
247
- ], Dt = {
248
- key: 2,
249
- class: "absolute left-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
250
- }, Ot = {
251
- key: 3,
252
- class: "absolute right-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
253
- }, kt = {
254
- key: 0,
255
- class: "flex items-center justify-center gap-2"
256
- }, At = {
257
- class: "text-muted text-sm",
258
- for: "plate-text"
259
- }, jt = { class: "flex items-center justify-center gap-1.5" }, Mt = { class: "text-muted text-sm text-center" }, Nt = {
260
- key: 1,
261
- class: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 justify-center mx-auto text-sm text-muted"
262
- }, Pt = .01, Ft = .006, It = 26, Lt = 60, Rt = 400, zt = 110, Bt = 2, Vt = 80, Ht = 50, Ut = .003, Wt = /*#__PURE__*/ Se(/* @__PURE__ */ E({
263
- __name: "TrainingBoxEditor",
264
- props: {
265
- candidates: {},
266
- startId: {},
267
- cameraName: { type: Function },
268
- imageUrl: { type: Function },
269
- onSave: { type: Function },
270
- onDelete: { type: Function }
271
- },
272
- setup(u, { expose: p }) {
273
- let w = u, E = t("dialogRef"), { t: ee, te } = Oe(), re = he(), ie = ot(), oe = [
274
- "nw",
275
- "ne",
276
- "sw",
277
- "se"
278
- ], se = /* @__PURE__ */ new Map(), A = k(/* @__PURE__ */ new Set()), ce = k(/* @__PURE__ */ new Set()), M = o(/* @__PURE__ */ new Map()), le = 0, ue = Math.max(0, w.candidates.findIndex((e) => e.id === w.startId)), de = ve(), fe = S("rootRef"), N = S("labelMenuRef"), pe = S("stageRef"), P = S("frameRef"), _e = S("svgRef"), F = D(w.candidates[ue]?.boxes.map((e) => ({ ...e })) ?? []), I = D({
279
- w: 16,
280
- h: 9
281
- }), L = D(null), R = D(null), z = D(-1), B = D(!1), Se = De("(any-pointer: fine)"), V = D(null), Ce = null, Ee = D(-1), Ae = D("person"), H = D(ue), { zoom: Me, pan: Ne, constraining: Pe, minimapStyle: Fe, minimapBoxStyle: Ie, onZoomPan: Le, onDoubleClick: Re, onTouchStart: Be, onTouchEnd: He, reset: U } = xe(pe, P), { height: Ue } = we(P), W = g(() => w.candidates[H.value]), We = g(() => w.candidates.slice(0, H.value + 1).filter((e) => !A.has(e.id)).length), Ge = g(() => w.candidates.filter((e) => !A.has(e.id)).length), Ke = g(() => w.candidates.slice(0, H.value).some((e) => !A.has(e.id))), G = g(() => w.candidates.slice(H.value + 1).some((e) => !A.has(e.id))), K = g(() => ce.has(W.value.id) ? "verified" : W.value.status), q = g(() => F.value.map((e, t) => ({
282
- box: e,
283
- i: t
284
- })).sort((e, t) => Qe(e) - Qe(t))), J = g(() => new Map(q.value.map(({ i: e }, t) => [e, t + 1]))), qe = g(() => F.value[z.value]), Je = g(() => {
285
- let e = F.value[z.value];
286
- return e?.label === "license_plate" ? e : null;
287
- }), Ye = g(() => [...$e.map((e) => ({
288
- key: e,
289
- label: et(e),
290
- icon: ye(e).icon,
291
- iconProps: { style: { color: ye(e).color } },
292
- active: F.value[Ee.value]?.label === e,
293
- onClick: () => nn(e)
294
- })), {
295
- key: "remove",
296
- label: ee("components.training_editor.remove_box"),
297
- icon: ze,
298
- iconProps: { class: "text-red-500" },
299
- labelProps: { class: "text-red-500" },
300
- onClick: () => an(Ee.value)
301
- }]), Xe = g(() => (e) => {
302
- let t = Ue.value || 360;
303
- return e.y * t >= It ? "above" : t - (e.y + e.height) * t >= It ? "below" : "inside";
304
- }), Ze = g(() => (e) => e.x > .7);
305
- function Qe({ box: e, i: t }) {
306
- return t === z.value ? 2 ** 53 - 1 : M.get(s(e)) ?? t;
307
- }
308
- function et(e) {
309
- let t = `components.training_editor.labels.${e}`;
310
- return te(t) ? ee(t) : e;
311
- }
312
- function Y(e) {
313
- return ye(e);
314
- }
315
- function X(e) {
316
- return `${e * 100}%`;
317
- }
318
- function Z(e, t) {
319
- return X(t === "nw" || t === "sw" ? e.x : e.x + e.width);
320
- }
321
- function Q(e, t) {
322
- return X(t === "nw" || t === "ne" ? e.y : e.y + e.height);
323
- }
324
- function tt(e) {
325
- let t = { backgroundColor: Y(e.label).color };
326
- Ze.value(e) ? t.right = X(1 - e.x - e.width) : t.left = X(e.x);
327
- let n = Xe.value(e);
328
- return t.top = n === "above" ? X(e.y) : n === "below" ? X(e.y + e.height) : `calc(${X(e.y)} + 2px)`, t;
329
- }
330
- function nt(e) {
331
- let t = e.target;
332
- t.naturalWidth && t.naturalHeight && (I.value = {
333
- w: t.naturalWidth,
334
- h: t.naturalHeight
335
- });
336
- }
337
- function rt(e) {
338
- let t = _e.value?.getBoundingClientRect();
339
- return !t || t.width === 0 || t.height === 0 ? {
340
- x: 0,
341
- y: 0
342
- } : {
343
- x: Math.min(1, Math.max(0, (e.clientX - t.left) / t.width)),
344
- y: Math.min(1, Math.max(0, (e.clientY - t.top) / t.height))
345
- };
346
- }
347
- function it(e, t) {
348
- L.value = {
349
- ...t,
350
- moved: !1
351
- }, _e.value?.setPointerCapture(e.pointerId);
352
- }
353
- function at(e) {
354
- if (N.value?.hide(), Me.value > 1 || !e.isPrimary) return;
355
- let { x: t, y: n } = rt(e);
356
- it(e, {
357
- mode: "draw",
358
- index: -1,
359
- startX: t,
360
- startY: n,
361
- origin: {
362
- label: Ae.value,
363
- confidence: 1,
364
- x: t,
365
- y: n,
366
- width: 0,
367
- height: 0
368
- }
369
- });
370
- }
371
- function Wt(e, t) {
372
- if (!t.isPrimary) return;
373
- let { x: n, y: r } = rt(t);
374
- z.value = e, it(t, {
375
- mode: "move",
376
- index: e,
377
- startX: n,
378
- startY: r,
379
- origin: { ...F.value[e] }
380
- });
381
- }
382
- function Gt(e, t, n) {
383
- if (!n.isPrimary) return;
384
- N.value?.hide();
385
- let { x: r, y: i } = rt(n);
386
- z.value = e, it(n, {
387
- mode: "resize",
388
- index: e,
389
- corner: t,
390
- startX: r,
391
- startY: i,
392
- origin: { ...F.value[e] }
393
- });
394
- }
395
- function Kt(e) {
396
- e.touches.length > 1 && L.value && (L.value = null, R.value = null, V.value = null), Be(e);
397
- }
398
- function qt(e) {
399
- let t = L.value;
400
- if (!t) return;
401
- let { x: n, y: r } = rt(e);
402
- if (Math.hypot(n - t.startX, r - t.startY) > Ft && (t.moved = !0), e.pointerType === "touch" && t.moved && (Yt(t) ? Xt(e) : V.value = null), t.mode === "draw") {
403
- if (t.moved) {
404
- let e = en(t.startX, t.startY, n, r);
405
- R.value = e.width >= Pt && e.height >= Pt ? {
406
- label: Ae.value,
407
- confidence: 1,
408
- ...e
409
- } : null;
410
- }
411
- return;
412
- }
413
- if (t.mode === "move") {
414
- if (!t.moved) return;
415
- let e = F.value[t.index];
416
- 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)));
417
- return;
418
- }
419
- 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;
420
- Object.assign(F.value[t.index], en(i, a, n, r));
421
- }
422
- function Jt(e) {
423
- let t = L.value;
424
- if (L.value = null, V.value = null, t) {
425
- if (t.mode === "draw") {
426
- R.value && R.value.width >= Pt && R.value.height >= Pt ? (F.value.push({ ...R.value }), z.value = F.value.length - 1) : t.moved || (z.value = -1), R.value = null;
427
- return;
428
- }
429
- t.mode === "move" && !t.moved && tn(t.index, e);
430
- }
431
- }
432
- function Yt(e) {
433
- let t = _e.value?.getBoundingClientRect();
434
- if (!t || t.width === 0) return !1;
435
- let n = e.mode === "draw" ? R.value : F.value[e.index];
436
- return !n || Math.max(n.width * t.width, n.height * t.height) <= Ht;
437
- }
438
- function Xt(e) {
439
- let t = P.value?.getBoundingClientRect(), n = pe.value?.getBoundingClientRect();
440
- if (!t || !n || t.width === 0 || t.height === 0) {
441
- V.value = null;
442
- return;
443
- }
444
- let r = zt / 2, i = Math.min(Math.max(e.clientX - n.left, 59), n.width - r - 4), a = e.clientY - n.top - Vt;
445
- a - r < 4 && (a = e.clientY - n.top + Vt), V.value = {
446
- x: i,
447
- y: a,
448
- frameW: t.width,
449
- frameH: t.height,
450
- tx: r - (e.clientX - t.left) * Bt,
451
- ty: r - (e.clientY - t.top) * Bt
452
- };
453
- }
454
- function Zt(e) {
455
- let t = e instanceof HTMLElement || e instanceof SVGElement ? e : null;
456
- if (!t || pe.value?.contains(t) || t.closest(".p-dialog-header") || t.closest("button")) return !1;
457
- let n = fe.value?.closest(".p-dialog-content")?.lastElementChild;
458
- return !(n && n !== fe.value && n.contains(t));
459
- }
460
- function Qt(e) {
461
- if (Ce = null, e.touches.length !== 1 || !Zt(e.target)) return;
462
- let t = e.touches[0];
463
- Ce = {
464
- x: t.clientX,
465
- y: t.clientY,
466
- at: Date.now()
467
- };
468
- }
469
- function $t(e) {
470
- let t = Ce;
471
- if (Ce = null, !t || e.changedTouches.length !== 1) return;
472
- let n = e.changedTouches[0], r = n.clientX - t.x, i = n.clientY - t.y;
473
- Date.now() - t.at <= Rt && Math.abs(r) >= Lt && Math.abs(r) > 2 * Math.abs(i) && $(r < 0 ? 1 : -1);
474
- }
475
- function en(e, t, n, r) {
476
- return {
477
- x: Math.min(e, n),
478
- y: Math.min(t, r),
479
- width: Math.abs(n - e),
480
- height: Math.abs(r - t)
481
- };
482
- }
483
- function tn(e, t) {
484
- Ee.value = e;
485
- let n = P.value?.querySelector(`[data-box-label="${e}"]`), r = { currentTarget: P.value ?? t.currentTarget };
486
- N.value?.toggleMenu(r, n ?? void 0);
487
- }
488
- function nn(e) {
489
- let t = F.value[Ee.value];
490
- t && (t.label = e, t.confidence = 1, Ae.value = e);
491
- }
492
- function rn(e) {
493
- let t = F.value[z.value];
494
- t && (t.text = (e ?? "").toUpperCase().replace(/[^A-Z0-9ÄÖÜ\- ]/g, "") || void 0);
495
- }
496
- function an(e) {
497
- e < 0 || e >= F.value.length || (F.value.splice(e, 1), z.value = -1);
498
- }
499
- function on(e, t = !0) {
500
- e < 0 || e >= w.candidates.length || (t && se.set(W.value.id, F.value.map((e) => ({ ...e }))), H.value = e, F.value = (se.get(W.value.id) ?? W.value.boxes).map((e) => ({ ...e })), R.value = null, L.value = null, V.value = null, z.value = -1, Ee.value = -1, M.clear(), N.value?.hide(), U());
501
- }
502
- async function sn(e) {
503
- return await w.onSave(W.value.id, F.value.map((e) => ({ ...e })), e), se.set(W.value.id, F.value.map((e) => ({ ...e }))), e === "verified" && ce.add(W.value.id), $(1, !1) ? null : void 0;
504
- }
505
- function $(e, t = !0) {
506
- let n = H.value + e;
507
- for (; n >= 0 && n < w.candidates.length && A.has(w.candidates[n].id);) n += e;
508
- return n < 0 || n >= w.candidates.length ? !1 : (on(n, t), !0);
509
- }
510
- async function cn() {
511
- let e = W.value.id;
512
- A.add(e);
513
- try {
514
- await w.onDelete(e);
515
- } catch (t) {
516
- throw A.delete(e), t;
517
- }
518
- return se.delete(e), $(1, !1) || $(-1, !1) ? null : void 0;
519
- }
520
- function ln(e) {
521
- let t = !1;
522
- for (let n of e) !A.has(n) && w.candidates.some((e) => e.id === n) && (A.add(n), se.delete(n), n === W.value.id && (t = !0));
523
- t && (re.add({
524
- severity: "warn",
525
- detail: ee("components.training_editor.removed_meanwhile"),
526
- life: 4e3
527
- }), !$(1, !1) && !$(-1, !1) && E.value.close({ status: "cancel" }));
528
- }
529
- function un() {
530
- for (let e of [1, -1]) {
531
- let t = H.value + e;
532
- for (; t >= 0 && t < w.candidates.length && A.has(w.candidates[t].id);) t += e;
533
- let n = w.candidates[t];
534
- n && (new Image().src = w.imageUrl(n.id));
535
- }
536
- }
537
- function dn(e) {
538
- F.value.length && (z.value = (z.value + e + F.value.length) % F.value.length);
539
- }
540
- function fn(e) {
541
- let t = F.value[z.value];
542
- if (!t) return;
543
- let n = $e, r = n[(n.indexOf(t.label) + e + n.length) % n.length];
544
- t.label = r, t.confidence = 1, Ae.value = r;
545
- }
546
- function pn(e, t, n) {
547
- let r = F.value[z.value];
548
- r && (n ? (r.width = Math.min(1 - r.x, Math.max(Pt, r.width + e)), r.height = Math.min(1 - r.y, Math.max(Pt, 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))));
549
- }
550
- async function mn() {
551
- let e = await sn("verified");
552
- e !== null && E.value.close({
553
- status: "confirm",
554
- data: e
555
- });
556
- }
557
- v(H, un, { immediate: !0 }), v(qe, (e, t) => {
558
- t && t !== e && F.value.includes(t) && M.set(s(t), --le);
559
- }), Te(window, "keydown", (e) => {
560
- if (e.target?.closest?.("input, textarea")) return;
561
- let t = {
562
- ArrowLeft: [-.003, 0],
563
- ArrowRight: [Ut, 0],
564
- ArrowUp: [0, -.003],
565
- ArrowDown: [0, Ut]
566
- };
567
- if (t[e.key]) {
568
- if (z.value >= 0) {
569
- e.preventDefault();
570
- let [n, r] = t[e.key];
571
- pn(n, r, e.shiftKey);
572
- } else !e.repeat && e.key === "ArrowLeft" ? $(-1) : !e.repeat && e.key === "ArrowRight" && $(1);
573
- return;
574
- }
575
- e.repeat || (e.key === "Tab" ? (e.preventDefault(), dn(e.shiftKey ? -1 : 1)) : e.key === "Escape" ? (z.value = -1, N.value?.hide()) : (e.key === "Delete" || e.key === "Backspace") && z.value >= 0 ? an(z.value) : e.key === "s" || e.key === "S" ? fn(e.shiftKey ? -1 : 1) : e.key === " " && !N.value?.isOpen && (e.preventDefault(), mn()));
576
- }), Te(() => fe.value?.closest(".p-dialog-content") ?? void 0, "touchstart", Qt, { passive: !0 }), Te(() => fe.value?.closest(".p-dialog-content") ?? void 0, "touchend", $t, { passive: !0 }), ie.connect();
577
- let hn = ie.onCandidatesChanged((e) => {
578
- e.removed?.length && ln(e.removed);
579
- });
580
- return i(() => {
581
- hn();
582
- }), p({
583
- onConfirm: () => sn("verified"),
584
- onCancel: () => cn()
585
- }), (t, i) => {
586
- let o = ne, s = me, p = ke, g = be, v = je, S = Ve;
587
- return r(), y("div", {
588
- ref_key: "rootRef",
589
- ref: fe,
590
- class: "flex flex-col gap-3 h-full min-h-0"
591
- }, [
592
- C("div", st, [C("div", ct, [
593
- O(o, {
594
- severity: h(K) === "verified" ? "success" : "info",
595
- value: t.$t(`views.training.status_${h(K)}`),
596
- class: "shrink-0"
597
- }, null, 8, ["severity", "value"]),
598
- C("span", lt, a(u.cameraName(h(W).cameraId)), 1),
599
- C("span", ut, a(h(ge)(h(W).createdAt)), 1)
600
- ]), C("span", dt, a(h(We)) + " / " + a(h(Ge)), 1)]),
601
- C("div", {
602
- ref_key: "stageRef",
603
- ref: pe,
604
- class: "stage relative w-full bg-black rounded-lg shrink-0 overflow-hidden select-none"
605
- }, [
606
- O(h(j), {
607
- pan: h(Ne),
608
- "onUpdate:pan": i[6] ||= (e) => m(Ne) ? Ne.value = e : null,
609
- zoom: h(Me),
610
- "onUpdate:zoom": i[7] ||= (e) => m(Me) ? Me.value = e : null,
611
- "pan-enabled": h(Me) > 1 && !h(L),
612
- "enable-control-button": !1,
613
- "dbl-click-enabled": !1,
614
- "min-zoom": 1,
615
- "max-zoom": h(5),
616
- selector: `[data-stage-zoom='${h(de)}']`,
617
- "zoom-origin": "pointer",
618
- class: c(["absolute inset-0 flex items-center justify-center", { "zoom-constraining": h(Pe) }]),
619
- onPanned: h(Le),
620
- onZoom: h(Le),
621
- onDblclick: h(Re),
622
- onTouchstart: Kt,
623
- onTouchend: h(He)
624
- }, {
625
- default: _(() => [C("div", {
626
- ref_key: "frameRef",
627
- ref: P,
628
- "data-stage-zoom": h(de),
629
- class: "frame relative",
630
- style: b({
631
- "--ar-w": h(I).w,
632
- "--ar-h": h(I).h
633
- })
634
- }, [
635
- C("img", {
636
- src: u.imageUrl(h(W).id),
637
- class: "absolute inset-0 w-full h-full",
638
- draggable: "false",
639
- onLoad: nt
640
- }, null, 40, pt),
641
- (r(), y("svg", {
642
- ref_key: "svgRef",
643
- ref: _e,
644
- class: c(["absolute inset-0 w-full h-full touch-none", h(Me) > 1 ? "cursor-grab" : "cursor-crosshair"]),
645
- onPointerdown: at,
646
- onPointermove: qt,
647
- onPointerup: Jt,
648
- onPointercancel: Jt
649
- }, [(r(!0), y(x, null, n(h(q), ({ box: t, i: a }) => (r(), y("g", { key: a }, [C("rect", {
650
- x: X(t.x),
651
- y: X(t.y),
652
- width: X(t.width),
653
- height: X(t.height),
654
- stroke: Y(t.label).color,
655
- fill: Y(t.label).color,
656
- "fill-opacity": a === h(z) ? .22 : .12,
657
- "stroke-width": a === h(z) ? 3.5 : 2,
658
- "vector-effect": "non-scaling-stroke",
659
- class: "cursor-move",
660
- onPointerdown: e((e) => Wt(a, e), ["stop"]),
661
- onTouchstart: i[0] ||= e(() => {}, ["stop"]),
662
- onMousedown: i[1] ||= e(() => {}, ["stop"])
663
- }, null, 40, mt), (r(), y(x, null, n(oe, (n) => C("g", {
664
- key: n,
665
- class: "cursor-nwse-resize",
666
- onPointerdown: e((e) => Gt(a, n, e), ["stop"]),
667
- onTouchstart: i[2] ||= e(() => {}, ["stop"]),
668
- onMousedown: i[3] ||= e(() => {}, ["stop"])
669
- }, [C("circle", {
670
- cx: Z(t, n),
671
- cy: Q(t, n),
672
- r: "14",
673
- fill: "transparent"
674
- }, null, 8, gt), C("circle", {
675
- cx: Z(t, n),
676
- cy: Q(t, n),
677
- r: "4.5",
678
- fill: Y(t.label).color
679
- }, null, 8, _t)], 40, ht)), 64))]))), 128)), h(R) ? (r(), y("rect", {
680
- key: 0,
681
- x: X(h(R).x),
682
- y: X(h(R).y),
683
- width: X(h(R).width),
684
- height: X(h(R).height),
685
- stroke: Y(h(R).label).color,
686
- fill: Y(h(R).label).color,
687
- "fill-opacity": "0.1",
688
- "stroke-dasharray": "6 4",
689
- "stroke-width": "2",
690
- "vector-effect": "non-scaling-stroke"
691
- }, null, 8, vt)) : f("", !0)], 34)),
692
- (r(!0), y(x, null, n(h(F), (t, n) => (r(), y("div", {
693
- key: `label-${n}`,
694
- class: c(["bbox-label cursor-move", {
695
- "label-bottom": h(Xe)(t) === "below",
696
- "label-inside": h(Xe)(t) === "inside",
697
- "label-right": h(Ze)(t)
698
- }]),
699
- "data-box-label": n,
700
- onPointerdown: e((e) => Wt(n, e), ["stop"]),
701
- onTouchstart: i[4] ||= e(() => {}, ["stop"]),
702
- onMousedown: i[5] ||= e(() => {}, ["stop"]),
703
- style: b([tt(t), { zIndex: h(J).get(n) }])
704
- }, [
705
- (r(), d(l(Y(t.label).icon), { class: "bbox-label-icon" })),
706
- C("span", bt, a(et(t.label)), 1),
707
- t.text ? (r(), y("span", xt, a(t.text), 1)) : t.confidence < 1 ? (r(), y("span", St, a(Math.round(t.confidence * 100)) + "%", 1)) : f("", !0)
708
- ], 46, yt))), 128))
709
- ], 12, ft)]),
710
- _: 1
711
- }, 8, [
712
- "pan",
713
- "zoom",
714
- "pan-enabled",
715
- "max-zoom",
716
- "selector",
717
- "class",
718
- "onPanned",
719
- "onZoom",
720
- "onDblclick",
721
- "onTouchend"
722
- ]),
723
- h(Fe) ? (r(), y("div", {
724
- key: 0,
725
- class: "zoom-minimap",
726
- style: b(h(Ie) ?? void 0)
727
- }, [C("div", {
728
- class: "zoom-minimap-viewport",
729
- style: b(h(Fe))
730
- }, null, 4)], 4)) : f("", !0),
731
- h(V) ? (r(), y("div", {
732
- key: 1,
733
- class: "loupe",
734
- style: b({
735
- left: `${h(V).x}px`,
736
- top: `${h(V).y}px`
737
- })
738
- }, [C("div", {
739
- class: "loupe-content",
740
- style: b({
741
- width: `${h(V).frameW}px`,
742
- height: `${h(V).frameH}px`,
743
- transform: `translate(${h(V).tx}px, ${h(V).ty}px) scale(${Bt})`
744
- })
745
- }, [C("img", {
746
- src: u.imageUrl(h(W).id),
747
- class: "absolute inset-0 w-full h-full",
748
- draggable: "false"
749
- }, null, 8, Ct), (r(), y("svg", wt, [(r(!0), y(x, null, n(h(F), (e, t) => (r(), y("rect", {
750
- key: t,
751
- x: X(e.x),
752
- y: X(e.y),
753
- width: X(e.width),
754
- height: X(e.height),
755
- stroke: Y(e.label).color,
756
- fill: Y(e.label).color,
757
- "fill-opacity": "0.1",
758
- "stroke-width": "1.5"
759
- }, null, 8, Tt))), 128)), h(R) ? (r(), y("rect", {
760
- key: 0,
761
- x: X(h(R).x),
762
- y: X(h(R).y),
763
- width: X(h(R).width),
764
- height: X(h(R).height),
765
- stroke: Y(h(R).label).color,
766
- fill: Y(h(R).label).color,
767
- "fill-opacity": "0.1",
768
- "stroke-dasharray": "4 3",
769
- "stroke-width": "1.5"
770
- }, null, 8, Et)) : f("", !0)]))], 4), i[11] ||= C("div", { class: "loupe-crosshair" }, null, -1)], 4)) : f("", !0),
771
- h(Ke) ? (r(), y("div", Dt, [O(p, {
772
- severity: "secondary",
773
- rounded: "",
774
- class: "cui-icon-md opacity-60 hover:opacity-100",
775
- onClick: i[8] ||= e((e) => $(-1), ["stop"])
776
- }, {
777
- icon: _(() => [O(s, {
778
- width: "100%",
779
- height: "100%"
780
- })]),
781
- _: 1
782
- })])) : f("", !0),
783
- h(G) ? (r(), y("div", Ot, [O(p, {
784
- severity: "secondary",
785
- rounded: "",
786
- class: "cui-icon-md opacity-60 hover:opacity-100",
787
- onClick: i[9] ||= e((e) => $(1), ["stop"])
788
- }, {
789
- icon: _(() => [O(g, {
790
- width: "100%",
791
- height: "100%"
792
- })]),
793
- _: 1
794
- })])) : f("", !0)
795
- ], 512),
796
- h(Je) ? (r(), y("div", kt, [C("label", At, a(t.$t("components.training_editor.plate_text")), 1), O(v, {
797
- id: "plate-text",
798
- "model-value": h(Je).text ?? "",
799
- size: "small",
800
- maxlength: "12",
801
- class: "w-40 uppercase",
802
- placeholder: "ABC 1234",
803
- "onUpdate:modelValue": rn
804
- }, null, 8, ["model-value"])])) : f("", !0),
805
- C("div", jt, [C("span", Mt, a(t.$t("components.training_editor.hint")), 1), h(Se) ? (r(), d(p, {
806
- key: 0,
807
- severity: "secondary",
808
- text: "",
809
- rounded: "",
810
- class: "cui-icon-sm shrink-0",
811
- onClick: i[10] ||= (e) => B.value = !h(B)
812
- }, {
813
- icon: _(() => [O(S, { class: "w-4 h-4" })]),
814
- _: 1
815
- })) : f("", !0)]),
816
- h(Se) && h(B) ? (r(), y("div", Nt, [
817
- i[12] ||= C("span", null, [C("kbd", null, "Tab")], -1),
818
- C("span", null, a(t.$t("components.training_editor.sc_select")), 1),
819
- i[13] ||= T(),
820
- i[14] ||= C("span", null, [C("kbd", null, "←↑→↓")], -1),
821
- C("span", null, a(t.$t("components.training_editor.sc_move")), 1),
822
- i[15] ||= T(),
823
- i[16] ||= C("span", null, [
824
- C("kbd", null, "Shift"),
825
- T(" + "),
826
- C("kbd", null, "←↑→↓")
827
- ], -1),
828
- C("span", null, a(t.$t("components.training_editor.sc_resize")), 1),
829
- i[17] ||= T(),
830
- i[18] ||= C("span", null, [C("kbd", null, "S")], -1),
831
- C("span", null, a(t.$t("components.training_editor.sc_label")), 1),
832
- i[19] ||= T(),
833
- i[20] ||= C("span", null, [C("kbd", null, "Del")], -1),
834
- C("span", null, a(t.$t("components.training_editor.sc_delete")), 1),
835
- i[21] ||= T(),
836
- i[22] ||= C("span", null, [C("kbd", null, "Esc")], -1),
837
- C("span", null, a(t.$t("components.training_editor.sc_deselect")), 1),
838
- i[23] ||= T(),
839
- i[24] ||= C("span", null, [C("kbd", null, "Space")], -1),
840
- C("span", null, a(t.$t("components.training_editor.sc_verify")), 1),
841
- i[25] ||= T(),
842
- i[26] ||= C("span", null, [
843
- C("kbd", null, "←"),
844
- T(" / "),
845
- C("kbd", null, "→")
846
- ], -1),
847
- C("span", null, a(t.$t("components.training_editor.sc_nav")), 1)
848
- ])) : f("", !0),
849
- O(ae, {
850
- ref_key: "labelMenuRef",
851
- ref: N,
852
- items: h(Ye),
853
- popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
854
- }, null, 8, ["items"])
855
- ], 512);
856
- };
857
- }
858
- }), [["__scopeId", "data-v-4e242842"]]), Gt = { class: "flex flex-col gap-3" }, Kt = {
859
- key: 0,
860
- class: "flex flex-col gap-2"
861
- }, qt = {
862
- key: 1,
863
- class: "flex flex-col items-center gap-3 py-10"
864
- }, Jt = { class: "text-muted text-sm text-center max-w-sm" }, Yt = {
865
- key: 2,
866
- class: "flex flex-col items-center gap-3 py-10"
867
- }, Xt = { class: "text-muted text-sm text-center max-w-sm" }, Zt = { class: "text-muted text-sm" }, Qt = { class: "w-24 aspect-video rounded-lg overflow-hidden bg-black/5 dark:bg-black/30 shrink-0" }, $t = { class: "flex-1 min-w-0" }, en = { class: "flex flex-wrap items-center gap-1" }, tn = { class: "text-xs text-muted mt-1" }, nn = {
868
- key: 0,
869
- class: "flex justify-center py-2"
870
- }, rn = /* @__PURE__ */ E({
871
- __name: "TrainingSubmissions",
872
- setup(e) {
873
- let t = new Qe(), { t: o, te: s } = Oe(), c = he(), l = ot(), u = t.deleteSubmissionMutation(), p = D(""), m = D([]), g = D(0), T = D(), E = D(!0), k = D(!1), te = D(!1), re = S("loadMoreRef");
874
- function ie(e) {
875
- let t = {};
876
- for (let n of e.labels) t[n.label] = (t[n.label] ?? 0) + 1;
877
- return t;
878
- }
879
- function ae(e) {
880
- let t = `components.training_editor.labels.${e}`;
881
- return s(t) ? o(t) : e;
882
- }
883
- async function oe() {
884
- E.value = m.value.length === 0;
885
- try {
886
- let e = await Je();
887
- m.value = e.items, g.value = e.total ?? e.items.length, T.value = e.nextCursor, te.value = !1;
888
- } catch {
889
- te.value = !0;
890
- } finally {
891
- E.value = !1;
892
- }
893
- }
894
- async function se() {
895
- let e = T.value;
896
- if (e && !k.value) {
897
- k.value = !0;
898
- try {
899
- let t = await Je({ cursor: e }), n = new Set(m.value.map((e) => e.id));
900
- m.value.push(...t.items.filter((e) => !n.has(e.id))), T.value = t.nextCursor;
901
- } catch (e) {
902
- c.add({
903
- severity: "error",
904
- detail: e?.message ?? String(e),
905
- life: 5e3
906
- });
907
- } finally {
908
- k.value = !1;
909
- }
910
- }
911
- }
912
- async function A(e) {
913
- p.value = e;
914
- try {
915
- await u.mutateAsync(e), m.value = m.value.filter((t) => t.id !== e), g.value = Math.max(0, g.value - 1);
916
- } catch (e) {
917
- c.add({
918
- severity: "error",
919
- detail: e?.message ?? String(e),
920
- life: 5e3
921
- });
922
- } finally {
923
- p.value = "";
924
- }
925
- }
926
- Ce(re, ([e]) => {
927
- e?.isIntersecting && se();
928
- }), v(() => l.submitProgress.value?.active, (e, t) => {
929
- t && !e && oe();
930
- });
931
- let ce = l.onResync(() => {
932
- oe();
933
- });
934
- return i(() => {
935
- ce();
936
- }), oe(), (e, t) => {
937
- let i = P, o = Le, s = M, c = z, l = ne, v = ze, S = ke, D = Fe, oe = ee;
938
- return r(), y("div", Gt, [h(E) ? (r(), y("div", Kt, [(r(), y(x, null, n(4, (e) => O(i, {
939
- key: e,
940
- height: "72px",
941
- "border-radius": "12px"
942
- })), 64))])) : h(te) ? (r(), y("div", qt, [O(o, { class: "w-10 h-10 text-muted" }), C("span", Jt, a(e.$t("components.training_submissions.load_failed")), 1)])) : h(m).length ? (r(), y(x, { key: 3 }, [
943
- C("span", Zt, a(e.$t("components.training_submissions.count", h(g))), 1),
944
- (r(!0), y(x, null, n(h(m), (t) => (r(), y("div", {
945
- key: t.id,
946
- class: "cui-card h-auto! shrink-0 p-2 flex items-center gap-3"
947
- }, [
948
- C("div", Qt, [O(c, {
949
- src: t.imageUrl,
950
- "image-container-class": "w-full h-full",
951
- "image-style": { objectFit: "cover" }
952
- }, null, 8, ["src"])]),
953
- C("div", $t, [C("div", en, [(r(!0), y(x, null, n(ie(t), (e, t) => (r(), y("span", {
954
- key: t,
955
- class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
956
- style: b({ backgroundColor: h(ye)(String(t)).color })
957
- }, a(ae(String(t))) + " ×" + a(e), 5))), 128))]), C("div", tn, a(h(ge)(new Date(t.createdAt).getTime())), 1)]),
958
- O(l, {
959
- severity: t.usedInWave ? "success" : "info",
960
- value: t.usedInWave ? e.$t("components.training_submissions.status_trained") : e.$t("components.training_submissions.status_pool"),
961
- class: "shrink-0"
962
- }, null, 8, ["severity", "value"]),
963
- w((r(), d(S, {
964
- severity: "danger",
965
- text: "",
966
- rounded: "",
967
- class: "cui-icon-sm shrink-0",
968
- loading: h(u).isPending.value && h(p) === t.id,
969
- onClick: (e) => A(t.id)
970
- }, {
971
- icon: _(() => [O(v, {
972
- width: "100%",
973
- height: "100%"
974
- })]),
975
- _: 1
976
- }, 8, ["loading", "onClick"])), [[
977
- oe,
978
- e.$t("components.training_submissions.delete"),
979
- void 0,
980
- { left: !0 }
981
- ]])
982
- ]))), 128)),
983
- h(k) ? (r(), y("div", nn, [O(D, { class: "w-5 h-5 text-primary" })])) : h(T) ? (r(), y("div", {
984
- key: 1,
985
- ref_key: "loadMoreRef",
986
- ref: re,
987
- class: "h-px"
988
- }, null, 512)) : f("", !0)
989
- ], 64)) : (r(), y("div", Yt, [O(s, { class: "w-10 h-10 text-muted" }), C("span", Xt, a(e.$t("components.training_submissions.empty")), 1)]))]);
990
- };
991
- }
992
- }), an = { desktop: {
993
- maxWidth: "720px",
994
- width: "90vw"
995
- } }, on = { class: "flex flex-col" }, sn = {
996
- key: 0,
997
- class: "page-title"
998
- }, $ = { class: "font-semibold text-xl truncate" }, cn = { class: "flex gap-2 mb-4" }, ln = {
999
- key: 1,
1000
- class: "cui-card h-auto! shrink-0 px-3 py-2 mb-4 flex items-center gap-3"
1001
- }, un = { class: "flex-1 min-w-0" }, dn = { class: "text-sm" }, fn = { class: "flex-1 text-sm" }, pn = { class: "p-3" }, mn = {
1002
- key: 3,
1003
- class: "flex flex-1 min-h-0 flex-col items-center justify-center w-full gap-4 py-16"
1004
- }, hn = { class: "text-muted text-sm text-center max-w-md" }, gn = { class: "relative flex-1 min-h-0 overflow-hidden bg-black/5 dark:bg-black/30" }, _n = { class: "absolute top-1.5 left-1.5 flex flex-wrap gap-1" }, vn = {
1005
- key: 0,
1006
- class: "absolute bottom-1.5 left-1.5"
1007
- }, yn = {
1008
- key: 1,
1009
- class: "absolute top-1.5 right-1.5 dark-mode"
1010
- }, bn = { class: "flex items-center justify-between gap-2" }, xn = { class: "flex items-center gap-2 min-w-0" }, Sn = { class: "min-w-0" }, Cn = { class: "font-medium truncate" }, wn = { class: "text-xs text-muted" }, Tn = 40, En = /*#__PURE__*/ Se(/* @__PURE__ */ E({
1011
- __name: "Training",
1012
- setup(t) {
1013
- let o = new I(), s = new Qe(), { t: l, te: u } = Oe(), p = F(), E = he(), { smBreakpoint: k } = ce(), j = s.getCandidatesQuery(), M = s.getSettingsQuery(), le = s.patchCandidateMutation(), N = s.deleteCandidateMutation(), me = s.patchSettingsMutation(), ve = s.submitCandidatesMutation(), be = ot(), { data: xe } = o.getCamerasQuery({
1014
- page: 1,
1015
- pageSize: -1
1016
- }), L = D(""), R = D(Tn), B = S("cameraMenuRef"), Se = S("settingsMenuRef"), we = S("loadMoreRef"), Te = g(() => ({ gridTemplateColumns: `repeat(auto-fill, minmax(${k.value ? "220px" : "260px"}, 1fr))` })), De = g(() => {
1017
- let e = [...new Set((j.data.value ?? []).map((e) => Z(e.cameraId)))].sort((e, t) => e.localeCompare(t));
1018
- return [{
1019
- key: "all",
1020
- label: l("views.training.all_cameras"),
1021
- active: L.value === "",
1022
- onClick: () => {
1023
- L.value = "";
1024
- }
1025
- }, ...e.map((e) => ({
1026
- key: e,
1027
- label: e,
1028
- active: L.value === e,
1029
- onClick: () => {
1030
- L.value = e;
1031
- }
1032
- }))];
1033
- }), Ve = g(() => [{
1034
- key: "collect",
1035
- label: l("views.training.collection_enabled"),
1036
- description: l("views.training.collection_hint"),
1037
- toggle: !0,
1038
- toggleState: M.data.value?.enabled ?? !0,
1039
- onClick: () => {
1040
- ft(!(M.data.value?.enabled ?? !0));
1041
- }
1042
- }]), U = g(() => {
1043
- let e = L.value.trim().toLowerCase();
1044
- return e ? (j.data.value ?? []).filter((t) => Z(t.cameraId).toLowerCase().includes(e)) : j.data.value ?? [];
1045
- }), Ue = g(() => U.value.slice(0, R.value)), We = g(() => U.value.length > Ue.value.length), Ge = g(() => (j.data.value ?? []).filter((e) => q(e)).length), G = g(() => be.submitProgress.value ? be.submitProgress.value : Ge.value > 0 ? {
1046
- active: !0,
1047
- total: Ge.value,
1048
- done: 0,
1049
- failed: 0
1050
- } : null), K = g(() => U.value.filter((e) => !q(e)));
1051
- function q(e) {
1052
- return e.upload === "queued" || e.upload === "uploading";
1053
- }
1054
- let { selectionMode: J, selectedIds: qe, allSelected: Je, bulkBusy: Ye, enterSelectionMode: Xe, exitSelectionMode: Ze, toggleSelectAll: $e, toggleSelection: Y } = V(K, (e) => e.id), X = g(() => [...qe.value].filter((e) => j.data.value?.find((t) => t.id === e)?.status === "verified"));
1055
- function Z(e) {
1056
- return xe.value?.result?.find((t) => t._id === e)?.name ?? e;
1057
- }
1058
- function Q(e) {
1059
- return _e(`/api/training/candidates/${e}/image`) ?? "";
1060
- }
1061
- function tt(e) {
1062
- let t = `components.training_editor.labels.${e}`;
1063
- return u(t) ? l(t) : e;
1064
- }
1065
- function nt(e) {
1066
- let t = {};
1067
- for (let n of e.boxes) t[n.label] = (t[n.label] ?? 0) + 1;
1068
- return t;
1069
- }
1070
- function rt(e) {
1071
- return e === "verified" ? "success" : "info";
1072
- }
1073
- function it() {
1074
- R.value += Tn;
1075
- }
1076
- function at(e) {
1077
- if (!q(e)) {
1078
- if (J.value) {
1079
- Y(e.id);
1080
- return;
1081
- }
1082
- st(e);
1083
- }
1084
- }
1085
- function st(e) {
1086
- p.openComponentDialog(Wt, {
1087
- data: {
1088
- title: l("views.training.title"),
1089
- cancelText: l("components.form.button.remove"),
1090
- confirmText: l("components.training_editor.verify"),
1091
- cancelButtonProps: { severity: "danger" },
1092
- contentProps: {
1093
- candidates: U.value.map((e) => ({ ...e })),
1094
- startId: e.id,
1095
- cameraName: Z,
1096
- imageUrl: Q,
1097
- onSave: async (e, t, n) => {
1098
- await le.mutateAsync({
1099
- id: e,
1100
- patch: {
1101
- boxes: t,
1102
- status: n
1103
- }
1104
- });
1105
- },
1106
- onDelete: async (e) => {
1107
- await N.mutateAsync(e);
1108
- }
1109
- }
1110
- },
1111
- dialogSize: et
1112
- });
1113
- }
1114
- function ct() {
1115
- p.openComponentDialog(rn, {
1116
- data: {
1117
- title: l("views.training.submissions"),
1118
- hideConfirmButton: !0,
1119
- cancelText: l("components.form.button.close"),
1120
- contentProps: {}
1121
- },
1122
- dialogSize: an
1123
- });
1124
- }
1125
- function lt() {
1126
- let e = X.value;
1127
- e.length && !ve.isPending.value && p.openTextDialog({
1128
- data: {
1129
- title: l("components.dialog.title.confirm"),
1130
- contentText: l("views.training.submit_confirm", { count: e.length }),
1131
- confirmText: l("views.training.submit")
1132
- },
1133
- onConfirm: async () => {
1134
- try {
1135
- await ve.mutateAsync(e), Ze();
1136
- } catch (e) {
1137
- E.add({
1138
- severity: "error",
1139
- detail: e?.message ?? String(e),
1140
- life: 8e3
1141
- });
1142
- }
1143
- }
1144
- });
1145
- }
1146
- function ut() {
1147
- let e = [...qe.value];
1148
- e.length && !Ye.value && p.openTextDialog({
1149
- data: {
1150
- title: l("components.dialog.title.confirm"),
1151
- contentText: l("views.training.delete_selected_confirm", { count: e.length }),
1152
- confirmText: l("components.form.button.remove"),
1153
- confirmButtonProps: { severity: "danger" }
1154
- },
1155
- onConfirm: async () => {
1156
- Ye.value = !0;
1157
- try {
1158
- for (let t of e) await N.mutateAsync(t);
1159
- Ze(), E.add({
1160
- severity: "success",
1161
- detail: l("views.training.delete_selected_done", { count: e.length }),
1162
- life: 5e3
1163
- });
1164
- } catch (e) {
1165
- E.add({
1166
- severity: "error",
1167
- detail: e?.message ?? String(e),
1168
- life: 5e3
1169
- });
1170
- } finally {
1171
- Ye.value = !1;
1172
- }
1173
- }
1174
- });
1175
- }
1176
- async function dt(e) {
1177
- await N.mutateAsync(e.id);
1178
- }
1179
- async function ft(e) {
1180
- await me.mutateAsync({ enabled: e });
1181
- }
1182
- v(L, () => {
1183
- R.value = Tn;
1184
- }), Ce(we, ([e]) => {
1185
- e?.isIntersecting && it();
1186
- }), be.connect();
1187
- let pt = be.onCandidatesChanged(() => {
1188
- j.refetch();
1189
- });
1190
- return i(() => {
1191
- pt();
1192
- }), (t, i) => {
1193
- let o = Be, s = ke, u = A, p = Ie, g = H, v = je, S = Ae, E = te, D = se, ce = ie, M = W, le = He, N = Fe, me = Pe, he = Le, _e = Re, F = Ne, I = P, xe = pe, R = z, V = ne, Ce = ze, Oe = Me, Ge = Ee, K = ue, Qe = oe, et = ee;
1194
- return r(), y("div", on, [
1195
- h(k) ? f("", !0) : (r(), y("h1", sn, a(t.$t("views.training.title")), 1)),
1196
- O(u, { position: "left" }, {
1197
- default: _(() => [O(s, {
1198
- severity: "secondary",
1199
- text: "",
1200
- class: "cui-button p-2 text-color non-draggable-region",
1201
- onClick: i[0] ||= (e) => t.$router.push("/menu")
1202
- }, {
1203
- icon: _(() => [O(o, { class: "w-6 h-6" })]),
1204
- _: 1
1205
- })]),
1206
- _: 1
1207
- }),
1208
- O(u, { position: "center" }, {
1209
- default: _(() => [C("span", $, a(t.$t("views.training.title")), 1)]),
1210
- _: 1
1211
- }),
1212
- C("div", cn, [
1213
- O(ce, { class: "flex-1" }, {
1214
- default: _(() => [O(S, { class: "flex-1" }, {
1215
- default: _(() => [O(g, null, {
1216
- default: _(() => [O(p, { class: "w-4 h-4" })]),
1217
- _: 1
1218
- }), O(v, {
1219
- modelValue: h(L),
1220
- "onUpdate:modelValue": i[1] ||= (e) => m(L) ? L.value = e : null,
1221
- placeholder: h(l)("views.training.search"),
1222
- class: "w-full"
1223
- }, null, 8, ["modelValue", "placeholder"])]),
1224
- _: 1
1225
- }), O(D, null, {
1226
- default: _(() => [O(s, {
1227
- severity: "secondary",
1228
- text: "",
1229
- class: "text-color",
1230
- onClick: i[2] ||= (e) => h(B)?.toggleMenu(e)
1231
- }, {
1232
- icon: _(() => [O(E, { class: c(["w-4 h-4 transform transition-transform duration-300", { "rotate-180": h(B)?.isOpen }]) }, null, 8, ["class"])]),
1233
- _: 1
1234
- })]),
1235
- _: 1
1236
- })]),
1237
- _: 1
1238
- }),
1239
- w((r(), d(s, {
1240
- severity: "secondary",
1241
- outlined: "",
1242
- class: "cui-button shrink-0",
1243
- onClick: ct
1244
- }, {
1245
- icon: _(() => [O(M, { class: "w-4.5 h-4.5" })]),
1246
- _: 1
1247
- })), [[
1248
- et,
1249
- { value: t.$t("views.training.submissions") },
1250
- void 0,
1251
- { left: !0 }
1252
- ]]),
1253
- w((r(), d(s, {
1254
- severity: "secondary",
1255
- outlined: "",
1256
- class: "cui-button shrink-0",
1257
- onClick: i[3] ||= (e) => h(Se)?.toggleMenu(e)
1258
- }, {
1259
- icon: _(() => [O(le, { class: "w-4.5 h-4.5" })]),
1260
- _: 1
1261
- })), [[
1262
- et,
1263
- { value: t.$t("views.training.collection") },
1264
- void 0,
1265
- { left: !0 }
1266
- ]])
1267
- ]),
1268
- h(G) ? (r(), y("div", ln, [h(G).active ? (r(), y(x, { key: 0 }, [O(N, { class: "w-4 h-4 text-primary shrink-0" }), C("div", un, [C("div", dn, a(t.$t("views.training.upload_progress", {
1269
- done: h(G).done + h(G).failed,
1270
- total: h(G).total
1271
- })), 1), O(me, {
1272
- value: h(G).total ? Math.round((h(G).done + h(G).failed) / h(G).total * 100) : 0,
1273
- "show-value": !1,
1274
- style: { height: "6px" },
1275
- class: "mt-1.5"
1276
- }, null, 8, ["value"])])], 64)) : (r(), y(x, { key: 1 }, [
1277
- h(G).failed ? (r(), d(he, {
1278
- key: 0,
1279
- class: "w-5 h-5 text-red-500 shrink-0"
1280
- })) : (r(), d(_e, {
1281
- key: 1,
1282
- class: "w-5 h-5 text-green-500 shrink-0"
1283
- })),
1284
- C("span", fn, [T(a(t.$t("views.training.submit_done", h(G).done)), 1), h(G).failed ? (r(), y(x, { key: 0 }, [T(" · " + a(t.$t("views.training.upload_failed_summary", { count: h(G).failed })), 1)], 64)) : f("", !0)]),
1285
- O(s, {
1286
- severity: "secondary",
1287
- text: "",
1288
- rounded: "",
1289
- class: "cui-icon-sm shrink-0",
1290
- onClick: i[4] ||= (e) => h(be).dismissProgress()
1291
- }, {
1292
- icon: _(() => [O(F, { class: "w-4 h-4" })]),
1293
- _: 1
1294
- })
1295
- ], 64))])) : f("", !0),
1296
- h(j).isLoading.value && !h(j).data.value ? (r(), y("div", {
1297
- key: 2,
1298
- class: "grid w-full gap-3 p-px",
1299
- style: b(h(Te))
1300
- }, [(r(), y(x, null, n(8, (e) => C("div", {
1301
- key: e,
1302
- class: "cui-card overflow-hidden"
1303
- }, [O(I, {
1304
- class: "aspect-video",
1305
- width: "100%",
1306
- height: "100%"
1307
- }), C("div", pn, [O(I, {
1308
- height: "14px",
1309
- width: "70%",
1310
- class: "mb-1"
1311
- }), O(I, {
1312
- height: "12px",
1313
- width: "40%"
1314
- })])])), 64))], 4)) : h(U).length === 0 ? (r(), y("div", mn, [O(xe, { class: "w-12 h-12 text-muted" }), C("span", hn, a(t.$t("views.training.no_candidates")), 1)])) : (r(), y(x, { key: 4 }, [C("div", {
1315
- class: "grid w-full gap-3 p-px",
1316
- style: b(h(Te))
1317
- }, [(r(!0), y(x, null, n(h(Ue), (o) => (r(), d(Ge, {
1318
- key: o.id,
1319
- class: "cui-card cui-training-card overflow-hidden transition-shadow cursor-pointer hover:shadow-md aspect-[1.17] flex flex-col",
1320
- pt: {
1321
- header: { class: "flex-1 min-h-0 flex" },
1322
- body: {
1323
- class: "shrink-0",
1324
- style: "height: auto"
1325
- }
1326
- },
1327
- onClick: (e) => at(o)
1328
- }, {
1329
- header: _(() => [C("div", gn, [
1330
- O(R, {
1331
- class: "absolute inset-0",
1332
- src: Q(o.id),
1333
- alt: Z(o.cameraId),
1334
- "image-container-class": "w-full h-full",
1335
- "image-style": { objectFit: "cover" }
1336
- }, null, 8, ["src", "alt"]),
1337
- C("div", _n, [(r(!0), y(x, null, n(nt(o), (e, t) => (r(), y("span", {
1338
- key: t,
1339
- class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
1340
- style: b({ backgroundColor: h(ye)(String(t)).color })
1341
- }, a(tt(String(t))) + " ×" + a(e), 5))), 128))]),
1342
- o.upload ? (r(), y("div", vn, [o.upload === "failed" ? w((r(), d(V, {
1343
- key: 0,
1344
- severity: "danger",
1345
- value: t.$t("views.training.upload_failed")
1346
- }, null, 8, ["value"])), [[
1347
- et,
1348
- o.uploadError,
1349
- void 0,
1350
- { top: !0 }
1351
- ]]) : o.upload === "uploading" ? (r(), d(V, {
1352
- key: 1,
1353
- severity: "info",
1354
- value: t.$t("views.training.upload_uploading")
1355
- }, null, 8, ["value"])) : (r(), d(V, {
1356
- key: 2,
1357
- severity: "secondary",
1358
- value: t.$t("views.training.upload_queued")
1359
- }, null, 8, ["value"]))])) : f("", !0),
1360
- !h(J) && !q(o) ? (r(), y("div", yn, [w((r(), d(s, {
1361
- severity: "secondary",
1362
- rounded: "",
1363
- size: "small",
1364
- class: "cui-icon-sm text-white",
1365
- onClick: e((e) => dt(o), ["stop"])
1366
- }, {
1367
- icon: _(() => [O(Ce, {
1368
- width: "100%",
1369
- height: "100%"
1370
- })]),
1371
- _: 1
1372
- }, 8, ["onClick"])), [[
1373
- et,
1374
- t.$t("views.training.delete_candidate"),
1375
- void 0,
1376
- { top: !0 }
1377
- ]])])) : f("", !0)
1378
- ])]),
1379
- content: _(() => [C("div", bn, [C("div", xn, [h(J) && !q(o) ? (r(), d(Oe, {
1380
- key: 0,
1381
- "model-value": h(qe).has(o.id),
1382
- binary: "",
1383
- size: "small",
1384
- onClick: i[5] ||= e(() => {}, ["stop"]),
1385
- "onUpdate:modelValue": (e) => h(Y)(o.id)
1386
- }, null, 8, ["model-value", "onUpdate:modelValue"])) : f("", !0), C("div", Sn, [C("div", Cn, a(Z(o.cameraId)), 1), C("div", wn, a(h(ge)(o.createdAt)), 1)])]), O(V, {
1387
- severity: rt(o.status),
1388
- value: t.$t(`views.training.status_${o.status}`)
1389
- }, null, 8, ["severity", "value"])])]),
1390
- _: 2
1391
- }, 1032, ["onClick"]))), 128))], 4), h(We) ? (r(), y("div", {
1392
- key: 0,
1393
- ref_key: "loadMoreRef",
1394
- ref: we,
1395
- class: "h-px"
1396
- }, null, 512)) : f("", !0)], 64)),
1397
- h(U).length || h(J) ? (r(), d(Qe, {
1398
- key: 5,
1399
- "force-visible": h(J)
1400
- }, {
1401
- default: _(() => [h(J) ? (r(), y(x, { key: 1 }, [
1402
- O(K, {
1403
- grouped: "",
1404
- "tooltip-props": { value: t.$t("components.form.tooltip.cancel_selection") },
1405
- "button-props": { severity: "secondary" },
1406
- icon: h(Ne),
1407
- "icon-props": {
1408
- width: "100%",
1409
- height: "100%"
1410
- },
1411
- onClick: h(Ze)
1412
- }, null, 8, [
1413
- "tooltip-props",
1414
- "icon",
1415
- "onClick"
1416
- ]),
1417
- O(K, {
1418
- grouped: "",
1419
- "tooltip-props": { value: h(Je) ? t.$t("views.training.deselect_all") : t.$t("views.training.select_all") },
1420
- "button-props": { severity: h(Je) ? "primary" : "secondary" },
1421
- icon: h(fe),
1422
- "icon-props": {
1423
- width: "100%",
1424
- height: "100%"
1425
- },
1426
- onClick: h($e)
1427
- }, null, 8, [
1428
- "tooltip-props",
1429
- "button-props",
1430
- "icon",
1431
- "onClick"
1432
- ]),
1433
- O(K, {
1434
- grouped: "",
1435
- "tooltip-props": { value: t.$t("views.training.submit_selected") },
1436
- "button-props": { disabled: !h(X).length || h(ve).isPending.value },
1437
- icon: h(Ke),
1438
- "icon-props": {
1439
- width: "100%",
1440
- height: "100%"
1441
- },
1442
- onClick: lt
1443
- }, null, 8, [
1444
- "tooltip-props",
1445
- "button-props",
1446
- "icon"
1447
- ]),
1448
- O(K, {
1449
- grouped: "",
1450
- "tooltip-props": { value: t.$t("views.training.delete_selected") },
1451
- "button-props": {
1452
- severity: "danger",
1453
- disabled: !h(qe).size || h(Ye)
1454
- },
1455
- icon: h(de),
1456
- "icon-props": {
1457
- width: "100%",
1458
- height: "100%"
1459
- },
1460
- onClick: ut
1461
- }, null, 8, [
1462
- "tooltip-props",
1463
- "button-props",
1464
- "icon"
1465
- ])
1466
- ], 64)) : (r(), d(K, {
1467
- key: 0,
1468
- grouped: "",
1469
- "tooltip-props": { value: t.$t("views.training.select") },
1470
- "button-props": { severity: "secondary" },
1471
- icon: h(re),
1472
- "icon-props": {
1473
- width: "100%",
1474
- height: "100%"
1475
- },
1476
- onClick: h(Xe)
1477
- }, null, 8, [
1478
- "tooltip-props",
1479
- "icon",
1480
- "onClick"
1481
- ]))]),
1482
- _: 1
1483
- }, 8, ["force-visible"])) : f("", !0),
1484
- O(ae, {
1485
- ref_key: "cameraMenuRef",
1486
- ref: B,
1487
- items: h(De),
1488
- popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
1489
- }, null, 8, ["items"]),
1490
- O(ae, {
1491
- ref_key: "settingsMenuRef",
1492
- ref: Se,
1493
- items: h(Ve),
1494
- "auto-hide": !1,
1495
- popover: { pt: {
1496
- root: { class: "w-[22rem]" },
1497
- content: { class: "p-0! rounded-xl! overflow-hidden!" }
1498
- } }
1499
- }, null, 8, ["items"])
1500
- ]);
1501
- };
1502
- }
1503
- }), [["__scopeId", "data-v-84e470e7"]]);
1504
- //#endregion
1505
- export { En as default };