@labelbee/lb-components 1.23.0-alpha.13 → 1.23.0-alpha.131

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 (320) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/_virtual/2DViewWorker.js +1 -0
  3. package/dist/_virtual/highlightSegmentWorker.js +1 -1
  4. package/dist/assets/annotation/icon_link.svg.js +1 -0
  5. package/dist/assets/annotation/icon_unlink.svg.js +1 -0
  6. package/dist/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
  7. package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  8. package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  9. package/dist/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
  10. package/dist/assets/icons/ad33251.svg +26 -0
  11. package/dist/components/AnnotationView/index.js +1 -1
  12. package/dist/components/DynamicResizer/DynamicResizer.js +1 -0
  13. package/dist/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
  14. package/dist/components/DynamicResizer/assets/divider.svg.js +1 -0
  15. package/dist/components/DynamicResizer/assets/topToZero.svg.js +1 -0
  16. package/dist/components/DynamicResizer/hooks/useDrag.js +1 -0
  17. package/dist/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
  18. package/dist/components/DynamicResizer/index.js +1 -0
  19. package/dist/components/LLMMultiWheelView/dialogView/index.js +1 -0
  20. package/dist/components/LLMMultiWheelView/index.js +1 -0
  21. package/dist/components/LLMMultiWheelView/sidebar/index.js +1 -0
  22. package/dist/components/LLMToolView/index.js +1 -1
  23. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  24. package/dist/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  25. package/dist/components/LLMToolView/questionView/index.js +1 -1
  26. package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  27. package/dist/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
  28. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  29. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  30. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  31. package/dist/components/audioAnnotate/audioContext/index.js +1 -1
  32. package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  33. package/dist/components/audioAnnotate/index.js +1 -1
  34. package/dist/components/audioAnnotate/textInput/index.js +1 -1
  35. package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  36. package/dist/components/audioAnnotate/utils/dataTransform.js +1 -0
  37. package/dist/components/audioPlayer/clipRegion/index.js +1 -1
  38. package/dist/components/audioPlayer/index.js +1 -1
  39. package/dist/components/audioPlayer/useAudioCombine/index.js +3 -2
  40. package/dist/components/audioPlayer/useAudioScroll/index.js +1 -1
  41. package/dist/components/audioPlayer/useAudioSegment/index.js +1 -1
  42. package/dist/components/audioPlayer/zoomSlider/index.js +1 -1
  43. package/dist/components/longText/index.js +1 -1
  44. package/dist/components/markdownView/index.js +1 -1
  45. package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
  46. package/dist/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  47. package/dist/components/pointCloud2DRectOperationView/util.js +1 -0
  48. package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  49. package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
  50. package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
  51. package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
  52. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  53. package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
  54. package/dist/components/pointCloudView/PointCloudLayout.js +1 -1
  55. package/dist/components/pointCloudView/PointCloudListener.js +1 -1
  56. package/dist/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  57. package/dist/components/pointCloudView/PointCloudSegmentListener.js +1 -1
  58. package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
  59. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  60. package/dist/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  61. package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
  62. package/dist/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  63. package/dist/components/pointCloudView/hooks/useHighlight.js +1 -1
  64. package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
  65. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  66. package/dist/components/pointCloudView/hooks/usePolygon.js +1 -1
  67. package/dist/components/pointCloudView/hooks/useRotate.js +1 -1
  68. package/dist/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  69. package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
  70. package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
  71. package/dist/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  72. package/dist/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
  73. package/dist/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  74. package/dist/components/pointCloudView/index.js +1 -1
  75. package/dist/components/pointCloudView/utils/event-polyfill.js +1 -0
  76. package/dist/components/pointCloudView/utils/map.js +1 -0
  77. package/dist/components/predictTracking/predictTrackingIcon/index.js +1 -1
  78. package/dist/components/predictTracking/previewResult/index.js +1 -1
  79. package/dist/components/subAttributeList/index.js +1 -0
  80. package/dist/components/videoAnnotate/videoClipTool/index.js +1 -1
  81. package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  82. package/dist/data/enums/ToolType.js +1 -1
  83. package/dist/hooks/useToolStyle.js +1 -0
  84. package/dist/index.css +205 -16
  85. package/dist/index.js +1 -1
  86. package/dist/store/Actions.js +1 -1
  87. package/dist/store/LLMMultiWheel/index.js +1 -0
  88. package/dist/store/annotatedBox/index.js +1 -1
  89. package/dist/store/annotation/actionCreators.js +1 -1
  90. package/dist/store/annotation/reducer.js +1 -1
  91. package/dist/store/ctx.js +1 -1
  92. package/dist/store/toolConfig/baseToolConfig.js +1 -0
  93. package/dist/store/toolConfig/index.js +1 -0
  94. package/dist/store/toolConfig/pointCloudToolConfig.js +1 -0
  95. package/dist/types/App.d.ts +6 -1
  96. package/dist/types/components/AnnotationView/index.d.ts +8 -0
  97. package/dist/types/components/DynamicResizer/DynamicResizer.d.ts +5 -0
  98. package/dist/types/components/DynamicResizer/hooks/useDrag.d.ts +12 -0
  99. package/dist/types/components/DynamicResizer/hooks/useUpdateHeight.d.ts +23 -0
  100. package/dist/types/components/DynamicResizer/index.d.ts +2 -0
  101. package/dist/types/components/DynamicResizer/types/interface.d.ts +17 -0
  102. package/dist/types/components/LLMMultiWheelView/dialogView/index.d.ts +15 -0
  103. package/dist/types/components/LLMMultiWheelView/index.d.ts +20 -0
  104. package/dist/types/components/LLMMultiWheelView/sidebar/index.d.ts +8 -0
  105. package/dist/types/components/LLMMultiWheelView/types.d.ts +62 -0
  106. package/dist/types/components/LLMToolView/questionView/components/header/index.d.ts +15 -0
  107. package/dist/types/components/LLMToolView/questionView/index.d.ts +7 -0
  108. package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +3 -0
  109. package/dist/types/components/LLMToolView/sidebar/components/modelAnswerSort/index.d.ts +30 -0
  110. package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +2 -2
  111. package/dist/types/components/LLMToolView/sidebar/index.d.ts +10 -0
  112. package/dist/types/components/LLMToolView/types.d.ts +6 -2
  113. package/dist/types/components/LLMToolView/utils/data.d.ts +1 -0
  114. package/dist/types/components/audioAnnotate/audioContext/index.d.ts +10 -2
  115. package/dist/types/components/audioAnnotate/textInput/index.d.ts +1 -0
  116. package/dist/types/components/audioAnnotate/utils/dataTransform.d.ts +9 -0
  117. package/dist/types/components/audioPlayer/clipRegion/index.d.ts +1 -0
  118. package/dist/types/components/audioPlayer/index.d.ts +28 -21
  119. package/dist/types/components/audioPlayer/zoomSlider/index.d.ts +1 -0
  120. package/dist/types/components/longText/index.d.ts +1 -0
  121. package/dist/types/components/pointCloud2DRectOperationView/index.d.ts +1 -0
  122. package/dist/types/components/pointCloud2DRectOperationView/useUpdateRectList.d.ts +2 -0
  123. package/dist/types/components/pointCloud2DRectOperationView/util.d.ts +8 -0
  124. package/dist/types/components/pointCloudView/2DViewWorker.d.ts +1 -0
  125. package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +2 -1
  126. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +28 -4
  127. package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +1 -0
  128. package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -0
  129. package/dist/types/components/pointCloudView/components/HighlightVisible/index.d.ts +2 -1
  130. package/dist/types/components/pointCloudView/hooks/useBoxes.d.ts +5 -3
  131. package/dist/types/components/pointCloudView/hooks/useDataLinkSwitch.d.ts +19 -0
  132. package/dist/types/components/pointCloudView/hooks/useHighlight.d.ts +1 -1
  133. package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +31 -1
  134. package/dist/types/components/pointCloudView/hooks/useRotateEdge.d.ts +9 -0
  135. package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +3 -2
  136. package/dist/types/components/pointCloudView/hooks/useTimeoutFunc.d.ts +6 -0
  137. package/dist/types/components/pointCloudView/hooks/useUpdatePointCloudColor.d.ts +4 -0
  138. package/dist/types/components/pointCloudView/hooks/useWindowKeydownListener.d.ts +16 -0
  139. package/dist/types/components/pointCloudView/index.d.ts +1 -0
  140. package/dist/types/components/pointCloudView/utils/event-polyfill.d.ts +8 -0
  141. package/dist/types/components/pointCloudView/utils/map.d.ts +11 -0
  142. package/dist/types/components/subAttributeList/index.d.ts +10 -0
  143. package/dist/types/components/videoAnnotate/index.d.ts +2 -1
  144. package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +2 -1
  145. package/dist/types/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.d.ts +1 -1
  146. package/dist/types/data/enums/ToolType.d.ts +2 -1
  147. package/dist/types/hooks/useToolStyle.d.ts +30 -0
  148. package/dist/types/index.d.ts +9 -2
  149. package/dist/types/store/Actions.d.ts +1 -0
  150. package/dist/types/store/LLMMultiWheel/index.d.ts +15 -0
  151. package/dist/types/store/annotatedBox/index.d.ts +2 -0
  152. package/dist/types/store/annotation/actionCreators.d.ts +4 -3
  153. package/dist/types/store/annotation/reducer.d.ts +1 -0
  154. package/dist/types/store/annotation/types.d.ts +9 -2
  155. package/dist/types/store/ctx.d.ts +7 -0
  156. package/dist/types/store/toolConfig/baseToolConfig.d.ts +4 -0
  157. package/dist/types/store/toolConfig/index.d.ts +3 -0
  158. package/dist/types/store/toolConfig/pointCloudToolConfig.d.ts +4 -0
  159. package/dist/types/store/toolConfig/types.d.ts +10 -0
  160. package/dist/types/utils/AnnotationDataUtils.d.ts +58 -1
  161. package/dist/types/utils/ToolPointCloudBoxRenderHelper.d.ts +24 -0
  162. package/dist/types/utils/data.d.ts +0 -2
  163. package/dist/types/utils/index.d.ts +31 -1
  164. package/dist/types/views/MainView/LLMMultiWheelLayout/index.d.ts +9 -0
  165. package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +1 -0
  166. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.d.ts +3 -0
  167. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.d.ts +3 -0
  168. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.d.ts +3 -0
  169. package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +1 -1
  170. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.d.ts +9 -0
  171. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.d.ts +3 -0
  172. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/index.d.ts +1 -0
  173. package/dist/types/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.d.ts +10 -2
  174. package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
  175. package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +1 -1
  176. package/dist/types/views/MainView/toolHeader/index.d.ts +1 -1
  177. package/dist/utils/AnnotationDataUtils.js +1 -1
  178. package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  179. package/dist/utils/data.js +1 -1
  180. package/dist/utils/index.js +1 -1
  181. package/dist/views/MainView/LLMMultiWheelLayout/index.js +1 -0
  182. package/dist/views/MainView/index.js +1 -1
  183. package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  184. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
  185. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
  186. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  187. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  188. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
  189. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
  190. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  191. package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
  192. package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  193. package/dist/views/MainView/sidebar/index.js +1 -1
  194. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  195. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  196. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  197. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  198. package/dist/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  199. package/dist/views/MainView/toolFooter/index.js +1 -1
  200. package/dist/views/MainView/toolHeader/index.js +1 -1
  201. package/es/App.js +1 -1
  202. package/es/_virtual/2DViewWorker.js +1 -0
  203. package/es/_virtual/highlightSegmentWorker.js +1 -1
  204. package/es/assets/annotation/icon_link.svg.js +1 -0
  205. package/es/assets/annotation/icon_unlink.svg.js +1 -0
  206. package/es/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
  207. package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  208. package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  209. package/es/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
  210. package/es/components/AnnotationView/index.js +1 -1
  211. package/es/components/DynamicResizer/DynamicResizer.js +1 -0
  212. package/es/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
  213. package/es/components/DynamicResizer/assets/divider.svg.js +1 -0
  214. package/es/components/DynamicResizer/assets/topToZero.svg.js +1 -0
  215. package/es/components/DynamicResizer/hooks/useDrag.js +1 -0
  216. package/es/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
  217. package/es/components/DynamicResizer/index.js +1 -0
  218. package/es/components/LLMMultiWheelView/dialogView/index.js +1 -0
  219. package/es/components/LLMMultiWheelView/index.js +1 -0
  220. package/es/components/LLMMultiWheelView/sidebar/index.js +1 -0
  221. package/es/components/LLMToolView/index.js +1 -1
  222. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  223. package/es/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  224. package/es/components/LLMToolView/questionView/index.js +1 -1
  225. package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  226. package/es/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
  227. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  228. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  229. package/es/components/LLMToolView/sidebar/index.js +1 -1
  230. package/es/components/audioAnnotate/audioContext/index.js +1 -1
  231. package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  232. package/es/components/audioAnnotate/index.js +1 -1
  233. package/es/components/audioAnnotate/textInput/index.js +1 -1
  234. package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  235. package/es/components/audioAnnotate/utils/dataTransform.js +1 -0
  236. package/es/components/audioPlayer/clipRegion/index.js +1 -1
  237. package/es/components/audioPlayer/index.js +1 -1
  238. package/es/components/audioPlayer/useAudioCombine/index.js +3 -2
  239. package/es/components/audioPlayer/useAudioScroll/index.js +1 -1
  240. package/es/components/audioPlayer/useAudioSegment/index.js +1 -1
  241. package/es/components/audioPlayer/zoomSlider/index.js +1 -1
  242. package/es/components/longText/index.js +1 -1
  243. package/es/components/markdownView/index.js +1 -1
  244. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  245. package/es/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  246. package/es/components/pointCloud2DRectOperationView/util.js +1 -0
  247. package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  248. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  249. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  250. package/es/components/pointCloudView/PointCloudBackView.js +1 -1
  251. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  252. package/es/components/pointCloudView/PointCloudInfos.js +1 -1
  253. package/es/components/pointCloudView/PointCloudLayout.js +1 -1
  254. package/es/components/pointCloudView/PointCloudListener.js +1 -1
  255. package/es/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  256. package/es/components/pointCloudView/PointCloudSegmentListener.js +1 -1
  257. package/es/components/pointCloudView/PointCloudSideView.js +1 -1
  258. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  259. package/es/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  260. package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
  261. package/es/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  262. package/es/components/pointCloudView/hooks/useHighlight.js +1 -1
  263. package/es/components/pointCloudView/hooks/useHistory.js +1 -1
  264. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  265. package/es/components/pointCloudView/hooks/usePolygon.js +1 -1
  266. package/es/components/pointCloudView/hooks/useRotate.js +1 -1
  267. package/es/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  268. package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
  269. package/es/components/pointCloudView/hooks/useStatus.js +1 -1
  270. package/es/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  271. package/es/components/pointCloudView/hooks/useUpdatePointCloudColor.js +1 -0
  272. package/es/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  273. package/es/components/pointCloudView/index.js +1 -1
  274. package/es/components/pointCloudView/utils/event-polyfill.js +1 -0
  275. package/es/components/pointCloudView/utils/map.js +1 -0
  276. package/es/components/predictTracking/predictTrackingIcon/index.js +1 -1
  277. package/es/components/predictTracking/previewResult/index.js +1 -1
  278. package/es/components/subAttributeList/index.js +1 -0
  279. package/es/components/videoAnnotate/videoClipTool/index.js +1 -1
  280. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  281. package/es/data/enums/ToolType.js +1 -1
  282. package/es/hooks/useToolStyle.js +1 -0
  283. package/es/index.css +205 -16
  284. package/es/index.js +1 -1
  285. package/es/store/Actions.js +1 -1
  286. package/es/store/LLMMultiWheel/index.js +1 -0
  287. package/es/store/annotatedBox/index.js +1 -1
  288. package/es/store/annotation/actionCreators.js +1 -1
  289. package/es/store/annotation/reducer.js +1 -1
  290. package/es/store/ctx.js +1 -1
  291. package/es/store/toolConfig/baseToolConfig.js +1 -0
  292. package/es/store/toolConfig/index.js +1 -0
  293. package/es/store/toolConfig/pointCloudToolConfig.js +1 -0
  294. package/es/utils/AnnotationDataUtils.js +1 -1
  295. package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  296. package/es/utils/data.js +1 -1
  297. package/es/utils/index.js +1 -1
  298. package/es/views/MainView/LLMMultiWheelLayout/index.js +1 -0
  299. package/es/views/MainView/index.js +1 -1
  300. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  301. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
  302. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
  303. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  304. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  305. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.js +1 -0
  306. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/selectBoxVisibleSwitch/index.module.scss.js +1 -0
  307. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  308. package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
  309. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  310. package/es/views/MainView/sidebar/index.js +1 -1
  311. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  312. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  313. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  314. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  315. package/es/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  316. package/es/views/MainView/toolHeader/index.js +1 -1
  317. package/package.json +7 -4
  318. package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
  319. package/dist/assets/icons/9d70807.svg +0 -5
  320. package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
package/es/index.css CHANGED
@@ -8,13 +8,9 @@
8
8
  }
9
9
  .index-module_imgView__wmxDk .index-module_item__-80YI {
10
10
  margin: 0px 40px 40px 0px;
11
- width: 400px;
12
11
  display: flex;
13
- height: 300px;
14
12
  }
15
13
  .index-module_imgView__wmxDk .index-module_item__-80YI .index-module_image__V49oW {
16
- height: 260px;
17
- min-width: 300px;
18
14
  flex: 1;
19
15
  background: #E9EBF1;
20
16
  display: flex;
@@ -49,13 +45,118 @@
49
45
  right: -5px;
50
46
  top: -5px;
51
47
  }
48
+ .index-module_rectRotateSensitivitySlider__tGjUn {
49
+ padding: 12px 20px;
50
+ }
51
+ .index-module_rectRotateSensitivitySlider__tGjUn .index-module_title__aAJW6 {
52
+ margin-bottom: 16px;
53
+ }
52
54
  .index-module_container__RwV5P {
53
55
  padding: 12px 20px;
54
56
  }
55
57
  .index-module_container__RwV5P .index-module_content__vHpS9 {
56
58
  display: flex;
57
59
  justify-content: space-between;
58
- margin-top: 4px;
60
+ margin-top: 16px;
61
+ }
62
+ .index-module_switchBox__6DlnW {
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: space-between;
66
+ padding: 12px 20px;
67
+ }
68
+ .index-module_switchBox__mLSzh {
69
+ display: flex;
70
+ justify-content: space-between;
71
+ align-items: center;
72
+ padding: 12px 20px;
73
+ }
74
+
75
+ .index-module_switchLeft__7qd-2 {
76
+ display: flex;
77
+ align-items: center;
78
+ }
79
+
80
+ .index-module_switchTitle__de9li {
81
+ margin-right: 8px;
82
+ }
83
+ .dynamic-resizer-content {
84
+ width: 100%;
85
+ height: 100%;
86
+ flex-shrink: 0;
87
+ flex-grow: 0;
88
+ position: relative;
89
+ }
90
+
91
+ .divider {
92
+ height: 10px;
93
+ width: 100%;
94
+ position: absolute;
95
+ top: -5px;
96
+ left: 0;
97
+ cursor: row-resize;
98
+ user-select: none;
99
+ display: flex;
100
+ align-items: center;
101
+ flex-direction: column;
102
+ justify-content: center;
103
+ }
104
+ .divider:hover .divider-top, .divider:hover .divider-bottom, .divider:hover .divider-all {
105
+ display: block;
106
+ }
107
+
108
+ .divider-top,
109
+ .divider-bottom,
110
+ .divider-all {
111
+ width: 20px;
112
+ height: 20px;
113
+ cursor: pointer;
114
+ display: none;
115
+ user-select: none;
116
+ }
117
+
118
+ .divider-all {
119
+ position: absolute;
120
+ top: -50%;
121
+ left: 50%;
122
+ transform: translate(-50%);
123
+ }
124
+
125
+ .divider-icon {
126
+ width: 100%;
127
+ height: 20px;
128
+ position: relative;
129
+ }
130
+ .divider-icon::after {
131
+ content: "";
132
+ display: block;
133
+ position: absolute;
134
+ top: 50%;
135
+ left: 0;
136
+ right: 0;
137
+ width: 90%;
138
+ height: 1px;
139
+ background: #ccc;
140
+ margin: 0 auto;
141
+ }
142
+
143
+ .dynamic-resizer-top {
144
+ width: 100%;
145
+ overflow-y: auto;
146
+ }
147
+
148
+ .dynamic-resizer-bottom {
149
+ width: 100%;
150
+ overflow-y: auto;
151
+ }
152
+
153
+ .hide-scrollbar * {
154
+ scrollbar-width: none; /* Firefox */
155
+ -ms-overflow-style: none; /* IE and Edge */
156
+ }
157
+
158
+ .hide-scrollbar *::-webkit-scrollbar {
159
+ display: none; /* Chrome, Safari, Opera */
59
160
  }
60
161
  .index-module_latexEditor__0fK8G {
61
162
  line-height: 32px;
@@ -612,6 +713,7 @@
612
713
  }
613
714
  .index-module_waveformContainer__rVhq9::-webkit-scrollbar {
614
715
  width: 8px;
716
+ height: 10px;
615
717
  }
616
718
  .index-module_waveformContainer__rVhq9::-webkit-scrollbar-track {
617
719
  background: #555;
@@ -704,6 +806,7 @@
704
806
  text-align: right;
705
807
  background: rgb(102, 111, 255);
706
808
  opacity: 0.6;
809
+ margin-top: 10px;
707
810
  }
708
811
  .index-module_textInputContainer__ES6X3 {
709
812
  height: 100%;
@@ -726,6 +829,16 @@
726
829
  font-family: SourceHanSansCN-Medium;
727
830
  font-size: 14px;
728
831
  }
832
+ .index-module_label__xE6hM .index-module_labelText__Zg1c4 {
833
+ display: flex;
834
+ overflow: hidden;
835
+ width: 60%;
836
+ align-items: center;
837
+ }
838
+ .index-module_label__xE6hM .index-module_labelText__Zg1c4 .index-module_titleText__BRM44 {
839
+ max-width: calc(100% - 20px);
840
+ overflow: hidden;
841
+ }
729
842
  .index-module_label__xE6hM .index-module_required__iElYl::before {
730
843
  display: inline-block;
731
844
  margin-right: 4px;
@@ -738,6 +851,7 @@
738
851
  .index-module_label__xE6hM .index-module_extra__PW5Qk {
739
852
  float: right;
740
853
  margin-right: 5px;
854
+ width: 40%;
741
855
  }
742
856
 
743
857
  .index-module_textareaContainer__dTIv4 {
@@ -868,6 +982,7 @@
868
982
  flex-wrap: wrap;
869
983
  align-items: center;
870
984
  justify-content: center;
985
+ overflow: hidden;
871
986
  }
872
987
  .index-module_placeholderHotkey__0SKPo .text {
873
988
  color: #333;
@@ -884,7 +999,10 @@
884
999
 
885
1000
  .index-module_attribute__g8Vbl {
886
1001
  height: 22px;
887
- padding: 2px 8px;
1002
+ padding: 0px 8px;
1003
+ width: max-content;
1004
+ max-width: 100%;
1005
+ margin-left: auto;
888
1006
  }
889
1007
 
890
1008
  .index-module_clearIcon__ZBZqI {
@@ -1147,7 +1265,8 @@
1147
1265
  }
1148
1266
  .index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE {
1149
1267
  flex: 1;
1150
- overflow: auto;
1268
+ overflow-x: hidden;
1269
+ overflow-y: auto;
1151
1270
  }
1152
1271
  .index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE .sensebee-radio-group,
1153
1272
  .index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE .sensebee-radio-group-no-limit-height .ant-radio-group {
@@ -1495,6 +1614,7 @@
1495
1614
  .bee-sidebar #style-width .ant-slider .ant-slider-track,
1496
1615
  .bee-sidebar #style-color .ant-slider .ant-slider-track,
1497
1616
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-track,
1617
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-track,
1498
1618
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-track {
1499
1619
  background: #f5f5f5;
1500
1620
  }
@@ -1504,6 +1624,7 @@
1504
1624
  .bee-sidebar #style-width .ant-slider .ant-slider-dot,
1505
1625
  .bee-sidebar #style-color .ant-slider .ant-slider-dot,
1506
1626
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-dot,
1627
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-dot,
1507
1628
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-dot {
1508
1629
  width: 0;
1509
1630
  height: 0;
@@ -1515,6 +1636,7 @@
1515
1636
  .bee-sidebar #style-width .ant-slider .ant-slider-handle,
1516
1637
  .bee-sidebar #style-color .ant-slider .ant-slider-handle,
1517
1638
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-handle,
1639
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-handle,
1518
1640
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-handle {
1519
1641
  background-image: url("../dist/assets/icons/cc550fff.svg");
1520
1642
  background-repeat: no-repeat;
@@ -1532,6 +1654,7 @@
1532
1654
  .bee-sidebar #style-width .ant-slider .ant-slider-handle:focus,
1533
1655
  .bee-sidebar #style-color .ant-slider .ant-slider-handle:focus,
1534
1656
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-handle:focus,
1657
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-handle:focus,
1535
1658
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-handle:focus {
1536
1659
  box-shadow: none;
1537
1660
  }
@@ -1541,6 +1664,7 @@
1541
1664
  .bee-sidebar #style-width .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1542
1665
  .bee-sidebar #style-color .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1543
1666
  .bee-sidebar #style-fillOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1667
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1544
1668
  .bee-sidebar #style-borderOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow {
1545
1669
  color: inherit;
1546
1670
  font-style: normal;
@@ -1564,6 +1688,7 @@
1564
1688
  .bee-sidebar #style-width .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1565
1689
  .bee-sidebar #style-color .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1566
1690
  .bee-sidebar #style-fillOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1691
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1567
1692
  .bee-sidebar #style-borderOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header {
1568
1693
  position: relative;
1569
1694
  color: rgba(0, 0, 0, 0.85);
@@ -1590,6 +1715,9 @@
1590
1715
  .bee-sidebar #style-fillOpacity .ant-slider-rail,
1591
1716
  .bee-sidebar #style-fillOpacity .ant-slider-track,
1592
1717
  .bee-sidebar #style-fillOpacity .ant-slider-step,
1718
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-rail,
1719
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-track,
1720
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step,
1593
1721
  .bee-sidebar #style-borderOpacity .ant-slider-rail,
1594
1722
  .bee-sidebar #style-borderOpacity .ant-slider-track,
1595
1723
  .bee-sidebar #style-borderOpacity .ant-slider-step {
@@ -1602,38 +1730,46 @@
1602
1730
  .bee-sidebar #style-width .ant-slider .ant-slider-track,
1603
1731
  .bee-sidebar #style-color .ant-slider .ant-slider-track,
1604
1732
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-track,
1733
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-track,
1605
1734
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-track {
1606
1735
  background: none;
1607
1736
  }
1608
1737
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot,
1609
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot {
1738
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot,
1739
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot {
1610
1740
  height: 12px;
1611
1741
  background: #666666;
1612
1742
  border-radius: 0;
1613
1743
  margin-left: -2px;
1614
1744
  }
1615
1745
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(1),
1616
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(1) {
1746
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(1),
1747
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(1) {
1617
1748
  width: 1px;
1618
1749
  }
1619
1750
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(2),
1620
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(2) {
1751
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(2),
1752
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(2) {
1621
1753
  width: 2px;
1622
1754
  }
1623
1755
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(3),
1624
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(3) {
1756
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(3),
1757
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(3) {
1625
1758
  width: 3px;
1626
1759
  }
1627
1760
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(4),
1628
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(4) {
1761
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(4),
1762
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(4) {
1629
1763
  width: 4px;
1630
1764
  }
1631
1765
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(5),
1632
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(5) {
1766
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(5),
1767
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(5) {
1633
1768
  width: 5px;
1634
1769
  }
1635
1770
  .bee-sidebar #style-radius .ant-slider:hover .ant-slider-rail,
1636
- .bee-sidebar #style-width .ant-slider:hover .ant-slider-rail {
1771
+ .bee-sidebar #style-width .ant-slider:hover .ant-slider-rail,
1772
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider:hover .ant-slider-rail {
1637
1773
  background: #f5f5f5;
1638
1774
  }
1639
1775
  .bee-sidebar #style-color .ant-slider-rail {
@@ -2250,6 +2386,9 @@
2250
2386
  .bee-pop-confirm .ant-popover-buttons {
2251
2387
  min-width: 116px;
2252
2388
  }
2389
+ .bee-pop-confirm .ant-popover-inner-content .ant-popover-message {
2390
+ align-items: initial;
2391
+ }
2253
2392
 
2254
2393
  .bee-annotated-attribute {
2255
2394
  width: 240px;
@@ -2500,14 +2639,14 @@
2500
2639
  margin-right: 16px;
2501
2640
  background-image: url("../dist/assets/icons/7eadb9c4.svg");
2502
2641
  }
2503
- .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-180 {
2642
+ .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-90 {
2504
2643
  display: inline-block;
2505
2644
  height: 24px;
2506
2645
  width: 24px;
2507
2646
  background-repeat: no-repeat;
2508
2647
  cursor: pointer;
2509
2648
  flex: none;
2510
- background-image: url("../dist/assets/icons/9d70807.svg");
2649
+ background-image: url("../dist/assets/icons/ad33251.svg");
2511
2650
  }
2512
2651
  .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__next {
2513
2652
  font-size: 24px;
@@ -3224,4 +3363,54 @@
3224
3363
 
3225
3364
  .bee-audio-combined {
3226
3365
  cursor: url("../dist/assets/icons/ad8081bf.svg") 10 12, default;
3366
+ }
3367
+
3368
+ /** LLMMultiWheel style */
3369
+ .bee-LLMMultiWheelView {
3370
+ display: flex;
3371
+ flex: 1;
3372
+ flex-direction: column;
3373
+ overflow: hidden;
3374
+ background-color: #fff;
3375
+ }
3376
+
3377
+ .bee-LLMMultiWheelView-container {
3378
+ flex: auto;
3379
+ display: flex;
3380
+ overflow: auto;
3381
+ }
3382
+ .bee-LLMMultiWheelView-container .dialog {
3383
+ min-width: 50%;
3384
+ padding: 8px;
3385
+ border: 1px solid transparent;
3386
+ overflow: auto;
3387
+ }
3388
+ .bee-LLMMultiWheelView-container .dialog.selected {
3389
+ border-color: #69b1ff;
3390
+ }
3391
+ .bee-LLMMultiWheelView-container .dialog .header {
3392
+ position: relative;
3393
+ }
3394
+ .bee-LLMMultiWheelView-container .dialog .header .order {
3395
+ position: absolute;
3396
+ left: 0;
3397
+ top: 0;
3398
+ width: 32px;
3399
+ height: 32px;
3400
+ line-height: 32px;
3401
+ text-align: center;
3402
+ background: #d4cbcb;
3403
+ border-radius: 4px;
3404
+ }
3405
+ .bee-LLMMultiWheelView-container .dialog .header .name {
3406
+ display: flex;
3407
+ flex-direction: column;
3408
+ align-items: center;
3409
+ justify-content: center;
3410
+ }
3411
+ .bee-LLMMultiWheelView-container .dialog .header .name .show-name {
3412
+ font-size: 16px;
3413
+ }
3414
+ .bee-LLMMultiWheelView-container .dialog .header .name .tips {
3415
+ color: #d4cbcb;
3227
3416
  }
package/es/index.js CHANGED
@@ -1 +1 @@
1
- export{default as AnnotationView}from"./components/AnnotationView/index.js";export{default as PointCloudAnnotationView}from"./components/AnnotationView/pointCloudAnnotationView.js";export{default as QuestionView}from"./components/LLMToolView/questionView/index.js";export{default as TextContent}from"./components/NLPToolView/textContent/index.js";import{i18n as l}from"@labelbee/lb-utils";export{i18n}from"@labelbee/lb-utils";import r,{useState as c,useImperativeHandle as m}from"react";import{I18nextProvider as f}from"react-i18next";import{Provider as u}from"react-redux";import x from"./App.js";import w from"./configureStore.js";import{PageBackward as P,PageForward as v,PageJump as T}from"./store/annotation/actionCreators.js";export{VideoTagTool}from"./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js";import{PointCloudProvider as g}from"./components/pointCloudView/PointCloudContext.js";import{LabelBeeContext as j}from"./store/ctx.js";export{default as PredictTracking}from"./components/predictTracking/predictTrackingIcon/index.js";export{default as LLMToolView}from"./components/LLMToolView/index.js";export{default as SwitchCuboidBoxIn2DView}from"./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js";export{default as MeasureCanvas}from"./components/measureCanvas/index.js";export{default as AnnotatedBox}from"./views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js";export{FindTrackIDIndexInCheckMode as FindTrackIDIndex}from"./views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js";export{EDataFormatType,ELLMDataType,EStepType,ESubmitType,componentCls,prefix}from"./constant/index.js";var _=Object.defineProperty,I=Object.defineProperties,b=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,p=(o,e,t)=>e in o?_(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,A=(o,e)=>{for(var t in e||(e={}))V.call(e,t)&&p(o,t,e[t]);if(s)for(var t of s(e))C.call(e,t)&&p(o,t,e[t]);return o},O=(o,e)=>I(o,b(e));const n=w(),E=(o,e)=>{const[t,d]=c();return m(e,()=>({toolInstance:t,annotationEngine:n.getState().annotation.annotationEngine,pageBackwardActions:()=>n.dispatch(P()),pageForwardActions:()=>n.dispatch(v()),pageJump:a=>{const i=~~a-1;n.dispatch(T(i))},hello:()=>alert("hello labelBee!!!")}),[t]),r.createElement(u,{store:n,context:j},r.createElement(f,{i18n:l},r.createElement(g,null,r.createElement(x,O(A({},o),{setToolInstance:a=>{var i;d(a),(i=o.onLoad)==null||i.call(o,{toolInstance:a})}})))))};var S=r.forwardRef(E);export{S as default,n as store};
1
+ export{default as AnnotationView}from"./components/AnnotationView/index.js";export{default as PointCloudAnnotationView}from"./components/AnnotationView/pointCloudAnnotationView.js";export{default as QuestionView}from"./components/LLMToolView/questionView/index.js";export{default as TextContent}from"./components/NLPToolView/textContent/index.js";import{i18n as s}from"@labelbee/lb-utils";export{i18n}from"@labelbee/lb-utils";import r,{useState as m,useImperativeHandle as u}from"react";import{initReactI18next as f,I18nextProvider as x}from"react-i18next";import{Provider as w}from"react-redux";import P from"./App.js";import v from"./configureStore.js";import{PageBackward as j,PageForward as S,PageJump as T}from"./store/annotation/actionCreators.js";export{VideoTagTool}from"./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js";import{PointCloudProvider as V}from"./components/pointCloudView/PointCloudContext.js";import{LabelBeeContext as b}from"./store/ctx.js";export{default as PredictTracking}from"./components/predictTracking/predictTrackingIcon/index.js";export{default as LLMToolView}from"./components/LLMToolView/index.js";export{default as SwitchCuboidBoxIn2DView,SwitchCuboidBoxIn2DViewStateMode}from"./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js";export{default as BatchSwitchConnectIn2DView}from"./views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js";export{default as MeasureCanvas}from"./components/measureCanvas/index.js";export{default as AnnotatedBox}from"./views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js";export{default as RectRotateSensitivitySlider}from"./views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js";export{FindTrackIDIndexInCheckMode as FindTrackIDIndex}from"./views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js";export{WrapAudioPlayer as AudioPlayer}from"./components/audioPlayer/index.js";export{generatePointCloudBoxRects}from"./utils/index.js";export{default as SubAttributeList}from"./components/subAttributeList/index.js";import{ToolStyleProvider as g}from"./hooks/useToolStyle.js";import{LoadFileAndFileData as C}from"./store/annotation/reducer.js";export{default as useToolConfigStore}from"./store/toolConfig/index.js";export{LLMMultiWheelSourceView}from"./components/LLMMultiWheelView/index.js";export{EDataFormatType,ELLMDataType,EStepType,ESubmitType,componentCls,prefix}from"./constant/index.js";var I=Object.defineProperty,h=Object.defineProperties,_=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,p=(o,e,t)=>e in o?I(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,L=(o,e)=>{for(var t in e||(e={}))y.call(e,t)&&p(o,t,e[t]);if(l)for(var t of l(e))A.call(e,t)&&p(o,t,e[t]);return o},M=(o,e)=>h(o,_(e));const n=v();s.use(f),s.options.react={useSuspense:!1};const D=(o,e)=>{const[t,c]=m();return u(e,()=>({toolInstance:t,annotationEngine:n.getState().annotation.annotationEngine,pageBackwardActions:()=>n.dispatch(j()),pageForwardActions:()=>n.dispatch(S()),pageJump:(i,a)=>{const d=~~i-1;n.dispatch(T(d)),a&&n.dispatch(C(d))},hello:()=>alert("hello labelBee!!!")}),[t]),r.createElement(w,{store:n,context:b},r.createElement(x,{i18n:s},r.createElement(g,{value:o.toolStyle},r.createElement(V,null,r.createElement(P,M(L({},o),{setToolInstance:i=>{var a;c(i),(a=o.onLoad)==null||a.call(o,{toolInstance:i})}}))))))};var B=r.forwardRef(D);export{B as default,n as store};
@@ -1 +1 @@
1
- const T={INIT_ALL_STATE:"@@INIT_ALL_STATE",UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SKIP_BEFORE_PAGE_TURNING:"@@SKIP_BEFORE_PAGE_TURNING",UPDATE_BEFORE_ROTATE:"@@UPDATE_BEFORE_ROTATE",SET_LOADING:"@@SET_LOADING",SET_LOADPCDFILE_LOADING:"@@SET_LOADPCDFILE_LOADING",SET_POINT_CLOUD_LOADING:"@@SET_POINT_CLOUD_LOADING",SET_CHECK_MODE:"@@SET_CHECK_MODE",SET_TASK_STEP_LIST:"@@SET_TASK_STEP_LIST",UPDATE_ANNOTATION_VALID:"@@UPDATE_ANNOTATION_VALID",BATCH_UPDATE_TRACK_ID:"@@BATCH_UPDATE_TRACK_ID",BATCH_UPDATE_RESULT_BY_TRACK_ID:"@@BATCH_UPDATE_RESULT_BY_TRACK_ID",BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:"@@BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT",SET_PREDICT_RESULT_VISIBLE:"@@SET_PREDICT_RESULT_VISIBLE",SET_PREDICT_RESULT:"@@SET_PREDICT_RESULT",SET_HIGHLIGHT_ATTRIBUTE:"@@SET_HIGHLIGHT_ATTRIBUTE",UPDATE_PRE_DATA_PROCESS:"@@UPDATE_PRE_DATA_PROCESS"},_={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},E={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};export{T as ANNOTATION_ACTIONS,_ as IMAGE_ATTRIBUTE_ACTIONS,E as TOOL_STYLE_ACTIONS};
1
+ const T={INIT_ALL_STATE:"@@INIT_ALL_STATE",UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SKIP_BEFORE_PAGE_TURNING:"@@SKIP_BEFORE_PAGE_TURNING",UPDATE_BEFORE_ROTATE:"@@UPDATE_BEFORE_ROTATE",SET_LOADING:"@@SET_LOADING",SET_LOADPCDFILE_LOADING:"@@SET_LOADPCDFILE_LOADING",SET_POINT_CLOUD_LOADING:"@@SET_POINT_CLOUD_LOADING",SET_CHECK_MODE:"@@SET_CHECK_MODE",SET_TASK_STEP_LIST:"@@SET_TASK_STEP_LIST",UPDATE_ANNOTATION_VALID:"@@UPDATE_ANNOTATION_VALID",BATCH_UPDATE_TRACK_ID:"@@BATCH_UPDATE_TRACK_ID",BATCH_UPDATE_RESULT_BY_TRACK_ID:"@@BATCH_UPDATE_RESULT_BY_TRACK_ID",BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:"@@BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT",SET_PREDICT_RESULT_VISIBLE:"@@SET_PREDICT_RESULT_VISIBLE",SET_PREDICT_RESULT:"@@SET_PREDICT_RESULT",SET_HIGHLIGHT_ATTRIBUTE:"@@SET_HIGHLIGHT_ATTRIBUTE",UPDATE_PRE_DATA_PROCESS:"@@UPDATE_PRE_DATA_PROCESS",UPDATE_IMG_INDEX_BY_EXTERNAL:"@@UPDATE_IMG_INDEX_BY_EXTERNAL"},_={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},E={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};export{T as ANNOTATION_ACTIONS,_ as IMAGE_ATTRIBUTE_ACTIONS,E as TOOL_STYLE_ACTIONS};
@@ -0,0 +1 @@
1
+ import{EDataFormatType as s}from"../../constant/index.js";import{create as r}from"zustand";const o=r(e=>({dataFormatType:s.Default,setDataFormatType:t=>e(a=>({dataFormatType:t})),selectedID:"",setSelectedID:t=>e(a=>({selectedID:t})),newAnswerListMap:{},setNewAnswerListMap:t=>e(a=>({newAnswerListMap:t}))}));export{o as default};
@@ -1 +1 @@
1
- import{create as o}from"zustand";const a=o(e=>({ptCtx:{},pointCloudBoxList:[],setPointCloudBoxList:t=>e(s=>({pointCloudBoxList:t})),highlightIDs:[],setHighlightIDs:t=>e(s=>({highlightIDs:t})),selectedIDs:[],setSelectedIDs:t=>e(s=>({selectedIDs:t})),setPtCtx:t=>e(s=>({ptCtx:t}))}));export{a as default};
1
+ import{create as i}from"zustand";const o=i(e=>({ptCtx:{},pointCloudBoxList:[],setPointCloudBoxList:t=>e(s=>({pointCloudBoxList:t})),highlightIDs:[],setHighlightIDs:t=>e(s=>({highlightIDs:t})),selectedIDs:[],setSelectedIDs:t=>e(s=>({selectedIDs:t})),rectRotateSensitivity:2,setRectRotateSensitivity:t=>e(s=>({rectRotateSensitivity:t})),setPtCtx:t=>e(s=>({ptCtx:t}))}));export{o as default};
@@ -1 +1 @@
1
- import{ANNOTATION_ACTIONS as a}from"../Actions.js";import{LoadFileAndFileData as O,getStepConfig as M}from"./reducer.js";import{ESubmitType as _}from"../../constant/index.js";import{EPageTurningOperation as y}from"../../data/enums/AnnotationSize.js";import j from"../../utils/PageOperator.js";import{jsonParser as K}from"../../utils/index.js";import{getBoxesByTrackID as V}from"../../components/predictTracking/previewResult/util.js";var v=(t,e,n)=>new Promise((o,r)=>{var i=u=>{try{d(n.next(u))}catch(p){r(p)}},s=u=>{try{d(n.throw(u))}catch(p){r(p)}},d=u=>u.done?o(u.value):Promise.resolve(u.value).then(i,s);d((n=n.apply(t,e)).next())});const N=(t,e)=>e.map(n=>t(n)),J=t=>t===y.Forward?_.Forward:t===y.Backward?_.Backward:t===y.Jump?_.Jump:_.Forward,Y=(t,e)=>{var n,o;const{imgList:r,imgIndex:i}=t,{dataSourceStep:s}=M(t.stepList,t.step);return((o=(n=K(r[i-1].result)[`step_${s}`])==null?void 0:n.result)==null?void 0:o.length)-1||e};function W(t){return{type:a.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function x({stepList:t}){return{type:a.SET_TASK_STEP_LIST,payload:{stepList:t}}}function G({stepList:t,step:e}){return{type:a.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function P(t){return{type:a.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function U(t){return{type:a.UPDATE_ON_SAVE,payload:{onSave:t}}}function L(t){return{type:a.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function D(t){return{type:a.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function R(t){return{type:a.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function C(t){return{type:a.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function m(t){return{type:a.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function X(){return{type:a.UPDATE_ROTATE}}function w(t){return{type:a.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function g(t){return{type:a.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function h(t){return{type:a.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function q(){return{type:a.COPY_BACKWARD_RESULT}}function z({id:t,newID:e,rangeIndex:n,imgList:o}){return{type:a.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:o}}}function Z(t,e,n){return{type:a.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function $(){return{type:a.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const F=t=>({type:a.SET_CHECK_MODE,payload:{checkMode:t}}),B=t=>({type:a.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function Q({onSubmit:t,onSave:e,onPageChange:n,onStepChange:o,getFileData:r,pageSize:i,loadFileList:s,step:d,stepList:u,skipBeforePageTurning:p,beforeRotate:T,checkMode:l,highlightAttribute:E,preDataProcess:A}){const c=[];return t&&c.push(P(t)),e&&c.push(U(e)),n&&c.push(L(n)),o&&c.push(D(o)),r&&c.push(R(r)),s&&c.push(m(s)),i&&c.push(C(i)),p&&c.push(w(p)),T&&c.push(g(T)),A&&c.push(h(A)),typeof l=="boolean"&&c.push(F(l)),c.push(B(E)),c.push(G({stepList:u,step:d})),c.push({type:a.CALC_STEP_PROGRESS}),c.push({type:a.INIT_TOOL}),H=>N(H,c)}function tt({onSubmit:t,onSave:e,onPageChange:n,onStepChange:o,getFileData:r,pageSize:i,loadFileList:s,stepList:d,beforeRotate:u,highlightAttribute:p,preDataProcess:T}){const l=[];return t&&l.push(P(t)),e&&l.push(U(e)),n&&l.push(L(n)),o&&l.push(D(o)),r&&l.push(R(r)),s&&l.push(m(s)),i&&l.push(C(i)),u&&l.push(g(u)),T&&l.push(h(T)),l.push(B(p)),l.push(x({stepList:d})),E=>N(E,l)}const et=(t,e)=>{var n;const o=e==null?void 0:e.findIndex(r=>(r==null?void 0:r.step)===t);return(n=e[o+1])==null?void 0:n.step},nt=t=>(e,n)=>{const{annotation:o}=n(),{step:r,stepList:i}=o,s=et(r,i);return[e(k(s,t))]},k=(t,e)=>(n,o)=>{var r,i;const{annotation:s}=o();(r=s==null?void 0:s.onStepChange)==null||r.call(s,t);const d=(i=s==null?void 0:s.imgIndex)!=null?i:0;return[n({type:a.SUBMIT_RESULT}),n({type:a.SUBMIT_FILE_DATA,payload:{submitType:_.StepChanged}}),n({type:a.SET_STEP,payload:{toStep:t}}),n({type:a.CALC_STEP_PROGRESS}),n(O(e!=null?e:d,0))]},f=t=>e=>[e({type:a.SUBMIT_RESULT}),e({type:a.SUBMIT_FILE_DATA,payload:{submitType:t}})],at=(t,e,n,o)=>[t(f(n)),t(O(e,o))],ot=(t,e)=>[t({type:a.SUBMIT_RESULT}),t({type:a.SET_BASIC_INDEX,payload:{basicIndex:e}})],rt=(t,e)=>{t({type:a.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},it=(t=!1)=>(e,n)=>S(e,n,y.Backward,t),st=(t=!1)=>(e,n)=>S(e,n,y.Forward,t),ut=(t,e=!1)=>(n,o)=>{if(t!==o().imgIndex)return S(n,o,y.Jump,e,t)},b=(t,e,n,o)=>v(void 0,null,function*(){var r;const{loadFileList:i,imgList:s,pageSize:d}=e().annotation,u=Math.floor(n/d);I(t,!0);try{const p=yield i(u,d);if(I(t,!1),!((r=p==null?void 0:p.fileList)==null?void 0:r.length)||!(p==null?void 0:p.total))throw new Error("fileList and total are required");const T=o?new Array(p.total):[...s];return T.splice(u*d,d,...p.fileList),t({type:a.UPDATE_IMG_LIST,payload:{imgList:T}}),!0}catch(p){I(t,!1),console.error(p)}}),S=(t,e,n,o=!1,r)=>v(void 0,null,function*(){var i;const s=e().annotation,{fileIndexChanged:d,fileIndex:u,basicIndexChanged:p,basicIndex:T}=j.getNextPageInfo(n,s,r),l=J(n);if(rt(t,o),d){if(s.loading||!s.imgList[u]&&!(yield b(t,e,u)))return;(i=s.onPageChange)==null||i.call(s,u);const E=l===_.Backward?Y(e().annotation,T):T;return at(t,u,l,E)}return p?ot(t,T):t(f(l))}),pt=t=>{t(f(_.Save)),t({type:a.SAVE_RESULT})},I=(t,e)=>{t({type:a.SET_LOADING,payload:{loading:e}})},lt=(t,e)=>{t({type:a.SET_LOADING,payload:{loading:e}})},dt=(t,e)=>{t({type:a.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:e}})},ct=t=>{t({type:a.INIT_ALL_STATE,payload:{}})},Tt=(t,e)=>{t({type:a.SET_PREDICT_RESULT,payload:{result:e}})},_t=(t,e)=>{t({type:a.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},yt=(t,e)=>(n,o)=>{const{imgList:r,step:i}=o().annotation;return V(r,i,t,e)},Et=t=>(e,n)=>{var o,r;const{annotation:i}=n();return(r=(o=i==null?void 0:i.preDataProcess)==null?void 0:o.call(i,t))!=null?r:t.dataList};export{$ as BatchUpdateImgListResultByPredictResult,Z as BatchUpdateResultByTrackID,z as BatchUpdateTrackID,pt as ChangeSave,q as CopyBackWordResult,S as DispatcherTurning,yt as GetBoxesByID,ct as InitAnnotationState,Q as InitTaskData,it as PageBackward,st as PageForward,ut as PageJump,Et as PreDataProcess,I as SetAnnotationLoading,dt as SetLoadPCDFileLoading,lt as SetPointCloudLoading,Tt as SetPredictResult,_t as SetPredictResultVisible,G as SetTaskConfig,x as SetTaskStepList,nt as ToNextStep,f as ToSubmitFileData,g as UpdateBeforeRotate,F as UpdateCheckMode,R as UpdateGetFileData,m as UpdateGetFileList,B as UpdateHighlightAttribute,tt as UpdateInjectFunc,L as UpdateOnPageChange,U as UpdateOnSave,D as UpdateOnStepChange,P as UpdateOnSubmit,C as UpdatePageSize,h as UpdatePreDataProcess,k as UpdateProcessingStep,X as UpdateRotate,w as UpdateSkipBeforePageTurning,W as UpdateToolInstance,b as loadImgList};
1
+ import{ANNOTATION_ACTIONS as a}from"../Actions.js";import{LoadFileAndFileData as N,getStepConfig as V}from"./reducer.js";import{ESubmitType as E}from"../../constant/index.js";import{EPageTurningOperation as y}from"../../data/enums/AnnotationSize.js";import J from"../../utils/PageOperator.js";import{jsonParser as X}from"../../utils/index.js";import{getBoxesByTrackID as Y}from"../../components/predictTracking/previewResult/util.js";var S=(t,n,e)=>new Promise((o,r)=>{var i=l=>{try{u(e.next(l))}catch(p){r(p)}},s=l=>{try{u(e.throw(l))}catch(p){r(p)}},u=l=>l.done?o(l.value):Promise.resolve(l.value).then(i,s);u((e=e.apply(t,n)).next())});const G=(t,n)=>n.map(e=>t(e)),W=t=>t===y.Forward?E.Forward:t===y.Backward?E.Backward:t===y.Jump?E.Jump:E.Forward,q=(t,n)=>{var e,o,r;const{imgList:i,imgIndex:s}=t,{dataSourceStep:u}=V(t.stepList,t.step);return((r=(o=X((e=i[s-1])==null?void 0:e.result)[`step_${u}`])==null?void 0:o.result)==null?void 0:r.length)-1||n};function z(t){return{type:a.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function w({stepList:t}){return{type:a.SET_TASK_STEP_LIST,payload:{stepList:t}}}function F({stepList:t,step:n}){return{type:a.SET_TASK_CONFIG,payload:{stepList:t,step:n}}}function L(t){return{type:a.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function D(t){return{type:a.UPDATE_ON_SAVE,payload:{onSave:t}}}function m(t){return{type:a.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function R(t){return{type:a.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function g(t){return{type:a.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function h(t){return{type:a.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function B(t){return{type:a.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function Z(){return{type:a.UPDATE_ROTATE}}function k(t){return{type:a.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function C(t){return{type:a.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function v(t){return{type:a.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function $(){return{type:a.COPY_BACKWARD_RESULT}}function b(t){return{type:a.UPDATE_IMG_INDEX_BY_EXTERNAL,payload:{getImgIndexByExternal:t}}}function Q({id:t,newID:n,rangeIndex:e,imgList:o}){return{type:a.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:n,rangeIndex:e,imgList:o}}}function tt(t,n,e){return{type:a.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:n,rangeIndex:e}}}function nt(){return{type:a.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const H=t=>({type:a.SET_CHECK_MODE,payload:{checkMode:t}}),x=t=>({type:a.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function et({onSubmit:t,onSave:n,onPageChange:e,onStepChange:o,getFileData:r,pageSize:i,loadFileList:s,step:u,stepList:l,skipBeforePageTurning:p,beforeRotate:_,checkMode:c,highlightAttribute:T,preDataProcess:f,getImgIndexByExternal:I}){const d=[];return t&&d.push(L(t)),n&&d.push(D(n)),e&&d.push(m(e)),o&&d.push(R(o)),r&&d.push(g(r)),s&&d.push(B(s)),i&&d.push(h(i)),p&&d.push(k(p)),_&&d.push(C(_)),f&&d.push(v(f)),typeof c=="boolean"&&d.push(H(c)),I&&d.push(b(I)),d.push(x(T)),d.push(F({stepList:l,step:u})),d.push({type:a.CALC_STEP_PROGRESS}),d.push({type:a.INIT_TOOL}),O=>G(O,d)}function at({onSubmit:t,onSave:n,onPageChange:e,onStepChange:o,getFileData:r,pageSize:i,loadFileList:s,stepList:u,beforeRotate:l,highlightAttribute:p,preDataProcess:_}){const c=[];return t&&c.push(L(t)),n&&c.push(D(n)),e&&c.push(m(e)),o&&c.push(R(o)),r&&c.push(g(r)),s&&c.push(B(s)),i&&c.push(h(i)),l&&c.push(C(l)),_&&c.push(v(_)),c.push(x(p)),c.push(w({stepList:u})),T=>G(T,c)}const ot=(t,n)=>{var e;const o=n==null?void 0:n.findIndex(r=>(r==null?void 0:r.step)===t);return(e=n[o+1])==null?void 0:e.step},rt=t=>(n,e)=>{const{annotation:o}=e(),{step:r,stepList:i}=o,s=ot(r,i);return[n(M(s,t))]},M=(t,n)=>(e,o)=>{var r,i;const{annotation:s}=o();(r=s==null?void 0:s.onStepChange)==null||r.call(s,t);const u=(i=s==null?void 0:s.imgIndex)!=null?i:0;return[e({type:a.SUBMIT_RESULT}),e({type:a.SUBMIT_FILE_DATA,payload:{submitType:E.StepChanged}}),e({type:a.SET_STEP,payload:{toStep:t}}),e({type:a.CALC_STEP_PROGRESS}),e(N(n!=null?n:u,0))]},A=t=>n=>[n({type:a.SUBMIT_RESULT}),n({type:a.SUBMIT_FILE_DATA,payload:{submitType:t}})],it=(t,n,e,o)=>S(void 0,null,function*(){t(A(e)),yield t(K(e)),t(N(n,o))}),ut=(t,n)=>[t({type:a.SUBMIT_RESULT}),t({type:a.SET_BASIC_INDEX,payload:{basicIndex:n}})],st=(t,n)=>{t({type:a.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:n}})},lt=(t=!1)=>(n,e)=>P(n,e,y.Backward,t),pt=(t=!1)=>(n,e)=>P(n,e,y.Forward,t),dt=(t,n=!1)=>(e,o)=>{if(t!==o().imgIndex)return P(e,o,y.Jump,n,t)},j=(t,n,e,o)=>S(void 0,null,function*(){var r;const{loadFileList:i,imgList:s,pageSize:u}=n().annotation,l=Math.floor(e/u);U(t,!0);try{const p=yield i(l,u);if(U(t,!1),!((r=p==null?void 0:p.fileList)==null?void 0:r.length)||!(p==null?void 0:p.total))throw new Error("fileList and total are required");const _=o?new Array(p.total):[...s];return _.splice(l*u,u,...p.fileList),t({type:a.UPDATE_IMG_LIST,payload:{imgList:_}}),!0}catch(p){U(t,!1),console.error(p)}}),P=(t,n,e,o=!1,r)=>S(void 0,null,function*(){var i,s;const u=n().annotation,l=W(e);let{fileIndexChanged:p,fileIndex:_,basicIndexChanged:c,basicIndex:T}=J.getNextPageInfo(e,u,r);const f=(i=u==null?void 0:u.getImgIndexByExternal)==null?void 0:i.call(u,u.imgIndex,l);if(f!==void 0&&(p=!0,_=f),st(t,o),p){if(u.loading||!u.imgList[_]&&!(yield j(t,n,_)))return;const I=n();(s=u.onPageChange)==null||s.call(u,_);const d=l===E.Backward?q(I.annotation,T):T;return it(t,_,l,d)}return c?ut(t,T):t(A(l))}),ct=t=>{t(A(E.Save)),t({type:a.SAVE_RESULT})},U=(t,n)=>{t({type:a.SET_LOADING,payload:{loading:n}})},_t=(t,n)=>{t({type:a.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:n}})},Tt=t=>{t({type:a.INIT_ALL_STATE,payload:{}})},Et=(t,n)=>{t({type:a.SET_PREDICT_RESULT,payload:{result:n}})},yt=(t,n)=>{t({type:a.SET_PREDICT_RESULT_VISIBLE,payload:{visible:n}})},ft=(t,n)=>(e,o)=>{const{imgList:r,step:i}=o().annotation;return Y(r,i,t,n)},It=t=>(n,e)=>{var o,r;const{annotation:i}=e();return(r=(o=i==null?void 0:i.preDataProcess)==null?void 0:o.call(i,t))!=null?r:t.dataList},K=t=>(n,e)=>S(void 0,null,function*(){const{annotation:o}=e(),{onSubmit:r,imgIndex:i,imgList:s}=o;!r||(yield r([s[i]],t,i,s))});export{nt as BatchUpdateImgListResultByPredictResult,tt as BatchUpdateResultByTrackID,Q as BatchUpdateTrackID,ct as ChangeSave,$ as CopyBackWordResult,P as DispatcherTurning,ft as GetBoxesByID,Tt as InitAnnotationState,et as InitTaskData,lt as PageBackward,pt as PageForward,dt as PageJump,It as PreDataProcess,U as SetAnnotationLoading,_t as SetLoadPCDFileLoading,Et as SetPredictResult,yt as SetPredictResultVisible,F as SetTaskConfig,w as SetTaskStepList,K as SubmitHandler,rt as ToNextStep,A as ToSubmitFileData,C as UpdateBeforeRotate,H as UpdateCheckMode,g as UpdateGetFileData,B as UpdateGetFileList,x as UpdateHighlightAttribute,b as UpdateImgIndexByExternal,at as UpdateInjectFunc,m as UpdateOnPageChange,D as UpdateOnSave,R as UpdateOnStepChange,L as UpdateOnSubmit,h as UpdatePageSize,v as UpdatePreDataProcess,M as UpdateProcessingStep,Z as UpdateRotate,k as UpdateSkipBeforePageTurning,z as UpdateToolInstance,j as loadImgList};
@@ -1 +1 @@
1
- import{getFormatSize as At}from"../../components/customResizeHook/index.js";import{ESubmitType as K}from"../../constant/index.js";import Dt from"../../constant/styleString.js";import{ANNOTATION_ACTIONS as i}from"../Actions.js";import{jsonParser as w}from"../../utils/index.js";import Y from"../../utils/AnnotationDataUtils.js";import{ConfigUtils as vt}from"../../utils/ConfigUtils.js";import{composeResultWithBasicImgInfo as ut,composeResult as J}from"../../utils/data.js";import O from"../../utils/StepUtils.js";import X from"../../utils/ToolUtils.js";import{MathUtils as at,CommonToolUtils as yt,AnnotationEngine as Pt,ImgUtils as Rt}from"@labelbee/lb-annotation";import{PointCloudUtils as ct,i18n as G}from"@labelbee/lb-utils";import{Modal as dt}from"antd";import{message as pt}from"antd/es";import _t from"lodash";import{SetAnnotationLoading as $}from"./actionCreators.js";import{EToolName as W}from"../../data/enums/ToolType.js";var Ct=Object.defineProperty,Ot=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,It=(t,e,r)=>e in t?Ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,n=(t,e)=>{for(var r in e||(e={}))bt.call(e,r)&&It(t,r,e[r]);if(gt)for(var r of gt(e))Nt.call(e,r)&&It(t,r,e[r]);return t},l=(t,e)=>Ot(t,ht(e)),mt=(t,e,r)=>new Promise((S,d)=>{var A=m=>{try{T(r.next(m))}catch(y){d(y)}},f=m=>{try{T(r.throw(m))}catch(y){d(y)}},T=m=>m.done?S(m.value):Promise.resolve(m.value).then(A,f);T((r=r.apply(t,e)).next())});const x=(t,e)=>t.find(r=>r.step===e),ft={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},Ut=t=>{const{imgList:e,imgPageSize:r}=t;return Math.ceil(e.length/r)},Tt=(t,e)=>t.reduce((r,S)=>{if(S){const d=S.result;if(w(d)[`step_${e}`])return r+1}return r},0)/t.length,Bt=(t,e)=>{const{step:r,stepList:S}=t,d=O.getCurrentStepInfo(r,S),A=vt.jsonParser(d.config);if(X.isVideoTool(d==null?void 0:d.tool)||X.isAudioTool(d==null?void 0:d.tool)||X.isPointCloudTool(d==null?void 0:d.tool)||[W.LLM,W.NLP].includes(d==null?void 0:d.tool))return;const f=document.getElementById("toolContainer");if(!f)throw"Not exist dom named id-toolContainer";const T=At({width:window.innerWidth,height:window.innerHeight}),m=new Pt({container:f,toolName:d.tool,size:T,imgNode:e,config:A,style:JSON.parse(Dt)});return{toolInstance:m==null?void 0:m.toolInstance,annotationEngine:m}},wt=(t,e)=>(r,S)=>mt(void 0,null,function*(){var d,A;const{stepList:f,step:T}=S().annotation,m=O.currentToolIsVideo(T,f),y=O.currentToolIsPointCloud(T,f),h=((d=O.getCurrentStepInfo(T,f))==null?void 0:d.tool)===W.LLM,b=((A=O.getCurrentStepInfo(T,f))==null?void 0:A.tool)===W.NLP,N=O.currentToolIsAudio(T,f);if($(r,!0),yield r(xt(t)),m){r(Ft(t));return}if(y||h||N||b){r(jt(t));return}r(Gt(t,e))}),xt=t=>(e,r)=>mt(void 0,null,function*(){const{getFileData:S,imgList:d}=r().annotation;if(S){const A=yield S(d[t],t);e({type:i.SET_FILE_DATA,payload:{fileData:A,index:t}})}}),Ft=t=>e=>{e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},jt=t=>e=>{$(e,!1),e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},Gt=(t,e)=>(r,S)=>{var d;const{toolInstance:A,imgList:f}=S().annotation,T=(d=f==null?void 0:f[t])==null?void 0:d.url;Rt.load(T).then(m=>{$(r,!1),r({type:i.LOAD_FILE_DATA,payload:{imgNode:m,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{$(r,!1),A==null||A.setErrorImg(),r({type:i.LOAD_FILE_DATA,payload:{nextIndex:t,nextBasicIndex:e}})})},Vt=({toolInstance:t,imgList:e,imgIndex:r,stepList:S,step:d=1})=>{var A,f,T,m;const y=((A=e[r])==null?void 0:A.result)||"",[h,b,N]=(f=t==null?void 0:t.exportData())!=null?f:[],V=(m=(T=t==null?void 0:t.exportCustomData)==null?void 0:T.call(t))!=null?m:{},M=ut(y,b),k=J(M,{step:d,stepList:S},{rect:h},V);return e.map((F,H)=>H===r?n(l(n({},F),{result:k}),N):n({},F))},Mt=(t=n({},ft),e)=>{var r,S,d,A,f,T,m,y,h,b,N,V,M,k,F,H,q,Z,Q,tt,et,ot,nt,st,lt;switch(e.type){case i.INIT_ALL_STATE:return n(n({},t),ft);case i.UPDATE_TOOL_INSTANCE:return l(n({},t),{toolInstance:e.payload.toolInstance});case i.UPDATE_IMG_LIST:return l(n({},t),{imgList:e.payload.imgList});case i.CALC_STEP_PROGRESS:{const{imgList:o,step:s}=t,u=Tt(o,s);return l(n({},t),{stepProgress:u})}case i.SUBMIT_FILE_DATA:{const{imgList:o,imgIndex:s,step:u,stepList:a,toolInstance:p,onSubmit:c,resultList:L}=t;if(!p||!o[s])return t;const g=((r=o[s])==null?void 0:r.result)||"",[,_,I]=(S=p==null?void 0:p.exportData())!=null?S:[],E=(A=(d=p==null?void 0:p.exportCustomData)==null?void 0:d.call(p))!=null?A:{},D=ut(g,_),P=J(D,{step:u,stepList:a},{rect:L},E),v=t.imgList.map((C,R)=>{if(R===s){const j=Y.dataCorrection(P,g,u,a);return n(l(n({},C),{result:j}),I)}return C});if(((f=e.payload)==null?void 0:f.submitType)===K.SyncImgList)return l(n({},t),{imgList:v});c&&c([v[s]],(T=e.payload)==null?void 0:T.submitType,s,v);const U=Tt(v,u);return l(n({},t),{stepProgress:U,imgList:v})}case i.SAVE_RESULT:{const{imgList:o,imgIndex:s,onSave:u}=t;return u==null||u(o[s],s,o),n({},t)}case i.SUBMIT_RESULT:{const{imgList:o,basicIndex:s,resultList:u,toolInstance:a,basicResultList:p}=t;if(!a)return t;const[c]=(m=a==null?void 0:a.exportData())!=null?m:[];let L=c;if((p==null?void 0:p.length)>0){const g=(y=p[s])==null?void 0:y.id,_=c.map(I=>l(n({},I),{sourceID:g}));L=_t.cloneDeep(u).filter(I=>I.sourceID!==g),L.push(..._)}return l(n({},t),{resultList:L,imgList:o})}case i.SET_BASIC_INDEX:{const{toolInstance:o,step:s,imgList:u,imgIndex:a,stepList:p,annotationEngine:c,resultList:L,basicResultList:g}=t;if(!o||!c)return t;const _=e.payload.basicIndex,I=(h=g[_])==null?void 0:h.id,E=w((b=u[a])==null?void 0:b.result),D=(L||[]).filter(j=>j.sourceID===I),P=x(p,s),{dataSourceStep:v,tool:U}=P,C=x(p,v);let R=[];return v&&U&&(R=(N=E[`step_${v}`])==null?void 0:N.result,(R==null?void 0:R.length)>0?(c==null||c.setBasicInfo(C.tool,R[_]),c==null||c.launchOperation()):(c==null||c.setBasicInfo(C.tool),c==null||c.forbidOperation(),pt.info(G.t("NoDependency")))),o==null||o.setResult(D),o==null||o.history.initRecord(D,!0),l(n({},t),{basicIndex:_})}case i.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:o}=e.payload;return l(n({},t),{triggerEventAfterIndexChanged:!!o})}case i.LOAD_FILE_DATA:{const{imgList:o,step:s,toolInstance:u,annotationEngine:a,stepList:p}=t;if(!u)return l(n({},t),{imgIndex:e.payload.nextIndex});const c=O.getCurrentStepInfo(s,p),{nextIndex:L,imgNode:g,nextBasicIndex:_,imgError:I}=e.payload,E=_!=null?_:0,D=w((V=o[L])==null?void 0:V.result),P=D[`step_${c.step}`],v=!P,U={rotate:(M=D.rotate)!=null?M:0,valid:(k=D.valid)!=null?k:!0};g&&I!==!0?a==null||a.setImgNode(g,U):u==null||u.setValid(U.valid);const C=x(p,c.step),{dataSourceStep:R,tool:j}=C,it=x(p,R),rt=R&&j,B=(H=(F=D[`step_${R}`])==null?void 0:F.result)!=null?H:[],z=Y.getInitialResultList(P==null?void 0:P.result,u,C,B,v);if(a==null||a.launchOperation(),rt&&((B==null?void 0:B.length)>0?a==null||a.setBasicInfo(it.tool,B[E]):(a==null||a.setBasicInfo(it.tool),a==null||a.forbidOperation(),pt.info(G.t("NoDependency")))),c.tool!=="check"){const Lt=(Z=(q=B[E])==null?void 0:q.id)!=null?Z:"",Et=rt?z.filter(St=>yt.isSameSourceID(St.sourceID,Lt)):z;(Q=u==null?void 0:u.history)==null||Q.initRecord(z,!0),u==null||u.setResult(Et)}return l(n({},t),{imgIndex:L,basicIndex:E,basicResultList:B,resultList:z})}case i.UPDATE_ANNOTATION_CONFIG:return l(n({},t),{config:(tt=e.payload.config)!=null?tt:"{}"});case i.SET_TASK_STEP_LIST:{const{stepList:o}=e.payload;return l(n({},t),{stepList:o})}case i.SET_TASK_CONFIG:{const{stepList:o,step:s}=e.payload;return l(n({},t),{stepList:o,step:s})}case i.INIT_TOOL:{const{imgNode:o}=t,s=Bt(t,o);if(s){const{toolInstance:u,annotationEngine:a}=s;return l(n({},t),{toolInstance:u,annotationEngine:a})}return n({},t)}case i.SET_TOOL:{const o=(et=e.payload)==null?void 0:et.instance;return o?l(n({},t),{toolInstance:o}):n({},t)}case i.UPDATE_ON_SUBMIT:return l(n({},t),{onSubmit:e.payload.onSubmit});case i.UPDATE_ON_SAVE:return l(n({},t),{onSave:e.payload.onSave});case i.UPDATE_ON_PAGE_CHANGE:return l(n({},t),{onPageChange:e.payload.onPageChange});case i.SET_PREDICT_RESULT:return l(n({},t),{predictionResult:e.payload.result});case i.SET_PREDICT_RESULT_VISIBLE:return l(n({},t),{predictionResultVisible:e.payload.visible});case i.UPDATE_ON_STEP_CHANGE:return l(n({},t),{onStepChange:e.payload.onStepChange});case i.UPDATE_GET_FILE_DATA:return l(n({},t),{getFileData:e.payload.getFileData});case i.UPDATE_PAGE_SIZE:return l(n({},t),{pageSize:e.payload.pageSize});case i.UPDATE_LOAD_FILE_LIST:return l(n({},t),{loadFileList:e.payload.loadFileList});case i.UPDATE_BEFORE_ROTATE:return l(n({},t),{beforeRotate:e.payload.beforeRotate});case i.UPDATE_PRE_DATA_PROCESS:return l(n({},t),{preDataProcess:e.payload.preDataProcess});case i.SKIP_BEFORE_PAGE_TURNING:return l(n({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case i.SET_FILE_DATA:{const{fileData:o,index:s}=e.payload,{imgList:u}=t,a=[...u];return a[s]=n(n({},a[s]),o),l(n({},t),{imgList:a})}case i.UPDATE_ROTATE:{const{toolInstance:o,beforeRotate:s}=t;return s&&s()===!1||(ot=o==null?void 0:o.updateRotate)==null||ot.call(o),t}case i.UPDATE_ANNOTATION_VALID:{const{toolInstance:o}=t,s=(nt=o==null?void 0:o.valid)!=null?nt:!0;return dt.destroyAll(),dt.confirm({content:G.t(s?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{o==null||o.setValid(!s)},okText:G.t("Confirm"),cancelText:G.t("Cancel")}),t}case i.COPY_BACKWARD_RESULT:{const{toolInstance:o,imgIndex:s,imgList:u,step:a}=t;if(!o)return t;if(s===0||s>=u.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),t;const p=u[s-1].result;if(!p)return t;const c=Y.copyResultChange(p,a,(st=u[s].result)!=null?st:"");u[s]=l(n({},u[s]),{result:c});const g=w(c)[`step_${a}`],_=(g==null?void 0:g.result)||[];return o==null||o.setResult(_),o==null||o.history.pushHistory(_),(lt=o==null?void 0:o.asyncData)==null||lt.call(o,u[s]),l(n({},t),{imgList:[...u]})}case i.SET_STEP:{const{stepList:o,annotationEngine:s}=t,{toStep:u}=e.payload;if(s){const a=x(o,u);return s==null||s.setToolName(a.tool,a.config),l(n({},t),{step:u,toolInstance:s==null?void 0:s.toolInstance})}return l(n({},t),{step:u})}case i.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:o}=e.payload;return l(n({},t),{loadPCDFileLoading:!!o})}case i.SET_LOADING:{const{loading:o}=e.payload;return l(n({},t),{loading:!!o})}case i.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:o}=e.payload;return l(n({},t),{pointCloudLoading:!!o})}case i.SET_CHECK_MODE:{const{checkMode:o}=e.payload;return l(n({},t),{checkMode:!!o})}case i.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:o}=e.payload;return l(n({},t),{highlightAttribute:o})}case i.BATCH_UPDATE_TRACK_ID:{const{id:o,newID:s,rangeIndex:u,imgList:a}=e.payload,{imgIndex:p,onSubmit:c}=t,L=[],g=a.map((_,I)=>{if(at.isInRange(I,u)){const E=l(n({},_),{result:ct.batchUpdateTrackID({id:o,newID:s,result:_.result})});return L.push({imgIndex:I,newInfo:E}),E}return _});return c&&c([g[p]],K.BatchUpdateTrackID,p,g,{updateImgList:L}),l(n({},t),{imgList:g})}case i.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:o,newData:s,rangeIndex:u}=e.payload,{imgList:a,imgIndex:p,onSubmit:c}=t,L=[],g=a.map((_,I)=>{if(at.isInRange(I,u)){const E=l(n({},_),{result:ct.batchUpdateResultByTrackID({id:o,newData:s,result:_.result})});return L.push({imgIndex:I,newInfo:E}),E}return _});return c&&c([g[p]],K.BatchUpdateTrackID,p,g,{updateImgList:L}),l(n({},t),{imgList:g})}case i.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:o,imgList:s,stepList:u,step:a,predictionResult:p}=t,c={};p.forEach(I=>{const{index:E}=I;c[E]=_t.pick(I,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const L=`step_${a}`,g=[],_=s.map((I,E)=>{if(c[E]){const D=I.result==="{}"?w(J("",{step:a,stepList:u},{rect:[]},{})):w(I.result);D[L].result.push(c[E]);const P=l(n({},I),{result:JSON.stringify(D)});return g.push({imgIndex:E,newInfo:P}),P}return I});return o==null||o(_,K.BatchUpdateImgList,-1,_,{updateImgList:g}),l(n({},t),{imgList:_})}default:return t}};export{wt as LoadFileAndFileData,Mt as annotationReducer,Vt as composeResultByToolInstance,x as getStepConfig,Ut as getTotalPage};
1
+ import{getFormatSize as yt}from"../../components/customResizeHook/index.js";import{ESubmitType as W}from"../../constant/index.js";import Rt from"../../constant/styleString.js";import{ANNOTATION_ACTIONS as i}from"../Actions.js";import{jsonParser as x}from"../../utils/index.js";import X from"../../utils/AnnotationDataUtils.js";import{ConfigUtils as Pt}from"../../utils/ConfigUtils.js";import{composeResultWithBasicImgInfo as dt,composeResult as Y}from"../../utils/data.js";import h from"../../utils/StepUtils.js";import J from"../../utils/ToolUtils.js";import{MathUtils as pt,CommonToolUtils as Ct,AnnotationEngine as ht,ImgUtils as Ot}from"@labelbee/lb-annotation";import{PointCloudUtils as gt,i18n as M}from"@labelbee/lb-utils";import{Modal as _t}from"antd";import{message as It}from"antd/es";import mt from"lodash";import{SetAnnotationLoading as $}from"./actionCreators.js";import{EToolName as w}from"../../data/enums/ToolType.js";var bt=Object.defineProperty,Nt=Object.defineProperties,Ut=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,Lt=(t,e,u)=>e in t?bt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,o=(t,e)=>{for(var u in e||(e={}))Bt.call(e,u)&&Lt(t,u,e[u]);if(ft)for(var u of ft(e))xt.call(e,u)&&Lt(t,u,e[u]);return t},s=(t,e)=>Nt(t,Ut(e)),Tt=(t,e,u)=>new Promise((S,d)=>{var A=m=>{try{E(u.next(m))}catch(y){d(y)}},T=m=>{try{E(u.throw(m))}catch(y){d(y)}},E=m=>m.done?S(m.value):Promise.resolve(m.value).then(A,T);E((u=u.apply(t,e)).next())});const F=(t,e)=>t.find(u=>u.step===e),Et={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},wt=t=>{const{imgList:e,imgPageSize:u}=t;return Math.ceil(e.length/u)},St=(t,e)=>t.reduce((u,S)=>{if(S){const d=S.result;if(x(d)[`step_${e}`])return u+1}return u},0)/t.length,Ft=(t,e)=>{const{step:u,stepList:S}=t,d=h.getCurrentStepInfo(u,S),A=Pt.jsonParser(d.config);if(J.isVideoTool(d==null?void 0:d.tool)||J.isAudioTool(d==null?void 0:d.tool)||J.isPointCloudTool(d==null?void 0:d.tool)||[w.LLM,w.NLP,w.LLMMultiWheel].includes(d==null?void 0:d.tool))return;const T=document.getElementById("toolContainer");if(!T)throw"Not exist dom named id-toolContainer";const E=yt({width:window.innerWidth,height:window.innerHeight}),m=new ht({container:T,toolName:d.tool,size:E,imgNode:e,config:A,style:JSON.parse(Rt)});return{toolInstance:m==null?void 0:m.toolInstance,annotationEngine:m}},jt=(t,e)=>(u,S)=>Tt(void 0,null,function*(){var d,A;const{stepList:T,step:E}=S().annotation,m=h.currentToolIsVideo(E,T),y=h.currentToolIsPointCloud(E,T),O=[w.LLM,w.LLMMultiWheel].includes((d=h.getCurrentStepInfo(E,T))==null?void 0:d.tool),b=((A=h.getCurrentStepInfo(E,T))==null?void 0:A.tool)===w.NLP,N=h.currentToolIsAudio(E,T);if($(u,!0),yield u(Gt(t)),m){u(Mt(t));return}if(y||O||N||b){u(Vt(t));return}u(kt(t,e))}),Gt=t=>(e,u)=>Tt(void 0,null,function*(){const{getFileData:S,imgList:d}=u().annotation;if(S){const A=yield S(d[t],t);e({type:i.SET_FILE_DATA,payload:{fileData:A,index:t}})}}),Mt=t=>e=>{e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},Vt=t=>e=>{$(e,!1),e({type:i.LOAD_FILE_DATA,payload:{nextIndex:t}})},kt=(t,e)=>(u,S)=>{var d;const{toolInstance:A,imgList:T}=S().annotation,E=(d=T==null?void 0:T[t])==null?void 0:d.url;Ot.load(E).then(m=>{$(u,!1),u({type:i.LOAD_FILE_DATA,payload:{imgNode:m,nextIndex:t,nextBasicIndex:e}})}).catch(()=>{$(u,!1),A==null||A.setErrorImg(),u({type:i.LOAD_FILE_DATA,payload:{nextIndex:t,nextBasicIndex:e}})})},Ht=({toolInstance:t,imgList:e,imgIndex:u,stepList:S,step:d=1})=>{var A,T,E,m;const y=((A=e[u])==null?void 0:A.result)||"",[O,b,N]=(T=t==null?void 0:t.exportData())!=null?T:[],V=(m=(E=t==null?void 0:t.exportCustomData)==null?void 0:E.call(t))!=null?m:{},k=dt(y,b),H=Y(k,{step:d,stepList:S},{rect:O},V);return e.map((j,z)=>z===u?o(s(o({},j),{result:H}),N):o({},j))},zt=(t=o({},Et),e)=>{var u,S,d,A,T,E,m,y,O,b,N,V,k,H,j,z,q,Z,Q,tt,et,nt,ot,lt,st,it,rt,ut;switch(e.type){case i.INIT_ALL_STATE:return o(o({},t),Et);case i.UPDATE_TOOL_INSTANCE:return s(o({},t),{toolInstance:e.payload.toolInstance});case i.UPDATE_IMG_LIST:return s(o({},t),{imgList:e.payload.imgList});case i.CALC_STEP_PROGRESS:{const{imgList:n,step:l}=t,r=St(n,l);return s(o({},t),{stepProgress:r})}case i.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:l,step:r,stepList:a,toolInstance:p,onSubmit:c,resultList:f}=t;if(!p||!n[l])return t;const I=((u=n[l])==null?void 0:u.result)||"",[,_,g]=(S=p==null?void 0:p.exportData())!=null?S:[],L=(A=(d=p==null?void 0:p.exportCustomData)==null?void 0:d.call(p))!=null?A:{},D=dt(I,_),v=Y(D,{step:r,stepList:a},{rect:f},L),P=t.imgList.map((C,R)=>{if(R===l){const G=X.dataCorrection(v,I,r,a);return o(s(o({},C),{result:G}),g)}return C});if(((T=e.payload)==null?void 0:T.submitType)===W.SyncImgList)return s(o({},t),{imgList:P});const U=St(P,r);return s(o({},t),{stepProgress:U,imgList:P})}case i.SAVE_RESULT:{const{imgList:n,imgIndex:l,onSave:r}=t;return r==null||r(n[l],l,n),o({},t)}case i.SUBMIT_RESULT:{const{imgList:n,basicIndex:l,resultList:r,toolInstance:a,basicResultList:p}=t;if(!a)return t;const[c]=(E=a==null?void 0:a.exportData())!=null?E:[];let f=c;if((p==null?void 0:p.length)>0){const I=(m=p[l])==null?void 0:m.id,_=c.map(g=>s(o({},g),{sourceID:I}));f=mt.cloneDeep(r).filter(g=>g.sourceID!==I),f.push(..._)}return s(o({},t),{resultList:f,imgList:n})}case i.SET_BASIC_INDEX:{const{toolInstance:n,step:l,imgList:r,imgIndex:a,stepList:p,annotationEngine:c,resultList:f,basicResultList:I}=t;if(!n||!c)return t;const _=e.payload.basicIndex,g=(y=I[_])==null?void 0:y.id,L=x((O=r[a])==null?void 0:O.result),D=(f||[]).filter(G=>G.sourceID===g),v=F(p,l),{dataSourceStep:P,tool:U}=v,C=F(p,P);let R=[];return P&&U&&(R=(b=L[`step_${P}`])==null?void 0:b.result,(R==null?void 0:R.length)>0?(c==null||c.setBasicInfo(C.tool,R[_]),c==null||c.launchOperation()):(c==null||c.setBasicInfo(C.tool),c==null||c.forbidOperation(),It.info(M.t("NoDependency")))),n==null||n.setResult(D),n==null||n.history.initRecord(D,!0),s(o({},t),{basicIndex:_})}case i.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=e.payload;return s(o({},t),{triggerEventAfterIndexChanged:!!n})}case i.LOAD_FILE_DATA:{const{imgList:n,step:l,toolInstance:r,annotationEngine:a,stepList:p}=t;if(!r)return s(o({},t),{imgIndex:e.payload.nextIndex});const c=h.getCurrentStepInfo(l,p),{nextIndex:f,imgNode:I,nextBasicIndex:_,imgError:g}=e.payload,L=_!=null?_:0,D=x((N=n[f])==null?void 0:N.result),v=D[`step_${c.step}`],P=!v,U={rotate:(V=D.rotate)!=null?V:0,valid:(k=D.valid)!=null?k:!0};I&&g!==!0?a==null||a.setImgNode(I,U):r==null||r.setValid(U.valid);const C=F(p,c.step),{dataSourceStep:R,tool:G}=C,at=F(p,R),ct=R&&G,B=(j=(H=D[`step_${R}`])==null?void 0:H.result)!=null?j:[],K=X.getInitialResultList(v==null?void 0:v.result,r,C,B,P);if(a==null||a.launchOperation(),ct&&((B==null?void 0:B.length)>0?a==null||a.setBasicInfo(at.tool,B[L]):(a==null||a.setBasicInfo(at.tool),a==null||a.forbidOperation(),It.info(M.t("NoDependency")))),c.tool!=="check"){const At=(q=(z=B[L])==null?void 0:z.id)!=null?q:"",Dt=ct?K.filter(vt=>Ct.isSameSourceID(vt.sourceID,At)):K;(Z=r==null?void 0:r.history)==null||Z.initRecord(K,!0),r==null||r.setResult(Dt)}return s(o({},t),{imgIndex:f,basicIndex:L,basicResultList:B,resultList:K})}case i.UPDATE_ANNOTATION_CONFIG:return s(o({},t),{config:(Q=e.payload.config)!=null?Q:"{}"});case i.SET_TASK_STEP_LIST:{const{stepList:n}=e.payload;return s(o({},t),{stepList:n})}case i.SET_TASK_CONFIG:{const{stepList:n,step:l}=e.payload;return s(o({},t),{stepList:n,step:l})}case i.INIT_TOOL:{const{imgNode:n}=t,l=Ft(t,n);if(l){const{toolInstance:r,annotationEngine:a}=l;return s(o({},t),{toolInstance:r,annotationEngine:a})}return o({},t)}case i.SET_TOOL:{const n=(tt=e.payload)==null?void 0:tt.instance;return n?s(o({},t),{toolInstance:n}):o({},t)}case i.UPDATE_ON_SUBMIT:return s(o({},t),{onSubmit:e.payload.onSubmit});case i.UPDATE_ON_SAVE:return s(o({},t),{onSave:e.payload.onSave});case i.UPDATE_ON_PAGE_CHANGE:return s(o({},t),{onPageChange:e.payload.onPageChange});case i.SET_PREDICT_RESULT:return s(o({},t),{predictionResult:e.payload.result});case i.SET_PREDICT_RESULT_VISIBLE:return s(o({},t),{predictionResultVisible:e.payload.visible});case i.UPDATE_ON_STEP_CHANGE:return s(o({},t),{onStepChange:e.payload.onStepChange});case i.UPDATE_GET_FILE_DATA:return s(o({},t),{getFileData:e.payload.getFileData});case i.UPDATE_PAGE_SIZE:return s(o({},t),{pageSize:e.payload.pageSize});case i.UPDATE_LOAD_FILE_LIST:return s(o({},t),{loadFileList:e.payload.loadFileList});case i.UPDATE_BEFORE_ROTATE:return s(o({},t),{beforeRotate:e.payload.beforeRotate});case i.UPDATE_PRE_DATA_PROCESS:return s(o({},t),{preDataProcess:e.payload.preDataProcess});case i.UPDATE_IMG_INDEX_BY_EXTERNAL:return s(o({},t),{getImgIndexByExternal:e.payload.getImgIndexByExternal});case i.SKIP_BEFORE_PAGE_TURNING:return s(o({},t),{skipBeforePageTurning:e.payload.skipBeforePageTurning});case i.SET_FILE_DATA:{const{fileData:n,index:l}=e.payload,{imgList:r}=t,a=[...r];return a[l]=o(o({},a[l]),n),s(o({},t),{imgList:a})}case i.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:l}=t;return l&&l()===!1||(et=n==null?void 0:n.updateRotate)==null||et.call(n),t}case i.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=t,l=(nt=n==null?void 0:n.valid)!=null?nt:!0;return _t.destroyAll(),_t.confirm({content:M.t(l?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!l)},okText:M.t("Confirm"),cancelText:M.t("Cancel")}),t}case i.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:l,imgList:r,step:a,stepList:p}=t;if(!n)return t;if(l===0||l>=r.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),t;const c=r[l-1].result;if(!c)return t;const f=h.getCurrentStepInfo(a,p),I=(ot=f==null?void 0:f.step)!=null?ot:a,_=(lt=n==null?void 0:n.valid)!=null?lt:!0,g=X.copyResultChange({copyResult:c,step:I,currentResult:(st=r[l].result)!=null?st:"",preMappingImgList:(it=r[l-1].mappingImgList)!=null?it:[],mappingImgList:(rt=r[l].mappingImgList)!=null?rt:[],valid:_});r[l]=s(o({},r[l]),{result:g});const D=x(g)[`step_${a}`],v=(D==null?void 0:D.result)||[];return n==null||n.setResult(v),n==null||n.history.pushHistory(v),(ut=n==null?void 0:n.asyncData)==null||ut.call(n,r[l]),s(o({},t),{imgList:[...r]})}case i.SET_STEP:{const{stepList:n,annotationEngine:l}=t,{toStep:r}=e.payload;if(l){const a=F(n,r);return l==null||l.setToolName(a.tool,a.config),s(o({},t),{step:r,toolInstance:l==null?void 0:l.toolInstance})}return s(o({},t),{step:r})}case i.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=e.payload;return s(o({},t),{loadPCDFileLoading:!!n})}case i.SET_LOADING:{const{loading:n}=e.payload;return s(o({},t),{loading:!!n})}case i.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=e.payload;return s(o({},t),{pointCloudLoading:!!n})}case i.SET_CHECK_MODE:{const{checkMode:n}=e.payload;return s(o({},t),{checkMode:!!n})}case i.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=e.payload;return s(o({},t),{highlightAttribute:n})}case i.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:l,rangeIndex:r,imgList:a}=e.payload,{imgIndex:p,onSubmit:c}=t,f=[],I=a.map((_,g)=>{if(pt.isInRange(g,r)){const L=s(o({},_),{result:gt.batchUpdateTrackID({id:n,newID:l,result:_.result})});return f.push({imgIndex:g,newInfo:L}),L}return _});return c&&c([I[p]],W.BatchUpdateTrackID,p,I,{updateImgList:f}),s(o({},t),{imgList:I})}case i.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:l,rangeIndex:r}=e.payload,{imgList:a,imgIndex:p,onSubmit:c}=t,f=[],I=a.map((_,g)=>{if(pt.isInRange(g,r)){const L=s(o({},_),{result:gt.batchUpdateResultByTrackID({id:n,newData:l,result:_.result})});return f.push({imgIndex:g,newInfo:L}),L}return _});return c&&c([I[p]],W.BatchUpdateTrackID,p,I,{updateImgList:f}),s(o({},t),{imgList:I})}case i.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:l,stepList:r,step:a,predictionResult:p}=t,c={};p.forEach(g=>{const{index:L}=g;c[L]=mt.pick(g,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const f=`step_${a}`,I=[],_=l.map((g,L)=>{if(c[L]){const D=g.result==="{}"?x(Y("",{step:a,stepList:r},{rect:[]},{})):x(g.result);D[f].result.push(c[L]);const v=s(o({},g),{result:JSON.stringify(D)});return I.push({imgIndex:L,newInfo:v}),v}return g});return n==null||n(_,W.BatchUpdateImgList,-1,_,{updateImgList:I}),s(o({},t),{imgList:_})}default:return t}};export{jt as LoadFileAndFileData,zt as annotationReducer,Ht as composeResultByToolInstance,F as getStepConfig,wt as getTotalPage};
package/es/store/ctx.js CHANGED
@@ -1 +1 @@
1
- import e from"react";import{createDispatchHook as o,createSelectorHook as s}from"react-redux";const t=e.createContext(void 0),r=o(t),c=s(t),n=e.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}}),a=e.createContext({highlightKey:"",setHighlightKey:()=>{}});export{n as LLMContext,t as LabelBeeContext,a as NLPContext,r as useDispatch,c as useSelector};
1
+ import e from"react";import{createDispatchHook as o,createSelectorHook as s}from"react-redux";const t=e.createContext(void 0),r=o(t),c=s(t),n=e.createContext({hoverKey:-1,newAnswerList:[],setHoverKey:()=>{},modelAPIResponse:[],setModelAPIResponse:()=>{},setNewAnswerList:()=>{}}),a=e.createContext({highlightKey:"",setHighlightKey:()=>{}});e.createContext({hoverKey:-1,setHoverKey:()=>{},selectKey:1,setSelectKey:()=>{}});export{n as LLMContext,t as LabelBeeContext,a as NLPContext,r as useDispatch,c as useSelector};
@@ -0,0 +1 @@
1
+ const e=(t,o)=>({onlyLoadFirstData:!1,setOnlyLoadFirstData:a=>t(s=>({onlyLoadFirstData:a}))});export{e as default};
@@ -0,0 +1 @@
1
+ import{create as l}from"zustand";import n from"./baseToolConfig.js";import f from"./pointCloudToolConfig.js";var i=Object.defineProperty,t=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,a=(e,r,o)=>r in e?i(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,p=(e,r)=>{for(var o in r||(r={}))s.call(r,o)&&a(e,o,r[o]);if(t)for(var o of t(r))u.call(r,o)&&a(e,o,r[o]);return e};const m=l((e,r,o)=>p(p({},n(e)),f(e)));export{m as default};
@@ -0,0 +1 @@
1
+ const o=(e,l)=>({selectBoxVisibleSwitch:!1,setSelectBoxVisibleSwitch:t=>e(()=>({selectBoxVisibleSwitch:t}))});export{o as default};
@@ -1 +1 @@
1
- import{uuid as v}from"@labelbee/lb-annotation";import{jsonParser as l}from"./index.js";import{EToolName as d}from"../data/enums/ToolType.js";import _ from"lodash";import y from"./StepUtils.js";var O=Object.defineProperty,P=Object.defineProperties,j=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,S=(a,t,e)=>t in a?O(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,E=(a,t)=>{for(var e in t||(t={}))w.call(t,e)&&S(a,e,t[e]);if(h)for(var e of h(t))x.call(t,e)&&S(a,e,t[e]);return a},N=(a,t)=>P(a,j(t));class R{static copyResultChange(t,e,r){try{const s=l(t),i=l(r),o=`step_${e}`;if(s[o]){const n=s[o];if(n.result)return n.result=n.result.map(u=>N(E({},u),{id:v(8,62)})),i[o]=n,JSON.stringify(i)}return t}catch(s){return t}}static isResultSourceMatchedDependence(t,e){const r=t==null?void 0:t.map(i=>i.sourceID).sort(),s=e==null?void 0:e.map(i=>i.id).sort();return _.isEqual(r,s)}static deltaUpdateBasicResultList(t,e){const r=t==null?void 0:t.map(s=>s.sourceID).sort();return e.filter(s=>!r.includes(s.id))}static getInitialResultList(t,e,r,s,i){const o=t!=null?t:[];switch(r.tool){case d.Tag:case d.Text:{if(r.dataSourceStep>0){const n=this.deltaUpdateBasicResultList(o,s);if(n.length>0)return o.concat(e.getInitResultList(r.dataSourceStep,n))}return i!==!0?o:e.getInitResultList(r.dataSourceStep,s)}default:return o}}static dataCorrection(t,e,r,s){var i,o;try{const u=`step_${y.getStepInfo(r,s).step}`,c=l(t),I=l(e),f=(i=c[u])==null?void 0:i.result,p=(o=I[u])==null?void 0:o.result;if(!p||_.isEqual(f.sort(this.idCmp),p.sort(this.idCmp)))return t;const m=this.findDeletedIds(f,p);if(m.length===0)return t;const D=r,g=this.getStepKeys(c).sort();return this.deleteRes(c,D,m,g),JSON.stringify(c)}catch(n){return console.error(n),t}}static idCmp(t,e){const r=t.id,s=e.id;return r<s?-1:r>s?1:0}static findDeletedIds(t,e){return this.findDeletedItems(e,t).map(r=>r.id)}static findDeletedItems(t,e){const r=[];return t.forEach(s=>{e.some(o=>o.id===s.id)||r.push(s)}),r}static getStepKeys(t){return Object.keys(t).map(e=>parseInt(e.replace("step_",""),10)).filter(e=>!isNaN(e))}static deleteRes(t,e,r,s){s.forEach(i=>{if(i>e){const o=t[`step_${i}`];if([d.FolderTag,d.Segmentation].includes(o.tool))return;if(o.dataSourceStep===e){const n=[];o.result=o.result.filter(u=>r.includes(u.sourceID)?(n.push(u.id),!1):!0),this.deleteRes(t,i,n,s)}else o.result=o.result.filter(n=>!r.includes(n.sourceID))}})}}export{R as default};
1
+ import{uuid as E}from"@labelbee/lb-annotation";import{jsonParser as I}from"./index.js";import{EToolName as R}from"../data/enums/ToolType.js";import S from"lodash";import L from"./StepUtils.js";import{message as N}from"antd";import{i18n as F}from"@labelbee/lb-utils";class _{static traverseDF(t,s,e,i){s(t,e,i),typeof t=="object"&&t!==null&&(Array.isArray(t)?t.forEach((n,r)=>{this.traverseDF(n,s,r,t)}):Object.keys(t).forEach(n=>{this.traverseDF(t[n],s,n,t)}))}static getNextPath(t){var s,e,i;const{prePath:n,preMappingImgList:r,nextMappingImgList:a}=t,o=(e=(s=r==null?void 0:r.find(u=>u.path===n))==null?void 0:s.calib)==null?void 0:e.calName;return(i=a.find(u=>{var l;return((l=u.calib)==null?void 0:l.calName)===o}))==null?void 0:i.path}static copyResultItemHandler(t){const{item:s,key:e,parent:i,mappingImgList:n,preMappingImgList:r}=t,a=e===void 0?void 0:i[e];return e==="id"&&(i.id=E(8,62)),e==="imageName"&&(i.imageName=this.getNextPath({prePath:s,preMappingImgList:r,nextMappingImgList:n})),{value:e===void 0?void 0:i[e],oldValue:a}}static copyResultChange(t){const{copyResult:s,step:e,currentResult:i,mappingImgList:n,preMappingImgList:r,valid:a}=t;try{const o=I(s),c=I(i);c.valid=a;const u=`step_${e}`;if(o[u]){const l=o[u],g=["result","resultRect"],h=new Map;if(g.forEach(d=>{l[d]&&this.traverseDF(l[d],(p,f,m)=>{const{value:y,oldValue:x}=this.copyResultItemHandler({item:p,key:f,parent:m,mappingImgList:n,preMappingImgList:r});d==="result"&&f==="id"&&y!==void 0&&x!==void 0&&h.set(x,y)})}),h.size){const d=l.resultRect;Array.isArray(d)&&d.forEach(p=>{const f=p.extId,m=h.get(f);f!==void 0&&m!==void 0&&(p.extId=m)})}const D=["resultRect","rects"],v=[];return this.traverseDF(l,(d,p,f)=>{S.isString(p)&&D.includes(p)&&Array.isArray(d)&&(f[p]=d.filter(m=>m.imageName?!0:(v.push(m),!1)))}),v.length&&(console.log(v),N.info(F.t("PartialResultsReplicationFailure"))),c[u]=l,JSON.stringify(c)}return s}catch(o){N.info(F.t("FailedToCopyResults"))}}static isResultSourceMatchedDependence(t,s){const e=t==null?void 0:t.map(n=>n.sourceID).sort(),i=s==null?void 0:s.map(n=>n.id).sort();return S.isEqual(e,i)}static deltaUpdateBasicResultList(t,s){const e=t==null?void 0:t.map(i=>i.sourceID).sort();return s.filter(i=>!e.includes(i.id))}static getInitialResultList(t,s,e,i,n){const r=t!=null?t:[];switch(e.tool){case R.Tag:case R.Text:{if(e.dataSourceStep>0){const a=this.deltaUpdateBasicResultList(r,i);if(a.length>0)return r.concat(s.getInitResultList(e.dataSourceStep,a))}return n!==!0?r:s.getInitResultList(e.dataSourceStep,i)}default:return r}}static dataCorrection(t,s,e,i){var n,r;try{const o=`step_${L.getStepInfo(e,i).step}`,c=I(t),u=I(s),l=(n=c[o])==null?void 0:n.result,g=(r=u[o])==null?void 0:r.result;if(!g||S.isEqual(l.sort(this.idCmp),g.sort(this.idCmp)))return t;const h=this.findDeletedIds(l,g);if(h.length===0)return t;const D=e,v=this.getStepKeys(c).sort();return this.deleteRes(c,D,h,v),JSON.stringify(c)}catch(a){return console.error(a),t}}static idCmp(t,s){const e=t.id,i=s.id;return e<i?-1:e>i?1:0}static findDeletedIds(t,s){return this.findDeletedItems(s,t).map(e=>e.id)}static findDeletedItems(t,s){const e=[];return t.forEach(i=>{s.some(r=>r.id===i.id)||e.push(i)}),e}static getStepKeys(t){return Object.keys(t).map(s=>parseInt(s.replace("step_",""),10)).filter(s=>!isNaN(s))}static deleteRes(t,s,e,i){i.forEach(n=>{if(n>s){const r=t[`step_${n}`];if([R.FolderTag,R.Segmentation].includes(r.tool))return;if(r.dataSourceStep===s){const a=[];r.result=r.result.filter(o=>e.includes(o.sourceID)?(a.push(o.id),!1):!0),this.deleteRes(t,n,a,i)}else r.result=r.result.filter(a=>!e.includes(a.sourceID))}})}}export{_ as default};
@@ -0,0 +1 @@
1
+ import{getCuboidFromPointCloudBox as l}from"@labelbee/lb-annotation";var i;(function(t){t.Default="Default",t.UndoRedo="UndoRedo",t.ClearAll="ClearAll",t.Single="Single",t.SingleDelete="SingleDelete",t.SingleToggleValid="SingleToggleValid",t.SingleRotate="SingleRotate",t.MultiPaste="MultiPaste",t.MultiMove="MultiMove",t.MulitSelect="MulitSelect"})(i||(i={}));var d;(function(t){t.ChangeAttribute="ChangeAttribute",t.Move="Move",t.ChangeDepth="ChangeDepth",t.ChangeSize="ChangeSize",t.ToggleValid="ToggleValid"})(d||(d={}));const A=(t,n)=>{const o=u(t).concat(u(n));for(const e of o){const s=g(t,e),r=g(n,e);if(!y(s,r))return!1}return!0},u=t=>{const n=[];for(let o=0;o<t.length;o++){const e=t[o],s=t[(o+1)%t.length],r={x:s.x-e.x,y:s.y-e.y},c={x:-r.y,y:r.x};n.push(c)}return n},g=(t,n)=>{let o=h(t[0],n),e=o;for(const s of t){const r=h(s,n);r<o&&(o=r),r>e&&(e=r)}return{min:o,max:e}},y=(t,n)=>!(t.max<n.min||n.max<t.min),h=(t,n)=>t.x*n.x+t.y*n.y,M=(t,n)=>{const o=[];return n.forEach(e=>{const{polygonPointList:s}=l(e);A(t,s)&&o.push(e.id)}),o},S=(t,n)=>{const o=t.map(s=>s.id),e=n.map(s=>s.id);return o.find(s=>!e.includes(s))||""},v=(t,n)=>{const o=t.map(e=>e.id);return n.find(e=>!o.includes(e.id))},x=(t,n)=>t.find(e=>{const s=n.find(r=>r.id===e.id);return s&&s.valid!==e.valid}),B=(t,n)=>t.find(e=>{const s=n.find(r=>r.id===e.id);return s&&s.rotation!==e.rotation}),f=(t,n)=>{const{polygonPointList:o}=l(t);return{ids:M(o,n.filter(s=>s.id!==t.id)),rect:o}},D=(t,n)=>{const o=(e,s)=>e.attribute===s.attribute&&e.center.x===s.center.x&&e.center.y===s.center.y&&e.depth===s.depth&&e.width===s.width&&e.height===s.height;for(const e of t){const s=n.find(r=>r.id===e.id);if(s&&!o(e,s)){let r;if(s.attribute!==e.attribute?r=d.ChangeAttribute:s.center.x!==e.center.x||s.center.y!==e.center.y?r=d.Move:s.depth!==e.depth?r=d.ChangeDepth:(s.width!==e.width||s.height!==e.height)&&(r=d.ChangeSize),r!==void 0)return{modifiedType:r,box:e}}}},C=(t,n,o)=>{try{switch(t){case i.Single:if(n.length>o.length){const e=S(n,o);return e?{modifiedBoxIds:[e],resetAreas:[]}:{modifiedBoxIds:[],resetAreas:[]}}else{const e=[],s=[],r=D(n,o);if(r&&(e.push(r.box.id),r.modifiedType===d.ChangeSize||r.modifiedType===d.Move)){const c=o.find(I=>I.id===r.box.id),{ids:a,rect:m}=f(c,n);e.push(...a),s.push(m)}return{modifiedBoxIds:e,resetAreas:s}}case i.SingleDelete:if(n.length<o.length){const e=v(n,o);if(e){const r=[l(e).polygonPointList],c=[];if(n.length>1){const{ids:a}=f(e,n);a.length&&c.push(...a)}return{modifiedBoxIds:c,resetAreas:r}}return{modifiedBoxIds:[],resetAreas:[]}}return{modifiedBoxIds:[],resetAreas:[]};case i.SingleRotate:if(B(n,o)){const e=B(n,o);if(e){const s=o.find(a=>a.id===e.id),{ids:r,rect:c}=f(s,n);return{modifiedBoxIds:[e.id,...r],resetAreas:[c]}}}return{modifiedBoxIds:[],resetAreas:[]};case i.SingleToggleValid:if(x(n,o)){const e=x(n,o);return e?{modifiedBoxIds:[e.id],resetAreas:[]}:{modifiedBoxIds:[],resetAreas:[]}}return{modifiedBoxIds:[],resetAreas:[]};case i.MulitSelect:return{modifiedBoxIds:k(n,o),resetAreas:[]};case i.MultiPaste:case i.MultiMove:case i.Default:case i.UndoRedo:case i.ClearAll:default:return{modifiedBoxIds:[],resetAreas:[]}}}catch(e){return console.error("calcResetAreasAndBoxIds error:",e),{modifiedBoxIds:[],resetAreas:[]}}},p=(t,n)=>{if(t===n)return!0;if(typeof t!="object"||typeof n!="object"||t===null||n===null)return!1;const o=Object.keys(t),e=Object.keys(n);if(o.length!==e.length)return!1;for(const s of o)if(!p(t[s],n[s]))return!1;return!0},k=(t,n)=>{const o=new Map;for(const e of n)o.set(e.id,e);return t.filter(e=>{const s=o.get(e.id);return!s||!p(e,s)}).map(e=>e.id)};export{i as EPointCloudBoxRenderTrigger,d as EPointCloudBoxSingleModifiedType,C as calcResetAreasAndBoxIds};
package/es/utils/data.js CHANGED
@@ -1 +1 @@
1
- import{EStepType as d}from"../constant/index.js";import{jsonParser as y}from"./index.js";import I from"./StepUtils.js";var P=Object.defineProperty,N=Object.defineProperties,v=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,g=(r,t,e)=>t in r?P(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,o=(r,t)=>{for(var e in t||(t={}))w.call(t,e)&&g(r,e,t[e]);if(O)for(var e of O(t))j.call(t,e)&&g(r,e,t[e]);return r},f=(r,t)=>N(r,v(t));const D=(r,t)=>JSON.stringify(o(o({},y(r)),t)),J=(r,t,e,n)=>{const{step:p,stepList:S}=t,{rect:a,basicRectID:l}=e;try{const s=y(r),_=I.getCurrentStepInfo(p,S),{dataSourceStep:m}=_,c=`step_${_.step}`;if(s[c]){const i=s[c];return Object.assign(i,n),i.result?(JSON.stringify(i.result)===JSON.stringify(a)||(l?i.result=[...i.result.filter(u=>!(u.sourceID&&u.sourceID===l)),...a.filter(u=>u.sourceID&&u.sourceID===l)]:i.result=a),JSON.stringify(s)):JSON.stringify(f(o({},s),{[c]:f(o(o({},s[c]),n),{result:a})}))}return JSON.stringify(f(o({},s),{[c]:f(o({dataSourceStep:m},n),{toolName:S[p-1].tool,result:a})}))}catch(s){return r}},R=(r,t)=>{var e;const n=(e=r.find(p=>d.QUALITY_INSPECTION===p.type&&p.step===t))==null?void 0:e.dataSourceStep;return n||t};export{J as composeResult,D as composeResultWithBasicImgInfo,R as getAnnotationStepByStepList};
1
+ import{jsonParser as g}from"./index.js";import P from"./StepUtils.js";var I=Object.defineProperty,d=Object.defineProperties,N=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,S=(e,r,t)=>r in e?I(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,o=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&S(e,t,r[t]);if(y)for(var t of y(r))v.call(r,t)&&S(e,t,r[t]);return e},a=(e,r)=>d(e,N(r));const D=(e,r)=>JSON.stringify(o(o({},g(e)),r)),J=(e,r,t,f)=>{const{step:l,stepList:_}=r,{rect:i,basicRectID:u}=t;try{const s=g(e),O=P.getCurrentStepInfo(l,_),{dataSourceStep:m}=O,p=`step_${O.step}`;if(s[p]){const n=s[p];return Object.assign(n,f),n.result?(JSON.stringify(n.result)===JSON.stringify(i)||(u?n.result=[...n.result.filter(c=>!(c.sourceID&&c.sourceID===u)),...i.filter(c=>c.sourceID&&c.sourceID===u)]:n.result=i),JSON.stringify(s)):JSON.stringify(a(o({},s),{[p]:a(o(o({},s[p]),f),{result:i})}))}return JSON.stringify(a(o({},s),{[p]:a(o({dataSourceStep:m},f),{toolName:_[l-1].tool,result:i})}))}catch(s){return e}};export{J as composeResult,D as composeResultWithBasicImgInfo};
package/es/utils/index.js CHANGED
@@ -1 +1 @@
1
- import f from"lodash";import{pointCloudLidar2image as l}from"@labelbee/lb-annotation";var y=Object.defineProperty,d=Object.defineProperties,_=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,m=(r,t,n)=>t in r?y(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,P=(r,t)=>{for(var n in t||(t={}))x.call(t,n)&&m(r,n,t[n]);if(u)for(var n of u(t))O.call(t,n)&&m(r,n,t[n]);return r},w=(r,t)=>d(r,_(t));const b=(r,t={})=>{try{return typeof r=="string"?JSON.parse(r):f.isObject(r)?r:t}catch(n){return t}},I=r=>{if(Array.isArray(r))return r.filter(t=>t).join(" ");if(f.isObject(r)){const t=[];return Object.keys(r).forEach(n=>{r[n]&&t.push(n)}),t.join(" ")}return""},g=r=>{let t=Infinity,n=Infinity,e=-Infinity,o=-Infinity;for(const i of r)t=Math.min(t,i.x),n=Math.min(n,i.y),e=Math.max(e,i.x),o=Math.max(o,i.y);return{x:t,y:n,width:e-t,height:o-n}},v=(()=>{const r=(t,n)=>{const e=Math.max(t.x,n.x),o=Math.max(t.y,n.y),i=Math.min(t.x+t.width,n.x+n.width),a=Math.min(t.y+t.height,n.y+n.height),s=i-e,c=a-o;return s>=0&&c>=0?{x:e,y:o,width:s,height:c}:null};return(t,n,e)=>{if(e[n]){const o=e[n].width,i=e[n].height;return r(t,{x:0,y:0,width:o,height:i})!==null}return!1}})(),j=r=>{var t;const{pointCloudBox:n,mappingData:e,imageSizes:o}=r,{transferViewData:i}=(t=l(n,e.calib))!=null?t:{};if(!i)return;const a=i.reduce((p,h)=>h.type==="line"?[...p,...h.pointList]:p,[]),s=w(P({},g(a)),{imageName:e.path});if(v(s,e.path,o))return s};export{I as classnames,g as getBoundingRect,j as getRectPointCloudBox,b as jsonParser};
1
+ import f from"lodash";import{pointCloudLidar2image as y}from"@labelbee/lb-annotation";var _=Object.defineProperty,x=Object.defineProperties,O=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,h=(e,t,n)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||(t={}))P.call(t,n)&&h(e,n,t[n]);if(g)for(var n of g(t))v.call(t,n)&&h(e,n,t[n]);return e},b=(e,t)=>x(e,O(t));const I=(e,t={})=>{try{return typeof e=="string"?JSON.parse(e):f.isObject(e)?e:t}catch(n){return t}},j=e=>{if(Array.isArray(e))return e.filter(t=>t).join(" ");if(f.isObject(e)){const t=[];return Object.keys(e).forEach(n=>{e[n]&&t.push(n)}),t.join(" ")}return""},m=e=>{let t=Infinity,n=Infinity,r=-Infinity,o=-Infinity;for(const i of e)t=Math.min(t,i.x),n=Math.min(n,i.y),r=Math.max(r,i.x),o=Math.max(o,i.y);return{x:t,y:n,width:r-t,height:o-n}},u=(()=>{const e=(t,n)=>{const r=Math.max(t.x,n.x),o=Math.max(t.y,n.y),i=Math.min(t.x+t.width,n.x+n.width),c=Math.min(t.y+t.height,n.y+n.height),s=i-r,a=c-o;return s>=0&&a>=0?{x:r,y:o,width:s,height:a}:null};return(t,n,r)=>{if(r[n]){const o=r[n].width,i=r[n].height;return e(t,{x:0,y:0,width:o,height:i})!==null}return!1}})(),d=e=>{var t;const{pointCloudBox:n,mappingData:r,imageSizes:o}=e,{transferViewData:i}=(t=y(n,r.calib))!=null?t:{};if(!i)return;const c=i.reduce((p,l)=>l.type==="line"?[...p,...l.pointList]:p,[]),s=b(w({},m(c)),{imageName:r.path});if(u(s,r.path,o))return s},R=(e,t)=>{var n;const{pointCloudBox:r,mappingImgList:o,imageSizes:i}=e,s=o.map(a=>d({pointCloudBox:r,mappingData:a,imageSizes:i})).filter(a=>a!==void 0);if(s.length>0){const a=(n=t==null?void 0:t.prepareRectsFn)!=null?n:void 0,p=a?a(s,r):s;p.length>0&&Object.assign(r,{rects:p})}};export{j as classnames,R as generatePointCloudBoxRects,m as getBoundingRect,d as getRectPointCloudBox,u as isBoundingRectInImage,I as jsonParser};