fcr-ui-scene 3.7.1 → 3.7.3

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 (248) hide show
  1. package/lib/creator.js +23 -44
  2. package/lib/electron/app.js +7 -0
  3. package/lib/electron/injections.d.ts +1 -1
  4. package/lib/electron/injections.js +5 -3
  5. package/lib/electron/main.js +3 -1
  6. package/lib/fragments/annotation/index.d.ts +1 -0
  7. package/lib/fragments/annotation/index.js +13 -7
  8. package/lib/fragments/annotation/store.d.ts +8 -4
  9. package/lib/fragments/annotation/store.js +353 -268
  10. package/lib/fragments/annotation/toolbar/components/color-tool/index.js +4 -0
  11. package/lib/fragments/annotation/toolbar/components/graphic-tool/index.js +4 -0
  12. package/lib/fragments/annotation/toolbar/components/item/item.d.ts +2 -0
  13. package/lib/fragments/annotation/toolbar/components/item/item.js +2 -4
  14. package/lib/fragments/annotation/toolbar/components/item/style.css +4 -2
  15. package/lib/fragments/annotation/toolbar/components/pen-tool/index.js +4 -0
  16. package/lib/fragments/annotation/utils.d.ts +1 -0
  17. package/lib/fragments/annotation/utils.js +27 -0
  18. package/lib/fragments/annotation/view.js +1 -6
  19. package/lib/fragments/base.js +5 -3
  20. package/lib/fragments/whiteboard/cursor.css +77 -0
  21. package/lib/fragments/whiteboard/index.d.ts +11 -0
  22. package/lib/fragments/whiteboard/index.js +91 -0
  23. package/lib/fragments/whiteboard/store.d.ts +31 -0
  24. package/lib/fragments/whiteboard/store.js +475 -0
  25. package/lib/fragments/whiteboard/style.css +4 -0
  26. package/lib/fragments/whiteboard/view.d.ts +4 -0
  27. package/lib/fragments/whiteboard/view.js +31 -0
  28. package/lib/index.d.ts +1 -0
  29. package/lib/index.js +1 -0
  30. package/lib/modules/action-bar/components/apps/index.js +15 -5
  31. package/lib/modules/action-bar/components/leave/index.js +4 -11
  32. package/lib/modules/action-bar/view.d.ts +1 -0
  33. package/lib/modules/action-bar/view.js +3 -2
  34. package/lib/modules/annotation/annotation-toolbar-store.d.ts +4 -11
  35. package/lib/modules/annotation/annotation-toolbar-store.js +46 -88
  36. package/lib/modules/annotation/board-cursor.css +2 -1
  37. package/lib/modules/annotation/index.d.ts +2 -0
  38. package/lib/modules/annotation/index.js +2 -2
  39. package/lib/modules/annotation/store.d.ts +11 -49
  40. package/lib/modules/annotation/store.js +135 -418
  41. package/lib/modules/annotation/view.js +3 -6
  42. package/lib/modules/components/control-bar/components/loading/index.css +76 -0
  43. package/lib/modules/components/control-bar/components/loading/index.d.ts +8 -0
  44. package/lib/modules/components/control-bar/components/loading/index.js +64 -0
  45. package/lib/modules/components/control-bar/components/loading/loading.png +0 -0
  46. package/lib/modules/components/control-bar/components/progress/index.d.ts +5 -0
  47. package/lib/modules/components/control-bar/components/progress/index.js +43 -0
  48. package/lib/modules/components/control-bar/components/progress/style.css +51 -0
  49. package/lib/modules/components/control-bar/components/switch-theme/index.css +99 -0
  50. package/lib/modules/components/control-bar/components/switch-theme/index.d.ts +9 -0
  51. package/lib/modules/components/control-bar/components/switch-theme/index.js +94 -0
  52. package/lib/modules/components/control-bar/components/switch-theme/item.d.ts +9 -0
  53. package/lib/modules/components/control-bar/components/switch-theme/item.js +54 -0
  54. package/lib/modules/components/control-bar/components/switch-theme/libs.d.ts +4 -0
  55. package/lib/modules/components/control-bar/components/switch-theme/libs.js +31 -0
  56. package/lib/modules/components/control-bar/index.css +87 -0
  57. package/lib/modules/components/control-bar/index.d.ts +20 -0
  58. package/lib/modules/components/control-bar/index.js +276 -0
  59. package/lib/modules/components/leave-meeting/components/index.css +0 -9
  60. package/lib/modules/components/leave-meeting/index.d.ts +2 -1
  61. package/lib/modules/components/leave-meeting/index.js +15 -7
  62. package/lib/modules/components/leave-meeting/portal.d.ts +6 -0
  63. package/lib/modules/components/leave-meeting/portal.js +29 -0
  64. package/lib/modules/components/leave-meeting/style.css +9 -0
  65. package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +5 -2
  66. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +19 -9
  67. package/lib/modules/components/member-window/components/member-actions/components/share-status.js +4 -4
  68. package/lib/modules/components/member-window/components/member-actions/index.js +13 -6
  69. package/lib/modules/components/member-window/components/member-actions/provider.d.ts +1 -0
  70. package/lib/modules/components/member-window/components/member-actions/provider.js +4 -3
  71. package/lib/modules/components/member-window/components/member-actions/store.d.ts +2 -1
  72. package/lib/modules/components/member-window/components/member-actions/store.js +5 -1
  73. package/lib/modules/components/member-window/index.css +4 -0
  74. package/lib/modules/components/member-window/types.d.ts +6 -2
  75. package/lib/modules/components/toolbar/components/capture-tool/index.d.ts +9 -0
  76. package/lib/modules/components/toolbar/components/capture-tool/index.js +68 -0
  77. package/lib/modules/components/toolbar/components/clean-tool/index.d.ts +11 -0
  78. package/lib/modules/components/toolbar/components/clean-tool/index.js +71 -0
  79. package/lib/modules/components/toolbar/components/color-tool/color-panel/index.d.ts +11 -0
  80. package/lib/modules/components/toolbar/components/color-tool/color-panel/index.js +77 -0
  81. package/lib/modules/components/toolbar/components/color-tool/index.d.ts +14 -0
  82. package/lib/modules/components/toolbar/components/color-tool/index.js +66 -0
  83. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +11 -0
  84. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.js +64 -0
  85. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +12 -0
  86. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.js +65 -0
  87. package/lib/modules/components/toolbar/components/graphic-tool/index.d.ts +15 -0
  88. package/lib/modules/components/toolbar/components/graphic-tool/index.js +82 -0
  89. package/lib/modules/components/toolbar/components/group-tool/index.d.ts +5 -0
  90. package/lib/modules/components/toolbar/components/group-tool/index.js +43 -0
  91. package/lib/modules/components/toolbar/components/icons/fold-icon.d.ts +2 -0
  92. package/lib/modules/components/toolbar/components/icons/fold-icon.js +41 -0
  93. package/lib/modules/components/toolbar/components/icons/move-icon.d.ts +1 -0
  94. package/lib/modules/components/toolbar/components/icons/move-icon.js +66 -0
  95. package/lib/modules/components/toolbar/components/item/index.d.ts +25 -0
  96. package/lib/modules/components/toolbar/components/item/index.js +165 -0
  97. package/lib/modules/components/toolbar/components/item/style.css +94 -0
  98. package/lib/modules/components/toolbar/components/multiple-color-tool/index.d.ts +12 -0
  99. package/lib/modules/components/toolbar/components/multiple-color-tool/index.js +75 -0
  100. package/lib/modules/components/toolbar/components/panel/index.d.ts +9 -0
  101. package/lib/modules/components/toolbar/components/panel/index.js +28 -0
  102. package/lib/modules/components/toolbar/components/panel/style.css +86 -0
  103. package/lib/modules/components/toolbar/components/pen-tool/index.d.ts +13 -0
  104. package/lib/modules/components/toolbar/components/pen-tool/index.js +62 -0
  105. package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.d.ts +8 -0
  106. package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.js +39 -0
  107. package/lib/modules/components/toolbar/components/save-draft/index.d.ts +7 -0
  108. package/lib/modules/components/toolbar/components/save-draft/index.js +59 -0
  109. package/lib/modules/components/toolbar/components/vertical-frame/index.d.ts +8 -0
  110. package/lib/modules/components/toolbar/components/vertical-frame/index.js +179 -0
  111. package/lib/modules/components/toolbar/hooks/use-resize-visible.d.ts +4 -0
  112. package/lib/modules/components/toolbar/hooks/use-resize-visible.js +59 -0
  113. package/lib/modules/components/toolbar/index.d.ts +29 -0
  114. package/lib/modules/components/toolbar/index.js +258 -0
  115. package/lib/modules/components/toolbar/style.css +85 -0
  116. package/lib/modules/components/toolbar/types.d.ts +13 -0
  117. package/lib/modules/components/toolbar/types.js +6 -0
  118. package/lib/modules/control-bar/components/more-actions/index.js +0 -6
  119. package/lib/modules/control-bar/components/share-state-nav/index.js +3 -2
  120. package/lib/modules/control-bar/index.js +2 -1
  121. package/lib/modules/control-bar/store.d.ts +7 -6
  122. package/lib/modules/control-bar/store.js +28 -21
  123. package/lib/modules/control-bar/view.js +7 -55
  124. package/lib/modules/dialog/dialogs/control-bar/index.d.ts +1 -0
  125. package/lib/modules/dialog/dialogs/control-bar/index.js +17 -3
  126. package/lib/modules/dialog/dialogs/participant/components/title.js +1 -1
  127. package/lib/modules/dialog/dialogs/sub-window/index.d.ts +2 -0
  128. package/lib/modules/dialog/dialogs/sub-window/index.js +98 -0
  129. package/lib/modules/dialog/dialogs/video-window/index.d.ts +1 -0
  130. package/lib/modules/dialog/dialogs/video-window/index.js +3 -2
  131. package/lib/modules/dialog/dialogs/whiteboard/index.js +0 -1
  132. package/lib/modules/dialog/hooks/use-popover-watcher.js +1 -2
  133. package/lib/modules/dialog/hooks/useElectron.d.ts +13 -0
  134. package/lib/modules/dialog/hooks/useElectron.js +62 -12
  135. package/lib/modules/dialog/index.d.ts +6 -3
  136. package/lib/modules/dialog/index.js +5 -3
  137. package/lib/modules/dialog/store.d.ts +21 -8
  138. package/lib/modules/dialog/store.js +79 -11
  139. package/lib/modules/dialog/type.d.ts +8 -0
  140. package/lib/modules/event-confirm/index.css +5 -2
  141. package/lib/modules/event-confirm/store.js +6 -7
  142. package/lib/modules/event-confirm/view.js +1 -1
  143. package/lib/modules/event-sound/index.d.ts +1 -0
  144. package/lib/modules/event-sound/index.js +11 -24
  145. package/lib/modules/invite/components/pstn-invite.js +0 -1
  146. package/lib/modules/layout/components/CommonVideoRenderer.js +21 -21
  147. package/lib/modules/layout/components/who-is-speaking.js +3 -6
  148. package/lib/modules/layout/index.d.ts +3 -1
  149. package/lib/modules/layout/index.js +2 -1
  150. package/lib/modules/layout/store.d.ts +9 -59
  151. package/lib/modules/layout/store.js +162 -37
  152. package/lib/modules/layout/type.d.ts +55 -0
  153. package/lib/modules/participant/components/can-moveable/index.js +0 -1
  154. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +4 -2
  155. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +14 -2
  156. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +1 -1
  157. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +3 -2
  158. package/lib/modules/participant/components/participants/components/participants/index.js +3 -2
  159. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +1 -0
  160. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +3 -1
  161. package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +4 -2
  162. package/lib/modules/participant/components/participants/components/render-user/index.d.ts +4 -2
  163. package/lib/modules/participant/components/participants/components/render-user/index.js +5 -3
  164. package/lib/modules/participant/components/participants/index.js +5 -2
  165. package/lib/modules/participant/components/participants/types.d.ts +3 -0
  166. package/lib/modules/participant/index.d.ts +2 -0
  167. package/lib/modules/participant/index.js +2 -1
  168. package/lib/modules/participant/store.d.ts +5 -1
  169. package/lib/modules/participant/store.js +8 -1
  170. package/lib/modules/secondary-window/index.d.ts +49 -0
  171. package/lib/modules/secondary-window/index.js +108 -0
  172. package/lib/modules/secondary-window/store.d.ts +76 -0
  173. package/lib/modules/secondary-window/store.js +407 -0
  174. package/lib/modules/secondary-window/type.d.ts +106 -0
  175. package/lib/modules/secondary-window/type.js +35 -0
  176. package/lib/modules/secondary-window/view.d.ts +6 -0
  177. package/lib/modules/secondary-window/view.js +257 -0
  178. package/lib/modules/setting/general-settings/general-settings.js +9 -0
  179. package/lib/modules/setting/state/index.js +0 -10
  180. package/lib/modules/setting/store.d.ts +1 -0
  181. package/lib/modules/setting/store.js +6 -3
  182. package/lib/modules/share-screen/components/control-bar/index.d.ts +14 -1
  183. package/lib/modules/share-screen/components/control-bar/index.js +17 -12
  184. package/lib/modules/share-screen/components/selection/index.js +10 -15
  185. package/lib/modules/share-screen/index.d.ts +4 -1
  186. package/lib/modules/share-screen/index.js +6 -3
  187. package/lib/modules/share-screen/store.d.ts +9 -9
  188. package/lib/modules/share-screen/store.js +39 -64
  189. package/lib/modules/state-bar/index.d.ts +2 -0
  190. package/lib/modules/state-bar/index.js +2 -1
  191. package/lib/modules/state-bar/live-streaming-state.js +0 -1
  192. package/lib/modules/state-bar/store.d.ts +5 -2
  193. package/lib/modules/state-bar/store.js +14 -7
  194. package/lib/modules/state-bar/view.js +3 -3
  195. package/lib/modules/video-window/components/members/index.js +7 -12
  196. package/lib/modules/video-window/store.d.ts +1 -0
  197. package/lib/modules/video-window/store.js +5 -0
  198. package/lib/modules/whiteboard/components/toolbar/store.d.ts +2 -2
  199. package/lib/modules/whiteboard/index.d.ts +10 -13
  200. package/lib/modules/whiteboard/index.js +12 -11
  201. package/lib/providers/ability-provider.js +2 -0
  202. package/lib/providers/device-provider.d.ts +6 -3
  203. package/lib/providers/device-provider.js +336 -333
  204. package/lib/providers/multi-display-provider.d.ts +85 -0
  205. package/lib/providers/multi-display-provider.js +581 -0
  206. package/lib/providers/privilege-provider.js +1 -7
  207. package/lib/providers/room-provider.js +7 -1
  208. package/lib/providers/screen-share-provider.d.ts +3 -1
  209. package/lib/providers/screen-share-provider.js +39 -40
  210. package/lib/providers/sharing-provider.d.ts +7 -1
  211. package/lib/providers/sharing-provider.js +32 -3
  212. package/lib/providers/whiteboard-provider.d.ts +24 -0
  213. package/lib/providers/whiteboard-provider.js +127 -0
  214. package/lib/runtime.d.ts +1 -0
  215. package/lib/scenes/main-scene.d.ts +6 -0
  216. package/lib/scenes/main-scene.js +38 -2
  217. package/lib/scenes/waiting-scene.d.ts +0 -2
  218. package/lib/scenes/waiting-scene.js +0 -6
  219. package/lib/shared-data-source/member-data.d.ts +2 -2
  220. package/lib/shared-data-source/screen-share-data.d.ts +6 -0
  221. package/lib/shared-data-source/screen-share-data.js +5 -0
  222. package/lib/shared-data-source/setting.js +2 -1
  223. package/lib/shared-data-source/video-window.d.ts +2 -0
  224. package/lib/shared-data-source/video-window.js +19 -6
  225. package/lib/shared-data-source/whiteboard-data.d.ts +68 -0
  226. package/lib/shared-data-source/whiteboard-data.js +347 -0
  227. package/lib/translations/enUS.d.ts +1 -0
  228. package/lib/translations/enUS.js +2 -1
  229. package/lib/translations/zhCN.d.ts +1 -0
  230. package/lib/translations/zhCN.js +2 -1
  231. package/lib/ui-scene.d.ts +0 -1
  232. package/lib/ui-scene.js +0 -3
  233. package/lib/utilities/constant.d.ts +4 -2
  234. package/lib/utilities/constant.js +3 -1
  235. package/lib/utilities/debug.d.ts +4 -0
  236. package/lib/utilities/debug.js +40 -0
  237. package/lib/utilities/dialog-utils.js +26 -4
  238. package/lib/utilities/meeting-detail.js +4 -1
  239. package/lib/utilities/renderer-event.d.ts +4 -6
  240. package/lib/utilities/renderer-event.js +23 -43
  241. package/lib/utilities/renderer.d.ts +1 -1
  242. package/lib/utilities/renderer.js +44 -10
  243. package/lib/utilities/shared-storage.d.ts +18 -0
  244. package/lib/utilities/shared-storage.js +63 -0
  245. package/lib/utilities/tools.js +2 -1
  246. package/package.json +5 -6
  247. package/lib/electron/tools.d.ts +0 -5
  248. 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,108 +160,135 @@ 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',
270
239
  strokeWidth: 2
271
- }
240
+ },
241
+ maxScaleRatio: 1
272
242
  }, this._FORGE_WHITEBOARD_APP_ID);
273
- case 7:
243
+ case 8:
274
244
  whiteboard = _context.sent;
275
- this.logger.info("[annotation-fragment][open]: whiteboard launch success");
276
- if (whiteboard) {
277
- this._boardView.classList.add('fcr-whiteboard-window-view');
278
- this._currentAnntationView = whiteboard.view;
279
- this._boardView.appendChild(this._currentAnntationView);
280
- (_this$_boardDom = this._boardDom) === null || _this$_boardDom === void 0 || _this$_boardDom.appendChild(this._boardView);
281
- this._boardInstance = whiteboard;
282
- // @ts-ignore
283
- window._boardInstance = this._boardInstance;
284
- this._initBoardStyle(whiteboard);
285
- this.joined = true;
286
- this.logger.info("[annotation-fragment][open]: mount success, the joined is ".concat(this.joined));
287
- // 共享发起端 开启标注时,重置30s轮询updateWindowSize
288
- this._handlePollingUpdateWindowSize('sender-board-room-init');
289
- 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;
290
252
  }
291
- this._boardRoom.applicationManager.on('launch', this._launchHandler);
292
- this._boardRoom.applicationManager.on('terminal', this._terminalHandler);
293
- 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:
294
288
  case "end":
295
289
  return _context.stop();
296
290
  }
297
- }, _callee, this);
291
+ }, _callee, this, [[2, 10, 11, 12]]);
298
292
  }));
299
293
  function open() {
300
294
  return _open.apply(this, arguments);
@@ -310,47 +304,48 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
310
304
  key: "close",
311
305
  value: function () {
312
306
  var _close = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
313
- var _this$_boardRoom, _this$_boardRoom2, _this$_boardRoom3, _t;
307
+ var boardInstance, boardRoom;
314
308
  return _regenerator["default"].wrap(function (_context2) {
315
309
  while (1) switch (_context2.prev = _context2.next) {
316
310
  case 0:
317
- _context2.prev = 0;
318
- this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
319
- if (this._boardInstance) {
320
- this._boardInstance.clearPage();
321
- this.logger.info('[annotation-fragment][close]: clearPage');
322
- }
323
- this.joined = false;
324
- this.currentTool = 'curve';
325
- // this._boardRoom?.applicationManager.terminateApplication(this._FORGE_WHITEBOARD_APP_ID);
326
- if (this._currentAnntationView && this._boardView.hasChildNodes()) {
327
- 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');
328
343
  }
329
- _context2.next = 1;
330
- return (_this$_boardRoom = this._boardRoom) === null || _this$_boardRoom === void 0 ? void 0 : _this$_boardRoom.leaveRoom();
331
344
  case 1:
332
- this.logger.info(// @ts-ignore
333
- "[annotation-fragment][close] leaveRoom , ".concat(this._boardRoom['traceId']));
334
- (_this$_boardRoom2 = this._boardRoom) === null || _this$_boardRoom2 === void 0 || _this$_boardRoom2.applicationManager.removeListener('launch', this._launchHandler);
335
- (_this$_boardRoom3 = this._boardRoom) === null || _this$_boardRoom3 === void 0 || _this$_boardRoom3.applicationManager.removeListener('terminal', this._terminalHandler);
336
- this._boardInstance = null;
337
- this._boardRoom = null;
338
- _context2.next = 3;
339
- break;
340
- case 2:
341
- _context2.prev = 2;
342
- _t = _context2["catch"](0);
343
- this.logger.info('[annotation-fragment][close]: catch error', _t);
344
- case 3:
345
- _context2.prev = 3;
346
- window.runtime.browserWindow.hide();
347
- this.logger.info('[annotation-fragment][close]: close annotation window');
348
- return _context2.finish(3);
349
- case 4:
350
345
  case "end":
351
346
  return _context2.stop();
352
347
  }
353
- }, _callee2, this, [[0, 2, 3, 4]]);
348
+ }, _callee2, this);
354
349
  }));
355
350
  function close() {
356
351
  return _close.apply(this, arguments);
@@ -361,25 +356,26 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
361
356
  key: "hide",
362
357
  value: function hide() {
363
358
  window.runtime.browserWindow.hide();
364
- this.logger.info('[annotation-fragment][open]: hide annotation window');
359
+ this.logger.info('hide annotation window');
365
360
  }
366
361
  }, {
367
362
  key: "show",
368
363
  value: function show() {
369
364
  window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
370
365
  window.runtime.browserWindow.show();
371
- this.logger.info('[annotation-fragment][open]: show annotation window');
366
+ this.logger.info('show annotation window');
372
367
  }
373
368
  }, {
374
369
  key: "focus",
375
370
  value: function focus() {
371
+ this.logger.info('focus annotation window');
376
372
  window.runtime.browserWindow.focus();
377
373
  }
378
374
  }, {
379
375
  key: "setBounds",
380
376
  value: function setBounds(bounds) {
381
377
  this.bounds = bounds;
382
- this.logger.info("[annotation-fragment][setBounds]: bounds is changed =>, ".concat(JSON.stringify(bounds)));
378
+ this.logger.info("bounds is changed =>, ".concat(JSON.stringify(bounds)));
383
379
  window.runtime.browserWindow.setBounds(bounds);
384
380
  this._updateBoardElBySize({
385
381
  width: bounds.width,
@@ -401,28 +397,27 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
401
397
  }, {
402
398
  key: "_updateWindowSize",
403
399
  value: function _updateWindowSize(paramWidth, paramHeight) {
404
- var _this$_boardInstance;
405
400
  if (!paramWidth || !paramHeight) {
406
401
  return;
407
402
  }
408
- // if (
409
- // paramWidth !== this._lastViewPortSet.width ||
410
- // paramHeight !== this._lastViewPortSet.height
411
- // ) {
412
403
  this._lastViewPortSet.width = paramWidth;
413
404
  this._lastViewPortSet.height = paramHeight;
414
- this.logger.info("[annotation-fragment][_updateWindowSize]: updateViewport width:".concat(paramWidth, " height:").concat(paramHeight));
415
- (_this$_boardInstance = this._boardInstance) === null || _this$_boardInstance === void 0 || _this$_boardInstance.updateViewport(paramWidth, paramHeight);
416
- // }
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
+ }
417
411
  }
418
412
  }, {
419
413
  key: "_updateBoardElBySize",
420
414
  value: function _updateBoardElBySize(size) {
421
415
  if (size) {
422
- var _this$_boardInstance2;
416
+ var _this$_boardInstance;
417
+ this.logger.info('update board element size', size);
423
418
  this._boardView.style.width = "".concat(size.width, "px");
424
419
  this._boardView.style.height = "".concat(size.height, "px");
425
- 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;
426
421
  if (currentBoardInstanceView) {
427
422
  currentBoardInstanceView.style.width = "".concat(size.width, "px");
428
423
  currentBoardInstanceView.style.height = "".concat(size.height, "px");
@@ -433,15 +428,14 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
433
428
  }, {
434
429
  key: "setIgnore",
435
430
  value: function setIgnore(ignore) {
436
- this.logger.info("[annotation-fragment][setIgnore]: setIgnore method is called, the ignore is => ".concat(ignore));
437
- this.isIgnore = ignore;
431
+ this.logger.info("setIgnore method is called, the ignore is => ".concat(ignore));
438
432
  window.runtime.browserWindow.setIgnoreMouseEvents(ignore);
439
433
  }
440
434
  }, {
441
435
  key: "toolChanged",
442
436
  value: function toolChanged(event) {
443
437
  if (!this._boardInstance) return;
444
- 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)));
445
439
  var board = this._boardInstance;
446
440
  var payload = event.payload;
447
441
  switch (event.action) {
@@ -477,7 +471,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
477
471
  }, {
478
472
  key: "setDrawing",
479
473
  value: function setDrawing(drawing) {
480
- 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));
481
475
  this.drawing = drawing;
482
476
  }
483
477
  }, {
@@ -485,7 +479,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
485
479
  value: function _initBoardStyle(whiteboard) {
486
480
  var frameWidth = this.bounds.width;
487
481
  var frameHeight = this.bounds.height;
488
- 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));
489
483
  this._boardView.style.width = "".concat(frameWidth, "px");
490
484
  this._boardView.style.height = "".concat(frameHeight, "px");
491
485
  whiteboard.view.style.height = "".concat(frameHeight, "px");
@@ -498,7 +492,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
498
492
  whiteboard.strokeColor = '#FFC908';
499
493
  whiteboard.setCurrentTool('curve');
500
494
  this._updateWindowSize(frameWidth, frameHeight);
501
- 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));
502
496
  whiteboard.on('undoStackLength', function (steps) {
503
497
  // isWindows() && window.runtime.browserWindow.blur();
504
498
  (0, _rendererEvent.sendEvent)({
@@ -517,16 +511,16 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
517
511
  }, {
518
512
  key: "_handleSetTool",
519
513
  value: function _handleSetTool(payload) {
520
- var _this = this;
514
+ var _this3 = this;
521
515
  var board = this._boardInstance;
522
516
  this.currentTool = 'none';
523
517
  var currentTool = (0, _libs.convertTool)(payload);
524
518
  if (board) {
525
519
  board.setCurrentTool(currentTool);
526
520
  var timber = setTimeout(function () {
527
- var _this$_boardDom2;
528
- (_this$_boardDom2 = _this._boardDom) === null || _this$_boardDom2 === void 0 || _this$_boardDom2.getBoundingClientRect();
529
- _this.currentTool = currentTool;
521
+ var _this3$_boardDom;
522
+ (_this3$_boardDom = _this3._boardDom) === null || _this3$_boardDom === void 0 || _this3$_boardDom.getBoundingClientRect();
523
+ _this3.currentTool = currentTool;
530
524
  clearTimeout(timber);
531
525
  }, 600);
532
526
  }
@@ -535,37 +529,38 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
535
529
  key: "_init",
536
530
  value: function () {
537
531
  var _init2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(engine) {
538
- var _this2 = this;
532
+ var _this4 = this;
539
533
  return _regenerator["default"].wrap(function (_context3) {
540
534
  while (1) switch (_context3.prev = _context3.next) {
541
535
  case 0:
542
536
  engine.addObserver({
543
537
  onConnectionStateUpdated: function onConnectionStateUpdated(state) {
538
+ (0, _sharedStorage.setAnnotationEngineState)(state);
544
539
  (0, _rendererEvent.sendEvent)({
545
540
  action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_ENGINE_STATE,
546
541
  payload: state
547
542
  });
548
543
  if (state === _fcrCore.FcrConnectionState.CONNECTED) {
549
- _this2._engine = engine;
550
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => CONNECTED, hasWaitingOpen ".concat(_this2._hasWaitingOpen));
551
- if (_this2._hasWaitingOpen) {
552
- _this2._hasWaitingOpen = false;
553
- _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();
554
549
  }
555
550
  }
556
551
  if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
557
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => DISCONNECTED, the engine is ".concat(_this2._engine));
558
- _this2._engine && engine.login();
552
+ _this4.logger.info("engine connection state updated => DISCONNECTED, the engine is ".concat(_this4._engine));
553
+ _this4._engine && engine.login();
559
554
  }
560
555
  if (state === _fcrCore.FcrConnectionState.CONNECTING) {
561
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => CONNECTING");
556
+ _this4.logger.info("engine connection state updated => CONNECTING");
562
557
  }
563
558
  if (state === _fcrCore.FcrConnectionState.RECONNECTING) {
564
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => RECONNECTING");
559
+ _this4.logger.info("engine connection state updated => RECONNECTING");
565
560
  }
566
561
  if (state === _fcrCore.FcrConnectionState.ABORTED) {
567
- _this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => ABORTED, the engine is ".concat(_this2._engine));
568
- _this2._engine && engine.login();
562
+ _this4.logger.info("engine connection state updated => ABORTED, the engine is ".concat(_this4._engine));
563
+ _this4._engine && engine.login();
569
564
  }
570
565
  }
571
566
  });
@@ -585,15 +580,20 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
585
580
  }, {
586
581
  key: "_initBoardRoom",
587
582
  value: function () {
588
- var _initBoardRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
589
- var _this3 = this;
590
- var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, currentTimeStamp, retriesMax, _t2;
591
- return _regenerator["default"].wrap(function (_context6) {
592
- 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) {
593
588
  case 0:
594
- _this$_config = this._config, userId = _this$_config.userId, boardToken = _this$_config.boardToken, region = _this$_config.region, appIdentifier = _this$_config.appIdentifier, boardId = _this$_config.boardId;
595
- nickName = localStorage.getItem('annotation_nickname') || '';
596
- 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));
597
597
  // @ts-ignore
598
598
  rtmClient = this._engine._rteEngine._rtmClient._client;
599
599
  rtmProvider = new _imports.FcrRTMProvider_2_2(rtmClient);
@@ -602,73 +602,111 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
602
602
  currentTimeStamp = Date.now(); // @ts-ignore
603
603
  this._boardRoom['traceId'] = "".concat(boardToken, "-").concat(boardId, "-").concat(userId, "-").concat(currentTimeStamp);
604
604
  wbRoom.applicationManager.registerApplication(_imports.FcrWhiteboardApplication);
605
- this.logger.info("[annotation-fragment][initBoardRoom]: bordRoom instance is created, start join room");
606
- _context6.prev = 1;
607
- retriesMax = 10;
608
- _context6.next = 2;
609
- return (0, _asyncRetry.retryAttempt)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
610
- return _regenerator["default"].wrap(function (_context4) {
611
- while (1) switch (_context4.prev = _context4.next) {
612
- case 0:
613
- _context4.next = 1;
614
- return wbRoom.joinRoom({
615
- userId: userId,
616
- nickName: nickName,
617
- roomToken: boardToken,
618
- sdkConfig: {
619
- // @ts-ignore
620
- region: region,
621
- appIdentifier: appIdentifier
622
- }
623
- });
624
- case 1:
625
- // @ts-ignore
626
- _this3.logger.info(// @ts-ignore
627
- "[annotation-fragment][initBoardRoom]: join room success, traceId ".concat(_this3._boardRoom['traceId']));
628
- // room.userManager.on("join") 和 room.userManager.on("leave")
629
- wbRoom.userManager.on('join', _this3._handleBoardRoomUserJoin);
630
- // wbRoom.userManager.on('leave',this._handleBoardRoomUserLeave);
631
- case 2:
632
- case "end":
633
- return _context4.stop();
634
- }
635
- }, _callee4);
636
- })), [], {
637
- retriesMax: retriesMax
638
- }).fail(/*#__PURE__*/function () {
639
- var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(_ref3) {
640
- var error, timeFn, currentRetry;
641
- return _regenerator["default"].wrap(function (_context5) {
642
- 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) {
643
613
  case 0:
644
- error = _ref3.error, timeFn = _ref3.timeFn, currentRetry = _ref3.currentRetry;
645
- _this3.logger.info("[annotation-fragment][initBoardRoom]: retry to join board room, ".concat(error.message, ", retry ").concat(currentRetry, " times"));
646
- _context5.next = 1;
647
- return timeFn();
648
- case 1:
649
- 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();
650
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:
651
696
  case "end":
652
- return _context5.stop();
697
+ return _context6.stop();
653
698
  }
654
- }, _callee5);
699
+ }, _callee6, null, [[1, 4, 5, 6]]);
655
700
  }));
656
- return function (_x2) {
657
- return _ref4.apply(this, arguments);
701
+ return function (_x2, _x3) {
702
+ return _ref2.apply(this, arguments);
658
703
  };
659
- }()).exec();
704
+ }()));
660
705
  case 2:
661
- _context6.next = 4;
662
- break;
663
- case 3:
664
- _context6.prev = 3;
665
- _t2 = _context6["catch"](1);
666
- this.logger.error("[annotation-fragment][initBoardRoom]: join room failed");
667
- case 4:
668
706
  case "end":
669
- return _context6.stop();
707
+ return _context7.stop();
670
708
  }
671
- }, _callee6, this, [[1, 3]]);
709
+ }, _callee7, this);
672
710
  }));
673
711
  function _initBoardRoom() {
674
712
  return _initBoardRoom2.apply(this, arguments);
@@ -676,26 +714,34 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
676
714
  return _initBoardRoom;
677
715
  }()
678
716
  }, {
679
- key: "_initEngine",
680
- value: function _initEngine(config) {
717
+ key: "_createEngine",
718
+ value: function _createEngine(config) {
681
719
  var userId = config.userId,
682
720
  token = config.roomToken,
683
721
  appId = config.appId;
684
- this.logger.info("[annotation-fragment][initEngine]: init engine with config => ".concat(JSON.stringify(config)));
685
- return new _fcrCore.FcrCoreEngine(_objectSpread({
686
- appId: appId,
687
- token: token,
688
- userId: userId,
689
- region: _fcrCore.FcrRegion.CN
690
- }, _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
+ }
691
738
  }
692
739
  }, {
693
740
  key: "_launchHandler",
694
741
  value: function _launchHandler(appId, app) {
695
742
  if (appId === this._FORGE_WHITEBOARD_APP_ID) {
696
- this.logger.info("[annotation-fragment][event]: launch event is triggered => ".concat(app.selfUserId));
697
- this._currentAnntationView = app.view;
698
- this._currentAnntationView && this._boardView.appendChild(this._currentAnntationView);
743
+ this.logger.info("launch event is triggered => ".concat(app.selfUserId));
744
+ this._boardView.appendChild(app.view);
699
745
  this._initBoardStyle(app);
700
746
  }
701
747
  }
@@ -704,7 +750,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
704
750
  value: function _terminalHandler(appId, app) {
705
751
  if (appId === this._FORGE_WHITEBOARD_APP_ID) {
706
752
  var _this$_boardView;
707
- this.logger.info("[annotation-fragment][event]: terminal event is triggered => ".concat(app.selfUserId));
753
+ this.logger.info("terminal event is triggered => ".concat(app.selfUserId));
708
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));
709
755
  }
710
756
  }
@@ -723,15 +769,15 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
723
769
  value: function _cancelCurrentUpdateWindowSizeTimber(stage) {
724
770
  if (this._pollingCancelHandler && typeof this._pollingCancelHandler === 'function') {
725
771
  this._pollingCancelHandler();
726
- 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));
727
773
  }
728
774
  }
729
775
  }, {
730
776
  key: "_handlePollingUpdateWindowSize",
731
777
  value: function _handlePollingUpdateWindowSize(stage) {
732
778
  this._cancelCurrentUpdateWindowSizeTimber(stage);
733
- this._pollingCancelHandler = startPolling(this._updateWindowSizeWithCurrentBounds);
734
- 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));
735
781
  }
736
782
  }, {
737
783
  key: "_handleBoardRoomUserJoin",
@@ -742,20 +788,59 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
742
788
  }, {
743
789
  key: "_syncScreenShareOwnerOpenDone",
744
790
  value: function _syncScreenShareOwnerOpenDone() {
745
- this.logger.info('[annotation-fragment]: _syncScreenShareOwnerOpenDone');
791
+ this.logger.info('syncScreenShareOwnerOpenDone');
746
792
  (0, _rendererEvent.sendEvent)({
747
793
  action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_SYNC_OWNER_OPEN_DONE,
748
794
  payload: null
749
795
  });
750
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
+ }
751
837
  }]);
752
838
  }();
753
839
  _FragmentAnnotationStore = FragmentAnnotationStore;
754
- 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);
755
841
  _init_joined = _applyDecs$e[0];
756
842
  _init_bounds = _applyDecs$e[1];
757
843
  _init_currentTool = _applyDecs$e[2];
758
- _init_isIgnore = _applyDecs$e[3];
759
- _init_drawing = _applyDecs$e[4];
760
- _initProto = _applyDecs$e[5];
844
+ _init_drawing = _applyDecs$e[3];
845
+ _initProto = _applyDecs$e[4];
761
846
  var FragmentAnnotationStoreContext = exports.FragmentAnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)(null);