fcr-ui-scene 3.7.2 → 3.7.4-rc.1

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 (301) hide show
  1. package/lib/creator.d.ts +2 -0
  2. package/lib/creator.js +37 -44
  3. package/lib/electron/app.js +7 -0
  4. package/lib/electron/injections.d.ts +1 -1
  5. package/lib/electron/injections.js +5 -3
  6. package/lib/electron/main.js +3 -1
  7. package/lib/fragments/annotation/index.d.ts +1 -0
  8. package/lib/fragments/annotation/index.js +13 -7
  9. package/lib/fragments/annotation/libs.d.ts +7 -6
  10. package/lib/fragments/annotation/libs.js +9 -8
  11. package/lib/fragments/annotation/store.d.ts +8 -4
  12. package/lib/fragments/annotation/store.js +351 -267
  13. package/lib/fragments/annotation/toolbar/components/color-tool/index.js +4 -0
  14. package/lib/fragments/annotation/toolbar/components/graphic-tool/index.js +4 -0
  15. package/lib/fragments/annotation/toolbar/components/item/item.d.ts +2 -0
  16. package/lib/fragments/annotation/toolbar/components/item/item.js +2 -4
  17. package/lib/fragments/annotation/toolbar/components/item/style.css +4 -2
  18. package/lib/fragments/annotation/toolbar/components/pen-tool/index.js +4 -0
  19. package/lib/fragments/annotation/utils.d.ts +1 -0
  20. package/lib/fragments/annotation/utils.js +27 -0
  21. package/lib/fragments/annotation/view.js +1 -6
  22. package/lib/fragments/base.js +5 -3
  23. package/lib/fragments/whiteboard/cursor.css +77 -0
  24. package/lib/fragments/whiteboard/index.d.ts +11 -0
  25. package/lib/fragments/whiteboard/index.js +91 -0
  26. package/lib/fragments/whiteboard/store.d.ts +31 -0
  27. package/lib/fragments/whiteboard/store.js +480 -0
  28. package/lib/fragments/whiteboard/style.css +4 -0
  29. package/lib/fragments/whiteboard/view.d.ts +4 -0
  30. package/lib/fragments/whiteboard/view.js +31 -0
  31. package/lib/global.css +6 -0
  32. package/lib/index.d.ts +1 -0
  33. package/lib/index.js +1 -0
  34. package/lib/modules/action-bar/components/apps/index.js +15 -5
  35. package/lib/modules/action-bar/components/leave/index.js +4 -11
  36. package/lib/modules/action-bar/components/screen-share/submenu.js +2 -2
  37. package/lib/modules/action-bar/index.d.ts +2 -0
  38. package/lib/modules/action-bar/index.js +2 -1
  39. package/lib/modules/action-bar/store.d.ts +6 -2
  40. package/lib/modules/action-bar/store.js +56 -93
  41. package/lib/modules/action-bar/view.d.ts +1 -0
  42. package/lib/modules/action-bar/view.js +3 -2
  43. package/lib/modules/annotation/annotation-toolbar-store.d.ts +4 -11
  44. package/lib/modules/annotation/annotation-toolbar-store.js +48 -90
  45. package/lib/modules/annotation/index.d.ts +2 -0
  46. package/lib/modules/annotation/index.js +2 -2
  47. package/lib/modules/annotation/store.d.ts +11 -49
  48. package/lib/modules/annotation/store.js +144 -429
  49. package/lib/modules/annotation/view.js +3 -6
  50. package/lib/modules/audio-stream/index.js +1 -2
  51. package/lib/modules/chat/components/chat-select/index.js +3 -0
  52. package/lib/modules/components/control-bar/components/loading/index.css +76 -0
  53. package/lib/modules/components/control-bar/components/loading/index.d.ts +8 -0
  54. package/lib/modules/components/control-bar/components/loading/index.js +64 -0
  55. package/lib/modules/components/control-bar/components/loading/loading.png +0 -0
  56. package/lib/modules/components/control-bar/components/progress/index.d.ts +5 -0
  57. package/lib/modules/components/control-bar/components/progress/index.js +43 -0
  58. package/lib/modules/components/control-bar/components/progress/style.css +51 -0
  59. package/lib/modules/components/control-bar/components/switch-theme/index.css +99 -0
  60. package/lib/modules/components/control-bar/components/switch-theme/index.d.ts +9 -0
  61. package/lib/modules/components/control-bar/components/switch-theme/index.js +94 -0
  62. package/lib/modules/components/control-bar/components/switch-theme/item.d.ts +9 -0
  63. package/lib/modules/components/control-bar/components/switch-theme/item.js +54 -0
  64. package/lib/modules/components/control-bar/components/switch-theme/libs.d.ts +4 -0
  65. package/lib/modules/components/control-bar/components/switch-theme/libs.js +31 -0
  66. package/lib/modules/components/control-bar/index.css +87 -0
  67. package/lib/modules/components/control-bar/index.d.ts +20 -0
  68. package/lib/modules/components/control-bar/index.js +276 -0
  69. package/lib/modules/components/device-control/store.js +2 -2
  70. package/lib/modules/components/leave-meeting/components/index.css +0 -9
  71. package/lib/modules/components/leave-meeting/index.d.ts +2 -1
  72. package/lib/modules/components/leave-meeting/index.js +19 -8
  73. package/lib/modules/components/leave-meeting/portal.d.ts +6 -0
  74. package/lib/modules/components/leave-meeting/portal.js +29 -0
  75. package/lib/modules/components/leave-meeting/style.css +9 -0
  76. package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +5 -2
  77. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +19 -9
  78. package/lib/modules/components/member-window/components/member-actions/components/share-status.js +4 -4
  79. package/lib/modules/components/member-window/components/member-actions/index.js +13 -6
  80. package/lib/modules/components/member-window/components/member-actions/provider.d.ts +1 -0
  81. package/lib/modules/components/member-window/components/member-actions/provider.js +4 -3
  82. package/lib/modules/components/member-window/components/member-actions/store.d.ts +2 -1
  83. package/lib/modules/components/member-window/components/member-actions/store.js +5 -1
  84. package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.d.ts +6 -4
  85. package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.js +77 -41
  86. package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.d.ts +3 -3
  87. package/lib/modules/components/member-window/components/video-player/index.d.ts +3 -3
  88. package/lib/modules/components/member-window/index.css +4 -0
  89. package/lib/modules/components/member-window/types.d.ts +9 -5
  90. package/lib/modules/components/toolbar/components/capture-tool/index.d.ts +9 -0
  91. package/lib/modules/components/toolbar/components/capture-tool/index.js +68 -0
  92. package/lib/modules/components/toolbar/components/clean-tool/index.d.ts +11 -0
  93. package/lib/modules/components/toolbar/components/clean-tool/index.js +71 -0
  94. package/lib/modules/components/toolbar/components/color-tool/color-panel/index.d.ts +11 -0
  95. package/lib/modules/components/toolbar/components/color-tool/color-panel/index.js +77 -0
  96. package/lib/modules/components/toolbar/components/color-tool/index.d.ts +14 -0
  97. package/lib/modules/components/toolbar/components/color-tool/index.js +66 -0
  98. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +11 -0
  99. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.js +64 -0
  100. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +12 -0
  101. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.js +65 -0
  102. package/lib/modules/components/toolbar/components/graphic-tool/index.d.ts +15 -0
  103. package/lib/modules/components/toolbar/components/graphic-tool/index.js +82 -0
  104. package/lib/modules/components/toolbar/components/group-tool/index.d.ts +5 -0
  105. package/lib/modules/components/toolbar/components/group-tool/index.js +43 -0
  106. package/lib/modules/components/toolbar/components/icons/fold-icon.d.ts +2 -0
  107. package/lib/modules/components/toolbar/components/icons/fold-icon.js +41 -0
  108. package/lib/modules/components/toolbar/components/icons/move-icon.d.ts +1 -0
  109. package/lib/modules/components/toolbar/components/icons/move-icon.js +66 -0
  110. package/lib/modules/components/toolbar/components/item/index.d.ts +25 -0
  111. package/lib/modules/components/toolbar/components/item/index.js +165 -0
  112. package/lib/modules/components/toolbar/components/item/style.css +94 -0
  113. package/lib/modules/components/toolbar/components/multiple-color-tool/index.d.ts +12 -0
  114. package/lib/modules/components/toolbar/components/multiple-color-tool/index.js +75 -0
  115. package/lib/modules/components/toolbar/components/panel/index.d.ts +9 -0
  116. package/lib/modules/components/toolbar/components/panel/index.js +28 -0
  117. package/lib/modules/components/toolbar/components/panel/style.css +86 -0
  118. package/lib/modules/components/toolbar/components/pen-tool/index.d.ts +13 -0
  119. package/lib/modules/components/toolbar/components/pen-tool/index.js +62 -0
  120. package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.d.ts +8 -0
  121. package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.js +39 -0
  122. package/lib/modules/components/toolbar/components/save-draft/index.d.ts +7 -0
  123. package/lib/modules/components/toolbar/components/save-draft/index.js +59 -0
  124. package/lib/modules/components/toolbar/components/vertical-frame/index.d.ts +8 -0
  125. package/lib/modules/components/toolbar/components/vertical-frame/index.js +179 -0
  126. package/lib/modules/components/toolbar/hooks/use-resize-visible.d.ts +4 -0
  127. package/lib/modules/components/toolbar/hooks/use-resize-visible.js +59 -0
  128. package/lib/modules/components/toolbar/index.d.ts +29 -0
  129. package/lib/modules/components/toolbar/index.js +258 -0
  130. package/lib/modules/components/toolbar/style.css +85 -0
  131. package/lib/modules/components/toolbar/types.d.ts +13 -0
  132. package/lib/modules/components/toolbar/types.js +6 -0
  133. package/lib/modules/control-bar/components/more-actions/index.js +0 -6
  134. package/lib/modules/control-bar/components/share-state-nav/index.js +3 -2
  135. package/lib/modules/control-bar/index.js +2 -1
  136. package/lib/modules/control-bar/store.d.ts +15 -12
  137. package/lib/modules/control-bar/store.js +68 -29
  138. package/lib/modules/control-bar/view.js +33 -67
  139. package/lib/modules/device-pretest/store.js +4 -2
  140. package/lib/modules/dialog/components/dialog-container/component/body.js +3 -24
  141. package/lib/modules/dialog/components/dialog-container/index.d.ts +4 -0
  142. package/lib/modules/dialog/components/dialog-container/index.js +67 -44
  143. package/lib/modules/dialog/components/normal-window/index.js +4 -0
  144. package/lib/modules/dialog/dialogs/control-bar/index.d.ts +1 -0
  145. package/lib/modules/dialog/dialogs/control-bar/index.js +26 -35
  146. package/lib/modules/dialog/dialogs/participant/components/title.js +1 -1
  147. package/lib/modules/dialog/dialogs/sub-window/index.d.ts +2 -0
  148. package/lib/modules/dialog/dialogs/sub-window/index.js +102 -0
  149. package/lib/modules/dialog/dialogs/video-window/index.d.ts +1 -0
  150. package/lib/modules/dialog/dialogs/video-window/index.js +31 -25
  151. package/lib/modules/dialog/dialogs/whiteboard/index.js +0 -1
  152. package/lib/modules/dialog/hooks/use-popover-watcher.js +1 -2
  153. package/lib/modules/dialog/hooks/useElectron.d.ts +13 -0
  154. package/lib/modules/dialog/hooks/useElectron.js +66 -13
  155. package/lib/modules/dialog/index.d.ts +6 -3
  156. package/lib/modules/dialog/index.js +5 -3
  157. package/lib/modules/dialog/level-config.js +1 -1
  158. package/lib/modules/dialog/store.d.ts +23 -9
  159. package/lib/modules/dialog/store.js +84 -12
  160. package/lib/modules/dialog/type.d.ts +8 -0
  161. package/lib/modules/event-confirm/components/window/index.d.ts +5 -2
  162. package/lib/modules/event-confirm/components/window/index.js +38 -14
  163. package/lib/modules/event-confirm/index.css +3 -2
  164. package/lib/modules/event-confirm/store.d.ts +10 -5
  165. package/lib/modules/event-confirm/store.js +68 -20
  166. package/lib/modules/event-confirm/view.js +10 -8
  167. package/lib/modules/event-sound/index.d.ts +1 -0
  168. package/lib/modules/event-sound/index.js +11 -24
  169. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +1 -2
  170. package/lib/modules/interpreter/store.js +11 -13
  171. package/lib/modules/invite/components/pstn-invite.js +0 -1
  172. package/lib/modules/layout/components/CommonVideoRenderer.js +26 -26
  173. package/lib/modules/layout/components/who-is-speaking.js +3 -6
  174. package/lib/modules/layout/index.d.ts +3 -1
  175. package/lib/modules/layout/index.js +2 -1
  176. package/lib/modules/layout/store.d.ts +7 -59
  177. package/lib/modules/layout/store.js +133 -45
  178. package/lib/modules/layout/type.d.ts +55 -0
  179. package/lib/modules/participant/components/can-moveable/index.js +0 -1
  180. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +4 -2
  181. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +14 -2
  182. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +1 -1
  183. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +3 -2
  184. package/lib/modules/participant/components/participants/components/participants/index.js +3 -2
  185. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +1 -0
  186. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +3 -1
  187. package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +4 -2
  188. package/lib/modules/participant/components/participants/components/render-user/index.d.ts +4 -2
  189. package/lib/modules/participant/components/participants/components/render-user/index.js +5 -3
  190. package/lib/modules/participant/components/participants/index.js +5 -2
  191. package/lib/modules/participant/components/participants/types.d.ts +3 -0
  192. package/lib/modules/participant/index.d.ts +2 -0
  193. package/lib/modules/participant/index.js +2 -1
  194. package/lib/modules/participant/member-list-data-source.js +3 -5
  195. package/lib/modules/participant/store.d.ts +5 -1
  196. package/lib/modules/participant/store.js +51 -44
  197. package/lib/modules/secondary-window/index.d.ts +50 -0
  198. package/lib/modules/secondary-window/index.js +113 -0
  199. package/lib/modules/secondary-window/store.d.ts +76 -0
  200. package/lib/modules/secondary-window/store.js +407 -0
  201. package/lib/modules/secondary-window/type.d.ts +110 -0
  202. package/lib/modules/secondary-window/type.js +35 -0
  203. package/lib/modules/secondary-window/view.d.ts +6 -0
  204. package/lib/modules/secondary-window/view.js +257 -0
  205. package/lib/modules/setting/audio-settings/audio-settings.js +4 -2
  206. package/lib/modules/setting/config.d.ts +4 -0
  207. package/lib/modules/setting/config.js +6 -3
  208. package/lib/modules/setting/general-settings/general-settings.js +9 -0
  209. package/lib/modules/setting/state/index.js +0 -10
  210. package/lib/modules/setting/store.d.ts +9 -3
  211. package/lib/modules/setting/store.js +110 -77
  212. package/lib/modules/setting/view.js +3 -2
  213. package/lib/modules/share-screen/components/control-bar/index.d.ts +14 -1
  214. package/lib/modules/share-screen/components/control-bar/index.js +17 -12
  215. package/lib/modules/share-screen/components/selection/index.js +16 -23
  216. package/lib/modules/share-screen/index.d.ts +4 -1
  217. package/lib/modules/share-screen/index.js +6 -3
  218. package/lib/modules/share-screen/store.d.ts +18 -19
  219. package/lib/modules/share-screen/store.js +101 -151
  220. package/lib/modules/share-screen/types.d.ts +7 -8
  221. package/lib/modules/state-bar/index.d.ts +2 -0
  222. package/lib/modules/state-bar/index.js +2 -1
  223. package/lib/modules/state-bar/live-streaming-state.js +0 -1
  224. package/lib/modules/state-bar/store.d.ts +5 -2
  225. package/lib/modules/state-bar/store.js +14 -7
  226. package/lib/modules/state-bar/view.js +3 -3
  227. package/lib/modules/video-window/components/members/index.js +10 -15
  228. package/lib/modules/video-window/store.d.ts +1 -0
  229. package/lib/modules/video-window/store.js +8 -3
  230. package/lib/modules/whiteboard/components/control-bar/store.d.ts +3 -0
  231. package/lib/modules/whiteboard/components/control-bar/store.js +20 -11
  232. package/lib/modules/whiteboard/components/toolbar/store.d.ts +2 -2
  233. package/lib/modules/whiteboard/components/toolbar/store.js +2 -2
  234. package/lib/modules/whiteboard/index.d.ts +20 -17
  235. package/lib/modules/whiteboard/index.js +167 -132
  236. package/lib/plugins/module-dev-plugin.js +4 -0
  237. package/lib/providers/ability-provider.js +2 -0
  238. package/lib/providers/annotation-provider.js +3 -3
  239. package/lib/providers/device-privilege-provider.js +13 -12
  240. package/lib/providers/device-provider.d.ts +40 -31
  241. package/lib/providers/device-provider.js +657 -713
  242. package/lib/providers/device-stream-provider.js +4 -4
  243. package/lib/providers/interpreter-provider.js +7 -9
  244. package/lib/providers/multi-display-provider.d.ts +90 -0
  245. package/lib/providers/multi-display-provider.js +593 -0
  246. package/lib/providers/privilege-provider.d.ts +3 -11
  247. package/lib/providers/privilege-provider.js +3 -12
  248. package/lib/providers/renderer-provider.d.ts +3 -3
  249. package/lib/providers/renderer-provider.js +20 -32
  250. package/lib/providers/room-provider.js +21 -16
  251. package/lib/providers/screen-share-provider.d.ts +15 -11
  252. package/lib/providers/screen-share-provider.js +118 -99
  253. package/lib/providers/sharing-provider.d.ts +7 -1
  254. package/lib/providers/sharing-provider.js +39 -3
  255. package/lib/providers/whiteboard-provider.d.ts +24 -0
  256. package/lib/providers/whiteboard-provider.js +128 -0
  257. package/lib/runtime.d.ts +1 -0
  258. package/lib/scenes/main-scene.d.ts +6 -0
  259. package/lib/scenes/main-scene.js +44 -2
  260. package/lib/scenes/waiting-scene.d.ts +0 -2
  261. package/lib/scenes/waiting-scene.js +0 -6
  262. package/lib/schema.d.ts +3 -3
  263. package/lib/schema.js +1 -1
  264. package/lib/shared-data-source/confirm-data.d.ts +19 -0
  265. package/lib/shared-data-source/confirm-data.js +119 -15
  266. package/lib/shared-data-source/member-data.d.ts +2 -2
  267. package/lib/shared-data-source/screen-share-data.d.ts +35 -28
  268. package/lib/shared-data-source/screen-share-data.js +19 -8
  269. package/lib/shared-data-source/setting.js +4 -3
  270. package/lib/shared-data-source/video-window.js +1 -2
  271. package/lib/shared-data-source/whiteboard-data.d.ts +70 -0
  272. package/lib/shared-data-source/whiteboard-data.js +348 -0
  273. package/lib/translations/enUS.d.ts +1 -0
  274. package/lib/translations/enUS.js +2 -1
  275. package/lib/translations/zhCN.d.ts +1 -0
  276. package/lib/translations/zhCN.js +2 -1
  277. package/lib/ui-scene.d.ts +1 -0
  278. package/lib/ui-scene.js +77 -24
  279. package/lib/utilities/constant.d.ts +9 -2
  280. package/lib/utilities/constant.js +10 -3
  281. package/lib/utilities/debug.d.ts +4 -0
  282. package/lib/utilities/debug.js +40 -0
  283. package/lib/utilities/default-config.d.ts +4 -0
  284. package/lib/utilities/default-config.js +8 -4
  285. package/lib/utilities/dialog-utils.d.ts +3 -2
  286. package/lib/utilities/dialog-utils.js +56 -15
  287. package/lib/utilities/meeting-detail.js +4 -1
  288. package/lib/utilities/package-info.d.ts +3 -0
  289. package/lib/utilities/package-info.js +15 -0
  290. package/lib/utilities/renderer-event.d.ts +4 -6
  291. package/lib/utilities/renderer-event.js +23 -43
  292. package/lib/utilities/renderer.d.ts +1 -1
  293. package/lib/utilities/renderer.js +44 -10
  294. package/lib/utilities/shared-storage.d.ts +18 -0
  295. package/lib/utilities/shared-storage.js +63 -0
  296. package/lib/utilities/tools.js +2 -1
  297. package/lib/waiting-room-control-manager.js +6 -6
  298. package/package.json +6 -7
  299. package/public/index.html +5 -0
  300. package/lib/electron/tools.d.ts +0 -5
  301. package/lib/electron/tools.js +0 -62
@@ -3,8 +3,6 @@
3
3
  require("core-js/modules/es.symbol.js");
4
4
  require("core-js/modules/es.symbol.description.js");
5
5
  require("core-js/modules/es.symbol.to-primitive.js");
6
- require("core-js/modules/es.error.cause.js");
7
- require("core-js/modules/es.error.to-string.js");
8
6
  require("core-js/modules/es.array.filter.js");
9
7
  require("core-js/modules/es.array.for-each.js");
10
8
  require("core-js/modules/es.array.is-array.js");
@@ -19,6 +17,7 @@ require("core-js/modules/es.object.define-properties.js");
19
17
  require("core-js/modules/es.object.define-property.js");
20
18
  require("core-js/modules/es.object.get-own-property-descriptor.js");
21
19
  require("core-js/modules/es.object.get-own-property-descriptors.js");
20
+ require("core-js/modules/es.object.keys.js");
22
21
  require("core-js/modules/esnext.function.metadata.js");
23
22
  require("core-js/modules/esnext.iterator.constructor.js");
24
23
  require("core-js/modules/esnext.iterator.filter.js");
@@ -46,26 +45,27 @@ Object.defineProperty(exports, "__esModule", {
46
45
  });
47
46
  exports.FragmentAnnotationStoreContext = exports.FragmentAnnotationStore = void 0;
48
47
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
49
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
50
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
51
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
52
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
53
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
48
+ require("core-js/modules/es.error.cause.js");
49
+ require("core-js/modules/es.error.to-string.js");
54
50
  require("core-js/modules/es.array.concat.js");
55
51
  require("core-js/modules/es.array.iterator.js");
56
52
  require("core-js/modules/es.date.now.js");
57
53
  require("core-js/modules/es.date.to-json.js");
58
54
  require("core-js/modules/es.json.stringify.js");
59
- require("core-js/modules/es.object.keys.js");
60
55
  require("core-js/modules/es.object.to-string.js");
56
+ require("core-js/modules/es.promise.js");
61
57
  require("core-js/modules/es.regexp.exec.js");
62
58
  require("core-js/modules/es.string.iterator.js");
63
59
  require("core-js/modules/es.weak-map.js");
64
- require("core-js/modules/esnext.json.parse.js");
65
60
  require("core-js/modules/esnext.weak-map.delete-all.js");
66
61
  require("core-js/modules/esnext.weak-map.emplace.js");
67
62
  require("core-js/modules/web.dom-collections.iterator.js");
68
63
  require("core-js/modules/web.timers.js");
64
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
65
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
66
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
67
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
68
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
69
69
  var _react = require("react");
70
70
  var _imports = require("fcr-core/lib/imports");
71
71
  var _mobx = require("mobx");
@@ -77,8 +77,12 @@ var _rendererEvent = require("../../utilities/renderer-event");
77
77
  var _constant = require("../../utilities/constant");
78
78
  var _asyncRetry = require("agora-foundation/lib/utilities/async-retry");
79
79
  var _logger = require("../../utilities/logger");
80
+ var _utils = require("./utils");
81
+ var _electronRtcPlugin = require("fcr-core/lib/plugins/electron-rtc-plugin");
82
+ var _rtmPlugin = require("fcr-core/lib/plugins/rtm-plugin");
83
+ var _sharedStorage = require("../../utilities/shared-storage");
80
84
  var _FragmentAnnotationStore;
81
- var _initProto, _init_joined, _init_bounds, _init_currentTool, _init_isIgnore, _init_drawing, _handleBoardDomLoadDecs, _closeDecs, _hideDecs, _showDecs, _handleSetToolDecs, _ref;
85
+ var _initProto, _init_joined, _init_bounds, _init_currentTool, _init_drawing, _handleBoardDomLoadDecs, _closeDecs, _hideDecs, _showDecs, _handleSetToolDecs, _ref;
82
86
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
83
87
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
84
88
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
@@ -91,31 +95,14 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
91
95
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
92
96
  function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
93
97
  function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
94
- var startPolling = function startPolling(pollingMethod) {
95
- var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30000;
96
- var interval = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;
97
- pollingMethod();
98
- var startTime = Date.now();
99
- var timer = setInterval(function () {
100
- var elapsed = Date.now() - startTime;
101
- if (elapsed >= duration) {
102
- clearInterval(timer);
103
- return;
104
- }
105
- pollingMethod();
106
- }, interval);
107
- return function () {
108
- clearInterval(timer);
109
- };
110
- };
111
98
  var _A = /*#__PURE__*/new WeakMap();
112
99
  var _B = /*#__PURE__*/new WeakMap();
113
100
  var _C = /*#__PURE__*/new WeakMap();
114
101
  var _D = /*#__PURE__*/new WeakMap();
115
- var _E = /*#__PURE__*/new WeakMap();
116
102
  _ref = (_handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _closeDecs = [_mobx.action, _mobx.action.bound], _hideDecs = [_mobx.action, _mobx.action.bound], _showDecs = [_mobx.action, _mobx.action.bound], _handleSetToolDecs = [(0, _decorator.debounced)(300), _decorator.bound], "logger");
117
103
  var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/function () {
118
104
  function FragmentAnnotationStore() {
105
+ var _this = this;
119
106
  (0, _classCallCheck2["default"])(this, FragmentAnnotationStore);
120
107
  (0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createFragmentLogger)({
121
108
  prefix: 'AnnotationFragmentStore'
@@ -133,40 +120,20 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
133
120
  height: 600
134
121
  }));
135
122
  _classPrivateFieldInitSpec(this, _C, _init_currentTool(this, 'none'));
136
- _classPrivateFieldInitSpec(this, _D, _init_isIgnore(this, false));
137
- _classPrivateFieldInitSpec(this, _E, _init_drawing(this, false));
123
+ _classPrivateFieldInitSpec(this, _D, _init_drawing(this, false));
138
124
  (0, _defineProperty2["default"])(this, "_hasWaitingOpen", false);
139
125
  (0, _defineProperty2["default"])(this, "_lastViewPortSet", {
140
126
  width: 0,
141
127
  height: 0
142
128
  });
143
- (0, _defineProperty2["default"])(this, "_currentAnntationView", null);
144
129
  (0, _defineProperty2["default"])(this, "_pollingCancelHandler", function () {});
145
- var annotationRtmAppId = localStorage.getItem('annotation_rtm_app_id') || '';
146
- var boardOptions = localStorage.getItem('board_options');
147
- var appId = JSON.parse(annotationRtmAppId);
148
- this.logger.info("annotationRtmAppId => ".concat(appId));
149
- var _JSON$parse = JSON.parse(boardOptions || '{}'),
150
- boardAppId = _JSON$parse.boardAppId,
151
- boardId = _JSON$parse.boardId,
152
- boardRegion = _JSON$parse.boardRegion,
153
- boardToken = _JSON$parse.boardToken,
154
- boardUserToken = _JSON$parse.boardUserToken,
155
- userId = _JSON$parse.boardUserUuid;
156
- this._config = {
157
- appId: appId,
158
- userId: userId,
159
- region: boardRegion,
160
- appIdentifier: boardAppId,
161
- boardId: boardId,
162
- boardToken: boardToken
163
- };
164
- this.logger.info("boardinfo => ".concat(JSON.stringify(this._config)));
165
- this._init(this._initEngine({
166
- userId: userId,
167
- roomToken: boardUserToken,
168
- appId: appId
169
- }));
130
+ (0, _defineProperty2["default"])(this, "_checkForConnectTaskInterval", _imports.AgoraScheduler.Duration.second(1));
131
+ (0, _defineProperty2["default"])(this, "_isEngineInitialized", false);
132
+ (0, _defineProperty2["default"])(this, "_openAbortController", null);
133
+ (0, _defineProperty2["default"])(this, "_openLock", false);
134
+ this._checkForConnectTask = _imports.AgoraScheduler.shared.addIntervalTask(function () {
135
+ _this._checkForConnect();
136
+ }, this._checkForConnectTaskInterval);
170
137
  }
171
138
  return (0, _createClass2["default"])(FragmentAnnotationStore, [{
172
139
  key: "joined",
@@ -193,77 +160,79 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
193
160
  _classPrivateFieldSet(_C, this, v);
194
161
  }
195
162
  }, {
196
- key: "isIgnore",
163
+ key: "drawing",
197
164
  get: function get() {
198
165
  return _classPrivateFieldGet(_D, this);
199
166
  },
200
167
  set: function set(v) {
201
168
  _classPrivateFieldSet(_D, this, v);
202
169
  }
203
- }, {
204
- key: "drawing",
205
- get: function get() {
206
- return _classPrivateFieldGet(_E, this);
207
- },
208
- set: function set(v) {
209
- _classPrivateFieldSet(_E, this, v);
210
- }
211
170
  }, {
212
171
  key: "open",
213
172
  value: function () {
214
173
  var _open = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
215
- var visible, _this$_resizeToMax, boundsWidth, boundsHeight, whiteboard, _this$_boardDom;
174
+ var _this2 = this;
175
+ var visible, boardRoom, _this$_resizeToMax, boundsWidth, boundsHeight, width, height, whiteboard, _t;
216
176
  return _regenerator["default"].wrap(function (_context) {
217
177
  while (1) switch (_context.prev = _context.next) {
218
178
  case 0:
219
- visible = window.runtime.browserWindow.isVisible();
220
- this.logger.info("[annotation-fragment][open]: open method is called, the init bounds is =>, ".concat(JSON.stringify(this.bounds), ", visible ").concat(visible));
221
- if (!visible) {
179
+ if (!(this._openLock || this.joined)) {
222
180
  _context.next = 1;
223
181
  break;
224
182
  }
225
183
  return _context.abrupt("return");
226
184
  case 1:
185
+ this._openLock = true;
186
+ _context.prev = 2;
187
+ visible = window.runtime.browserWindow.isVisible();
188
+ this.logger.info("open method is called, the init bounds is =>, ".concat(JSON.stringify(this.bounds), ", visible ").concat(visible));
189
+ if (!visible) {
190
+ _context.next = 3;
191
+ break;
192
+ }
193
+ return _context.abrupt("return");
194
+ case 3:
227
195
  this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
228
196
  this.currentTool = 'curve';
229
197
  window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
230
198
  this.setIgnore(true);
231
199
  this._hasWaitingOpen = !this._engine;
232
200
  if (this._engine) {
233
- _context.next = 2;
234
- break;
235
- }
236
- this.logger.info("[annotation-fragment][open]: this._engine is null, so open fail,\n cannot draw, we will reopen after engine connected");
237
- return _context.abrupt("return");
238
- case 2:
239
- this.logger.info('[annotation-fragment][open]: this._engine is initialized, show annotation window');
240
- window.runtime.browserWindow.show();
241
- case 3:
242
- this.logger.info("[annotation-fragment][open]: this._joined ".concat(this.joined));
243
- if (!this.joined) {
244
201
  _context.next = 4;
245
202
  break;
246
203
  }
204
+ this.logger.info("this._engine is null, so open fail, cannot draw, we will reopen after engine connected");
247
205
  return _context.abrupt("return");
248
206
  case 4:
249
- if (this._boardRoom) {
250
- _context.next = 5;
251
- break;
252
- }
253
- _context.next = 5;
254
- return this._initBoardRoom();
207
+ this.logger.info('this._engine is initialized, show annotation window');
208
+ window.runtime.browserWindow.show();
255
209
  case 5:
256
- if (this._boardRoom) {
210
+ if (!this._boardRoom) {
257
211
  _context.next = 6;
258
212
  break;
259
213
  }
260
- return _context.abrupt("return", this.logger.error("[annotation-fragment][open]: this._boardRoom is not initialized, ".concat(this._boardRoom)));
214
+ throw new Error('state is not in sync, joined state is false, but boardRoom is not null');
261
215
  case 6:
262
- _this$_resizeToMax = this._resizeToMax(this.bounds.width, this.bounds.height, 1920), boundsWidth = _this$_resizeToMax.width, boundsHeight = _this$_resizeToMax.height;
263
216
  _context.next = 7;
264
- return this._boardRoom.applicationManager.launchApplication(_imports.FcrWhiteboardApplication, {
265
- width: boundsWidth,
266
- height: boundsHeight,
217
+ return this._initBoardRoom();
218
+ case 7:
219
+ boardRoom = _context.sent;
220
+ this._boardRoom = boardRoom;
221
+ _this$_resizeToMax = this._resizeToMax(this.bounds.width, this.bounds.height, 1920), boundsWidth = _this$_resizeToMax.width, boundsHeight = _this$_resizeToMax.height;
222
+ width = boundsWidth;
223
+ height = boundsHeight;
224
+ if (!boundsWidth) {
225
+ this.logger.warn("boundsWidth is a invalid value: ".concat(boundsWidth, ", use default width 800"));
226
+ width = 800;
227
+ }
228
+ if (!boundsHeight) {
229
+ this.logger.warn("boundsHeight is a invalid value: ".concat(boundsHeight, ", use default height 600"));
230
+ height = 600;
231
+ }
232
+ _context.next = 8;
233
+ return boardRoom.applicationManager.launchApplication(_imports.FcrWhiteboardApplication, {
234
+ width: width,
235
+ height: height,
267
236
  defaultToolbarStyle: {
268
237
  tool: 'curve',
269
238
  strokeColor: '#FFC908',
@@ -271,31 +240,55 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
271
240
  },
272
241
  maxScaleRatio: 1
273
242
  }, this._FORGE_WHITEBOARD_APP_ID);
274
- case 7:
243
+ case 8:
275
244
  whiteboard = _context.sent;
276
- this.logger.info("[annotation-fragment][open]: whiteboard launch success");
277
- if (whiteboard) {
278
- this._boardView.classList.add('fcr-whiteboard-window-view');
279
- this._currentAnntationView = whiteboard.view;
280
- this._boardView.appendChild(this._currentAnntationView);
281
- (_this$_boardDom = this._boardDom) === null || _this$_boardDom === void 0 || _this$_boardDom.appendChild(this._boardView);
282
- this._boardInstance = whiteboard;
283
- // @ts-ignore
284
- window._boardInstance = this._boardInstance;
285
- this._initBoardStyle(whiteboard);
286
- this.joined = true;
287
- this.logger.info("[annotation-fragment][open]: mount success, the joined is ".concat(this.joined));
288
- // 共享发起端 开启标注时,重置30s轮询updateWindowSize
289
- this._handlePollingUpdateWindowSize('sender-board-room-init');
290
- this._syncScreenShareOwnerOpenDone();
245
+ this._boardInstance = whiteboard;
246
+ this.logger.info("whiteboard launch success");
247
+ this._boardView.classList.add('fcr-whiteboard-window-view');
248
+ this._boardView.appendChild(whiteboard.view);
249
+ if (this._boardDom) {
250
+ _context.next = 9;
251
+ break;
291
252
  }
292
- this._boardRoom.applicationManager.on('launch', this._launchHandler);
293
- this._boardRoom.applicationManager.on('terminal', this._terminalHandler);
294
- case 8:
253
+ throw new Error('cannot mount board view, boardDom is not set');
254
+ case 9:
255
+ this._boardDom.appendChild(this._boardView);
256
+
257
+ // @ts-ignore
258
+ window._boardInstance = this._boardInstance;
259
+ this._initBoardStyle(whiteboard);
260
+
261
+ // 共享发起端 开启标注时,重置30s轮询updateWindowSize
262
+ this._handlePollingUpdateWindowSize('sender-board-room-init');
263
+ this._syncScreenShareOwnerOpenDone();
264
+ boardRoom.applicationManager.on('launch', this._launchHandler);
265
+ boardRoom.applicationManager.on('terminal', this._terminalHandler);
266
+ // workaround
267
+ setTimeout(function () {
268
+ _this2.logger.info('clear page');
269
+ whiteboard.clearPage();
270
+ });
271
+ this.joined = true;
272
+ _context.next = 11;
273
+ break;
274
+ case 10:
275
+ _context.prev = 10;
276
+ _t = _context["catch"](2);
277
+ this._boardInstance = null;
278
+ this._boardRoom = null;
279
+ this.joined = false;
280
+ this.logger.error("open failed, error: ".concat(_t));
281
+ throw _t;
282
+ case 11:
283
+ _context.prev = 11;
284
+ this._openLock = false;
285
+ this.logger.info("open method is finished");
286
+ return _context.finish(11);
287
+ case 12:
295
288
  case "end":
296
289
  return _context.stop();
297
290
  }
298
- }, _callee, this);
291
+ }, _callee, this, [[2, 10, 11, 12]]);
299
292
  }));
300
293
  function open() {
301
294
  return _open.apply(this, arguments);
@@ -311,47 +304,48 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
311
304
  key: "close",
312
305
  value: function () {
313
306
  var _close = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
314
- var _this$_boardRoom, _this$_boardRoom2, _this$_boardRoom3, _t;
307
+ var boardInstance, boardRoom;
315
308
  return _regenerator["default"].wrap(function (_context2) {
316
309
  while (1) switch (_context2.prev = _context2.next) {
317
310
  case 0:
318
- _context2.prev = 0;
319
- this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
320
- if (this._boardInstance) {
321
- this._boardInstance.clearPage();
322
- this.logger.info('[annotation-fragment][close]: clearPage');
323
- }
324
- this.joined = false;
325
- this.currentTool = 'curve';
326
- // this._boardRoom?.applicationManager.terminateApplication(this._FORGE_WHITEBOARD_APP_ID);
327
- if (this._currentAnntationView && this._boardView.hasChildNodes()) {
328
- this._boardView.removeChild(this._currentAnntationView);
311
+ try {
312
+ if (this._openAbortController) {
313
+ this._openAbortController.abort();
314
+ this._openAbortController = null;
315
+ }
316
+ this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
317
+ boardInstance = this._boardInstance;
318
+ boardRoom = this._boardRoom;
319
+ if (boardInstance) {
320
+ try {
321
+ this._boardView.removeChild(boardInstance.view);
322
+ } catch (domError) {
323
+ this.logger.warn('failed to remove board view', domError);
324
+ }
325
+ boardInstance.clearPage();
326
+ }
327
+ if (boardRoom) {
328
+ boardRoom.applicationManager.removeListener('launch', this._launchHandler);
329
+ boardRoom.applicationManager.removeListener('terminal', this._terminalHandler);
330
+ boardRoom.leaveRoom();
331
+ this.logger.info(// @ts-ignore
332
+ "leaveRoom, ".concat(boardRoom['traceId']));
333
+ }
334
+ this._boardInstance = null;
335
+ this._boardRoom = null;
336
+ this.joined = false;
337
+ this.currentTool = 'curve';
338
+ } catch (e) {
339
+ this.logger.error('catch error', e);
340
+ } finally {
341
+ window.runtime.browserWindow.hide();
342
+ this.logger.info('close annotation window');
329
343
  }
330
- _context2.next = 1;
331
- return (_this$_boardRoom = this._boardRoom) === null || _this$_boardRoom === void 0 ? void 0 : _this$_boardRoom.leaveRoom();
332
344
  case 1:
333
- this.logger.info(// @ts-ignore
334
- "[annotation-fragment][close] leaveRoom , ".concat(this._boardRoom['traceId']));
335
- (_this$_boardRoom2 = this._boardRoom) === null || _this$_boardRoom2 === void 0 || _this$_boardRoom2.applicationManager.removeListener('launch', this._launchHandler);
336
- (_this$_boardRoom3 = this._boardRoom) === null || _this$_boardRoom3 === void 0 || _this$_boardRoom3.applicationManager.removeListener('terminal', this._terminalHandler);
337
- this._boardInstance = null;
338
- this._boardRoom = null;
339
- _context2.next = 3;
340
- break;
341
- case 2:
342
- _context2.prev = 2;
343
- _t = _context2["catch"](0);
344
- this.logger.info('[annotation-fragment][close]: catch error', _t);
345
- case 3:
346
- _context2.prev = 3;
347
- window.runtime.browserWindow.hide();
348
- this.logger.info('[annotation-fragment][close]: close annotation window');
349
- return _context2.finish(3);
350
- case 4:
351
345
  case "end":
352
346
  return _context2.stop();
353
347
  }
354
- }, _callee2, this, [[0, 2, 3, 4]]);
348
+ }, _callee2, this);
355
349
  }));
356
350
  function close() {
357
351
  return _close.apply(this, arguments);
@@ -362,25 +356,26 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
362
356
  key: "hide",
363
357
  value: function hide() {
364
358
  window.runtime.browserWindow.hide();
365
- this.logger.info('[annotation-fragment][open]: hide annotation window');
359
+ this.logger.info('hide annotation window');
366
360
  }
367
361
  }, {
368
362
  key: "show",
369
363
  value: function show() {
370
364
  window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
371
365
  window.runtime.browserWindow.show();
372
- this.logger.info('[annotation-fragment][open]: show annotation window');
366
+ this.logger.info('show annotation window');
373
367
  }
374
368
  }, {
375
369
  key: "focus",
376
370
  value: function focus() {
371
+ this.logger.info('focus annotation window');
377
372
  window.runtime.browserWindow.focus();
378
373
  }
379
374
  }, {
380
375
  key: "setBounds",
381
376
  value: function setBounds(bounds) {
382
377
  this.bounds = bounds;
383
- this.logger.info("[annotation-fragment][setBounds]: bounds is changed =>, ".concat(JSON.stringify(bounds)));
378
+ this.logger.info("bounds is changed =>, ".concat(JSON.stringify(bounds)));
384
379
  window.runtime.browserWindow.setBounds(bounds);
385
380
  this._updateBoardElBySize({
386
381
  width: bounds.width,
@@ -402,28 +397,27 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
402
397
  }, {
403
398
  key: "_updateWindowSize",
404
399
  value: function _updateWindowSize(paramWidth, paramHeight) {
405
- var _this$_boardInstance;
406
400
  if (!paramWidth || !paramHeight) {
407
401
  return;
408
402
  }
409
- // if (
410
- // paramWidth !== this._lastViewPortSet.width ||
411
- // paramHeight !== this._lastViewPortSet.height
412
- // ) {
413
403
  this._lastViewPortSet.width = paramWidth;
414
404
  this._lastViewPortSet.height = paramHeight;
415
- this.logger.info("[annotation-fragment][_updateWindowSize]: updateViewport width:".concat(paramWidth, " height:").concat(paramHeight));
416
- (_this$_boardInstance = this._boardInstance) === null || _this$_boardInstance === void 0 || _this$_boardInstance.updateViewport(paramWidth, paramHeight);
417
- // }
405
+ if (this._boardInstance) {
406
+ this.logger.info("updateViewport width:".concat(paramWidth, " height:").concat(paramHeight));
407
+ this._boardInstance.updateViewport(paramWidth, paramHeight);
408
+ } else {
409
+ this.logger.error('cannot updateViewport, _boardInstance is null');
410
+ }
418
411
  }
419
412
  }, {
420
413
  key: "_updateBoardElBySize",
421
414
  value: function _updateBoardElBySize(size) {
422
415
  if (size) {
423
- var _this$_boardInstance2;
416
+ var _this$_boardInstance;
417
+ this.logger.info('update board element size', size);
424
418
  this._boardView.style.width = "".concat(size.width, "px");
425
419
  this._boardView.style.height = "".concat(size.height, "px");
426
- var currentBoardInstanceView = (_this$_boardInstance2 = this._boardInstance) === null || _this$_boardInstance2 === void 0 ? void 0 : _this$_boardInstance2.view;
420
+ var currentBoardInstanceView = (_this$_boardInstance = this._boardInstance) === null || _this$_boardInstance === void 0 ? void 0 : _this$_boardInstance.view;
427
421
  if (currentBoardInstanceView) {
428
422
  currentBoardInstanceView.style.width = "".concat(size.width, "px");
429
423
  currentBoardInstanceView.style.height = "".concat(size.height, "px");
@@ -434,15 +428,14 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
434
428
  }, {
435
429
  key: "setIgnore",
436
430
  value: function setIgnore(ignore) {
437
- this.logger.info("[annotation-fragment][setIgnore]: setIgnore method is called, the ignore is => ".concat(ignore));
438
- this.isIgnore = ignore;
431
+ this.logger.info("setIgnore method is called, the ignore is => ".concat(ignore));
439
432
  window.runtime.browserWindow.setIgnoreMouseEvents(ignore);
440
433
  }
441
434
  }, {
442
435
  key: "toolChanged",
443
436
  value: function toolChanged(event) {
444
437
  if (!this._boardInstance) return;
445
- this.logger.info("[annotation-fragment][toolChanged]: toolChanged method is called, the event is => ".concat(JSON.stringify(event)));
438
+ this.logger.info("toolChanged method is called, the event is => ".concat(JSON.stringify(event)));
446
439
  var board = this._boardInstance;
447
440
  var payload = event.payload;
448
441
  switch (event.action) {
@@ -478,7 +471,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
478
471
  }, {
479
472
  key: "setDrawing",
480
473
  value: function setDrawing(drawing) {
481
- this.logger.info("[annotation-fragment][setDrawing]: setDrawing method is called, the drawing is => ".concat(drawing));
474
+ this.logger.info("setDrawing method is called, the drawing is => ".concat(drawing));
482
475
  this.drawing = drawing;
483
476
  }
484
477
  }, {
@@ -486,7 +479,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
486
479
  value: function _initBoardStyle(whiteboard) {
487
480
  var frameWidth = this.bounds.width;
488
481
  var frameHeight = this.bounds.height;
489
- this.logger.info("[annotation-fragment][initBoardStyle] mount success, width: ".concat(frameWidth, " , height: ").concat(frameHeight));
482
+ this.logger.info("mount success, width: ".concat(frameWidth, " , height: ").concat(frameHeight));
490
483
  this._boardView.style.width = "".concat(frameWidth, "px");
491
484
  this._boardView.style.height = "".concat(frameHeight, "px");
492
485
  whiteboard.view.style.height = "".concat(frameHeight, "px");
@@ -499,7 +492,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
499
492
  whiteboard.strokeColor = '#FFC908';
500
493
  whiteboard.setCurrentTool('curve');
501
494
  this._updateWindowSize(frameWidth, frameHeight);
502
- this.logger.info("[annotation-fragment][initBoardStyle] mount success current tool, ".concat(whiteboard.getCurrentTool(), ", updateViewport width: ").concat(frameWidth, " height: ").concat(frameHeight));
495
+ this.logger.info("mount success current tool, ".concat(whiteboard.getCurrentTool(), ", updateViewport width: ").concat(frameWidth, " height: ").concat(frameHeight));
503
496
  whiteboard.on('undoStackLength', function (steps) {
504
497
  // isWindows() && window.runtime.browserWindow.blur();
505
498
  (0, _rendererEvent.sendEvent)({
@@ -518,16 +511,16 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
518
511
  }, {
519
512
  key: "_handleSetTool",
520
513
  value: function _handleSetTool(payload) {
521
- var _this = this;
514
+ var _this3 = this;
522
515
  var board = this._boardInstance;
523
516
  this.currentTool = 'none';
524
517
  var currentTool = (0, _libs.convertTool)(payload);
525
518
  if (board) {
526
519
  board.setCurrentTool(currentTool);
527
520
  var timber = setTimeout(function () {
528
- var _this$_boardDom2;
529
- (_this$_boardDom2 = _this._boardDom) === null || _this$_boardDom2 === void 0 || _this$_boardDom2.getBoundingClientRect();
530
- _this.currentTool = currentTool;
521
+ var _this3$_boardDom;
522
+ (_this3$_boardDom = _this3._boardDom) === null || _this3$_boardDom === void 0 || _this3$_boardDom.getBoundingClientRect();
523
+ _this3.currentTool = currentTool;
531
524
  clearTimeout(timber);
532
525
  }, 600);
533
526
  }
@@ -536,37 +529,38 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
536
529
  key: "_init",
537
530
  value: function () {
538
531
  var _init2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(engine) {
539
- var _this2 = this;
532
+ var _this4 = this;
540
533
  return _regenerator["default"].wrap(function (_context3) {
541
534
  while (1) switch (_context3.prev = _context3.next) {
542
535
  case 0:
543
536
  engine.addObserver({
544
537
  onConnectionStateUpdated: function onConnectionStateUpdated(state) {
538
+ (0, _sharedStorage.setAnnotationEngineState)(state);
545
539
  (0, _rendererEvent.sendEvent)({
546
540
  action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_ENGINE_STATE,
547
541
  payload: state
548
542
  });
549
543
  if (state === _fcrCore.FcrConnectionState.CONNECTED) {
550
- _this2._engine = engine;
551
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => CONNECTED, hasWaitingOpen ".concat(_this2._hasWaitingOpen));
552
- if (_this2._hasWaitingOpen) {
553
- _this2._hasWaitingOpen = false;
554
- _this2.open();
544
+ _this4._engine = engine;
545
+ _this4.logger.info("engine connection state updated => CONNECTED, hasWaitingOpen ".concat(_this4._hasWaitingOpen));
546
+ if (_this4._hasWaitingOpen) {
547
+ _this4._hasWaitingOpen = false;
548
+ _this4.open();
555
549
  }
556
550
  }
557
551
  if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
558
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => DISCONNECTED, the engine is ".concat(_this2._engine));
559
- _this2._engine && engine.login();
552
+ _this4.logger.info("engine connection state updated => DISCONNECTED, the engine is ".concat(_this4._engine));
553
+ _this4._engine && engine.login();
560
554
  }
561
555
  if (state === _fcrCore.FcrConnectionState.CONNECTING) {
562
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => CONNECTING");
556
+ _this4.logger.info("engine connection state updated => CONNECTING");
563
557
  }
564
558
  if (state === _fcrCore.FcrConnectionState.RECONNECTING) {
565
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => RECONNECTING");
559
+ _this4.logger.info("engine connection state updated => RECONNECTING");
566
560
  }
567
561
  if (state === _fcrCore.FcrConnectionState.ABORTED) {
568
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => ABORTED, the engine is ".concat(_this2._engine));
569
- _this2._engine && engine.login();
562
+ _this4.logger.info("engine connection state updated => ABORTED, the engine is ".concat(_this4._engine));
563
+ _this4._engine && engine.login();
570
564
  }
571
565
  }
572
566
  });
@@ -586,15 +580,20 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
586
580
  }, {
587
581
  key: "_initBoardRoom",
588
582
  value: function () {
589
- var _initBoardRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
590
- var _this3 = this;
591
- var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, currentTimeStamp, retriesMax, _t2;
592
- return _regenerator["default"].wrap(function (_context6) {
593
- while (1) switch (_context6.prev = _context6.next) {
583
+ var _initBoardRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
584
+ var _this5 = this;
585
+ var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, currentTimeStamp, abortController;
586
+ return _regenerator["default"].wrap(function (_context7) {
587
+ while (1) switch (_context7.prev = _context7.next) {
594
588
  case 0:
595
- _this$_config = this._config, userId = _this$_config.userId, boardToken = _this$_config.boardToken, region = _this$_config.region, appIdentifier = _this$_config.appIdentifier, boardId = _this$_config.boardId;
596
- nickName = localStorage.getItem('annotation_nickname') || '';
597
- this.logger.info("[annotation-fragment][initBoardRoom]: start init board room with config => ".concat(JSON.stringify(this._config), " - ").concat(nickName));
589
+ if (this._config) {
590
+ _context7.next = 1;
591
+ break;
592
+ }
593
+ throw new Error('cannot init board room, config is not set');
594
+ case 1:
595
+ _this$_config = this._config, userId = _this$_config.userId, boardToken = _this$_config.boardToken, region = _this$_config.region, appIdentifier = _this$_config.appIdentifier, boardId = _this$_config.boardId, nickName = _this$_config.nickName;
596
+ this.logger.info("start init board room with config => ".concat(JSON.stringify(this._config), " - ").concat(nickName));
598
597
  // @ts-ignore
599
598
  rtmClient = this._engine._rteEngine._rtmClient._client;
600
599
  rtmProvider = new _imports.FcrRTMProvider_2_2(rtmClient);
@@ -603,73 +602,111 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
603
602
  currentTimeStamp = Date.now(); // @ts-ignore
604
603
  this._boardRoom['traceId'] = "".concat(boardToken, "-").concat(boardId, "-").concat(userId, "-").concat(currentTimeStamp);
605
604
  wbRoom.applicationManager.registerApplication(_imports.FcrWhiteboardApplication);
606
- this.logger.info("[annotation-fragment][initBoardRoom]: bordRoom instance is created, start join room");
607
- _context6.prev = 1;
608
- retriesMax = 10;
609
- _context6.next = 2;
610
- return (0, _asyncRetry.retryAttempt)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
611
- return _regenerator["default"].wrap(function (_context4) {
612
- while (1) switch (_context4.prev = _context4.next) {
613
- case 0:
614
- _context4.next = 1;
615
- return wbRoom.joinRoom({
616
- userId: userId,
617
- nickName: nickName,
618
- roomToken: boardToken,
619
- sdkConfig: {
620
- // @ts-ignore
621
- region: region,
622
- appIdentifier: appIdentifier
623
- }
624
- });
625
- case 1:
626
- // @ts-ignore
627
- _this3.logger.info(// @ts-ignore
628
- "[annotation-fragment][initBoardRoom]: join room success, traceId ".concat(_this3._boardRoom['traceId']));
629
- // room.userManager.on("join") 和 room.userManager.on("leave")
630
- wbRoom.userManager.on('join', _this3._handleBoardRoomUserJoin);
631
- // wbRoom.userManager.on('leave',this._handleBoardRoomUserLeave);
632
- case 2:
633
- case "end":
634
- return _context4.stop();
635
- }
636
- }, _callee4);
637
- })), [], {
638
- retriesMax: retriesMax
639
- }).fail(/*#__PURE__*/function () {
640
- var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(_ref3) {
641
- var error, timeFn, currentRetry;
642
- return _regenerator["default"].wrap(function (_context5) {
643
- while (1) switch (_context5.prev = _context5.next) {
605
+ this.logger.info("bordRoom instance is created, start join room");
606
+ abortController = new AbortController();
607
+ this._openAbortController = abortController;
608
+ return _context7.abrupt("return", new Promise(/*#__PURE__*/function () {
609
+ var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(resolve, reject) {
610
+ var retriesMax, _t2;
611
+ return _regenerator["default"].wrap(function (_context6) {
612
+ while (1) switch (_context6.prev = _context6.next) {
644
613
  case 0:
645
- error = _ref3.error, timeFn = _ref3.timeFn, currentRetry = _ref3.currentRetry;
646
- _this3.logger.info("[annotation-fragment][initBoardRoom]: retry to join board room, ".concat(error.message, ", retry ").concat(currentRetry, " times"));
647
- _context5.next = 1;
648
- return timeFn();
649
- case 1:
650
- return _context5.abrupt("return", true);
614
+ // 监听中止信号
615
+ abortController.signal.addEventListener('abort', function () {
616
+ reject(new Error('join board room aborted'));
617
+ });
618
+ _context6.prev = 1;
619
+ retriesMax = 10;
620
+ _context6.next = 2;
621
+ return (0, _asyncRetry.retryAttempt)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
622
+ return _regenerator["default"].wrap(function (_context4) {
623
+ while (1) switch (_context4.prev = _context4.next) {
624
+ case 0:
625
+ _context4.next = 1;
626
+ return wbRoom.joinRoom({
627
+ userId: userId,
628
+ nickName: nickName,
629
+ roomToken: boardToken,
630
+ sdkConfig: {
631
+ // @ts-ignore
632
+ region: region,
633
+ appIdentifier: appIdentifier
634
+ }
635
+ });
636
+ case 1:
637
+ case "end":
638
+ return _context4.stop();
639
+ }
640
+ }, _callee4);
641
+ })), [], {
642
+ retriesMax: retriesMax
643
+ }).fail(/*#__PURE__*/function () {
644
+ var _ref5 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(_ref4) {
645
+ var error, timeFn, currentRetry;
646
+ return _regenerator["default"].wrap(function (_context5) {
647
+ while (1) switch (_context5.prev = _context5.next) {
648
+ case 0:
649
+ error = _ref4.error, timeFn = _ref4.timeFn, currentRetry = _ref4.currentRetry;
650
+ if (!abortController.signal.aborted) {
651
+ _context5.next = 1;
652
+ break;
653
+ }
654
+ throw new Error('join board room aborted');
655
+ case 1:
656
+ _this5.logger.info("retry to join board room, ".concat(error.message, ", retry ").concat(currentRetry, " times"));
657
+ _context5.next = 2;
658
+ return timeFn();
659
+ case 2:
660
+ return _context5.abrupt("return", true);
661
+ case 3:
662
+ case "end":
663
+ return _context5.stop();
664
+ }
665
+ }, _callee5);
666
+ }));
667
+ return function (_x4) {
668
+ return _ref5.apply(this, arguments);
669
+ };
670
+ }()).exec();
651
671
  case 2:
672
+ if (!abortController.signal.aborted) {
673
+ _context6.next = 3;
674
+ break;
675
+ }
676
+ throw new Error('join board room aborted');
677
+ case 3:
678
+ _this5.logger.info(// @ts-ignore
679
+ "join room success, traceId ".concat(_this5._boardRoom['traceId']));
680
+ wbRoom.userManager.on('join', _this5._handleBoardRoomUserJoin);
681
+ resolve(wbRoom);
682
+ _context6.next = 5;
683
+ break;
684
+ case 4:
685
+ _context6.prev = 4;
686
+ _t2 = _context6["catch"](1);
687
+ _this5.logger.error("join room failed");
688
+ reject(_t2);
689
+ case 5:
690
+ _context6.prev = 5;
691
+ _this5._openAbortController = null;
692
+ return _context6.finish(5);
693
+ case 6:
694
+ return _context6.abrupt("return", wbRoom);
695
+ case 7:
652
696
  case "end":
653
- return _context5.stop();
697
+ return _context6.stop();
654
698
  }
655
- }, _callee5);
699
+ }, _callee6, null, [[1, 4, 5, 6]]);
656
700
  }));
657
- return function (_x2) {
658
- return _ref4.apply(this, arguments);
701
+ return function (_x2, _x3) {
702
+ return _ref2.apply(this, arguments);
659
703
  };
660
- }()).exec();
704
+ }()));
661
705
  case 2:
662
- _context6.next = 4;
663
- break;
664
- case 3:
665
- _context6.prev = 3;
666
- _t2 = _context6["catch"](1);
667
- this.logger.error("[annotation-fragment][initBoardRoom]: join room failed");
668
- case 4:
669
706
  case "end":
670
- return _context6.stop();
707
+ return _context7.stop();
671
708
  }
672
- }, _callee6, this, [[1, 3]]);
709
+ }, _callee7, this);
673
710
  }));
674
711
  function _initBoardRoom() {
675
712
  return _initBoardRoom2.apply(this, arguments);
@@ -677,26 +714,34 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
677
714
  return _initBoardRoom;
678
715
  }()
679
716
  }, {
680
- key: "_initEngine",
681
- value: function _initEngine(config) {
717
+ key: "_createEngine",
718
+ value: function _createEngine(config) {
682
719
  var userId = config.userId,
683
720
  token = config.roomToken,
684
721
  appId = config.appId;
685
- this.logger.info("[annotation-fragment][initEngine]: init engine with config => ".concat(JSON.stringify(config)));
686
- return new _fcrCore.FcrCoreEngine(_objectSpread({
687
- appId: appId,
688
- token: token,
689
- userId: userId,
690
- region: _fcrCore.FcrRegion.CN
691
- }, _libs.engineRestConfig));
722
+ this.logger.debug('before create engine');
723
+ try {
724
+ (0, _fcrCore.registerPlugin)(new _rtmPlugin.RtmPlugin());
725
+ (0, _fcrCore.registerPlugin)(new _electronRtcPlugin.ElectronRtcPlugin());
726
+ var engine = new _fcrCore.FcrCoreEngine(_objectSpread({
727
+ appId: appId,
728
+ token: token,
729
+ userId: userId,
730
+ region: _fcrCore.FcrRegion.CN
731
+ }, _libs.engineRestConfig));
732
+ this.logger.debug('after create engine');
733
+ return engine;
734
+ } catch (e) {
735
+ this.logger.error("create engine failed, error: ".concat(e));
736
+ throw e;
737
+ }
692
738
  }
693
739
  }, {
694
740
  key: "_launchHandler",
695
741
  value: function _launchHandler(appId, app) {
696
742
  if (appId === this._FORGE_WHITEBOARD_APP_ID) {
697
- this.logger.info("[annotation-fragment][event]: launch event is triggered => ".concat(app.selfUserId));
698
- this._currentAnntationView = app.view;
699
- this._currentAnntationView && this._boardView.appendChild(this._currentAnntationView);
743
+ this.logger.info("launch event is triggered => ".concat(app.selfUserId));
744
+ this._boardView.appendChild(app.view);
700
745
  this._initBoardStyle(app);
701
746
  }
702
747
  }
@@ -705,7 +750,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
705
750
  value: function _terminalHandler(appId, app) {
706
751
  if (appId === this._FORGE_WHITEBOARD_APP_ID) {
707
752
  var _this$_boardView;
708
- this.logger.info("[annotation-fragment][event]: terminal event is triggered => ".concat(app.selfUserId));
753
+ this.logger.info("terminal event is triggered => ".concat(app.selfUserId));
709
754
  (app === null || app === void 0 ? void 0 : app.view) && this._boardView.hasChildNodes() && ((_this$_boardView = this._boardView) === null || _this$_boardView === void 0 ? void 0 : _this$_boardView.removeChild(app.view));
710
755
  }
711
756
  }
@@ -724,15 +769,15 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
724
769
  value: function _cancelCurrentUpdateWindowSizeTimber(stage) {
725
770
  if (this._pollingCancelHandler && typeof this._pollingCancelHandler === 'function') {
726
771
  this._pollingCancelHandler();
727
- this.logger.info("[annotation-fragment]: end a new 30s polling to updateWindowSize, when ".concat(stage));
772
+ this.logger.info("end a new 30s polling to updateWindowSize, when ".concat(stage));
728
773
  }
729
774
  }
730
775
  }, {
731
776
  key: "_handlePollingUpdateWindowSize",
732
777
  value: function _handlePollingUpdateWindowSize(stage) {
733
778
  this._cancelCurrentUpdateWindowSizeTimber(stage);
734
- this._pollingCancelHandler = startPolling(this._updateWindowSizeWithCurrentBounds);
735
- this.logger.info("[annotation-fragment]: start a new 30s polling to updateWindowSize, after ".concat(stage));
779
+ this._pollingCancelHandler = (0, _utils.startPolling)(this._updateWindowSizeWithCurrentBounds);
780
+ this.logger.info("start a new 30s polling to updateWindowSize, after ".concat(stage));
736
781
  }
737
782
  }, {
738
783
  key: "_handleBoardRoomUserJoin",
@@ -743,20 +788,59 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
743
788
  }, {
744
789
  key: "_syncScreenShareOwnerOpenDone",
745
790
  value: function _syncScreenShareOwnerOpenDone() {
746
- this.logger.info('[annotation-fragment]: _syncScreenShareOwnerOpenDone');
791
+ this.logger.info('syncScreenShareOwnerOpenDone');
747
792
  (0, _rendererEvent.sendEvent)({
748
793
  action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_SYNC_OWNER_OPEN_DONE,
749
794
  payload: null
750
795
  });
751
796
  }
797
+ }, {
798
+ key: "_checkForConnect",
799
+ value: function _checkForConnect() {
800
+ var boardOptions = (0, _sharedStorage.getBoardOptions)();
801
+ var readyToConnect = !!boardOptions;
802
+ var isEngineInitialized = this._isEngineInitialized;
803
+ this.logger.info("check for connect, readyToConnect: ".concat(readyToConnect, ", isEngineInitialized: ").concat(isEngineInitialized));
804
+ if (!isEngineInitialized && readyToConnect) {
805
+ this._checkForConnectTask.stop();
806
+ var rtmAppId = boardOptions.rtmAppId,
807
+ boardAppId = boardOptions.boardAppId,
808
+ boardId = boardOptions.boardId,
809
+ boardRegion = boardOptions.boardRegion,
810
+ boardToken = boardOptions.boardToken,
811
+ boardUserToken = boardOptions.boardUserToken,
812
+ userId = boardOptions.boardUserUuid,
813
+ nickName = boardOptions.nickName;
814
+ this._config = {
815
+ appId: rtmAppId,
816
+ userId: userId,
817
+ region: boardRegion,
818
+ appIdentifier: boardAppId,
819
+ boardId: boardId,
820
+ boardToken: boardToken,
821
+ nickName: nickName
822
+ };
823
+ this.logger.info("boardinfo => ".concat((0, _imports.jsonstring)(this._config)));
824
+ var engine = this._createEngine({
825
+ userId: userId,
826
+ roomToken: boardUserToken,
827
+ appId: rtmAppId
828
+ });
829
+
830
+ // @ts-ignore
831
+ window._coreEngine = engine;
832
+ this.logger.info("login engine with the following config: annotationRtmAppId => ".concat(rtmAppId, ", boardOptions => ").concat((0, _imports.jsonstring)(boardOptions)));
833
+ this._init(engine);
834
+ this._isEngineInitialized = true;
835
+ }
836
+ }
752
837
  }]);
753
838
  }();
754
839
  _FragmentAnnotationStore = FragmentAnnotationStore;
755
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FragmentAnnotationStore, [[_mobx.observable, 1, "joined"], [_mobx.observable, 1, "bounds"], [_mobx.observable, 1, "currentTool"], [_mobx.observable, 1, "isIgnore"], [_mobx.observable, 1, "drawing"], [_decorator.bound, 2, "open"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_closeDecs, 18, "close"], [_hideDecs, 18, "hide"], [_showDecs, 18, "show"], [_decorator.bound, 2, "focus"], [_decorator.bound, 2, "updateWindowSize"], [_decorator.bound, 2, "_updateWindowSizeWithCurrentBounds"], [_decorator.bound, 2, "_updateWindowSize"], [_decorator.bound, 2, "_updateBoardElBySize"], [_decorator.bound, 2, "setIgnore"], [_decorator.bound, 2, "toolChanged"], [_decorator.bound, 2, "setDrawing"], [_decorator.bound, 2, "_initBoardStyle"], [_handleSetToolDecs, 2, "_handleSetTool"], [_decorator.bound, 2, "_init"], [_decorator.bound, 2, "_initBoardRoom"], [_decorator.bound, 2, "_launchHandler"], [_decorator.bound, 2, "_terminalHandler"], [_decorator.bound, 2, "_resizeToMax"], [_decorator.bound, 2, "_cancelCurrentUpdateWindowSizeTimber"], [_decorator.bound, 2, "_handlePollingUpdateWindowSize"], [_decorator.bound, 2, "_handleBoardRoomUserJoin"], [_decorator.bound, 2, "_syncScreenShareOwnerOpenDone"]], []).e, 6);
840
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FragmentAnnotationStore, [[_mobx.observable, 1, "joined"], [_mobx.observable, 1, "bounds"], [_mobx.observable, 1, "currentTool"], [_mobx.observable, 1, "drawing"], [_decorator.bound, 2, "open"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_closeDecs, 18, "close"], [_hideDecs, 18, "hide"], [_showDecs, 18, "show"], [_decorator.bound, 2, "focus"], [_decorator.bound, 2, "updateWindowSize"], [_decorator.bound, 2, "_updateWindowSizeWithCurrentBounds"], [_decorator.bound, 2, "_updateWindowSize"], [_decorator.bound, 2, "_updateBoardElBySize"], [_decorator.bound, 2, "setIgnore"], [_decorator.bound, 2, "toolChanged"], [_decorator.bound, 2, "setDrawing"], [_decorator.bound, 2, "_initBoardStyle"], [_handleSetToolDecs, 2, "_handleSetTool"], [_decorator.bound, 2, "_init"], [_decorator.bound, 2, "_initBoardRoom"], [_decorator.bound, 2, "_launchHandler"], [_decorator.bound, 2, "_terminalHandler"], [_decorator.bound, 2, "_resizeToMax"], [_decorator.bound, 2, "_cancelCurrentUpdateWindowSizeTimber"], [_decorator.bound, 2, "_handlePollingUpdateWindowSize"], [_decorator.bound, 2, "_handleBoardRoomUserJoin"], [_decorator.bound, 2, "_syncScreenShareOwnerOpenDone"]], []).e, 5);
756
841
  _init_joined = _applyDecs$e[0];
757
842
  _init_bounds = _applyDecs$e[1];
758
843
  _init_currentTool = _applyDecs$e[2];
759
- _init_isIgnore = _applyDecs$e[3];
760
- _init_drawing = _applyDecs$e[4];
761
- _initProto = _applyDecs$e[5];
844
+ _init_drawing = _applyDecs$e[3];
845
+ _initProto = _applyDecs$e[4];
762
846
  var FragmentAnnotationStoreContext = exports.FragmentAnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)(null);