@labelbee/lb-components 1.19.1-alpha.1 → 1.20.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 (82) hide show
  1. package/dist/assets/annotation/toolHotKeyIcon/icon_eraser.svg.js +1 -0
  2. package/dist/assets/annotation/toolHotKeyIcon/icon_line_static.svg.js +1 -0
  3. package/dist/assets/annotation/toolHotKeyIcon/icon_scribble.svg.js +1 -0
  4. package/dist/assets/annotation/toolHotKeyIcon/icon_strokeEnlarge.svg.js +1 -0
  5. package/dist/assets/annotation/toolHotKeyIcon/icon_strokeReduction.svg.js +1 -0
  6. package/dist/assets/attributeIcon/eraser.svg.js +1 -1
  7. package/dist/assets/attributeIcon/eraser_a.svg.js +1 -1
  8. package/dist/assets/attributeIcon/icon_eyeLock_a.svg.js +1 -0
  9. package/dist/assets/attributeIcon/icon_eyeLock_h.svg.js +1 -0
  10. package/dist/assets/attributeIcon/pen.svg.js +1 -1
  11. package/dist/assets/attributeIcon/pen_a.svg.js +1 -1
  12. package/dist/assets/icons/32b52174.svg +5 -0
  13. package/dist/assets/icons/ad8081bf.svg +13 -0
  14. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -1
  15. package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -0
  16. package/dist/components/attributeList/index.js +1 -1
  17. package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
  18. package/dist/components/audioAnnotate/audioSide/labelFilterInput/index.js +1 -1
  19. package/dist/components/audioAnnotate/audioSide/labelSidebar/index.js +1 -1
  20. package/dist/components/audioAnnotate/index.js +1 -1
  21. package/dist/components/audioAnnotate/textInput/index.js +1 -1
  22. package/dist/components/audioPlayer/combineTip/index.js +1 -1
  23. package/dist/components/audioPlayer/index.js +1 -1
  24. package/dist/components/audioPlayer/labelDisplayToggle/index.js +1 -1
  25. package/dist/components/audioPlayer/segmentTip/index.js +1 -1
  26. package/dist/components/audioPlayer/zoomSlider/index.js +1 -1
  27. package/dist/components/latexEditor/constant/config.js +1 -0
  28. package/dist/components/latexEditor/index.js +1 -0
  29. package/dist/components/latexEditor/index.module.scss.js +1 -0
  30. package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
  31. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  32. package/dist/components/videoPlayer/components/SpeedController/index.js +1 -1
  33. package/dist/index.css +93 -1
  34. package/dist/types/components/LLMToolView/types.d.ts +1 -0
  35. package/dist/types/components/audioAnnotate/audioSide/labelSidebar/index.d.ts +4 -21
  36. package/dist/types/components/latexEditor/constant/config.d.ts +18 -0
  37. package/dist/types/components/latexEditor/index.d.ts +12 -0
  38. package/dist/types/hooks/annotation.d.ts +2 -2
  39. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.d.ts +25 -0
  40. package/dist/views/MainView/index.js +1 -1
  41. package/dist/views/MainView/sidebar/ScribbleSidebar/index.js +1 -1
  42. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/audioText/index.js +1 -1
  43. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -1
  44. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  45. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.js +1 -1
  46. package/es/assets/annotation/toolHotKeyIcon/icon_eraser.svg.js +1 -0
  47. package/es/assets/annotation/toolHotKeyIcon/icon_line_static.svg.js +1 -0
  48. package/es/assets/annotation/toolHotKeyIcon/icon_scribble.svg.js +1 -0
  49. package/es/assets/annotation/toolHotKeyIcon/icon_strokeEnlarge.svg.js +1 -0
  50. package/es/assets/annotation/toolHotKeyIcon/icon_strokeReduction.svg.js +1 -0
  51. package/es/assets/attributeIcon/eraser.svg.js +1 -1
  52. package/es/assets/attributeIcon/eraser_a.svg.js +1 -1
  53. package/es/assets/attributeIcon/icon_eyeLock_a.svg.js +1 -0
  54. package/es/assets/attributeIcon/icon_eyeLock_h.svg.js +1 -0
  55. package/es/assets/attributeIcon/pen.svg.js +1 -1
  56. package/es/assets/attributeIcon/pen_a.svg.js +1 -1
  57. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -1
  58. package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -0
  59. package/es/components/attributeList/index.js +1 -1
  60. package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
  61. package/es/components/audioAnnotate/audioSide/labelFilterInput/index.js +1 -1
  62. package/es/components/audioAnnotate/audioSide/labelSidebar/index.js +1 -1
  63. package/es/components/audioAnnotate/index.js +1 -1
  64. package/es/components/audioAnnotate/textInput/index.js +1 -1
  65. package/es/components/audioPlayer/combineTip/index.js +1 -1
  66. package/es/components/audioPlayer/index.js +1 -1
  67. package/es/components/audioPlayer/labelDisplayToggle/index.js +1 -1
  68. package/es/components/audioPlayer/segmentTip/index.js +1 -1
  69. package/es/components/audioPlayer/zoomSlider/index.js +1 -1
  70. package/es/components/latexEditor/constant/config.js +1 -0
  71. package/es/components/latexEditor/index.js +1 -0
  72. package/es/components/latexEditor/index.module.scss.js +1 -0
  73. package/es/components/pointCloudView/PointCloudInfos.js +1 -1
  74. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  75. package/es/components/videoPlayer/components/SpeedController/index.js +1 -1
  76. package/es/index.css +93 -1
  77. package/es/views/MainView/index.js +1 -1
  78. package/es/views/MainView/sidebar/ScribbleSidebar/index.js +1 -1
  79. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/audioText/index.js +1 -1
  80. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -1
  81. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.js +1 -1
  82. package/package.json +3 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("../PointCloudContext.js"),useSingleBox=require("./useSingleBox.js"),useSphere=require("./useSphere.js"),ctx=require("../../../store/ctx.js"),StepUtils=require("../../../utils/StepUtils.js"),index=require("../../../utils/index.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),antd=require("antd"),reactI18next=require("react-i18next"),useHistory=require("./useHistory.js"),usePolygon=require("./usePolygon.js"),ahooks=require("ahooks"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,n)=>new Promise((a,o)=>{var d=u=>{try{c(n.next(u))}catch(h){o(h)}},P=u=>{try{c(n.throw(u))}catch(h){o(h)}},c=u=>u.done?a(u.value):Promise.resolve(u.value).then(d,P);c((n=n.apply(e,t)).next())});const DEFAULT_SCOPE=5,DEFAULT_RADIUS=90,INTELLIGENT_FIT_MARGIN=.01,PointCloudView={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},topViewPoint2PointCloud=(e,t,n,a,o)=>{const{x:d,y:P}=lbUtils.PointCloudUtils.transferCanvas2World(e,t),{defaultZ:c}=lbUtils.DEFAULT_SPHERE_PARAMS,u={center:{x:d,y:P,z:c},id:e.id},h=a?__spreadValues(__spreadValues({},a),u):__spreadProps(__spreadValues({},u),{attribute:"",valid:!0});return o&&Object.assign(h,o),h},topViewPolygon2PointCloud=(e,t,n,a,o,d)=>{let P=e.pointList.map(L=>lbUtils.PointCloudUtils.transferCanvas2World(L,t)),c=0,u=1,h={};if(n){const L=n.getSensesPointZAxisInPolygon(P,void 0,d);d&&L.fittedCoordinates.length>0&&(P=L.fittedCoordinates),c=(L.maxZ+L.minZ)/2,u=L.maxZ-L.minZ,h={count:L.zCount}}const[v,b,T]=P,V=lbAnnotation.MathUtils.getLineCenterPoint([v,T]),_=lbAnnotation.MathUtils.getLineLength(v,b),D=lbAnnotation.MathUtils.getLineLength(b,T),A=lbAnnotation.MathUtils.getRadiusFromQuadrangle(e.pointList);a&&(c=a.center.z,u=a.depth);const k={center:{x:V.x,y:V.y,z:c},width:d?D+INTELLIGENT_FIT_MARGIN:D,height:d?_+INTELLIGENT_FIT_MARGIN:_,depth:u,rotation:A,id:e.id},O=__spreadValues(a?__spreadValues(__spreadValues({},a),k):__spreadProps(__spreadValues({},k),{attribute:"",valid:!0}),h);o&&Object.assign(O,o);const z=P.map(L=>lbUtils.PointCloudUtils.transferWorld2Canvas(L,t));return{boxParams:O,newPointList:z}},sideViewPoint2PointCloud=(e,t,n)=>{const a={x:e.x-t.x,y:e.y-t.y};return __spreadProps(__spreadValues({},n),{center:{x:n.center.x-a.x,y:n.center.y,z:n.center.z-a.y}})},sideViewPolygon2PointCloud=(e,t,n,a)=>{const[o,d,P]=e.pointList,[c,u,h]=t.pointList,v=lbAnnotation.MathUtils.getLineCenterPoint([o,P]),b=lbAnnotation.MathUtils.getLineCenterPoint([c,h]),V={x:{x:v.x-b.x,y:v.y-b.y}.x,y:0,z:v.y-b.y},_=lbAnnotation.MathUtils.getLineLength(o,d),D=lbAnnotation.MathUtils.getLineLength(c,u),A=_-D,k=lbAnnotation.MathUtils.getLineLength(d,P),O=lbAnnotation.MathUtils.getLineLength(u,h),z=k-O,{newBoxParams:L}=a.getNewBoxBySideUpdate(V,z,A,n);return L},backViewPoint2PointCloud=(e,t,n)=>{const a={x:e.x-t.x,y:e.y-t.y};return __spreadProps(__spreadValues({},n),{center:{x:n.center.x,y:n.center.y-a.x,z:n.center.z-a.y}})},backViewPolygon2PointCloud=(e,t,n,a)=>{const[o,d,P]=e.pointList,[c,u,h]=t.pointList,v=lbAnnotation.MathUtils.getLineCenterPoint([o,P]),b=lbAnnotation.MathUtils.getLineCenterPoint([c,h]),V={x:{x:v.x-b.x,y:v.y-b.y}.x,y:0,z:v.y-b.y},_=lbAnnotation.MathUtils.getLineLength(o,d),D=lbAnnotation.MathUtils.getLineLength(c,u),A=_-D,k=lbAnnotation.MathUtils.getLineLength(d,P),O=lbAnnotation.MathUtils.getLineLength(u,h),z=k-O;let{newBoxParams:L}=a.getNewBoxByBackUpdate(V,z,A,n);return L},syncSideViewByPoint=(e,t,n,a,o)=>{var d;if(!n)return;const{toolInstance:P,pointCloudInstance:c}=n;c.loadPCDFile(a,(d=o==null?void 0:o.radius)!=null?d:DEFAULT_RADIUS);const{cameraPositionVector:u}=c.updateOrthoCameraBySphere(e,lbUtils.EPerspectiveView.Left);c.setInitCameraPosition(u);const{point2d:h,zoom:v}=c.getSphereSidePoint2DCoordinate(e);c.camera.zoom=v,c.camera.updateProjectionMatrix(),c.render(),P.initPosition(),P.zoomChangeOnCenter(v),P.setResult([__spreadProps(__spreadValues(__spreadValues({},t),h),{valid:e.valid,textAttribute:"",attribute:e.attribute})]),P.setSelectedID(t.id)},synchronizeSideView=(e,t,n,a)=>{if(!n)return;const{pointCloud2dOperation:o,pointCloudInstance:d}=n;d.loadPCDFileByBox(a,e,{width:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:P}=d.updateOrthoCamera(e,lbUtils.EPerspectiveView.Left);d.setInitCameraPosition(P);const{polygon2d:c,zoom:u}=d.getBoxSidePolygon2DCoordinate(e);d.camera.zoom=u,d.camera.updateProjectionMatrix(),d.render(),o.initPosition(),o.zoomChangeOnCenter(u),o.setResultAndSelectedID([{id:t.id,valid:e.valid,pointList:c,textAttribute:"",isRect:!0,attribute:e.attribute}],t.id)},syncBackViewByPoint=(e,t,n,a,o)=>{var d;if(!n)return;const{toolInstance:P,pointCloudInstance:c}=n;c.loadPCDFile(a,(d=o==null?void 0:o.radius)!=null?d:DEFAULT_RADIUS);const{cameraPositionVector:u}=c.updateOrthoCameraBySphere(e,lbUtils.EPerspectiveView.Back);c.setInitCameraPosition(u);const{point2d:h,zoom:v}=c.getSphereBackPoint2DCoordinate(e);c.camera.zoom=v,c.camera.updateProjectionMatrix(),c.render(),P.initPosition(),P.zoomChangeOnCenter(v),P.setResult([__spreadProps(__spreadValues(__spreadValues({},t),h),{valid:e.valid,textAttribute:"",attribute:e.attribute})]),P.setSelectedID(t.id)},synchronizeBackView=(e,t,n,a)=>{if(!n)return;const{pointCloud2dOperation:o,pointCloudInstance:d}=n;d.loadPCDFileByBox(a,e,{height:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:P}=d.updateOrthoCamera(e,lbUtils.EPerspectiveView.Back);d.setInitCameraPosition(P);const{polygon2d:c,zoom:u}=d.getBoxBackPolygon2DCoordinate(e);d.camera.zoom=u,d.camera.updateProjectionMatrix(),d.render(),o.initPosition(),o.zoomChangeOnCenter(u),o.setResultAndSelectedID([{id:t.id,valid:e.valid,pointList:c,textAttribute:"",isRect:!0,attribute:e.attribute}],t.id)},syncTopViewByPoint=(e,t,n,a)=>{if(!n||!a)return;a.generateSphere(e),a.updateCameraBySphere(e,lbUtils.EPerspectiveView.Top),a.render();const{toolInstance:o,pointCloudInstance:d}=n,{point2d:P}=d.getSphereTopPoint2DCoordinate(e),c=[...o.pointList].map(u=>u.id===t.id?__spreadProps(__spreadValues(__spreadValues({},t),P),{valid:e.valid,textAttribute:"",attribute:e.attribute}):u);o.setResult(c),o.setSelectedID(t.id)},synchronizeTopView=(e,t,n,a)=>{var o,d;if(!n||!a)return;a.generateBox(e,t.id),a.render();const{pointCloud2dOperation:P,pointCloudInstance:c}=n,{polygon2d:u}=c.getBoxTopPolygon2DCoordinate(e),h=[...P.polygonList],v=h.find(b=>b.id===t.id);v?(v.pointList=u,v.valid=(o=e.valid)!=null?o:!0):h.push({id:t.id,pointList:u,textAttribute:"",isRect:!0,valid:(d=e.valid)!=null?d:!0}),P.setResultAndSelectedID(h,t.id)},usePointCloudViews=()=>{const e=React.useContext(PointCloudContext.PointCloudContext),{topViewInstance:t,sideViewInstance:n,backViewInstance:a,mainViewInstance:o,addPointCloudBox:d,addPointCloudSphere:P,setSelectedIDs:c,selectedIDs:u,pointCloudBoxList:h,pointCloudSphereList:v,hideAttributes:b,setHighlight2DDataList:T,cuboidBoxIn2DView:V,imageSizes:_}=e,{addHistory:D,initHistory:A,pushHistoryUnderUpdatePolygon:k}=useHistory.useHistory(),{selectedPolygon:O}=usePolygon.usePolygon(),{getPointCloudSphereByID:z,updatePointCloudSphere:L,selectedSphere:q}=useSphere.useSphere(),{currentData:j,config:m}=ctx.useSelector(i=>{const{stepList:r,step:p,imgList:s,imgIndex:l}=i.annotation;return{currentData:s[l],config:index.jsonParser(StepUtils.getCurrentStepInfo(p,r).config)}}),R=ctx.useDispatch(),tt=ahooks.useLatest(V),W=i=>{if(!tt.current){const{mappingImgList:r=[]}=j,p=r.map(s=>index.getRectPointCloudBox({pointCloudBox:i,mappingData:s,imageSizes:_}));Object.assign(i,{rects:p.filter(s=>s!==void 0)})}},{selectedBox:I,updateSelectedBox:ot,updateSelectedBoxes:Z,getPointCloudByID:et}=useSingleBox.useSingleBox({generateRects:W}),{t:it}=reactI18next.useTranslation(),X=I==null?void 0:I.info;if(!t||!n||!a)return{topViewAddSphere:()=>{},topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{},backViewUpdateBox:()=>{}};const{pointCloudInstance:G}=t,nt=i=>{o==null||o.generateBox(i),o==null||o.controls.update(),o==null||o.render()},st=i=>{o==null||o.generateSphere(i),o==null||o.controls.update(),o==null||o.render()},rt=({newPoint:i,size:r,zoom:p,trackConfigurable:s})=>{var l;const C={attribute:(l=t.toolInstance.defaultAttribute)!=null?l:""};s===!0&&Object.assign(C,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:[],extraBoxList:[],extraSphereList:v})});const g=topViewPoint2PointCloud(i,r,G,void 0,C);c(i.id);const f=P(g);H(PointCloudView.Top,i,g,p,f,m),D({newSphereParams:g})},lt=({polygon:i,size:r,imgList:p,trackConfigurable:s,zoom:l,intelligentFit:C})=>{var g,f;const x={attribute:(g=t.toolInstance.defaultAttribute)!=null?g:""};s===!0&&Object.assign(x,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:[],extraBoxList:h,extraSphereList:v})});const B=t==null?void 0:t.toolInstance,w=__spreadValues({},i);let{boxParams:y,newPointList:U}=topViewPolygon2PointCloud(w,r,G,void 0,x,C);if(y=R(actionCreators.PreDataProcess({tool:lbAnnotation.EPointCloudName.PointCloud,dataList:[y],stepConfig:m,action:"viewUpdateBox"}))[0],(m==null?void 0:m.lowerLimitPointsNumInBox)&&typeof y.count=="number"&&y.count<m.lowerLimitPointsNumInBox){antd.message.info(it("LowerLimitPointsNumInBox",{num:m.lowerLimitPointsNumInBox})),B.deletePolygon(y.id);return}C&&(U==null?void 0:U.length)&&(w.pointList=U);const S=b.includes(w.attribute);W(y);const N=d(y),Q=(f=e==null?void 0:e.polygonList)!=null?f:[];t==null||t.updatePolygonList(N!=null?N:[],Q),S?c([]):(c(y.id),B.selection.setSelectedIDs(w.id),E({omitView:PointCloudView.Top,polygon:w,boxParams:y,zoom:l,newPointCloudBoxList:N}),C&&synchronizeTopView(y,w,t,o)),D({newBoxParams:y})},at=i=>{const{boxID:r,imageName:p,width:s,height:l,x:C,y:g}=i,f=h.find(x=>x.id===r);if(f==null?void 0:f.rects){const{rects:x=[]}=f,B=x.find(w=>w.imageName===p);if(B){let w=x;const y=__spreadProps(__spreadValues({},B),{width:s,height:l,x:C,y:g});w=x.map(S=>S===B?y:S);const U=__spreadProps(__spreadValues({},f),{rects:w}),M=h.map(S=>S===f?U:S);return t==null||t.updatePolygonList(M!=null?M:[]),M}}},dt=({newSelectedBox:i,newPointCloudList:r,newSelectedSphere:p,newSphereList:s})=>{var l;const C=t==null?void 0:t.toolInstance;if(!(u.length===0||!C)){if(i||(I==null?void 0:I.info)){const g=i!=null?i:I==null?void 0:I.info;(l=C==null?void 0:C.selection)==null||l.setSelectedIDs(u[0]);const f=C.selectedPolygon;if(u.length===1&&g){E({omitView:PointCloudView.Top,polygon:f,boxParams:g,newPointCloudBoxList:r});return}}if((p||q)&&u.length===1){const g=p!=null?p:q;C.setSelectedID(u[0]);const f=C.selectedPoint;g&&H(PointCloudView.Top,f,g,void 0,s,m)}}},Y=(i,r,p)=>{if(X){let s,l;switch(p){case PointCloudView.Back:s=backViewPolygon2PointCloud;break;case PointCloudView.Side:s=sideViewPolygon2PointCloud;break;default:s=sideViewPolygon2PointCloud;break}l=s(i,r,X,n.pointCloudInstance);const g=R(actionCreators.PreDataProcess({tool:lbAnnotation.EPointCloudName.PointCloud,dataList:[l],stepConfig:m,action:"viewUpdateBox"}))[0],f=l.valid!==g.valid;if(l=g,o){const{count:B}=o.getSensesPointZAxisInPolygon(lbAnnotation.getCuboidFromPointCloudBox(l).polygonPointList,[l.center.z-l.depth/2,l.center.z+l.depth/2]);l=__spreadProps(__spreadValues({},l),{count:B})}const x=ot(l);return l=x.find(B=>B.id===l.id),E({omitView:f?void 0:p,polygon:i,boxParams:l,newPointCloudBoxList:x}),x}},J=(i,r,p)=>{if(q){let s,l;switch(p){case PointCloudView.Back:s=backViewPoint2PointCloud;break;case PointCloudView.Side:s=sideViewPoint2PointCloud;break;default:s=sideViewPoint2PointCloud;break}l=s(i,r,q);const C=L(l);return H(p,i,l,void 0,C,m),C}},ct=(i,r)=>{J(i,r,PointCloudView.Side)},ut=(i,r)=>{J(i,r,PointCloudView.Back)},pt=(i,r)=>{Y(i,r,PointCloudView.Side)},Pt=(i,r)=>{Y(i,r,PointCloudView.Back)},Ct=(i,r)=>{const p=z(i.id),s=topViewPoint2PointCloud(i,r,G,p),l=L(s);H(PointCloudView.Top,i,s,void 0,l,m)},gt=(i,r)=>{if(O){const s=__spreadValues({},i[0].newPolygon);s.pointList=s.pointList.map(l=>lbUtils.PointCloudUtils.transferCanvas2World(l,r)),k(s);return}let p=i.map(({newPolygon:s})=>{const l=et(s.id),{boxParams:C}=topViewPolygon2PointCloud(s,r,t.pointCloudInstance,l);return C});if(p=R(actionCreators.PreDataProcess({tool:lbAnnotation.EPointCloudName.PointCloud,dataList:p,stepConfig:m,action:"viewUpdateBox"})),p.length===1){const{newPolygon:s}=i[0],l=Z(p);E({polygon:s,boxParams:p[0],newPointCloudBoxList:l})}else{const s=Z(p);s&&e.syncAllViewPointCloudColor(s)}},ht=i=>{var r,p,s,l,C;if(I){const g=Number(i.widthDefault),f=Number(i.depthDefault),x=Number(i.heightDefault),B=I==null?void 0:I.info.trackID,y=((r=t==null?void 0:t.toolInstance)==null?void 0:r.polygonList).find(F=>(F==null?void 0:F.trackID)===B),U={width:(s=(p=t==null?void 0:t.toolInstance)==null?void 0:p.basicImgInfo)==null?void 0:s.width,height:(C=(l=t==null?void 0:t.toolInstance)==null?void 0:l.basicImgInfo)==null?void 0:C.height},M=y.pointList.map(F=>lbUtils.PointCloudUtils.transferCanvas2World(F,U)),S=lbAnnotation.MathUtils.getModifiedRectangleCoordinates(M,x,g),N=S[0],Q=S[2],K=lbAnnotation.MathUtils.getLineCenterPoint([N,Q]),ft=I.info.center.z-I.info.depth/2,$=__spreadProps(__spreadValues({},I.info),{center:{x:K.x,y:K.y,z:ft+f/2},width:g,height:x,depth:f,valid:!0}),xt=Z([$]);E({omitView:PointCloudView["3D"],polygon:y,boxParams:$,newPointCloudBoxList:xt})}},H=(i,r,p,s,l,C)=>__async(void 0,null,function*(){const g=j==null?void 0:j.url,f={[PointCloudView.Side]:()=>{syncSideViewByPoint(p,r,n,g,C)},[PointCloudView.Back]:()=>{a&&syncBackViewByPoint(p,r,a,g,C)},[PointCloudView.Top]:()=>{syncTopViewByPoint(p,r,t,o)}};Object.keys(f).forEach(x=>{x!==i&&f[x]()}),s&&(o==null||o.updateCameraZoom(s)),st(p)}),E=i=>__async(void 0,null,function*(){const{omitView:r,polygon:p,boxParams:s,zoom:l,newPointCloudBoxList:C}=i,g=j==null?void 0:j.url;C&&(yield e.syncAllViewPointCloudColor(C));const f={[PointCloudView.Side]:()=>{synchronizeSideView(s,p,n,g)},[PointCloudView.Back]:()=>{a&&synchronizeBackView(s,p,a,g)},[PointCloudView.Top]:()=>{synchronizeTopView(s,p,t,o)}};Object.keys(f).forEach(x=>{x!==r&&f[x]()}),l&&(o==null||o.updateCameraZoom(l)),nt(s)});return{topViewAddSphere:rt,topViewAddBox:lt,topViewSelectedChanged:dt,topViewUpdatePoint:Ct,sideViewUpdatePoint:ct,backViewUpdatePoint:ut,topViewUpdateBox:gt,sideViewUpdateBox:pt,backViewUpdateBox:Pt,pointCloudBoxListUpdated:i=>{t.updatePolygonList(i),o==null||o.generateBoxes(i)},initPointCloud3d:i=>{if(!o)return;const r=lbUtils.PointCloudUtils.getDefaultOrthographicParams(i);o.initOrthographicCamera(r),o.initRenderer(),o.render()},updatePointCloudData:(...i)=>__async(void 0,[...i],function*(r=j){var p,s,l,C,g,f;if(!(r==null?void 0:r.url)||!o)return;T([]),actionCreators.SetPointCloudLoading(R,!0),actionCreators.SetLoadPCDFileLoading(R,!0),yield o.loadPCDFile(r.url,(p=m==null?void 0:m.radius)!=null?p:DEFAULT_RADIUS),o==null||o.clearAllBox(),o==null||o.clearAllSphere();let x=[],B=[],w=[],y=[];o.updateTopCamera();const U=(l=(s=index.jsonParser(r.result))==null?void 0:s.valid)!=null?l:!0;e.setPointCloudValid(U),(C=e.sideViewInstance)==null||C.clearAllData(),(g=e.backViewInstance)==null||g.clearAllData(),t.updateData(r.url,r.result,{radius:(f=m==null?void 0:m.radius)!=null?f:DEFAULT_RADIUS}),r.result&&(x=lbUtils.PointCloudUtils.getBoxParamsFromResultList(r.result),w=lbUtils.PointCloudUtils.getPolygonListFromResultList(r.result),B=lbUtils.PointCloudUtils.getLineListFromResultList(r.result),y=lbUtils.PointCloudUtils.getSphereParamsFromResultList(r.result),o==null||o.generateBoxes(x),o==null||o.generateSpheres(y),yield e.syncAllViewPointCloudColor(x,[])),A({pointCloudBoxList:x,polygonList:w,lineList:B,pointCloudSphereList:y}),actionCreators.SetPointCloudLoading(R,!1),actionCreators.SetLoadPCDFileLoading(R,!1)}),updateViewsByDefaultSize:ht,generateRects:W,update2DViewRect:at}};exports.syncBackViewByPoint=syncBackViewByPoint,exports.syncSideViewByPoint=syncSideViewByPoint,exports.syncTopViewByPoint=syncTopViewByPoint,exports.synchronizeBackView=synchronizeBackView,exports.synchronizeSideView=synchronizeSideView,exports.synchronizeTopView=synchronizeTopView,exports.topViewPoint2PointCloud=topViewPoint2PointCloud,exports.topViewPolygon2PointCloud=topViewPolygon2PointCloud,exports.usePointCloudViews=usePointCloudViews;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("../PointCloudContext.js"),useSingleBox=require("./useSingleBox.js"),useSphere=require("./useSphere.js"),ctx=require("../../../store/ctx.js"),StepUtils=require("../../../utils/StepUtils.js"),index=require("../../../utils/index.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),useHistory=require("./useHistory.js"),usePolygon=require("./usePolygon.js"),ahooks=require("ahooks"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,n)=>new Promise((a,o)=>{var d=u=>{try{c(n.next(u))}catch(f){o(f)}},P=u=>{try{c(n.throw(u))}catch(f){o(f)}},c=u=>u.done?a(u.value):Promise.resolve(u.value).then(d,P);c((n=n.apply(e,t)).next())});const DEFAULT_SCOPE=5,DEFAULT_RADIUS=90,INTELLIGENT_FIT_MARGIN=.01,PointCloudView={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},topViewPoint2PointCloud=(e,t,n,a,o)=>{const{x:d,y:P}=lbUtils.PointCloudUtils.transferCanvas2World(e,t),{defaultZ:c}=lbUtils.DEFAULT_SPHERE_PARAMS,u={center:{x:d,y:P,z:c},id:e.id},f=a?__spreadValues(__spreadValues({},a),u):__spreadProps(__spreadValues({},u),{attribute:"",valid:!0});return o&&Object.assign(f,o),f},topViewPolygon2PointCloud=(e,t,n,a,o,d)=>{let P=e.pointList.map(y=>lbUtils.PointCloudUtils.transferCanvas2World(y,t)),c=0,u=1,f={};if(n){const y=n.getSensesPointZAxisInPolygon(P,void 0,d);d&&y.fittedCoordinates.length>0&&(P=y.fittedCoordinates),c=(y.maxZ+y.minZ)/2,u=y.maxZ-y.minZ,f={count:y.zCount}}const[v,B,j]=P,_=lbAnnotation.MathUtils.getLineCenterPoint([v,j]),O=lbAnnotation.MathUtils.getLineLength(v,B),I=lbAnnotation.MathUtils.getLineLength(B,j),A=lbAnnotation.MathUtils.getRadiusFromQuadrangle(e.pointList);a&&(c=a.center.z,u=a.depth);const k={center:{x:_.x,y:_.y,z:c},width:d?I+INTELLIGENT_FIT_MARGIN:I,height:d?O+INTELLIGENT_FIT_MARGIN:O,depth:u,rotation:A,id:e.id},R=__spreadValues(a?__spreadValues(__spreadValues({},a),k):__spreadProps(__spreadValues({},k),{attribute:"",valid:!0}),f);o&&Object.assign(R,o);const z=P.map(y=>lbUtils.PointCloudUtils.transferWorld2Canvas(y,t));return{boxParams:R,newPointList:z}},sideViewPoint2PointCloud=(e,t,n)=>{const a={x:e.x-t.x,y:e.y-t.y};return __spreadProps(__spreadValues({},n),{center:{x:n.center.x-a.x,y:n.center.y,z:n.center.z-a.y}})},sideViewPolygon2PointCloud=(e,t,n,a)=>{const[o,d,P]=e.pointList,[c,u,f]=t.pointList,v=lbAnnotation.MathUtils.getLineCenterPoint([o,P]),B=lbAnnotation.MathUtils.getLineCenterPoint([c,f]),_={x:{x:v.x-B.x,y:v.y-B.y}.x,y:0,z:v.y-B.y},O=lbAnnotation.MathUtils.getLineLength(o,d),I=lbAnnotation.MathUtils.getLineLength(c,u),A=O-I,k=lbAnnotation.MathUtils.getLineLength(d,P),R=lbAnnotation.MathUtils.getLineLength(u,f),z=k-R,{newBoxParams:y}=a.getNewBoxBySideUpdate(_,z,A,n);return y},backViewPoint2PointCloud=(e,t,n)=>{const a={x:e.x-t.x,y:e.y-t.y};return __spreadProps(__spreadValues({},n),{center:{x:n.center.x,y:n.center.y-a.x,z:n.center.z-a.y}})},backViewPolygon2PointCloud=(e,t,n,a)=>{const[o,d,P]=e.pointList,[c,u,f]=t.pointList,v=lbAnnotation.MathUtils.getLineCenterPoint([o,P]),B=lbAnnotation.MathUtils.getLineCenterPoint([c,f]),_={x:{x:v.x-B.x,y:v.y-B.y}.x,y:0,z:v.y-B.y},O=lbAnnotation.MathUtils.getLineLength(o,d),I=lbAnnotation.MathUtils.getLineLength(c,u),A=O-I,k=lbAnnotation.MathUtils.getLineLength(d,P),R=lbAnnotation.MathUtils.getLineLength(u,f),z=k-R;let{newBoxParams:y}=a.getNewBoxByBackUpdate(_,z,A,n);return y},syncSideViewByPoint=(e,t,n,a,o)=>{var d;if(!n)return;const{toolInstance:P,pointCloudInstance:c}=n;c.loadPCDFile(a,(d=o==null?void 0:o.radius)!=null?d:DEFAULT_RADIUS);const{cameraPositionVector:u}=c.updateOrthoCameraBySphere(e,lbUtils.EPerspectiveView.Left);c.setInitCameraPosition(u);const{point2d:f,zoom:v}=c.getSphereSidePoint2DCoordinate(e);c.camera.zoom=v,c.camera.updateProjectionMatrix(),c.render(),P.initPosition(),P.zoomChangeOnCenter(v),P.setResult([__spreadProps(__spreadValues(__spreadValues({},t),f),{valid:e.valid,textAttribute:"",attribute:e.attribute})]),P.setSelectedID(t.id)},synchronizeSideView=(e,t,n,a)=>{if(!n)return;const{pointCloud2dOperation:o,pointCloudInstance:d}=n;d.loadPCDFileByBox(a,e,{width:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:P}=d.updateOrthoCamera(e,lbUtils.EPerspectiveView.Left);d.setInitCameraPosition(P);const{polygon2d:c,zoom:u}=d.getBoxSidePolygon2DCoordinate(e);d.camera.zoom=u,d.camera.updateProjectionMatrix(),d.render(),o.initPosition(),o.zoomChangeOnCenter(u),o.setResultAndSelectedID([{id:t.id,valid:e.valid,pointList:c,textAttribute:"",isRect:!0,attribute:e.attribute}],t.id)},syncBackViewByPoint=(e,t,n,a,o)=>{var d;if(!n)return;const{toolInstance:P,pointCloudInstance:c}=n;c.loadPCDFile(a,(d=o==null?void 0:o.radius)!=null?d:DEFAULT_RADIUS);const{cameraPositionVector:u}=c.updateOrthoCameraBySphere(e,lbUtils.EPerspectiveView.Back);c.setInitCameraPosition(u);const{point2d:f,zoom:v}=c.getSphereBackPoint2DCoordinate(e);c.camera.zoom=v,c.camera.updateProjectionMatrix(),c.render(),P.initPosition(),P.zoomChangeOnCenter(v),P.setResult([__spreadProps(__spreadValues(__spreadValues({},t),f),{valid:e.valid,textAttribute:"",attribute:e.attribute})]),P.setSelectedID(t.id)},synchronizeBackView=(e,t,n,a)=>{if(!n)return;const{pointCloud2dOperation:o,pointCloudInstance:d}=n;d.loadPCDFileByBox(a,e,{height:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:P}=d.updateOrthoCamera(e,lbUtils.EPerspectiveView.Back);d.setInitCameraPosition(P);const{polygon2d:c,zoom:u}=d.getBoxBackPolygon2DCoordinate(e);d.camera.zoom=u,d.camera.updateProjectionMatrix(),d.render(),o.initPosition(),o.zoomChangeOnCenter(u),o.setResultAndSelectedID([{id:t.id,valid:e.valid,pointList:c,textAttribute:"",isRect:!0,attribute:e.attribute}],t.id)},syncTopViewByPoint=(e,t,n,a)=>{if(!n||!a)return;a.generateSphere(e),a.updateCameraBySphere(e,lbUtils.EPerspectiveView.Top),a.render();const{toolInstance:o,pointCloudInstance:d}=n,{point2d:P}=d.getSphereTopPoint2DCoordinate(e),c=[...o.pointList].map(u=>u.id===t.id?__spreadProps(__spreadValues(__spreadValues({},t),P),{valid:e.valid,textAttribute:"",attribute:e.attribute}):u);o.setResult(c),o.setSelectedID(t.id)},synchronizeTopView=(e,t,n,a)=>{var o,d;if(!n||!a)return;a.generateBox(e,t.id),a.render();const{pointCloud2dOperation:P,pointCloudInstance:c}=n,{polygon2d:u}=c.getBoxTopPolygon2DCoordinate(e),f=[...P.polygonList],v=f.find(B=>B.id===t.id);v?(v.pointList=u,v.valid=(o=e.valid)!=null?o:!0):f.push({id:t.id,pointList:u,textAttribute:"",isRect:!0,valid:(d=e.valid)!=null?d:!0}),P.setResultAndSelectedID(f,t.id)},usePointCloudViews=()=>{const e=React.useContext(PointCloudContext.PointCloudContext),{topViewInstance:t,sideViewInstance:n,backViewInstance:a,mainViewInstance:o,addPointCloudBox:d,addPointCloudSphere:P,setSelectedIDs:c,selectedIDs:u,pointCloudBoxList:f,pointCloudSphereList:v,hideAttributes:B,setHighlight2DDataList:j,cuboidBoxIn2DView:_,imageSizes:O}=e,{addHistory:I,initHistory:A,pushHistoryUnderUpdatePolygon:k}=useHistory.useHistory(),{selectedPolygon:R}=usePolygon.usePolygon(),{getPointCloudSphereByID:z,updatePointCloudSphere:y,selectedSphere:q}=useSphere.useSphere(),{currentData:M,config:w}=ctx.useSelector(i=>{const{stepList:s,step:p,imgList:l,imgIndex:r}=i.annotation;return{currentData:l[r],config:index.jsonParser(StepUtils.getCurrentStepInfo(p,s).config)}}),T=ctx.useDispatch(),tt=ahooks.useLatest(_),W=i=>{if(!tt.current){const{mappingImgList:s=[]}=M,p=s.map(l=>index.getRectPointCloudBox({pointCloudBox:i,mappingData:l,imageSizes:O}));Object.assign(i,{rects:p.filter(l=>l!==void 0)})}},{selectedBox:S,updateSelectedBox:ot,updateSelectedBoxes:Z,getPointCloudByID:et}=useSingleBox.useSingleBox({generateRects:W}),Q=S==null?void 0:S.info;if(!t||!n||!a)return{topViewAddSphere:()=>{},topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{},backViewUpdateBox:()=>{}};const{pointCloudInstance:G}=t,it=i=>{o==null||o.generateBox(i),o==null||o.controls.update(),o==null||o.render()},nt=i=>{o==null||o.generateSphere(i),o==null||o.controls.update(),o==null||o.render()},st=({newPoint:i,size:s,zoom:p,trackConfigurable:l})=>{var r;const C={attribute:(r=t.toolInstance.defaultAttribute)!=null?r:""};l===!0&&Object.assign(C,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:[],extraBoxList:[],extraSphereList:v})});const h=topViewPoint2PointCloud(i,s,G,void 0,C);c(i.id);const x=P(h);F(PointCloudView.Top,i,h,p,x,w),I({newSphereParams:h})},lt=({polygon:i,size:s,imgList:p,trackConfigurable:l,zoom:r,intelligentFit:C})=>{var h,x;const g={attribute:(h=t.toolInstance.defaultAttribute)!=null?h:""};l===!0&&Object.assign(g,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:[],extraBoxList:f,extraSphereList:v})});const b=t==null?void 0:t.toolInstance,m=__spreadValues({},i);let{boxParams:L,newPointList:D}=topViewPolygon2PointCloud(m,s,G,void 0,g,C);L=T(actionCreators.PreDataProcess({tool:lbAnnotation.EPointCloudName.PointCloud,dataList:[L],stepConfig:w,action:"viewUpdateBox"}))[0],C&&(D==null?void 0:D.length)&&(m.pointList=D);const U=B.includes(m.attribute);W(L);const N=d(L),J=(x=e==null?void 0:e.polygonList)!=null?x:[];t==null||t.updatePolygonList(N!=null?N:[],J),U?c([]):(c(L.id),b.selection.setSelectedIDs(m.id),E({omitView:PointCloudView.Top,polygon:m,boxParams:L,zoom:r,newPointCloudBoxList:N}),C&&synchronizeTopView(L,m,t,o)),I({newBoxParams:L})},rt=i=>{const{boxID:s,imageName:p,width:l,height:r,x:C,y:h}=i,x=f.find(g=>g.id===s);if(x==null?void 0:x.rects){const{rects:g=[]}=x,b=g.find(m=>m.imageName===p);if(b){let m=g;const L=__spreadProps(__spreadValues({},b),{width:l,height:r,x:C,y:h});m=g.map(U=>U===b?L:U);const D=__spreadProps(__spreadValues({},x),{rects:m}),V=f.map(U=>U===x?D:U);return t==null||t.updatePolygonList(V!=null?V:[]),V}}},at=({newSelectedBox:i,newPointCloudList:s,newSelectedSphere:p,newSphereList:l})=>{var r;const C=t==null?void 0:t.toolInstance;if(!(u.length===0||!C)){if(i||(S==null?void 0:S.info)){const h=i!=null?i:S==null?void 0:S.info;(r=C==null?void 0:C.selection)==null||r.setSelectedIDs(u[0]);const x=C.selectedPolygon;if(u.length===1&&h){E({omitView:PointCloudView.Top,polygon:x,boxParams:h,newPointCloudBoxList:s});return}}if((p||q)&&u.length===1){const h=p!=null?p:q;C.setSelectedID(u[0]);const x=C.selectedPoint;h&&F(PointCloudView.Top,x,h,void 0,l,w)}}},X=(i,s,p)=>{if(Q){let l,r;switch(p){case PointCloudView.Back:l=backViewPolygon2PointCloud;break;case PointCloudView.Side:l=sideViewPolygon2PointCloud;break;default:l=sideViewPolygon2PointCloud;break}if(r=l(i,s,Q,n.pointCloudInstance),o){const{count:b}=o.getSensesPointZAxisInPolygon(lbAnnotation.getCuboidFromPointCloudBox(r).polygonPointList,[r.center.z-r.depth/2,r.center.z+r.depth/2]);r=__spreadProps(__spreadValues({},r),{count:b})}const h=T(actionCreators.PreDataProcess({tool:lbAnnotation.EPointCloudName.PointCloud,dataList:[r],stepConfig:w,action:"viewUpdateBox"}))[0],x=r.valid!==h.valid;r=h;const g=ot(r);return r=g.find(b=>b.id===r.id),E({omitView:x?void 0:p,polygon:i,boxParams:r,newPointCloudBoxList:g}),g}},Y=(i,s,p)=>{if(q){let l,r;switch(p){case PointCloudView.Back:l=backViewPoint2PointCloud;break;case PointCloudView.Side:l=sideViewPoint2PointCloud;break;default:l=sideViewPoint2PointCloud;break}r=l(i,s,q);const C=y(r);return F(p,i,r,void 0,C,w),C}},dt=(i,s)=>{Y(i,s,PointCloudView.Side)},ct=(i,s)=>{Y(i,s,PointCloudView.Back)},ut=(i,s)=>{X(i,s,PointCloudView.Side)},pt=(i,s)=>{X(i,s,PointCloudView.Back)},Pt=(i,s)=>{const p=z(i.id),l=topViewPoint2PointCloud(i,s,G,p),r=y(l);F(PointCloudView.Top,i,l,void 0,r,w)},Ct=(i,s)=>{if(R){const l=__spreadValues({},i[0].newPolygon);l.pointList=l.pointList.map(r=>lbUtils.PointCloudUtils.transferCanvas2World(r,s)),k(l);return}let p=i.map(({newPolygon:l})=>{const r=et(l.id),{boxParams:C}=topViewPolygon2PointCloud(l,s,t.pointCloudInstance,r);return C});if(p=T(actionCreators.PreDataProcess({tool:lbAnnotation.EPointCloudName.PointCloud,dataList:p,stepConfig:w,action:"viewUpdateBox"})),p.length===1){const{newPolygon:l}=i[0],r=Z(p);E({polygon:l,boxParams:p[0],newPointCloudBoxList:r})}else{const l=Z(p);l&&e.syncAllViewPointCloudColor(l)}},gt=i=>{var s,p,l,r,C;if(S){const h=Number(i.widthDefault),x=Number(i.depthDefault),g=Number(i.heightDefault),b=S==null?void 0:S.info.trackID,L=((s=t==null?void 0:t.toolInstance)==null?void 0:s.polygonList).find(H=>(H==null?void 0:H.trackID)===b),D={width:(l=(p=t==null?void 0:t.toolInstance)==null?void 0:p.basicImgInfo)==null?void 0:l.width,height:(C=(r=t==null?void 0:t.toolInstance)==null?void 0:r.basicImgInfo)==null?void 0:C.height},V=L.pointList.map(H=>lbUtils.PointCloudUtils.transferCanvas2World(H,D)),U=lbAnnotation.MathUtils.getModifiedRectangleCoordinates(V,g,h),N=U[0],J=U[2],K=lbAnnotation.MathUtils.getLineCenterPoint([N,J]),ht=S.info.center.z-S.info.depth/2,$=__spreadProps(__spreadValues({},S.info),{center:{x:K.x,y:K.y,z:ht+x/2},width:h,height:g,depth:x,valid:!0}),ft=Z([$]);E({omitView:PointCloudView["3D"],polygon:L,boxParams:$,newPointCloudBoxList:ft})}},F=(i,s,p,l,r,C)=>__async(void 0,null,function*(){const h=M==null?void 0:M.url,x={[PointCloudView.Side]:()=>{syncSideViewByPoint(p,s,n,h,C)},[PointCloudView.Back]:()=>{a&&syncBackViewByPoint(p,s,a,h,C)},[PointCloudView.Top]:()=>{syncTopViewByPoint(p,s,t,o)}};Object.keys(x).forEach(g=>{g!==i&&x[g]()}),l&&(o==null||o.updateCameraZoom(l)),nt(p)}),E=i=>__async(void 0,null,function*(){const{omitView:s,polygon:p,boxParams:l,zoom:r,newPointCloudBoxList:C}=i,h=M==null?void 0:M.url;C&&(yield e.syncAllViewPointCloudColor(C));const x={[PointCloudView.Side]:()=>{synchronizeSideView(l,p,n,h)},[PointCloudView.Back]:()=>{a&&synchronizeBackView(l,p,a,h)},[PointCloudView.Top]:()=>{synchronizeTopView(l,p,t,o)}};Object.keys(x).forEach(g=>{g!==s&&x[g]()}),r&&(o==null||o.updateCameraZoom(r)),it(l)});return{topViewAddSphere:st,topViewAddBox:lt,topViewSelectedChanged:at,topViewUpdatePoint:Pt,sideViewUpdatePoint:dt,backViewUpdatePoint:ct,topViewUpdateBox:Ct,sideViewUpdateBox:ut,backViewUpdateBox:pt,pointCloudBoxListUpdated:i=>{t.updatePolygonList(i),o==null||o.generateBoxes(i)},initPointCloud3d:i=>{if(!o)return;const s=lbUtils.PointCloudUtils.getDefaultOrthographicParams(i);o.initOrthographicCamera(s),o.initRenderer(),o.render()},updatePointCloudData:(...i)=>__async(void 0,[...i],function*(s=M){var p,l,r,C,h,x;if(!(s==null?void 0:s.url)||!o)return;j([]),actionCreators.SetPointCloudLoading(T,!0),actionCreators.SetLoadPCDFileLoading(T,!0),yield o.loadPCDFile(s.url,(p=w==null?void 0:w.radius)!=null?p:DEFAULT_RADIUS),o==null||o.clearAllBox(),o==null||o.clearAllSphere();let g=[],b=[],m=[],L=[];o.updateTopCamera();const D=(r=(l=index.jsonParser(s.result))==null?void 0:l.valid)!=null?r:!0;if(e.setPointCloudValid(D),(C=e.sideViewInstance)==null||C.clearAllData(),(h=e.backViewInstance)==null||h.clearAllData(),s.result){if(g=lbUtils.PointCloudUtils.getBoxParamsFromResultList(s.result),(g==null?void 0:g.length)>0&&s.isPreResult&&(w==null?void 0:w.lowerLimitPointsNumInBox)>0){g=yield o==null?void 0:o.filterPreResult(s.url,w,g);const V=index.jsonParser(s.result);V[lbUtils.POINT_CLOUD_DEFAULT_STEP].result=g,s.result=JSON.stringify(V),e.setPointCloudResult(g)}m=lbUtils.PointCloudUtils.getPolygonListFromResultList(s.result),b=lbUtils.PointCloudUtils.getLineListFromResultList(s.result),L=lbUtils.PointCloudUtils.getSphereParamsFromResultList(s.result),t.updateData(s.url,s.result,{radius:(x=w==null?void 0:w.radius)!=null?x:DEFAULT_RADIUS}),o==null||o.generateBoxes(g),o==null||o.generateSpheres(L),yield e.syncAllViewPointCloudColor(g,[])}A({pointCloudBoxList:g,polygonList:m,lineList:b,pointCloudSphereList:L}),actionCreators.SetPointCloudLoading(T,!1),actionCreators.SetLoadPCDFileLoading(T,!1)}),updateViewsByDefaultSize:gt,generateRects:W,update2DViewRect:rt}};exports.syncBackViewByPoint=syncBackViewByPoint,exports.syncSideViewByPoint=syncSideViewByPoint,exports.syncTopViewByPoint=syncTopViewByPoint,exports.synchronizeBackView=synchronizeBackView,exports.synchronizeSideView=synchronizeSideView,exports.synchronizeTopView=synchronizeTopView,exports.topViewPoint2PointCloud=topViewPoint2PointCloud,exports.topViewPolygon2PointCloud=topViewPolygon2PointCloud,exports.usePointCloudViews=usePointCloudViews;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var icons=require("@ant-design/icons"),React=require("react"),index_module=require("./index.module.scss.js"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const EKeyCode=lbAnnotation.cKeyCode.default,VIDEO_PLAYBACK_RATE_SPEED=[.5,1,1.5,2,4,6,8,16],AUDIO_PLAYBACK_RATE_SPEED=[.5,.75,1,1.25,1.5,1.75,2];exports.EPlayerType=void 0,function(e){e[e.Video=0]="Video",e[e.Audio=1]="Audio"}(exports.EPlayerType||(exports.EPlayerType={}));var ESpeedChange;(function(e){e[e.Increase=0]="Increase",e[e.Reduce=1]="Reduce"})(ESpeedChange||(ESpeedChange={}));const PLAYER_TYPE_RATE_SPEED={[0]:VIDEO_PLAYBACK_RATE_SPEED,[1]:AUDIO_PLAYBACK_RATE_SPEED},SpeedController=e=>{const{onChange:c,playerType:i}=e,n=PLAYER_TYPE_RATE_SPEED[i],d=n.slice(-1)[0],u=n[0],[o,E]=React.useState(1),r=t=>{const a=t===0?1:-1;if(a===1&&o===d||a===-1&&o===u)return;const _=n.findIndex(A=>A===o)+a,l=n[_];E(l),c(l)},s=t=>{!lbAnnotation.CommonToolUtils.hotkeyFilter(t)||(t.keyCode===EKeyCode.Up&&r(0),t.keyCode===EKeyCode.Down&&r(1))};return React.useEffect(()=>(window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s))),React__default.default.createElement("div",{className:index_module.speedControllerWrap},React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},React__default.default.createElement("span",{style:{fontSize:12}},"\u500D\u901F"),o,"x"),React__default.default.createElement("span",{className:index_module.speedController},React__default.default.createElement(icons.CaretUpOutlined,{onClick:()=>r(0)}),React__default.default.createElement(icons.CaretDownOutlined,{onClick:()=>r(1)})))};exports.AUDIO_PLAYBACK_RATE_SPEED=AUDIO_PLAYBACK_RATE_SPEED,exports.PLAYER_TYPE_RATE_SPEED=PLAYER_TYPE_RATE_SPEED,exports.VIDEO_PLAYBACK_RATE_SPEED=VIDEO_PLAYBACK_RATE_SPEED,exports.default=SpeedController;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var icons=require("@ant-design/icons"),React=require("react"),index_module=require("./index.module.scss.js"),lbAnnotation=require("@labelbee/lb-annotation"),reactI18next=require("react-i18next");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const EKeyCode=lbAnnotation.cKeyCode.default,VIDEO_PLAYBACK_RATE_SPEED=[.5,1,1.5,2,4,6,8,16],AUDIO_PLAYBACK_RATE_SPEED=[.5,.75,1,1.25,1.5,1.75,2];exports.EPlayerType=void 0,function(e){e[e.Video=0]="Video",e[e.Audio=1]="Audio"}(exports.EPlayerType||(exports.EPlayerType={}));var ESpeedChange;(function(e){e[e.Increase=0]="Increase",e[e.Reduce=1]="Reduce"})(ESpeedChange||(ESpeedChange={}));const PLAYER_TYPE_RATE_SPEED={[0]:VIDEO_PLAYBACK_RATE_SPEED,[1]:AUDIO_PLAYBACK_RATE_SPEED},SpeedController=e=>{const{onChange:l,playerType:i}=e,{t:d}=reactI18next.useTranslation(),n=PLAYER_TYPE_RATE_SPEED[i],u=n.slice(-1)[0],E=n[0],[o,_]=React.useState(1),r=t=>{const a=t===0?1:-1;if(a===1&&o===u||a===-1&&o===E)return;const A=n.findIndex(f=>f===o)+a,c=n[A];_(c),l(c)},s=t=>{!lbAnnotation.CommonToolUtils.hotkeyFilter(t)||(t.keyCode===EKeyCode.Up&&r(0),t.keyCode===EKeyCode.Down&&r(1))};return React.useEffect(()=>(window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s))),React__default.default.createElement("div",{className:index_module.speedControllerWrap},React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},React__default.default.createElement("span",{style:{fontSize:12}},d("Speed")),o,"x"),React__default.default.createElement("span",{className:index_module.speedController},React__default.default.createElement(icons.CaretUpOutlined,{onClick:()=>r(0)}),React__default.default.createElement(icons.CaretDownOutlined,{onClick:()=>r(1)})))};exports.AUDIO_PLAYBACK_RATE_SPEED=AUDIO_PLAYBACK_RATE_SPEED,exports.PLAYER_TYPE_RATE_SPEED=PLAYER_TYPE_RATE_SPEED,exports.VIDEO_PLAYBACK_RATE_SPEED=VIDEO_PLAYBACK_RATE_SPEED,exports.default=SpeedController;
package/dist/index.css CHANGED
@@ -24,6 +24,79 @@
24
24
  .index-module_imgView__wmxDk .index-module_item__-80YI .index-module_image__V49oW .ant-image {
25
25
  display: flex;
26
26
  }
27
+ .index-module_latexEditor__0fK8G {
28
+ line-height: 32px;
29
+ background-color: #ededed;
30
+ border-radius: 2px;
31
+ position: relative;
32
+ }
33
+
34
+ .index-module_latexHeaderTitle__JIpOj {
35
+ cursor: pointer;
36
+ padding: 0px 12px;
37
+ display: inline-block;
38
+ }
39
+
40
+ .index-module_dropContent__XVBYH {
41
+ display: flex;
42
+ box-shadow: 0px 2px 14px 2px rgba(204, 204, 204, 0.5);
43
+ min-width: 400px;
44
+ overflow: auto;
45
+ min-height: 300px;
46
+ max-height: 600px;
47
+ background: #fff;
48
+ }
49
+
50
+ .index-module_itemList__Y3q0e {
51
+ height: 100%;
52
+ border-right: 1px solid #eee;
53
+ }
54
+ .index-module_itemList__Y3q0e .index-module_item__q4v2V {
55
+ padding: 6px 12px;
56
+ cursor: pointer;
57
+ display: flex;
58
+ justify-content: space-between;
59
+ }
60
+
61
+ .index-module_itemActive__a5EPl {
62
+ background: #e6f7ff;
63
+ font-weight: 700;
64
+ }
65
+
66
+ .index-module_lastNode__TXbWG {
67
+ width: 380px;
68
+ display: flex;
69
+ padding: 4px;
70
+ flex-wrap: wrap;
71
+ }
72
+ .index-module_lastNode__TXbWG .index-module_markdownItem__AkW22 {
73
+ padding: 2px 4px;
74
+ margin: 4px;
75
+ min-width: 40px;
76
+ height: auto;
77
+ background-color: #ebebeb;
78
+ }
79
+ .index-module_lastNode__TXbWG .index-module_markdownItem__AkW22 .markdown-body {
80
+ background-color: #ebebeb;
81
+ }
82
+ .index-module_form__IypXc {
83
+ margin-bottom: 16px;
84
+ }
85
+
86
+ .index-module_outputDisplay__5dS48 .index-module_title__vhMCp {
87
+ line-height: 32px;
88
+ margin-bottom: 8px;
89
+ }
90
+ .index-module_outputDisplay__5dS48 .index-module_content__Iml6l {
91
+ min-height: 100px;
92
+ overflow: auto;
93
+ max-height: 200px;
94
+ background-color: #ffffff;
95
+ padding: 4px 12px;
96
+ }
97
+ .index-module_outputDisplay__5dS48 .index-module_content__Iml6l .markdown-body {
98
+ font-size: 14px;
99
+ }
27
100
  .index-module_speedControllerWrap__aFz7r {
28
101
  display: flex;
29
102
  color: white;
@@ -1040,6 +1113,10 @@
1040
1113
  .bee-sidebar .sensebee-radio-group-no-limit-height .ant-radio-group .ant-radio-wrapper:hover {
1041
1114
  background: #f3f4ff;
1042
1115
  }
1116
+ .bee-sidebar .sensebee-radio-group .ant-radio-wrapper:hover .sensebee-radio-icon,
1117
+ .bee-sidebar .sensebee-radio-group-no-limit-height .ant-radio-group .ant-radio-wrapper:hover .sensebee-radio-icon {
1118
+ display: inline-block;
1119
+ }
1043
1120
  .bee-sidebar .sensebee-radio-group .ant-radio-wrapper > span:nth-child(2),
1044
1121
  .bee-sidebar .sensebee-radio-group-no-limit-height .ant-radio-group .ant-radio-wrapper > span:nth-child(2) {
1045
1122
  flex: 1;
@@ -1064,6 +1141,11 @@
1064
1141
  overflow: hidden;
1065
1142
  text-overflow: ellipsis;
1066
1143
  }
1144
+ .bee-sidebar .sensebee-radio-group .ant-radio-wrapper .sensebee-radio-icon,
1145
+ .bee-sidebar .sensebee-radio-group-no-limit-height .ant-radio-group .ant-radio-wrapper .sensebee-radio-icon {
1146
+ margin-right: 10px;
1147
+ display: none;
1148
+ }
1067
1149
  .bee-sidebar #pen-color .ant-slider .ant-slider-track,
1068
1150
  .bee-sidebar #paintBucket-color .ant-slider .ant-slider-track,
1069
1151
  .bee-sidebar #style-radius .ant-slider .ant-slider-track,
@@ -1231,7 +1313,7 @@
1231
1313
  width: 12px;
1232
1314
  margin: 0px 10px;
1233
1315
  }
1234
- .bee-sidebar .bee-scribble__silder {
1316
+ .bee-sidebar .bee-scribble__slider {
1235
1317
  display: flex;
1236
1318
  align-items: center;
1237
1319
  justify-content: center;
@@ -2445,6 +2527,8 @@
2445
2527
  font-weight: 500;
2446
2528
  font-size: 18px;
2447
2529
  margin-bottom: 24px;
2530
+ display: flex;
2531
+ align-items: center;
2448
2532
  }
2449
2533
  .bee-LLMView__content {
2450
2534
  font-weight: 500;
@@ -2695,4 +2779,12 @@
2695
2779
  bottom: 0;
2696
2780
  right: 0;
2697
2781
  z-index: -200;
2782
+ }
2783
+
2784
+ .bee-audio-clip {
2785
+ cursor: url("../dist/assets/icons/32b52174.svg"), default;
2786
+ }
2787
+
2788
+ .bee-audio-combined {
2789
+ cursor: url("../dist/assets/icons/ad8081bf.svg") 10 12, default;
2698
2790
  }
@@ -62,6 +62,7 @@ export interface ITextList {
62
62
  value?: string;
63
63
  isFillAnswer?: boolean;
64
64
  textControl?: boolean;
65
+ isLaText?: boolean;
65
66
  }
66
67
  export interface IWaitAnswerSort {
67
68
  title: number;
@@ -1,4 +1,4 @@
1
- import React, { Component } from 'react';
1
+ import React from 'react';
2
2
  import { IEntityDetail } from '@/types/tool';
3
3
  export declare const highlightKeyword: (str: string, keyword: string, color: string) => string | React.JSX.Element;
4
4
  interface ILabelInfo {
@@ -14,11 +14,6 @@ interface IFilteredLabelInfo extends ILabelInfo {
14
14
  show: boolean;
15
15
  showLabel: string | React.ReactElement;
16
16
  }
17
- interface IState {
18
- hoverDeleteIndex: number;
19
- expandKeyList: string[];
20
- inputValue: string;
21
- }
22
17
  interface IProps {
23
18
  labelInfoSet: ILabelInfo[];
24
19
  labelSelectedList: number[];
@@ -31,19 +26,7 @@ interface IProps {
31
26
  entityMap?: Map<string, IEntityDetail>;
32
27
  dynamicTag?: boolean;
33
28
  withPanelTab?: boolean;
29
+ t: any;
34
30
  }
35
- export default class LabelSidebar extends Component<IProps, IState> {
36
- private sideBar;
37
- constructor(props: IProps);
38
- updateScrollTop: (childIndex: number) => void;
39
- shouldComponentUpdate(newProps: any, newState: IState): boolean;
40
- /**
41
- * 设置展开操作
42
- *
43
- * @memberof LabelSidebar
44
- */
45
- setExpendKeyList: (expandKeyList: string[], index: number, value: string, expend?: boolean) => void;
46
- setInputValue: (e: React.ChangeEvent<HTMLInputElement>) => void;
47
- render(): React.JSX.Element;
48
- }
49
- export {};
31
+ declare const LabelSidebarWithTrans: React.ComponentType<Omit<import("react-i18next").Subtract<IProps, import("react-i18next").WithTranslationProps>, keyof import("react-i18next").WithTranslation<N, undefined>> & import("react-i18next").WithTranslationProps>;
32
+ export default LabelSidebarWithTrans;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @file Latex config
3
+ * Markdown renders introverted formulas by default('\\textstyle').
4
+ * If special formulas need to be displayed up and down, you need to add '\\displaystyle'
5
+ * @author lixinghua <lixinghua_vendor@sensetime.com>
6
+ * @date 2023-11-28
7
+ */
8
+ export declare const latexList: {
9
+ key: string;
10
+ label: string;
11
+ children: {
12
+ key: string;
13
+ label: string;
14
+ children: {
15
+ key: string;
16
+ }[];
17
+ }[];
18
+ }[];
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @file LatexEditor
3
+ * @author lixinghua <lixinghua_vendor@sensetime.com>
4
+ * @date 2023.11.28
5
+ */
6
+ import React from 'react';
7
+ interface IProps {
8
+ onSelectLatex: (value: string) => void;
9
+ disabled?: boolean;
10
+ }
11
+ declare const LatexEditor: ({ onSelectLatex, disabled }: IProps) => React.JSX.Element;
12
+ export default LatexEditor;
@@ -4,9 +4,9 @@ export interface ICustomToolInstance {
4
4
  valid: boolean;
5
5
  exportData: () => [any, {}];
6
6
  exportCustomData: () => {};
7
- singleOn: () => void;
7
+ singleOn: (eventName: string, callback: (...args: any[]) => void) => void;
8
8
  clearResult: () => void;
9
- on: () => void;
9
+ on: (eventName: string, callback: (...args: any[]) => void) => void;
10
10
  unbind: () => void;
11
11
  setResult: (result: any) => void;
12
12
  setValid: (valid: boolean) => void;
@@ -1,3 +1,28 @@
1
+ export declare const scribbleImg: {
2
+ name: string;
3
+ icon: any;
4
+ shortCut: string[];
5
+ };
6
+ export declare const eraseImg: {
7
+ name: string;
8
+ icon: any;
9
+ shortCut: string[];
10
+ };
11
+ export declare const scribbleLine: {
12
+ name: string;
13
+ icon: any;
14
+ shortCut: any[];
15
+ };
16
+ export declare const strokeEnlarge: {
17
+ name: string;
18
+ icon: any;
19
+ shortCut: string[];
20
+ };
21
+ export declare const strokeReduction: {
22
+ name: string;
23
+ icon: any;
24
+ shortCut: string[];
25
+ };
1
26
  declare const scribbleShortCutTable: {
2
27
  name: string;
3
28
  icon: any;
@@ -1 +1 @@
1
- "use strict";var index$6=require("../../components/customResizeHook/index.js"),index$4=require("../../constant/index.js"),antd=require("antd"),es=require("antd/es"),React=require("react"),index$a=require("./annotationOperation/index.js"),index$9=require("./annotationTips/index.js"),index$3=require("./sidebar/index.js"),index$b=require("./toolFooter/index.js"),index$8=require("./toolHeader/index.js"),reducer=require("../../store/annotation/reducer.js"),index$5=require("../../components/videoAnnotate/index.js"),reactRedux=require("react-redux"),ToolUtils=require("../../utils/ToolUtils.js"),index$c=require("../../components/pointCloudView/index.js"),dom=require("../../utils/dom.js"),index$7=require("../../utils/index.js"),index$2=require("../../components/predictTracking/previewResult/index.js"),ctx=require("../../store/ctx.js"),ToolType=require("../../data/enums/ToolType.js"),index=require("./LLMLayout/index.js"),index$1=require("../../components/audioAnnotate/index.js"),icons=require("@ant-design/icons"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e};const{Sider,Content}=es.Layout,layoutCls=`${index$4.prefix}-layout`,ImageAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,e.showTips===!0&&React__default.default.createElement(index$9,{path:e.path,tips:e.tips}),React__default.default.createElement(index$a,__spreadValues({},e)),React__default.default.createElement(index$b.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},PointCloudAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(index$c,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit}),React__default.default.createElement(index$b.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},AnnotatedArea=e=>{var t;const{stepList:n,step:l}=e,r=(t=reducer.getStepConfig(n,l))==null?void 0:t.tool,i=ToolUtils.isVideoTool(r),a=ToolUtils.isPointCloudTool(r);return i?React__default.default.createElement(index$5,__spreadValues({},e)):a?React__default.default.createElement(PointCloudAnnotate,__spreadValues({},e)):React__default.default.createElement(ImageAnnotate,__spreadValues({},e))},ViewportProviderLayout=e=>{var t,n,l;const{t:r}=reactI18next.useTranslation(),{stepList:i,step:a}=e,o=(t=reducer.getStepConfig(i,a))==null?void 0:t.tool,d=![ToolType.EToolName.LLM,lbAnnotation.EAudioToolName.AudioTextTool].includes(o),u=![ToolType.EToolName.LLM].includes(o),c=[lbAnnotation.EPointCloudName.PointCloud].includes(o);return React__default.default.createElement(index$6.ViewportProvider,null,React__default.default.createElement(antd.Spin,{spinning:e.loading,indicator:React__default.default.createElement(icons.LoadingOutlined,null),tip:React__default.default.createElement("span",{style:{marginTop:200}},r("LoadingTips")),delay:500},React__default.default.createElement(es.Layout,{className:index$7.classnames([layoutCls,e.className]),style:(n=e.style)==null?void 0:n.layout},React__default.default.createElement("header",{className:`${layoutCls}__header`,style:(l=e.style)==null?void 0:l.header},React__default.default.createElement(index$8,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:d,hasHeaderOption:u,hasPredictTrackingIcon:c})),e.children)))},MainView=e=>{var t,n,l,r,i,a,o;const[d,u]=React.useState(void 0),c=(n=(t=e.style)==null?void 0:t.sider)==null?void 0:n.width,{stepList:m,step:f}=e,s=(l=reducer.getStepConfig(m,f))==null?void 0:l.tool,v=ToolType.EToolName.LLM===s,x=ToolUtils.isAudioTool(s);return v?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index,__spreadValues({},e))):x?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$1,__spreadValues({},e))):React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:`${layoutCls}__content`},React__default.default.createElement(AnnotatedArea,__spreadValues({},e)),React__default.default.createElement(index$2,null)),React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:(r=d!=null?d:c)!=null?r:240,style:(i=e.style)==null?void 0:i.sider},React__default.default.createElement(index$3.default,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:u,propsSiderWidth:(o=(a=e.style)==null?void 0:a.sider)==null?void 0:o.width}))))},mapStateToProps=({annotation:e})=>{var t,n,l;const{imgList:r,loading:i}=e,a=(t=r[e.imgIndex])!=null?t:{};return{path:(l=(n=a==null?void 0:a.path)!=null?n:a==null?void 0:a.url)!=null?l:"",loading:i}};var MainView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(MainView);module.exports=MainView$1;
1
+ "use strict";var index$6=require("../../components/customResizeHook/index.js"),index$4=require("../../constant/index.js"),antd=require("antd"),es=require("antd/es"),React=require("react"),index$a=require("./annotationOperation/index.js"),index$9=require("./annotationTips/index.js"),index$3=require("./sidebar/index.js"),index$b=require("./toolFooter/index.js"),index$8=require("./toolHeader/index.js"),reducer=require("../../store/annotation/reducer.js"),index$5=require("../../components/videoAnnotate/index.js"),reactRedux=require("react-redux"),ToolUtils=require("../../utils/ToolUtils.js"),index$c=require("../../components/pointCloudView/index.js"),dom=require("../../utils/dom.js"),index$7=require("../../utils/index.js"),index$2=require("../../components/predictTracking/previewResult/index.js"),ctx=require("../../store/ctx.js"),ToolType=require("../../data/enums/ToolType.js"),index=require("./LLMLayout/index.js"),index$1=require("../../components/audioAnnotate/index.js"),icons=require("@ant-design/icons"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e};const{Sider,Content}=es.Layout,layoutCls=`${index$4.prefix}-layout`,ImageAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,e.showTips===!0&&React__default.default.createElement(index$9,{path:e.path,tips:e.tips}),React__default.default.createElement(index$a,__spreadValues({},e)),React__default.default.createElement(index$b.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},PointCloudAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(index$c,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit}),React__default.default.createElement(index$b.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},AnnotatedArea=e=>{var t;const{stepList:n,step:l}=e,r=(t=reducer.getStepConfig(n,l))==null?void 0:t.tool,i=ToolUtils.isVideoTool(r),a=ToolUtils.isPointCloudTool(r);return i?React__default.default.createElement(index$5,__spreadValues({},e)):a?React__default.default.createElement(PointCloudAnnotate,__spreadValues({},e)):React__default.default.createElement(ImageAnnotate,__spreadValues({},e))},ViewportProviderLayout=e=>{var t,n,l;const{t:r}=reactI18next.useTranslation(),{stepList:i,step:a}=e,o=(t=reducer.getStepConfig(i,a))==null?void 0:t.tool,d=![ToolType.EToolName.LLM].includes(o),u=![ToolType.EToolName.LLM].includes(o),c=[lbAnnotation.EPointCloudName.PointCloud].includes(o);return React__default.default.createElement(index$6.ViewportProvider,null,React__default.default.createElement(antd.Spin,{spinning:e.loading,indicator:React__default.default.createElement(icons.LoadingOutlined,null),tip:React__default.default.createElement("span",{style:{marginTop:200}},r("LoadingTips")),delay:500},React__default.default.createElement(es.Layout,{className:index$7.classnames([layoutCls,e.className]),style:(n=e.style)==null?void 0:n.layout},React__default.default.createElement("header",{className:`${layoutCls}__header`,style:(l=e.style)==null?void 0:l.header},React__default.default.createElement(index$8,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:d,hasHeaderOption:u,hasPredictTrackingIcon:c})),e.children)))},MainView=e=>{var t,n,l,r,i,a,o;const[d,u]=React.useState(void 0),c=(n=(t=e.style)==null?void 0:t.sider)==null?void 0:n.width,{stepList:m,step:f}=e,s=(l=reducer.getStepConfig(m,f))==null?void 0:l.tool,v=ToolType.EToolName.LLM===s,x=ToolUtils.isAudioTool(s);return v?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index,__spreadValues({},e))):x?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$1,__spreadValues({},e))):React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:`${layoutCls}__content`},React__default.default.createElement(AnnotatedArea,__spreadValues({},e)),React__default.default.createElement(index$2,null)),React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:(r=d!=null?d:c)!=null?r:240,style:(i=e.style)==null?void 0:i.sider},React__default.default.createElement(index$3.default,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:u,propsSiderWidth:(o=(a=e.style)==null?void 0:a.sider)==null?void 0:o.width}))))},mapStateToProps=({annotation:e})=>{var t,n,l;const{imgList:r,loading:i}=e,a=(t=r[e.imgIndex])!=null?t:{};return{path:(l=(n=a==null?void 0:a.path)!=null?n:a==null?void 0:a.url)!=null?l:"",loading:i}};var MainView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(MainView);module.exports=MainView$1;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),antd=require("antd"),pen_a=require("../../../../assets/attributeIcon/pen_a.svg.js"),pen=require("../../../../assets/attributeIcon/pen.svg.js"),eraser_a=require("../../../../assets/attributeIcon/eraser_a.svg.js"),eraser=require("../../../../assets/attributeIcon/eraser.svg.js"),dom=require("../../../../utils/dom.js"),ToolType=require("../../../../data/enums/ToolType.js"),ctx=require("../../../../store/ctx.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const ScribbleSidebar=e=>{const{onChange:n}=e,t=ctx.useSelector(a=>a.annotation.toolInstance),[l,i]=React.useState(20),[r,c]=React.useState(ToolType.EScribblePattern.Scribble),s=()=>{n(r,l)};return React__default.default.createElement("div",{className:dom.getClassName("scribble")},React__default.default.createElement("div",{className:dom.getClassName("scribble","select")},React__default.default.createElement("img",{src:r===ToolType.EScribblePattern.Scribble?pen_a:pen,onClick:()=>{c(ToolType.EScribblePattern.Scribble),t==null||t.setPattern(ToolType.EScribblePattern.Scribble),s()}}),React__default.default.createElement("img",{src:r===ToolType.EScribblePattern.Erase?eraser_a:eraser,onClick:()=>{c(ToolType.EScribblePattern.Erase),t==null||t.setPattern(ToolType.EScribblePattern.Erase),s()}})),React__default.default.createElement("div",{className:dom.getClassName("scribble","silder")},React__default.default.createElement("span",{className:dom.getClassName("scribble","circle")}),React__default.default.createElement(antd.Slider,{onChange:a=>{i(a),s(),t==null||t.setPenSize(a)},min:1,max:50,style:{width:"60%"},value:l}),React__default.default.createElement("span",{className:dom.getClassName("scribble","circle"),style:{width:"10px",height:"10px"}})))};module.exports=ScribbleSidebar;
1
+ "use strict";var React=require("react"),antd=require("antd"),pen_a=require("../../../../assets/attributeIcon/pen_a.svg.js"),pen=require("../../../../assets/attributeIcon/pen.svg.js"),eraser_a=require("../../../../assets/attributeIcon/eraser_a.svg.js"),eraser=require("../../../../assets/attributeIcon/eraser.svg.js"),dom=require("../../../../utils/dom.js"),ToolType=require("../../../../data/enums/ToolType.js"),ctx=require("../../../../store/ctx.js"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var React__default=_interopDefaultLegacy(React);const EKeyCode=lbAnnotation.cKeyCode.default,SLIDER_MIN_SIZE=1,SLIDER_MAX_SIZE=50,DEFAULT_SLIDER_SIZE=20,ScribbleSidebar=r=>{const{onChange:o}=r,a=ctx.useSelector(t=>t.annotation.toolInstance),[e,l]=React.useState(DEFAULT_SLIDER_SIZE),[c,u]=React.useState(ToolType.EScribblePattern.Scribble),s=()=>{o(c,e)};React.useEffect(()=>(window.addEventListener("keydown",i),()=>{window.removeEventListener("keydown",i)}),[e]);const i=t=>{const{keyCode:S}=t;switch(S){case EKeyCode.Q:n(ToolType.EScribblePattern.Scribble);break;case EKeyCode.W:n(ToolType.EScribblePattern.Erase);break;case EKeyCode.F:b();break;case EKeyCode.G:d();break}},b=()=>{e!==SLIDER_MAX_SIZE&&(l(e+1),s(),a==null||a.setPenSize(e+1))},d=()=>{e!==SLIDER_MIN_SIZE&&(l(e-1),s(),a==null||a.setPenSize(e-1))},n=t=>{u(t),a==null||a.setPattern(t),s()};return React__default.default.createElement("div",{className:dom.getClassName("scribble")},React__default.default.createElement("div",{className:dom.getClassName("scribble","select")},React__default.default.createElement("img",{src:c===ToolType.EScribblePattern.Scribble?pen_a:pen,onClick:()=>n(ToolType.EScribblePattern.Scribble)}),React__default.default.createElement("img",{src:c===ToolType.EScribblePattern.Erase?eraser_a:eraser,onClick:()=>n(ToolType.EScribblePattern.Erase)})),React__default.default.createElement("div",{className:dom.getClassName("scribble","slider")},React__default.default.createElement("span",{className:dom.getClassName("scribble","circle")}),React__default.default.createElement(antd.Slider,{onChange:t=>{l(t),s(),a==null||a.setPenSize(t)},min:SLIDER_MIN_SIZE,max:SLIDER_MAX_SIZE,style:{width:"60%"},value:e}),React__default.default.createElement("span",{className:dom.getClassName("scribble","circle"),style:{width:"10px",height:"10px"}})))};module.exports=ScribbleSidebar;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _=require("lodash"),index=require("../common/index.js"),index$1=require("../line/index.js"),icon_polygonMerge_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js"),icon_polygonCut_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonCut_kj.svg.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_);const audioForward=___default.default.cloneDeep(index.forward),audioBackward=___default.default.cloneDeep(index.backward),audioBackTrack=___default.default.cloneDeep(index.rewind),audioForwardTrack=___default.default.cloneDeep(index.forwardForward),audioPlaybackRate=___default.default.cloneDeep(index.speed),audioTag=___default.default.cloneDeep(index.tag),audioToggleTagMode=___default.default.cloneDeep(index.toggleTagMode),audioToggleClipMode=___default.default.cloneDeep(index.period),audioClipped=___default.default.cloneDeep(index.tag),audioClipSelected=___default.default.cloneDeep(index.clipSelected),audioPrev=___default.default.cloneDeep(index$1.preLine),audioNext=___default.default.cloneDeep(index$1.nextLine),combineAudio={name:"\u5408\u5E76\u533A\u95F4",icon:icon_polygonMerge_kj,noticeInfo:"",shortCut:["Alt","Z"]},splitAudio={name:"\u5206\u5272\u533A\u95F4",icon:icon_polygonCut_kj,noticeInfo:"",shortCut:["Alt","X"]},audioTextToolShortCurTable=[index.saveResult,audioToggleTagMode,audioToggleClipMode,audioClipped,audioClipSelected,audioTag,index.attributeLock,index.attributeClickLock,index.playPause,audioPlaybackRate,audioForwardTrack,audioBackTrack,index.setValid,index.fullScreen,audioBackward,audioForward,index.deleteRemark,index.preRemark,index.nextRemark,audioPrev,audioNext,combineAudio,splitAudio];exports.combineAudio=combineAudio,exports.default=audioTextToolShortCurTable,exports.splitAudio=splitAudio;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _=require("lodash"),index=require("../common/index.js"),index$1=require("../line/index.js"),icon_polygonMerge_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js"),icon_polygonCut_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonCut_kj.svg.js"),icon_frame_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_);const audioForward=___default.default.cloneDeep(index.forward),audioBackward=___default.default.cloneDeep(index.backward),audioBackTrack=___default.default.cloneDeep(index.rewind),audioForwardTrack=___default.default.cloneDeep(index.forwardForward),audioPlaybackRate=___default.default.cloneDeep(index.speed),audioTag=___default.default.cloneDeep(index.tag),audioToggleTagMode=___default.default.cloneDeep(index.toggleTagMode),audioToggleClipMode=___default.default.cloneDeep(index.period),audioClipped=___default.default.cloneDeep(index.tag),audioClipSelected=___default.default.cloneDeep(index.clipSelected),audioPrev=___default.default.cloneDeep(index$1.preLine),audioNext=___default.default.cloneDeep(index$1.nextLine),combineAudio={name:"CombineAudio",icon:icon_polygonMerge_kj,noticeInfo:"",shortCut:["Alt","Z"]},splitAudio={name:"ClipAudio",icon:icon_polygonCut_kj,noticeInfo:"",shortCut:["Alt","X"]};audioForward.name="NextFile",audioBackward.name="PreviousFile",audioBackTrack.name="Forward0.1",audioForwardTrack.name="Back0.1",audioToggleClipMode.name="SwitchClipMode",audioClipped.name="Clip",audioTag.name="TaggingOrAttr",audioPrev.name="PreviousInterval",audioNext.name="NextInterval",audioClipped.icon=icon_frame_kj,audioToggleClipMode.noticeInfo="";const audioTextToolShortCurTable=[index.saveResult,audioToggleTagMode,audioToggleClipMode,audioClipped,audioClipSelected,audioTag,index.attributeLock,index.attributeClickLock,index.playPause,audioPlaybackRate,audioForwardTrack,audioBackTrack,index.setValid,index.fullScreen,audioBackward,audioForward,index.deleteRemark,index.preRemark,index.nextRemark,audioPrev,audioNext,combineAudio,splitAudio];exports.combineAudio=combineAudio,exports.default=audioTextToolShortCurTable,exports.splitAudio=splitAudio;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var icon_cencel_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js"),icon_reform_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js"),icon_loupe_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js"),icon_mouse_middle_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js"),icon_fullView_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js"),icon_reload_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js"),setValid$1=require("../../../../../../assets/annotation/toolHotKeyIcon/setValid.svg.js"),icon_last_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js"),icon_next_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js"),icon_move_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js"),icon_mouse_right_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js"),icon_mouse_left_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js"),icon_tab_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js"),icon_alttab_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js"),icon_save_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js"),icon_lineSpecial_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js"),icon_noDisplay=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js"),icon_eyeLock_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_eyeLock_kj.svg.js"),icon_playPause=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_playPause.svg.js"),icon_forward_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js"),icon_back_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js"),icon_speed_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js"),tag$1=require("../../../../../../assets/annotation/audio/tag.svg.js"),icon_tag_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js"),icon_clip=require("../../../../../../assets/annotation/video/icon_clip.svg.js"),icon_frameActive_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js"),deleteRemark$1=require("../../../../../../assets/annotation/toolHotKeyIcon/deleteRemark.svg.js"),preRemark$1=require("../../../../../../assets/annotation/toolHotKeyIcon/preRemark.svg.js"),nextRemark$1=require("../../../../../../assets/annotation/toolHotKeyIcon/nextRemark.svg.js");const revoke={name:"Undo",icon:icon_cencel_kj,shortCut:["Ctrl","Z"]},restore={name:"Redo",icon:icon_reform_kj,shortCut:["Ctrl","Shift","Z"]},scale={name:"Scale",icon:icon_loupe_kj,shortCut:[icon_mouse_middle_kj]},fullScreen={name:"Fullscreen",icon:icon_fullView_kj,shortCut:["F11"]},rotate={name:"Rotate",icon:icon_reload_kj,shortCut:["R"],noticeInfo:"ToOriginalStep"},setValid={name:"ToggleEffectiveness",icon:setValid$1,shortCut:["Y"]},backward={name:"PreviousImage",icon:icon_last_kj,shortCut:["A"]},forward={name:"NextImage",icon:icon_next_kj,shortCut:["D"]},dargWithRightClick={name:"Drag",icon:icon_move_kj,shortCut:[icon_mouse_right_kj],noticeInfo:"Press"},dargWithLeftClick={name:"Drag",icon:icon_move_kj,shortCut:["Space",icon_mouse_left_kj]},attributeLock={name:"SpecifiedAttributesOnly",icon:icon_eyeLock_kj,shortCut:["Shift","Number"]},attributeClickLock={name:"SpecifiedAttributesOnly",icon:icon_eyeLock_kj,shortCut:["Shift",icon_mouse_left_kj]},tabChangeSelected={name:"ToggleSelected",icon:icon_tab_kj,shortCut:["Tab"]},tabReverseChangeSelected={name:"ToggleSelectedReverse",icon:icon_alttab_kj,shortCut:["Shift","Tab"]},hidden={name:"HideGraphics",icon:icon_noDisplay,noticeInfo:"",shortCut:["Z"]},changeSpecialLine={name:"ToggleLineParticularity",icon:icon_lineSpecial_kj,noticeInfo:"ToSide",shortCut:["Shift",icon_mouse_left_kj]},saveResult={name:"Save",icon:icon_save_kj,shortCut:["Ctrl","S"]},speed={name:"Speed",icon:icon_speed_kj,shortCut:["&#8593;","&#8595;"],shortCutUseHtml:!0},playPause={name:"PlayPause",icon:icon_playPause,shortCut:["Space"]},forwardForward={name:"FastForward",icon:icon_forward_kj,shortCut:["&#8594;"],shortCutUseHtml:!0},rewind={name:"Rewind",icon:icon_back_kj,shortCut:["&#8592;"],shortCutUseHtml:!0},toggleTagMode={name:"\u5207\u6362\u6807\u7B7E\u6A21\u5F0F",icon:tag$1,shortCut:["L"]},tag={name:"\u6253\u6807\u7B7E",icon:icon_tag_kj,shortCut:[icon_mouse_left_kj],noticeInfo:"\u5DE6\u51FB"},period={name:"\u622A\u53D6\u7247\u6BB5",icon:icon_clip,noticeInfo:"\u4E24\u6B21",shortCut:["X"]},clipSelected={name:"\u622A\u53D6\u9009\u4E2D",icon:icon_frameActive_kj,shortCut:[icon_mouse_right_kj],noticeInfo:"\u53F3\u51FB"},deleteRemark={name:"\u5220\u9664\u6279\u6CE8",icon:deleteRemark$1,shortCut:["Delete"],noticeInfo:"\u9009\u4E2D\u65F6"},nextRemark={name:"\u4E0B\u4E00\u6761\u6279\u6CE8",icon:nextRemark$1,shortCut:["Tab"]},preRemark={name:"\u4E0A\u4E00\u6761\u6279\u6CE8",icon:preRemark$1,shortCut:["Shift","Tab"]};exports.attributeClickLock=attributeClickLock,exports.attributeLock=attributeLock,exports.backward=backward,exports.changeSpecialLine=changeSpecialLine,exports.clipSelected=clipSelected,exports.dargWithLeftClick=dargWithLeftClick,exports.dargWithRightClick=dargWithRightClick,exports.deleteRemark=deleteRemark,exports.forward=forward,exports.forwardForward=forwardForward,exports.fullScreen=fullScreen,exports.hidden=hidden,exports.nextRemark=nextRemark,exports.period=period,exports.playPause=playPause,exports.preRemark=preRemark,exports.restore=restore,exports.revoke=revoke,exports.rewind=rewind,exports.rotate=rotate,exports.saveResult=saveResult,exports.scale=scale,exports.setValid=setValid,exports.speed=speed,exports.tabChangeSelected=tabChangeSelected,exports.tabReverseChangeSelected=tabReverseChangeSelected,exports.tag=tag,exports.toggleTagMode=toggleTagMode;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var icon_cencel_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js"),icon_reform_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js"),icon_loupe_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js"),icon_mouse_middle_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js"),icon_fullView_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js"),icon_reload_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js"),setValid$1=require("../../../../../../assets/annotation/toolHotKeyIcon/setValid.svg.js"),icon_last_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js"),icon_next_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js"),icon_move_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js"),icon_mouse_right_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js"),icon_mouse_left_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js"),icon_tab_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js"),icon_alttab_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js"),icon_save_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js"),icon_lineSpecial_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js"),icon_noDisplay=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js"),icon_eyeLock_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_eyeLock_kj.svg.js"),icon_playPause=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_playPause.svg.js"),icon_forward_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js"),icon_back_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js"),icon_speed_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js"),tag$1=require("../../../../../../assets/annotation/audio/tag.svg.js"),icon_tag_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js"),icon_clip=require("../../../../../../assets/annotation/video/icon_clip.svg.js"),icon_frameActive_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js"),deleteRemark$1=require("../../../../../../assets/annotation/toolHotKeyIcon/deleteRemark.svg.js"),preRemark$1=require("../../../../../../assets/annotation/toolHotKeyIcon/preRemark.svg.js"),nextRemark$1=require("../../../../../../assets/annotation/toolHotKeyIcon/nextRemark.svg.js");const revoke={name:"Undo",icon:icon_cencel_kj,shortCut:["Ctrl","Z"]},restore={name:"Redo",icon:icon_reform_kj,shortCut:["Ctrl","Shift","Z"]},scale={name:"Scale",icon:icon_loupe_kj,shortCut:[icon_mouse_middle_kj]},fullScreen={name:"Fullscreen",icon:icon_fullView_kj,shortCut:["F11"]},rotate={name:"Rotate",icon:icon_reload_kj,shortCut:["R"],noticeInfo:"ToOriginalStep"},setValid={name:"ToggleEffectiveness",icon:setValid$1,shortCut:["Y"]},backward={name:"PreviousImage",icon:icon_last_kj,shortCut:["A"]},forward={name:"NextImage",icon:icon_next_kj,shortCut:["D"]},dargWithRightClick={name:"Drag",icon:icon_move_kj,shortCut:[icon_mouse_right_kj],noticeInfo:"Press"},dargWithLeftClick={name:"Drag",icon:icon_move_kj,shortCut:["Space",icon_mouse_left_kj]},attributeLock={name:"SpecifiedAttributesOnly",icon:icon_eyeLock_kj,shortCut:["Shift","Number"]},attributeClickLock={name:"SpecifiedAttributesOnly",icon:icon_eyeLock_kj,shortCut:["Shift",icon_mouse_left_kj]},tabChangeSelected={name:"ToggleSelected",icon:icon_tab_kj,shortCut:["Tab"]},tabReverseChangeSelected={name:"ToggleSelectedReverse",icon:icon_alttab_kj,shortCut:["Shift","Tab"]},hidden={name:"HideGraphics",icon:icon_noDisplay,noticeInfo:"",shortCut:["Z"]},changeSpecialLine={name:"ToggleLineParticularity",icon:icon_lineSpecial_kj,noticeInfo:"ToSide",shortCut:["Shift",icon_mouse_left_kj]},saveResult={name:"Save",icon:icon_save_kj,shortCut:["Ctrl","S"]},speed={name:"Speed",icon:icon_speed_kj,shortCut:["&#8593;","&#8595;"],shortCutUseHtml:!0},playPause={name:"PlayPause",icon:icon_playPause,shortCut:["Space"]},forwardForward={name:"FastForward",icon:icon_forward_kj,shortCut:["&#8594;"],shortCutUseHtml:!0},rewind={name:"Rewind",icon:icon_back_kj,shortCut:["&#8592;"],shortCutUseHtml:!0},toggleTagMode={name:"SwitchTagMode",icon:tag$1,shortCut:["L"]},tag={name:"\u6253\u6807\u7B7E",icon:icon_tag_kj,shortCut:[icon_mouse_left_kj],noticeInfo:"LeftClick"},period={name:"\u622A\u53D6\u7247\u6BB5",icon:icon_clip,noticeInfo:"\u4E24\u6B21",shortCut:["X"]},clipSelected={name:"ClipSelect",icon:icon_frameActive_kj,shortCut:[icon_mouse_right_kj],noticeInfo:"RightClick"},deleteRemark={name:"DeleteComment",icon:deleteRemark$1,shortCut:["Delete"],noticeInfo:"SelectedStatus"},nextRemark={name:"NextComment",icon:nextRemark$1,shortCut:["Tab"]},preRemark={name:"PreviousComment",icon:preRemark$1,shortCut:["Shift","Tab"]};exports.attributeClickLock=attributeClickLock,exports.attributeLock=attributeLock,exports.backward=backward,exports.changeSpecialLine=changeSpecialLine,exports.clipSelected=clipSelected,exports.dargWithLeftClick=dargWithLeftClick,exports.dargWithRightClick=dargWithRightClick,exports.deleteRemark=deleteRemark,exports.forward=forward,exports.forwardForward=forwardForward,exports.fullScreen=fullScreen,exports.hidden=hidden,exports.nextRemark=nextRemark,exports.period=period,exports.playPause=playPause,exports.preRemark=preRemark,exports.restore=restore,exports.revoke=revoke,exports.rewind=rewind,exports.rotate=rotate,exports.saveResult=saveResult,exports.scale=scale,exports.setValid=setValid,exports.speed=speed,exports.tabChangeSelected=tabChangeSelected,exports.tabReverseChangeSelected=tabReverseChangeSelected,exports.tag=tag,exports.toggleTagMode=toggleTagMode;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),icon_kj1=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js"),icon_kj_h=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js"),ToolType=require("../../../../../data/enums/ToolType.js"),index=require("./rectToolShortCutTable/index.js"),index$2=require("./point/index.js"),index$3=require("./polygon/index.js"),index$4=require("./line/index.js"),index$1=require("./tag/index.js"),index$5=require("./text/index.js"),index$6=require("./videoTag/index.js"),index$7=require("./pointCloud/index.js"),index$8=require("./scribble/index.js"),index$9=require("./cuboid/index.js"),index$a=require("./LLM/index.js"),index$b=require("./audioText/index.js"),index$c=require("../../index.js"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation"),PointCloudContext=require("../../../../../components/pointCloudView/PointCloudContext.js"),FooterPopover=require("../../FooterPopover.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),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,a,t)=>a in e?__defProp(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,__spreadValues=(e,a)=>{for(var t in a||(a={}))__hasOwnProp.call(a,t)&&__defNormalProp(e,t,a[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(a))__propIsEnum.call(a,t)&&__defNormalProp(e,t,a[t]);return e};const{EVideoToolName,EPointCloudName}=lbAnnotation.cTool,shortCutTable={[ToolType.EToolName.Rect]:index.default,[ToolType.EToolName.Tag]:index$1.default,[ToolType.EToolName.Point]:index$2.default,[ToolType.EToolName.Polygon]:index$3.default,[ToolType.EToolName.Line]:index$4.default,[ToolType.EToolName.Text]:index$5,[EVideoToolName.VideoTagTool]:index$6,[EPointCloudName.PointCloud]:index$7.default,[EPointCloudName.PointCloud+"_POLYGON"]:index$7.pointCloudShortCutTable_POLYGON,[EPointCloudName.PointCloud+"_SEGMENT"]:index$7.pointCloudShortCutTable_SEGMENT,[ToolType.EToolName.ScribbleTool]:index$8,[ToolType.EToolName.Cuboid]:index$9,[ToolType.EToolName.LLM]:index$a.default,[lbAnnotation.EAudioToolName.AudioTextTool]:index$b.default},ToolHotKeyIcon=({icon:e})=>typeof e=="string"?React__default.default.createElement("img",{width:16,height:16,src:e}):e||null,ToolHotKeyCom=({title:e,style:a,shortCutList:t})=>{const{t:i}=reactI18next.useTranslation(),d={width:320,display:"flex",justifyContent:"space-between",margin:16},l={display:"block",padding:"0 3px",minWidth:"20px",marginRight:"3px",border:"1px solid rgba(204,204,204,1)",verticalAlign:"middle",fontSize:"12px",textAlign:"center"},c=(n,s)=>React__default.default.createElement("div",{style:d,key:s},React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},React__default.default.createElement(ToolHotKeyIcon,{icon:n.icon}),React__default.default.createElement("span",{style:{marginLeft:n.icon?16:0}},i(n.name))),React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},n.noticeInfo&&React__default.default.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},i(n.noticeInfo)),m(n.shortCut,n.shortCutUseHtml,n.linkSymbol))),m=(n,s=!1,x="+")=>{if(!n)return null;const g=n.map((r,o)=>{var p,f;const u={display:"flex",alignItems:"center"};return s?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:l,dangerouslySetInnerHTML:{__html:r}})):o<n.length-1?typeof r=="number"?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:l},r),React__default.default.createElement("span",{style:{marginRight:"3px"}},"~")):((p=r==null?void 0:r.startsWith)==null?void 0:p.call(r,"data"))?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:r})),React__default.default.createElement("span",{style:{marginRight:"3px"}},"+")):React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:l},r),React__default.default.createElement("span",{style:{marginRight:"3px"}},x)):typeof r=="number"?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:l},r)):((f=r==null?void 0:r.startsWith)==null?void 0:f.call(r,"data"))?React__default.default.createElement("span",{className:"shortCutButton",key:o,style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:r})):React__default.default.createElement("span",{style:l,key:o},r)});return React__default.default.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},g)},y=React__default.default.createElement("div",{className:`${index$c.footerCls}__hotkey-content`},t==null?void 0:t.map((n,s)=>c(n,s))),E=a||{};return React__default.default.createElement(FooterPopover,{hoverIcon:icon_kj_h,icon:icon_kj1,title:i("Hotkeys"),content:y,containerStyle:E})},ToolHotKey=({style:e,title:a,toolName:t})=>{const{pointCloudPattern:i,globalPattern:d}=React.useContext(PointCloudContext.PointCloudContext);if(!t||!shortCutTable[t])return null;let l=t;switch(d){case lbUtils.EPointCloudPattern.Detection:switch(i){case ToolType.EToolName.Polygon:l+="_POLYGON";break;case ToolType.EToolName.Line:l=ToolType.EToolName.Line;break;case ToolType.EToolName.Point:l=ToolType.EToolName.Point;break}break;case lbUtils.EPointCloudPattern.Segmentation:l=EPointCloudName.PointCloud+"_SEGMENT";break}const c={style:e,title:a,shortCutList:shortCutTable[l]};return React__default.default.createElement(ToolHotKeyCom,__spreadValues({},c))};exports.ToolHotKeyCom=ToolHotKeyCom,exports.default=ToolHotKey,exports.shortCutTable=shortCutTable;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),icon_kj1=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js"),icon_kj_h=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js"),ToolType=require("../../../../../data/enums/ToolType.js"),index=require("./rectToolShortCutTable/index.js"),index$2=require("./point/index.js"),index$3=require("./polygon/index.js"),index$4=require("./line/index.js"),index$1=require("./tag/index.js"),index$5=require("./text/index.js"),index$6=require("./videoTag/index.js"),index$7=require("./pointCloud/index.js"),index$8=require("./scribble/index.js"),index$9=require("./cuboid/index.js"),index$a=require("./LLM/index.js"),index$b=require("./audioText/index.js"),index$c=require("../../index.js"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation"),PointCloudContext=require("../../../../../components/pointCloudView/PointCloudContext.js"),FooterPopover=require("../../FooterPopover.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),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,a,t)=>a in e?__defProp(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,__spreadValues=(e,a)=>{for(var t in a||(a={}))__hasOwnProp.call(a,t)&&__defNormalProp(e,t,a[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(a))__propIsEnum.call(a,t)&&__defNormalProp(e,t,a[t]);return e};const{EVideoToolName,EPointCloudName}=lbAnnotation.cTool,shortCutTable={[ToolType.EToolName.Rect]:index.default,[ToolType.EToolName.Tag]:index$1.default,[ToolType.EToolName.Point]:index$2.default,[ToolType.EToolName.Polygon]:index$3.default,[ToolType.EToolName.Line]:index$4.default,[ToolType.EToolName.Text]:index$5,[EVideoToolName.VideoTagTool]:index$6,[EPointCloudName.PointCloud]:index$7.default,[EPointCloudName.PointCloud+"_POLYGON"]:index$7.pointCloudShortCutTable_POLYGON,[EPointCloudName.PointCloud+"_SEGMENT"]:index$7.pointCloudShortCutTable_SEGMENT,[ToolType.EToolName.ScribbleTool]:index$8.default,[ToolType.EToolName.Cuboid]:index$9,[ToolType.EToolName.LLM]:index$a.default,[lbAnnotation.EAudioToolName.AudioTextTool]:index$b.default},ToolHotKeyIcon=({icon:e})=>typeof e=="string"?React__default.default.createElement("img",{width:16,height:16,src:e}):e||null,ToolHotKeyCom=({title:e,style:a,shortCutList:t})=>{const{t:i}=reactI18next.useTranslation(),d={width:320,display:"flex",justifyContent:"space-between",margin:16},l={display:"block",padding:"0 3px",minWidth:"20px",marginRight:"3px",border:"1px solid rgba(204,204,204,1)",verticalAlign:"middle",fontSize:"12px",textAlign:"center"},c=(n,s)=>React__default.default.createElement("div",{style:d,key:s},React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},React__default.default.createElement(ToolHotKeyIcon,{icon:n.icon}),React__default.default.createElement("span",{style:{marginLeft:n.icon?16:0}},i(n.name))),React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},n.noticeInfo&&React__default.default.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},i(n.noticeInfo)),m(n.shortCut,n.shortCutUseHtml,n.linkSymbol))),m=(n,s=!1,x="+")=>{if(!n)return null;const g=n.map((r,o)=>{var p,f;const u={display:"flex",alignItems:"center"};return s?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:l,dangerouslySetInnerHTML:{__html:r}})):o<n.length-1?typeof r=="number"?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:l},r),React__default.default.createElement("span",{style:{marginRight:"3px"}},"~")):((p=r==null?void 0:r.startsWith)==null?void 0:p.call(r,"data"))?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:r})),React__default.default.createElement("span",{style:{marginRight:"3px"}},"+")):React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:l},r),React__default.default.createElement("span",{style:{marginRight:"3px"}},x)):typeof r=="number"?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:l},r)):((f=r==null?void 0:r.startsWith)==null?void 0:f.call(r,"data"))?React__default.default.createElement("span",{className:"shortCutButton",key:o,style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:r})):React__default.default.createElement("span",{style:l,key:o},r)});return React__default.default.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},g)},y=React__default.default.createElement("div",{className:`${index$c.footerCls}__hotkey-content`},t==null?void 0:t.map((n,s)=>c(n,s))),E=a||{};return React__default.default.createElement(FooterPopover,{hoverIcon:icon_kj_h,icon:icon_kj1,title:i("Hotkeys"),content:y,containerStyle:E})},ToolHotKey=({style:e,title:a,toolName:t})=>{const{pointCloudPattern:i,globalPattern:d}=React.useContext(PointCloudContext.PointCloudContext);if(!t||!shortCutTable[t])return null;let l=t;switch(d){case lbUtils.EPointCloudPattern.Detection:switch(i){case ToolType.EToolName.Polygon:l+="_POLYGON";break;case ToolType.EToolName.Line:l=ToolType.EToolName.Line;break;case ToolType.EToolName.Point:l=ToolType.EToolName.Point;break}break;case lbUtils.EPointCloudPattern.Segmentation:l=EPointCloudName.PointCloud+"_SEGMENT";break}const c={style:e,title:a,shortCutList:shortCutTable[l]};return React__default.default.createElement(ToolHotKeyCom,__spreadValues({},c))};exports.ToolHotKeyCom=ToolHotKeyCom,exports.default=ToolHotKey,exports.shortCutTable=shortCutTable;
@@ -1 +1 @@
1
- "use strict";var index=require("../common/index.js");const scribbleShortCutTable=[index.scale,index.saveResult,index.restore,index.revoke,index.rotate,index.backward,index.forward,index.dargWithRightClick,index.setValid];module.exports=scribbleShortCutTable;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var icon_mouse_left_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js"),icon_line_static=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_line_static.svg.js"),icon_eraser=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_eraser.svg.js"),icon_scribble=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_scribble.svg.js"),icon_strokeEnlarge=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_strokeEnlarge.svg.js"),icon_strokeReduction=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_strokeReduction.svg.js"),index=require("../common/index.js");const scribbleImg={name:"Scribble",icon:icon_scribble,shortCut:["Q"]},eraseImg={name:"Erase",icon:icon_eraser,shortCut:["W"]},scribbleLine={name:"ScribbleLine",icon:icon_line_static,shortCut:["Ctrl",icon_mouse_left_kj]},strokeEnlarge={name:"StrokeEnlarge",icon:icon_strokeEnlarge,shortCut:["F"]},strokeReduction={name:"StrokeReduction",icon:icon_strokeReduction,shortCut:["G"]},scribbleShortCutTable=[scribbleImg,eraseImg,scribbleLine,strokeEnlarge,strokeReduction,index.scale,index.saveResult,index.restore,index.revoke,index.rotate,index.backward,index.forward,index.dargWithRightClick,index.setValid,index.hidden];exports.default=scribbleShortCutTable,exports.eraseImg=eraseImg,exports.scribbleImg=scribbleImg,exports.scribbleLine=scribbleLine,exports.strokeEnlarge=strokeEnlarge,exports.strokeReduction=strokeReduction;
@@ -0,0 +1 @@
1
+ var e="data:image/svg+xml,%3csvg width='168' height='168' viewBox='0 0 168 168' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M9.00002 167.333C4.00002 167.333 0.666687 164 0.666687 159C0.666687 154 4.00002 150.667 9.00002 150.667H34.8334L7.33335 123.167C0.666687 116.5 0.666687 106.5 7.33335 99.8334L101.5 5.66675C108.167 -0.999918 118.167 -0.999918 124.833 5.66675L159.833 40.6667C166.5 47.3334 166.5 57.3334 159.833 64.0001L74 150.667H159C164 150.667 167.333 154 167.333 159C167.333 164 164 167.333 159 167.333H9.00002ZM22.3334 109C20.6667 110.667 20.6667 113.167 22.3334 114.833L43.1667 135.667C49.8333 142.333 59.8334 142.333 66.5 135.667L89.8333 112.333L54.8334 77.3334L22.3334 109Z' fill='%23666' /%3e%3c/svg%3e";export{e as default};
@@ -0,0 +1 @@
1
+ var e="data:image/svg+xml,%3csvg width='161' height='162' viewBox='0 0 161 162' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M141.05 20.1629C143.784 22.8966 148.216 22.8966 150.95 20.1629C153.683 17.4292 153.683 12.9971 150.95 10.2634C148.216 7.52972 143.784 7.52972 141.05 10.2634C138.317 12.9971 138.317 17.4292 141.05 20.1629ZM135.393 25.8197C141.251 31.6776 150.749 31.6776 156.607 25.8197C162.465 19.9619 162.465 10.4644 156.607 4.60653C150.749 -1.25133 141.251 -1.25133 135.393 4.60653C129.536 10.4644 129.536 19.9619 135.393 25.8197Z' fill='%23666' /%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.2356 150.978C12.9692 153.711 17.4014 153.711 20.135 150.978C22.8687 148.244 22.8687 143.812 20.135 141.078C17.4014 138.344 12.9692 138.344 10.2356 141.078C7.50188 143.812 7.50188 148.244 10.2356 150.978ZM4.5787 156.634C10.4366 162.492 19.934 162.492 25.7919 156.634C31.6498 150.777 31.6498 141.279 25.7919 135.421C19.934 129.563 10.4366 129.563 4.5787 135.421C-1.27916 141.279 -1.27916 150.777 4.5787 156.634Z' fill='%23666' /%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M135.393 25.8197C137.22 27.6466 139.401 28.9037 141.715 29.5911L29.5633 141.743C28.8759 139.429 27.6188 137.248 25.7919 135.421C23.8729 133.502 21.5632 132.212 19.1189 131.55L131.522 19.1467C132.184 21.591 133.474 23.9007 135.393 25.8197Z' fill='%23666' /%3e%3c/svg%3e";export{e as default};
@@ -0,0 +1 @@
1
+ var L="data:image/svg+xml,%3csvg width='168' height='167' viewBox='0 0 168 167' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M163.167 44.8333L123.167 4.83325C117.333 -1.00008 108.167 -1.00008 102.333 4.83325L87.3333 19.8333L97.3333 29.8333L137.333 69.8333L144 76.4999L147.333 79.8333L162.333 64.8333C169 59.8333 169 50.6666 163.167 44.8333ZM38.1667 155.667L34.8333 152.333L14.8333 132.333L11.5 129L2.33332 119L0.666656 117.333V152.333C0.666656 160.667 7.33332 166.5 14.8333 166.5H49.8333L47.3333 164L38.1667 155.667ZM87.3333 40.6666L77.3333 30.6666L4.83332 103.167L14.8333 113.167L54.8333 153.167L64.8333 163.167L136.5 91.4999L126.5 80.6666L87.3333 40.6666Z' fill='%23666' /%3e%3c/svg%3e";export{L as default};
@@ -0,0 +1 @@
1
+ var C="data:image/svg+xml,%3csvg width='168' height='167' viewBox='0 0 168 167' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M123.167 4.83325L163.167 44.8333C169 50.6666 169 59.8333 162.333 64.8333L147.333 79.8333L87.3333 19.8333L102.333 4.83325C108.167 -1.00008 117.333 -1.00008 123.167 4.83325Z' fill='%23666' /%3e %3cpath d='M38.1667 155.667L47.3333 164L49.8333 166.5H14.8333C7.33334 166.5 0.666672 160.667 0.666672 152.333V117.333L2.33334 119L11.5 129L38.1667 155.667Z' fill='%23666' /%3e %3cpath d='M87.3333 40.6666L77.3333 30.6666L4.83334 103.167L64.8333 163.167L80.8055 147.194C71.729 139.222 66 127.53 66 114.5C66 90.4756 85.4756 71 109.5 71C112.342 71 115.121 71.2726 117.811 71.7931L87.3333 40.6666Z' fill='%23666' /%3e %3cpath d='M117 81C121.971 81 126 85.0294 126 90V110H146C150.971 110 155 114.029 155 119C155 123.971 150.971 128 146 128H126V147C126 151.971 121.971 156 117 156C112.029 156 108 151.971 108 147V128H89C84.0294 128 80 123.971 80 119C80 114.029 84.0294 110 89 110H108V90C108 85.0294 112.029 81 117 81Z' fill='%23666' /%3e%3c/svg%3e";export{C as default};
@@ -0,0 +1 @@
1
+ var L="data:image/svg+xml,%3csvg width='168' height='167' viewBox='0 0 168 167' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M80 119C80 114.029 84.0294 110 89 110H146C150.971 110 155 114.029 155 119C155 123.971 150.971 128 146 128H89C84.0294 128 80 123.971 80 119Z' fill='%23666' /%3e %3cpath d='M123.167 4.83325L163.167 44.8333C169 50.6666 169 59.8333 162.333 64.8333L147.333 79.8333L87.3333 19.8333L102.333 4.83325C108.167 -1.00008 117.333 -1.00008 123.167 4.83325Z' fill='%23666' /%3e %3cpath d='M38.1667 155.667L47.3333 164L49.8333 166.5H14.8333C7.33333 166.5 0.666668 160.667 0.666668 152.333V117.333L2.33333 119L11.5 129L38.1667 155.667Z' fill='%23666' /%3e %3cpath d='M77.3333 30.6666L87.3333 40.6666L117.811 71.7931C115.121 71.2726 112.342 71 109.5 71C85.4756 71 66 90.4756 66 114.5C66 127.53 71.729 139.222 80.8055 147.194L64.8333 163.167L4.83333 103.167L77.3333 30.6666Z' fill='%23666' /%3e%3c/svg%3e";export{L as default};
@@ -1 +1 @@
1
- var e="data:image/svg+xml,%3csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect x='6.34875' y='0.353553' width='4.5' height='8.47848' rx='2.25' transform='rotate(45 6.34875 0.353553)' fill='%23E6E6E6' stroke='%23BAB8B8' stroke-width='0.5' /%3e %3cline x1='1.74547' y1='4.60767' x2='4.92401' y2='8.46733' stroke='%23BAB8B8' stroke-width='0.5' /%3e %3cline x1='2.00061' y1='9.75' x2='10.0006' y2='9.75' stroke='%23BAB8B8' stroke-width='0.5' /%3e%3c/svg%3e";export{e as default};
1
+ var e="data:image/svg+xml,%3csvg width='168' height='168' viewBox='0 0 168 168' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M9.00002 167.333C4.00002 167.333 0.666687 164 0.666687 159C0.666687 154 4.00002 150.667 9.00002 150.667H34.8334L7.33335 123.167C0.666687 116.5 0.666687 106.5 7.33335 99.8334L101.5 5.66675C108.167 -0.999918 118.167 -0.999918 124.833 5.66675L159.833 40.6667C166.5 47.3334 166.5 57.3334 159.833 64.0001L74 150.667H159C164 150.667 167.333 154 167.333 159C167.333 164 164 167.333 159 167.333H9.00002ZM22.3334 109C20.6667 110.667 20.6667 113.167 22.3334 114.833L43.1667 135.667C49.8333 142.333 59.8334 142.333 66.5 135.667L89.8333 112.333L54.8334 77.3334L22.3334 109Z' fill='%23BAB8B8' /%3e%3c/svg%3e";export{e as default};
@@ -1 +1 @@
1
- var e="data:image/svg+xml,%3csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect x='6.34875' y='0.353553' width='4.5' height='8.47848' rx='2.25' transform='rotate(45 6.34875 0.353553)' fill='%236272FB' stroke='%23BAB8B8' stroke-width='0.5' /%3e %3cline x1='1.74547' y1='4.60767' x2='4.92401' y2='8.46733' stroke='%23BAB8B8' stroke-width='0.5' /%3e %3cline x1='2.00061' y1='9.75' x2='10.0006' y2='9.75' stroke='%236272FB' stroke-width='0.5' /%3e%3c/svg%3e";export{e as default};
1
+ var e="data:image/svg+xml,%3csvg width='168' height='168' viewBox='0 0 168 168' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M9.00002 167.333C4.00002 167.333 0.666687 164 0.666687 159C0.666687 154 4.00002 150.667 9.00002 150.667H34.8334L7.33335 123.167C0.666687 116.5 0.666687 106.5 7.33335 99.8334L101.5 5.66675C108.167 -0.999918 118.167 -0.999918 124.833 5.66675L159.833 40.6667C166.5 47.3334 166.5 57.3334 159.833 64.0001L74 150.667H159C164 150.667 167.333 154 167.333 159C167.333 164 164 167.333 159 167.333H9.00002ZM22.3334 109C20.6667 110.667 20.6667 113.167 22.3334 114.833L43.1667 135.667C49.8333 142.333 59.8334 142.333 66.5 135.667L89.8333 112.333L54.8334 77.3334L22.3334 109Z' fill='%236272FB' /%3e%3c/svg%3e";export{e as default};
@@ -0,0 +1 @@
1
+ var c="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b clip-path: url(%23clip-path)%3b %7d .cls-3 %7b fill: rgba(0%2c0%2c0%2c0)%3b %7d .cls-4 %7b clip-path: url(%23clip-path-2)%3b %7d .cls-5 %7b fill: %23666fff%3b %7d .cls-6 %7b clip-path: url(%23clip-path-3)%3b %7d %3c/style%3e %3cclipPath id='clip-path'%3e %3cpath id='%e8%b7%af%e5%be%84_5835' data-name='%e8%b7%af%e5%be%84 5835' class='cls-1' d='M0%2c0H16V-16H0Z'/%3e %3c/clipPath%3e %3cclipPath id='clip-path-2'%3e %3cpath id='%e8%b7%af%e5%be%84_5837' data-name='%e8%b7%af%e5%be%84 5837' class='cls-1' d='M6.786-12A8.1%2c8.1%2c0%2c0%2c1%2c9-11.709a2.652%2c2.652%2c0%2c0%2c0-.13.824v1.034H7.952a.7.7%2c0%2c0%2c0-.294.067%2c3.038%2c3.038%2c0%2c0%2c0-.934-.145A2.6%2c2.6%2c0%2c0%2c0%2c3.984-7.5%2c2.6%2c2.6%2c0%2c0%2c0%2c6.723-5.071q.126%2c0%2c.249-.01V-3.2A.867.867%2c0%2c0%2c0%2c6.994-3L6.786-3A7.168%2c7.168%2c0%2c0%2c1%2c.09-7.144a.748.748%2c0%2c0%2c1%2c0-.711A7.165%2c7.165%2c0%2c0%2c1%2c6.786-12ZM6.723-9.046a1.971%2c1.971%2c0%2c0%2c1%2c.313.025%2c1.124%2c1.124%2c0%2c0%2c0-.064.359V-5.97a1.978%2c1.978%2c0%2c0%2c1-.25.016A1.654%2c1.654%2c0%2c0%2c1%2c4.98-7.5%2c1.654%2c1.654%2c0%2c0%2c1%2c6.723-9.046Z'/%3e %3c/clipPath%3e %3cclipPath id='clip-path-3'%3e %3cpath id='%e8%b7%af%e5%be%84_5839' data-name='%e8%b7%af%e5%be%84 5839' class='cls-1' d='M15.214-9.35h-.731v-1.141A2.5%2c2.5%2c0%2c0%2c0%2c12-13a2.5%2c2.5%2c0%2c0%2c0-2.48%2c2.509V-9.35H8.786a.789.789%2c0%2c0%2c0-.786.8V-3.8a.789.789%2c0%2c0%2c0%2c.786.8h6.428A.789.789%2c0%2c0%2c0%2c16-3.8V-8.549A.794.794%2c0%2c0%2c0%2c15.214-9.35Zm-3.2-2.741c.983%2c0%2c1.416.611%2c1.416%2c1.695v1.032H10.578V-10.4C10.578-11.479%2c11.027-12.1%2c12.01-12.091Zm.57%2c5.74v1.182a.3.3%2c0%2c0%2c1-.144.246.574.574%2c0%2c0%2c1-.339.1c-.262%2c0-.482-.16-.482-.351V-6.351A.647.647%2c0%2c0%2c1%2c11.2-6.9c0-.357.4-.646.889-.646s.889.289.889.646A.613.613%2c0%2c0%2c1%2c12.58-6.351Z'/%3e %3c/clipPath%3e %3c/defs%3e %3cg id='icon_eyeLock_a' transform='translate(0 16)'%3e %3cg id='%e7%bb%84_23734' data-name='%e7%bb%84 23734' class='cls-2'%3e %3cpath id='%e8%b7%af%e5%be%84_5834' data-name='%e8%b7%af%e5%be%84 5834' class='cls-3' d='M-5-21H21V5H-5Z'/%3e %3c/g%3e %3cg id='%e7%bb%84_23735' data-name='%e7%bb%84 23735' class='cls-4'%3e %3cpath id='%e8%b7%af%e5%be%84_5836' data-name='%e8%b7%af%e5%be%84 5836' class='cls-5' d='M-5-17H14V2H-5Z'/%3e %3c/g%3e %3cg id='%e7%bb%84_23736' data-name='%e7%bb%84 23736' class='cls-6'%3e %3cpath id='%e8%b7%af%e5%be%84_5838' data-name='%e8%b7%af%e5%be%84 5838' class='cls-5' d='M3-18H21V2H3Z'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e";export{c as default};
@@ -0,0 +1 @@
1
+ var c="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b clip-path: url(%23clip-path)%3b %7d .cls-3 %7b fill: rgba(0%2c0%2c0%2c0)%3b %7d .cls-4 %7b clip-path: url(%23clip-path-2)%3b %7d .cls-5 %7b fill: %23999%3b %7d .cls-6 %7b clip-path: url(%23clip-path-3)%3b %7d %3c/style%3e %3cclipPath id='clip-path'%3e %3cpath id='%e8%b7%af%e5%be%84_5835' data-name='%e8%b7%af%e5%be%84 5835' class='cls-1' d='M0%2c0H16V-16H0Z'/%3e %3c/clipPath%3e %3cclipPath id='clip-path-2'%3e %3cpath id='%e8%b7%af%e5%be%84_5837' data-name='%e8%b7%af%e5%be%84 5837' class='cls-1' d='M6.786-12A8.1%2c8.1%2c0%2c0%2c1%2c9-11.709a2.652%2c2.652%2c0%2c0%2c0-.13.824v1.034H7.952a.7.7%2c0%2c0%2c0-.294.067%2c3.038%2c3.038%2c0%2c0%2c0-.934-.145A2.6%2c2.6%2c0%2c0%2c0%2c3.984-7.5%2c2.6%2c2.6%2c0%2c0%2c0%2c6.723-5.071q.126%2c0%2c.249-.01V-3.2A.867.867%2c0%2c0%2c0%2c6.994-3L6.786-3A7.168%2c7.168%2c0%2c0%2c1%2c.09-7.144a.748.748%2c0%2c0%2c1%2c0-.711A7.165%2c7.165%2c0%2c0%2c1%2c6.786-12ZM6.723-9.046a1.971%2c1.971%2c0%2c0%2c1%2c.313.025%2c1.124%2c1.124%2c0%2c0%2c0-.064.359V-5.97a1.978%2c1.978%2c0%2c0%2c1-.25.016A1.654%2c1.654%2c0%2c0%2c1%2c4.98-7.5%2c1.654%2c1.654%2c0%2c0%2c1%2c6.723-9.046Z'/%3e %3c/clipPath%3e %3cclipPath id='clip-path-3'%3e %3cpath id='%e8%b7%af%e5%be%84_5839' data-name='%e8%b7%af%e5%be%84 5839' class='cls-1' d='M15.214-9.35h-.731v-1.141A2.5%2c2.5%2c0%2c0%2c0%2c12-13a2.5%2c2.5%2c0%2c0%2c0-2.48%2c2.509V-9.35H8.786a.789.789%2c0%2c0%2c0-.786.8V-3.8a.789.789%2c0%2c0%2c0%2c.786.8h6.428A.789.789%2c0%2c0%2c0%2c16-3.8V-8.549A.794.794%2c0%2c0%2c0%2c15.214-9.35Zm-3.2-2.741c.983%2c0%2c1.416.611%2c1.416%2c1.695v1.032H10.578V-10.4C10.578-11.479%2c11.027-12.1%2c12.01-12.091Zm.57%2c5.74v1.182a.3.3%2c0%2c0%2c1-.144.246.574.574%2c0%2c0%2c1-.339.1c-.262%2c0-.482-.16-.482-.351V-6.351A.647.647%2c0%2c0%2c1%2c11.2-6.9c0-.357.4-.646.889-.646s.889.289.889.646A.613.613%2c0%2c0%2c1%2c12.58-6.351Z'/%3e %3c/clipPath%3e %3c/defs%3e %3cg id='icon_eyeLock_h' transform='translate(0 16)'%3e %3cg id='%e7%bb%84_23734' data-name='%e7%bb%84 23734' class='cls-2'%3e %3cpath id='%e8%b7%af%e5%be%84_5834' data-name='%e8%b7%af%e5%be%84 5834' class='cls-3' d='M-5-21H21V5H-5Z'/%3e %3c/g%3e %3cg id='%e7%bb%84_23735' data-name='%e7%bb%84 23735' class='cls-4'%3e %3cpath id='%e8%b7%af%e5%be%84_5836' data-name='%e8%b7%af%e5%be%84 5836' class='cls-5' d='M-5-17H14V2H-5Z'/%3e %3c/g%3e %3cg id='%e7%bb%84_23736' data-name='%e7%bb%84 23736' class='cls-6'%3e %3cpath id='%e8%b7%af%e5%be%84_5838' data-name='%e8%b7%af%e5%be%84 5838' class='cls-5' d='M3-18H21V2H3Z'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e";export{c as default};
@@ -1 +1 @@
1
- var e="data:image/svg+xml,%3csvg width='12' height='13' viewBox='0 0 12 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect x='9.07153' y='1' width='3' height='10' rx='1' transform='rotate(45 9.07153 1)' fill='%23BAB8B8' /%3e %3cpath d='M1.06068 11.182L1.73311 8.67247L3.57023 10.5096L1.06068 11.182Z' fill='%23BAB8B8' /%3e %3ccircle cx='11.0002' cy='1' r='1' fill='%23BAB8B8' /%3e%3c/svg%3e";export{e as default};
1
+ var L="data:image/svg+xml,%3csvg width='168' height='167' viewBox='0 0 168 167' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M163.167 44.8333L123.167 4.83325C117.333 -1.00008 108.167 -1.00008 102.333 4.83325L87.3333 19.8333L97.3333 29.8333L137.333 69.8333L144 76.4999L147.333 79.8333L162.333 64.8333C169 59.8333 169 50.6666 163.167 44.8333ZM38.1667 155.667L34.8333 152.333L14.8333 132.333L11.5 129L2.33332 119L0.666656 117.333V152.333C0.666656 160.667 7.33332 166.5 14.8333 166.5H49.8333L47.3333 164L38.1667 155.667ZM87.3333 40.6666L77.3333 30.6666L4.83332 103.167L14.8333 113.167L54.8333 153.167L64.8333 163.167L136.5 91.4999L126.5 80.6666L87.3333 40.6666Z' fill='%23BAB8B8' /%3e%3c/svg%3e";export{L as default};
@@ -1 +1 @@
1
- var e="data:image/svg+xml,%3csvg width='12' height='13' viewBox='0 0 12 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect x='9.07153' y='1' width='3' height='10' rx='1' transform='rotate(45 9.07153 1)' fill='%236272FB' /%3e %3cpath d='M1.06068 11.182L1.73311 8.67247L3.57023 10.5096L1.06068 11.182Z' fill='%236272FB' /%3e %3ccircle cx='11.0002' cy='1' r='1' fill='%236272FB' /%3e%3c/svg%3e";export{e as default};
1
+ var L="data:image/svg+xml,%3csvg width='168' height='167' viewBox='0 0 168 167' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M163.167 44.8333L123.167 4.83325C117.333 -1.00008 108.167 -1.00008 102.333 4.83325L87.3333 19.8333L97.3333 29.8333L137.333 69.8333L144 76.4999L147.333 79.8333L162.333 64.8333C169 59.8333 169 50.6666 163.167 44.8333ZM38.1667 155.667L34.8333 152.333L14.8333 132.333L11.5 129L2.33332 119L0.666656 117.333V152.333C0.666656 160.667 7.33332 166.5 14.8333 166.5H49.8333L47.3333 164L38.1667 155.667ZM87.3333 40.6666L77.3333 30.6666L4.83332 103.167L14.8333 113.167L54.8333 153.167L64.8333 163.167L136.5 91.4999L126.5 80.6666L87.3333 40.6666Z' fill='%236272FB' /%3e%3c/svg%3e";export{L as default};
@@ -1 +1,2 @@
1
- import e,{useEffect as E}from"react";import{Form as o,Popover as g,Input as w}from"antd";import{useTranslation as h}from"react-i18next";import{InfoCircleOutlined as v}from"@ant-design/icons";const y=i=>{const{checkMode:l,newAnswer:s,textEditObject:c,updateValue:u}=i,{max:m,min:t}=c,{TextArea:d}=w,[n]=o.useForm(),{t:a}=h(),f=a("LeastCharacterError",{num:t});return E(()=>{n.setFieldsValue({value:s}),l||n.validateFields()},[s]),e.createElement(o,{form:n,onValuesChange:(p,r)=>{const x=r.value;u(x)},style:{marginBottom:"16px"}},e.createElement(o.Item,{name:"title",style:{marginBottom:"16px"},label:" ",colon:!1,required:!!t},a("AnswerTextEdit"),e.createElement(g,{placement:"bottom",content:a("ShowEditingResultDifferencesInTextModeOnly")},e.createElement(v,{style:{margin:"0px 4px",cursor:"pointer"}}))),e.createElement(o.Item,{name:"value",style:{marginBottom:8},rules:[{validator:(p,r="")=>t&&(r==null?void 0:r.length)<Number(t)?Promise.reject(f):Promise.resolve()}]},e.createElement(d,{maxLength:m,autoSize:{minRows:4,maxRows:10},allowClear:!0,disabled:l,showCount:!!m,style:{width:"100%"}})))};export{y as default};
1
+ import e,{useEffect as I}from"react";import{Form as m,Popover as C,Input as S,message as j}from"antd";import{useTranslation as L}from"react-i18next";import{InfoCircleOutlined as N}from"@ant-design/icons";import k from"../../../../markdownView/index.js";import M from"../../../../latexEditor/index.js";import d from"./index.module.scss.js";const O=v=>{const{checkMode:E,newAnswer:x,textEditObject:h,updateValue:f}=v,{max:a,min:c,isLaText:g}=h,{TextArea:w}=S,[l]=m.useForm(),{t:o}=L(),b=o("LeastCharacterError",{num:c});I(()=>{l.setFieldsValue({value:x}),E||l.validateFields()},[x]);const y=n=>{var t,u;const r=document.getElementById("inputTextarea"),s=r.value||"",p=(t=r==null?void 0:r.selectionStart)!=null?t:s.length,V=(u=r.selectionEnd)!=null?u:s.length,T=s.substring(0,p),F=s.substring(V,s.length),i=T+n+F;if(a&&(i==null?void 0:i.length)>a){j.error(o("MaximumCharacterError",{num:a}));return}r.value=i,l.setFieldsValue({value:i}),f(i),r.selectionStart=p+n.length,r.selectionEnd=p+n.length,r.focus()};return e.createElement(m,{form:l,onValuesChange:(n,t)=>{const u=t.value;f(u)},className:d.form},e.createElement(m.Item,{name:"title",style:{marginBottom:"16px"},label:e.createElement(e.Fragment,null,o("AnswerTextEdit"),e.createElement(C,{placement:"bottom",content:o("ShowEditingResultDifferencesInTextModeOnly")},e.createElement(N,{style:{margin:"0px 4px",cursor:"pointer"}}))),colon:!1,required:!!c}),g&&e.createElement(M,{onSelectLatex:y,disabled:E}),e.createElement(m.Item,{name:"value",style:{marginBottom:24},rules:[{validator:(n,t="")=>c&&(t==null?void 0:t.length)<Number(c)?Promise.reject(b):Promise.resolve()}]},e.createElement(w,{maxLength:a,autoSize:{minRows:4,maxRows:10},allowClear:!0,disabled:E,showCount:!!a,style:{width:"100%"},id:"inputTextarea"})),g&&e.createElement(m.Item,{shouldUpdate:!0,noStyle:!0},()=>{const n=l.getFieldValue("value")||"",t=n.replace(/\n/g,`
2
+ `);return e.createElement("div",{className:d.outputDisplay},e.createElement("div",{className:d.title},o("OutputDisplay")),e.createElement("div",{className:d.content},n?e.createElement(k,{value:t}):""))}))};export{O as default};
@@ -0,0 +1 @@
1
+ var e={form:"index-module_form__IypXc",outputDisplay:"index-module_outputDisplay__5dS48",title:"index-module_title__vhMCp",content:"index-module_content__Iml6l"};export{e as default};