fcr-ui-scene 3.6.1 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/dist/132.js +2 -0
  2. package/dist/132.js.LICENSE.txt +311 -0
  3. package/dist/317.js +2 -0
  4. package/dist/317.js.LICENSE.txt +20 -0
  5. package/dist/651.js +2 -0
  6. package/dist/651.js.LICENSE.txt +1 -0
  7. package/dist/689343b64b60bfb7ffff.png +0 -0
  8. package/dist/73.js +1 -0
  9. package/dist/885f9369ea05a8ac0e56.png +0 -0
  10. package/dist/90f383876a6e93e7c7ca.png +0 -0
  11. package/dist/9b37584780995fc5df8c.gif +0 -0
  12. package/dist/annotation.e5cbd3a70b6d42361872.css +1274 -0
  13. package/dist/annotation.html +1 -0
  14. package/dist/annotation.js +2 -0
  15. package/dist/annotation.js.LICENSE.txt +252 -0
  16. package/dist/assets/browser/images/default1.jpg +0 -0
  17. package/dist/assets/browser/images/default2.jpg +0 -0
  18. package/dist/assets/browser/images/default3.jpg +0 -0
  19. package/dist/assets/browser/images/default4.jpg +0 -0
  20. package/dist/assets/browser/images/default5.jpg +0 -0
  21. package/dist/assets/browser/images/default6.jpg +0 -0
  22. package/dist/assets/browser/images/default7.jpg +0 -0
  23. package/dist/assets/browser/sound_effects/pretest.mp3 +0 -0
  24. package/dist/assets/browser/sound_effects/recording_started.mp3 +0 -0
  25. package/dist/assets/browser/sound_effects/remote_user_joined.mp3 +0 -0
  26. package/dist/assets/browser/sound_effects/speaker_test.mp3 +0 -0
  27. package/dist/assets/browser/videos/default8.mp4 +0 -0
  28. package/dist/assets/browser/videos/default9.mp4 +0 -0
  29. package/dist/assets/cursors/fcr_whiteboard_input.ico +0 -0
  30. package/dist/assets/cursors/fcr_whiteboard_pen.ico +0 -0
  31. package/dist/assets/cursors/fcr_whiteboard_shape_-straightline.ico +0 -0
  32. package/dist/assets/cursors/fcr_whiteboard_shape_arrow.ico +0 -0
  33. package/dist/assets/cursors/fcr_whiteboard_shape_circle.ico +0 -0
  34. package/dist/assets/cursors/fcr_whiteboard_shape_rectangle.ico +0 -0
  35. package/dist/assets/cursors/fcr_whiteboard_shape_triangle.ico +0 -0
  36. package/dist/assets/electron/images/default1.jpg +0 -0
  37. package/dist/assets/electron/images/default2.jpg +0 -0
  38. package/dist/assets/electron/sound_effects/pretest.mp3 +0 -0
  39. package/dist/assets/electron/videos/default8.mp4 +0 -0
  40. package/dist/assets/fcr_chat_reddot.svg +5 -0
  41. package/dist/assets/fcr_defaultpage.png +0 -0
  42. package/dist/assets/fcr_grid_big.svg +3 -0
  43. package/dist/assets/fcr_leave2.svg +58 -0
  44. package/dist/assets/fcr_listontop_big.svg +3 -0
  45. package/dist/assets/full-screen-error-boundary-img.png +0 -0
  46. package/dist/assets/leave-meeting.png +0 -0
  47. package/dist/assets/loading.gif +0 -0
  48. package/dist/assets/login_confirm.png +0 -0
  49. package/dist/assets/pretest.mp3 +0 -0
  50. package/dist/assets/state-bar-logo.png +0 -0
  51. package/dist/assets/step-gradient.svg +10 -0
  52. package/dist/b74b002687a3a3346bec.png +0 -0
  53. package/dist/b94869094481702f949b.png +0 -0
  54. package/dist/ebeace75fd46b90d890e.png +0 -0
  55. package/dist/electron/app.js +194 -0
  56. package/dist/electron/bootstrap-dev.js +46 -0
  57. package/dist/electron/bootstrap-sdk.js +211 -0
  58. package/dist/electron/default-options.js +25 -0
  59. package/dist/electron/env.js +13 -0
  60. package/dist/electron/index.js +20 -0
  61. package/dist/electron/injections.js +903 -0
  62. package/dist/electron/ipc/ipc.js +141 -0
  63. package/dist/electron/ipc/type.js +19 -0
  64. package/dist/electron/logger.js +65 -0
  65. package/dist/electron/main.js +94 -0
  66. package/dist/electron/plugins/devtool-shortcut.js +33 -0
  67. package/dist/electron/plugins/meeting-state.js +39 -0
  68. package/dist/electron/plugins/screenshot.js +54 -0
  69. package/dist/electron/preload.js +108 -0
  70. package/dist/electron/tools.js +66 -0
  71. package/dist/electron/window.js +123 -0
  72. package/dist/extensions/agora-extension-virtual-background/agora-wasm.wasm +0 -0
  73. package/dist/extensions/ai-denoiser/denoiser-wasm-simd.wasm +0 -0
  74. package/dist/extensions/ai-denoiser/denoiser-wasm.js +1 -0
  75. package/dist/extensions/ai-denoiser/denoiser-wasm.wasm +0 -0
  76. package/dist/fad688b9135b15d6c405.png +0 -0
  77. package/dist/index.html +224 -0
  78. package/dist/main.393a2a91ab7fc05ffce6.css +15403 -0
  79. package/dist/main.js +2 -0
  80. package/dist/main.js.LICENSE.txt +272 -0
  81. package/dist/worker-entry.worker.js.LICENSE.txt +13 -0
  82. package/lib/creator.d.ts +5 -0
  83. package/lib/creator.js +106 -17
  84. package/lib/electron/bootstrap-sdk.js +4 -0
  85. package/lib/electron/injections.d.ts +4 -0
  86. package/lib/electron/injections.js +37 -8
  87. package/lib/electron/ipc/ipc.d.ts +1 -0
  88. package/lib/electron/ipc/ipc.js +4 -0
  89. package/lib/electron/main.js +6 -2
  90. package/lib/electron/plugins/screenshot.js +4 -2
  91. package/lib/electron/preload.js +7 -2
  92. package/lib/electron/window.js +4 -3
  93. package/lib/fragments/annotation/index.d.ts +10 -0
  94. package/lib/fragments/annotation/index.js +106 -0
  95. package/lib/fragments/annotation/libs.d.ts +55 -0
  96. package/lib/fragments/annotation/libs.js +93 -0
  97. package/lib/fragments/annotation/store.d.ts +25 -0
  98. package/lib/fragments/annotation/store.js +485 -0
  99. package/lib/fragments/annotation/view.d.ts +2 -0
  100. package/lib/fragments/annotation/view.js +23 -0
  101. package/lib/fragments/base.d.ts +10 -0
  102. package/lib/fragments/base.js +44 -0
  103. package/lib/modules/action-bar/components/screen-share/submenu.js +7 -6
  104. package/lib/modules/action-bar/index.css +7 -0
  105. package/lib/modules/action-bar/index.d.ts +2 -0
  106. package/lib/modules/action-bar/index.js +1 -0
  107. package/lib/modules/action-bar/store.d.ts +6 -2
  108. package/lib/modules/action-bar/store.js +15 -9
  109. package/lib/modules/annotation/components/control-bar/index.css +48 -0
  110. package/lib/modules/annotation/components/control-bar/index.d.ts +3 -0
  111. package/lib/modules/annotation/components/control-bar/index.js +101 -0
  112. package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.d.ts +3 -0
  113. package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.js +46 -0
  114. package/lib/modules/annotation/components/toolbar/components/color-tool/index.d.ts +1 -0
  115. package/lib/modules/annotation/components/toolbar/components/color-tool/index.js +52 -0
  116. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +3 -0
  117. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.js +59 -0
  118. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +11 -0
  119. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.js +59 -0
  120. package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.d.ts +1 -0
  121. package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.js +68 -0
  122. package/lib/modules/annotation/components/toolbar/components/item/item.d.ts +17 -0
  123. package/lib/modules/annotation/components/toolbar/components/item/item.js +115 -0
  124. package/lib/modules/annotation/components/toolbar/components/item/style.css +43 -0
  125. package/lib/modules/annotation/components/toolbar/components/panel/index.d.ts +5 -0
  126. package/lib/modules/annotation/components/toolbar/components/panel/index.js +22 -0
  127. package/lib/modules/annotation/components/toolbar/components/panel/style.css +24 -0
  128. package/lib/modules/annotation/components/toolbar/components/pen-tool/index.d.ts +1 -0
  129. package/lib/modules/annotation/components/toolbar/components/pen-tool/index.js +58 -0
  130. package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.d.ts +3 -0
  131. package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.js +34 -0
  132. package/lib/modules/annotation/components/toolbar/components/tips/index.d.ts +2 -0
  133. package/lib/modules/annotation/components/toolbar/components/tips/index.js +25 -0
  134. package/lib/modules/annotation/components/toolbar/components/tips/style.css +19 -0
  135. package/lib/modules/annotation/components/toolbar/index.d.ts +0 -0
  136. package/lib/modules/annotation/components/toolbar/index.js +1 -0
  137. package/lib/modules/annotation/components/toolbar/store.d.ts +40 -0
  138. package/lib/modules/annotation/components/toolbar/store.js +279 -0
  139. package/lib/modules/annotation/components/toolbar/style.css +55 -0
  140. package/lib/modules/annotation/components/toolbar/view.d.ts +2 -0
  141. package/lib/modules/annotation/components/toolbar/view.js +120 -0
  142. package/lib/modules/annotation/index.d.ts +36 -0
  143. package/lib/modules/annotation/index.js +168 -0
  144. package/lib/modules/annotation/store.d.ts +85 -0
  145. package/lib/modules/annotation/store.js +648 -0
  146. package/lib/modules/annotation/style.css +26 -0
  147. package/lib/modules/annotation/view.d.ts +2 -0
  148. package/lib/modules/annotation/view.js +32 -0
  149. package/lib/modules/chat/view.js +112 -100
  150. package/lib/modules/components/annotation-menu/index.d.ts +7 -0
  151. package/lib/modules/components/annotation-menu/index.js +119 -0
  152. package/lib/modules/components/leave-meeting/components/assign-host.js +26 -23
  153. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +2 -0
  154. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +6 -2
  155. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +2 -1
  156. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +6 -1
  157. package/lib/modules/components/member-window/components/video-player/index.d.ts +1 -0
  158. package/lib/modules/components/member-window/index.d.ts +1 -1
  159. package/lib/modules/components/member-window/index.js +8 -5
  160. package/lib/modules/components/member-window/types.d.ts +2 -0
  161. package/lib/modules/components/security-menu/index.js +7 -6
  162. package/lib/modules/control-bar/components/annotation-button/index.d.ts +1 -0
  163. package/lib/modules/control-bar/components/annotation-button/index.js +59 -0
  164. package/lib/modules/control-bar/index.d.ts +6 -2
  165. package/lib/modules/control-bar/index.js +5 -2
  166. package/lib/modules/control-bar/store.d.ts +23 -7
  167. package/lib/modules/control-bar/store.js +112 -77
  168. package/lib/modules/control-bar/view.js +7 -3
  169. package/lib/modules/dialog/components/annotation-tool/index.d.ts +4 -0
  170. package/lib/modules/dialog/components/annotation-tool/index.js +53 -0
  171. package/lib/modules/dialog/components/chat/index.js +1 -1
  172. package/lib/modules/dialog/components/host-area-container/index.d.ts +12 -0
  173. package/lib/modules/dialog/components/host-area-container/index.js +214 -0
  174. package/lib/modules/dialog/components/participant/index.js +1 -1
  175. package/lib/modules/dialog/components/system-preference/index.js +1 -1
  176. package/lib/modules/dialog/components/video-window/index.js +1 -0
  177. package/lib/modules/dialog/hooks/use-popover-watcher.d.ts +14 -0
  178. package/lib/modules/dialog/hooks/use-popover-watcher.js +112 -0
  179. package/lib/modules/dialog/hooks/useElectron.d.ts +1 -0
  180. package/lib/modules/dialog/hooks/useElectron.js +11 -2
  181. package/lib/modules/dialog/index.d.ts +2 -0
  182. package/lib/modules/dialog/index.js +2 -1
  183. package/lib/modules/dialog/store.d.ts +9 -2
  184. package/lib/modules/dialog/store.js +46 -6
  185. package/lib/modules/event-confirm/components/window/index.d.ts +7 -0
  186. package/lib/modules/event-confirm/components/window/index.js +188 -0
  187. package/lib/modules/event-confirm/index.d.ts +4 -4
  188. package/lib/modules/event-confirm/index.js +6 -4
  189. package/lib/modules/event-confirm/store.d.ts +4 -5
  190. package/lib/modules/event-confirm/store.js +35 -26
  191. package/lib/modules/event-confirm/view.js +23 -171
  192. package/lib/modules/event-sound/index.js +1 -1
  193. package/lib/modules/layout/components/CommonVideoRenderer.js +30 -16
  194. package/lib/modules/layout/index.d.ts +4 -0
  195. package/lib/modules/layout/index.js +2 -0
  196. package/lib/modules/layout/store.d.ts +14 -2
  197. package/lib/modules/layout/store.js +77 -45
  198. package/lib/modules/participant/index.d.ts +2 -0
  199. package/lib/modules/participant/index.js +2 -1
  200. package/lib/modules/participant/store.d.ts +5 -2
  201. package/lib/modules/participant/store.js +45 -28
  202. package/lib/modules/setting/audio-settings/audio-settings.js +3 -14
  203. package/lib/modules/share-screen/components/selection/index.js +18 -42
  204. package/lib/modules/share-screen/index.d.ts +6 -2
  205. package/lib/modules/share-screen/index.js +4 -2
  206. package/lib/modules/share-screen/store.d.ts +38 -46
  207. package/lib/modules/share-screen/store.js +263 -693
  208. package/lib/modules/share-screen/view.js +2 -2
  209. package/lib/modules/state-bar/assets/fcr_grid_big.svg +1 -1
  210. package/lib/modules/state-bar/assets/fcr_listontop_big.svg +1 -1
  211. package/lib/modules/state-bar/index.d.ts +2 -0
  212. package/lib/modules/state-bar/index.js +1 -0
  213. package/lib/modules/state-bar/store.d.ts +5 -1
  214. package/lib/modules/state-bar/store.js +9 -1
  215. package/lib/modules/state-bar/view.js +3 -2
  216. package/lib/modules/video-window/components/members/index.js +2 -1
  217. package/lib/modules/waiting-room-layout/store.js +1 -1
  218. package/lib/modules/whiteboard/components/control-bar/store.d.ts +5 -1
  219. package/lib/modules/whiteboard/components/control-bar/store.js +8 -1
  220. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +16 -5
  221. package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +67 -12
  222. package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +22 -2
  223. package/lib/modules/whiteboard/components/toolbar/components/history.js +46 -14
  224. package/lib/modules/whiteboard/components/toolbar/components/item/index.js +3 -2
  225. package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +1 -1
  226. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +58 -16
  227. package/lib/modules/whiteboard/components/toolbar/components/screen-capture-picker.js +15 -4
  228. package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +45 -2
  229. package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +14 -0
  230. package/lib/modules/whiteboard/components/toolbar/hooks/index.js +235 -7
  231. package/lib/modules/whiteboard/components/toolbar/index.d.ts +1 -1
  232. package/lib/modules/whiteboard/components/toolbar/index.js +1 -1
  233. package/lib/modules/whiteboard/components/toolbar/store.d.ts +9 -2
  234. package/lib/modules/whiteboard/components/toolbar/store.js +30 -6
  235. package/lib/modules/whiteboard/components/toolbar/{ style.css → style.css} +1 -0
  236. package/lib/modules/whiteboard/index.d.ts +2 -0
  237. package/lib/modules/whiteboard/index.js +20 -20
  238. package/lib/plugins/browser-runtime-plugin.js +10 -1
  239. package/lib/providers/annotation-provider.d.ts +77 -0
  240. package/lib/providers/annotation-provider.js +411 -0
  241. package/lib/providers/interpreter-provider.d.ts +1 -0
  242. package/lib/providers/interpreter-provider.js +182 -154
  243. package/lib/providers/privilege-provider.d.ts +35 -6
  244. package/lib/providers/privilege-provider.js +105 -49
  245. package/lib/providers/renderer-provider.js +3 -7
  246. package/lib/providers/room-provider.d.ts +13 -1
  247. package/lib/providers/room-provider.js +21 -7
  248. package/lib/providers/screen-share-provider.d.ts +131 -34
  249. package/lib/providers/screen-share-provider.js +561 -173
  250. package/lib/providers/sharing-provider.d.ts +33 -0
  251. package/lib/{shared-data-source/screen-share-data-source.js → providers/sharing-provider.js} +87 -39
  252. package/lib/runtime.d.ts +6 -1
  253. package/lib/scenes/main-scene.d.ts +7 -2
  254. package/lib/scenes/main-scene.js +54 -25
  255. package/lib/scenes/waiting-scene.d.ts +6 -0
  256. package/lib/scenes/waiting-scene.js +15 -5
  257. package/lib/shared-data-source/member-data.d.ts +21 -5
  258. package/lib/shared-data-source/member-data.js +69 -17
  259. package/lib/shared-data-source/screen-share-data.d.ts +270 -0
  260. package/lib/shared-data-source/screen-share-data.js +389 -0
  261. package/lib/shared-data-source/security-data.d.ts +4 -1
  262. package/lib/shared-data-source/security-data.js +5 -2
  263. package/lib/shared-data-source/setting.js +6 -4
  264. package/lib/type.d.ts +53 -0
  265. package/lib/ui-manager.d.ts +3 -2
  266. package/lib/ui-manager.js +6 -4
  267. package/lib/ui-scene.js +59 -44
  268. package/lib/utilities/constant.d.ts +8 -1
  269. package/lib/utilities/constant.js +7 -0
  270. package/lib/utilities/logger.d.ts +4 -0
  271. package/lib/utilities/logger.js +8 -1
  272. package/lib/utilities/renderer-event.d.ts +3 -0
  273. package/lib/utilities/renderer-event.js +14 -1
  274. package/lib/utilities/screen.js +2 -1
  275. package/lib/utilities/tools.d.ts +18 -1
  276. package/lib/utilities/tools.js +48 -2
  277. package/package.json +6 -6
  278. package/public/assets/cursors/fcr_whiteboard_input.ico +0 -0
  279. package/public/assets/cursors/fcr_whiteboard_pen.ico +0 -0
  280. package/public/assets/cursors/fcr_whiteboard_shape_-straightline.ico +0 -0
  281. package/public/assets/cursors/fcr_whiteboard_shape_arrow.ico +0 -0
  282. package/public/assets/cursors/fcr_whiteboard_shape_circle.ico +0 -0
  283. package/public/assets/cursors/fcr_whiteboard_shape_rectangle.ico +0 -0
  284. package/public/assets/cursors/fcr_whiteboard_shape_triangle.ico +0 -0
  285. package/public/assets/fcr_chat_reddot.svg +3 -3
  286. package/public/assets/fcr_grid_big.svg +1 -1
  287. package/public/assets/fcr_leave2.svg +14 -14
  288. package/public/assets/fcr_listontop_big.svg +1 -1
  289. package/public/assets/step-gradient.svg +1 -1
  290. package/public/fragment.html +10 -0
  291. package/public/index.html +3 -1
  292. package/lib/shared-data-source/screen-share-data-source.d.ts +0 -37
@@ -0,0 +1,411 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.symbol.js");
4
+ require("core-js/modules/es.symbol.description.js");
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
+ require("core-js/modules/es.array.is-array.js");
9
+ require("core-js/modules/es.array.push.js");
10
+ require("core-js/modules/es.date.to-primitive.js");
11
+ require("core-js/modules/es.function.bind.js");
12
+ require("core-js/modules/es.function.name.js");
13
+ require("core-js/modules/es.map.js");
14
+ require("core-js/modules/es.number.constructor.js");
15
+ require("core-js/modules/es.object.create.js");
16
+ require("core-js/modules/es.object.define-property.js");
17
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
18
+ require("core-js/modules/esnext.function.metadata.js");
19
+ require("core-js/modules/esnext.map.delete-all.js");
20
+ require("core-js/modules/esnext.map.emplace.js");
21
+ require("core-js/modules/esnext.map.every.js");
22
+ require("core-js/modules/esnext.map.filter.js");
23
+ require("core-js/modules/esnext.map.find.js");
24
+ require("core-js/modules/esnext.map.find-key.js");
25
+ require("core-js/modules/esnext.map.includes.js");
26
+ require("core-js/modules/esnext.map.key-of.js");
27
+ require("core-js/modules/esnext.map.map-keys.js");
28
+ require("core-js/modules/esnext.map.map-values.js");
29
+ require("core-js/modules/esnext.map.merge.js");
30
+ require("core-js/modules/esnext.map.reduce.js");
31
+ require("core-js/modules/esnext.map.some.js");
32
+ require("core-js/modules/esnext.map.update.js");
33
+ require("core-js/modules/esnext.symbol.metadata.js");
34
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
35
+ var _typeof = require("@babel/runtime/helpers/typeof");
36
+ Object.defineProperty(exports, "__esModule", {
37
+ value: true
38
+ });
39
+ exports.FcrUIAnnotationProviderImpl = exports.FcrAnnotationState = void 0;
40
+ require("core-js/modules/es.array.find.js");
41
+ require("core-js/modules/es.array.for-each.js");
42
+ require("core-js/modules/es.array.iterator.js");
43
+ require("core-js/modules/es.object.to-string.js");
44
+ require("core-js/modules/es.string.iterator.js");
45
+ require("core-js/modules/es.weak-map.js");
46
+ require("core-js/modules/esnext.async-iterator.find.js");
47
+ require("core-js/modules/esnext.async-iterator.for-each.js");
48
+ require("core-js/modules/esnext.iterator.constructor.js");
49
+ require("core-js/modules/esnext.iterator.find.js");
50
+ require("core-js/modules/esnext.iterator.for-each.js");
51
+ require("core-js/modules/esnext.weak-map.delete-all.js");
52
+ require("core-js/modules/esnext.weak-map.emplace.js");
53
+ require("core-js/modules/web.dom-collections.for-each.js");
54
+ require("core-js/modules/web.dom-collections.iterator.js");
55
+ require("core-js/modules/web.timers.js");
56
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
57
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
58
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
59
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
60
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
61
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
62
+ var _constant = require("../utilities/constant");
63
+ var _base = require("../base");
64
+ var _mobx = require("mobx");
65
+ var _type = require("agora-rte-sdk/lib/core/rtc/type");
66
+ var _type2 = require("fcr-core/lib/room-control/sharing-control/type");
67
+ var _imports = require("fcr-core/lib/imports");
68
+ var _rendererEvent = require("../utilities/renderer-event");
69
+ var _fcrCore = require("fcr-core");
70
+ var _type3 = require("../modules/whiteboard/type");
71
+ var _tools = require("../utilities/tools");
72
+ var _type4 = require("fcr-core/lib/type");
73
+ var _logger = require("../utilities/logger");
74
+ var _FcrUIAnnotationProviderImpl;
75
+ var _initProto, _init_scalcValue, _init_annotationState, _init_annotating, _init_currentShareInfo, _zoomInDecs, _zoomOutDecs, _fullContainerDecs, _setOriginScalcDecs, _toggleAnnotationDecs, _openAnnotationWindowDecs, _hideAnnotationWindowDecs, _setCurrentShareInfoDecs, _openToolbarDecs, _closeToolbarDecs, _ref;
76
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
77
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
78
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
79
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
80
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
81
+ function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
82
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
83
+ 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); }
84
+ 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; }
85
+ 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; }
86
+ var FcrAnnotationState = exports.FcrAnnotationState = /*#__PURE__*/function (FcrAnnotationState) {
87
+ FcrAnnotationState["START"] = "start";
88
+ FcrAnnotationState["END"] = "end";
89
+ return FcrAnnotationState;
90
+ }({});
91
+ var _A = /*#__PURE__*/new WeakMap();
92
+ var _B = /*#__PURE__*/new WeakMap();
93
+ var _C = /*#__PURE__*/new WeakMap();
94
+ var _D = /*#__PURE__*/new WeakMap();
95
+ _ref = (_zoomInDecs = [_mobx.action, _mobx.action.bound], _zoomOutDecs = [_mobx.action, _mobx.action.bound], _fullContainerDecs = [_mobx.action, _mobx.action.bound], _setOriginScalcDecs = [_mobx.action, _mobx.action.bound], _toggleAnnotationDecs = [_mobx.action, _mobx.action.bound], _openAnnotationWindowDecs = [_mobx.action, _mobx.action.bound], _hideAnnotationWindowDecs = [_mobx.action, _mobx.action.bound], _setCurrentShareInfoDecs = [_mobx.action, _mobx.action.bound], _openToolbarDecs = [_mobx.action, _mobx.action.bound], _closeToolbarDecs = [_mobx.action, _mobx.action.bound], "_annotationDialogId");
96
+ var FcrUIAnnotationProviderImpl = exports.FcrUIAnnotationProviderImpl = /*#__PURE__*/function () {
97
+ function FcrUIAnnotationProviderImpl(_dialogProvider, _sharingProvider, _memberDataSource, _videoWindowDataSource, _screenShareProvider, _deviceProvider) {
98
+ var _this = this;
99
+ (0, _classCallCheck2["default"])(this, FcrUIAnnotationProviderImpl);
100
+ (0, _defineProperty2["default"])(this, _ref, (_initProto(this), ''));
101
+ (0, _defineProperty2["default"])(this, "_annotationToolDialogId", '');
102
+ (0, _defineProperty2["default"])(this, "_disposers", []);
103
+ (0, _defineProperty2["default"])(this, "logger", (0, _logger.createLogger)({
104
+ prefix: 'FcrUIAnnotationProviderImpl'
105
+ }));
106
+ (0, _defineProperty2["default"])(this, "_shareScreenOwnerId", '');
107
+ (0, _defineProperty2["default"])(this, "_maxScalcValue", 4);
108
+ (0, _defineProperty2["default"])(this, "_minScalcValue", 1);
109
+ _classPrivateFieldInitSpec(this, _A, _init_scalcValue(this, 1));
110
+ _classPrivateFieldInitSpec(this, _B, _init_annotationState(this, FcrAnnotationState.END));
111
+ _classPrivateFieldInitSpec(this, _C, _init_annotating(this, false));
112
+ _classPrivateFieldInitSpec(this, _D, _init_currentShareInfo(this, {
113
+ id: '',
114
+ type: _type.AgoraRtcScreenCaptureType.SCREEN,
115
+ bounds: {
116
+ x: 0,
117
+ y: 0,
118
+ width: 0,
119
+ height: 0
120
+ }
121
+ }));
122
+ (0, _defineProperty2["default"])(this, "_annotationObserver", {
123
+ onConnectionStateUpdated: function () {
124
+ var _onConnectionStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state) {
125
+ var _this$_annotationCont, mainWindow;
126
+ return _regenerator["default"].wrap(function _callee$(_context) {
127
+ while (1) switch (_context.prev = _context.next) {
128
+ case 0:
129
+ if (state === _fcrCore.FcrConnectionState.CONNECTED) {
130
+ mainWindow = (_this$_annotationCont = _this._annotationControl) === null || _this$_annotationCont === void 0 ? void 0 : _this$_annotationCont.getMainWindow();
131
+ _this._boardMainWindow = mainWindow;
132
+ _this.annotationState = FcrAnnotationState.START;
133
+ }
134
+ case 1:
135
+ case "end":
136
+ return _context.stop();
137
+ }
138
+ }, _callee);
139
+ }));
140
+ function onConnectionStateUpdated(_x) {
141
+ return _onConnectionStateUpdated.apply(this, arguments);
142
+ }
143
+ return onConnectionStateUpdated;
144
+ }()
145
+ });
146
+ (0, _defineProperty2["default"])(this, "_observer", {
147
+ onScreenSharingUpdated: function onScreenSharingUpdated(ownerId, state) {
148
+ if (state === _type2.FcrScreenSharingState.START_WHIT_ANNOTATION || state === _type2.FcrScreenSharingState.START_ONLY_SCREEN) {
149
+ _this._shareScreenOwnerId = ownerId;
150
+ if (_this._currentScreenShareOwnerCanStartAnnotation()) {
151
+ _this._initAnnotationTransaction(_this._shareScreenOwnerId);
152
+ }
153
+ } else {
154
+ _this.annotationState = FcrAnnotationState.END;
155
+ }
156
+ }
157
+ });
158
+ this._dialogProvider = _dialogProvider;
159
+ this._sharingProvider = _sharingProvider;
160
+ this._memberDataSource = _memberDataSource;
161
+ this._videoWindowDataSource = _videoWindowDataSource;
162
+ this._screenShareProvider = _screenShareProvider;
163
+ this._deviceProvider = _deviceProvider;
164
+ this._sharingProvider.getSharingControl().addObserver(this._observer);
165
+ setTimeout(function () {
166
+ return _this.openAnnotationWindow();
167
+ });
168
+ var exitScreenShareOwner = this._screenShareProvider.getCurrentScreenSharingOwner();
169
+ if (this._currentScreenShareOwnerCanStartAnnotation() && exitScreenShareOwner) {
170
+ this._initAnnotationTransaction(exitScreenShareOwner.userId);
171
+ }
172
+ }
173
+ return (0, _createClass2["default"])(FcrUIAnnotationProviderImpl, [{
174
+ key: "scalcValue",
175
+ get: function get() {
176
+ return _classPrivateFieldGet(_A, this);
177
+ },
178
+ set: function set(v) {
179
+ _classPrivateFieldSet(_A, this, v);
180
+ }
181
+ }, {
182
+ key: "annotationState",
183
+ get: function get() {
184
+ return _classPrivateFieldGet(_B, this);
185
+ },
186
+ set: function set(v) {
187
+ _classPrivateFieldSet(_B, this, v);
188
+ }
189
+ }, {
190
+ key: "annotating",
191
+ get: function get() {
192
+ return _classPrivateFieldGet(_C, this);
193
+ },
194
+ set: function set(v) {
195
+ _classPrivateFieldSet(_C, this, v);
196
+ }
197
+ }, {
198
+ key: "currentShareInfo",
199
+ get: function get() {
200
+ return _classPrivateFieldGet(_D, this);
201
+ },
202
+ set: function set(v) {
203
+ _classPrivateFieldSet(_D, this, v);
204
+ }
205
+ }, {
206
+ key: "_currentScreenShareOwnerCanStartAnnotation",
207
+ value: function _currentScreenShareOwnerCanStartAnnotation() {
208
+ var owner = this._screenShareProvider.getCurrentScreenSharingOwner();
209
+ return owner && owner.platform !== _type4.FcrPlatform.IOS;
210
+ }
211
+ }, {
212
+ key: "_initAnnotationTransaction",
213
+ value: function _initAnnotationTransaction(screenShareOwnerId) {
214
+ this._annotationControl = this.getAnnotationControl();
215
+ if (this._localUser.userId !== screenShareOwnerId) {
216
+ if (this._annotationControl) {
217
+ this._annotationControl.addObserver(this._annotationObserver);
218
+ this._annotationControl.open();
219
+ }
220
+ }
221
+ }
222
+ }, {
223
+ key: "screenShareWindowData",
224
+ get: function get() {
225
+ return this._videoWindowDataSource.mainList.find(function (item) {
226
+ return item.hasScreenSharing;
227
+ });
228
+ }
229
+ }, {
230
+ key: "boardMainWindow",
231
+ get: function get() {
232
+ return this._boardMainWindow;
233
+ }
234
+ }, {
235
+ key: "annotationControl",
236
+ get: function get() {
237
+ return this._annotationControl;
238
+ }
239
+ }, {
240
+ key: "annotationHasStart",
241
+ get: function get() {
242
+ //return this.annotationState === FcrAnnotationState.START;
243
+ return false;
244
+ }
245
+ }, {
246
+ key: "_localUser",
247
+ get: function get() {
248
+ return this._memberDataSource.localUser;
249
+ }
250
+ }, {
251
+ key: "zoomIn",
252
+ value: function zoomIn() {
253
+ if (this.scalcValue < this._maxScalcValue) {
254
+ this.scalcValue = this.scalcValue + 0.5;
255
+ }
256
+ }
257
+ }, {
258
+ key: "zoomOut",
259
+ value: function zoomOut() {
260
+ if (this.scalcValue > this._minScalcValue) {
261
+ this.scalcValue = this.scalcValue - 0.5;
262
+ }
263
+ }
264
+ }, {
265
+ key: "fullContainer",
266
+ value: function fullContainer(scalc) {
267
+ this.scalcValue = scalc;
268
+ }
269
+ }, {
270
+ key: "setOriginScalc",
271
+ value: function setOriginScalc() {
272
+ this.scalcValue = this._minScalcValue;
273
+ }
274
+ }, {
275
+ key: "toggleAnnotation",
276
+ value: function () {
277
+ var _toggleAnnotation = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
278
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
279
+ while (1) switch (_context2.prev = _context2.next) {
280
+ case 0:
281
+ if (this.annotating) {
282
+ this.annotating = false;
283
+ (0, _rendererEvent.sendEvent)({
284
+ action: _constant.FcrUIRendererEventAction.SET_ANNOTATION_IGNORE,
285
+ payload: true
286
+ });
287
+ this._closeToolbar();
288
+ } else {
289
+ this.annotating = true;
290
+ (0, _rendererEvent.sendEvent)({
291
+ action: _constant.FcrUIRendererEventAction.SET_ANNOTATION_IGNORE,
292
+ payload: false
293
+ });
294
+ this._openToolbar();
295
+ }
296
+ case 1:
297
+ case "end":
298
+ return _context2.stop();
299
+ }
300
+ }, _callee2, this);
301
+ }));
302
+ function toggleAnnotation() {
303
+ return _toggleAnnotation.apply(this, arguments);
304
+ }
305
+ return toggleAnnotation;
306
+ }()
307
+ }, {
308
+ key: "getAnnotationControl",
309
+ value: function getAnnotationControl() {
310
+ return this._sharingProvider.getSharingControl().getAnnotationControl();
311
+ }
312
+ }, {
313
+ key: "openAnnotationWindow",
314
+ value: function openAnnotationWindow() {
315
+ this._annotationDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.ANNOTATION);
316
+ this.logger.info('openedAnnotationWindow');
317
+ }
318
+ }, {
319
+ key: "hideAnnotationWindow",
320
+ value: function hideAnnotationWindow() {
321
+ this.logger.info('hideAnnotationWindow');
322
+ this.annotating = false;
323
+ (0, _rendererEvent.sendEvent)({
324
+ action: _type3.ToolbarEvents.CLEAN,
325
+ payload: true
326
+ });
327
+ (0, _rendererEvent.sendEvent)({
328
+ action: _constant.FcrUIRendererEventAction.SET_ANNOTATION_TO_SHOW,
329
+ payload: false
330
+ });
331
+ this._closeToolbar();
332
+ }
333
+ }, {
334
+ key: "setCurrentShareInfo",
335
+ value: function setCurrentShareInfo(info) {
336
+ this.currentShareInfo = info;
337
+ }
338
+ }, {
339
+ key: "setBoundsToAnnotationWindow",
340
+ value: function () {
341
+ var _setBoundsToAnnotationWindow = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(info) {
342
+ var _this2 = this;
343
+ var targetBounds, _ref2, bounds, _getCurrentSharingWor, width, height, x, y, windows, win;
344
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
345
+ while (1) switch (_context3.prev = _context3.next) {
346
+ case 0:
347
+ targetBounds = null;
348
+ if (this.currentShareInfo.type === _type.AgoraRtcScreenCaptureType.SCREEN) {
349
+ _ref2 = info || this.currentShareInfo, bounds = _ref2.bounds;
350
+ _getCurrentSharingWor = (0, _tools.getCurrentSharingWorkArea)({
351
+ currentShareBounds: bounds
352
+ }), width = _getCurrentSharingWor.width, height = _getCurrentSharingWor.height, x = _getCurrentSharingWor.x, y = _getCurrentSharingWor.y;
353
+ targetBounds = {
354
+ width: width,
355
+ height: height,
356
+ x: x,
357
+ y: y
358
+ };
359
+ } else {
360
+ windows = window.runtime.getWindows();
361
+ win = windows.find(function (win) {
362
+ return win.id === +_this2.currentShareInfo.id;
363
+ });
364
+ if (win) {
365
+ targetBounds = win.getBounds();
366
+ }
367
+ }
368
+ (0, _rendererEvent.sendEvent)({
369
+ action: _constant.FcrUIRendererEventAction.SET_CURRENT_SHARE_SCREEN_BOUNDS,
370
+ payload: targetBounds
371
+ });
372
+ case 3:
373
+ case "end":
374
+ return _context3.stop();
375
+ }
376
+ }, _callee3, this);
377
+ }));
378
+ function setBoundsToAnnotationWindow(_x2) {
379
+ return _setBoundsToAnnotationWindow.apply(this, arguments);
380
+ }
381
+ return setBoundsToAnnotationWindow;
382
+ }()
383
+ }, {
384
+ key: "release",
385
+ value: function release() {
386
+ this._disposers.forEach(function (disposer) {
387
+ return disposer();
388
+ });
389
+ this._dialogProvider.closeDialog(this._annotationDialogId);
390
+ }
391
+ }, {
392
+ key: "_openToolbar",
393
+ value: function _openToolbar() {
394
+ this._annotationToolDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.ANNOTATION_TOOL);
395
+ }
396
+ }, {
397
+ key: "_closeToolbar",
398
+ value: function _closeToolbar() {
399
+ this._dialogProvider.closeDialog(this._annotationToolDialogId);
400
+ this._annotationToolDialogId = '';
401
+ }
402
+ }]);
403
+ }();
404
+ _FcrUIAnnotationProviderImpl = FcrUIAnnotationProviderImpl;
405
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIAnnotationProviderImpl, [[_mobx.observable, 1, "scalcValue"], [_mobx.observable, 1, "annotationState"], [_mobx.observable, 1, "annotating"], [_mobx.observable, 1, "currentShareInfo"], [_mobx.computed, 3, "screenShareWindowData"], [_zoomInDecs, 18, "zoomIn"], [_zoomOutDecs, 18, "zoomOut"], [_fullContainerDecs, 18, "fullContainer"], [_setOriginScalcDecs, 18, "setOriginScalc"], [_toggleAnnotationDecs, 18, "toggleAnnotation"], [_imports.bound, 2, "getAnnotationControl"], [_openAnnotationWindowDecs, 18, "openAnnotationWindow"], [_hideAnnotationWindowDecs, 18, "hideAnnotationWindow"], [_setCurrentShareInfoDecs, 18, "setCurrentShareInfo"], [_imports.bound, 2, "setBoundsToAnnotationWindow"], [_imports.bound, 2, "release"], [_openToolbarDecs, 18, "_openToolbar"], [_closeToolbarDecs, 18, "_closeToolbar"]], []).e, 5);
406
+ _init_scalcValue = _applyDecs$e[0];
407
+ _init_annotationState = _applyDecs$e[1];
408
+ _init_annotating = _applyDecs$e[2];
409
+ _init_currentShareInfo = _applyDecs$e[3];
410
+ _initProto = _applyDecs$e[4];
411
+ (0, _base.registerDependency)('annotationProvider');
@@ -193,6 +193,7 @@ export declare class FcrUIInterpreterProviderImpl implements FcrUIInterpreterPro
193
193
  private _publishEvent;
194
194
  private _observerInterpreter;
195
195
  private _retryTask;
196
+ private _closeOutputLanguageRoom;
196
197
  private _roomProviderObserver;
197
198
  constructor(params: FcrUIInterpreterProviderImplParams);
198
199
  private _clearRetryTaskTimer;