@labelbee/lb-components 1.23.0-alpha.11 → 1.23.0-alpha.110

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 (263) 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/LLMToolView/index.js +1 -1
  20. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  21. package/dist/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  22. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  23. package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
  24. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  25. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  26. package/dist/components/LLMToolView/utils/data.js +1 -1
  27. package/dist/components/audioAnnotate/audioContext/index.js +1 -1
  28. package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  29. package/dist/components/audioAnnotate/index.js +1 -1
  30. package/dist/components/audioAnnotate/textInput/index.js +1 -1
  31. package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  32. package/dist/components/audioAnnotate/utils/dataTransform.js +1 -0
  33. package/dist/components/audioPlayer/clipRegion/index.js +1 -1
  34. package/dist/components/audioPlayer/index.js +1 -1
  35. package/dist/components/audioPlayer/useAudioCombine/index.js +3 -2
  36. package/dist/components/audioPlayer/useAudioSegment/index.js +1 -1
  37. package/dist/components/audioPlayer/zoomSlider/index.js +1 -1
  38. package/dist/components/longText/index.js +1 -1
  39. package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
  40. package/dist/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  41. package/dist/components/pointCloud2DRectOperationView/util.js +1 -0
  42. package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  43. package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
  44. package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
  45. package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
  46. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  47. package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
  48. package/dist/components/pointCloudView/PointCloudLayout.js +1 -1
  49. package/dist/components/pointCloudView/PointCloudListener.js +1 -1
  50. package/dist/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  51. package/dist/components/pointCloudView/PointCloudSegmentListener.js +1 -1
  52. package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
  53. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  54. package/dist/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  55. package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
  56. package/dist/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  57. package/dist/components/pointCloudView/hooks/useHighlight.js +1 -1
  58. package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
  59. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  60. package/dist/components/pointCloudView/hooks/usePolygon.js +1 -1
  61. package/dist/components/pointCloudView/hooks/useRotate.js +1 -1
  62. package/dist/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  63. package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
  64. package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
  65. package/dist/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  66. package/dist/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  67. package/dist/components/pointCloudView/index.js +1 -1
  68. package/dist/components/pointCloudView/utils/event-polyfill.js +1 -0
  69. package/dist/components/pointCloudView/utils/map.js +1 -0
  70. package/dist/components/predictTracking/predictTrackingIcon/index.js +1 -1
  71. package/dist/components/predictTracking/previewResult/index.js +1 -1
  72. package/dist/components/subAttributeList/index.js +1 -0
  73. package/dist/components/videoAnnotate/videoClipTool/index.js +1 -1
  74. package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  75. package/dist/hooks/useToolStyle.js +1 -0
  76. package/dist/index.css +146 -12
  77. package/dist/index.js +1 -1
  78. package/dist/store/Actions.js +1 -1
  79. package/dist/store/annotatedBox/index.js +1 -1
  80. package/dist/store/annotation/actionCreators.js +1 -1
  81. package/dist/store/annotation/reducer.js +1 -1
  82. package/dist/store/toolConfig/index.js +1 -0
  83. package/dist/types/App.d.ts +6 -1
  84. package/dist/types/components/AnnotationView/index.d.ts +1 -0
  85. package/dist/types/components/DynamicResizer/DynamicResizer.d.ts +5 -0
  86. package/dist/types/components/DynamicResizer/hooks/useDrag.d.ts +12 -0
  87. package/dist/types/components/DynamicResizer/hooks/useUpdateHeight.d.ts +23 -0
  88. package/dist/types/components/DynamicResizer/index.d.ts +2 -0
  89. package/dist/types/components/DynamicResizer/types/interface.d.ts +17 -0
  90. package/dist/types/components/LLMToolView/utils/data.d.ts +1 -1
  91. package/dist/types/components/audioAnnotate/audioContext/index.d.ts +10 -2
  92. package/dist/types/components/audioAnnotate/textInput/index.d.ts +1 -0
  93. package/dist/types/components/audioAnnotate/utils/dataTransform.d.ts +9 -0
  94. package/dist/types/components/audioPlayer/clipRegion/index.d.ts +1 -0
  95. package/dist/types/components/audioPlayer/index.d.ts +28 -21
  96. package/dist/types/components/audioPlayer/zoomSlider/index.d.ts +1 -0
  97. package/dist/types/components/longText/index.d.ts +1 -0
  98. package/dist/types/components/pointCloud2DRectOperationView/index.d.ts +1 -0
  99. package/dist/types/components/pointCloud2DRectOperationView/useUpdateRectList.d.ts +2 -0
  100. package/dist/types/components/pointCloud2DRectOperationView/util.d.ts +8 -0
  101. package/dist/types/components/pointCloudView/2DViewWorker.d.ts +1 -0
  102. package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +2 -1
  103. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +28 -4
  104. package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +1 -0
  105. package/dist/types/components/pointCloudView/PointCloudListener.d.ts +1 -0
  106. package/dist/types/components/pointCloudView/components/HighlightVisible/index.d.ts +2 -1
  107. package/dist/types/components/pointCloudView/hooks/useBoxes.d.ts +5 -3
  108. package/dist/types/components/pointCloudView/hooks/useDataLinkSwitch.d.ts +19 -0
  109. package/dist/types/components/pointCloudView/hooks/useHighlight.d.ts +1 -1
  110. package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +13 -1
  111. package/dist/types/components/pointCloudView/hooks/useRotateEdge.d.ts +9 -0
  112. package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +3 -2
  113. package/dist/types/components/pointCloudView/hooks/useTimeoutFunc.d.ts +6 -0
  114. package/dist/types/components/pointCloudView/hooks/useWindowKeydownListener.d.ts +16 -0
  115. package/dist/types/components/pointCloudView/index.d.ts +1 -0
  116. package/dist/types/components/pointCloudView/utils/event-polyfill.d.ts +8 -0
  117. package/dist/types/components/pointCloudView/utils/map.d.ts +11 -0
  118. package/dist/types/components/subAttributeList/index.d.ts +10 -0
  119. package/dist/types/components/videoAnnotate/index.d.ts +2 -1
  120. package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +2 -1
  121. package/dist/types/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.d.ts +1 -1
  122. package/dist/types/hooks/useToolStyle.d.ts +30 -0
  123. package/dist/types/index.d.ts +8 -2
  124. package/dist/types/store/Actions.d.ts +1 -0
  125. package/dist/types/store/annotatedBox/index.d.ts +2 -0
  126. package/dist/types/store/annotation/actionCreators.d.ts +4 -3
  127. package/dist/types/store/annotation/reducer.d.ts +1 -0
  128. package/dist/types/store/annotation/types.d.ts +9 -2
  129. package/dist/types/store/toolConfig/index.d.ts +6 -0
  130. package/dist/types/utils/AnnotationDataUtils.d.ts +58 -1
  131. package/dist/types/utils/ToolPointCloudBoxRenderHelper.d.ts +23 -0
  132. package/dist/types/utils/index.d.ts +31 -1
  133. package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +1 -0
  134. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.d.ts +3 -0
  135. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.d.ts +3 -0
  136. package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +1 -1
  137. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.d.ts +9 -0
  138. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.d.ts +3 -0
  139. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/index.d.ts +1 -0
  140. package/dist/types/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.d.ts +10 -2
  141. package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
  142. package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +1 -1
  143. package/dist/types/views/MainView/toolHeader/index.d.ts +1 -1
  144. package/dist/utils/AnnotationDataUtils.js +1 -1
  145. package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  146. package/dist/utils/index.js +1 -1
  147. package/dist/views/MainView/index.js +1 -1
  148. package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  149. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
  150. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
  151. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  152. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  153. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  154. package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
  155. package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  156. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  157. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  158. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  159. package/dist/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  160. package/dist/views/MainView/toolFooter/index.js +1 -1
  161. package/dist/views/MainView/toolHeader/index.js +1 -1
  162. package/es/App.js +1 -1
  163. package/es/_virtual/2DViewWorker.js +1 -0
  164. package/es/_virtual/highlightSegmentWorker.js +1 -1
  165. package/es/assets/annotation/icon_link.svg.js +1 -0
  166. package/es/assets/annotation/icon_unlink.svg.js +1 -0
  167. package/es/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
  168. package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  169. package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  170. package/es/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
  171. package/es/components/AnnotationView/index.js +1 -1
  172. package/es/components/DynamicResizer/DynamicResizer.js +1 -0
  173. package/es/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
  174. package/es/components/DynamicResizer/assets/divider.svg.js +1 -0
  175. package/es/components/DynamicResizer/assets/topToZero.svg.js +1 -0
  176. package/es/components/DynamicResizer/hooks/useDrag.js +1 -0
  177. package/es/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
  178. package/es/components/DynamicResizer/index.js +1 -0
  179. package/es/components/LLMToolView/index.js +1 -1
  180. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  181. package/es/components/LLMToolView/questionView/components/imgView/index.js +1 -1
  182. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  183. package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
  184. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  185. package/es/components/LLMToolView/sidebar/index.js +1 -1
  186. package/es/components/LLMToolView/utils/data.js +1 -1
  187. package/es/components/audioAnnotate/audioContext/index.js +1 -1
  188. package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  189. package/es/components/audioAnnotate/index.js +1 -1
  190. package/es/components/audioAnnotate/textInput/index.js +1 -1
  191. package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  192. package/es/components/audioAnnotate/utils/dataTransform.js +1 -0
  193. package/es/components/audioPlayer/clipRegion/index.js +1 -1
  194. package/es/components/audioPlayer/index.js +1 -1
  195. package/es/components/audioPlayer/useAudioCombine/index.js +3 -2
  196. package/es/components/audioPlayer/useAudioSegment/index.js +1 -1
  197. package/es/components/audioPlayer/zoomSlider/index.js +1 -1
  198. package/es/components/longText/index.js +1 -1
  199. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  200. package/es/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  201. package/es/components/pointCloud2DRectOperationView/util.js +1 -0
  202. package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  203. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  204. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  205. package/es/components/pointCloudView/PointCloudBackView.js +1 -1
  206. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  207. package/es/components/pointCloudView/PointCloudInfos.js +1 -1
  208. package/es/components/pointCloudView/PointCloudLayout.js +1 -1
  209. package/es/components/pointCloudView/PointCloudListener.js +1 -1
  210. package/es/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  211. package/es/components/pointCloudView/PointCloudSegmentListener.js +1 -1
  212. package/es/components/pointCloudView/PointCloudSideView.js +1 -1
  213. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  214. package/es/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  215. package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
  216. package/es/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  217. package/es/components/pointCloudView/hooks/useHighlight.js +1 -1
  218. package/es/components/pointCloudView/hooks/useHistory.js +1 -1
  219. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  220. package/es/components/pointCloudView/hooks/usePolygon.js +1 -1
  221. package/es/components/pointCloudView/hooks/useRotate.js +1 -1
  222. package/es/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  223. package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
  224. package/es/components/pointCloudView/hooks/useStatus.js +1 -1
  225. package/es/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  226. package/es/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  227. package/es/components/pointCloudView/index.js +1 -1
  228. package/es/components/pointCloudView/utils/event-polyfill.js +1 -0
  229. package/es/components/pointCloudView/utils/map.js +1 -0
  230. package/es/components/predictTracking/predictTrackingIcon/index.js +1 -1
  231. package/es/components/predictTracking/previewResult/index.js +1 -1
  232. package/es/components/subAttributeList/index.js +1 -0
  233. package/es/components/videoAnnotate/videoClipTool/index.js +1 -1
  234. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  235. package/es/hooks/useToolStyle.js +1 -0
  236. package/es/index.css +146 -12
  237. package/es/index.js +1 -1
  238. package/es/store/Actions.js +1 -1
  239. package/es/store/annotatedBox/index.js +1 -1
  240. package/es/store/annotation/actionCreators.js +1 -1
  241. package/es/store/annotation/reducer.js +1 -1
  242. package/es/store/toolConfig/index.js +1 -0
  243. package/es/utils/AnnotationDataUtils.js +1 -1
  244. package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  245. package/es/utils/index.js +1 -1
  246. package/es/views/MainView/index.js +1 -1
  247. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  248. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.js +1 -0
  249. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/firstFrameDataSwitch/index.module.scss.js +1 -0
  250. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  251. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  252. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  253. package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
  254. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  255. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  256. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  257. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  258. package/es/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  259. package/es/views/MainView/toolHeader/index.js +1 -1
  260. package/package.json +6 -4
  261. package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
  262. package/dist/assets/icons/9d70807.svg +0 -5
  263. package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
package/dist/index.css CHANGED
@@ -49,13 +49,103 @@
49
49
  right: -5px;
50
50
  top: -5px;
51
51
  }
52
+ .index-module_rectRotateSensitivitySlider__tGjUn {
53
+ padding: 12px 20px;
54
+ }
55
+ .index-module_rectRotateSensitivitySlider__tGjUn .index-module_title__aAJW6 {
56
+ margin-bottom: 16px;
57
+ }
52
58
  .index-module_container__RwV5P {
53
59
  padding: 12px 20px;
54
60
  }
55
61
  .index-module_container__RwV5P .index-module_content__vHpS9 {
56
62
  display: flex;
57
63
  justify-content: space-between;
58
- margin-top: 4px;
64
+ margin-top: 16px;
65
+ }
66
+ .index-module_switchBox__6DlnW {
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: space-between;
70
+ padding: 12px 20px;
71
+ }
72
+ .dynamic-resizer-content {
73
+ width: 100%;
74
+ height: 100%;
75
+ flex-shrink: 0;
76
+ flex-grow: 0;
77
+ position: relative;
78
+ }
79
+
80
+ .divider {
81
+ height: 10px;
82
+ width: 100%;
83
+ position: absolute;
84
+ top: -5px;
85
+ left: 0;
86
+ cursor: row-resize;
87
+ user-select: none;
88
+ display: flex;
89
+ align-items: center;
90
+ flex-direction: column;
91
+ justify-content: center;
92
+ }
93
+ .divider:hover .divider-top, .divider:hover .divider-bottom, .divider:hover .divider-all {
94
+ display: block;
95
+ }
96
+
97
+ .divider-top,
98
+ .divider-bottom,
99
+ .divider-all {
100
+ width: 20px;
101
+ height: 20px;
102
+ cursor: pointer;
103
+ display: none;
104
+ user-select: none;
105
+ }
106
+
107
+ .divider-all {
108
+ position: absolute;
109
+ top: -50%;
110
+ left: 50%;
111
+ transform: translate(-50%);
112
+ }
113
+
114
+ .divider-icon {
115
+ width: 100%;
116
+ height: 20px;
117
+ position: relative;
118
+ }
119
+ .divider-icon::after {
120
+ content: "";
121
+ display: block;
122
+ position: absolute;
123
+ top: 50%;
124
+ left: 0;
125
+ right: 0;
126
+ width: 90%;
127
+ height: 1px;
128
+ background: #ccc;
129
+ margin: 0 auto;
130
+ }
131
+
132
+ .dynamic-resizer-top {
133
+ width: 100%;
134
+ overflow-y: auto;
135
+ }
136
+
137
+ .dynamic-resizer-bottom {
138
+ width: 100%;
139
+ overflow-y: auto;
140
+ }
141
+
142
+ .hide-scrollbar * {
143
+ scrollbar-width: none; /* Firefox */
144
+ -ms-overflow-style: none; /* IE and Edge */
145
+ }
146
+
147
+ .hide-scrollbar *::-webkit-scrollbar {
148
+ display: none; /* Chrome, Safari, Opera */
59
149
  }
60
150
  .index-module_latexEditor__0fK8G {
61
151
  line-height: 32px;
@@ -132,6 +222,12 @@
132
222
  .index-module_outputDisplay__5dS48 .index-module_content__Iml6l .markdown-body {
133
223
  font-size: 14px;
134
224
  }
225
+
226
+ .index-module_tip__NFru6 {
227
+ margin-bottom: 8px;
228
+ color: rgba(0, 0, 0, 0.45);
229
+ font-size: 14px;
230
+ }
135
231
  .index-module_tagList__cvWor {
136
232
  padding: 0px 16px 16px 16px;
137
233
  }
@@ -606,6 +702,7 @@
606
702
  }
607
703
  .index-module_waveformContainer__rVhq9::-webkit-scrollbar {
608
704
  width: 8px;
705
+ height: 10px;
609
706
  }
610
707
  .index-module_waveformContainer__rVhq9::-webkit-scrollbar-track {
611
708
  background: #555;
@@ -698,6 +795,7 @@
698
795
  text-align: right;
699
796
  background: rgb(102, 111, 255);
700
797
  opacity: 0.6;
798
+ margin-top: 10px;
701
799
  }
702
800
  .index-module_textInputContainer__ES6X3 {
703
801
  height: 100%;
@@ -720,6 +818,16 @@
720
818
  font-family: SourceHanSansCN-Medium;
721
819
  font-size: 14px;
722
820
  }
821
+ .index-module_label__xE6hM .index-module_labelText__Zg1c4 {
822
+ display: flex;
823
+ overflow: hidden;
824
+ width: 60%;
825
+ align-items: center;
826
+ }
827
+ .index-module_label__xE6hM .index-module_labelText__Zg1c4 .index-module_titleText__BRM44 {
828
+ max-width: calc(100% - 20px);
829
+ overflow: hidden;
830
+ }
723
831
  .index-module_label__xE6hM .index-module_required__iElYl::before {
724
832
  display: inline-block;
725
833
  margin-right: 4px;
@@ -732,6 +840,7 @@
732
840
  .index-module_label__xE6hM .index-module_extra__PW5Qk {
733
841
  float: right;
734
842
  margin-right: 5px;
843
+ width: 40%;
735
844
  }
736
845
 
737
846
  .index-module_textareaContainer__dTIv4 {
@@ -862,6 +971,7 @@
862
971
  flex-wrap: wrap;
863
972
  align-items: center;
864
973
  justify-content: center;
974
+ overflow: hidden;
865
975
  }
866
976
  .index-module_placeholderHotkey__0SKPo .text {
867
977
  color: #333;
@@ -878,7 +988,10 @@
878
988
 
879
989
  .index-module_attribute__g8Vbl {
880
990
  height: 22px;
881
- padding: 2px 8px;
991
+ padding: 0px 8px;
992
+ width: max-content;
993
+ max-width: 100%;
994
+ margin-left: auto;
882
995
  }
883
996
 
884
997
  .index-module_clearIcon__ZBZqI {
@@ -1141,7 +1254,8 @@
1141
1254
  }
1142
1255
  .index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE {
1143
1256
  flex: 1;
1144
- overflow: auto;
1257
+ overflow-x: hidden;
1258
+ overflow-y: auto;
1145
1259
  }
1146
1260
  .index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE .sensebee-radio-group,
1147
1261
  .index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE .sensebee-radio-group-no-limit-height .ant-radio-group {
@@ -1489,6 +1603,7 @@
1489
1603
  .bee-sidebar #style-width .ant-slider .ant-slider-track,
1490
1604
  .bee-sidebar #style-color .ant-slider .ant-slider-track,
1491
1605
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-track,
1606
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-track,
1492
1607
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-track {
1493
1608
  background: #f5f5f5;
1494
1609
  }
@@ -1498,6 +1613,7 @@
1498
1613
  .bee-sidebar #style-width .ant-slider .ant-slider-dot,
1499
1614
  .bee-sidebar #style-color .ant-slider .ant-slider-dot,
1500
1615
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-dot,
1616
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-dot,
1501
1617
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-dot {
1502
1618
  width: 0;
1503
1619
  height: 0;
@@ -1509,6 +1625,7 @@
1509
1625
  .bee-sidebar #style-width .ant-slider .ant-slider-handle,
1510
1626
  .bee-sidebar #style-color .ant-slider .ant-slider-handle,
1511
1627
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-handle,
1628
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-handle,
1512
1629
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-handle {
1513
1630
  background-image: url("../dist/assets/icons/cc550fff.svg");
1514
1631
  background-repeat: no-repeat;
@@ -1526,6 +1643,7 @@
1526
1643
  .bee-sidebar #style-width .ant-slider .ant-slider-handle:focus,
1527
1644
  .bee-sidebar #style-color .ant-slider .ant-slider-handle:focus,
1528
1645
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-handle:focus,
1646
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-handle:focus,
1529
1647
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-handle:focus {
1530
1648
  box-shadow: none;
1531
1649
  }
@@ -1535,6 +1653,7 @@
1535
1653
  .bee-sidebar #style-width .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1536
1654
  .bee-sidebar #style-color .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1537
1655
  .bee-sidebar #style-fillOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1656
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1538
1657
  .bee-sidebar #style-borderOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow {
1539
1658
  color: inherit;
1540
1659
  font-style: normal;
@@ -1558,6 +1677,7 @@
1558
1677
  .bee-sidebar #style-width .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1559
1678
  .bee-sidebar #style-color .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1560
1679
  .bee-sidebar #style-fillOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1680
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1561
1681
  .bee-sidebar #style-borderOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header {
1562
1682
  position: relative;
1563
1683
  color: rgba(0, 0, 0, 0.85);
@@ -1584,6 +1704,9 @@
1584
1704
  .bee-sidebar #style-fillOpacity .ant-slider-rail,
1585
1705
  .bee-sidebar #style-fillOpacity .ant-slider-track,
1586
1706
  .bee-sidebar #style-fillOpacity .ant-slider-step,
1707
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-rail,
1708
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-track,
1709
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step,
1587
1710
  .bee-sidebar #style-borderOpacity .ant-slider-rail,
1588
1711
  .bee-sidebar #style-borderOpacity .ant-slider-track,
1589
1712
  .bee-sidebar #style-borderOpacity .ant-slider-step {
@@ -1596,38 +1719,46 @@
1596
1719
  .bee-sidebar #style-width .ant-slider .ant-slider-track,
1597
1720
  .bee-sidebar #style-color .ant-slider .ant-slider-track,
1598
1721
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-track,
1722
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-track,
1599
1723
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-track {
1600
1724
  background: none;
1601
1725
  }
1602
1726
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot,
1603
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot {
1727
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot,
1728
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot {
1604
1729
  height: 12px;
1605
1730
  background: #666666;
1606
1731
  border-radius: 0;
1607
1732
  margin-left: -2px;
1608
1733
  }
1609
1734
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(1),
1610
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(1) {
1735
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(1),
1736
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(1) {
1611
1737
  width: 1px;
1612
1738
  }
1613
1739
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(2),
1614
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(2) {
1740
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(2),
1741
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(2) {
1615
1742
  width: 2px;
1616
1743
  }
1617
1744
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(3),
1618
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(3) {
1745
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(3),
1746
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(3) {
1619
1747
  width: 3px;
1620
1748
  }
1621
1749
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(4),
1622
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(4) {
1750
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(4),
1751
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(4) {
1623
1752
  width: 4px;
1624
1753
  }
1625
1754
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(5),
1626
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(5) {
1755
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(5),
1756
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(5) {
1627
1757
  width: 5px;
1628
1758
  }
1629
1759
  .bee-sidebar #style-radius .ant-slider:hover .ant-slider-rail,
1630
- .bee-sidebar #style-width .ant-slider:hover .ant-slider-rail {
1760
+ .bee-sidebar #style-width .ant-slider:hover .ant-slider-rail,
1761
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider:hover .ant-slider-rail {
1631
1762
  background: #f5f5f5;
1632
1763
  }
1633
1764
  .bee-sidebar #style-color .ant-slider-rail {
@@ -2244,6 +2375,9 @@
2244
2375
  .bee-pop-confirm .ant-popover-buttons {
2245
2376
  min-width: 116px;
2246
2377
  }
2378
+ .bee-pop-confirm .ant-popover-inner-content .ant-popover-message {
2379
+ align-items: initial;
2380
+ }
2247
2381
 
2248
2382
  .bee-annotated-attribute {
2249
2383
  width: 240px;
@@ -2494,14 +2628,14 @@
2494
2628
  margin-right: 16px;
2495
2629
  background-image: url("../dist/assets/icons/7eadb9c4.svg");
2496
2630
  }
2497
- .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-180 {
2631
+ .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-90 {
2498
2632
  display: inline-block;
2499
2633
  height: 24px;
2500
2634
  width: 24px;
2501
2635
  background-repeat: no-repeat;
2502
2636
  cursor: pointer;
2503
2637
  flex: none;
2504
- background-image: url("../dist/assets/icons/9d70807.svg");
2638
+ background-image: url("../dist/assets/icons/ad33251.svg");
2505
2639
  }
2506
2640
  .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__next {
2507
2641
  font-size: 24px;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("./components/AnnotationView/index.js"),pointCloudAnnotationView=require("./components/AnnotationView/pointCloudAnnotationView.js"),index$2=require("./components/LLMToolView/questionView/index.js"),index$3=require("./components/NLPToolView/textContent/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),App=require("./App.js"),configureStore=require("./configureStore.js"),actionCreators=require("./store/annotation/actionCreators.js"),TagToolInstanceAdaptorI18nProvider=require("./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js"),PointCloudContext=require("./components/pointCloudView/PointCloudContext.js"),ctx=require("./store/ctx.js"),index$5=require("./components/predictTracking/predictTrackingIcon/index.js"),index$4=require("./components/LLMToolView/index.js"),index$6=require("./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js"),index$7=require("./components/measureCanvas/index.js"),index$8=require("./views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js"),index$9=require("./views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js"),index$a=require("./constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const store=configureStore(),OutputApp=(e,t)=>{const[r,a]=React.useState();return React.useImperativeHandle(t,()=>({toolInstance:r,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:o=>{const n=~~o-1;store.dispatch(actionCreators.PageJump(n))},hello:()=>alert("hello labelBee!!!")}),[r]),React__default.default.createElement(reactRedux.Provider,{store,context:ctx.LabelBeeContext},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(PointCloudContext.PointCloudProvider,null,React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:o=>{var n;a(o),(n=e.onLoad)==null||n.call(e,{toolInstance:o})}})))))};var index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,exports.PointCloudAnnotationView=pointCloudAnnotationView,exports.QuestionView=index$2.default,exports.TextContent=index$3,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,exports.PredictTracking=index$5,exports.LLMToolView=index$4,exports.SwitchCuboidBoxIn2DView=index$6,exports.MeasureCanvas=index$7,exports.AnnotatedBox=index$8,exports.FindTrackIDIndex=index$9.FindTrackIDIndexInCheckMode,Object.defineProperty(exports,"EDataFormatType",{enumerable:!0,get:function(){return index$a.EDataFormatType}}),Object.defineProperty(exports,"ELLMDataType",{enumerable:!0,get:function(){return index$a.ELLMDataType}}),Object.defineProperty(exports,"EStepType",{enumerable:!0,get:function(){return index$a.EStepType}}),Object.defineProperty(exports,"ESubmitType",{enumerable:!0,get:function(){return index$a.ESubmitType}}),exports.componentCls=index$a.componentCls,exports.prefix=index$a.prefix,exports.default=index,exports.store=store;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("./components/AnnotationView/index.js"),pointCloudAnnotationView=require("./components/AnnotationView/pointCloudAnnotationView.js"),index$2=require("./components/LLMToolView/questionView/index.js"),index$3=require("./components/NLPToolView/textContent/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),App=require("./App.js"),configureStore=require("./configureStore.js"),actionCreators=require("./store/annotation/actionCreators.js"),TagToolInstanceAdaptorI18nProvider=require("./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js"),PointCloudContext=require("./components/pointCloudView/PointCloudContext.js"),ctx=require("./store/ctx.js"),index$5=require("./components/predictTracking/predictTrackingIcon/index.js"),index$4=require("./components/LLMToolView/index.js"),index$6=require("./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js"),BatchSwitchConnectIn2DView=require("./views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js"),index$7=require("./components/measureCanvas/index.js"),index$8=require("./views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js"),index$9=require("./views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js"),index$a=require("./views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js"),index$b=require("./components/audioPlayer/index.js"),index$c=require("./utils/index.js"),index$d=require("./components/subAttributeList/index.js"),useToolStyle=require("./hooks/useToolStyle.js"),reducer=require("./store/annotation/reducer.js"),index$e=require("./store/toolConfig/index.js"),index$f=require("./constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const store=configureStore();lbUtils.i18n.use(reactI18next.initReactI18next),lbUtils.i18n.options.react={useSuspense:!1};const OutputApp=(e,t)=>{const[r,a]=React.useState();return React.useImperativeHandle(t,()=>({toolInstance:r,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:(o,n)=>{const i=~~o-1;store.dispatch(actionCreators.PageJump(i)),n&&store.dispatch(reducer.LoadFileAndFileData(i))},hello:()=>alert("hello labelBee!!!")}),[r]),React__default.default.createElement(reactRedux.Provider,{store,context:ctx.LabelBeeContext},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(useToolStyle.ToolStyleProvider,{value:e.toolStyle},React__default.default.createElement(PointCloudContext.PointCloudProvider,null,React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:o=>{var n;a(o),(n=e.onLoad)==null||n.call(e,{toolInstance:o})}}))))))};var index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,exports.PointCloudAnnotationView=pointCloudAnnotationView,exports.QuestionView=index$2.default,exports.TextContent=index$3,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,exports.PredictTracking=index$5,exports.LLMToolView=index$4,exports.SwitchCuboidBoxIn2DView=index$6.default,Object.defineProperty(exports,"SwitchCuboidBoxIn2DViewStateMode",{enumerable:!0,get:function(){return index$6.SwitchCuboidBoxIn2DViewStateMode}}),exports.BatchSwitchConnectIn2DView=BatchSwitchConnectIn2DView.default,exports.MeasureCanvas=index$7,exports.AnnotatedBox=index$8,exports.RectRotateSensitivitySlider=index$9,exports.FindTrackIDIndex=index$a.FindTrackIDIndexInCheckMode,exports.AudioPlayer=index$b.WrapAudioPlayer,exports.generatePointCloudBoxRects=index$c.generatePointCloudBoxRects,exports.SubAttributeList=index$d,exports.useToolConfigStore=index$e,Object.defineProperty(exports,"EDataFormatType",{enumerable:!0,get:function(){return index$f.EDataFormatType}}),Object.defineProperty(exports,"ELLMDataType",{enumerable:!0,get:function(){return index$f.ELLMDataType}}),Object.defineProperty(exports,"EStepType",{enumerable:!0,get:function(){return index$f.EStepType}}),Object.defineProperty(exports,"ESubmitType",{enumerable:!0,get:function(){return index$f.ESubmitType}}),exports.componentCls=index$f.componentCls,exports.prefix=index$f.prefix,exports.default=index,exports.store=store;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={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"},IMAGE_ATTRIBUTE_ACTIONS={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},TOOL_STYLE_ACTIONS={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};exports.ANNOTATION_ACTIONS=ANNOTATION_ACTIONS,exports.IMAGE_ATTRIBUTE_ACTIONS=IMAGE_ATTRIBUTE_ACTIONS,exports.TOOL_STYLE_ACTIONS=TOOL_STYLE_ACTIONS;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={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"},IMAGE_ATTRIBUTE_ACTIONS={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},TOOL_STYLE_ACTIONS={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};exports.ANNOTATION_ACTIONS=ANNOTATION_ACTIONS,exports.IMAGE_ATTRIBUTE_ACTIONS=IMAGE_ATTRIBUTE_ACTIONS,exports.TOOL_STYLE_ACTIONS=TOOL_STYLE_ACTIONS;
@@ -1 +1 @@
1
- "use strict";var zustand=require("zustand");const useAnnotatedBoxStore=zustand.create(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}))}));module.exports=useAnnotatedBoxStore;
1
+ "use strict";var zustand=require("zustand");const useAnnotatedBoxStore=zustand.create(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}))}));module.exports=useAnnotatedBoxStore;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),reducer=require("./reducer.js"),index=require("../../constant/index.js"),AnnotationSize=require("../../data/enums/AnnotationSize.js"),PageOperator=require("../../utils/PageOperator.js"),index$1=require("../../utils/index.js"),util=require("../../components/predictTracking/previewResult/util.js"),__async=(t,e,n)=>new Promise((a,r)=>{var o=s=>{try{u(n.next(s))}catch(i){r(i)}},T=s=>{try{u(n.throw(s))}catch(i){r(i)}},u=s=>s.done?a(s.value):Promise.resolve(s.value).then(o,T);u((n=n.apply(t,e)).next())});const dispatchTasks=(t,e)=>e.map(n=>t(n)),getSubmitByPageOperation=t=>t===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:t===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:t===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(t,e)=>{var n,a;const{imgList:r,imgIndex:o}=t,{dataSourceStep:T}=reducer.getStepConfig(t.stepList,t.step);return((a=(n=index$1.jsonParser(r[o-1].result)[`step_${T}`])==null?void 0:n.result)==null?void 0:a.length)-1||e};function UpdateToolInstance(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function SetTaskStepList({stepList:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:t}}}function SetTaskConfig({stepList:t,step:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function UpdateOnSubmit(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function UpdateOnSave(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:t}}}function UpdateOnPageChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function UpdateOnStepChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function UpdateGetFileData(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function UpdatePageSize(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function UpdateGetFileList(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(t){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function UpdateBeforeRotate(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function UpdatePreDataProcess(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function BatchUpdateTrackID({id:t,newID:e,rangeIndex:n,imgList:a}){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:a}}}function BatchUpdateResultByTrackID(t,e,n){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function BatchUpdateImgListResultByPredictResult(){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const UpdateCheckMode=t=>({type:Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE,payload:{checkMode:t}}),UpdateHighlightAttribute=t=>({type:Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function InitTaskData({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:T,step:u,stepList:s,skipBeforePageTurning:i,beforeRotate:N,checkMode:p,highlightAttribute:I,preDataProcess:O}){const A=[];return t&&A.push(UpdateOnSubmit(t)),e&&A.push(UpdateOnSave(e)),n&&A.push(UpdateOnPageChange(n)),a&&A.push(UpdateOnStepChange(a)),r&&A.push(UpdateGetFileData(r)),T&&A.push(UpdateGetFileList(T)),o&&A.push(UpdatePageSize(o)),i&&A.push(UpdateSkipBeforePageTurning(i)),N&&A.push(UpdateBeforeRotate(N)),O&&A.push(UpdatePreDataProcess(O)),typeof p=="boolean"&&A.push(UpdateCheckMode(p)),A.push(UpdateHighlightAttribute(I)),A.push(SetTaskConfig({stepList:s,step:u})),A.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),A.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),d=>dispatchTasks(d,A)}function UpdateInjectFunc({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:T,stepList:u,beforeRotate:s,highlightAttribute:i,preDataProcess:N}){const p=[];return t&&p.push(UpdateOnSubmit(t)),e&&p.push(UpdateOnSave(e)),n&&p.push(UpdateOnPageChange(n)),a&&p.push(UpdateOnStepChange(a)),r&&p.push(UpdateGetFileData(r)),T&&p.push(UpdateGetFileList(T)),o&&p.push(UpdatePageSize(o)),s&&p.push(UpdateBeforeRotate(s)),N&&p.push(UpdatePreDataProcess(N)),p.push(UpdateHighlightAttribute(i)),p.push(SetTaskStepList({stepList:u})),I=>dispatchTasks(I,p)}const getNextStep=(t,e)=>{var n;const a=e==null?void 0:e.findIndex(r=>(r==null?void 0:r.step)===t);return(n=e[a+1])==null?void 0:n.step},ToNextStep=t=>(e,n)=>{const{annotation:a}=n(),{step:r,stepList:o}=a,T=getNextStep(r,o);return[e(UpdateProcessingStep(T,t))]},UpdateProcessingStep=(t,e)=>(n,a)=>{var r,o;const{annotation:T}=a();(r=T==null?void 0:T.onStepChange)==null||r.call(T,t);const u=(o=T==null?void 0:T.imgIndex)!=null?o:0;return[n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:index.ESubmitType.StepChanged}}),n({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:t}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(e!=null?e:u,0))]},ToSubmitFileData=t=>e=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:t}})],SubmitAndChangeFileIndex=(t,e,n,a)=>[t(ToSubmitFileData(n)),t(reducer.LoadFileAndFileData(e,a))],ChangeBasicIndex=(t,e)=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:e}})],ChangeTriggerEventAfterIndexChanged=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},PageBackward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Backward,t),PageForward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Forward,t),PageJump=(t,e=!1)=>(n,a)=>{if(t!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,e,t)},loadImgList=(t,e,n,a)=>__async(void 0,null,function*(){var r;const{loadFileList:o,imgList:T,pageSize:u}=e().annotation,s=Math.floor(n/u);SetAnnotationLoading(t,!0);try{const i=yield o(s,u);if(SetAnnotationLoading(t,!1),!((r=i==null?void 0:i.fileList)==null?void 0:r.length)||!(i==null?void 0:i.total))throw new Error("fileList and total are required");const N=a?new Array(i.total):[...T];return N.splice(s*u,u,...i.fileList),t({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:N}}),!0}catch(i){SetAnnotationLoading(t,!1),console.error(i)}}),DispatcherTurning=(t,e,n,a=!1,r)=>__async(void 0,null,function*(){var o;const T=e().annotation,{fileIndexChanged:u,fileIndex:s,basicIndexChanged:i,basicIndex:N}=PageOperator.getNextPageInfo(n,T,r),p=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(t,a),u){if(T.loading||!T.imgList[s]&&!(yield loadImgList(t,e,s)))return;(o=T.onPageChange)==null||o.call(T,s);const I=p===index.ESubmitType.Backward?getBasicIndex(e().annotation,N):N;return SubmitAndChangeFileIndex(t,s,p,I)}return i?ChangeBasicIndex(t,N):t(ToSubmitFileData(p))}),ChangeSave=t=>{t(ToSubmitFileData(index.ESubmitType.Save)),t({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetPointCloudLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetLoadPCDFileLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:e}})},InitAnnotationState=t=>{t({type:Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE,payload:{}})},SetPredictResult=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT,payload:{result:e}})},SetPredictResultVisible=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},GetBoxesByID=(t,e)=>(n,a)=>{const{imgList:r,step:o}=a().annotation;return util.getBoxesByTrackID(r,o,t,e)},PreDataProcess=t=>(e,n)=>{var a,r;const{annotation:o}=n();return(r=(a=o==null?void 0:o.preDataProcess)==null?void 0:a.call(o,t))!=null?r:t.dataList};exports.BatchUpdateImgListResultByPredictResult=BatchUpdateImgListResultByPredictResult,exports.BatchUpdateResultByTrackID=BatchUpdateResultByTrackID,exports.BatchUpdateTrackID=BatchUpdateTrackID,exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.GetBoxesByID=GetBoxesByID,exports.InitAnnotationState=InitAnnotationState,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.PreDataProcess=PreDataProcess,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetLoadPCDFileLoading=SetLoadPCDFileLoading,exports.SetPointCloudLoading=SetPointCloudLoading,exports.SetPredictResult=SetPredictResult,exports.SetPredictResultVisible=SetPredictResultVisible,exports.SetTaskConfig=SetTaskConfig,exports.SetTaskStepList=SetTaskStepList,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateBeforeRotate=UpdateBeforeRotate,exports.UpdateCheckMode=UpdateCheckMode,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateHighlightAttribute=UpdateHighlightAttribute,exports.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdatePreDataProcess=UpdatePreDataProcess,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate,exports.UpdateSkipBeforePageTurning=UpdateSkipBeforePageTurning,exports.UpdateToolInstance=UpdateToolInstance,exports.loadImgList=loadImgList;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),reducer=require("./reducer.js"),index=require("../../constant/index.js"),AnnotationSize=require("../../data/enums/AnnotationSize.js"),PageOperator=require("../../utils/PageOperator.js"),index$1=require("../../utils/index.js"),util=require("../../components/predictTracking/previewResult/util.js"),__async=(t,e,n)=>new Promise((a,r)=>{var o=s=>{try{T(n.next(s))}catch(p){r(p)}},i=s=>{try{T(n.throw(s))}catch(p){r(p)}},T=s=>s.done?a(s.value):Promise.resolve(s.value).then(o,i);T((n=n.apply(t,e)).next())});const dispatchTasks=(t,e)=>e.map(n=>t(n)),getSubmitByPageOperation=t=>t===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:t===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:t===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(t,e)=>{var n,a,r;const{imgList:o,imgIndex:i}=t,{dataSourceStep:T}=reducer.getStepConfig(t.stepList,t.step);return((r=(a=index$1.jsonParser((n=o[i-1])==null?void 0:n.result)[`step_${T}`])==null?void 0:a.result)==null?void 0:r.length)-1||e};function UpdateToolInstance(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function SetTaskStepList({stepList:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:t}}}function SetTaskConfig({stepList:t,step:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function UpdateOnSubmit(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function UpdateOnSave(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:t}}}function UpdateOnPageChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function UpdateOnStepChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function UpdateGetFileData(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function UpdatePageSize(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function UpdateGetFileList(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(t){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function UpdateBeforeRotate(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function UpdatePreDataProcess(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function UpdateImgIndexByExternal(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL,payload:{getImgIndexByExternal:t}}}function BatchUpdateTrackID({id:t,newID:e,rangeIndex:n,imgList:a}){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:a}}}function BatchUpdateResultByTrackID(t,e,n){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function BatchUpdateImgListResultByPredictResult(){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const UpdateCheckMode=t=>({type:Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE,payload:{checkMode:t}}),UpdateHighlightAttribute=t=>({type:Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function InitTaskData({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:i,step:T,stepList:s,skipBeforePageTurning:p,beforeRotate:N,checkMode:A,highlightAttribute:d,preDataProcess:I,getImgIndexByExternal:l}){const u=[];return t&&u.push(UpdateOnSubmit(t)),e&&u.push(UpdateOnSave(e)),n&&u.push(UpdateOnPageChange(n)),a&&u.push(UpdateOnStepChange(a)),r&&u.push(UpdateGetFileData(r)),i&&u.push(UpdateGetFileList(i)),o&&u.push(UpdatePageSize(o)),p&&u.push(UpdateSkipBeforePageTurning(p)),N&&u.push(UpdateBeforeRotate(N)),I&&u.push(UpdatePreDataProcess(I)),typeof A=="boolean"&&u.push(UpdateCheckMode(A)),l&&u.push(UpdateImgIndexByExternal(l)),u.push(UpdateHighlightAttribute(d)),u.push(SetTaskConfig({stepList:s,step:T})),u.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),u.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),O=>dispatchTasks(O,u)}function UpdateInjectFunc({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:i,stepList:T,beforeRotate:s,highlightAttribute:p,preDataProcess:N}){const A=[];return t&&A.push(UpdateOnSubmit(t)),e&&A.push(UpdateOnSave(e)),n&&A.push(UpdateOnPageChange(n)),a&&A.push(UpdateOnStepChange(a)),r&&A.push(UpdateGetFileData(r)),i&&A.push(UpdateGetFileList(i)),o&&A.push(UpdatePageSize(o)),s&&A.push(UpdateBeforeRotate(s)),N&&A.push(UpdatePreDataProcess(N)),A.push(UpdateHighlightAttribute(p)),A.push(SetTaskStepList({stepList:T})),d=>dispatchTasks(d,A)}const getNextStep=(t,e)=>{var n;const a=e==null?void 0:e.findIndex(r=>(r==null?void 0:r.step)===t);return(n=e[a+1])==null?void 0:n.step},ToNextStep=t=>(e,n)=>{const{annotation:a}=n(),{step:r,stepList:o}=a,i=getNextStep(r,o);return[e(UpdateProcessingStep(i,t))]},UpdateProcessingStep=(t,e)=>(n,a)=>{var r,o;const{annotation:i}=a();(r=i==null?void 0:i.onStepChange)==null||r.call(i,t);const T=(o=i==null?void 0:i.imgIndex)!=null?o:0;return[n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:index.ESubmitType.StepChanged}}),n({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:t}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(e!=null?e:T,0))]},ToSubmitFileData=t=>e=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:t}})],SubmitAndChangeFileIndex=(t,e,n,a)=>__async(void 0,null,function*(){t(ToSubmitFileData(n)),yield t(SubmitHandler(n)),t(reducer.LoadFileAndFileData(e,a))}),ChangeBasicIndex=(t,e)=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:e}})],ChangeTriggerEventAfterIndexChanged=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},PageBackward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Backward,t),PageForward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Forward,t),PageJump=(t,e=!1)=>(n,a)=>{if(t!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,e,t)},loadImgList=(t,e,n,a)=>__async(void 0,null,function*(){var r;const{loadFileList:o,imgList:i,pageSize:T}=e().annotation,s=Math.floor(n/T);SetAnnotationLoading(t,!0);try{const p=yield o(s,T);if(SetAnnotationLoading(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 N=a?new Array(p.total):[...i];return N.splice(s*T,T,...p.fileList),t({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:N}}),!0}catch(p){SetAnnotationLoading(t,!1),console.error(p)}}),DispatcherTurning=(t,e,n,a=!1,r)=>__async(void 0,null,function*(){var o,i;const T=e().annotation,s=getSubmitByPageOperation(n);let{fileIndexChanged:p,fileIndex:N,basicIndexChanged:A,basicIndex:d}=PageOperator.getNextPageInfo(n,T,r);const I=(o=T==null?void 0:T.getImgIndexByExternal)==null?void 0:o.call(T,T.imgIndex,s);if(I!==void 0&&(p=!0,N=I),ChangeTriggerEventAfterIndexChanged(t,a),p){if(T.loading||!T.imgList[N]&&!(yield loadImgList(t,e,N)))return;const l=e();(i=T.onPageChange)==null||i.call(T,N);const u=s===index.ESubmitType.Backward?getBasicIndex(l.annotation,d):d;return SubmitAndChangeFileIndex(t,N,s,u)}return A?ChangeBasicIndex(t,d):t(ToSubmitFileData(s))}),ChangeSave=t=>{t(ToSubmitFileData(index.ESubmitType.Save)),t({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetLoadPCDFileLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:e}})},InitAnnotationState=t=>{t({type:Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE,payload:{}})},SetPredictResult=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT,payload:{result:e}})},SetPredictResultVisible=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},GetBoxesByID=(t,e)=>(n,a)=>{const{imgList:r,step:o}=a().annotation;return util.getBoxesByTrackID(r,o,t,e)},PreDataProcess=t=>(e,n)=>{var a,r;const{annotation:o}=n();return(r=(a=o==null?void 0:o.preDataProcess)==null?void 0:a.call(o,t))!=null?r:t.dataList},SubmitHandler=t=>(e,n)=>__async(void 0,null,function*(){const{annotation:a}=n(),{onSubmit:r,imgIndex:o,imgList:i}=a;!r||(yield r([i[o]],t,o,i))});exports.BatchUpdateImgListResultByPredictResult=BatchUpdateImgListResultByPredictResult,exports.BatchUpdateResultByTrackID=BatchUpdateResultByTrackID,exports.BatchUpdateTrackID=BatchUpdateTrackID,exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.GetBoxesByID=GetBoxesByID,exports.InitAnnotationState=InitAnnotationState,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.PreDataProcess=PreDataProcess,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetLoadPCDFileLoading=SetLoadPCDFileLoading,exports.SetPredictResult=SetPredictResult,exports.SetPredictResultVisible=SetPredictResultVisible,exports.SetTaskConfig=SetTaskConfig,exports.SetTaskStepList=SetTaskStepList,exports.SubmitHandler=SubmitHandler,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateBeforeRotate=UpdateBeforeRotate,exports.UpdateCheckMode=UpdateCheckMode,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateHighlightAttribute=UpdateHighlightAttribute,exports.UpdateImgIndexByExternal=UpdateImgIndexByExternal,exports.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdatePreDataProcess=UpdatePreDataProcess,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate,exports.UpdateSkipBeforePageTurning=UpdateSkipBeforePageTurning,exports.UpdateToolInstance=UpdateToolInstance,exports.loadImgList=loadImgList;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index$1=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js"),ToolType=require("../../data/enums/ToolType.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__spreadValues=(e,t)=>{for(var s in t||(t={}))__hasOwnProp.call(t,s)&&__defNormalProp(e,s,t[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(t))__propIsEnum.call(t,s)&&__defNormalProp(e,s,t[s]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,s)=>new Promise((g,u)=>{var S=I=>{try{N(s.next(I))}catch(m){u(m)}},A=I=>{try{N(s.throw(I))}catch(m){u(m)}},N=I=>I.done?g(I.value):Promise.resolve(I.value).then(S,A);N((s=s.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(s=>s.step===t),initialState={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:""},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,g)=>{if(g){const u=g.result;if(index.jsonParser(u)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:g}=e,u=StepUtils.getCurrentStepInfo(s,g),S=ConfigUtils.ConfigUtils.jsonParser(u.config);if(ToolUtils.isVideoTool(u==null?void 0:u.tool)||ToolUtils.isAudioTool(u==null?void 0:u.tool)||ToolUtils.isPointCloudTool(u==null?void 0:u.tool)||[ToolType.EToolName.LLM,ToolType.EToolName.NLP].includes(u==null?void 0:u.tool))return;const A=document.getElementById("toolContainer");if(!A)throw"Not exist dom named id-toolContainer";const N=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:A,toolName:u.tool,size:N,imgNode:t,config:S,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(s,g)=>__async(void 0,null,function*(){var u,S;const{stepList:A,step:N}=g().annotation,I=StepUtils.currentToolIsVideo(N,A),m=StepUtils.currentToolIsPointCloud(N,A),D=((u=StepUtils.getCurrentStepInfo(N,A))==null?void 0:u.tool)===ToolType.EToolName.LLM,y=((S=StepUtils.getCurrentStepInfo(N,A))==null?void 0:S.tool)===ToolType.EToolName.NLP,P=StepUtils.currentToolIsAudio(N,A);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),I){s(AfterVideoLoaded(e));return}if(m||D||P||y){s(AfterCommonLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:g,imgList:u}=s().annotation;if(g){const S=yield g(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:S,index:e}})}}),AfterVideoLoaded=e=>t=>{t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterCommonLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,g)=>{var u;const{toolInstance:S,imgList:A}=g().annotation,N=(u=A==null?void 0:A[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(N).then(I=>{actionCreators.SetAnnotationLoading(s,!1),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:I,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(s,!1),S==null||S.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:g,step:u=1})=>{var S,A,N,I;const m=((S=t[s])==null?void 0:S.result)||"",[D,y,P]=(A=e==null?void 0:e.exportData())!=null?A:[],x=(I=(N=e==null?void 0:e.exportCustomData)==null?void 0:N.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(m,y),w=data.composeResult(B,{step:u,stepList:g},{rect:D},x);return t.map((b,F)=>F===s?__spreadValues(__spreadProps(__spreadValues({},b),{result:w}),P):__spreadValues({},b))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,g,u,S,A,N,I,m,D,y,P,x,B,w,b,F,G,V,M,q,k,H,z,K,W;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,l=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:l})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:l,stepList:i,toolInstance:a,onSubmit:r,resultList:p}=e;if(!a||!n[o])return e;const d=((s=n[o])==null?void 0:s.result)||"",[,c,T]=(g=a==null?void 0:a.exportData())!=null?g:[],O=(S=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?S:{},f=data.composeResultWithBasicImgInfo(d,c),C=data.composeResult(f,{step:l,stepList:i},{rect:p},O),L=e.imgList.map((v,E)=>{if(E===o){const U=AnnotationDataUtils.dataCorrection(C,d,l,i);return __spreadValues(__spreadProps(__spreadValues({},v),{result:U}),T)}return v});if(((A=t.payload)==null?void 0:A.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:L});r&&r([L[o]],(N=t.payload)==null?void 0:N.submitType,o,L);const R=calcStepProgress(L,l);return __spreadProps(__spreadValues({},e),{stepProgress:R,imgList:L})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:l}=e;return l==null||l(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:l,toolInstance:i,basicResultList:a}=e;if(!i)return e;const[r]=(I=i==null?void 0:i.exportData())!=null?I:[];let p=r;if((a==null?void 0:a.length)>0){const d=(m=a[o])==null?void 0:m.id,c=r.map(T=>__spreadProps(__spreadValues({},T),{sourceID:d}));p=___default.default.cloneDeep(l).filter(T=>T.sourceID!==d),p.push(...c)}return __spreadProps(__spreadValues({},e),{resultList:p,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:l,imgIndex:i,stepList:a,annotationEngine:r,resultList:p,basicResultList:d}=e;if(!n||!r)return e;const c=t.payload.basicIndex,T=(D=d[c])==null?void 0:D.id,O=index.jsonParser((y=l[i])==null?void 0:y.result),f=(p||[]).filter(U=>U.sourceID===T),C=getStepConfig(a,o),{dataSourceStep:L,tool:R}=C,v=getStepConfig(a,L);let E=[];return L&&R&&(E=(P=O[`step_${L}`])==null?void 0:P.result,(E==null?void 0:E.length)>0?(r==null||r.setBasicInfo(v.tool,E[c]),r==null||r.launchOperation()):(r==null||r.setBasicInfo(v.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:c})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:l,annotationEngine:i,stepList:a}=e;if(!l)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:p,imgNode:d,nextBasicIndex:c,imgError:T}=t.payload,O=c!=null?c:0,f=index.jsonParser((x=n[p])==null?void 0:x.result),C=f[`step_${r.step}`],L=!C,R={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};d&&T!==!0?i==null||i.setImgNode(d,R):l==null||l.setValid(R.valid);const v=getStepConfig(a,r.step),{dataSourceStep:E,tool:U}=v,$=getStepConfig(a,E),Y=E&&U,h=(F=(b=f[`step_${E}`])==null?void 0:b.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(C==null?void 0:C.result,l,v,h,L);if(i==null||i.launchOperation(),Y&&((h==null?void 0:h.length)>0?i==null||i.setBasicInfo($.tool,h[O]):(i==null||i.setBasicInfo($.tool),i==null||i.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const J=(V=(G=h[O])==null?void 0:G.id)!=null?V:"",X=Y?j.filter(Z=>lbAnnotation.CommonToolUtils.isSameSourceID(Z.sourceID,J)):j;(M=l==null?void 0:l.history)==null||M.initRecord(j,!0),l==null||l.setResult(X)}return __spreadProps(__spreadValues({},e),{imgIndex:p,basicIndex:O,basicResultList:h,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(q=t.payload.config)!=null?q:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:l,annotationEngine:i}=o;return __spreadProps(__spreadValues({},e),{toolInstance:l,annotationEngine:i})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(k=t.payload)==null?void 0:k.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT:return __spreadProps(__spreadValues({},e),{predictionResult:t.payload.result});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE:return __spreadProps(__spreadValues({},e),{predictionResultVisible:t.payload.visible});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS:return __spreadProps(__spreadValues({},e),{preDataProcess:t.payload.preDataProcess});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:l}=e,i=[...l];return i[o]=__spreadValues(__spreadValues({},i[o]),n),__spreadProps(__spreadValues({},e),{imgList:i})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||(H=n==null?void 0:n.updateRotate)==null||H.call(n),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(z=n==null?void 0:n.valid)!=null?z:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:l,step:i}=e;if(!n)return e;if(o===0||o>=l.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const a=l[o-1].result;if(!a)return e;const r=AnnotationDataUtils.copyResultChange(a,i,(K=l[o].result)!=null?K:"");l[o]=__spreadProps(__spreadValues({},l[o]),{result:r});const d=index.jsonParser(r)[`step_${i}`],c=(d==null?void 0:d.result)||[];return n==null||n.setResult(c),n==null||n.history.pushHistory(c),(W=n==null?void 0:n.asyncData)==null||W.call(n,l[o]),__spreadProps(__spreadValues({},e),{imgList:[...l]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:l}=t.payload;if(!o)return e;const i=getStepConfig(n,l);return o==null||o.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:l,toolInstance:o==null?void 0:o.toolInstance})}case Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loadPCDFileLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=t.payload;return __spreadProps(__spreadValues({},e),{highlightAttribute:n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:l,imgList:i}=t.payload,{imgIndex:a,onSubmit:r}=e,p=[],d=i.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:l}=t.payload,{imgList:i,imgIndex:a,onSubmit:r}=e,p=[],d=i.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:l,step:i,predictionResult:a}=e,r={};a.forEach(T=>{const{index:O}=T;r[O]=___default.default.pick(T,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const p=`step_${i}`,d=[],c=o.map((T,O)=>{if(r[O]){const f=T.result==="{}"?index.jsonParser(data.composeResult("",{step:i,stepList:l},{rect:[]},{})):index.jsonParser(T.result);f[p].result.push(r[O]);const C=__spreadProps(__spreadValues({},T),{result:JSON.stringify(f)});return d.push({imgIndex:O,newInfo:C}),C}return T});return n==null||n(c,index$1.ESubmitType.BatchUpdateImgList,-1,c,{updateImgList:d}),__spreadProps(__spreadValues({},e),{imgList:c})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index$1=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js"),ToolType=require("../../data/enums/ToolType.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,l)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,__spreadValues=(e,t)=>{for(var l in t||(t={}))__hasOwnProp.call(t,l)&&__defNormalProp(e,l,t[l]);if(__getOwnPropSymbols)for(var l of __getOwnPropSymbols(t))__propIsEnum.call(t,l)&&__defNormalProp(e,l,t[l]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,l)=>new Promise((g,u)=>{var S=I=>{try{O(l.next(I))}catch(m){u(m)}},p=I=>{try{O(l.throw(I))}catch(m){u(m)}},O=I=>I.done?g(I.value):Promise.resolve(I.value).then(S,p);O((l=l.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(l=>l.step===t),initialState={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:""},getTotalPage=e=>{const{imgList:t,imgPageSize:l}=e;return Math.ceil(t.length/l)},calcStepProgress=(e,t)=>e.reduce((l,g)=>{if(g){const u=g.result;if(index.jsonParser(u)[`step_${t}`])return l+1}return l},0)/e.length,updateToolInstance=(e,t)=>{const{step:l,stepList:g}=e,u=StepUtils.getCurrentStepInfo(l,g),S=ConfigUtils.ConfigUtils.jsonParser(u.config);if(ToolUtils.isVideoTool(u==null?void 0:u.tool)||ToolUtils.isAudioTool(u==null?void 0:u.tool)||ToolUtils.isPointCloudTool(u==null?void 0:u.tool)||[ToolType.EToolName.LLM,ToolType.EToolName.NLP].includes(u==null?void 0:u.tool))return;const p=document.getElementById("toolContainer");if(!p)throw"Not exist dom named id-toolContainer";const O=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:p,toolName:u.tool,size:O,imgNode:t,config:S,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(l,g)=>__async(void 0,null,function*(){var u,S;const{stepList:p,step:O}=g().annotation,I=StepUtils.currentToolIsVideo(O,p),m=StepUtils.currentToolIsPointCloud(O,p),D=((u=StepUtils.getCurrentStepInfo(O,p))==null?void 0:u.tool)===ToolType.EToolName.LLM,y=((S=StepUtils.getCurrentStepInfo(O,p))==null?void 0:S.tool)===ToolType.EToolName.NLP,P=StepUtils.currentToolIsAudio(O,p);if(actionCreators.SetAnnotationLoading(l,!0),yield l(TryGetFileDataByAPI(e)),I){l(AfterVideoLoaded(e));return}if(m||D||P||y){l(AfterCommonLoaded(e));return}l(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,l)=>__async(void 0,null,function*(){const{getFileData:g,imgList:u}=l().annotation;if(g){const S=yield g(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:S,index:e}})}}),AfterVideoLoaded=e=>t=>{t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterCommonLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(l,g)=>{var u;const{toolInstance:S,imgList:p}=g().annotation,O=(u=p==null?void 0:p[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(O).then(I=>{actionCreators.SetAnnotationLoading(l,!1),l({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:I,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(l,!1),S==null||S.setErrorImg(),l({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:l,stepList:g,step:u=1})=>{var S,p,O,I;const m=((S=t[l])==null?void 0:S.result)||"",[D,y,P]=(p=e==null?void 0:e.exportData())!=null?p:[],x=(I=(O=e==null?void 0:e.exportCustomData)==null?void 0:O.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(m,y),w=data.composeResult(B,{step:u,stepList:g},{rect:D},x);return t.map((b,F)=>F===l?__spreadValues(__spreadProps(__spreadValues({},b),{result:w}),P):__spreadValues({},b))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var l,g,u,S,p,O,I,m,D,y,P,x,B,w,b,F,G,M,V,q,k,H,z,K,W,$,X,Y;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,s=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:s})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:s,stepList:i,toolInstance:a,onSubmit:r,resultList:A}=e;if(!a||!n[o])return e;const T=((l=n[o])==null?void 0:l.result)||"",[,d,c]=(g=a==null?void 0:a.exportData())!=null?g:[],N=(S=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?S:{},f=data.composeResultWithBasicImgInfo(T,d),L=data.composeResult(f,{step:s,stepList:i},{rect:A},N),C=e.imgList.map((v,E)=>{if(E===o){const U=AnnotationDataUtils.dataCorrection(L,T,s,i);return __spreadValues(__spreadProps(__spreadValues({},v),{result:U}),c)}return v});if(((p=t.payload)==null?void 0:p.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:C});const R=calcStepProgress(C,s);return __spreadProps(__spreadValues({},e),{stepProgress:R,imgList:C})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:s}=e;return s==null||s(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:s,toolInstance:i,basicResultList:a}=e;if(!i)return e;const[r]=(O=i==null?void 0:i.exportData())!=null?O:[];let A=r;if((a==null?void 0:a.length)>0){const T=(I=a[o])==null?void 0:I.id,d=r.map(c=>__spreadProps(__spreadValues({},c),{sourceID:T}));A=___default.default.cloneDeep(s).filter(c=>c.sourceID!==T),A.push(...d)}return __spreadProps(__spreadValues({},e),{resultList:A,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:s,imgIndex:i,stepList:a,annotationEngine:r,resultList:A,basicResultList:T}=e;if(!n||!r)return e;const d=t.payload.basicIndex,c=(m=T[d])==null?void 0:m.id,N=index.jsonParser((D=s[i])==null?void 0:D.result),f=(A||[]).filter(U=>U.sourceID===c),L=getStepConfig(a,o),{dataSourceStep:C,tool:R}=L,v=getStepConfig(a,C);let E=[];return C&&R&&(E=(y=N[`step_${C}`])==null?void 0:y.result,(E==null?void 0:E.length)>0?(r==null||r.setBasicInfo(v.tool,E[d]),r==null||r.launchOperation()):(r==null||r.setBasicInfo(v.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:d})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:s,annotationEngine:i,stepList:a}=e;if(!s)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:A,imgNode:T,nextBasicIndex:d,imgError:c}=t.payload,N=d!=null?d:0,f=index.jsonParser((P=n[A])==null?void 0:P.result),L=f[`step_${r.step}`],C=!L,R={rotate:(x=f.rotate)!=null?x:0,valid:(B=f.valid)!=null?B:!0};T&&c!==!0?i==null||i.setImgNode(T,R):s==null||s.setValid(R.valid);const v=getStepConfig(a,r.step),{dataSourceStep:E,tool:U}=v,J=getStepConfig(a,E),Z=E&&U,h=(b=(w=f[`step_${E}`])==null?void 0:w.result)!=null?b:[],j=AnnotationDataUtils.getInitialResultList(L==null?void 0:L.result,s,v,h,C);if(i==null||i.launchOperation(),Z&&((h==null?void 0:h.length)>0?i==null||i.setBasicInfo(J.tool,h[N]):(i==null||i.setBasicInfo(J.tool),i==null||i.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const Q=(G=(F=h[N])==null?void 0:F.id)!=null?G:"",ee=Z?j.filter(te=>lbAnnotation.CommonToolUtils.isSameSourceID(te.sourceID,Q)):j;(M=s==null?void 0:s.history)==null||M.initRecord(j,!0),s==null||s.setResult(ee)}return __spreadProps(__spreadValues({},e),{imgIndex:A,basicIndex:N,basicResultList:h,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(V=t.payload.config)!=null?V:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:s,annotationEngine:i}=o;return __spreadProps(__spreadValues({},e),{toolInstance:s,annotationEngine:i})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(q=t.payload)==null?void 0:q.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT:return __spreadProps(__spreadValues({},e),{predictionResult:t.payload.result});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE:return __spreadProps(__spreadValues({},e),{predictionResultVisible:t.payload.visible});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS:return __spreadProps(__spreadValues({},e),{preDataProcess:t.payload.preDataProcess});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL:return __spreadProps(__spreadValues({},e),{getImgIndexByExternal:t.payload.getImgIndexByExternal});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:s}=e,i=[...s];return i[o]=__spreadValues(__spreadValues({},i[o]),n),__spreadProps(__spreadValues({},e),{imgList:i})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||(k=n==null?void 0:n.updateRotate)==null||k.call(n),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(H=n==null?void 0:n.valid)!=null?H:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:s,step:i,stepList:a}=e;if(!n)return e;if(o===0||o>=s.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const r=s[o-1].result;if(!r)return e;const A=StepUtils.getCurrentStepInfo(i,a),T=(z=A==null?void 0:A.step)!=null?z:i,d=(K=n==null?void 0:n.valid)!=null?K:!0,c=AnnotationDataUtils.copyResultChange({copyResult:r,step:T,currentResult:(W=s[o].result)!=null?W:"",preMappingImgList:($=s[o-1].mappingImgList)!=null?$:[],mappingImgList:(X=s[o].mappingImgList)!=null?X:[],valid:d});s[o]=__spreadProps(__spreadValues({},s[o]),{result:c});const f=index.jsonParser(c)[`step_${i}`],L=(f==null?void 0:f.result)||[];return n==null||n.setResult(L),n==null||n.history.pushHistory(L),(Y=n==null?void 0:n.asyncData)==null||Y.call(n,s[o]),__spreadProps(__spreadValues({},e),{imgList:[...s]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:s}=t.payload;if(o){const i=getStepConfig(n,s);return o==null||o.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:s,toolInstance:o==null?void 0:o.toolInstance})}return __spreadProps(__spreadValues({},e),{step:s})}case Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loadPCDFileLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=t.payload;return __spreadProps(__spreadValues({},e),{highlightAttribute:n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:s,imgList:i}=t.payload,{imgIndex:a,onSubmit:r}=e,A=[],T=i.map((d,c)=>{if(lbAnnotation.MathUtils.isInRange(c,s)){const N=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:d.result})});return A.push({imgIndex:c,newInfo:N}),N}return d});return r&&r([T[a]],index$1.ESubmitType.BatchUpdateTrackID,a,T,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:T})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:s}=t.payload,{imgList:i,imgIndex:a,onSubmit:r}=e,A=[],T=i.map((d,c)=>{if(lbAnnotation.MathUtils.isInRange(c,s)){const N=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:d.result})});return A.push({imgIndex:c,newInfo:N}),N}return d});return r&&r([T[a]],index$1.ESubmitType.BatchUpdateTrackID,a,T,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:T})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:s,step:i,predictionResult:a}=e,r={};a.forEach(c=>{const{index:N}=c;r[N]=___default.default.pick(c,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const A=`step_${i}`,T=[],d=o.map((c,N)=>{if(r[N]){const f=c.result==="{}"?index.jsonParser(data.composeResult("",{step:i,stepList:s},{rect:[]},{})):index.jsonParser(c.result);f[A].result.push(r[N]);const L=__spreadProps(__spreadValues({},c),{result:JSON.stringify(f)});return T.push({imgIndex:N,newInfo:L}),L}return c});return n==null||n(d,index$1.ESubmitType.BatchUpdateImgList,-1,d,{updateImgList:T}),__spreadProps(__spreadValues({},e),{imgList:d})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
@@ -0,0 +1 @@
1
+ "use strict";var zustand=require("zustand");const useToolConfigStore=zustand.create(t=>({onlyLoadFirstData:!1,setOnlyLoadFirstData:a=>t(e=>({onlyLoadFirstData:a}))}));module.exports=useToolConfigStore;
@@ -1,10 +1,11 @@
1
1
  import { IPointCloudBox } from '@labelbee/lb-utils';
2
2
  import React from 'react';
3
3
  import { ToolInstance } from './store/annotation/types';
4
- import { GetFileData, IFileItem, LoadFileList, OnPageChange, OnSave, OnStepChange, OnSubmit } from './types/data';
4
+ import { GetFileData, GetImgIndexByExternal, IFileItem, LoadFileList, OnPageChange, OnSave, OnStepChange, OnSubmit } from './types/data';
5
5
  import { Header, RenderFooter, Sider, DrawLayerSlot } from './types/main';
6
6
  import { IStepInfo } from './types/step';
7
7
  import { EPointCloudName } from '@labelbee/lb-annotation';
8
+ import type { ToolStyle } from './types/toolStyle';
8
9
  interface IAnnotationStyle {
9
10
  strokeColor: string;
10
11
  fillColor: string;
@@ -77,6 +78,10 @@ export interface AppProps {
77
78
  }) => void;
78
79
  preDataProcess?: (params: IPreDataProcessParams) => IPointCloudBox[];
79
80
  auditContext?: any;
81
+ getImgIndexByExternal: GetImgIndexByExternal;
82
+ annotationBefore?: (setAnnotationData: Function) => void;
83
+ setResourceLoading?: (loading: boolean) => void;
84
+ toolStyle?: ToolStyle;
80
85
  }
81
86
  declare const _default: import("react-redux").ConnectedComponent<React.FC<AppProps>, import("react-redux").Omit<AppProps & {
82
87
  children?: React.ReactNode;
@@ -6,6 +6,7 @@ import React from 'react';
6
6
  export type TAfterImgOnLoad = (img: HTMLImageElement) => void;
7
7
  interface IProps {
8
8
  src: string;
9
+ fallbackSrc?: string;
9
10
  size?: {
10
11
  width?: number;
11
12
  height?: number;
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import './DynamicResizer.scss';
3
+ import { DynamicResizerProps } from './types/interface';
4
+ declare const DynamicResizer: FC<DynamicResizerProps>;
5
+ export default DynamicResizer;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { DragProps } from '../types/interface';
3
+ declare const useDrag: ({ containerRef, minTopHeight, minBottomHeight, defaultHeight, axis, localKey, isShortcutButton, }: DragProps) => {
4
+ rendered: React.JSX.Element;
5
+ topStyle: {
6
+ height: string;
7
+ };
8
+ bottomStyle: {
9
+ height: string;
10
+ };
11
+ };
12
+ export default useDrag;
@@ -0,0 +1,23 @@
1
+ import { RefObject } from 'react';
2
+ declare const useUpdateHeight: (containerRef: RefObject<HTMLDivElement>, minTopHeight: number, minBottomHeight: number, defaultHeight: number, cacheKey: string) => {
3
+ topHeight: number;
4
+ bottomHeight: number;
5
+ position: {
6
+ x: number;
7
+ y: number;
8
+ };
9
+ bounds: {
10
+ top: number;
11
+ bottom: number;
12
+ };
13
+ topStyle: {
14
+ height: string;
15
+ };
16
+ bottomStyle: {
17
+ height: string;
18
+ };
19
+ updateELHeight: (newTopHeight: number) => void;
20
+ setBottomHeightToZero: () => void;
21
+ setTopHeightToZero: () => void;
22
+ };
23
+ export default useUpdateHeight;
@@ -0,0 +1,2 @@
1
+ import DynamicResizer from './DynamicResizer';
2
+ export default DynamicResizer;
@@ -0,0 +1,17 @@
1
+ import { ReactElement, RefObject } from 'react';
2
+ interface Common {
3
+ defaultHeight?: number;
4
+ minTopHeight?: number;
5
+ minBottomHeight?: number;
6
+ axis?: 'x' | 'y';
7
+ localKey?: string;
8
+ customDivider?: ReactElement;
9
+ isShortcutButton?: boolean;
10
+ }
11
+ export interface DynamicResizerProps extends Common {
12
+ children: ReactElement[] | Element[] | Boolean[];
13
+ }
14
+ export interface DragProps extends Common {
15
+ containerRef: RefObject<HTMLDivElement>;
16
+ }
17
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { IAnswerList, IAnswerSort, ILLMBoxResult, ILLMToolConfig, IWaitAnswerSort, IInputList, ISelectedTags } from '../types';
2
- export declare const getCurrentResultFromResultList: (result: string) => any;
2
+ export declare const getCurrentResultFromResultList: (result: string, step?: number) => any;
3
3
  export declare const formatSort: (sortList: any) => any;
4
4
  export declare const getTagResult: (inputList: IInputList[], result?: ISelectedTags) => {};
5
5
  export declare const getWaitSortList: (answerList: IAnswerList[], result?: ILLMBoxResult) => {