@camera.ui/server 2.2.2 → 2.2.4

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 (441) hide show
  1. package/dist/interface/assets/{404-bSMSPWcp.js → 404-Bdbp69ox.js} +1 -1
  2. package/dist/interface/assets/{About-DqMxC4AO.js → About-DmtCok-y.js} +1 -1
  3. package/dist/interface/assets/{Assistant-CIHF-bHs.js → Assistant-D-Lv6JtY.js} +1 -1
  4. package/dist/interface/assets/{Automation-CUDypjZw.js → Automation-LQ3TssrU.js} +3 -3
  5. package/dist/interface/assets/{AutomationImport-Cr14tF-Q.js → AutomationImport-B_ra3G3_.js} +2 -2
  6. package/dist/interface/assets/{AutomationStore-BnZgfI9i.js → AutomationStore-DSXSaQjp.js} +2 -2
  7. package/dist/interface/assets/AutomationStoreDetail-B5_Meb6R.js +2 -0
  8. package/dist/interface/assets/Automations-DHfPRe8W.js +2 -0
  9. package/dist/interface/assets/Camera-B4ojNnKb.css +1 -0
  10. package/dist/interface/assets/Camera-CDbfvtJv.js +2 -0
  11. package/dist/interface/assets/{CameraConsole-BK8TqHgA.js → CameraConsole-DX-IRmd_.js} +1 -1
  12. package/dist/interface/assets/Cameras-D9m2bxWj.js +651 -0
  13. package/dist/interface/assets/Camview-DKOYY6TI.js +1 -0
  14. package/dist/interface/assets/{CertificateUpload-PfgVZa4M.js → CertificateUpload-B8ccb3n-.js} +1 -1
  15. package/dist/interface/assets/{Config-DapgreIX.js → Config-DCIUUWCv.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionAssistant-v0w4E-mE.js → ConfigActionAssistant-6IUzZeNW.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionCameraControl-fdrsnRyE.js → ConfigActionCameraControl-EXuiNMuG.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionDelay-C_dq3ozL.js → ConfigActionDelay-Cs4sYEk-.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionHttp-1hDI-38w.js → ConfigActionHttp-gUM6RQ6Y.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionImageInput-DCF8qeg9.js → ConfigActionImageInput-CPl5kVgO.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionMqtt-XpVD7lFg.js → ConfigActionMqtt-BeBMCOJ-.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionNotification-CB1ymMRz.js → ConfigActionNotification-DJFHdFDN.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionNotificationControl-BfDtLS5h.js → ConfigActionNotificationControl-BXoztPTs.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionOutput-CMfXI1b3.js → ConfigActionOutput-BGrFWqZ1.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionPlugin-CZo6SudQ.js → ConfigActionPlugin-CdIIMcJZ.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionSensor-CetFuASa.js → ConfigActionSensor-MRVGJ22A.js} +1 -1
  27. package/dist/interface/assets/{ConfigActionSnapshot-BpPhHpIk.js → ConfigActionSnapshot-CxA4f5ag.js} +1 -1
  28. package/dist/interface/assets/{ConfigActionVariable-SJomTISn.js → ConfigActionVariable-DmU4seLh.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionIfElse-ClTxvZJz.js → ConfigConditionIfElse-Tgdrk7lo.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionSensorState-FbLmmHyP.js → ConfigConditionSensorState-CyyzoL6Q.js} +1 -1
  31. package/dist/interface/assets/{ConfigConditionSwitch--qAHkOdE.js → ConfigConditionSwitch-DprK5AbR.js} +1 -1
  32. package/dist/interface/assets/{ConfigConditionTime-BqjDUPVR.js → ConfigConditionTime-CDruEvBp.js} +1 -1
  33. package/dist/interface/assets/{ConfigSensorValueInput-B1dLcmSO.js → ConfigSensorValueInput-BhlgTOW9.js} +1 -1
  34. package/dist/interface/assets/{ConfigTriggerDetection-CMZyEWui.js → ConfigTriggerDetection-4vdEST9Y.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerGeofence-B9JPVvhP.js → ConfigTriggerGeofence-1B0BdCOw.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerManual-CSdF69jM.js → ConfigTriggerManual-BQLDqwZh.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerMqtt-BzN7_xVm.js → ConfigTriggerMqtt-B3YNOB6U.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSchedule-BK_Ogvxn.js → ConfigTriggerSchedule-DhbJGOT7.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerSensor-BaQklhHP.js → ConfigTriggerSensor-iMPg_Pmb.js} +1 -1
  40. package/dist/interface/assets/{ConfigTriggerSystem-DIX95l0X.js → ConfigTriggerSystem-MaNZTO3h.js} +1 -1
  41. package/dist/interface/assets/{ConfigTriggerWebhook-_EOJAgNk.js → ConfigTriggerWebhook-B3WfXjPv.js} +1 -1
  42. package/dist/interface/assets/Console-BQLINPCG.js +1 -0
  43. package/dist/interface/assets/{CuiAssistantConversation-CWCLLi3b.css → CuiAssistantConversation-DmSdiv1b.css} +1 -1
  44. package/dist/interface/assets/CuiAssistantConversation-yCRlgjtr.js +5 -0
  45. package/dist/interface/assets/{CuiAutomationRunsDialog-DpskKeEe.js → CuiAutomationRunsDialog-CJ0mzDLL.js} +1 -1
  46. package/dist/interface/assets/{CuiBottomSheet-Bg_AIuGY.js → CuiBottomSheet-BbP0T2v3.js} +1 -1
  47. package/dist/interface/assets/CuiBottomSheet-BpMMQhmJ.js +1 -0
  48. package/dist/interface/assets/CuiCameraPipCard-1EhYM5kQ.js +1 -0
  49. package/dist/interface/assets/CuiCameraRecordings-CkkHbNyY.css +1 -0
  50. package/dist/interface/assets/CuiCameraRecordings-D2jG47AV.js +1 -0
  51. package/dist/interface/assets/CuiCameraShares-IpkomKkl.js +1 -0
  52. package/dist/interface/assets/CuiCameraTable-CNclH1KS.js +1 -0
  53. package/dist/interface/assets/{CuiCameraTable-CyAYYPvd.js → CuiCameraTable-DlL-z_na.js} +2 -2
  54. package/dist/interface/assets/{CuiChartTable-BklHSjRr.js → CuiChartTable-B0EPcrgv.js} +1 -1
  55. package/dist/interface/assets/CuiChartTable-DXY7rY3O.css +1 -0
  56. package/dist/interface/assets/{CuiConsole-4rDfDj0a.js → CuiConsole-D8Xk2LXY.js} +2 -2
  57. package/dist/interface/assets/CuiDataTable-DPIbKnvU.css +1 -0
  58. package/dist/interface/assets/CuiDataTable-DtRTB560.js +1 -0
  59. package/dist/interface/assets/CuiLightControl-CtL3sA8k.js +1 -0
  60. package/dist/interface/assets/{CuiList-BafzuN0H.js → CuiList-Bn7DT_Ao.js} +1 -1
  61. package/dist/interface/assets/CuiPluginCard-B-4x6Mno.js +2 -0
  62. package/dist/interface/assets/{CuiPluginCategoryChip-B4w2DH_j.js → CuiPluginCategoryChip-Dih4zKtO.js} +1 -1
  63. package/dist/interface/assets/{CuiPluginOAuthButton-C_jxPrPQ.js → CuiPluginOAuthButton-D-Y9KYJz.js} +2 -2
  64. package/dist/interface/assets/{CuiPluginTrustBadge-pLnF2Ggn.js → CuiPluginTrustBadge-_g3Ctrg4.js} +1 -1
  65. package/dist/interface/assets/{CuiQRCode-8Q6cFdfs.js → CuiQRCode-D6hzmPzV.js} +1 -1
  66. package/dist/interface/assets/CuiSchema-Dh8Mu4BK.js +1 -0
  67. package/dist/interface/assets/{CuiTopNavbarItem-BZXzuV42.js → CuiTopNavbarItem-CgX21E5K.js} +1 -1
  68. package/dist/interface/assets/Faces-CgDoKVkp.js +1 -0
  69. package/dist/interface/assets/{FirstSteps-BNcAFp2c.js → FirstSteps-CZSTX7Ot.js} +1 -1
  70. package/dist/interface/assets/Floorplan-CRvmaf45.js +1 -0
  71. package/dist/interface/assets/{Instances-DUWWy-El.js → Instances-DRkhTQKC.js} +1 -1
  72. package/dist/interface/assets/{Logs-7CxXc2Re.js → Logs-CIDJSpdH.js} +2 -2
  73. package/dist/interface/assets/Menu-CM_F1jfd.js +1 -0
  74. package/dist/interface/assets/Metrics-DgJEg-ZK.js +9 -0
  75. package/dist/interface/assets/Metrics-Ebv4qK2a.css +1 -0
  76. package/dist/interface/assets/OAuthDeviceFlow-BZ9LcgmJ.js +1 -0
  77. package/dist/interface/assets/Plugin-BBDpg6U_.js +1 -0
  78. package/dist/interface/assets/{PluginConsole-BOaU7Ey0.js → PluginConsole-DxVlTuNy.js} +1 -1
  79. package/dist/interface/assets/PluginDetail-fLGD3R-u.js +2 -0
  80. package/dist/interface/assets/PluginSchema-CewD2H-K.js +1 -0
  81. package/dist/interface/assets/PluginSearch-5wX7WEcz.js +2 -0
  82. package/dist/interface/assets/PluginSearch-rDbuXm2z.js +1 -0
  83. package/dist/interface/assets/{PluginUpdateProgress-DFg14vV8.js → PluginUpdateProgress-B7Lj0ttd.js} +1 -1
  84. package/dist/interface/assets/Plugins-DVQ476iL.js +1 -0
  85. package/dist/interface/assets/{RecentEventsFilter-B6Ph-pxb.js → RecentEventsFilter-CWNBI2Ge.js} +1 -1
  86. package/dist/interface/assets/Recordings-DSRgRVhN.js +1 -0
  87. package/dist/interface/assets/{SensorEdit-DEenjJ8S.js → SensorEdit-B1mYmxDV.js} +1 -1
  88. package/dist/interface/assets/{SensorHistory-CU1Uwf5f.js → SensorHistory-D1kKroxp.js} +1 -1
  89. package/dist/interface/assets/{Sensors-LnVLPDWf.js → Sensors-yAc1M-oO.js} +2 -2
  90. package/dist/interface/assets/{Settings-uk3RVXCS.js → Settings-DBKgECRK.js} +1 -1
  91. package/dist/interface/assets/SettingsAccount-CM3XGNL6.js +1 -0
  92. package/dist/interface/assets/SettingsAccount-i2nzGFdV.js +1 -0
  93. package/dist/interface/assets/{SettingsAppearance-CRYcal9v.js → SettingsAppearance-C-nllv3m.js} +1 -1
  94. package/dist/interface/assets/SettingsAppearance-DCgu01FJ.js +1 -0
  95. package/dist/interface/assets/SettingsAssistant-BESab92C.css +1 -0
  96. package/dist/interface/assets/SettingsAssistant-ClRO04fv.js +1 -0
  97. package/dist/interface/assets/{SettingsBackup-CSvGqsru.js → SettingsBackup-Cq_eLVCR.js} +1 -1
  98. package/dist/interface/assets/{SettingsList-BQR6jnP-.js → SettingsList-Bklt3TQO.js} +1 -1
  99. package/dist/interface/assets/SettingsMqtt-BLkP0en6.js +1 -0
  100. package/dist/interface/assets/{SettingsNotifications-8sSoP-8S.js → SettingsNotifications-CeUKfEnH.js} +1 -1
  101. package/dist/interface/assets/{SettingsPermissions-D7kYdjfw.js → SettingsPermissions-Cpka-k3Q.js} +1 -1
  102. package/dist/interface/assets/{SettingsRecordings-DjLYqbKo.js → SettingsRecordings-k20qTe7K.js} +1 -1
  103. package/dist/interface/assets/SettingsRemote-CdUj0nZ1.js +2 -0
  104. package/dist/interface/assets/{SettingsSystem-BxQNJc8n.js → SettingsSystem-6OChvWL7.js} +2 -2
  105. package/dist/interface/assets/SettingsUsers-B57uZ8jn.js +1 -0
  106. package/dist/interface/assets/{Terminal-Bsnvs8gs.js → Terminal-WMgVSORW.js} +2 -2
  107. package/dist/interface/assets/Training-BkWlywj_.js +1 -0
  108. package/dist/interface/assets/Training-Dwf5rXyC.css +1 -0
  109. package/dist/interface/assets/{Updates-Dsn_fJ-N.js → Updates-Dwrd6PQl.js} +1 -1
  110. package/dist/interface/assets/{VariableInput-DCWiIgaZ.js → VariableInput-CDJXnzEV.js} +1 -1
  111. package/dist/interface/assets/{VariableSuggestions-BhIlXJ6r.js → VariableSuggestions-CNq7O1o-.js} +1 -1
  112. package/dist/interface/assets/{VersionsHandler-DM_Jf4EA.js → VersionsHandler-C0A8Ryhn.js} +1 -1
  113. package/dist/interface/assets/{VirtualSensorCreate-Q4kd0dfE.js → VirtualSensorCreate-zEehu8Fg.js} +1 -1
  114. package/dist/interface/assets/Workers-Be7q2vOK.js +2 -0
  115. package/dist/interface/assets/{api-LjAY3aa3.js → api-CSl3-BNZ.js} +1 -1
  116. package/dist/interface/assets/api-DcaDMCnj.css +2 -0
  117. package/dist/interface/assets/api-vegsDz6n.js +4 -0
  118. package/dist/interface/assets/{assistant-BFc44oq-.js → assistant-jARIkvB1.js} +1 -1
  119. package/dist/interface/assets/{auth-CUPvHARA.js → auth-Bov4B1jy.js} +1 -1
  120. package/dist/interface/assets/{automations-Dw4L5sT0.js → automations-CJe7TvLk.js} +1 -1
  121. package/dist/interface/assets/{cameraSources-CzENFiZx.js → cameraSources-CDiYtBzG.js} +1 -1
  122. package/dist/interface/assets/cloudHandoff-BoV37fDI.js +1 -0
  123. package/dist/interface/assets/{config-EBcNBZkb.js → config-iO2vrtak.js} +1 -1
  124. package/dist/interface/assets/{flowSchema-CdzBw69a.js → flowSchema-B0vIoy4y.js} +1 -1
  125. package/dist/interface/assets/{intercomService-DIfdcsXc.js → intercomService-IAAXcRPG.js} +1 -1
  126. package/dist/interface/assets/main-DQgH1fon.js +3 -0
  127. package/dist/interface/assets/{mqtt-D_wH18eJ.js → mqtt-DfpSLxes.js} +1 -1
  128. package/dist/interface/assets/{notifications-wLsrlI9N.js → notifications-jTSwwN1i.js} +1 -1
  129. package/dist/interface/assets/pause-B7ud2O8d.js +1 -0
  130. package/dist/interface/assets/{plugins-DwmkpOPJ.js → plugins-ChyJXprl.js} +1 -1
  131. package/dist/interface/assets/rooms-BMWJpAXC.js +1 -0
  132. package/dist/interface/assets/{sensorIcons-BY853M0u.js → sensorIcons-dUp8Tone.js} +1 -1
  133. package/dist/interface/assets/{sensorSlots-DnRJdaTG.js → sensorSlots-CosoVMys.js} +1 -1
  134. package/dist/interface/assets/{sensors-B9etOqBI.js → sensors-DLdbNuoj.js} +1 -1
  135. package/dist/interface/assets/{server-BTKgKMye.js → server-D-qkU2-U.js} +1 -1
  136. package/dist/interface/assets/{theme-CbtGvohq.js → theme-DhneHMji.js} +1 -1
  137. package/dist/interface/assets/types-CngwbyEy.js +1 -0
  138. package/dist/interface/assets/{types-CEhVWRYD.js → types-DDpq8alD.js} +1 -1
  139. package/dist/interface/assets/{types-COlvVtDn.js → types-DdyAGRju.js} +1 -1
  140. package/dist/interface/assets/{ungrouped-Dbr16vFt.css → ungrouped-DBRZ-Ori.css} +1 -1
  141. package/dist/interface/assets/ungrouped-e2tQIZD2.js +1 -0
  142. package/dist/interface/assets/{updates-BQ6Ugcup.js → updates-DnVisGT3.js} +1 -1
  143. package/dist/interface/assets/{useAppVersion-BO-3jbup.js → useAppVersion-gtzMlM4b.js} +1 -1
  144. package/dist/interface/assets/{useAssistantActions-CRVHZw4o.js → useAssistantActions-BIHVky9T.js} +1 -1
  145. package/dist/interface/assets/useBackupRestore-DfgufKp3.js +1 -0
  146. package/dist/interface/assets/{useCameraOptions-C7tgceJ1.js → useCameraOptions-B9yEPgGd.js} +1 -1
  147. package/dist/interface/assets/{useKeyboardInset-yu3BVnj7.js → useKeyboardInset-1sUlRSeV.js} +1 -1
  148. package/dist/interface/assets/{useLogsSocket-B4wTnSno.js → useLogsSocket-C2QUQqkZ.js} +1 -1
  149. package/dist/interface/assets/{useNavLayout-Z61-OsIG.js → useNavLayout-Br4MtSjQ.js} +1 -1
  150. package/dist/interface/assets/{usePermissions-Bjx4t0x3.js → usePermissions-B8pw9jk1.js} +1 -1
  151. package/dist/interface/assets/{usePluginUpdates-Dv3_XJTK.js → usePluginUpdates-Cx9PwENn.js} +1 -1
  152. package/dist/interface/assets/{usePushRegistration-CHNMZ94f.js → usePushRegistration-CLEyagJM.js} +1 -1
  153. package/dist/interface/assets/{useServerRestart-C-AsOdJP.js → useServerRestart-BBp4cko_.js} +1 -1
  154. package/dist/interface/assets/{useStreamStatus-BJoJF68x.js → useStreamStatus-BrPjpyzs.js} +1 -1
  155. package/dist/interface/assets/{useTabSwipe-b_K3BIkW.js → useTabSwipe-B4edrv6o.js} +1 -1
  156. package/dist/interface/assets/{useUpdateChannel-Cc4IrrDy.js → useUpdateChannel-DugwYo8J.js} +1 -1
  157. package/dist/interface/assets/{useUpdatesSocket-Cz9lN4Bc.js → useUpdatesSocket-CgCXGGVg.js} +1 -1
  158. package/dist/interface/assets/{useUserOptions-DrNB17kY.js → useUserOptions-DTlKtp_u.js} +1 -1
  159. package/dist/interface/assets/vendor-cameraui-D0VXSxSF.js +2326 -0
  160. package/dist/interface/assets/{vendor-core-BTkC8NzR.js → vendor-core-Ba81bBNM.js} +1 -1
  161. package/dist/interface/assets/{vendor-primevue-DQz5Qnqu.js → vendor-primevue-LZEE4d1W.js} +1 -1
  162. package/dist/interface/assets/{vendor-zod-BigRv4ty.js → vendor-zod-CBbC1rE7.js} +2 -2
  163. package/dist/interface/ha/{404-Bg2Vlt5S.js → 404-CkAIe5nc.js} +1 -1
  164. package/dist/interface/ha/{About-C6u2wgUi.js → About-C7HxP7hM.js} +6 -6
  165. package/dist/interface/ha/{Assistant-BCyiVnwD.js → Assistant-DJYxiCOY.js} +207 -192
  166. package/dist/interface/ha/{Automation-DU_qv5xD.js → Automation-CfNHCeIm.js} +191 -191
  167. package/dist/interface/ha/{AutomationImport-BpDyhabF.js → AutomationImport-Dn3C1604.js} +6 -6
  168. package/dist/interface/ha/{AutomationStore-DPQsunpH.js → AutomationStore-D63G9w2Y.js} +5 -5
  169. package/dist/interface/ha/{AutomationStoreDetail-CASMQ-mD.js → AutomationStoreDetail-HoUC8cSY.js} +13 -13
  170. package/dist/interface/ha/{Automations-DSHVzwX4.js → Automations-BOlE1Evb.js} +104 -117
  171. package/dist/interface/ha/{Camera-ESmteicm.js → Camera-6Vvo7nee.js} +234 -222
  172. package/dist/interface/ha/{CameraConsole-BE_jl4Co.js → CameraConsole-DYSNDW4P.js} +5 -5
  173. package/dist/interface/ha/{Cameras-otaj2xZO.js → Cameras-CxgwXUaG.js} +307 -307
  174. package/dist/interface/ha/{Camview-BU1027if.js → Camview-DPjoUMSP.js} +513 -513
  175. package/dist/interface/ha/{Config-BlEvHYVP.js → Config-BzBFIWVF.js} +110 -110
  176. package/dist/interface/ha/{ConfigActionAssistant-uDf5fgoJ.js → ConfigActionAssistant-BpHf4Pdi.js} +4 -4
  177. package/dist/interface/ha/{ConfigActionCameraControl-BAQsXVLz.js → ConfigActionCameraControl-CmbCTwZ8.js} +3 -3
  178. package/dist/interface/ha/{ConfigActionHttp-Dy2MZHSm.js → ConfigActionHttp-BxN2KOA6.js} +2 -2
  179. package/dist/interface/ha/{ConfigActionImageInput-B5kyV3Un.js → ConfigActionImageInput-CrXUZ-cM.js} +1 -1
  180. package/dist/interface/ha/{ConfigActionMqtt-DHCgh1xx.js → ConfigActionMqtt-DYq-6_S6.js} +4 -4
  181. package/dist/interface/ha/{ConfigActionNotification-mbA5PfcJ.js → ConfigActionNotification-DPUSAVLI.js} +3 -3
  182. package/dist/interface/ha/{ConfigActionNotificationControl-TLaL7tYm.js → ConfigActionNotificationControl-h4zta4Db.js} +2 -2
  183. package/dist/interface/ha/{ConfigActionOutput-CJ40Fniw.js → ConfigActionOutput-Dwa0-7cq.js} +1 -1
  184. package/dist/interface/ha/{ConfigActionPlugin-BwTd-mdQ.js → ConfigActionPlugin-DXx1a-Hr.js} +5 -5
  185. package/dist/interface/ha/{ConfigActionSensor-BI438ihg.js → ConfigActionSensor-CfLIHqS8.js} +5 -5
  186. package/dist/interface/ha/{ConfigActionSnapshot-DJ4zI2a0.js → ConfigActionSnapshot-O0OBVq-R.js} +2 -2
  187. package/dist/interface/ha/{ConfigActionVariable-Bhy5jf_w.js → ConfigActionVariable-CbaIxRRe.js} +1 -1
  188. package/dist/interface/ha/{ConfigConditionIfElse-I7Qq8nfN.js → ConfigConditionIfElse-B7ax92bG.js} +3 -3
  189. package/dist/interface/ha/{ConfigConditionSensorState-CTLP3ppx.js → ConfigConditionSensorState-B5XIrEGU.js} +4 -4
  190. package/dist/interface/ha/{ConfigConditionSwitch-UUupXf1b.js → ConfigConditionSwitch-DJSz6bI5.js} +5 -5
  191. package/dist/interface/ha/{ConfigSensorValueInput-CoHheDT0.js → ConfigSensorValueInput-fE2SBn1B.js} +4 -4
  192. package/dist/interface/ha/{ConfigTriggerDetection-Cg_jKNed.js → ConfigTriggerDetection-BuShu78G.js} +2 -2
  193. package/dist/interface/ha/{ConfigTriggerGeofence-WlJbu3sC.js → ConfigTriggerGeofence-pBgXBkb6.js} +5 -5
  194. package/dist/interface/ha/{ConfigTriggerMqtt-BeRJoceK.js → ConfigTriggerMqtt-Dyf_TLfU.js} +1 -1
  195. package/dist/interface/ha/{ConfigTriggerSensor-k58gVKdG.js → ConfigTriggerSensor-C5YUm9ff.js} +1 -1
  196. package/dist/interface/ha/{ConfigTriggerSystem-Ckm5yoUm.js → ConfigTriggerSystem-CylHWw4i.js} +2 -2
  197. package/dist/interface/ha/{ConfigTriggerWebhook-D425z-p1.js → ConfigTriggerWebhook-ZlHsaLu4.js} +6 -6
  198. package/dist/interface/ha/{Console-C1Ub4Rji.js → Console-PNAQjW_1.js} +100 -100
  199. package/dist/interface/ha/{CuiAutomationRunsDialog-opy5qXwE.js → CuiAutomationRunsDialog-D_q8K7QO.js} +2 -2
  200. package/dist/interface/ha/{CuiBottomSheet-DbCwVXl1.js → CuiBottomSheet-BbJG-998.js} +1 -1
  201. package/dist/interface/ha/{CuiCameraRecordings-CifJLj7G.js → CuiCameraRecordings-BSI8Yn3v.js} +14 -15
  202. package/dist/interface/ha/{CuiCameraShares-Xty8LRcn.js → CuiCameraShares-DKHZJT-z.js} +6 -6
  203. package/dist/interface/ha/{CuiCameraTable-CqfxX0Yn.js → CuiCameraTable-BTdP1pEP.js} +9 -9
  204. package/dist/interface/ha/{CuiChartTable-ABHnLdR0.js → CuiChartTable-aFRfsewt.js} +46 -44
  205. package/dist/interface/ha/{CuiConsole-3JwbeUYD.js → CuiConsole-BD9jYvrD.js} +4 -4
  206. package/dist/interface/ha/{CuiDataTable-BwE7D2h5.js → CuiDataTable-C2lOduPV.js} +16 -10
  207. package/dist/interface/ha/{CuiPluginCard-bzxiy1yb.js → CuiPluginCard-C-gpcLCH.js} +78 -78
  208. package/dist/interface/ha/{CuiPluginOAuthButton-DSxrzDmg.js → CuiPluginOAuthButton-B763Rz1n.js} +6 -6
  209. package/dist/interface/ha/{CuiPluginTrustBadge-g0XkvDt8.js → CuiPluginTrustBadge-j5PKYI-V.js} +1 -1
  210. package/dist/interface/ha/{CuiQRCode-uyRFbzd6.js → CuiQRCode-D7WV4czh.js} +6 -6
  211. package/dist/interface/ha/{CuiSchema-DZIrlY8R.js → CuiSchema-BfsT0mAh.js} +155 -155
  212. package/dist/interface/ha/{CuiTopNavbarItem-C3a5NA7u.js → CuiTopNavbarItem-BwpXgGJ-.js} +1 -1
  213. package/dist/interface/ha/{Faces-D2eca8MN.js → Faces-C0e-m9EY.js} +109 -109
  214. package/dist/interface/ha/{FirstSteps-CdTE1cvw.js → FirstSteps-DsDmM44G.js} +8 -8
  215. package/dist/interface/ha/{Floorplan-BrEC2Au5.js → Floorplan-Bei9kIhS.js} +288 -288
  216. package/dist/interface/ha/{Instances-ClOsPOi8.js → Instances-BY5G1zFD.js} +70 -70
  217. package/dist/interface/ha/{Logs-DnY1gTnb.js → Logs-DDycObDv.js} +12 -12
  218. package/dist/interface/ha/{Menu-cLDE76XZ.js → Menu-9r_oFG_-.js} +15 -20
  219. package/dist/interface/ha/{Metrics-pMQX_0m1.js → Metrics-BMTIXqn6.js} +296 -292
  220. package/dist/interface/ha/{OAuthDeviceFlow-D1PGQ8r9.js → OAuthDeviceFlow-Dee5fynX.js} +9 -9
  221. package/dist/interface/ha/{Plugin-DiC23P97.js → Plugin-B5o4pLyu.js} +106 -106
  222. package/dist/interface/ha/{PluginConsole-B-lX5KJu.js → PluginConsole-REtxP1Wi.js} +4 -4
  223. package/dist/interface/ha/{PluginDetail-B_tVJf6y.js → PluginDetail-BHrKifvP.js} +6 -6
  224. package/dist/interface/ha/{PluginSearch-n8nfjx9q.js → PluginSearch-oNHMMeJD.js} +32 -32
  225. package/dist/interface/ha/{PluginUpdateProgress-BjsYyrRk.js → PluginUpdateProgress-CqllA4eR.js} +3 -3
  226. package/dist/interface/ha/{Plugins-CFhOUaqq.js → Plugins-B6y7z5yD.js} +55 -55
  227. package/dist/interface/ha/{Recordings-B07eUJwH.js → Recordings-CyhOVNoM.js} +250 -275
  228. package/dist/interface/ha/{SensorEdit-DFPiBXQD.js → SensorEdit-CnUU2PEv.js} +58 -58
  229. package/dist/interface/ha/{SensorHistory-B2FOK4Qa.js → SensorHistory-z5hDuybW.js} +2 -2
  230. package/dist/interface/ha/{Sensors-DtzmTc-L.js → Sensors-wpoB-X4r.js} +519 -519
  231. package/dist/interface/ha/{Settings-ClqSoFjT.js → Settings-C6wTksxb.js} +22 -22
  232. package/dist/interface/ha/{SettingsAccount-Bh8FfH7J.js → SettingsAccount-DByg5uzj.js} +175 -175
  233. package/dist/interface/ha/{SettingsAppearance--FJgY8cj.js → SettingsAppearance-QgPo4M8O.js} +6 -6
  234. package/dist/interface/ha/{SettingsAssistant-ClDfxd_d.js → SettingsAssistant-Bg4BhUgb.js} +603 -496
  235. package/dist/interface/ha/{SettingsBackup-BYM55pQ7.js → SettingsBackup-BgtZSRub.js} +41 -41
  236. package/dist/interface/ha/{SettingsList-CMSEKVCD.js → SettingsList-DB3j7buh.js} +1 -1
  237. package/dist/interface/ha/{SettingsMqtt-CFpgJ-E5.js → SettingsMqtt-DVx0z8vf.js} +149 -149
  238. package/dist/interface/ha/{SettingsNotifications-CzgsBNtW.js → SettingsNotifications-osO2kMMO.js} +4 -4
  239. package/dist/interface/ha/{SettingsRecordings-Bz686yU7.js → SettingsRecordings-BFEp160g.js} +4 -4
  240. package/dist/interface/ha/{SettingsRemote-DT4ZMjJO.js → SettingsRemote-DQW4FhFn.js} +303 -303
  241. package/dist/interface/ha/{SettingsSystem-CHctt06D.js → SettingsSystem-Cs1MHOTi.js} +9 -9
  242. package/dist/interface/ha/{SettingsUsers-C_hvntON.js → SettingsUsers-BtbuHlRZ.js} +31 -31
  243. package/dist/interface/ha/{Terminal-B5FXq4-Z.js → Terminal-BuXCoMle.js} +8 -8
  244. package/dist/interface/ha/Training-CnsWyeaJ.js +1505 -0
  245. package/dist/interface/ha/{Updates-D0osNjqS.js → Updates-BxU1Jpru.js} +13 -13
  246. package/dist/interface/ha/{VariableInput-BK0qqMc7.js → VariableInput-DgENnHvk.js} +1 -1
  247. package/dist/interface/ha/{VersionsHandler-B-vpKHJN.js → VersionsHandler-DQTSSqti.js} +10 -10
  248. package/dist/interface/ha/{VirtualSensorCreate-Bp2201iM.js → VirtualSensorCreate-Bsr6zTQp.js} +2 -2
  249. package/dist/interface/ha/{Workers-BQ_luGWk.js → Workers-0jZDuLbP.js} +93 -93
  250. package/dist/interface/ha/{api-BufZW7-A.js → api-B8xb-N_g.js} +1 -1
  251. package/dist/interface/ha/{api-JPS8NpNG.js → api-VnpXqKYj.js} +11331 -10921
  252. package/dist/interface/ha/{assistant-BXVGCw2q.js → assistant-DDwonneA.js} +11 -11
  253. package/dist/interface/ha/{auth-CJC9G9BA.js → auth-CXX7ago-.js} +38 -38
  254. package/dist/interface/ha/{automationBlueprint-DWuBiu_Q.js → automationBlueprint-BUkXOKb1.js} +3 -3
  255. package/dist/interface/ha/cameraui-cards.js +1 -1
  256. package/dist/interface/ha/{cards-CGP6dWjy.js → cards-CMel6uVq.js} +641 -639
  257. package/dist/interface/ha/{config-BVURO_DZ.js → config-9vwosYC8.js} +5 -5
  258. package/dist/interface/ha/{dist-Ca4K4HIm.js → dist-jxJIsKjm.js} +307 -283
  259. package/dist/interface/ha/{mqtt-DY6EvMC9.js → mqtt-Fm_GzbBi.js} +5 -5
  260. package/dist/interface/ha/{notifications-BdIqgnrC.js → notifications-CwSeoLx0.js} +7 -7
  261. package/dist/interface/ha/pause-Ch6v65wA.js +19 -0
  262. package/dist/interface/ha/{pinia-CqffEnzx.js → pinia-D2fpp6nV.js} +161 -150
  263. package/dist/interface/ha/{plugins-Bnq2Iw00.js → plugins-CgqO91Hg.js} +18 -18
  264. package/dist/interface/ha/{rooms-AiJ5Tfir.js → rooms-DGnhPCGr.js} +1 -1
  265. package/dist/interface/ha/{server-BHhFn2RZ.js → server-BqNJbXKJ.js} +8 -8
  266. package/dist/interface/ha/{types-7oMK8VO-.js → types-Ca-1kOA9.js} +32 -18
  267. package/dist/interface/ha/{ungrouped-hib17Nvu.js → ungrouped-B1RIFH36.js} +109 -127
  268. package/dist/interface/ha/{updates-DvnEEUsx.js → updates-Dn9WR43I.js} +10 -10
  269. package/dist/interface/ha/{useAppVersion-BmWXr96y.js → useAppVersion-FMZfQhEd.js} +1 -1
  270. package/dist/interface/ha/{useLogsSocket-BKlJKGCB.js → useLogsSocket-Ch8C8inE.js} +1 -1
  271. package/dist/interface/ha/{useNavLayout-Dt0NH-G5.js → useNavLayout-DPjjtXVR.js} +2 -2
  272. package/dist/interface/ha/{useServerRestart-DWs2dqQc.js → useServerRestart-DoozgL8o.js} +1 -1
  273. package/dist/interface/ha/{useTabSwipe-vX79p6V_.js → useTabSwipe-CxXAmZNc.js} +1 -1
  274. package/dist/interface/ha/{useUpdateChannel-CHlRp8uj.js → useUpdateChannel-CBwS4cI2.js} +2 -2
  275. package/dist/interface/ha/{useUpdatesSocket-B40Cx-2L.js → useUpdatesSocket-GrlBqyU4.js} +1 -1
  276. package/dist/interface/ha/{useUserOptions-hXz79rIV.js → useUserOptions-54hnf6hX.js} +1 -1
  277. package/dist/interface/index.html +34 -34
  278. package/dist/interface/sw.js +1 -1
  279. package/dist/server/package.json +10 -11
  280. package/dist/server/requirements.txt +1 -1
  281. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +2 -0
  282. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/__init__.py +2 -0
  283. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/frames.py +9 -5
  284. package/dist/server/src/api/controllers/assistant.controller.js +2 -1
  285. package/dist/server/src/api/controllers/assistant.controller.js.map +1 -1
  286. package/dist/server/src/api/controllers/plugins.controller.js +3 -3
  287. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  288. package/dist/server/src/api/database/index.d.ts +1 -1
  289. package/dist/server/src/api/database/index.js +1 -1
  290. package/dist/server/src/api/database/index.js.map +1 -1
  291. package/dist/server/src/api/database/migrations/v2-2-3.d.ts +3 -0
  292. package/dist/server/src/api/database/migrations/v2-2-3.js +22 -0
  293. package/dist/server/src/api/database/migrations/v2-2-3.js.map +1 -0
  294. package/dist/server/src/api/database/record-schemas.d.ts +10 -10
  295. package/dist/server/src/api/schemas/cameras.schema.d.ts +54 -38
  296. package/dist/server/src/api/schemas/cameras.schema.js +5 -5
  297. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  298. package/dist/server/src/api/schemas/users.schema.d.ts +70 -70
  299. package/dist/server/src/api/websocket/nsp/logs.d.ts +5 -2
  300. package/dist/server/src/api/websocket/nsp/logs.js +20 -5
  301. package/dist/server/src/api/websocket/nsp/logs.js.map +1 -1
  302. package/dist/server/src/api/websocket/nsp/metrics.d.ts +0 -1
  303. package/dist/server/src/api/websocket/nsp/metrics.js +2 -48
  304. package/dist/server/src/api/websocket/nsp/metrics.js.map +1 -1
  305. package/dist/server/src/api/websocket/nsp/training.d.ts +1 -1
  306. package/dist/server/src/api/websocket/nsp/training.js +3 -2
  307. package/dist/server/src/api/websocket/nsp/training.js.map +1 -1
  308. package/dist/server/src/api/websocket/nsp/worker-perf.d.ts +3 -0
  309. package/dist/server/src/api/websocket/nsp/worker-perf.js +58 -0
  310. package/dist/server/src/api/websocket/nsp/worker-perf.js.map +1 -0
  311. package/dist/server/src/api/websocket/types.d.ts +1 -0
  312. package/dist/server/src/assistant/manager.d.ts +1 -0
  313. package/dist/server/src/assistant/manager.js +24 -2
  314. package/dist/server/src/assistant/manager.js.map +1 -1
  315. package/dist/server/src/assistant/reasoning.d.ts +1 -1
  316. package/dist/server/src/assistant/reasoning.js +6 -3
  317. package/dist/server/src/assistant/reasoning.js.map +1 -1
  318. package/dist/server/src/assistant/retry.d.ts +4 -0
  319. package/dist/server/src/assistant/retry.js +3 -0
  320. package/dist/server/src/assistant/retry.js.map +1 -1
  321. package/dist/server/src/assistant/search.d.ts +11 -11
  322. package/dist/server/src/assistant/tool-names.d.ts +2 -0
  323. package/dist/server/src/assistant/tool-names.js +23 -0
  324. package/dist/server/src/assistant/tool-names.js.map +1 -0
  325. package/dist/server/src/assistant/tools/api.js +2 -0
  326. package/dist/server/src/assistant/tools/api.js.map +1 -1
  327. package/dist/server/src/assistant/tools/docs.js +1 -0
  328. package/dist/server/src/assistant/tools/docs.js.map +1 -1
  329. package/dist/server/src/assistant/tools/memory.js +1 -0
  330. package/dist/server/src/assistant/tools/memory.js.map +1 -1
  331. package/dist/server/src/assistant/tools/settings.js +1 -0
  332. package/dist/server/src/assistant/tools/settings.js.map +1 -1
  333. package/dist/server/src/automations/utilities/imageInput.js +4 -2
  334. package/dist/server/src/automations/utilities/imageInput.js.map +1 -1
  335. package/dist/server/src/camera/controller.d.ts +3 -0
  336. package/dist/server/src/camera/controller.js +41 -28
  337. package/dist/server/src/camera/controller.js.map +1 -1
  338. package/dist/server/src/camera/decoder/detection-coordinator.d.ts +6 -0
  339. package/dist/server/src/camera/decoder/detection-coordinator.js +117 -20
  340. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
  341. package/dist/server/src/camera/decoder/detection-pipeline.d.ts +3 -1
  342. package/dist/server/src/camera/decoder/detection-pipeline.js +4 -0
  343. package/dist/server/src/camera/decoder/detection-pipeline.js.map +1 -1
  344. package/dist/server/src/camera/decoder/event-manager.d.ts +1 -0
  345. package/dist/server/src/camera/decoder/event-manager.js +5 -2
  346. package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
  347. package/dist/server/src/camera/decoder/event-thumbnailer.d.ts +4 -0
  348. package/dist/server/src/camera/decoder/event-thumbnailer.js +3 -0
  349. package/dist/server/src/camera/decoder/event-thumbnailer.js.map +1 -1
  350. package/dist/server/src/camera/decoder/event-trace.d.ts +2 -0
  351. package/dist/server/src/camera/decoder/event-trace.js +9 -5
  352. package/dist/server/src/camera/decoder/event-trace.js.map +1 -1
  353. package/dist/server/src/camera/decoder/perf-tracker.d.ts +5 -1
  354. package/dist/server/src/camera/decoder/perf-tracker.js +10 -2
  355. package/dist/server/src/camera/decoder/perf-tracker.js.map +1 -1
  356. package/dist/server/src/camera/decoder/types.d.ts +5 -1
  357. package/dist/server/src/camera/decoder/types.js.map +1 -1
  358. package/dist/server/src/camera/index.d.ts +1 -7
  359. package/dist/server/src/camera/index.js +0 -13
  360. package/dist/server/src/camera/index.js.map +1 -1
  361. package/dist/server/src/camera/privacy/snapshot.js +4 -2
  362. package/dist/server/src/camera/privacy/snapshot.js.map +1 -1
  363. package/dist/server/src/camera/snapshot-store.d.ts +22 -0
  364. package/dist/server/src/camera/snapshot-store.js +78 -0
  365. package/dist/server/src/camera/snapshot-store.js.map +1 -0
  366. package/dist/server/src/camera/streaming/fmp4-session.d.ts +2 -1
  367. package/dist/server/src/camera/streaming/fmp4-session.js +4 -0
  368. package/dist/server/src/camera/streaming/fmp4-session.js.map +1 -1
  369. package/dist/server/src/camera/streaming/rtp-session.js +1 -0
  370. package/dist/server/src/camera/streaming/rtp-session.js.map +1 -1
  371. package/dist/server/src/manager/trainingCandidateManager.js +17 -13
  372. package/dist/server/src/manager/trainingCandidateManager.js.map +1 -1
  373. package/dist/server/src/manager/types.d.ts +4 -0
  374. package/dist/server/src/rpc/interfaces/detection.d.ts +1 -0
  375. package/dist/server/src/rpc/interfaces/device.d.ts +1 -0
  376. package/dist/server/src/sensors/registry.d.ts +1 -0
  377. package/dist/server/src/sensors/registry.js +11 -5
  378. package/dist/server/src/sensors/registry.js.map +1 -1
  379. package/dist/server/src/sensors/sensor.js +2 -3
  380. package/dist/server/src/sensors/sensor.js.map +1 -1
  381. package/dist/server/src/sensors/types.d.ts +2 -1
  382. package/dist/server/src/sensors/types.js +7 -1
  383. package/dist/server/src/sensors/types.js.map +1 -1
  384. package/dist/server/src/utils/image.d.ts +1 -0
  385. package/dist/server/src/utils/image.js +95 -0
  386. package/dist/server/src/utils/image.js.map +1 -0
  387. package/package.json +10 -11
  388. package/dist/interface/assets/AutomationStoreDetail-btcIglkw.js +0 -2
  389. package/dist/interface/assets/Automations-CKpwXTyc.js +0 -2
  390. package/dist/interface/assets/Camera-BEP_HAQm.js +0 -2
  391. package/dist/interface/assets/Camera-gYRy6ECP.css +0 -1
  392. package/dist/interface/assets/Cameras-DJreIgtW.js +0 -651
  393. package/dist/interface/assets/Camview-D4VNMv_l.js +0 -1
  394. package/dist/interface/assets/Console-Y1IutnkC.js +0 -1
  395. package/dist/interface/assets/CuiAssistantConversation-C4RYcMAM.js +0 -5
  396. package/dist/interface/assets/CuiBottomSheet-S8bM23jj.js +0 -1
  397. package/dist/interface/assets/CuiCameraPipCard-HTjvF3yG.js +0 -1
  398. package/dist/interface/assets/CuiCameraRecordings-B7BhgPpP.css +0 -1
  399. package/dist/interface/assets/CuiCameraRecordings-Cx6FYz3Y.js +0 -1
  400. package/dist/interface/assets/CuiCameraShares-J728G9wF.js +0 -1
  401. package/dist/interface/assets/CuiCameraTable-CKur0qLE.js +0 -1
  402. package/dist/interface/assets/CuiChartTable-DCGY-zVy.css +0 -1
  403. package/dist/interface/assets/CuiDataTable-BLyeEEAp.js +0 -1
  404. package/dist/interface/assets/CuiDataTable-DbkFXZeg.css +0 -1
  405. package/dist/interface/assets/CuiLightControl-C1YSJSWd.js +0 -1
  406. package/dist/interface/assets/CuiPluginCard-enc00hbc.js +0 -2
  407. package/dist/interface/assets/CuiSchema-CRHUMY0B.js +0 -1
  408. package/dist/interface/assets/Faces-fMMd6-PY.js +0 -1
  409. package/dist/interface/assets/Floorplan-BQbOWCCf.js +0 -1
  410. package/dist/interface/assets/Menu-B3VA0LMx.js +0 -1
  411. package/dist/interface/assets/Metrics-C0q2BdKH.js +0 -9
  412. package/dist/interface/assets/Metrics-DX59XXDc.css +0 -1
  413. package/dist/interface/assets/OAuthDeviceFlow-ZiCl4400.js +0 -1
  414. package/dist/interface/assets/Plugin-C0CPlt4f.js +0 -1
  415. package/dist/interface/assets/PluginDetail-DDh6PfMd.js +0 -2
  416. package/dist/interface/assets/PluginSchema-BWlRMPo6.js +0 -1
  417. package/dist/interface/assets/PluginSearch-BR_ei8Pa.js +0 -1
  418. package/dist/interface/assets/PluginSearch-C2AXz2KG.js +0 -2
  419. package/dist/interface/assets/Plugins-CN1YIfNk.js +0 -1
  420. package/dist/interface/assets/Recordings-jhxwdrQY.js +0 -1
  421. package/dist/interface/assets/SettingsAccount-CJ_fPrT-.js +0 -1
  422. package/dist/interface/assets/SettingsAccount-CYn81m0Z.js +0 -1
  423. package/dist/interface/assets/SettingsAppearance-DFe8JsT5.js +0 -1
  424. package/dist/interface/assets/SettingsAssistant-CDyI6fee.css +0 -1
  425. package/dist/interface/assets/SettingsAssistant-Dm4oINqB.js +0 -1
  426. package/dist/interface/assets/SettingsMqtt-ByQYIRkm.js +0 -1
  427. package/dist/interface/assets/SettingsRemote-7iDccnV9.js +0 -2
  428. package/dist/interface/assets/SettingsUsers-yYobKcPv.js +0 -1
  429. package/dist/interface/assets/Training-BUhrkDzA.css +0 -1
  430. package/dist/interface/assets/Training-SOWa6Ay1.js +0 -1
  431. package/dist/interface/assets/Workers-D7mXpfvC.js +0 -2
  432. package/dist/interface/assets/api-BKiE8A_V.css +0 -2
  433. package/dist/interface/assets/api-Cl7JjXOQ.js +0 -4
  434. package/dist/interface/assets/cloudHandoff-CGMLCwMb.js +0 -1
  435. package/dist/interface/assets/main-W8WcKa2g.js +0 -3
  436. package/dist/interface/assets/rooms-D_7As09p.js +0 -1
  437. package/dist/interface/assets/types-BEy4uGJ0.js +0 -1
  438. package/dist/interface/assets/ungrouped-BJyBDv5e.js +0 -1
  439. package/dist/interface/assets/useBackupRestore-D305pYHT.js +0 -1
  440. package/dist/interface/assets/vendor-cameraui-CqKq4Yeo.js +0 -2326
  441. package/dist/interface/ha/Training-BgvpsKPM.js +0 -1469
@@ -0,0 +1,1505 @@
1
+ import { m as e } from "./ripple-B_itunQV.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-DCktklpY.js";
3
+ import { t as ee } from "./tooltip-X5MY9FoG.js";
4
+ import { t as te } from "./chevron-down-CN3LNAsG.js";
5
+ import { t as ne } from "./tag-Bko2QYOK.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-VnpXqKYj.js";
7
+ import { S as Ce, _ as we, b as Te, i as Ee, w as De } from "./intercomService-Dwd0bhSN.js";
8
+ import { n as Oe } from "./vue-i18n-BBObX4QY.js";
9
+ import { t as ke } from "./button-DJDZxmKj.js";
10
+ import { n as Ae, t as H } from "./inputicon-BPVltPdr.js";
11
+ import { t as je } from "./inputtext-vdcrNX6K.js";
12
+ import { t as Me } from "./checkbox-D012nd17.js";
13
+ import { t as Ne } from "./close-C_ajB9j7.js";
14
+ import { t as Pe } from "./progressbar-C2663Zd7.js";
15
+ import { t as Fe } from "./ring-resize-11TaovpK.js";
16
+ import { t as Ie } from "./search-DMJuYUDF.js";
17
+ import { n as Le, t as Re } from "./cloud-check-gKe6M70h.js";
18
+ import { t as ze } from "./trash-can-outline-XdMf3dMc.js";
19
+ import { t as Be } from "./back-filled-B-jI6Dqb.js";
20
+ import { t as Ve } from "./help-circle-outline-Du1jH6xY.js";
21
+ import { t as He } from "./settings-DkoB1zyf.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 };