@labelbee/lb-components 1.11.0 → 1.12.0-alpha.2

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 (100) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/assets/annotation/pointCloudTool/addSvg.svg.js +1 -0
  3. package/dist/assets/annotation/pointCloudTool/cancel.svg.js +1 -0
  4. package/dist/assets/annotation/pointCloudTool/circleSelector.svg.js +1 -0
  5. package/dist/assets/annotation/pointCloudTool/circleSelector_a.svg.js +1 -0
  6. package/dist/assets/annotation/pointCloudTool/clearSvg.svg.js +1 -0
  7. package/dist/assets/annotation/pointCloudTool/coverMode.svg.js +1 -0
  8. package/dist/assets/annotation/pointCloudTool/finish.svg.js +1 -0
  9. package/dist/assets/annotation/pointCloudTool/lassoSelector.svg.js +1 -0
  10. package/dist/assets/annotation/pointCloudTool/lassoSelector_a.svg.js +1 -0
  11. package/dist/assets/annotation/pointCloudTool/svg.js +1 -0
  12. package/dist/assets/annotation/pointCloudTool/unCoverMode.svg.js +1 -0
  13. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  14. package/dist/components/pointCloudView/PointCloudListener.js +1 -1
  15. package/dist/components/pointCloudView/PointCloudSegment.js +1 -0
  16. package/dist/components/pointCloudView/PointCloudSegmentListener.js +1 -0
  17. package/dist/components/pointCloudView/PointCloudSegmentStatus.js +1 -0
  18. package/dist/components/pointCloudView/PointCloudSegmentToolbar.js +1 -0
  19. package/dist/components/pointCloudView/hooks/useAttribute.js +1 -1
  20. package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
  21. package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
  22. package/dist/components/pointCloudView/index.js +1 -1
  23. package/dist/hooks/annotation.js +1 -1
  24. package/dist/index.css +54 -0
  25. package/dist/store/Actions.js +1 -1
  26. package/dist/store/annotation/actionCreators.js +1 -1
  27. package/dist/store/annotation/map.js +1 -1
  28. package/dist/store/annotation/reducer.js +1 -1
  29. package/dist/types/App.d.ts +1 -0
  30. package/dist/types/assets/annotation/pointCloudTool/svg.d.ts +7 -0
  31. package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +1 -1
  32. package/dist/types/components/pointCloudView/PointCloud3DView.d.ts +1 -1
  33. package/dist/types/components/pointCloudView/PointCloudBackView.d.ts +1 -1
  34. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +17 -7
  35. package/dist/types/components/pointCloudView/PointCloudListener.d.ts +3 -1
  36. package/dist/types/components/pointCloudView/PointCloudSegment.d.ts +9 -0
  37. package/dist/types/components/pointCloudView/PointCloudSegmentListener.d.ts +11 -0
  38. package/dist/types/components/pointCloudView/PointCloudSegmentStatus.d.ts +3 -0
  39. package/dist/types/components/pointCloudView/PointCloudSegmentToolbar.d.ts +3 -0
  40. package/dist/types/components/pointCloudView/PointCloudSideView.d.ts +1 -1
  41. package/dist/types/components/pointCloudView/PointCloudTopView.d.ts +1 -1
  42. package/dist/types/components/pointCloudView/hooks/useAttribute.d.ts +1 -0
  43. package/dist/types/components/pointCloudView/hooks/useHistory.d.ts +2 -1
  44. package/dist/types/components/pointCloudView/hooks/useStatus.d.ts +1 -0
  45. package/dist/types/components/pointCloudView/index.d.ts +3 -4
  46. package/dist/types/hooks/annotation.d.ts +4 -0
  47. package/dist/types/index.d.ts +1 -0
  48. package/dist/types/store/Actions.d.ts +1 -0
  49. package/dist/types/store/annotation/actionCreators.d.ts +3 -2
  50. package/dist/types/store/annotation/map.d.ts +2 -0
  51. package/dist/types/store/annotation/reducer.d.ts +1 -0
  52. package/dist/types/store/annotation/types.d.ts +1 -0
  53. package/dist/types/typeTem.d.ts +12 -0
  54. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/index.d.ts +3 -0
  55. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.d.ts +2 -1
  56. package/dist/types/views/MainView/toolHeader/SwitchPattern/index.d.ts +12 -0
  57. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  58. package/dist/views/MainView/sidebar/index.js +1 -1
  59. package/dist/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -1
  60. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  61. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  62. package/dist/views/MainView/toolHeader/SwitchPattern/index.js +1 -0
  63. package/dist/views/MainView/toolHeader/headerOption/index.js +1 -1
  64. package/dist/views/MainView/toolHeader/index.js +1 -1
  65. package/es/App.js +1 -1
  66. package/es/assets/annotation/pointCloudTool/addSvg.svg.js +1 -0
  67. package/es/assets/annotation/pointCloudTool/cancel.svg.js +1 -0
  68. package/es/assets/annotation/pointCloudTool/circleSelector.svg.js +1 -0
  69. package/es/assets/annotation/pointCloudTool/circleSelector_a.svg.js +1 -0
  70. package/es/assets/annotation/pointCloudTool/clearSvg.svg.js +1 -0
  71. package/es/assets/annotation/pointCloudTool/coverMode.svg.js +1 -0
  72. package/es/assets/annotation/pointCloudTool/finish.svg.js +1 -0
  73. package/es/assets/annotation/pointCloudTool/lassoSelector.svg.js +1 -0
  74. package/es/assets/annotation/pointCloudTool/lassoSelector_a.svg.js +1 -0
  75. package/es/assets/annotation/pointCloudTool/svg.js +1 -0
  76. package/es/assets/annotation/pointCloudTool/unCoverMode.svg.js +1 -0
  77. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  78. package/es/components/pointCloudView/PointCloudListener.js +1 -1
  79. package/es/components/pointCloudView/PointCloudSegment.js +1 -0
  80. package/es/components/pointCloudView/PointCloudSegmentListener.js +1 -0
  81. package/es/components/pointCloudView/PointCloudSegmentStatus.js +1 -0
  82. package/es/components/pointCloudView/PointCloudSegmentToolbar.js +1 -0
  83. package/es/components/pointCloudView/hooks/useAttribute.js +1 -1
  84. package/es/components/pointCloudView/hooks/useHistory.js +1 -1
  85. package/es/components/pointCloudView/hooks/useStatus.js +1 -1
  86. package/es/components/pointCloudView/index.js +1 -1
  87. package/es/hooks/annotation.js +1 -1
  88. package/es/index.css +54 -0
  89. package/es/store/Actions.js +1 -1
  90. package/es/store/annotation/actionCreators.js +1 -1
  91. package/es/store/annotation/map.js +1 -1
  92. package/es/store/annotation/reducer.js +1 -1
  93. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  94. package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -1
  95. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  96. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  97. package/es/views/MainView/toolHeader/SwitchPattern/index.js +1 -0
  98. package/es/views/MainView/toolHeader/headerOption/index.js +1 -1
  99. package/es/views/MainView/toolHeader/index.js +1 -1
  100. package/package.json +3 -3
package/dist/App.js CHANGED
@@ -1 +1 @@
1
- "use strict";var index$1=require("./views/MainView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactRedux=require("react-redux"),index=require("./index.js"),ctx=require("./store/ctx.js"),Actions=require("./store/Actions.js"),actionCreators=require("./store/annotation/actionCreators.js"),reducer=require("./store/annotation/reducer.js"),es=require("antd/es"),zhCN=require("antd/es/locale/zh_CN"),enUS=require("antd/es/locale/en_US");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),zhCN__default=_interopDefaultLegacy(zhCN),enUS__default=_interopDefaultLegacy(enUS),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const App=e=>{const[t,a]=React.useState(0),{imgList:o,step:P=1,stepList:i,onSubmit:s,onSave:l,onPageChange:c,onStepChange:u,initialIndex:d=0,toolInstance:_,setToolInstance:h,getFileData:p,pageSize:f=10,loadFileList:r,defaultLang:g="cn",skipBeforePageTurning:I,beforeRotate:v,checkMode:m=!1,intelligentFit:O=!0}=e;React.useEffect(()=>{index.store.dispatch(actionCreators.InitTaskData({onSubmit:s,stepList:i,step:P,getFileData:p,pageSize:f,loadFileList:r,onSave:l,onPageChange:c,onStepChange:u,skipBeforePageTurning:I,beforeRotate:v,checkMode:m})),S(),lbUtils.i18n.changeLanguage(g);const n=()=>{a(L=>L+1)};return lbUtils.i18n.on("languageChanged",n),()=>{lbUtils.i18n.off("languageChanged",n),actionCreators.InitAnnotationState(index.store.dispatch)}},[]),React.useEffect(()=>{index.store.dispatch(actionCreators.UpdateInjectFunc({onSubmit:s,stepList:i,getFileData:p,pageSize:f,loadFileList:r,onSave:l,onPageChange:c,onStepChange:u,beforeRotate:v})),lbUtils.i18n.changeLanguage(g)},[s,i,p,f,r,l,c,u,g,v]),React.useEffect(()=>{h==null||h(_)},[_]);const S=()=>{r?actionCreators.loadImgList(index.store.dispatch,index.store.getState,d,!0).then(n=>{n&&index.store.dispatch(reducer.LoadFileAndFileData(d))}):o&&o.length>0&&(index.store.dispatch({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:o}}),index.store.dispatch(reducer.LoadFileAndFileData(d)))};return React__default.default.createElement("div",null,React__default.default.createElement(es.ConfigProvider,{locale:lbUtils.i18n.language==="en"?enUS__default.default:zhCN__default.default},React__default.default.createElement(index$1,__spreadProps(__spreadValues({},e),{intelligentFit:O}))))},mapStateToProps=e=>({toolInstance:e.annotation.toolInstance});var App$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(App);module.exports=App$1;
1
+ "use strict";var index$1=require("./views/MainView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactRedux=require("react-redux"),index=require("./index.js"),ctx=require("./store/ctx.js"),Actions=require("./store/Actions.js"),actionCreators=require("./store/annotation/actionCreators.js"),reducer=require("./store/annotation/reducer.js"),es=require("antd/es"),zhCN=require("antd/es/locale/zh_CN"),enUS=require("antd/es/locale/en_US");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),zhCN__default=_interopDefaultLegacy(zhCN),enUS__default=_interopDefaultLegacy(enUS),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const App=e=>{const[t,a]=React.useState(0),{imgList:o,step:I=1,stepList:i,onSubmit:s,onSave:l,onPageChange:c,onStepChange:u,initialIndex:d=0,toolInstance:h,setToolInstance:P,getFileData:p,pageSize:f=10,loadFileList:r,defaultLang:g="cn",skipBeforePageTurning:m,beforeRotate:v,checkMode:O=!1,intelligentFit:S=!0,highlightAttribute:_=""}=e;React.useEffect(()=>{index.store.dispatch(actionCreators.InitTaskData({onSubmit:s,stepList:i,step:I,getFileData:p,pageSize:f,loadFileList:r,onSave:l,onPageChange:c,onStepChange:u,skipBeforePageTurning:m,beforeRotate:v,checkMode:O,highlightAttribute:_})),L(),lbUtils.i18n.changeLanguage(g);const n=()=>{a(b=>b+1)};return lbUtils.i18n.on("languageChanged",n),()=>{lbUtils.i18n.off("languageChanged",n),actionCreators.InitAnnotationState(index.store.dispatch)}},[]),React.useEffect(()=>{index.store.dispatch(actionCreators.UpdateInjectFunc({onSubmit:s,stepList:i,getFileData:p,pageSize:f,loadFileList:r,onSave:l,onPageChange:c,onStepChange:u,beforeRotate:v,highlightAttribute:_})),lbUtils.i18n.changeLanguage(g)},[s,i,p,f,r,l,c,u,g,v,_]),React.useEffect(()=>{P==null||P(h)},[h]);const L=()=>{r?actionCreators.loadImgList(index.store.dispatch,index.store.getState,d,!0).then(n=>{n&&index.store.dispatch(reducer.LoadFileAndFileData(d))}):o&&o.length>0&&(index.store.dispatch({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:o}}),index.store.dispatch(reducer.LoadFileAndFileData(d)))};return React__default.default.createElement("div",null,React__default.default.createElement(es.ConfigProvider,{locale:lbUtils.i18n.language==="en"?enUS__default.default:zhCN__default.default},React__default.default.createElement(index$1,__spreadProps(__spreadValues({},e),{intelligentFit:S}))))},mapStateToProps=e=>({toolInstance:e.annotation.toolInstance});var App$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(App);module.exports=App$1;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='9.201172' height='9.200073' viewBox='0 0 9.20117 9.20007' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cdesc%3e Created with Pixso. %3c/desc%3e %3cpath id='Exclude' d='M8.20117 5.59998L5.60156 5.59998L5.60156 8.20007C5.60156 8.75232 5.15234 9.20007 4.60156 9.20007C4.04883 9.20007 3.60156 8.75232 3.60156 8.20007L3.60156 5.59998L1 5.59998C0.449219 5.59998 0 5.15234 0 4.59998C0 4.04773 0.449219 3.59998 1 3.59998L3.60156 3.59998L3.60156 1C3.60156 0.447754 4.04883 0 4.60156 0C5.15234 0 5.60156 0.447754 5.60156 1L5.60156 3.59998L8.20117 3.59998C8.75391 3.59998 9.20117 4.04773 9.20117 4.59998C9.20117 5.15234 8.75391 5.59998 8.20117 5.59998Z' fill-rule='evenodd' fill='%23999999'/%3e %3cdefs/%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='10.450195' height='10.420227' viewBox='0 0 10.4502 10.4202' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cdesc%3e Created with Pixso. %3c/desc%3e %3cpath id='%e9%94%99%e8%af%af' d='M10.1914 0.194397C9.93066 -0.0654907 9.50879 -0.0646973 9.24854 0.196106L5.21533 4.2442L1.16699 0.210693C0.90625 -0.0491943 0.484375 -0.0484619 0.224121 0.212402C-0.0356445 0.473206 -0.034668 0.895325 0.226074 1.15521L4.27393 5.18872L0.194336 9.28302C-0.0654297 9.54382 -0.0649414 9.96594 0.196289 10.2258C0.457031 10.4857 0.878906 10.4849 1.13867 10.2241L5.21875 6.12982L9.31299 10.2095C9.57373 10.4694 9.99609 10.4687 10.2559 10.2079C10.5156 9.94702 10.5151 9.52496 10.2539 9.26508L6.15967 5.1853L10.1934 1.13721C10.4531 0.876404 10.4526 0.454285 10.1914 0.194397Z' fill-rule='evenodd' fill='%23333333'/%3e %3cdefs/%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='24.000000' height='24.000000' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cdesc%3e Created with Pixso. %3c/desc%3e %3cmask id='mask1_15950' mask-type='alpha' maskUnits='userSpaceOnUse' x='0.000000' y='0.000000' width='24.000000' height='24.000000'%3e %3crect id='Frame 1312316549 (Background/Mask)' width='24.000000' height='24.000000' fill='%23C4C4C4'/%3e %3c/mask%3e %3cg mask='url(%23mask1_15950)'%3e %3ccircle id='Ellipse 1677' cx='12.000000' cy='12.000000' r='9.000000' stroke='%23999999' stroke-width='2.000000' stroke-dasharray='0 0'/%3e %3c/g%3e %3cg mask='url(%23mask1_15950)'%3e %3ccircle id='Ellipse 1678' cx='12.000000' cy='12.000000' r='4.000000' fill='%23999999'/%3e %3c/g%3e %3cdefs/%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='24.000000' height='24.000000' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cdesc%3e Created with Pixso. %3c/desc%3e %3cmask id='mask1_15950' mask-type='alpha' maskUnits='userSpaceOnUse' x='0.000000' y='0.000000' width='24.000000' height='24.000000'%3e %3crect id='Frame 1312316549 (Background/Mask)' width='24.000000' height='24.000000' fill='%231664FF'/%3e %3c/mask%3e %3cg mask='url(%23mask1_15950)'%3e %3ccircle id='Ellipse 1677' cx='12.000000' cy='12.000000' r='9.000000' stroke='%231664FF' stroke-width='2.000000' stroke-dasharray='0 0'/%3e %3c/g%3e %3cg mask='url(%23mask1_15950)'%3e %3ccircle id='Ellipse 1678' cx='12.000000' cy='12.000000' r='4.000000' fill='%231664FF'/%3e %3c/g%3e %3cdefs/%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='10.000000' height='2.000000' viewBox='0 0 10 2' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cdesc%3e Created with Pixso. %3c/desc%3e %3cpath id='%e6%b7%bb%e5%8a%a0' d='M4.44434 0L5.55566 0L9.44434 0C9.75146 0 10 0.447754 10 1C10 1.55225 9.75146 2 9.44434 2L5.55566 2L4.44434 2L0.555664 2C0.248535 2 0 1.55225 0 1C0 0.447754 0.248535 0 0.555664 0L4.44434 0Z' fill-rule='evenodd' fill='%23464A53'/%3e %3cdefs/%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg width='24px' height='24px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3ctitle%3eFrame 1312316531%3c/title%3e %3cdefs%3e %3crect id='path-1' x='0' y='0' width='24' height='24'%3e%3c/rect%3e %3c/defs%3e %3cg id='%e6%a0%87%e6%b3%a8%e5%b7%a5%e5%85%b7%e4%bc%98%e5%8c%96' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e %3cg id='%e7%82%b9%e4%ba%91%e5%b7%a5%e5%85%b7-%e5%88%86%e5%89%b2%e6%a8%a1%e5%bc%8f' transform='translate(-1432.000000%2c -88.000000)'%3e %3cg id='%e7%bc%96%e7%bb%84-10' transform='translate(1352.000000%2c 84.000000)'%3e %3cg id='Frame-1312316531' transform='translate(80.000000%2c 4.000000)'%3e %3cmask id='mask-2' fill='white'%3e %3cuse xlink:href='%23path-1'%3e%3c/use%3e %3c/mask%3e %3cg id='Frame-1312316531-(Background/Mask)'%3e%3c/g%3e %3cg id='Group-1312317594' mask='url(%23mask-2)'%3e %3cg transform='translate(3.000000%2c 3.000000)'%3e %3cpath d='M0%2c0 L14%2c0 L14%2c14 L0%2c14 L0%2c0 Z' id='Vector-205' stroke='white' stroke-width='2' fill='none' stroke-linejoin='round' stroke-dasharray='0%2c0'%3e%3c/path%3e %3cpath d='M4%2c3 L17%2c3 C17.5522847%2c3 18%2c3.44771525 18%2c4 L18%2c17 C18%2c17.5522847 17.5522847%2c18 17%2c18 L4%2c18 C3.44771525%2c18 3%2c17.5522847 3%2c17 L3%2c4 C3%2c3.44771525 3.44771525%2c3 4%2c3 Z' id='Vector-206' stroke='none' fill='white' fill-rule='evenodd'%3e%3c/path%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='13.666504' height='9.666687' viewBox='0 0 13.6665 9.66669' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cdesc%3e Created with Pixso. %3c/desc%3e %3cpath id='%e6%ad%a3%e7%a1%ae' d='M13.4761 1.1333L5.30957 9.46661C5.18164 9.59692 5.00635 9.66919 4.82373 9.66663C4.6416 9.664 4.46826 9.58679 4.34424 9.45294L0.177734 4.95294C-0.0727539 4.6828 -0.0566406 4.26099 0.213867 4.0108C0.483887 3.76068 0.905762 3.77692 1.15576 4.04706L4.84717 8.03357L12.5239 0.200073C12.7817 -0.0629272 13.2036 -0.0671997 13.4668 0.190552C13.7295 0.448242 13.7339 0.8703 13.4761 1.1333Z' fill-rule='evenodd' fill='%23333333'/%3e %3cdefs/%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='24.000000' height='24.000000' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cdesc%3e Created with Pixso. %3c/desc%3e %3cmask id='mask1_15945' mask-type='alpha' maskUnits='userSpaceOnUse' x='0.000000' y='0.000000' width='24.000000' height='24.000000'%3e %3crect id='Frame 1312316543 (Background/Mask)' width='24.000000' height='24.000000' fill='%23999999'/%3e %3c/mask%3e %3cg mask='url(%23mask1_15945)'%3e %3cpath id='Vector 197' d='M6.82031 21.1879C7.30859 20.8242 7.65674 20.4422 7.89697 20.0767C8.56055 19.0654 7.91553 17.8707 7.32861 16.813C6.78955 15.8416 6.34033 14.9126 5.68604 14.0402C3.5 11.1254 3.98877 7.18506 6.86133 4.94373C9.97998 2.51038 13.4199 2.427 15.9365 3.36963C16.5493 3.59912 17.186 3.94055 17.7881 4.3363C20.1196 5.86804 21.0063 8.93555 19.5503 11.3146C17.5649 14.5581 13.4385 15.5564 10.3657 15.641' stroke='%23999999' stroke-width='1.995000' stroke-linejoin='round' stroke-linecap='round' stroke-dasharray='0 0'/%3e %3c/g%3e %3cg mask='url(%23mask1_15945)'%3e %3cpath id='Vector 198' d='M4.979 17.3167C3.92969 16.8472 3.81592 15.4429 4.79492 14.8404C5.9707 14.1169 7.58301 13.7576 9.354 14.7828C10.374 15.3734 10.4321 16.5123 9.39893 17.0798C8.32764 17.6683 6.73828 18.1039 4.979 17.3167Z' stroke='%23999999' stroke-width='1.895129' stroke-linejoin='round' stroke-dasharray='0 0'/%3e %3c/g%3e %3cdefs/%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='24.000000' height='24.000000' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cdesc%3e Created with Pixso. %3c/desc%3e %3cmask id='mask1_15945' mask-type='alpha' maskUnits='userSpaceOnUse' x='0.000000' y='0.000000' width='24.000000' height='24.000000'%3e %3crect id='Frame 1312316543 (Background/Mask)' width='24.000000' height='24.000000' fill='%23C4C4C4'/%3e %3c/mask%3e %3cg mask='url(%23mask1_15945)'%3e %3cpath id='Vector 197' d='M6.82031 21.1879C7.30859 20.8242 7.65674 20.4422 7.89697 20.0767C8.56055 19.0654 7.91553 17.8707 7.32861 16.813C6.78955 15.8416 6.34033 14.9126 5.68604 14.0402C3.5 11.1254 3.98877 7.18506 6.86133 4.94373C9.97998 2.51038 13.4199 2.427 15.9365 3.36963C16.5493 3.59912 17.186 3.94055 17.7881 4.3363C20.1196 5.86804 21.0063 8.93555 19.5503 11.3146C17.5649 14.5581 13.4385 15.5564 10.3657 15.641' stroke='%231664FF' stroke-width='1.995000' stroke-linejoin='round' stroke-linecap='round' stroke-dasharray='0 0'/%3e %3c/g%3e %3cg mask='url(%23mask1_15945)'%3e %3cpath id='Vector 198' d='M4.979 17.3167C3.92969 16.8472 3.81592 15.4429 4.79492 14.8404C5.9707 14.1169 7.58301 13.7576 9.354 14.7828C10.374 15.3734 10.4321 16.5123 9.39893 17.0798C8.32764 17.6683 6.73828 18.1039 4.979 17.3167Z' stroke='%231664FF' stroke-width='1.895129' stroke-linejoin='round' stroke-dasharray='0 0'/%3e %3c/g%3e %3cdefs/%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const HidePointCloudSegmentSvg=e=>{var t,l,r;return React__default.default.createElement("svg",{width:"24.000000",height:"24.000000",viewBox:"0 0 24 24",fill:"none"},React__default.default.createElement("g",null,React__default.default.createElement("rect",{id:"Rectangle 12065",x:"2.500000",y:"7.002930",rx:"0.500000",width:"8.127075",height:"10.000000",fill:(t=e.color)!=null?t:"#FFFFFF"}),React__default.default.createElement("rect",{id:"Rectangle 12066",x:"15.503906",y:"8.002930",width:"5.996094",height:"8.000000",stroke:(l=e.color)!=null?l:"#FFFFFF",strokeWidth:"2.000000",strokeLinejoin:"round",strokeDasharray:"0 0"}),React__default.default.createElement("path",{id:"Vector 183",d:"M12.5098 4L12.5098 20",stroke:(r=e.color)!=null?r:"#FFFFFF",strokeWidth:"2.000000",strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:"0 0"})),React__default.default.createElement("defs",null))},FocusModeSvg=e=>{var t,l,r,a,o,d;return React__default.default.createElement("svg",{width:"24.000000",height:"24.000000",viewBox:"0 0 24 24",fill:"none"},React__default.default.createElement("g",null,React__default.default.createElement("path",{id:"Vector",d:"M14.5811 6.89233L14.5811 3.22339L9.58105 3.22339L9.58105 6.89233C8.08643 7.75684 7.08105 9.37268 7.08105 11.2234C7.08105 13.9849 9.31982 16.2234 12.0811 16.2234C14.8423 16.2234 17.0811 13.9849 17.0811 11.2234C17.0811 9.37268 16.0757 7.75684 14.5811 6.89233ZM14.5811 6.89233C13.8457 6.46692 12.9917 6.22339 12.0811 6.22339C11.1704 6.22339 10.3164 6.46692 9.58105 6.89233L9.58105 7.22339L14.5811 7.22339L14.5811 6.89233Z",clipRule:"evenodd",fillRule:"evenodd",fill:(t=e.color)!=null?t:"#FFFFFF",fillOpacity:"1.000000"}),React__default.default.createElement("path",{id:"Vector 170",d:"M2.36572 10.2231L5.41895 10.2231",stroke:(l=e.color)!=null?l:"#FFFFFF",strokeWidth:"2.000000",strokeDasharray:"0 0"}),React__default.default.createElement("path",{id:"Vector 172",d:"M11.0811 17.7231L11.0811 20.7763",stroke:(r=e.color)!=null?r:"#FFFFFF",strokeWidth:"2.000000",strokeDasharray:"0 0"}),React__default.default.createElement("path",{id:"Vector 173",d:"M17.0015 15.6702L19.1602 17.8291",stroke:(a=e.color)!=null?a:"#FFFFFF",strokeWidth:"2.000000",strokeDasharray:"0 0"}),React__default.default.createElement("path",{id:"Vector 174",d:"M4.58105 17.8293L6.73975 15.6704",stroke:(o=e.color)!=null?o:"#FFFFFF",strokeWidth:"2.000000",strokeDasharray:"0 0"}),React__default.default.createElement("path",{id:"Vector 171",d:"M18.5811 10.2231L21.6343 10.2231",stroke:(d=e.color)!=null?d:"#FFFFFF",strokeWidth:"2.000000",strokeDasharray:"0 0"})),React__default.default.createElement("defs",null))};exports.FocusModeSvg=FocusModeSvg,exports.HidePointCloudSegmentSvg=HidePointCloudSegmentSvg;
@@ -0,0 +1 @@
1
+ "use strict";var img="data:image/svg+xml,%3csvg width='24.000000' height='24.000000' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3cdesc%3e Created with Pixso. %3c/desc%3e %3cmask id='mask155_5132' mask-type='alpha' maskUnits='userSpaceOnUse' x='0.000000' y='0.000000' width='24.000000' height='24.000000'%3e %3crect id='Frame 1312316531 (Background/Mask)' width='24.000000' height='24.000000' fill='%23C4C4C4'/%3e %3c/mask%3e %3cg mask='url(%23mask155_5132)'%3e %3cpath id='Vector 205' d='M3 3L17 3L17 17L3 17L3 3Z' fill-rule='evenodd' fill='white'/%3e %3cpath id='Vector 205' d='M17 3L17 17L3 17L3 3L17 3Z' stroke='white' stroke-width='2.000000' stroke-linejoin='round' stroke-dasharray='0 0'/%3e %3cpath id='Vector 206' d='M6 7C6 6.44775 6.44775 6 7 6L20 6C20.5522 6 21 6.44775 21 7L21 20C21 20.5522 20.5522 21 20 21L7 21C6.44775 21 6 20.5522 6 20L6 7ZM19 8L8 8L8 19L19 19L19 8Z' fill-rule='evenodd' fill='white'/%3e %3c/g%3e %3cdefs/%3e%3c/svg%3e";module.exports=img;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var React__default=_interopDefaultLegacy(React);const PointCloudContext=React__default.default.createContext({pointCloudBoxList:[],pointCloudSphereList:[],displayPointCloudList:[],displaySphereList:[],displayLineList:[],polygonList:[],lineList:[],selectedID:"",selectedIDs:[],valid:!0,setSelectedIDs:()=>{},setPointCloudResult:()=>{},setPointCloudSphereList:()=>{},setPointCloudValid:()=>{},setTopViewInstance:()=>{},setSideViewInstance:()=>{},setBackViewInstance:()=>{},setMainViewInstance:()=>{},addSelectedID:()=>{},selectedAllBoxes:()=>{},addPointCloudBox:()=>[],addPointCloudSphere:()=>[],setPolygonList:()=>{},setLineList:()=>{},zoom:1,setZoom:()=>{},history:new lbAnnotation.ActionsHistory,hideAttributes:[],setHideAttributes:()=>{},toggleAttributesVisible:()=>{},reRender:()=>{},setAttrPanelLayout:()=>{},attrPanelLayout:"",syncAllViewPointCloudColor:()=>{},defaultAttribute:"",setDefaultAttribute:()=>{},pointCloudPattern:lbAnnotation.EToolName.Rect,setPointCloudPattern:()=>{},selectSpecAttr:()=>{}}),PointCloudProvider=({children:u})=>{const[l,h]=React.useState([]),[p,m]=React.useState([]),[C,T]=React.useState([]),[S,j]=React.useState([]),[r,L]=React.useState([]),[w,_]=React.useState(!0),[I,k]=React.useState(1),[o,q]=React.useState(),[V,z]=React.useState(),[g,F]=React.useState(),[n,Z]=React.useState(),[x,G]=React.useState(""),[v,J]=React.useState(lbAnnotation.EToolName.Rect),K=React.useRef(new lbAnnotation.ActionsHistory).current,[i,b]=React.useState([]),[B,Q]=React.useState(""),R=React.useMemo(()=>r.length===1?r[0]:"",[r]),D=React.useMemo(()=>{const a=l.find(t=>t.id===R),y=t=>{const e=l.concat(t);return h(e),e},A=t=>{const e=p.concat(t);return m(e),e},f=t=>{_(t!==!1)},s=t=>{t===void 0&&L([]),typeof t=="string"&&L([t]),Array.isArray(t)&&L(Array.from(new Set(t)))},W=t=>{r.includes(t)?s(r.filter(e=>e!==t)):s([...r,t])},X=()=>{if(v===lbAnnotation.EToolName.Rect){const t=l.map(e=>e.id);s(t),o==null||o.pointCloud2dOperation.setSelectedIDs(t)}},Y=t=>{s(l.filter(e=>e.attribute===t).map(e=>e.id))},E=l.filter(t=>!i.includes(t.attribute)),H=p.filter(t=>!i.includes(t.attribute)),O=S.filter(t=>t.attribute&&!i.includes(t.attribute)),$=t=>{if(i.includes(t))b(i.filter(e=>e!==t));else{const e=i.concat(t);b(e)}},tt=(t=E,e=C,P=H,d=O)=>{l.forEach(c=>{n==null||n.removeObjectByName(c.id)}),p.forEach(c=>{n==null||n.removeObjectByName(c.id)}),o==null||o.updatePolygonList(t,e),o==null||o.updatePointList(P),o==null||o.updateLineList(d),n==null||n.generateBoxes(t),n==null||n.generateSpheres(P),M(t)},M=t=>{const e=n==null?void 0:n.highlightOriginPointCloud(t);return new Promise(P=>{e==null||e.then(d=>{[o].forEach(c=>{var N;d&&((N=c==null?void 0:c.pointCloudInstance)==null||N.updateColor(d),P({color:d}))})}).catch(d=>{console.error(d)})})};return{selectedID:R,pointCloudBoxList:l,pointCloudSphereList:p,displayPointCloudList:E,displaySphereList:H,displayLineList:O,selectedIDs:r,setPointCloudResult:h,setSelectedIDs:s,addPointCloudBox:y,addPointCloudSphere:A,setPointCloudSphereList:m,valid:w,selectedPointCloudBox:a,setPointCloudValid:f,addSelectedID:W,selectedAllBoxes:X,topViewInstance:o,setTopViewInstance:q,sideViewInstance:V,setSideViewInstance:z,backViewInstance:g,setBackViewInstance:F,mainViewInstance:n,setMainViewInstance:Z,polygonList:C,setPolygonList:T,lineList:S,setLineList:j,zoom:I,setZoom:k,history:K,toggleAttributesVisible:$,hideAttributes:i,setHideAttributes:b,reRender:tt,attrPanelLayout:B,setAttrPanelLayout:Q,syncAllViewPointCloudColor:M,defaultAttribute:x,setDefaultAttribute:G,pointCloudPattern:v,setPointCloudPattern:J,selectSpecAttr:Y}},[w,r,l,p,C,S,o,V,g,n,I,i,B,x,v]),U=()=>{const a=l.filter(s=>i.includes(s.attribute)),{setSelectedIDs:y,reRender:A}=D,f=a.map(s=>s.id);f.length>0&&y(r.filter(s=>!f.includes(s))),A()};return React.useEffect(()=>{var a;U(),(a=o==null?void 0:o.pointCloud2dOperation)==null||a.setHiddenAttributes(i)},[i]),React__default.default.createElement(PointCloudContext.Provider,{value:D},u)};exports.PointCloudContext=PointCloudContext,exports.PointCloudProvider=PointCloudProvider;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbUtils=require("@labelbee/lb-utils"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),ctx=require("../../store/ctx.js"),actionCreators=require("../../store/annotation/actionCreators.js");function _interopDefaultLegacy(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var React__default=_interopDefaultLegacy(React);const PointCloudContext=React__default.default.createContext({pointCloudBoxList:[],pointCloudSphereList:[],displayPointCloudList:[],displaySphereList:[],displayLineList:[],polygonList:[],lineList:[],selectedID:"",selectedIDs:[],valid:!0,setSelectedIDs:()=>{},setPointCloudResult:()=>{},setPointCloudSphereList:()=>{},setPointCloudValid:()=>{},setTopViewInstance:()=>{},setSideViewInstance:()=>{},setBackViewInstance:()=>{},setMainViewInstance:()=>{},addSelectedID:()=>{},selectedAllBoxes:()=>{},addPointCloudBox:()=>[],addPointCloudSphere:()=>[],setPolygonList:()=>{},setLineList:()=>{},zoom:1,setZoom:()=>{},history:new lbAnnotation.ActionsHistory,hideAttributes:[],setHideAttributes:()=>{},toggleAttributesVisible:()=>{},reRender:()=>{},setAttrPanelLayout:()=>{},attrPanelLayout:"",syncAllViewPointCloudColor:()=>{},defaultAttribute:"",setDefaultAttribute:()=>{},pointCloudPattern:lbAnnotation.EToolName.Rect,setPointCloudPattern:()=>{},selectSpecAttr:()=>{},globalPattern:lbUtils.EPointCloudPattern.Detection,setGlobalPattern:()=>{},setPtSegmentInstance:()=>{},segmentation:[],setSegmentation:()=>{}}),PointCloudProvider=({children:r})=>{const[l,V]=React.useState([]),[p,x]=React.useState([]),[v,F]=React.useState([]),[L,k]=React.useState([]),[a,g]=React.useState([]),[D,z]=React.useState(!0),[B,Z]=React.useState(1),[o,U]=React.useState(),[R,J]=React.useState(),[E,K]=React.useState(),[n,Q]=React.useState(),[H,W]=React.useState(""),[m,X]=React.useState(lbAnnotation.EToolName.Rect),Y=React.useRef(new lbAnnotation.ActionsHistory).current,[s,y]=React.useState([]),[j,$]=React.useState(""),[A,tt]=React.useState(lbUtils.EPointCloudPattern.Detection),[d,_]=React.useState(void 0),[h,et]=React.useState([]),ot=ctx.useDispatch(),q=React.useMemo(()=>a.length===1?a[0]:"",[a]),G=React.useMemo(()=>{const c=l.find(t=>t.id===q),P=t=>{const e=l.concat(t);return V(e),e},I=t=>{const e=p.concat(t);return x(e),e},f=t=>{z(t!==!1)},i=t=>{t===void 0&&g([]),typeof t=="string"&&g([t]),Array.isArray(t)&&g(Array.from(new Set(t)))},st=t=>{a.includes(t)?i(a.filter(e=>e!==t)):i([...a,t])},it=()=>{if(m===lbAnnotation.EToolName.Rect){const t=l.map(e=>e.id);i(t),o==null||o.pointCloud2dOperation.setSelectedIDs(t)}},lt=t=>{i(l.filter(e=>e.attribute===t).map(e=>e.id))},M=l.filter(t=>!s.includes(t.attribute)),N=p.filter(t=>!s.includes(t.attribute)),O=L.filter(t=>t.attribute&&!s.includes(t.attribute)),at=t=>{if(s.includes(t))y(s.filter(e=>e!==t));else{const e=s.concat(t);y(e)}},rt=(t=M,e=v,C=N,u=O,b=h)=>{var S;l.forEach(w=>{n==null||n.removeObjectByName(w.id)}),p.forEach(w=>{n==null||n.removeObjectByName(w.id)}),o==null||o.updatePolygonList(t,e),o==null||o.updatePointList(C),o==null||o.updateLineList(u),n==null||n.generateBoxes(t),n==null||n.generateSpheres(C),(S=d==null?void 0:d.store)==null||S.updateCurrentSegment(b),T(t)},T=t=>{const e=n==null?void 0:n.highlightOriginPointCloud(t);return new Promise(C=>{e==null||e.then(u=>{[o].forEach(b=>{var S;u&&((S=b==null?void 0:b.pointCloudInstance)==null||S.updateColor(u),C({color:u}))})}).catch(u=>{console.error(u)})})};return{selectedID:q,pointCloudBoxList:l,pointCloudSphereList:p,displayPointCloudList:M,displaySphereList:N,displayLineList:O,selectedIDs:a,setPointCloudResult:V,setSelectedIDs:i,addPointCloudBox:P,addPointCloudSphere:I,setPointCloudSphereList:x,valid:D,selectedPointCloudBox:c,setPointCloudValid:f,addSelectedID:st,selectedAllBoxes:it,topViewInstance:o,setTopViewInstance:U,sideViewInstance:R,setSideViewInstance:J,backViewInstance:E,setBackViewInstance:K,mainViewInstance:n,setMainViewInstance:Q,polygonList:v,setPolygonList:F,lineList:L,setLineList:k,zoom:B,setZoom:Z,history:Y,toggleAttributesVisible:at,hideAttributes:s,setHideAttributes:y,reRender:rt,attrPanelLayout:j,setAttrPanelLayout:$,syncAllViewPointCloudColor:T,defaultAttribute:H,setDefaultAttribute:W,pointCloudPattern:m,setPointCloudPattern:X,selectSpecAttr:lt,globalPattern:A,setGlobalPattern:t=>{A!==t&&(ot(actionCreators.ChangeSave),tt(t),t===lbUtils.EPointCloudPattern.Detection&&_(void 0))},ptSegmentInstance:d,setPtSegmentInstance:_,segmentation:h,setSegmentation:et}},[D,a,l,p,v,L,o,R,E,n,B,s,j,H,m,A,d,h]),nt=()=>{const c=l.filter(i=>s.includes(i.attribute)),{setSelectedIDs:P,reRender:I}=G,f=c.map(i=>i.id);f.length>0&&P(a.filter(i=>!f.includes(i))),I()};return React.useEffect(()=>{var c,P;nt(),(c=o==null?void 0:o.toolInstance)==null||c.setHiddenAttributes(s),(P=d==null?void 0:d.store)==null||P.setHiddenAttributes(s)},[s]),React__default.default.createElement(PointCloudContext.Provider,{value:G},r)};exports.PointCloudContext=PointCloudContext,exports.PointCloudProvider=PointCloudProvider;
@@ -1 +1 @@
1
- "use strict";var PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useBoxes=require("./hooks/useBoxes.js"),useSingleBox=require("./hooks/useSingleBox.js"),useSphere=require("./hooks/useSphere.js"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),antd=require("antd"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),annotation=require("../../hooks/annotation.js"),useStatus=require("./hooks/useStatus.js"),index=require("../../utils/index.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),ctx=require("../../store/ctx.js"),useHistory=require("./hooks/useHistory.js"),useAttribute=require("./hooks/useAttribute.js"),useConfig=require("./hooks/useConfig.js"),usePolygon=require("./hooks/usePolygon.js"),reactI18next=require("react-i18next"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(u,r,i)=>r in u?__defProp(u,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[r]=i,__spreadValues=(u,r)=>{for(var i in r||(r={}))__hasOwnProp.call(r,i)&&__defNormalProp(u,i,r[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(r))__propIsEnum.call(r,i)&&__defNormalProp(u,i,r[i]);return u},__spreadProps=(u,r)=>__defProps(u,__getOwnPropDescs(r));const{EPolygonPattern}=lbAnnotation.cTool,PointCloudListener=({currentData:u,config:r,checkMode:i,configString:_,imgIndex:w})=>{const t=React.useContext(PointCloudContext.PointCloudContext),{changeSelectedBoxValid:I,selectNextBox:B,selectPrevBox:L,updateSelectedBox:C,deleteSelectedPointCloudBoxAndPolygon:V}=useSingleBox.useSingleBox(),{selectedSphere:f,updatePointCloudSphere:E}=useSphere.useSphere(),{clearAllResult:b,updatePointCloudPattern:q}=useStatus.useStatus(),A=index.jsonParser(u.result),{copySelectedBoxes:O,pasteSelectedBoxes:j,copiedBoxes:T}=useBoxes.useBoxes({config:r}),{toolInstanceRef:a}=annotation.useCustomToolInstance({basicInfo:A}),{updateRotate:P}=useRotate.useRotate({currentData:u}),{updatePointCloudData:p,topViewSelectedChanged:x}=usePointCloudViews.usePointCloudViews(),{redo:h,undo:g,pushHistoryWithList:R,pushHistoryUnderUpdatePolygon:D}=useHistory.useHistory(),{syncThreeViewsAttribute:m}=useAttribute.useAttribute(),{syncAllViewsConfig:N,reRenderTopViewRange:H}=useConfig.useConfig(),{selectedPolygon:S}=usePolygon.usePolygon(),{t:y}=reactI18next.useTranslation(),v=e=>{var o;const{topViewInstance:s}=t;!s||(o=s.pointCloud2dOperation)==null||o.updateSelectedPolygonsPoints(e)},K=(e,o)=>{var s;const{topViewInstance:n,mainViewInstance:l}=t;if(!n)return;const{pointCloud2dOperation:c}=n;switch(e){case"q":{P(2);break}case"e":P(-2);break;case"g":P(180);break;case"u":{const d=c.pattern===EPolygonPattern.Normal?lbAnnotation.EToolName.Rect:lbAnnotation.EToolName.Polygon;q(d);const U={[lbAnnotation.EToolName.Polygon]:y("PolygonPattern"),[lbAnnotation.EToolName.Rect]:y("RectPattern")};antd.message.success(y("ChangePatternMsg",{pattern:U[d]})),c.clearActiveStatus(),c.clearDrawingStatus()}break;case"+":l==null||l.updatePointSize({zoomIn:!0});break;case"-":l==null||l.updatePointSize({zoomIn:!1});break;case"v":t.setPointCloudValid(!t.valid);break;case"tab":if(o.shiftKey){L();break}B(),o.preventDefault();break;case"f":I();break;case"arrowup":v({y:-1});break;case"arrowdown":v({y:1});break;case"arrowleft":v({x:-1});break;case"arrowright":v({x:1});break;case"delete":V();break;default:{if(((s=r.attributeList)==null?void 0:s.length)>0){const d=lbAnnotation.AttributeUtils.getAttributeByKeycode(o.keyCode,r.attributeList);d!==void 0&&a.current.setDefaultAttribute(d)}return}}},z=(e,o)=>{switch(e){case"c":O();break;case"v":j();break;case"a":o.preventDefault(),t.selectedAllBoxes();break;case"z":{o.shiftKey?h():g();break}}},k=e=>{if(!lbAnnotation.CommonToolUtils.hotkeyFilter(e)||i===!0)return;const o=e.key.toLocaleLowerCase();if(e.ctrlKey){z(o,e);return}K(o,e)};return React.useEffect(()=>{const{topViewInstance:e}=t;if(!!e)return window.addEventListener("keydown",k),()=>{window.removeEventListener("keydown",k)}},[t,T,r,t.pointCloudBoxList,t.polygonList]),React.useEffect(()=>{N(r)},[_]),React.useEffect(()=>{(r==null?void 0:r.radius)&&H(r==null?void 0:r.radius)},[r==null?void 0:r.radius]),React.useEffect(()=>{p==null||p()},[w,t.mainViewInstance]),React.useEffect(()=>{t.setHideAttributes([])},[w]),React.useEffect(()=>{a.current.exportData=()=>[t.pointCloudBoxList,{valid:t.valid}],a.current.exportCustomData=()=>{var e,o,s;return{resultPolygon:(e=t.polygonList)!=null?e:[],resultLine:(o=t.lineList)!=null?o:[],resultPoint:(s=t.pointCloudSphereList)!=null?s:[]}},a.current.setDefaultAttribute=e=>{var o;m(e);const s=t.selectedPointCloudBox;if(s){s.attribute=e;const n=C(s);t.mainViewInstance&&x({newSelectedBox:s,newPointCloudList:n})}if(S&&D(__spreadProps(__spreadValues({},S),{attribute:e})),f){const n=E(__spreadProps(__spreadValues({},f),{attribute:e}));t.mainViewInstance&&((o=t.mainViewInstance)==null||o.generateSpheres(n),x({newSelectedSphere:f,newSphereList:n}))}},a.current.setSubAttribute=(e,o)=>{var s;const n=t.selectedPointCloudBox;if(n){const l=(s=n==null?void 0:n.subAttribute)!=null?s:{};n.subAttribute=__spreadProps(__spreadValues({},l),{[e]:o}),C(n)}},a.current.clearResult=()=>{b==null||b()},a.current.redo=()=>{h()},a.current.undo=()=>{g()},a.current.setValid=e=>{a.current.valid=e,setTimeout(()=>{t.setPointCloudValid(e),e===!1&&b()})},a.current.setForbidOperation=e=>{var o,s;(s=(o=t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null||s.setForbidOperation(e),e===!0&&t.setSelectedIDs(void 0)},a.current.setShowDefaultCursor=e=>{var o,s;(s=(o=t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null||s.setShowDefaultCursor(e)},a.current.asyncData=e=>{setTimeout(()=>{p==null||p(e)})}},[t.pointCloudBoxList,t.pointCloudSphereList,t.selectedID,t.valid,t.polygonList,t.lineList,t.mainViewInstance]),React.useEffect(()=>{a.current.history={pushHistory:e=>{R({pointCloudBoxList:e})},initRecord:()=>{}}},[]),React.useEffect(()=>{var e;const o=(e=t.topViewInstance)==null?void 0:e.toolInstance;if(!o||i)return;const s=c=>{m(c)},n=c=>{antd.message.error(c)},l=c=>{antd.message.info(c)};return o.on("syncAttribute",s),o.on("messageError",n),o.on("messageInfo",l),()=>{o.unbind("syncAttribute",s),o.unbind("messageError",n),o.unbind("messageInfo",l)}},[t.topViewInstance]),null};var PointCloudListener$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudListener);module.exports=PointCloudListener$1;
1
+ "use strict";var PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useBoxes=require("./hooks/useBoxes.js"),useSingleBox=require("./hooks/useSingleBox.js"),useSphere=require("./hooks/useSphere.js"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),antd=require("antd"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),useStatus=require("./hooks/useStatus.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),ctx=require("../../store/ctx.js"),useHistory=require("./hooks/useHistory.js"),useAttribute=require("./hooks/useAttribute.js"),useConfig=require("./hooks/useConfig.js"),usePolygon=require("./hooks/usePolygon.js"),reactI18next=require("react-i18next"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(u,o,i)=>o in u?__defProp(u,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[o]=i,__spreadValues=(u,o)=>{for(var i in o||(o={}))__hasOwnProp.call(o,i)&&__defNormalProp(u,i,o[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(o))__propIsEnum.call(o,i)&&__defNormalProp(u,i,o[i]);return u},__spreadProps=(u,o)=>__defProps(u,__getOwnPropDescs(o));const{EPolygonPattern}=lbAnnotation.cTool,PointCloudListener=({currentData:u,config:o,checkMode:i,configString:B,imgIndex:C,toolInstanceRef:a})=>{const r=React.useContext(PointCloudContext.PointCloudContext),{changeSelectedBoxValid:V,selectNextBox:E,selectPrevBox:A,updateSelectedBox:g,deleteSelectedPointCloudBoxAndPolygon:O}=useSingleBox.useSingleBox(),{selectedSphere:b,updatePointCloudSphere:L}=useSphere.useSphere(),{clearAllResult:P,updatePointCloudPattern:q}=useStatus.useStatus(),{copySelectedBoxes:j,pasteSelectedBoxes:T,copiedBoxes:I}=useBoxes.useBoxes({config:o}),{updateRotate:y}=useRotate.useRotate({currentData:u}),{updatePointCloudData:p,topViewSelectedChanged:m}=usePointCloudViews.usePointCloudViews(),{redo:S,undo:x,pushHistoryWithList:D,pushHistoryUnderUpdatePolygon:N}=useHistory.useHistory(),{syncThreeViewsAttribute:h}=useAttribute.useAttribute(),{syncAllViewsConfig:H,reRenderTopViewRange:K}=useConfig.useConfig(),{selectedPolygon:k}=usePolygon.usePolygon(),{t:w}=reactI18next.useTranslation(),v=e=>{var t;const{topViewInstance:s}=r;!s||(t=s.pointCloud2dOperation)==null||t.updateSelectedPolygonsPoints(e)},z=(e,t)=>{var s,n;const{topViewInstance:c,mainViewInstance:l}=r;if(!c)return;const{pointCloud2dOperation:f}=c;switch(e){case"q":{y(2);break}case"e":y(-2);break;case"g":y(180);break;case"u":{const d=f.pattern===EPolygonPattern.Normal?lbAnnotation.EToolName.Rect:lbAnnotation.EToolName.Polygon;q(d);const F={[lbAnnotation.EToolName.Polygon]:w("PolygonPattern"),[lbAnnotation.EToolName.Rect]:w("RectPattern")};antd.message.success(w("ChangePatternMsg",{pattern:F[d]})),f.clearActiveStatus(),f.clearDrawingStatus()}break;case"+":l==null||l.updatePointSize({zoomIn:!0});break;case"-":l==null||l.updatePointSize({zoomIn:!1});break;case"v":r.setPointCloudValid(!r.valid);break;case"tab":if(t.shiftKey){A();break}E(),t.preventDefault();break;case"f":V();break;case"arrowup":v({y:-1});break;case"arrowdown":v({y:1});break;case"arrowleft":v({x:-1});break;case"arrowright":v({x:1});break;case"delete":O();break;default:{if(((s=o.attributeList)==null?void 0:s.length)>0){const d=lbAnnotation.AttributeUtils.getAttributeByKeycode(t.keyCode,o.attributeList);d!==void 0&&((n=a.current)==null||n.setDefaultAttribute(d))}return}}},U=(e,t)=>{switch(e){case"c":j();break;case"v":T();break;case"a":t.preventDefault(),r.selectedAllBoxes();break;case"z":{t.shiftKey?S():x();break}}},_=e=>{if(!lbAnnotation.CommonToolUtils.hotkeyFilter(e)||i===!0)return;const t=e.key.toLocaleLowerCase();if(e.ctrlKey){U(t,e);return}z(t,e)};return React.useEffect(()=>{const{topViewInstance:e}=r;if(!!e)return window.addEventListener("keydown",_),()=>{window.removeEventListener("keydown",_)}},[r,I,o,r.pointCloudBoxList,r.polygonList]),React.useEffect(()=>{H(o)},[B]),React.useEffect(()=>{(o==null?void 0:o.radius)&&K(o==null?void 0:o.radius)},[o==null?void 0:o.radius]),React.useEffect(()=>{p==null||p()},[C,r.mainViewInstance]),React.useEffect(()=>{r.setHideAttributes([])},[C]),React.useEffect(()=>{a.current.setDefaultAttribute=e=>{var t;h(e);const s=r.selectedPointCloudBox;if(s){s.attribute=e;const n=g(s);r.mainViewInstance&&m({newSelectedBox:s,newPointCloudList:n})}if(k&&N(__spreadProps(__spreadValues({},k),{attribute:e})),b){const n=L(__spreadProps(__spreadValues({},b),{attribute:e}));r.mainViewInstance&&((t=r.mainViewInstance)==null||t.generateSpheres(n),m({newSelectedSphere:b,newSphereList:n}))}},a.current.setSubAttribute=(e,t)=>{var s;const n=r.selectedPointCloudBox;if(n){const c=(s=n==null?void 0:n.subAttribute)!=null?s:{};n.subAttribute=__spreadProps(__spreadValues({},c),{[e]:t}),g(n)}},a.current.clearResult=()=>{P==null||P()},a.current.redo=()=>{S()},a.current.undo=()=>{x()},a.current.setValid=e=>{a.current.valid=e,setTimeout(()=>{r.setPointCloudValid(e),e===!1&&P()})},a.current.setForbidOperation=e=>{var t,s;(s=(t=r.topViewInstance)==null?void 0:t.pointCloud2dOperation)==null||s.setForbidOperation(e),e===!0&&r.setSelectedIDs(void 0)},a.current.setShowDefaultCursor=e=>{var t,s;(s=(t=r.topViewInstance)==null?void 0:t.pointCloud2dOperation)==null||s.setShowDefaultCursor(e)},a.current.asyncData=e=>{setTimeout(()=>{p==null||p(e)})}},[r.pointCloudBoxList,r.pointCloudSphereList,r.selectedID,r.valid,r.polygonList,r.lineList,r.mainViewInstance,r.ptSegmentInstance]),React.useEffect(()=>{a.current.updateSegmentTool=e=>{var t;(t=r.ptSegmentInstance)==null||t.emit(e)},a.current.segmentInstance=r.ptSegmentInstance},[r.ptSegmentInstance]),React.useEffect(()=>{a.current.history={pushHistory:e=>{D({pointCloudBoxList:e})},initRecord:()=>{}}},[]),React.useEffect(()=>{var e;const t=(e=r.topViewInstance)==null?void 0:e.toolInstance;if(!t||i)return;const s=l=>{h(l)},n=l=>{antd.message.error(l)},c=l=>{antd.message.info(l)};return t.on("syncAttribute",s),t.on("messageError",n),t.on("messageInfo",c),()=>{t.unbind("syncAttribute",s),t.unbind("messageError",n),t.unbind("messageInfo",c)}},[r.topViewInstance]),null};var PointCloudListener$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudListener);module.exports=PointCloudListener$1;
@@ -0,0 +1 @@
1
+ "use strict";var useSize=require("../../hooks/useSize.js"),map=require("../../store/annotation/map.js"),ctx=require("../../store/ctx.js"),dom=require("../../utils/dom.js"),lbAnnotation=require("@labelbee/lb-annotation"),React=require("react"),reactRedux=require("react-redux"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PointCloudSegment=({currentData:e,config:a,checkMode:f})=>{var o,u;const n=React.useRef(null),{setPtSegmentInstance:c,setDefaultAttribute:d,ptSegmentInstance:r}=React.useContext(PointCloudContext.PointCloudContext),t=useSize(n),i=(u=(o=a==null?void 0:a.attributeList)==null?void 0:o[0])==null?void 0:u.value;return React.useEffect(()=>{var l;if(!(t==null?void 0:t.width)||!n.current||r)return;const v={left:-t.width/2,right:t.width/2,top:t.height/2,bottom:-t.height/2,near:100,far:-100},s=new lbAnnotation.PointCloud({container:n.current,isOrthographicCamera:!0,isSegment:!0,orthographicParams:v,config:a});(l=s.store)==null||l.setAttribute(i),d(i),c(s)},[t]),React.useEffect(()=>{r&&(r.initRenderer(),r.initOrthographicCamera(lbUtils.PointCloudUtils.getDefaultOrthographic(t)),r.render())},[t]),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),ref:n})};var PointCloudSegment$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudSegment);module.exports=PointCloudSegment$1;
@@ -0,0 +1 @@
1
+ "use strict";var React=require("react"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),PointCloudContext=require("./PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),useAttribute=require("./hooks/useAttribute.js");const PointCloudSegmentListener=({checkMode:c,currentData:r,imgIndex:m,highlightAttribute:u,config:v,toolInstanceRef:a})=>{const{updateSegmentAttribute:b}=useAttribute.useAttribute(),n=React.useContext(PointCloudContext.PointCloudContext),{ptSegmentInstance:e,setSegmentation:s}=n;React.useEffect(()=>{var t;if(e&&r.url)return e.loadPCDFile((t=r==null?void 0:r.url)!=null?t:"").then(()=>{var o,l;e.emit("clearAllSegmentData");const i=lbUtils.PointCloudUtils.getSegmentFromResultList((o=r==null?void 0:r.result)!=null?o:"");(l=e==null?void 0:e.store)==null||l.updateCurrentSegment(i)}),e.on("syncSegmentData",s),()=>{e.unbind("syncSegmentData",s)}},[m,e]),React.useEffect(()=>{var t,o;let l=(t=v.attributeList.find(i=>(i==null?void 0:i.key)===u))==null?void 0:t.value;(o=e==null?void 0:e.store)==null||o.highlightPointsByAttribute(l!=null?l:"")},[u,e]);const S=(t,o)=>{var l,i;switch(t){case"h":e==null||e.emit("LassoSelector");break;case"j":e==null||e.emit("CircleSelector");break;case"u":e==null||e.emit("setSegmentMode",lbUtils.EPointCloudSegmentMode.Add);break;case"i":e==null||e.emit("setSegmentMode",lbUtils.EPointCloudSegmentMode.Remove);break;case"enter":e==null||e.emit("updateCheck2Edit");break;case"delete":e==null||e.emit("deleteSelectedSegmentData",(i=(l=e.store)==null?void 0:l.cacheSegData)==null?void 0:i.id);break}},d=t=>{if(!lbAnnotation.CommonToolUtils.hotkeyFilter(t)||c===!0)return;const o=t.key.toLocaleLowerCase();S(o)};return React.useEffect(()=>(window.addEventListener("keydown",d),a.current.setDefaultAttribute=t=>{b(t)},()=>{window.removeEventListener("keydown",d)}),[e]),React.useEffect(()=>{a.current.clearResult=()=>{!n.ptSegmentInstance||n.ptSegmentInstance.emit("clearAllSegmentData")}},[n.pointCloudBoxList,n.valid,n.polygonList,n.lineList,n.pointCloudSphereList,n.ptSegmentInstance]),null};var PointCloudSegmentListener$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudSegmentListener);module.exports=PointCloudSegmentListener$1;
@@ -0,0 +1 @@
1
+ "use strict";var React=require("react"),dom=require("../../utils/dom.js"),finish=require("../../assets/annotation/pointCloudTool/finish.svg.js"),cancel=require("../../assets/annotation/pointCloudTool/cancel.svg.js"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),reactI18next=require("react-i18next");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const SegmentInfo=({infoList:e})=>{const{t:l}=reactI18next.useTranslation();return e?React__default.default.createElement("div",{className:dom.getClassName("point-cloud-status","info")},e.map(a=>React__default.default.createElement("div",{key:a.key},React__default.default.createElement("span",null,l(a.key),"\uFF1A "),React__default.default.createElement("span",null,a.value)))):null},PointCloudSegmentStatus=()=>{var e,l,a,d,r;const{t:s}=reactI18next.useTranslation(),{ptSegmentInstance:t,setDefaultAttribute:m}=React.useContext(PointCloudContext.PointCloudContext),[u,f]=React.useState({segmentStatus:lbUtils.EPointCloudSegmentStatus.Ready});React.useEffect(()=>{if(t){const n=c=>{f(c),c.cacheSegData&&m(c.cacheSegData.attribute)};return t==null||t.on("syncPointCloudStatus",n),()=>{t==null||t.unbind("syncPointCloudStatus",n)}}},[t]);const o=u.segmentStatus;if(o===lbUtils.EPointCloudSegmentStatus.Ready)return null;const g=o===lbUtils.EPointCloudSegmentStatus.Check,C=o===lbUtils.EPointCloudSegmentStatus.Edit;let i=null;const S=((a=(l=(e=u.cacheSegData)==null?void 0:e.points)==null?void 0:l.length)!=null?a:0)/3;let v=[{key:"SelectedPoints",value:S},{key:"Attribute",value:(r=(d=u.cacheSegData)==null?void 0:d.attribute)!=null?r:""}];return g&&(i=React__default.default.createElement("div",{className:dom.getClassName("point-cloud-status","operation")},React__default.default.createElement("span",{className:dom.getClassName("point-cloud-status","button"),onClick:()=>{t==null||t.emit("updateCheck2Edit")}},s("EnterEditMode"),"(Enter)"))),C&&(i=React__default.default.createElement("div",{className:dom.getClassName("point-cloud-status","operation")},React__default.default.createElement("span",{className:dom.getClassName("point-cloud-status","button"),onClick:()=>{var n;t==null||t.emit("addStash2Store"),((n=t==null?void 0:t.store)==null?void 0:n.segmentFocusMode)===lbUtils.EPointCloudSegmentFocusMode.Focus&&(t==null||t.emit("setSegmentFocusMode",lbUtils.EPointCloudSegmentFocusMode.Unfocus))}},React__default.default.createElement("img",{className:dom.getClassName("point-cloud-status","icon"),src:finish}),s("Finish")),React__default.default.createElement("span",{className:dom.getClassName("point-cloud-status","button"),onClick:()=>{t==null||t.emit("clearStash")}},React__default.default.createElement("img",{className:dom.getClassName("point-cloud-status","icon"),src:cancel}),s("Cancel")))),React__default.default.createElement(React__default.default.Fragment,null,i,React__default.default.createElement(SegmentInfo,{infoList:v}))};module.exports=PointCloudSegmentStatus;
@@ -0,0 +1 @@
1
+ "use strict";var dom=require("../../utils/dom.js"),antd=require("antd"),coverMode=require("../../assets/annotation/pointCloudTool/coverMode.svg.js"),unCoverMode=require("../../assets/annotation/pointCloudTool/unCoverMode.svg.js"),React=require("react"),svg=require("../../assets/annotation/pointCloudTool/svg.js"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),reactI18next=require("react-i18next");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const PointCloudSegmentToolbar=()=>{var t,c,r,C,m,v,g,S;const{t:n}=reactI18next.useTranslation(),{ptSegmentInstance:e}=React.useContext(PointCloudContext.PointCloudContext),[h,p]=React.useState((c=(t=e==null?void 0:e.store)==null?void 0:t.segmentMode)!=null?c:lbUtils.EPointCloudSegmentMode.Add),[s,b]=React.useState((C=(r=e==null?void 0:e.store)==null?void 0:r.segmentCoverMode)!=null?C:lbUtils.EPointCloudSegmentCoverMode.Cover),[u,_]=React.useState((v=(m=e==null?void 0:e.store)==null?void 0:m.segmentFocusMode)!=null?v:lbUtils.EPointCloudSegmentFocusMode.Unfocus),[d,x]=React.useState((S=(g=e==null?void 0:e.store)==null?void 0:g.hideSegment)!=null?S:!1),[M,H]=React.useState({segmentStatus:lbUtils.EPointCloudSegmentStatus.Ready});React.useEffect(()=>{if(!e)return;const l=o=>{p(o)},P=o=>{b(o)},F=o=>{_(o)},f=o=>{x(o)},E=o=>{H(o)};return e.on("setSegmentMode",l),e.on("setSegmentCoverMode",P),e.on("setSegmentFocusMode",F),e.on("switchHideSegment",f),e.on("syncPointCloudStatus",E),()=>{e.unbind("setSegmentMode",l),e.unbind("setSegmentCoverMode",P),e.unbind("setSegmentFocusMode",F),e.unbind("switchHideSegment",f),e.unbind("syncPointCloudStatus",E)}},[e]);const q=h===lbUtils.EPointCloudSegmentMode.Add,i=d===!0||!(M==null?void 0:M.cacheSegData),a=u===lbUtils.EPointCloudSegmentFocusMode.Focus;return React__default.default.createElement("div",{className:dom.getClassName("point-cloud-toolbar")},React__default.default.createElement(antd.Switch,{checkedChildren:"+",unCheckedChildren:"-",checked:q,onChange:l=>{e==null||e.emit("setSegmentMode",l?lbUtils.EPointCloudSegmentMode.Add:lbUtils.EPointCloudSegmentMode.Remove)}}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-toolbox"),onClick:()=>{e==null||e.emit("setSegmentCoverMode",s===lbUtils.EPointCloudSegmentCoverMode.Cover?lbUtils.EPointCloudSegmentCoverMode.Uncover:lbUtils.EPointCloudSegmentCoverMode.Cover),antd.message.info({content:n(s===lbUtils.EPointCloudSegmentCoverMode.Cover?"PointCloudUncoverMode":"PointCloudCoverMode"),icon:()=>null})}},React__default.default.createElement("img",{src:s===lbUtils.EPointCloudSegmentCoverMode.Cover?coverMode:unCoverMode})),React__default.default.createElement(antd.Tooltip,{title:i?n(d===!0?"PointCloudHideFocusInvalid_hide":"PointCloudHideFocusInvalid_none"):""},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-toolbox"),onClick:()=>{i||(e==null||e.emit("setSegmentFocusMode",u===lbUtils.EPointCloudSegmentFocusMode.Focus?lbUtils.EPointCloudSegmentFocusMode.Unfocus:lbUtils.EPointCloudSegmentFocusMode.Focus),antd.message.success(n(u===lbUtils.EPointCloudSegmentFocusMode.Focus?"PointCloudUnfocusMode":"PointCloudFocusMode")))}},React__default.default.createElement(svg.FocusModeSvg,{color:i?"#CCC":u===lbUtils.EPointCloudSegmentFocusMode.Focus?"#1664FF":"#FFF"}))),React__default.default.createElement(antd.Tooltip,{title:a?n("PointCloudHideSegmentInvalid"):""},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-toolbox"),onClick:()=>{a||(e==null||e.emit("switchHideSegment",!d),antd.message.success(n(d===!0?"PointCloudShowSegment":"PointCloudHideSegment")))}},React__default.default.createElement(svg.HidePointCloudSegmentSvg,{color:a?"#CCC":d?"#1664FF":"#FFF"}))))};module.exports=PointCloudSegmentToolbar;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js");const useAttribute=()=>{const{topViewInstance:t,sideViewInstance:n,backViewInstance:o,mainViewInstance:u,defaultAttribute:i,setDefaultAttribute:r}=React.useContext(PointCloudContext.PointCloudContext);return React.useEffect(()=>{if(!(t==null?void 0:t.toolInstance))return;const e=()=>{r(t==null?void 0:t.toolInstance.defaultAttribute)};return t==null||t.toolInstance.on("changeAttributeSidebar",e),()=>{t==null||t.toolInstance.unbind("changeAttributeSidebar",e)}},[t==null?void 0:t.toolInstance]),{syncThreeViewsAttribute:e=>{[t==null?void 0:t.toolInstance,n==null?void 0:n.toolInstance,o==null?void 0:o.toolInstance].forEach(l=>{l==null||l.setDefaultAttribute(e)})},updateDefaultAttribute:e=>{t==null||t.toolInstance.setDefaultAttribute(e)},reRenderPointCloud3DBox:e=>{u==null||u.generateBox(e)},defaultAttribute:i}};exports.useAttribute=useAttribute;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js");const useAttribute=()=>{const{topViewInstance:t,sideViewInstance:u,backViewInstance:l,mainViewInstance:i,ptSegmentInstance:o,defaultAttribute:s,setDefaultAttribute:r}=React.useContext(PointCloudContext.PointCloudContext);React.useEffect(()=>{if(!(t==null?void 0:t.toolInstance))return;const e=()=>{r(t==null?void 0:t.toolInstance.defaultAttribute)};return t==null||t.toolInstance.on("changeAttributeSidebar",e),()=>{t==null||t.toolInstance.unbind("changeAttributeSidebar",e)}},[t==null?void 0:t.toolInstance]);const d=e=>{[t==null?void 0:t.toolInstance,u==null?void 0:u.toolInstance,l==null?void 0:l.toolInstance].forEach(n=>{n==null||n.setDefaultAttribute(e)})},c=e=>{t==null||t.toolInstance.setDefaultAttribute(e)},b=e=>{i==null||i.generateBox(e)},v=React.useCallback(e=>{var n,a;!o||((n=o.store)==null||n.setAttribute(e),(a=o.pointCloudRender)==null||a.updatePointsColor(),r(e))},[o]);return{syncThreeViewsAttribute:d,updateDefaultAttribute:c,reRenderPointCloud3DBox:b,defaultAttribute:s,updateSegmentAttribute:v}};exports.useAttribute=useAttribute;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,l)=>s in e?__defProp(e,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[s]=l,__spreadValues=(e,s)=>{for(var l in s||(s={}))__hasOwnProp.call(s,l)&&__defNormalProp(e,l,s[l]);if(__getOwnPropSymbols)for(var l of __getOwnPropSymbols(s))__propIsEnum.call(s,l)&&__defNormalProp(e,l,s[l]);return e};const useHistory=()=>{const{history:e,setPointCloudResult:s,setSelectedIDs:l,pointCloudBoxList:p,pointCloudSphereList:L,setPointCloudSphereList:x,mainViewInstance:u,topViewInstance:y,polygonList:f,setPolygonList:P,lineList:C,setLineList:g,syncAllViewPointCloudColor:_}=React.useContext(PointCloudContext.PointCloudContext),S=({newBoxParams:t,newPolygon:o,newLine:i,newSphereParams:r})=>{const d={pointCloudBoxList:p,polygonList:f,lineList:C,pointCloudSphereList:L};t&&(d.pointCloudBoxList=p.concat(t)),o&&(d.polygonList=f.concat(o)),i&&(d.lineList=C.concat(i)),r&&(d.pointCloudSphereList=L.concat(r)),e.pushHistory(d)},B=t=>{const o={pointCloudBoxList:p,polygonList:f,lineList:C,pointCloudSphereList:L};t.pointCloudBoxList&&(o.pointCloudBoxList=t.pointCloudBoxList),t.polygonList&&(o.polygonList=t.polygonList),t.lineList&&(o.lineList=t.lineList),t.pointCloudSphereList&&(o.pointCloudSphereList=t.pointCloudSphereList),e.pushHistory(o)},H=t=>{if(C.find(i=>i.id===t.id)){const i=C.map(r=>r.id===t.id?t:__spreadValues({},r));e.pushHistory({lineList:i}),g(i)}},O=t=>{if(f.find(i=>i.id===t.id)){const i=f.map(r=>r.id===t.id?t:__spreadValues({},r));e.pushHistory({pointCloudBoxList:p,polygonList:i}),P(i)}},w=({pointCloudBoxList:t,polygonList:o,pointCloudSphereList:i})=>{e.initRecord({pointCloudBoxList:t,polygonList:o,pointCloudSphereList:i},!0)},v=t=>{if(!t)return;const{pointCloudBoxList:o=[],polygonList:i=[],lineList:r=[],pointCloudSphereList:d=[]}=t;if(o){p.length!==o.length&&l();const h=p.filter(n=>o.every(c=>c.id!==n.id)),a=o.filter(n=>p.every(c=>c.id!==n.id));h.forEach(n=>{u==null||u.removeObjectByName(n.id)}),a.forEach(n=>{u==null||u.generateBox(n)}),s(o),_(o)}if(d){L.length!==d.length&&l();let h=L.filter(n=>d.every(c=>c.id!==n.id)),a=d.filter(n=>L.every(c=>c.id!==n.id));h.forEach(n=>{u==null||u.removeObjectByName(n.id)}),a.forEach(n=>{u==null||u.generateSphere(n)}),x(d)}i&&P(i),r&&g(r),y==null||y.updatePolygonList(o!=null?o:[],i!=null?i:[]),y==null||y.updateLineList(r!=null?r:[]),y==null||y.updatePointList(d)};return{addHistory:S,pushHistoryWithList:B,initHistory:w,pushHistoryUnderUpdatePolygon:O,pushHistoryUnderUpdateLine:H,redo:()=>{v(e.redo())},undo:()=>{v(e.undo())}}};exports.useHistory=useHistory;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,s,l)=>s in e?__defProp(e,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[s]=l,__spreadValues=(e,s)=>{for(var l in s||(s={}))__hasOwnProp.call(s,l)&&__defNormalProp(e,l,s[l]);if(__getOwnPropSymbols)for(var l of __getOwnPropSymbols(s))__propIsEnum.call(s,l)&&__defNormalProp(e,l,s[l]);return e};const useHistory=()=>{const{history:e,setPointCloudResult:s,setSelectedIDs:l,pointCloudBoxList:p,pointCloudSphereList:L,setPointCloudSphereList:x,mainViewInstance:u,topViewInstance:f,polygonList:y,setPolygonList:g,lineList:C,setLineList:P,syncAllViewPointCloudColor:_,segmentation:S}=React.useContext(PointCloudContext.PointCloudContext),B=({newBoxParams:t,newPolygon:o,newLine:i,newSphereParams:r})=>{const d={pointCloudBoxList:p,polygonList:y,lineList:C,pointCloudSphereList:L};t&&(d.pointCloudBoxList=p.concat(t)),o&&(d.polygonList=y.concat(o)),i&&(d.lineList=C.concat(i)),r&&(d.pointCloudSphereList=L.concat(r)),e.pushHistory(d)},H=t=>{const o={pointCloudBoxList:p,polygonList:y,lineList:C,pointCloudSphereList:L,segmentation:S};t.pointCloudBoxList&&(o.pointCloudBoxList=t.pointCloudBoxList),t.polygonList&&(o.polygonList=t.polygonList),t.lineList&&(o.lineList=t.lineList),t.pointCloudSphereList&&(o.pointCloudSphereList=t.pointCloudSphereList),t.segmentation&&(o.segmentation=t.segmentation),e.pushHistory(o)},O=t=>{if(C.find(i=>i.id===t.id)){const i=C.map(r=>r.id===t.id?t:__spreadValues({},r));e.pushHistory({lineList:i}),P(i)}},w=t=>{if(y.find(i=>i.id===t.id)){const i=y.map(r=>r.id===t.id?t:__spreadValues({},r));e.pushHistory({pointCloudBoxList:p,polygonList:i}),g(i)}},j=({pointCloudBoxList:t,polygonList:o,pointCloudSphereList:i})=>{e.initRecord({pointCloudBoxList:t,polygonList:o,pointCloudSphereList:i},!0)},v=t=>{if(!t)return;const{pointCloudBoxList:o=[],polygonList:i=[],lineList:r=[],pointCloudSphereList:d=[]}=t;if(o){p.length!==o.length&&l();const h=p.filter(n=>o.every(c=>c.id!==n.id)),a=o.filter(n=>p.every(c=>c.id!==n.id));h.forEach(n=>{u==null||u.removeObjectByName(n.id)}),a.forEach(n=>{u==null||u.generateBox(n)}),s(o),_(o)}if(d){L.length!==d.length&&l();let h=L.filter(n=>d.every(c=>c.id!==n.id)),a=d.filter(n=>L.every(c=>c.id!==n.id));h.forEach(n=>{u==null||u.removeObjectByName(n.id)}),a.forEach(n=>{u==null||u.generateSphere(n)}),x(d)}i&&g(i),r&&P(r),f==null||f.updatePolygonList(o!=null?o:[],i!=null?i:[]),f==null||f.updateLineList(r!=null?r:[]),f==null||f.updatePointList(d)};return{addHistory:B,pushHistoryWithList:H,initHistory:j,pushHistoryUnderUpdatePolygon:w,pushHistoryUnderUpdateLine:O,redo:()=>{v(e.redo())},undo:()=>{v(e.undo())}}};exports.useHistory=useHistory;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useHistory=require("./useHistory.js");const{EToolName,EPolygonPattern}=lbAnnotation.cTool,useStatus=()=>{const{topViewInstance:i,sideViewInstance:r,backViewInstance:u,mainViewInstance:t,pointCloudBoxList:c,pointCloudSphereList:d,setPointCloudResult:P,setPointCloudSphereList:C,setPolygonList:v,pointCloudPattern:a,setPointCloudPattern:n,syncAllViewPointCloudColor:h,setLineList:p}=React.useContext(PointCloudContext.PointCloudContext),{pushHistoryWithList:y}=useHistory.useHistory(),L=()=>{c.forEach(e=>{t==null||t.removeObjectByName(e.id)}),d.forEach(e=>{t==null||t.removeObjectByName(e.id)}),t==null||t.render(),P([]),v([]),C([]),p([]),i==null||i.toolScheduler.clearStatusAndResult(),h([]),y({pointCloudBoxList:[],polygonList:[],pointCloudSphereList:[]})},l=()=>{r==null||r.toolInstance.clearResult(),u==null||u.toolInstance.clearResult()};return{clearAllResult:L,updatePointCloudPattern:e=>{if(e===a)return;const s=[i,r,u];switch(e){case EToolName.Rect:l(),s.forEach(o=>{o==null||o.switchToCanvas(EToolName.PointCloudPolygon),o==null||o.toolInstance.setPattern(EPolygonPattern.Rect)}),n(EToolName.Rect);break;case EToolName.Polygon:l(),s.forEach(o=>{o==null||o.switchToCanvas(EToolName.PointCloudPolygon),o==null||o.toolInstance.setPattern(EPolygonPattern.Normal)}),n(EToolName.Polygon);break;case EToolName.Point:l(),s.forEach(o=>{o==null||o.switchToCanvas(EToolName.Point)}),n(EToolName.Point);break;case EToolName.Line:l(),s.forEach(o=>{o==null||o.switchToCanvas(EToolName.Line)}),n(EToolName.Line);break}},pointCloudPattern:a}};exports.useStatus=useStatus;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useHistory=require("./useHistory.js"),lbUtils=require("@labelbee/lb-utils");const{EToolName,EPolygonPattern}=lbAnnotation.cTool,useStatus=()=>{const{topViewInstance:s,sideViewInstance:r,backViewInstance:a,mainViewInstance:o,pointCloudBoxList:c,pointCloudSphereList:d,setPointCloudResult:P,setPointCloudSphereList:C,setPolygonList:v,pointCloudPattern:u,setPointCloudPattern:n,syncAllViewPointCloudColor:b,globalPattern:h,setLineList:p}=React.useContext(PointCloudContext.PointCloudContext),{pushHistoryWithList:y}=useHistory.useHistory(),L=()=>{c.forEach(e=>{o==null||o.removeObjectByName(e.id)}),d.forEach(e=>{o==null||o.removeObjectByName(e.id)}),o==null||o.render(),P([]),v([]),C([]),p([]),s==null||s.toolScheduler.clearStatusAndResult(),b([]),y({pointCloudBoxList:[],polygonList:[],pointCloudSphereList:[]})},l=()=>{r==null||r.toolInstance.clearResult(),a==null||a.toolInstance.clearResult()};return{clearAllResult:L,updatePointCloudPattern:e=>{if(e===u)return;const i=[s,r,a];switch(e){case EToolName.Rect:l(),i.forEach(t=>{t==null||t.switchToCanvas(EToolName.PointCloudPolygon),t==null||t.toolInstance.setPattern(EPolygonPattern.Rect)}),n(EToolName.Rect);break;case EToolName.Polygon:l(),i.forEach(t=>{t==null||t.switchToCanvas(EToolName.PointCloudPolygon),t==null||t.toolInstance.setPattern(EPolygonPattern.Normal)}),n(EToolName.Polygon);break;case EToolName.Point:l(),i.forEach(t=>{t==null||t.switchToCanvas(EToolName.Point)}),n(EToolName.Point);break;case EToolName.Line:l(),i.forEach(t=>{t==null||t.switchToCanvas(EToolName.Line)}),n(EToolName.Line);break}},pointCloudPattern:u,isSegmentPattern:h===lbUtils.EPointCloudPattern.Segmentation}};exports.useStatus=useStatus;
@@ -1 +1 @@
1
- "use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),index=require("../../views/MainView/toolFooter/AnnotatedAttributes/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PointCloudView=({imgList:e,drawLayerSlot:a,checkMode:t,intelligentFit:l})=>e.length===0?null:React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,{checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),onContextMenu:n=>n.preventDefault()},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-wrapper")},React__default.default.createElement(index.AnnotatedAttributesPanelFixedLeft,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","left")},React__default.default.createElement(PointCloud2DView,null),React__default.default.createElement(PointCloud3DView,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right")},React__default.default.createElement(PointCloudTopView,{drawLayerSlot:a,checkMode:t,intelligentFit:l}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right-bottom")},React__default.default.createElement(PointCloudSideView,{checkMode:t}),React__default.default.createElement(PointCloudBackView,{checkMode:t})))),React__default.default.createElement(index.AnnotatedAttributesPanelFixedRight,null)))),mapStateToProps=e=>({imgList:e.annotation.imgList});var PointCloudView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudView);module.exports=PointCloudView$1;
1
+ "use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),PointCloudSegmentListener=require("./PointCloudSegmentListener.js"),PointCloudSegment=require("./PointCloudSegment.js"),PointCloudSegmentStatus=require("./PointCloudSegmentStatus.js"),PointCloudSegmentToolbar=require("./PointCloudSegmentToolbar.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),index$1=require("../../views/MainView/toolFooter/AnnotatedAttributes/index.js"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),annotation=require("../../hooks/annotation.js"),index=require("../../utils/index.js"),map=require("../../store/annotation/map.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const PointCloudView=({currentData:t,imgList:s,drawLayerSlot:d,checkMode:a,intelligentFit:c})=>{const e=React.useContext(PointCloudContext.PointCloudContext),{globalPattern:o,setGlobalPattern:m}=e,C=index.jsonParser(t.result),{toolInstanceRef:l,clearToolInstance:f}=annotation.useCustomToolInstance({basicInfo:C});return React.useEffect(()=>{l.current.setPointCloudGlobalPattern=n=>{n!==o&&(m(n),f())},l.current.getPointCloudGlobalPattern=()=>o},[o]),React.useEffect(()=>{l.current.exportData=()=>[e.pointCloudBoxList,{valid:e.valid}],l.current.exportCustomData=()=>{var n,r,u,i;return{resultPolygon:(n=e.polygonList)!=null?n:[],resultLine:(r=e.lineList)!=null?r:[],resultPoint:(u=e.pointCloudSphereList)!=null?u:[],segmentation:(i=e.segmentation)!=null?i:[]}}},[e.pointCloudBoxList,e.valid,e.polygonList,e.lineList,e.pointCloudSphereList,e.ptSegmentInstance,e.segmentation]),s.length===0?null:o===lbUtils.EPointCloudPattern.Segmentation?React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudSegmentListener,{checkMode:a,toolInstanceRef:l}),React__default.default.createElement(PointCloudSegmentToolbar,null),React__default.default.createElement(PointCloudSegment,null),React__default.default.createElement(PointCloudSegmentStatus,null)):React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,{checkMode:a,toolInstanceRef:l}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),onContextMenu:n=>n.preventDefault()},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-wrapper")},React__default.default.createElement(index$1.AnnotatedAttributesPanelFixedLeft,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","left")},React__default.default.createElement(PointCloud2DView,null),React__default.default.createElement(PointCloud3DView,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right")},React__default.default.createElement(PointCloudTopView,{drawLayerSlot:d,checkMode:a,intelligentFit:c}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right-bottom")},React__default.default.createElement(PointCloudSideView,{checkMode:a}),React__default.default.createElement(PointCloudBackView,{checkMode:a})))),React__default.default.createElement(index$1.AnnotatedAttributesPanelFixedRight,null))))};var PointCloudView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudView);module.exports=PointCloudView$1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),ctx=require("../store/ctx.js"),Actions=require("../store/Actions.js");const useCustomToolInstance=({basicInfo:e}={})=>{var r;const o=ctx.useDispatch(),s=React.useRef({valid:(r=e==null?void 0:e.valid)!=null?r:!0,exportData:()=>[[],{}],exportCustomData:()=>({}),clearResult:()=>{},singleOn:()=>{},on:()=>{},unbind:()=>{},setResult:()=>{},history:{initRecord:()=>{},pushHistory:()=>{}},setDefaultAttribute:t=>{},setForbidOperation:()=>{},setShowDefaultCursor:()=>{},setSubAttribute:(t,a)=>{},setValid:()=>{},updateRotate:()=>{},redo:()=>{},undo:()=>{}}),u=t=>{o({type:Actions.ANNOTATION_ACTIONS.SET_TOOL,payload:{instance:t}})},n=()=>{o({type:Actions.ANNOTATION_ACTIONS.SET_TOOL,payload:{instance:void 0}})};return React.useEffect(()=>(u(s.current),()=>{n()}),[]),{toolInstanceRef:s}};exports.useCustomToolInstance=useCustomToolInstance;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),ctx=require("../store/ctx.js"),Actions=require("../store/Actions.js"),lbUtils=require("@labelbee/lb-utils");const useCustomToolInstance=({basicInfo:o}={})=>{var r;const n=ctx.useDispatch(),s={valid:(r=o==null?void 0:o.valid)!=null?r:!0,exportData:()=>[[],{}],exportCustomData:()=>({}),clearResult:()=>{},singleOn:()=>{},on:()=>{},unbind:()=>{},setResult:()=>{},history:{initRecord:()=>{},pushHistory:()=>{}},setDefaultAttribute:t=>{},setForbidOperation:()=>{},setShowDefaultCursor:()=>{},setSubAttribute:(t,i)=>{},setValid:()=>{},updateRotate:()=>{},redo:()=>{},undo:()=>{},setPointCloudGlobalPattern:t=>{},getPointCloudGlobalPattern:()=>lbUtils.EPointCloudPattern.Detection},e=React.useRef(s),a=t=>{n({type:Actions.ANNOTATION_ACTIONS.SET_TOOL,payload:{instance:t}})},u=()=>{n({type:Actions.ANNOTATION_ACTIONS.SET_TOOL,payload:{instance:void 0}})},l=()=>{Object.assign(e.current,s)};return React.useEffect(()=>(a(e.current),()=>{u()}),[]),{toolInstanceRef:e,clearToolInstance:l}};exports.useCustomToolInstance=useCustomToolInstance;
package/dist/index.css CHANGED
@@ -1234,6 +1234,7 @@
1234
1234
  flex-direction: column;
1235
1235
  overflow: hidden;
1236
1236
  flex: 1;
1237
+ position: relative;
1237
1238
  }
1238
1239
 
1239
1240
  .bee-point-cloud-wrapper {
@@ -1490,6 +1491,59 @@
1490
1491
  height: 100%;
1491
1492
  }
1492
1493
 
1494
+ .bee-point-cloud-status__operation {
1495
+ z-index: 200;
1496
+ position: absolute;
1497
+ left: 50%;
1498
+ top: 60px;
1499
+ transform: translateX(-50%);
1500
+ display: flex;
1501
+ }
1502
+ .bee-point-cloud-status__operation .bee-point-cloud-status__button {
1503
+ background-color: white;
1504
+ padding: 7.5px 16px;
1505
+ border: 0.5px solid rgb(196, 196, 196);
1506
+ cursor: pointer;
1507
+ border-radius: 2px;
1508
+ display: flex;
1509
+ align-items: center;
1510
+ }
1511
+
1512
+ .bee-point-cloud-status__info {
1513
+ z-index: 200;
1514
+ position: absolute;
1515
+ right: 20px;
1516
+ top: 60px;
1517
+ padding: 16px;
1518
+ color: white;
1519
+ background: rgb(51, 51, 51);
1520
+ border-radius: 2px;
1521
+ }
1522
+
1523
+ .bee-point-cloud-status__icon {
1524
+ margin-right: 5px;
1525
+ }
1526
+
1527
+ .bee-point-cloud-toolbar {
1528
+ height: 40px;
1529
+ padding: 10px 26px;
1530
+ display: flex;
1531
+ justify-content: flex-end;
1532
+ align-items: center;
1533
+ background-color: rgb(102, 102, 102);
1534
+ }
1535
+ .bee-point-cloud-toolbar .bee-point-cloud-toolbox {
1536
+ margin-left: 16px;
1537
+ display: flex;
1538
+ align-items: center;
1539
+ justify-content: center;
1540
+ cursor: pointer;
1541
+ }
1542
+ .bee-point-cloud-toolbar .bee-point-cloud-toolbox img {
1543
+ height: 24px;
1544
+ width: 24px;
1545
+ }
1546
+
1493
1547
  /** PointCloud样式 end */
1494
1548
  .bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar {
1495
1549
  position: fixed;
@@ -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_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"},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_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"},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";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=(e,t,n)=>new Promise((a,o)=>{var s=i=>{try{p(n.next(i))}catch(r){o(r)}},T=i=>{try{p(n.throw(i))}catch(r){o(r)}},p=i=>i.done?a(i.value):Promise.resolve(i.value).then(s,T);p((n=n.apply(e,t)).next())});const dispatchTasks=(e,t)=>t.map(n=>e(n)),getSubmitByPageOperation=e=>e===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:e===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:e===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(e,t)=>{var n,a;const{imgList:o,imgIndex:s}=e,{dataSourceStep:T}=reducer.getStepConfig(e.stepList,e.step);return((a=(n=index$1.jsonParser(o[s-1].result)[`step_${T}`])==null?void 0:n.result)==null?void 0:a.length)-1||t};function UpdateToolInstance(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:e}}}function SetTaskStepList({stepList:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:e}}}function SetTaskConfig({stepList:e,step:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:e,step:t}}}function UpdateOnSubmit(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:e}}}function UpdateOnSave(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:e}}}function UpdateOnPageChange(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:e}}}function UpdateOnStepChange(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:e}}}function UpdateGetFileData(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:e}}}function UpdatePageSize(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:e}}}function UpdateGetFileList(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:e}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(e){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:e}}}function UpdateBeforeRotate(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:e}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function BatchUpdateTrackID({id:e,newID:t,rangeIndex:n,imgList:a}){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID,payload:{id:e,newID:t,rangeIndex:n,imgList:a}}}function BatchUpdateResultByTrackID(e,t,n){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:e,newData:t,rangeIndex:n}}}function BatchUpdateImgListResultByPredictResult(){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const UpdateCheckMode=e=>({type:Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE,payload:{checkMode:e}});function InitTaskData({onSubmit:e,onSave:t,onPageChange:n,onStepChange:a,getFileData:o,pageSize:s,loadFileList:T,step:p,stepList:i,skipBeforePageTurning:r,beforeRotate:A,checkMode:N}){const u=[];return e&&u.push(UpdateOnSubmit(e)),t&&u.push(UpdateOnSave(t)),n&&u.push(UpdateOnPageChange(n)),a&&u.push(UpdateOnStepChange(a)),o&&u.push(UpdateGetFileData(o)),T&&u.push(UpdateGetFileList(T)),s&&u.push(UpdatePageSize(s)),r&&u.push(UpdateSkipBeforePageTurning(r)),A&&u.push(UpdateBeforeRotate(A)),typeof N=="boolean"&&u.push(UpdateCheckMode(N)),u.push(SetTaskConfig({stepList:i,step:p})),u.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),u.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),I=>dispatchTasks(I,u)}function UpdateInjectFunc({onSubmit:e,onSave:t,onPageChange:n,onStepChange:a,getFileData:o,pageSize:s,loadFileList:T,stepList:p,beforeRotate:i}){const r=[];return e&&r.push(UpdateOnSubmit(e)),t&&r.push(UpdateOnSave(t)),n&&r.push(UpdateOnPageChange(n)),a&&r.push(UpdateOnStepChange(a)),o&&r.push(UpdateGetFileData(o)),T&&r.push(UpdateGetFileList(T)),s&&r.push(UpdatePageSize(s)),i&&r.push(UpdateBeforeRotate(i)),r.push(SetTaskStepList({stepList:p})),A=>dispatchTasks(A,r)}const getNextStep=(e,t)=>{var n;const a=t==null?void 0:t.findIndex(o=>(o==null?void 0:o.step)===e);return(n=t[a+1])==null?void 0:n.step},ToNextStep=e=>(t,n)=>{const{annotation:a}=n(),{step:o,stepList:s}=a,T=getNextStep(o,s);return[t(UpdateProcessingStep(T,e))]},UpdateProcessingStep=(e,t)=>(n,a)=>{var o,s;const{annotation:T}=a();(o=T==null?void 0:T.onStepChange)==null||o.call(T,e);const p=(s=T==null?void 0:T.imgIndex)!=null?s: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:e}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(t!=null?t:p,0))]},ToSubmitFileData=e=>t=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:e}})],SubmitAndChangeFileIndex=(e,t,n,a)=>[e(ToSubmitFileData(n)),e(reducer.LoadFileAndFileData(t,a))],ChangeBasicIndex=(e,t)=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:t}})],ChangeTriggerEventAfterIndexChanged=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:t}})},PageBackward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Backward,e),PageForward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Forward,e),PageJump=(e,t=!1)=>(n,a)=>{if(e!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,t,e)},loadImgList=(e,t,n,a)=>__async(void 0,null,function*(){var o;const{loadFileList:s,imgList:T,pageSize:p}=t().annotation,i=Math.floor(n/p);SetAnnotationLoading(e,!0);try{const r=yield s(i,p);if(SetAnnotationLoading(e,!1),!((o=r==null?void 0:r.fileList)==null?void 0:o.length)||!(r==null?void 0:r.total))throw new Error("fileList and total are required");const A=a?new Array(r.total):[...T];return A.splice(i*p,p,...r.fileList),e({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:A}}),!0}catch(r){SetAnnotationLoading(e,!1),console.error(r)}}),DispatcherTurning=(e,t,n,a=!1,o)=>__async(void 0,null,function*(){var s;const T=t().annotation,{fileIndexChanged:p,fileIndex:i,basicIndexChanged:r,basicIndex:A}=PageOperator.getNextPageInfo(n,T,o),N=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(e,a),p){if(T.loading||!T.imgList[i]&&!(yield loadImgList(e,t,i)))return;(s=T.onPageChange)==null||s.call(T,i);const u=N===index.ESubmitType.Backward?getBasicIndex(t().annotation,A):A;return SubmitAndChangeFileIndex(e,i,N,u)}return r?ChangeBasicIndex(e,A):e(ToSubmitFileData(N))}),ChangeSave=e=>{e(ToSubmitFileData(index.ESubmitType.Save)),e({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:t}})},SetPointCloudLoading=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:t}})},InitAnnotationState=e=>{e({type:Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE,payload:{}})},SetPredictResult=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT,payload:{result:t}})},SetPredictResultVisible=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE,payload:{visible:t}})},GetBoxesByID=(e,t)=>(n,a)=>{const{imgList:o,step:s}=a().annotation;return util.getBoxesByTrackID(o,s,e,t)};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.SetAnnotationLoading=SetAnnotationLoading,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.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,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 T=s=>{try{u(n.next(s))}catch(p){r(p)}},o=s=>{try{u(n.throw(s))}catch(p){r(p)}},u=s=>s.done?a(s.value):Promise.resolve(s.value).then(T,o);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:T}=t,{dataSourceStep:o}=reducer.getStepConfig(t.stepList,t.step);return((a=(n=index$1.jsonParser(r[T-1].result)[`step_${o}`])==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 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:T,loadFileList:o,step:u,stepList:s,skipBeforePageTurning:p,beforeRotate:i,checkMode:N,highlightAttribute:I}){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)),o&&A.push(UpdateGetFileList(o)),T&&A.push(UpdatePageSize(T)),p&&A.push(UpdateSkipBeforePageTurning(p)),i&&A.push(UpdateBeforeRotate(i)),typeof N=="boolean"&&A.push(UpdateCheckMode(N)),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}),O=>dispatchTasks(O,A)}function UpdateInjectFunc({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:T,loadFileList:o,stepList:u,beforeRotate:s,highlightAttribute:p}){const i=[];return t&&i.push(UpdateOnSubmit(t)),e&&i.push(UpdateOnSave(e)),n&&i.push(UpdateOnPageChange(n)),a&&i.push(UpdateOnStepChange(a)),r&&i.push(UpdateGetFileData(r)),o&&i.push(UpdateGetFileList(o)),T&&i.push(UpdatePageSize(T)),s&&i.push(UpdateBeforeRotate(s)),i.push(UpdateHighlightAttribute(p)),i.push(SetTaskStepList({stepList:u})),N=>dispatchTasks(N,i)}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:T}=a,o=getNextStep(r,T);return[e(UpdateProcessingStep(o,t))]},UpdateProcessingStep=(t,e)=>(n,a)=>{var r,T;const{annotation:o}=a();(r=o==null?void 0:o.onStepChange)==null||r.call(o,t);const u=(T=o==null?void 0:o.imgIndex)!=null?T: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:T,imgList:o,pageSize:u}=e().annotation,s=Math.floor(n/u);SetAnnotationLoading(t,!0);try{const p=yield T(s,u);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 i=a?new Array(p.total):[...o];return i.splice(s*u,u,...p.fileList),t({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:i}}),!0}catch(p){SetAnnotationLoading(t,!1),console.error(p)}}),DispatcherTurning=(t,e,n,a=!1,r)=>__async(void 0,null,function*(){var T;const o=e().annotation,{fileIndexChanged:u,fileIndex:s,basicIndexChanged:p,basicIndex:i}=PageOperator.getNextPageInfo(n,o,r),N=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(t,a),u){if(o.loading||!o.imgList[s]&&!(yield loadImgList(t,e,s)))return;(T=o.onPageChange)==null||T.call(o,s);const I=N===index.ESubmitType.Backward?getBasicIndex(e().annotation,i):i;return SubmitAndChangeFileIndex(t,s,N,I)}return p?ChangeBasicIndex(t,i):t(ToSubmitFileData(N))}),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}})},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:T}=a().annotation;return util.getBoxesByTrackID(r,T,t,e)};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.SetAnnotationLoading=SetAnnotationLoading,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.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 StepUtils=require("../../utils/StepUtils.js"),index=require("../../utils/index.js");const a2MapStateToProps=n=>{var e,o,i;const{annotation:{imgList:r,imgIndex:s}}=n,a=(e=r[s])!=null?e:{},t=StepUtils.getCurrentStepInfo((o=n.annotation)==null?void 0:o.step,(i=n.annotation)==null?void 0:i.stepList);return{currentData:a,imgIndex:s,imgList:r,stepInfo:t,config:index.jsonParser(t==null?void 0:t.config),configString:t==null?void 0:t.config}};exports.a2MapStateToProps=a2MapStateToProps;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var StepUtils=require("../../utils/StepUtils.js"),index=require("../../utils/index.js");const a2MapStateToProps=n=>{var e,i,o;const{annotation:{imgList:r,imgIndex:s,highlightAttribute:a}}=n,l=(e=r[s])!=null?e:{},t=StepUtils.getCurrentStepInfo((i=n.annotation)==null?void 0:i.step,(o=n.annotation)==null?void 0:o.stepList);return{currentData:l,imgIndex:s,imgList:r,stepInfo:t,config:index.jsonParser(t==null?void 0:t.config),configString:t==null?void 0:t.config,highlightAttribute:a}};exports.a2MapStateToProps=a2MapStateToProps;
@@ -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");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((p,c)=>{var O=I=>{try{S(s.next(I))}catch(v){c(v)}},g=I=>{try{S(s.throw(I))}catch(v){c(v)}},S=I=>I.done?p(I.value):Promise.resolve(I.value).then(O,g);S((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,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,p)=>{if(p){const c=p.result;if(index.jsonParser(c)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:p}=e,c=StepUtils.getCurrentStepInfo(s,p),O=ConfigUtils.ConfigUtils.jsonParser(c.config);if(ToolUtils.isVideoTool(c==null?void 0:c.tool)||ToolUtils.isPointCloudTool(c==null?void 0:c.tool))return;const g=document.getElementById("toolContainer");if(!g)throw"Not exist dom named id-toolContainer";const S=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:g,toolName:c.tool,size:S,imgNode:t,config:O,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(s,p)=>__async(void 0,null,function*(){const{stepList:c,step:O}=p().annotation,g=StepUtils.currentToolIsVideo(O,c),S=StepUtils.currentToolIsPointCloud(O,c);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),g||S){s(AfterVideoLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:p,imgList:c}=s().annotation;if(p){const O=yield p(c[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:O,index:e}})}}),AfterVideoLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,p)=>{var c;const{toolInstance:O,imgList:g}=p().annotation,S=(c=g==null?void 0:g[e])==null?void 0:c.url;lbAnnotation.ImgUtils.load(S).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),O==null||O.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:p,step:c=1})=>{var O,g,S,I;const v=((O=t[s])==null?void 0:O.result)||"",[h,b,U]=(g=e==null?void 0:e.exportData())!=null?g:[],x=(I=(S=e==null?void 0:e.exportCustomData)==null?void 0:S.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(v,b),w=data.composeResult(B,{step:c,stepList:p},{rect:h},x);return t.map((R,j)=>j===s?__spreadValues(__spreadProps(__spreadValues({},R),{result:w}),U):__spreadValues({},R))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,p,c,O,g,S,I,v,h,b,U,x,B,w,R,j,V,G,q,M,k,H,z;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,i=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:i})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:i,stepList:l,toolInstance:u,onSubmit:r,resultList:A}=e;if(!u||!n[o])return e;const d=((s=n[o])==null?void 0:s.result)||"",[,a,T]=(p=u==null?void 0:u.exportData())!=null?p:[],N=(O=(c=u==null?void 0:u.exportCustomData)==null?void 0:c.call(u))!=null?O:{},f=data.composeResultWithBasicImgInfo(d,a),L=data.composeResult(f,{step:i,stepList:l},{rect:A},N),m=e.imgList.map((E,C)=>{if(C===o){const P=AnnotationDataUtils.dataCorrection(L,d,i,l);return __spreadValues(__spreadProps(__spreadValues({},E),{result:P}),T)}return E});if(((g=t.payload)==null?void 0:g.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:m});r&&r([m[o]],(S=t.payload)==null?void 0:S.submitType,o,m);const D=calcStepProgress(m,i);return __spreadProps(__spreadValues({},e),{stepProgress:D,imgList:m})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:i}=e;return i==null||i(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:i,toolInstance:l,basicResultList:u}=e;if(!l)return e;const[r]=(I=l==null?void 0:l.exportData())!=null?I:[];let A=r;if((u==null?void 0:u.length)>0){const d=(v=u[o])==null?void 0:v.id,a=r.map(T=>__spreadProps(__spreadValues({},T),{sourceID:d}));A=___default.default.cloneDeep(i).filter(T=>T.sourceID!==d),A.push(...a)}return __spreadProps(__spreadValues({},e),{resultList:A,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:i,imgIndex:l,stepList:u,annotationEngine:r,resultList:A,basicResultList:d}=e;if(!n||!r)return e;const a=t.payload.basicIndex,T=(h=d[a])==null?void 0:h.id,N=index.jsonParser((b=i[l])==null?void 0:b.result),f=(A||[]).filter(P=>P.sourceID===T),L=getStepConfig(u,o),{dataSourceStep:m,tool:D}=L,E=getStepConfig(u,m);let C=[];return m&&D&&(C=(U=N[`step_${m}`])==null?void 0:U.result,(C==null?void 0:C.length)>0?(r==null||r.setBasicInfo(E.tool,C[a]),r==null||r.launchOperation()):(r==null||r.setBasicInfo(E.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:a})}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:i,annotationEngine:l,stepList:u}=e;if(!i)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,u),{nextIndex:A,imgNode:d,nextBasicIndex:a,imgError:T}=t.payload,N=a!=null?a:0,f=index.jsonParser((x=n[A])==null?void 0:x.result),L=f[`step_${r.step}`],m=!L,D={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};d&&T!==!0?l==null||l.setImgNode(d,D):i==null||i.setValid(D.valid);const E=getStepConfig(u,r.step),{dataSourceStep:C,tool:P}=E,K=getStepConfig(u,C),W=C&&P,y=(j=(R=f[`step_${C}`])==null?void 0:R.result)!=null?j:[],F=AnnotationDataUtils.getInitialResultList(L==null?void 0:L.result,i,E,y,m);if(l==null||l.launchOperation(),W&&((y==null?void 0:y.length)>0?l==null||l.setBasicInfo(K.tool,y[N]):(l==null||l.setBasicInfo(K.tool),l==null||l.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const $=(G=(V=y[N])==null?void 0:V.id)!=null?G:"",Y=W?F.filter(J=>lbAnnotation.CommonToolUtils.isSameSourceID(J.sourceID,$)):F;i==null||i.history.initRecord(F,!0),i==null||i.setResult(Y)}return __spreadProps(__spreadValues({},e),{imgIndex:A,basicIndex:N,basicResultList:y,resultList:F})}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:i,annotationEngine:l}=o;return __spreadProps(__spreadValues({},e),{toolInstance:i,annotationEngine:l})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(M=t.payload)==null?void 0:M.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.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:i}=e,l=[...i];return l[o]=__spreadValues(__spreadValues({},l[o]),n),__spreadProps(__spreadValues({},e),{imgList:l})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||n==null||n.updateRotate(),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(k=n==null?void 0:n.valid)!=null?k:!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:i,step:l}=e;if(!n)return e;if(o===0||o>=i.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const u=i[o-1].result;if(!u)return e;const r=AnnotationDataUtils.copyResultChange(u,l,(H=i[o].result)!=null?H:"");i[o]=__spreadProps(__spreadValues({},i[o]),{result:r});const d=index.jsonParser(r)[`step_${l}`],a=(d==null?void 0:d.result)||[];return n==null||n.setResult(a),n==null||n.history.pushHistory(a),(z=n==null?void 0:n.asyncData)==null||z.call(n,i[o]),__spreadProps(__spreadValues({},e),{imgList:[...i]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:i}=t.payload;if(!o)return e;const l=getStepConfig(n,i);return o==null||o.setToolName(l.tool,l.config),__spreadProps(__spreadValues({},e),{step:i,toolInstance:o==null?void 0:o.toolInstance})}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.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:i,imgList:l}=t.payload,{imgIndex:u,onSubmit:r}=e,A=[],d=l.map((a,T)=>{if(lbAnnotation.MathUtils.isInRange(T,i)){const N=__spreadProps(__spreadValues({},a),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:a.result})});return A.push({imgIndex:T,newInfo:N}),N}return a});return r&&r([d[u]],index$1.ESubmitType.BatchUpdateTrackID,u,d,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:i}=t.payload,{imgList:l,imgIndex:u,onSubmit:r}=e,A=[],d=l.map((a,T)=>{if(lbAnnotation.MathUtils.isInRange(T,i)){const N=__spreadProps(__spreadValues({},a),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:a.result})});return A.push({imgIndex:T,newInfo:N}),N}return a});return r&&r([d[u]],index$1.ESubmitType.BatchUpdateTrackID,u,d,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:i,step:l,predictionResult:u}=e,r={};u.forEach(T=>{const{index:N}=T;r[N]=___default.default.pick(T,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const A=`step_${l}`,d=[],a=o.map((T,N)=>{if(r[N]){const f=T.result==="{}"?index.jsonParser(data.composeResult("",{step:l,stepList:i},{rect:[]},{})):index.jsonParser(T.result);f[A].result.push(r[N]);const L=__spreadProps(__spreadValues({},T),{result:JSON.stringify(f)});return d.push({imgIndex:N,newInfo:L}),L}return T});return n==null||n(a,index$1.ESubmitType.BatchUpdateImgList,-1,a,{updateImgList:d}),__spreadProps(__spreadValues({},e),{imgList:a})}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");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((p,c)=>{var O=I=>{try{S(s.next(I))}catch(E){c(E)}},g=I=>{try{S(s.throw(I))}catch(E){c(E)}},S=I=>I.done?p(I.value):Promise.resolve(I.value).then(O,g);S((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,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,p)=>{if(p){const c=p.result;if(index.jsonParser(c)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:p}=e,c=StepUtils.getCurrentStepInfo(s,p),O=ConfigUtils.ConfigUtils.jsonParser(c.config);if(ToolUtils.isVideoTool(c==null?void 0:c.tool)||ToolUtils.isPointCloudTool(c==null?void 0:c.tool))return;const g=document.getElementById("toolContainer");if(!g)throw"Not exist dom named id-toolContainer";const S=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:g,toolName:c.tool,size:S,imgNode:t,config:O,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(s,p)=>__async(void 0,null,function*(){const{stepList:c,step:O}=p().annotation,g=StepUtils.currentToolIsVideo(O,c),S=StepUtils.currentToolIsPointCloud(O,c);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),g||S){s(AfterVideoLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:p,imgList:c}=s().annotation;if(p){const O=yield p(c[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:O,index:e}})}}),AfterVideoLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,p)=>{var c;const{toolInstance:O,imgList:g}=p().annotation,S=(c=g==null?void 0:g[e])==null?void 0:c.url;lbAnnotation.ImgUtils.load(S).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),O==null||O.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:p,step:c=1})=>{var O,g,S,I;const E=((O=t[s])==null?void 0:O.result)||"",[h,b,U]=(g=e==null?void 0:e.exportData())!=null?g:[],x=(I=(S=e==null?void 0:e.exportCustomData)==null?void 0:S.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(E,b),w=data.composeResult(B,{step:c,stepList:p},{rect:h},x);return t.map((R,j)=>j===s?__spreadValues(__spreadProps(__spreadValues({},R),{result:w}),U):__spreadValues({},R))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,p,c,O,g,S,I,E,h,b,U,x,B,w,R,j,G,V,q,M,k,H,z;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,i=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:i})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:i,stepList:r,toolInstance:u,onSubmit:l,resultList:A}=e;if(!u||!n[o])return e;const d=((s=n[o])==null?void 0:s.result)||"",[,a,T]=(p=u==null?void 0:u.exportData())!=null?p:[],N=(O=(c=u==null?void 0:u.exportCustomData)==null?void 0:c.call(u))!=null?O:{},f=data.composeResultWithBasicImgInfo(d,a),L=data.composeResult(f,{step:i,stepList:r},{rect:A},N),m=e.imgList.map((v,C)=>{if(C===o){const P=AnnotationDataUtils.dataCorrection(L,d,i,r);return __spreadValues(__spreadProps(__spreadValues({},v),{result:P}),T)}return v});if(((g=t.payload)==null?void 0:g.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:m});l&&l([m[o]],(S=t.payload)==null?void 0:S.submitType,o,m);const D=calcStepProgress(m,i);return __spreadProps(__spreadValues({},e),{stepProgress:D,imgList:m})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:i}=e;return i==null||i(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:i,toolInstance:r,basicResultList:u}=e;if(!r)return e;const[l]=(I=r==null?void 0:r.exportData())!=null?I:[];let A=l;if((u==null?void 0:u.length)>0){const d=(E=u[o])==null?void 0:E.id,a=l.map(T=>__spreadProps(__spreadValues({},T),{sourceID:d}));A=___default.default.cloneDeep(i).filter(T=>T.sourceID!==d),A.push(...a)}return __spreadProps(__spreadValues({},e),{resultList:A,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:i,imgIndex:r,stepList:u,annotationEngine:l,resultList:A,basicResultList:d}=e;if(!n||!l)return e;const a=t.payload.basicIndex,T=(h=d[a])==null?void 0:h.id,N=index.jsonParser((b=i[r])==null?void 0:b.result),f=(A||[]).filter(P=>P.sourceID===T),L=getStepConfig(u,o),{dataSourceStep:m,tool:D}=L,v=getStepConfig(u,m);let C=[];return m&&D&&(C=(U=N[`step_${m}`])==null?void 0:U.result,(C==null?void 0:C.length)>0?(l==null||l.setBasicInfo(v.tool,C[a]),l==null||l.launchOperation()):(l==null||l.setBasicInfo(v.tool),l==null||l.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:a})}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:i,annotationEngine:r,stepList:u}=e;if(!i)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const l=StepUtils.getCurrentStepInfo(o,u),{nextIndex:A,imgNode:d,nextBasicIndex:a,imgError:T}=t.payload,N=a!=null?a:0,f=index.jsonParser((x=n[A])==null?void 0:x.result),L=f[`step_${l.step}`],m=!L,D={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};d&&T!==!0?r==null||r.setImgNode(d,D):i==null||i.setValid(D.valid);const v=getStepConfig(u,l.step),{dataSourceStep:C,tool:P}=v,K=getStepConfig(u,C),W=C&&P,y=(j=(R=f[`step_${C}`])==null?void 0:R.result)!=null?j:[],F=AnnotationDataUtils.getInitialResultList(L==null?void 0:L.result,i,v,y,m);if(r==null||r.launchOperation(),W&&((y==null?void 0:y.length)>0?r==null||r.setBasicInfo(K.tool,y[N]):(r==null||r.setBasicInfo(K.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),l.tool!=="check"){const $=(V=(G=y[N])==null?void 0:G.id)!=null?V:"",Y=W?F.filter(J=>lbAnnotation.CommonToolUtils.isSameSourceID(J.sourceID,$)):F;i==null||i.history.initRecord(F,!0),i==null||i.setResult(Y)}return __spreadProps(__spreadValues({},e),{imgIndex:A,basicIndex:N,basicResultList:y,resultList:F})}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:i,annotationEngine:r}=o;return __spreadProps(__spreadValues({},e),{toolInstance:i,annotationEngine:r})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(M=t.payload)==null?void 0:M.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.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:i}=e,r=[...i];return r[o]=__spreadValues(__spreadValues({},r[o]),n),__spreadProps(__spreadValues({},e),{imgList:r})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||n==null||n.updateRotate(),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(k=n==null?void 0:n.valid)!=null?k:!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:i,step:r}=e;if(!n)return e;if(o===0||o>=i.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const u=i[o-1].result;if(!u)return e;const l=AnnotationDataUtils.copyResultChange(u,r,(H=i[o].result)!=null?H:"");i[o]=__spreadProps(__spreadValues({},i[o]),{result:l});const d=index.jsonParser(l)[`step_${r}`],a=(d==null?void 0:d.result)||[];return n==null||n.setResult(a),n==null||n.history.pushHistory(a),(z=n==null?void 0:n.asyncData)==null||z.call(n,i[o]),__spreadProps(__spreadValues({},e),{imgList:[...i]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:i}=t.payload;if(!o)return e;const r=getStepConfig(n,i);return o==null||o.setToolName(r.tool,r.config),__spreadProps(__spreadValues({},e),{step:i,toolInstance:o==null?void 0:o.toolInstance})}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:i,imgList:r}=t.payload,{imgIndex:u,onSubmit:l}=e,A=[],d=r.map((a,T)=>{if(lbAnnotation.MathUtils.isInRange(T,i)){const N=__spreadProps(__spreadValues({},a),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:a.result})});return A.push({imgIndex:T,newInfo:N}),N}return a});return l&&l([d[u]],index$1.ESubmitType.BatchUpdateTrackID,u,d,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:i}=t.payload,{imgList:r,imgIndex:u,onSubmit:l}=e,A=[],d=r.map((a,T)=>{if(lbAnnotation.MathUtils.isInRange(T,i)){const N=__spreadProps(__spreadValues({},a),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:a.result})});return A.push({imgIndex:T,newInfo:N}),N}return a});return l&&l([d[u]],index$1.ESubmitType.BatchUpdateTrackID,u,d,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:i,step:r,predictionResult:u}=e,l={};u.forEach(T=>{const{index:N}=T;l[N]=___default.default.pick(T,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const A=`step_${r}`,d=[],a=o.map((T,N)=>{if(l[N]){const f=T.result==="{}"?index.jsonParser(data.composeResult("",{step:r,stepList:i},{rect:[]},{})):index.jsonParser(T.result);f[A].result.push(l[N]);const L=__spreadProps(__spreadValues({},T),{result:JSON.stringify(f)});return d.push({imgIndex:N,newInfo:L}),L}return T});return n==null||n(a,index$1.ESubmitType.BatchUpdateImgList,-1,a,{updateImgList:d}),__spreadProps(__spreadValues({},e),{imgList:a})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
@@ -69,6 +69,7 @@ export interface AppProps {
69
69
  checkMode?: boolean;
70
70
  intelligentFit?: boolean;
71
71
  enableColorPicker?: boolean;
72
+ highlightAttribute?: string;
72
73
  }
73
74
  declare const _default: import("react-redux").ConnectedComponent<React.FC<AppProps>, import("react-redux").Omit<AppProps & {
74
75
  children?: React.ReactNode;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const HidePointCloudSegmentSvg: (props: {
3
+ color: string;
4
+ }) => React.JSX.Element;
5
+ export declare const FocusModeSvg: (props: {
6
+ color: string;
7
+ }) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { IA2MapStateProps } from '@/store/annotation/map';
3
- declare const _default: import("react-redux").ConnectedComponent<({ currentData, config }: IA2MapStateProps) => React.JSX.Element, import("react-redux").Omit<IA2MapStateProps, "imgIndex" | "imgList" | "config" | "currentData" | "stepInfo" | "configString">>;
3
+ declare const _default: import("react-redux").ConnectedComponent<({ currentData, config }: IA2MapStateProps) => React.JSX.Element, import("react-redux").Omit<IA2MapStateProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "currentData" | "stepInfo" | "configString">>;
4
4
  export default _default;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { IA2MapStateProps } from '@/store/annotation/map';
3
3
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IA2MapStateProps>, import("react-redux").Omit<IA2MapStateProps & {
4
4
  children?: React.ReactNode;
5
- }, "imgIndex" | "imgList" | "config" | "currentData" | "stepInfo" | "configString">>;
5
+ }, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "currentData" | "stepInfo" | "configString">>;
6
6
  export default _default;
@@ -3,5 +3,5 @@ import { IA2MapStateProps } from '@/store/annotation/map';
3
3
  interface IProps {
4
4
  checkMode?: boolean;
5
5
  }
6
- declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, checkMode }: IA2MapStateProps & IProps) => React.JSX.Element, import("react-redux").Omit<IA2MapStateProps & IProps, "imgIndex" | "imgList" | "config" | "currentData" | "stepInfo" | "configString">>;
6
+ declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, checkMode }: IA2MapStateProps & IProps) => React.JSX.Element, import("react-redux").Omit<IA2MapStateProps & IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "currentData" | "stepInfo" | "configString">>;
7
7
  export default _default;