@cloud-app-dev/vidc 3.2.17 → 3.2.18

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 (269) hide show
  1. package/.prettierrc.js +1 -1
  2. package/.stylelintrc.js +113 -0
  3. package/es/AppContext/index.js +3 -4
  4. package/es/Box/InfoBox/index.less +8 -6
  5. package/es/Box/TwoColumnBox/index.less +32 -22
  6. package/es/Box/index.less +1 -1
  7. package/es/CheckGroupFixed/index.less +17 -14
  8. package/es/CustomRenderSelect/index.less +7 -7
  9. package/es/DisableMark/index.less +3 -3
  10. package/es/DomMove/index.js +5 -5
  11. package/es/Drag/DragAndDropItem.js +1 -2
  12. package/es/Drag/DropItem.js +2 -2
  13. package/es/Drag/index.d.ts +9 -7
  14. package/es/Drawer/index.js +19 -20
  15. package/es/Drawer/index.less +8 -8
  16. package/es/Drawer/interface.d.ts +4 -3
  17. package/es/DynamicList/index.less +2 -0
  18. package/es/FullScreen/index.less +6 -4
  19. package/es/GridList/index.js +1 -1
  20. package/es/GridList/index.less +1 -1
  21. package/es/ImageView/index.less +2 -1
  22. package/es/Input/index.less +1 -1
  23. package/es/LabelValue/index.less +5 -2
  24. package/es/List/index.less +2 -2
  25. package/es/ListWithSizeAnimate/demo.js +0 -1
  26. package/es/ListWithSizeAnimate/index.js +18 -28
  27. package/es/ListWithSizeAnimate/index.less +10 -6
  28. package/es/Map/BasicMap/index.less +8 -3
  29. package/es/Map/ClusterLayer/index.less +8 -6
  30. package/es/Map/FindPio/index.less +2 -2
  31. package/es/Map/LevelCenter/index.js +3 -4
  32. package/es/Map/MapDrawSelect/index.js +2 -3
  33. package/es/Map/ResetTools/index.less +10 -6
  34. package/es/Map/SinglePoint/index.less +3 -3
  35. package/es/Map/useMarker/index.js +1 -1
  36. package/es/Modal/index.js +17 -17
  37. package/es/Modal/index.less +10 -11
  38. package/es/Picture/component/DefaultRects/index.js +3 -1
  39. package/es/Picture/component/DefaultRects/index.less +51 -28
  40. package/es/Picture/component/DrawRect/index.js +3 -1
  41. package/es/Picture/component/DrawRect/index.less +2 -2
  42. package/es/Picture/component/RectMenu/index.less +11 -6
  43. package/es/Picture/component/Tools/index.js +1 -1
  44. package/es/Picture/component/Tools/index.less +12 -6
  45. package/es/Picture/index.js +50 -26
  46. package/es/Picture/index.less +3 -2
  47. package/es/Picture/useDraw.js +1 -1
  48. package/es/Picture/utils.js +35 -34
  49. package/es/Player/api/index.js +67 -35
  50. package/es/Player/contraller_bar/contraller_event.js +4 -4
  51. package/es/Player/contraller_bar/left_bar.js +12 -10
  52. package/es/Player/empty.js +6 -0
  53. package/es/Player/event/errorEvent.js +7 -8
  54. package/es/Player/event/index.js +1 -1
  55. package/es/Player/fps_play.js +10 -8
  56. package/es/Player/frontend_player.js +13 -10
  57. package/es/Player/frontend_timeline.js +41 -41
  58. package/es/Player/live_heart.js +15 -5
  59. package/es/Player/message.js +5 -5
  60. package/es/Player/segment_player.js +31 -24
  61. package/es/Player/segment_timeline.js +71 -71
  62. package/es/Player/single_player.js +17 -21
  63. package/es/Player/style/bar.less +13 -9
  64. package/es/Player/style/index.less +8 -4
  65. package/es/Player/style/message.less +22 -16
  66. package/es/Player/style/slider.less +40 -37
  67. package/es/Player/style/timeline.less +43 -33
  68. package/es/Player/style/volume.less +7 -4
  69. package/es/Player/timeline.js +16 -8
  70. package/es/Player/util.js +82 -58
  71. package/es/PlayerExt/index.less +2 -2
  72. package/es/Progress/index.d.ts +8 -11
  73. package/es/Progress/index.less +5 -4
  74. package/es/ROI/index.less +8 -4
  75. package/es/ScreenPlayer/index.less +49 -26
  76. package/es/TableLayout/index.less +1 -1
  77. package/es/ThemeAntd/demo.less +4 -3
  78. package/es/ThemeAntd/index.less +12 -12
  79. package/es/ThemeAntd/style/button.less +4 -4
  80. package/es/ThemeAntd/style/checkbox.less +3 -3
  81. package/es/ThemeAntd/style/input.less +7 -7
  82. package/es/ThemeAntd/style/pagination.less +4 -4
  83. package/es/ThemeAntd/style/picker.less +5 -5
  84. package/es/ThemeAntd/style/radio.less +2 -2
  85. package/es/ThemeAntd/style/scrollbar.less +5 -3
  86. package/es/ThemeAntd/style/select.less +8 -8
  87. package/es/ThemeAntd/style/table.less +4 -4
  88. package/es/Tree/index.less +13 -12
  89. package/es/VList/index.d.ts +12 -18
  90. package/es/useSimpleState/index.js +1 -1
  91. package/package.json +12 -6
  92. package/tsconfig.json +12 -0
  93. package/es/Api/index.d.ts +0 -12
  94. package/es/AppContext/Sync.d.ts +0 -8
  95. package/es/AppContext/index.d.ts +0 -10
  96. package/es/AppContext/static.d.ts +0 -8
  97. package/es/Auth/index.d.ts +0 -8
  98. package/es/AutoExit/index.d.ts +0 -6
  99. package/es/Box/BetweenBox/index.d.ts +0 -12
  100. package/es/Box/InfoBox/index.d.ts +0 -12
  101. package/es/Box/TwoColumnBox/index.d.ts +0 -10
  102. package/es/Box/deps/content-grid.d.ts +0 -9
  103. package/es/Box/deps/grid-factory.d.ts +0 -10
  104. package/es/Box/deps/simple-grid.d.ts +0 -9
  105. package/es/Box/index.d.ts +0 -14
  106. package/es/CheckGroupFixed/demo.d.ts +0 -3
  107. package/es/CheckGroupFixed/index.d.ts +0 -18
  108. package/es/Config/index.d.ts +0 -4
  109. package/es/Config/utils.d.ts +0 -4
  110. package/es/ConfigContext/index.d.ts +0 -22
  111. package/es/CustomRenderSelect/index.d.ts +0 -12
  112. package/es/DisableMark/index.d.ts +0 -9
  113. package/es/DomMove/demo.d.ts +0 -2
  114. package/es/DomMove/index.d.ts +0 -16
  115. package/es/DomMove/utils.d.ts +0 -8
  116. package/es/Drag/DragAndDropItem.d.ts +0 -4
  117. package/es/Drag/DropItem.d.ts +0 -4
  118. package/es/Drag/index.less +0 -0
  119. package/es/Drawer/Footer.d.ts +0 -5
  120. package/es/Drawer/demo.d.ts +0 -3
  121. package/es/Drawer/index.d.ts +0 -38
  122. package/es/DynamicGridList/Demo.d.ts +0 -3
  123. package/es/DynamicGridList/index.d.ts +0 -27
  124. package/es/DynamicList/demo.d.ts +0 -2
  125. package/es/DynamicList/index.d.ts +0 -31
  126. package/es/DynamicList/utils.d.ts +0 -4
  127. package/es/ErrorFallback/index.d.ts +0 -9
  128. package/es/FrontendPlayer/index.d.ts +0 -2
  129. package/es/FullScreen/index.d.ts +0 -22
  130. package/es/GridList/Demo.d.ts +0 -3
  131. package/es/GridList/data.d.ts +0 -16
  132. package/es/GridList/hook.d.ts +0 -13
  133. package/es/GridList/index.d.ts +0 -15
  134. package/es/GridList/utils.d.ts +0 -9
  135. package/es/HightLevel/index.d.ts +0 -9
  136. package/es/IconFont/index.d.ts +0 -12
  137. package/es/ImageView/index.d.ts +0 -17
  138. package/es/Input/demo.d.ts +0 -3
  139. package/es/Input/index.d.ts +0 -19
  140. package/es/InstanceHistory/index.d.ts +0 -3
  141. package/es/LabelValue/index.d.ts +0 -23
  142. package/es/List/demo.d.ts +0 -3
  143. package/es/List/index.d.ts +0 -41
  144. package/es/ListWithSizeAnimate/demo.d.ts +0 -2
  145. package/es/ListWithSizeAnimate/index.d.ts +0 -15
  146. package/es/LoaderApp/index.d.ts +0 -31
  147. package/es/LoaderApp/loader.d.ts +0 -19
  148. package/es/LoaderApp/sandbox.back.d.ts +0 -18
  149. package/es/LoaderApp/sandbox.d.ts +0 -12
  150. package/es/LoaderApp/utils.d.ts +0 -19
  151. package/es/LoaderScript/index.d.ts +0 -26
  152. package/es/LoaderScript/utils.d.ts +0 -14
  153. package/es/Map/BasicMap/AMapInstance.d.ts +0 -19
  154. package/es/Map/BasicMap/LeafletInstance.d.ts +0 -18
  155. package/es/Map/BasicMap/index.d.ts +0 -9
  156. package/es/Map/ClusterLayer/hook.d.ts +0 -5
  157. package/es/Map/ClusterLayer/index.d.ts +0 -6
  158. package/es/Map/Config/index.d.ts +0 -7
  159. package/es/Map/Config/utils.d.ts +0 -2
  160. package/es/Map/Context/index.d.ts +0 -11
  161. package/es/Map/FindPio/index.d.ts +0 -4
  162. package/es/Map/InfoWindow/MakerLikeWindow.d.ts +0 -4
  163. package/es/Map/InfoWindow/demo.d.ts +0 -3
  164. package/es/Map/InfoWindow/index.d.ts +0 -10
  165. package/es/Map/LevelCenter/DragMarker/index.d.ts +0 -10
  166. package/es/Map/LevelCenter/demo.d.ts +0 -3
  167. package/es/Map/LevelCenter/index.d.ts +0 -16
  168. package/es/Map/LevelCenter/index.less +0 -2
  169. package/es/Map/LoaderMap/index.d.ts +0 -12
  170. package/es/Map/MapDrawSelect/demo.d.ts +0 -3
  171. package/es/Map/MapDrawSelect/index.d.ts +0 -16
  172. package/es/Map/MapDrawSelect/index.less +0 -2
  173. package/es/Map/MouseTool/index.d.ts +0 -10
  174. package/es/Map/MouseTool/useMouseTools.d.ts +0 -7
  175. package/es/Map/ResetTools/index.d.ts +0 -10
  176. package/es/Map/SinglePoint/index.d.ts +0 -27
  177. package/es/Map/hook/useMapEvent.d.ts +0 -2
  178. package/es/Map/hook/useMapType.d.ts +0 -4
  179. package/es/Map/icon.d.ts +0 -2
  180. package/es/Map/index.d.ts +0 -24
  181. package/es/Map/useMarker/index.d.ts +0 -11
  182. package/es/Map/useMarker/index.less +0 -0
  183. package/es/Map/withMap/index.d.ts +0 -3
  184. package/es/Modal/demo.d.ts +0 -3
  185. package/es/Modal/index.d.ts +0 -44
  186. package/es/Picture/component/DefaultRects/RectInfo.d.ts +0 -8
  187. package/es/Picture/component/DefaultRects/index.d.ts +0 -13
  188. package/es/Picture/component/DefaultRects/utils.d.ts +0 -2
  189. package/es/Picture/component/DrawRect/index.d.ts +0 -13
  190. package/es/Picture/component/RectMenu/index.d.ts +0 -12
  191. package/es/Picture/component/RectMenu/utils.d.ts +0 -12
  192. package/es/Picture/component/Tools/index.d.ts +0 -13
  193. package/es/Picture/component/WheelScale/index.d.ts +0 -7
  194. package/es/Picture/demo.d.ts +0 -2
  195. package/es/Picture/dragBound.d.ts +0 -5
  196. package/es/Picture/index.d.ts +0 -19
  197. package/es/Picture/loadCaptureRectImage.d.ts +0 -8
  198. package/es/Picture/useDraw.d.ts +0 -1
  199. package/es/Picture/utils.d.ts +0 -21
  200. package/es/Player/api/index.d.ts +0 -68
  201. package/es/Player/context.d.ts +0 -21
  202. package/es/Player/contraller_bar/bar.d.ts +0 -8
  203. package/es/Player/contraller_bar/contraller_event.d.ts +0 -6
  204. package/es/Player/contraller_bar/index.d.ts +0 -14
  205. package/es/Player/contraller_bar/left_bar.d.ts +0 -10
  206. package/es/Player/contraller_bar/right_bar.d.ts +0 -8
  207. package/es/Player/contraller_bar/time.d.ts +0 -3
  208. package/es/Player/contraller_bar/useBarStatus.d.ts +0 -2
  209. package/es/Player/contraller_bar/volume.d.ts +0 -9
  210. package/es/Player/demo.d.ts +0 -3
  211. package/es/Player/event/errorEvent.d.ts +0 -16
  212. package/es/Player/event/eventName.d.ts +0 -18
  213. package/es/Player/event/index.d.ts +0 -24
  214. package/es/Player/fps_play.d.ts +0 -11
  215. package/es/Player/frontend_player.d.ts +0 -8
  216. package/es/Player/frontend_timeline.d.ts +0 -10
  217. package/es/Player/iconfont.d.ts +0 -5
  218. package/es/Player/index.d.ts +0 -2
  219. package/es/Player/live_heart.d.ts +0 -8
  220. package/es/Player/message.d.ts +0 -5
  221. package/es/Player/segment_player.d.ts +0 -9
  222. package/es/Player/segment_timeline.d.ts +0 -12
  223. package/es/Player/single_player.d.ts +0 -5
  224. package/es/Player/timeline.d.ts +0 -5
  225. package/es/Player/util.d.ts +0 -28
  226. package/es/PlayerExt/demo.d.ts +0 -3
  227. package/es/PlayerExt/index.d.ts +0 -48
  228. package/es/ROI/demo.d.ts +0 -3
  229. package/es/ROI/index.d.ts +0 -39
  230. package/es/ROI/utils.d.ts +0 -1
  231. package/es/ScreenPlayer/Live.d.ts +0 -10
  232. package/es/ScreenPlayer/LiveTools.d.ts +0 -29
  233. package/es/ScreenPlayer/PlayerWithExt.d.ts +0 -34
  234. package/es/ScreenPlayer/RatePick.d.ts +0 -7
  235. package/es/ScreenPlayer/Record.d.ts +0 -10
  236. package/es/ScreenPlayer/RecordTools.d.ts +0 -37
  237. package/es/ScreenPlayer/ScreenSelect.d.ts +0 -7
  238. package/es/ScreenPlayer/SegmentTimeLine.d.ts +0 -17
  239. package/es/ScreenPlayer/TimeMode.d.ts +0 -7
  240. package/es/ScreenPlayer/TimeSelect.d.ts +0 -7
  241. package/es/ScreenPlayer/demo.d.ts +0 -2
  242. package/es/ScreenPlayer/demo2.d.ts +0 -2
  243. package/es/ScreenPlayer/index.d.ts +0 -6
  244. package/es/ScreenPlayer/useTimeSlider.d.ts +0 -25
  245. package/es/ScreenPlayer/useVideoFit.d.ts +0 -5
  246. package/es/ScreenPlayer/utils.d.ts +0 -19
  247. package/es/SegmentPlayer/index.d.ts +0 -2
  248. package/es/Service/fetch-adapter.d.ts +0 -12
  249. package/es/Service/http.d.ts +0 -6
  250. package/es/Service/index.d.ts +0 -3
  251. package/es/Service/middleware.d.ts +0 -5
  252. package/es/TableLayout/index.d.ts +0 -13
  253. package/es/ThemeAntd/demo.d.ts +0 -4
  254. package/es/ThemeAntd/index.d.ts +0 -7
  255. package/es/Timeout/index.d.ts +0 -32
  256. package/es/Tree/demo.d.ts +0 -3
  257. package/es/Tree/index.d.ts +0 -24
  258. package/es/VList/utils.d.ts +0 -14
  259. package/es/index.d.ts +0 -52
  260. package/es/useDrawROI/index.d.ts +0 -16
  261. package/es/useEventEmitterHandle/index.d.ts +0 -2
  262. package/es/useFullscreen/demo.d.ts +0 -2
  263. package/es/useFullscreen/index.d.ts +0 -12
  264. package/es/useHistory/index.d.ts +0 -3
  265. package/es/useInfiniteScroll/index.d.ts +0 -16
  266. package/es/useRafInterval/index.d.ts +0 -5
  267. package/es/useSimpleState/index.d.ts +0 -3
  268. package/es/useVirtualList/index.d.ts +0 -13
  269. package/es/utils.d.ts +0 -25
@@ -26,8 +26,10 @@ function DrawRect(_ref) {
26
26
  return rect[1] + rect[3];
27
27
  }, [rect]);
28
28
  var onMenuClickAction = useCallback(function (item) {
29
+ var _getRectImage;
30
+
29
31
  onMenuClick === null || onMenuClick === void 0 ? void 0 : onMenuClick(_objectSpread(_objectSpread({}, item), {}, {
30
- base64: getRectImage(rect)
32
+ base64: (_getRectImage = getRectImage(rect)) !== null && _getRectImage !== void 0 ? _getRectImage : ''
31
33
  }));
32
34
  }, [getRectImage, onMenuClick, rect]);
33
35
  return /*#__PURE__*/_jsxs(_Fragment, {
@@ -1,8 +1,8 @@
1
1
  .select-rect-layout {
2
- box-shadow: 0 0 0 9999em rgba(0, 0, 0, 0.4);
2
+ position: absolute;
3
3
  border: 1px solid;
4
+ box-shadow: 0 0 0 9999em rgb(0 0 0 / 40%);
4
5
  border-image-source: url('data:image/gif;base64,R0lGODlhCgAKAJECAAAAAP///////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEI5RDc5MTFDNkE2MTFFM0JCMDZEODI2QTI4MzJBOTIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEI5RDc5MTBDNkE2MTFFM0JCMDZEODI2QTI4MzJBOTIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuZGlkOjAyODAxMTc0MDcyMDY4MTE4MDgzQzNDMjA5MzREQ0ZDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjAyODAxMTc0MDcyMDY4MTE4MDgzQzNDMjA5MzREQ0ZDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEBQoAAgAsAAAAAAoACgAAAhWEERkn7W3ei7KlagMWF/dKgYeyGAUAIfkEBQoAAgAsAAAAAAoACgAAAg+UYwLJ7RnQm7QmsCyVKhUAIfkEBQoAAgAsAAAAAAoACgAAAhCUYgLJHdiinNSAVfOEKoUCACH5BAUKAAIALAAAAAAKAAoAAAIRVISAdusPo3RAzYtjaMIaUQAAIfkEBQoAAgAsAAAAAAoACgAAAg+MDiem7Q8bSLFaG5il6xQAIfkEBQoAAgAsAAAAAAoACgAAAg+UYRLJ7QnQm7SmsCyVKhUAIfkEBQoAAgAsAAAAAAoACgAAAhCUYBLJDdiinNSEVfOEKoECACH5BAUKAAIALAAAAAAKAAoAAAIRFISBdusPo3RBzYsjaMIaUQAAOw==');
5
6
  border-image-repeat: repeat;
6
7
  border-image-slice: 1;
7
- position: absolute;
8
8
  }
@@ -1,29 +1,34 @@
1
1
  .select-rect-menu-layout {
2
2
  position: absolute;
3
- font-size: var(--fs-small);
4
3
  width: 105px;
5
4
  overflow: hidden;
5
+ font-size: var(--fs-small);
6
+
6
7
  .menu-action-item {
7
8
  padding: 4px 10px;
8
- background: #ffffff;
9
9
  margin-bottom: 4px;
10
- border-radius: 15px;
11
- box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
12
- color: rgba(0, 0, 0, 0.65);
10
+ color: rgb(0 0 0 / 65%);
13
11
  white-space: nowrap;
12
+ background: #fff;
13
+ border-radius: 15px;
14
+ box-shadow: 0 0 2px rgb(0 0 0 / 20%);
15
+
14
16
  .anticon {
15
17
  padding-right: 2px;
16
18
  font-size: 16px;
17
19
  color: #89b;
18
20
  }
21
+
19
22
  &:hover {
20
- background: #ffaa00;
21
23
  color: #fff;
22
24
  cursor: pointer;
25
+ background: #fa0;
26
+
23
27
  .anticon {
24
28
  color: #fff;
25
29
  }
26
30
  }
31
+
27
32
  &:last-child {
28
33
  margin-bottom: 0;
29
34
  }
@@ -1,8 +1,8 @@
1
1
  import "antd/lib/tooltip/style";
2
2
  import _Tooltip from "antd/lib/tooltip";
3
3
  import React from 'react';
4
- import IconFont from "../../../Player/iconfont";
5
4
  import FullScreen from "../../../FullScreen";
5
+ import IconFont from "../../../Player/iconfont";
6
6
  import "./index.less";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,12 +1,14 @@
1
1
  .picture-tools {
2
2
  position: absolute;
3
- bottom: 10px;
4
3
  right: 10px;
4
+ bottom: 10px;
5
5
  background: #fff;
6
- box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.3);
6
+ box-shadow: 0 2px 5px 0 rgb(0 0 0 / 30%);
7
+
7
8
  &.actions-change-rotate {
8
9
  bottom: 150px;
9
10
  }
11
+
10
12
  & > div {
11
13
  width: 30px;
12
14
  height: 25px;
@@ -15,28 +17,32 @@
15
17
  cursor: pointer;
16
18
 
17
19
  &.disabled {
18
- cursor: not-allowed;
19
20
  color: #999;
21
+ cursor: not-allowed;
22
+
20
23
  .anticon {
21
24
  color: #999;
22
25
  }
23
26
  }
24
27
  }
25
28
  }
29
+
26
30
  .picture-actions {
27
31
  position: absolute;
28
32
  top: 8px;
29
33
  right: 8px;
34
+
30
35
  & > div {
36
+ float: left;
31
37
  width: 28px;
32
38
  height: 28px;
39
+ margin-left: 4px;
33
40
  line-height: 28px;
34
- background: #fff;
35
- float: left;
36
41
  text-align: center;
37
- margin-left: 4px;
38
42
  cursor: pointer;
43
+ background: #fff;
39
44
  }
45
+
40
46
  .tools-screen-layer .anticon {
41
47
  padding-right: 0;
42
48
  }
@@ -31,17 +31,17 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
31
31
 
32
32
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
33
33
 
34
- /* eslint-disable jsx-a11y/alt-text */
35
- import React, { useMemo, useRef, useState, useCallback, useEffect } from 'react';
34
+ import React, { useCallback, useEffect, useMemo, useRef } from 'react';
36
35
  import DomMove from "../DomMove";
37
- import { getRectImagePath } from "./loadCaptureRectImage";
38
- import { computedBound } from "./dragBound";
39
- import { customContextMenu, computedRectScale, cloneImageNode } from "./utils";
40
- import useDraw from "./useDraw";
41
- import Tools from "./component/Tools";
36
+ import useSimpleState from "../useSimpleState";
37
+ import DefaultRects from "./component/DefaultRects";
42
38
  import DrawRect from "./component/DrawRect";
39
+ import Tools from "./component/Tools";
43
40
  import WheelScale from "./component/WheelScale";
44
- import DefaultRects from "./component/DefaultRects";
41
+ import { computedBound } from "./dragBound";
42
+ import { getRectImagePath } from "./loadCaptureRectImage";
43
+ import useDraw from "./useDraw";
44
+ import { cloneImageNode, computedRectScale, customContextMenu } from "./utils";
45
45
  import "./index.less";
46
46
  import { jsx as _jsx } from "react/jsx-runtime";
47
47
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -70,23 +70,43 @@ function Picture(_ref) {
70
70
  onMenuClick = _useMemo.onMenuClick,
71
71
  children = _useMemo.children;
72
72
 
73
- var _useState = useState({
73
+ var _useSimpleState = useSimpleState({
74
74
  x: 0,
75
75
  y: 0,
76
76
  rotate: 0,
77
77
  scale: 1,
78
78
  baseXOrY: 'x',
79
79
  forceUpdateKey: Date.now(),
80
- fullScreenStatus: false
80
+ fullScreenStatus: false,
81
+ localUrl: ''
81
82
  }),
82
- _useState2 = _slicedToArray(_useState, 2),
83
- state = _useState2[0],
84
- setState = _useState2[1];
83
+ _useSimpleState2 = _slicedToArray(_useSimpleState, 3),
84
+ state = _useSimpleState2[0],
85
+ updateState = _useSimpleState2[1],
86
+ setState = _useSimpleState2[2];
85
87
 
86
88
  var layoutRef = useRef(null);
87
89
  var moveActionRef = useRef(null);
88
90
  var domImgRef = useRef(null);
89
91
  var imageSourceRef = useRef(null);
92
+ useEffect(function () {
93
+ if (!imagePath) {
94
+ return undefined;
95
+ }
96
+
97
+ var localUrl;
98
+ fetch(imagePath).then(function (res) {
99
+ return res.blob();
100
+ }).then(function (blob) {
101
+ localUrl = URL.createObjectURL(blob);
102
+ updateState({
103
+ localUrl: localUrl
104
+ });
105
+ });
106
+ return function () {
107
+ return URL.revokeObjectURL(localUrl);
108
+ };
109
+ }, [imagePath]);
90
110
 
91
111
  var _useDraw = useDraw(layoutRef.current, isOpenSelect),
92
112
  _useDraw2 = _slicedToArray(_useDraw, 2),
@@ -95,7 +115,7 @@ function Picture(_ref) {
95
115
 
96
116
  var loadImageSuccess = useCallback( /*#__PURE__*/function () {
97
117
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(flag) {
98
- var _domImgRef$current, width, height;
118
+ var nodeEle, _ref3, width, height;
99
119
 
100
120
  return _regeneratorRuntime().wrap(function _callee$(_context) {
101
121
  while (1) {
@@ -105,8 +125,9 @@ function Picture(_ref) {
105
125
  return cloneImageNode(domImgRef.current);
106
126
 
107
127
  case 2:
108
- imageSourceRef.current = _context.sent;
109
- _domImgRef$current = domImgRef.current, width = _domImgRef$current.width, height = _domImgRef$current.height;
128
+ nodeEle = _context.sent;
129
+ imageSourceRef.current = nodeEle;
130
+ _ref3 = domImgRef.current, width = _ref3.width, height = _ref3.height;
110
131
  setState(function (old) {
111
132
  return _objectSpread(_objectSpread({}, old), {}, {
112
133
  forceUpdateKey: Date.now(),
@@ -115,7 +136,7 @@ function Picture(_ref) {
115
136
  });
116
137
  });
117
138
 
118
- case 5:
139
+ case 6:
119
140
  case "end":
120
141
  return _context.stop();
121
142
  }
@@ -176,13 +197,14 @@ function Picture(_ref) {
176
197
 
177
198
  var resetPicture = useCallback(function (event) {
178
199
  event.stopPropagation();
200
+ var moveObj = moveActionRef.current;
179
201
  setState(function (old) {
180
202
  return _objectSpread(_objectSpread({}, old), {}, {
181
203
  scale: 1,
182
204
  rotate: 0
183
205
  });
184
206
  });
185
- moveActionRef.current.updatePosition({
207
+ moveObj.updatePosition({
186
208
  x: 0,
187
209
  y: 0
188
210
  });
@@ -191,9 +213,9 @@ function Picture(_ref) {
191
213
  * 拖拽更新位置
192
214
  */
193
215
 
194
- var onDragChange = useCallback(function (_ref3) {
195
- var x = _ref3.x,
196
- y = _ref3.y;
216
+ var onDragChange = useCallback(function (_ref4) {
217
+ var x = _ref4.x,
218
+ y = _ref4.y;
197
219
  return setState(function (old) {
198
220
  return _objectSpread(_objectSpread({}, old), {}, {
199
221
  x: x,
@@ -216,7 +238,8 @@ function Picture(_ref) {
216
238
  var position = computedBound(layoutRef.current, currrentPosition, scale, rotate);
217
239
 
218
240
  if (position) {
219
- moveActionRef.current.updatePosition(position);
241
+ var moveObj = moveActionRef.current;
242
+ moveObj.updatePosition(position);
220
243
  }
221
244
  }, [state]);
222
245
  /**
@@ -262,7 +285,7 @@ function Picture(_ref) {
262
285
  return computedRectScale({
263
286
  imageSource: imageSourceRef.current,
264
287
  domImg: domImgRef.current,
265
- rects: rects
288
+ rects: rects !== null && rects !== void 0 ? rects : []
266
289
  });
267
290
  }, [rects, state.forceUpdateKey]);
268
291
  var isEmpty = useMemo(function () {
@@ -324,7 +347,8 @@ function Picture(_ref) {
324
347
  maxHeight: baseXOrY === 'x' ? 'unset' : height || '100%'
325
348
  },
326
349
  draggable: false,
327
- src: imagePath,
350
+ src: state.localUrl,
351
+ "data-src": imagePath,
328
352
  onLoad: function onLoad() {
329
353
  return loadImageSuccess();
330
354
  }
@@ -332,8 +356,8 @@ function Picture(_ref) {
332
356
  rect: selectArea,
333
357
  onMenuClick: onMenuClick,
334
358
  getRectImage: getRectImage,
335
- menus: menus,
336
- canRenderMenu: isEnd && !disabledDrawMenu && menus.length > 0,
359
+ menus: menus !== null && menus !== void 0 ? menus : [],
360
+ canRenderMenu: isEnd && !disabledDrawMenu && menus && menus.length > 0,
337
361
  containerDom: layoutRef.current
338
362
  }) : !isOpenSelect ? /*#__PURE__*/_jsx(DefaultRects, {
339
363
  rects: scaleRects,
@@ -1,13 +1,14 @@
1
1
  .picture-view-layout {
2
2
  position: relative;
3
+ min-height: 300px;
3
4
  overflow: hidden;
4
5
  user-select: none;
5
- min-height: 300px;
6
+
6
7
  .picture-move-layout {
7
8
  & > div {
8
9
  width: 100%;
9
10
  height: 100%;
10
- transition: all 0.3s;
11
+ transition: all .3s;
11
12
  overflow: hidden;
12
13
  }
13
14
  }
@@ -12,7 +12,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
12
12
 
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
14
 
15
- import { useState, useRef, useCallback } from 'react';
15
+ import { useCallback, useRef, useState } from 'react';
16
16
  export default function useDraw(dom, open) {
17
17
  var _useState = useState({
18
18
  rect: [0, 0, 0, 0],
@@ -4,6 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
 
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
+ /* eslint-disable @typescript-eslint/no-unused-expressions */
7
8
  import { cloneDeep } from 'lodash-es';
8
9
  export function customContextMenu(e) {
9
10
  e.preventDefault();
@@ -11,7 +12,7 @@ export function customContextMenu(e) {
11
12
  }
12
13
  export function cloneImageNode(image) {
13
14
  if (!image) {
14
- return Promise.resolve();
15
+ return Promise.reject();
15
16
  }
16
17
 
17
18
  var newImage = image.cloneNode();
@@ -24,43 +25,11 @@ export function cloneImageNode(image) {
24
25
  }, false);
25
26
  });
26
27
  }
27
- export function computedRectScale(_ref) {
28
- var imageSource = _ref.imageSource,
29
- domImg = _ref.domImg,
30
- rects = _ref.rects;
31
-
32
- if (!imageSource || !domImg) {
33
- return [];
34
- }
35
-
36
- var width = domImg.width;
37
- var height = domImg.height;
38
- var scaleOptions = {
39
- scaleX: width / imageSource.width,
40
- scaleY: height / imageSource.height
41
- };
42
- return rects.map(function (item) {
43
- var rect = item.needExpand ? getCaptureRect(cloneDeep(item.rect), item.type) : cloneDeep(item.rect);
44
- rect[0] = Math.round(rect[0] * scaleOptions.scaleX);
45
- rect[0] < 0 && (rect[0] = 0);
46
- rect[2] = Math.round(rect[2] * scaleOptions.scaleX);
47
- rect[2] < 0 && (rect[2] = 0);
48
- rect[1] = Math.round(rect[1] * scaleOptions.scaleY);
49
- rect[1] < 0 && (rect[1] = 0);
50
- rect[3] = Math.round(rect[3] * scaleOptions.scaleY);
51
- rect[3] < 0 && (rect[3] = 0);
52
- rect[2] > width - rect[0] && (rect[2] = width - rect[0]);
53
- rect[3] > height - rect[1] && (rect[3] = height - rect[1]);
54
- return _objectSpread(_objectSpread({}, item), {}, {
55
- rect: rect
56
- });
57
- });
58
- }
59
28
  export function getCaptureRect(rect, type) {
60
29
  var rectArea = rect;
61
30
 
62
31
  if (rectArea.length !== 4) {
63
- console.error('区域有误 实例:string = "x,y,w,h"! ', rect);
32
+ console.error('区域有误 rect = "[x,y,w,h]"! ', rect);
64
33
  return [0, 0, 0, 0];
65
34
  }
66
35
 
@@ -93,4 +62,36 @@ export function getCaptureRect(rect, type) {
93
62
  }
94
63
 
95
64
  return [x, y, w, h];
65
+ }
66
+ export function computedRectScale(_ref) {
67
+ var imageSource = _ref.imageSource,
68
+ domImg = _ref.domImg,
69
+ rects = _ref.rects;
70
+
71
+ if (!imageSource || !domImg) {
72
+ return [];
73
+ }
74
+
75
+ var width = domImg.width;
76
+ var height = domImg.height;
77
+ var scaleOptions = {
78
+ scaleX: width / imageSource.width,
79
+ scaleY: height / imageSource.height
80
+ };
81
+ return rects.map(function (item) {
82
+ var rect = item.needExpand ? getCaptureRect(cloneDeep(item.rect), item.type) : cloneDeep(item.rect);
83
+ rect[0] = Math.round(rect[0] * scaleOptions.scaleX);
84
+ rect[0] < 0 && (rect[0] = 0);
85
+ rect[2] = Math.round(rect[2] * scaleOptions.scaleX);
86
+ rect[2] < 0 && (rect[2] = 0);
87
+ rect[1] = Math.round(rect[1] * scaleOptions.scaleY);
88
+ rect[1] < 0 && (rect[1] = 0);
89
+ rect[3] = Math.round(rect[3] * scaleOptions.scaleY);
90
+ rect[3] < 0 && (rect[3] = 0);
91
+ rect[2] > width - rect[0] && (rect[2] = width - rect[0]);
92
+ rect[3] > height - rect[1] && (rect[3] = height - rect[1]);
93
+ return _objectSpread(_objectSpread({}, item), {}, {
94
+ rect: rect
95
+ });
96
+ });
96
97
  }
@@ -33,36 +33,52 @@ var Api = /*#__PURE__*/function () {
33
33
 
34
34
  _defineProperty(this, "play", function () {
35
35
  tryCatch(function () {
36
- return _this.video.play();
36
+ var _this$video;
37
+
38
+ return (_this$video = _this.video) === null || _this$video === void 0 ? void 0 : _this$video.play();
37
39
  });
38
40
  });
39
41
 
40
42
  _defineProperty(this, "pause", function () {
41
- _this.video.pause();
43
+ var _this$video2;
44
+
45
+ (_this$video2 = _this.video) === null || _this$video2 === void 0 ? void 0 : _this$video2.pause();
42
46
  });
43
47
 
44
48
  _defineProperty(this, "seekTo", function (seconds) {
45
- _this.video.currentTime = seconds;
49
+ if (_this.video) {
50
+ _this.video.currentTime = seconds;
51
+ }
46
52
  });
47
53
 
48
54
  _defineProperty(this, "setVolume", function (fraction) {
49
- _this.video.volume = fraction;
55
+ if (_this.video) {
56
+ _this.video.volume = fraction;
57
+ }
50
58
  });
51
59
 
52
60
  _defineProperty(this, "getVolume", function () {
53
- return _this.video.volume;
61
+ var _this$video3;
62
+
63
+ return (_this$video3 = _this.video) === null || _this$video3 === void 0 ? void 0 : _this$video3.volume;
54
64
  });
55
65
 
56
66
  _defineProperty(this, "mute", function () {
57
- _this.video.muted = true;
67
+ if (_this.video) {
68
+ _this.video.muted = true;
69
+ }
58
70
  });
59
71
 
60
72
  _defineProperty(this, "unmute", function () {
61
- _this.video.muted = false;
73
+ if (_this.video) {
74
+ _this.video.muted = false;
75
+ }
62
76
  });
63
77
 
64
78
  _defineProperty(this, "requestPictureInPicture", function () {
65
- _this.video.requestPictureInPicture();
79
+ var _this$video4;
80
+
81
+ (_this$video4 = _this.video) === null || _this$video4 === void 0 ? void 0 : _this$video4.requestPictureInPicture();
66
82
  });
67
83
 
68
84
  _defineProperty(this, "exitPictureInPicture", function () {
@@ -72,15 +88,17 @@ var Api = /*#__PURE__*/function () {
72
88
  });
73
89
 
74
90
  _defineProperty(this, "setPlaybackRate", function (rate) {
75
- _this.video.playbackRate = rate;
91
+ if (_this.video) {
92
+ _this.video.playbackRate = rate;
93
+ }
76
94
  });
77
95
 
78
96
  _defineProperty(this, "getDuration", function () {
79
- var _this$video = _this.video,
80
- duration = _this$video.duration,
81
- seekable = _this$video.seekable;
97
+ var _ref = _this.video || {},
98
+ duration = _ref.duration,
99
+ seekable = _ref.seekable;
82
100
 
83
- if (duration === Infinity && seekable.length > 0) {
101
+ if (duration === Infinity && seekable && seekable.length > 0) {
84
102
  return seekable.end(seekable.length - 1);
85
103
  }
86
104
 
@@ -88,7 +106,9 @@ var Api = /*#__PURE__*/function () {
88
106
  });
89
107
 
90
108
  _defineProperty(this, "getCurrentTime", function () {
91
- return _this.video.currentTime;
109
+ var _this$video5;
110
+
111
+ return (_this$video5 = _this.video) === null || _this$video5 === void 0 ? void 0 : _this$video5.currentTime;
92
112
  });
93
113
 
94
114
  _defineProperty(this, "getSecondsLoaded", function () {
@@ -96,30 +116,34 @@ var Api = /*#__PURE__*/function () {
96
116
  });
97
117
 
98
118
  _defineProperty(this, "getBufferedTime", function () {
99
- var buffered = _this.video.buffered;
119
+ var _buffered$end, _buffered$start, _this$getDuration;
120
+
121
+ var _ref2 = _this.video || {},
122
+ buffered = _ref2.buffered;
100
123
 
101
- if (buffered.length === 0) {
124
+ if (buffered && buffered.length === 0) {
102
125
  return [0, 0];
103
126
  }
104
127
 
105
- var end = buffered.end(buffered.length - 1);
106
- var start = buffered.start(buffered.length - 1);
107
-
108
- var duration = _this.getDuration();
128
+ var end = (_buffered$end = buffered === null || buffered === void 0 ? void 0 : buffered.end(buffered.length - 1)) !== null && _buffered$end !== void 0 ? _buffered$end : 0;
129
+ var start = (_buffered$start = buffered === null || buffered === void 0 ? void 0 : buffered.start(buffered.length - 1)) !== null && _buffered$start !== void 0 ? _buffered$start : 0;
130
+ var duration = (_this$getDuration = _this.getDuration()) !== null && _this$getDuration !== void 0 ? _this$getDuration : 0;
109
131
 
110
132
  if (end > duration) {
111
- return duration;
133
+ return [start, duration];
112
134
  }
113
135
 
114
136
  return [start, end];
115
137
  });
116
138
 
117
139
  _defineProperty(this, "snapshot", function () {
140
+ var _this$video$videoWidt, _this$video6, _this$video$videoHeig, _this$video7, _ctx;
141
+
118
142
  var canvas = document.createElement('canvas');
119
143
  var ctx = canvas.getContext('2d');
120
- canvas.width = _this.video.videoWidth;
121
- canvas.height = _this.video.videoHeight;
122
- ctx.drawImage(_this.video, 0, 0, canvas.width, canvas.height);
144
+ canvas.width = (_this$video$videoWidt = (_this$video6 = _this.video) === null || _this$video6 === void 0 ? void 0 : _this$video6.videoWidth) !== null && _this$video$videoWidt !== void 0 ? _this$video$videoWidt : 0;
145
+ canvas.height = (_this$video$videoHeig = (_this$video7 = _this.video) === null || _this$video7 === void 0 ? void 0 : _this$video7.videoHeight) !== null && _this$video$videoHeig !== void 0 ? _this$video$videoHeig : 0;
146
+ (_ctx = ctx) === null || _ctx === void 0 ? void 0 : _ctx.drawImage(_this.video, 0, 0, canvas.width, canvas.height);
123
147
  setTimeout(function () {
124
148
  canvas.remove();
125
149
  canvas = null;
@@ -153,12 +177,16 @@ var Api = /*#__PURE__*/function () {
153
177
  }, {
154
178
  key: "paused",
155
179
  get: function get() {
156
- return this.video.paused;
180
+ var _this$video8;
181
+
182
+ return (_this$video8 = this.video) === null || _this$video8 === void 0 ? void 0 : _this$video8.paused;
157
183
  }
158
184
  }, {
159
185
  key: "muted",
160
186
  get: function get() {
161
- return this.video.muted;
187
+ var _this$video9;
188
+
189
+ return (_this$video9 = this.video) === null || _this$video9 === void 0 ? void 0 : _this$video9.muted;
162
190
  }
163
191
  /**
164
192
  * 设置currentTime实现seek
@@ -204,28 +232,32 @@ export function useTypeAndPlay(url, type, isLive, container, segments, flvConfig
204
232
 
205
233
  default:
206
234
  options.type = 'native';
207
- video.setAttribute('src', url);
235
+ video === null || video === void 0 ? void 0 : video.setAttribute('src', url !== null && url !== void 0 ? url : '');
208
236
  break;
209
237
  }
210
238
 
211
- video.paused && tryCatch(function () {
212
- return video.play();
239
+ (video === null || video === void 0 ? void 0 : video.paused) && tryCatch(function () {
240
+ return video === null || video === void 0 ? void 0 : video.play();
213
241
  });
214
242
  setState(options);
215
243
  return function () {
216
244
  if (options.flv) {
217
245
  options.flv.pause();
218
246
  tryCatch(function () {
219
- return options.flv.destroy();
247
+ var _options$flv;
248
+
249
+ return (_options$flv = options.flv) === null || _options$flv === void 0 ? void 0 : _options$flv.destroy();
220
250
  });
221
251
  } else if (options.hls) {
222
- video.pause();
252
+ video === null || video === void 0 ? void 0 : video.pause();
223
253
  tryCatch(function () {
224
- return options.hls.destroy();
254
+ var _options$hls;
255
+
256
+ return (_options$hls = options.hls) === null || _options$hls === void 0 ? void 0 : _options$hls.destroy();
225
257
  });
226
258
  } else {
227
- video.pause();
228
- video.removeAttribute('src');
259
+ video === null || video === void 0 ? void 0 : video.pause();
260
+ video === null || video === void 0 ? void 0 : video.removeAttribute('src');
229
261
  }
230
262
 
231
263
  setState({});
@@ -235,7 +267,7 @@ export function useTypeAndPlay(url, type, isLive, container, segments, flvConfig
235
267
  } //创建Api
236
268
 
237
269
  export function usePlayerApi(url, type, isLive, container, segments, flvConfig, hlsConfig) {
238
- var _useState3 = useState(null),
270
+ var _useState3 = useState(undefined),
239
271
  _useState4 = _slicedToArray(_useState3, 2),
240
272
  api = _useState4[0],
241
273
  setApi = _useState4[1];
@@ -13,7 +13,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
13
13
 
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
 
16
- import React, { useState, useRef, useContext } from 'react';
16
+ import React, { useContext, useRef, useState } from 'react';
17
17
  import { Context } from "../context";
18
18
  import EventName from "../event/eventName";
19
19
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -26,7 +26,7 @@ function ContrallerEvent(_ref) {
26
26
  event = _useContext.event,
27
27
  container = _useContext.container;
28
28
 
29
- var timer = useRef(null);
29
+ var timer = useRef();
30
30
 
31
31
  var _useState = useState(true),
32
32
  _useState2 = _slicedToArray(_useState, 2),
@@ -36,14 +36,14 @@ function ContrallerEvent(_ref) {
36
36
  var showContraller = function showContraller() {
37
37
  clearTimeout(timer.current);
38
38
  setVisibel(true);
39
- event.emit(EventName.SHOW_CONTRALLER);
39
+ event === null || event === void 0 ? void 0 : event.emit(EventName.SHOW_CONTRALLER);
40
40
  };
41
41
 
42
42
  var hideContraller = function hideContraller() {
43
43
  clearTimeout(timer.current);
44
44
  timer.current = setTimeout(function () {
45
45
  setVisibel(false);
46
- event.emit(EventName.HIDE_CONTRALLER);
46
+ event === null || event === void 0 ? void 0 : event.emit(EventName.HIDE_CONTRALLER);
47
47
  }, 3 * 1000);
48
48
  };
49
49