@memberjunction/ng-conversations 6.2.0-edge.3 → 6.2.0-edge.5

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 (318) hide show
  1. package/README.md +33 -7
  2. package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
  3. package/dist/lib/components/collection/collection-view.component.js +1 -0
  4. package/dist/lib/components/collection/collection-view.component.js.map +1 -1
  5. package/dist/lib/components/composer/ai-composer.component.d.ts +14 -2
  6. package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
  7. package/dist/lib/components/composer/ai-composer.component.js +35 -4
  8. package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
  9. package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +1 -1
  10. package/dist/lib/components/conversation/conversation-agent-picker.component.js +3 -3
  11. package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
  12. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +651 -53
  13. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  14. package/dist/lib/components/conversation/conversation-chat-area.component.js +3002 -661
  15. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  16. package/dist/lib/components/conversation/forks-popover.component.d.ts +37 -0
  17. package/dist/lib/components/conversation/forks-popover.component.d.ts.map +1 -0
  18. package/dist/lib/components/conversation/forks-popover.component.js +164 -0
  19. package/dist/lib/components/conversation/forks-popover.component.js.map +1 -0
  20. package/dist/lib/components/export/export-modal.component.d.ts +7 -2
  21. package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
  22. package/dist/lib/components/export/export-modal.component.js +16 -3
  23. package/dist/lib/components/export/export-modal.component.js.map +1 -1
  24. package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
  25. package/dist/lib/components/message/conversation-message-rating.component.js +11 -9
  26. package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
  27. package/dist/lib/components/message/message-input.component.d.ts +96 -11
  28. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  29. package/dist/lib/components/message/message-input.component.js +253 -112
  30. package/dist/lib/components/message/message-input.component.js.map +1 -1
  31. package/dist/lib/components/message/message-item.component.d.ts +304 -16
  32. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  33. package/dist/lib/components/message/message-item.component.js +2029 -363
  34. package/dist/lib/components/message/message-item.component.js.map +1 -1
  35. package/dist/lib/components/message/message-list.component.d.ts +101 -22
  36. package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
  37. package/dist/lib/components/message/message-list.component.js +326 -55
  38. package/dist/lib/components/message/message-list.component.js.map +1 -1
  39. package/dist/lib/components/realtime/avatar/realtime-avatar-channel.d.ts +34 -0
  40. package/dist/lib/components/realtime/avatar/realtime-avatar-channel.d.ts.map +1 -0
  41. package/dist/lib/components/realtime/avatar/realtime-avatar-channel.js +75 -0
  42. package/dist/lib/components/realtime/avatar/realtime-avatar-channel.js.map +1 -0
  43. package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.d.ts +80 -0
  44. package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.d.ts.map +1 -0
  45. package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.js +202 -0
  46. package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.js.map +1 -0
  47. package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.d.ts +45 -0
  48. package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.d.ts.map +1 -0
  49. package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.js +123 -0
  50. package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.js.map +1 -0
  51. package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts +90 -0
  52. package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts.map +1 -0
  53. package/dist/lib/components/realtime/capture/realtime-capture-channel.js +223 -0
  54. package/dist/lib/components/realtime/capture/realtime-capture-channel.js.map +1 -0
  55. package/dist/lib/components/realtime/capture/realtime-capture-model.d.ts +98 -0
  56. package/dist/lib/components/realtime/capture/realtime-capture-model.d.ts.map +1 -0
  57. package/dist/lib/components/realtime/capture/realtime-capture-model.js +161 -0
  58. package/dist/lib/components/realtime/capture/realtime-capture-model.js.map +1 -0
  59. package/dist/lib/components/realtime/capture/realtime-capture-surface.component.d.ts +48 -0
  60. package/dist/lib/components/realtime/capture/realtime-capture-surface.component.d.ts.map +1 -0
  61. package/dist/lib/components/realtime/capture/realtime-capture-surface.component.js +205 -0
  62. package/dist/lib/components/realtime/capture/realtime-capture-surface.component.js.map +1 -0
  63. package/dist/lib/components/realtime/channels/client-context-channel.d.ts +19 -2
  64. package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
  65. package/dist/lib/components/realtime/channels/client-context-channel.js +83 -9
  66. package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
  67. package/dist/lib/components/realtime/channels/realtime-channel-pane.component.d.ts +30 -9
  68. package/dist/lib/components/realtime/channels/realtime-channel-pane.component.d.ts.map +1 -1
  69. package/dist/lib/components/realtime/channels/realtime-channel-pane.component.js +78 -14
  70. package/dist/lib/components/realtime/channels/realtime-channel-pane.component.js.map +1 -1
  71. package/dist/lib/components/realtime/identity-verification/identity-verification-channel.d.ts +71 -0
  72. package/dist/lib/components/realtime/identity-verification/identity-verification-channel.d.ts.map +1 -0
  73. package/dist/lib/components/realtime/identity-verification/identity-verification-channel.js +259 -0
  74. package/dist/lib/components/realtime/identity-verification/identity-verification-channel.js.map +1 -0
  75. package/dist/lib/components/realtime/identity-verification/identity-verification-model.d.ts +129 -0
  76. package/dist/lib/components/realtime/identity-verification/identity-verification-model.d.ts.map +1 -0
  77. package/dist/lib/components/realtime/identity-verification/identity-verification-model.js +373 -0
  78. package/dist/lib/components/realtime/identity-verification/identity-verification-model.js.map +1 -0
  79. package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.d.ts +77 -0
  80. package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.d.ts.map +1 -0
  81. package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.js +420 -0
  82. package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.js.map +1 -0
  83. package/dist/lib/components/realtime/interactive-component/component-contract.d.ts +83 -0
  84. package/dist/lib/components/realtime/interactive-component/component-contract.d.ts.map +1 -0
  85. package/dist/lib/components/realtime/interactive-component/component-contract.js +292 -0
  86. package/dist/lib/components/realtime/interactive-component/component-contract.js.map +1 -0
  87. package/dist/lib/components/realtime/interactive-component/component-data-state.d.ts +39 -0
  88. package/dist/lib/components/realtime/interactive-component/component-data-state.d.ts.map +1 -0
  89. package/dist/lib/components/realtime/interactive-component/component-data-state.js +152 -0
  90. package/dist/lib/components/realtime/interactive-component/component-data-state.js.map +1 -0
  91. package/dist/lib/components/realtime/interactive-component/component-instance-engine.d.ts +109 -0
  92. package/dist/lib/components/realtime/interactive-component/component-instance-engine.d.ts.map +1 -0
  93. package/dist/lib/components/realtime/interactive-component/component-instance-engine.js +146 -0
  94. package/dist/lib/components/realtime/interactive-component/component-instance-engine.js.map +1 -0
  95. package/dist/lib/components/realtime/interactive-component/component-spec-content.d.ts +19 -0
  96. package/dist/lib/components/realtime/interactive-component/component-spec-content.d.ts.map +1 -0
  97. package/dist/lib/components/realtime/interactive-component/component-spec-content.js +39 -0
  98. package/dist/lib/components/realtime/interactive-component/component-spec-content.js.map +1 -0
  99. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts +183 -0
  100. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts.map +1 -0
  101. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js +761 -0
  102. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js.map +1 -0
  103. package/dist/lib/components/realtime/interactive-component/interactive-component-config.d.ts +25 -0
  104. package/dist/lib/components/realtime/interactive-component/interactive-component-config.d.ts.map +1 -0
  105. package/dist/lib/components/realtime/interactive-component/interactive-component-config.js +57 -0
  106. package/dist/lib/components/realtime/interactive-component/interactive-component-config.js.map +1 -0
  107. package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.d.ts +40 -0
  108. package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.d.ts.map +1 -0
  109. package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.js +97 -0
  110. package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.js.map +1 -0
  111. package/dist/lib/components/realtime/interactive-component/interactive-component-types.d.ts +144 -0
  112. package/dist/lib/components/realtime/interactive-component/interactive-component-types.d.ts.map +1 -0
  113. package/dist/lib/components/realtime/interactive-component/interactive-component-types.js +57 -0
  114. package/dist/lib/components/realtime/interactive-component/interactive-component-types.js.map +1 -0
  115. package/dist/lib/components/realtime/interactive-component/react-component-handle.d.ts +36 -0
  116. package/dist/lib/components/realtime/interactive-component/react-component-handle.d.ts.map +1 -0
  117. package/dist/lib/components/realtime/interactive-component/react-component-handle.js +55 -0
  118. package/dist/lib/components/realtime/interactive-component/react-component-handle.js.map +1 -0
  119. package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.d.ts +55 -0
  120. package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.d.ts.map +1 -0
  121. package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.js +210 -0
  122. package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.js.map +1 -0
  123. package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.d.ts +32 -0
  124. package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.d.ts.map +1 -0
  125. package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js +90 -0
  126. package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js.map +1 -0
  127. package/dist/lib/components/realtime/media/media-channel.d.ts +7 -0
  128. package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
  129. package/dist/lib/components/realtime/media/media-channel.js +28 -1
  130. package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
  131. package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts +8 -1
  132. package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts.map +1 -1
  133. package/dist/lib/components/realtime/realtime-agent-banner.component.js +89 -71
  134. package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
  135. package/dist/lib/components/realtime/realtime-agent-orb.component.d.ts +21 -0
  136. package/dist/lib/components/realtime/realtime-agent-orb.component.d.ts.map +1 -0
  137. package/dist/lib/components/realtime/realtime-agent-orb.component.js +49 -0
  138. package/dist/lib/components/realtime/realtime-agent-orb.component.js.map +1 -0
  139. package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts +44 -11
  140. package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
  141. package/dist/lib/components/realtime/realtime-agent-picker.component.js +162 -50
  142. package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
  143. package/dist/lib/components/realtime/realtime-audio-visuals.d.ts +8 -2
  144. package/dist/lib/components/realtime/realtime-audio-visuals.d.ts.map +1 -1
  145. package/dist/lib/components/realtime/realtime-audio-visuals.js +14 -18
  146. package/dist/lib/components/realtime/realtime-audio-visuals.js.map +1 -1
  147. package/dist/lib/components/realtime/realtime-composer.component.d.ts +42 -2
  148. package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
  149. package/dist/lib/components/realtime/realtime-composer.component.js +137 -102
  150. package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
  151. package/dist/lib/components/realtime/realtime-perception-chip.component.d.ts +71 -0
  152. package/dist/lib/components/realtime/realtime-perception-chip.component.d.ts.map +1 -0
  153. package/dist/lib/components/realtime/realtime-perception-chip.component.js +221 -0
  154. package/dist/lib/components/realtime/realtime-perception-chip.component.js.map +1 -0
  155. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +264 -22
  156. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
  157. package/dist/lib/components/realtime/realtime-session-overlay.component.js +851 -135
  158. package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
  159. package/dist/lib/components/realtime/realtime-surface-placement-prefs.d.ts +14 -0
  160. package/dist/lib/components/realtime/realtime-surface-placement-prefs.d.ts.map +1 -0
  161. package/dist/lib/components/realtime/realtime-surface-placement-prefs.js +14 -0
  162. package/dist/lib/components/realtime/realtime-surface-placement-prefs.js.map +1 -0
  163. package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts +74 -0
  164. package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts.map +1 -0
  165. package/dist/lib/components/realtime/realtime-surface-stage.model.js +171 -0
  166. package/dist/lib/components/realtime/realtime-surface-stage.model.js.map +1 -0
  167. package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts +71 -13
  168. package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts.map +1 -1
  169. package/dist/lib/components/realtime/realtime-surface-tabs.component.js +232 -73
  170. package/dist/lib/components/realtime/realtime-surface-tabs.component.js.map +1 -1
  171. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +5 -0
  172. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
  173. package/dist/lib/components/realtime/realtime-surface-tabs.model.js +8 -0
  174. package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
  175. package/dist/lib/components/realtime/realtime-ui-config.d.ts +12 -2
  176. package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
  177. package/dist/lib/components/realtime/realtime-ui-config.js +5 -1
  178. package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
  179. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +10 -1
  180. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
  181. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +42 -2
  182. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
  183. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts +20 -3
  184. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts.map +1 -1
  185. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js +44 -10
  186. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js.map +1 -1
  187. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +28 -44
  188. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
  189. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +76 -162
  190. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
  191. package/dist/lib/components/search/search-panel.component.d.ts +2 -0
  192. package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
  193. package/dist/lib/components/search/search-panel.component.js +25 -12
  194. package/dist/lib/components/search/search-panel.component.js.map +1 -1
  195. package/dist/lib/components/sidebar/routines-section.component.js +1 -1
  196. package/dist/lib/components/sidebar/routines-section.component.js.map +1 -1
  197. package/dist/lib/components/task/tasks-full-view.component.d.ts +152 -31
  198. package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
  199. package/dist/lib/components/task/tasks-full-view.component.js +2227 -214
  200. package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
  201. package/dist/lib/components/tasks/tasks-dropdown.component.js +4 -4
  202. package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
  203. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +33 -32
  204. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  205. package/dist/lib/components/workspace/conversation-workspace.component.js +72 -88
  206. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  207. package/dist/lib/conversations.module.d.ts +30 -29
  208. package/dist/lib/conversations.module.d.ts.map +1 -1
  209. package/dist/lib/conversations.module.js +27 -5
  210. package/dist/lib/conversations.module.js.map +1 -1
  211. package/dist/lib/events/chat-events.d.ts +25 -0
  212. package/dist/lib/events/chat-events.d.ts.map +1 -1
  213. package/dist/lib/events/chat-events.js +36 -0
  214. package/dist/lib/events/chat-events.js.map +1 -1
  215. package/dist/lib/models/agent-turn.model.d.ts +5 -0
  216. package/dist/lib/models/agent-turn.model.d.ts.map +1 -1
  217. package/dist/lib/models/agent-turn.model.js.map +1 -1
  218. package/dist/lib/services/agent-state.service.d.ts +34 -8
  219. package/dist/lib/services/agent-state.service.d.ts.map +1 -1
  220. package/dist/lib/services/agent-state.service.js +90 -37
  221. package/dist/lib/services/agent-state.service.js.map +1 -1
  222. package/dist/lib/services/artifact-state.service.d.ts +0 -9
  223. package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
  224. package/dist/lib/services/artifact-state.service.js +1 -32
  225. package/dist/lib/services/artifact-state.service.js.map +1 -1
  226. package/dist/lib/services/browser-realtime-media-host.d.ts +19 -7
  227. package/dist/lib/services/browser-realtime-media-host.d.ts.map +1 -1
  228. package/dist/lib/services/browser-realtime-media-host.js +21 -72
  229. package/dist/lib/services/browser-realtime-media-host.js.map +1 -1
  230. package/dist/lib/services/conversation-agent.service.d.ts +48 -16
  231. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  232. package/dist/lib/services/conversation-agent.service.js +110 -35
  233. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  234. package/dist/lib/services/conversation-detail-window.store.d.ts +22 -4
  235. package/dist/lib/services/conversation-detail-window.store.d.ts.map +1 -1
  236. package/dist/lib/services/conversation-detail-window.store.js +50 -9
  237. package/dist/lib/services/conversation-detail-window.store.js.map +1 -1
  238. package/dist/lib/services/conversation-naming.d.ts +72 -22
  239. package/dist/lib/services/conversation-naming.d.ts.map +1 -1
  240. package/dist/lib/services/conversation-naming.js +93 -12
  241. package/dist/lib/services/conversation-naming.js.map +1 -1
  242. package/dist/lib/services/conversation-tasks-filter.d.ts +15 -0
  243. package/dist/lib/services/conversation-tasks-filter.d.ts.map +1 -0
  244. package/dist/lib/services/conversation-tasks-filter.js +69 -0
  245. package/dist/lib/services/conversation-tasks-filter.js.map +1 -0
  246. package/dist/lib/services/data-cache.service.d.ts +13 -5
  247. package/dist/lib/services/data-cache.service.d.ts.map +1 -1
  248. package/dist/lib/services/data-cache.service.js +39 -19
  249. package/dist/lib/services/data-cache.service.js.map +1 -1
  250. package/dist/lib/services/export.service.d.ts +26 -9
  251. package/dist/lib/services/export.service.d.ts.map +1 -1
  252. package/dist/lib/services/export.service.js +61 -18
  253. package/dist/lib/services/export.service.js.map +1 -1
  254. package/dist/lib/services/realtime-audio-recorder.d.ts +115 -79
  255. package/dist/lib/services/realtime-audio-recorder.d.ts.map +1 -1
  256. package/dist/lib/services/realtime-audio-recorder.js +273 -186
  257. package/dist/lib/services/realtime-audio-recorder.js.map +1 -1
  258. package/dist/lib/services/realtime-pairing.d.ts +10 -5
  259. package/dist/lib/services/realtime-pairing.d.ts.map +1 -1
  260. package/dist/lib/services/realtime-pairing.js +15 -6
  261. package/dist/lib/services/realtime-pairing.js.map +1 -1
  262. package/dist/lib/services/realtime-session.service.d.ts +31 -2
  263. package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
  264. package/dist/lib/services/realtime-session.service.js +34 -2
  265. package/dist/lib/services/realtime-session.service.js.map +1 -1
  266. package/dist/lib/services/recording/libopus-wasm-binary.d.ts +3 -0
  267. package/dist/lib/services/recording/libopus-wasm-binary.d.ts.map +1 -0
  268. package/dist/lib/services/recording/libopus-wasm-binary.js +489 -0
  269. package/dist/lib/services/recording/libopus-wasm-binary.js.map +1 -0
  270. package/dist/lib/services/recording/libopus-worker-source.d.ts +48 -0
  271. package/dist/lib/services/recording/libopus-worker-source.d.ts.map +1 -0
  272. package/dist/lib/services/recording/libopus-worker-source.js +170 -0
  273. package/dist/lib/services/recording/libopus-worker-source.js.map +1 -0
  274. package/dist/lib/services/recording/linear-resampler.d.ts +45 -0
  275. package/dist/lib/services/recording/linear-resampler.d.ts.map +1 -0
  276. package/dist/lib/services/recording/linear-resampler.js +85 -0
  277. package/dist/lib/services/recording/linear-resampler.js.map +1 -0
  278. package/dist/lib/services/recording/opus-packet-encoder.d.ts +50 -0
  279. package/dist/lib/services/recording/opus-packet-encoder.d.ts.map +1 -0
  280. package/dist/lib/services/recording/opus-packet-encoder.js +41 -0
  281. package/dist/lib/services/recording/opus-packet-encoder.js.map +1 -0
  282. package/dist/lib/services/recording/wasm-opus-encoder.d.ts +86 -0
  283. package/dist/lib/services/recording/wasm-opus-encoder.d.ts.map +1 -0
  284. package/dist/lib/services/recording/wasm-opus-encoder.js +232 -0
  285. package/dist/lib/services/recording/wasm-opus-encoder.js.map +1 -0
  286. package/dist/lib/services/recording/webcodecs-opus-encoder.d.ts +39 -0
  287. package/dist/lib/services/recording/webcodecs-opus-encoder.d.ts.map +1 -0
  288. package/dist/lib/services/recording/webcodecs-opus-encoder.js +101 -0
  289. package/dist/lib/services/recording/webcodecs-opus-encoder.js.map +1 -0
  290. package/dist/lib/services/search.service.d.ts +7 -2
  291. package/dist/lib/services/search.service.d.ts.map +1 -1
  292. package/dist/lib/services/search.service.js +16 -20
  293. package/dist/lib/services/search.service.js.map +1 -1
  294. package/dist/lib/utils/conversation-branching.d.ts +4 -0
  295. package/dist/lib/utils/conversation-branching.d.ts.map +1 -0
  296. package/dist/lib/utils/conversation-branching.js +5 -0
  297. package/dist/lib/utils/conversation-branching.js.map +1 -0
  298. package/dist/lib/utils/conversation-forks.d.ts +315 -0
  299. package/dist/lib/utils/conversation-forks.d.ts.map +1 -0
  300. package/dist/lib/utils/conversation-forks.js +456 -0
  301. package/dist/lib/utils/conversation-forks.js.map +1 -0
  302. package/dist/lib/utils/distinct-artifacts.d.ts +9 -3
  303. package/dist/lib/utils/distinct-artifacts.d.ts.map +1 -1
  304. package/dist/lib/utils/distinct-artifacts.js +24 -5
  305. package/dist/lib/utils/distinct-artifacts.js.map +1 -1
  306. package/dist/public-api.d.ts +23 -1
  307. package/dist/public-api.d.ts.map +1 -1
  308. package/dist/public-api.js +30 -1
  309. package/dist/public-api.js.map +1 -1
  310. package/package.json +37 -33
  311. package/dist/lib/components/thread/thread-panel.component.d.ts +0 -126
  312. package/dist/lib/components/thread/thread-panel.component.d.ts.map +0 -1
  313. package/dist/lib/components/thread/thread-panel.component.js +0 -440
  314. package/dist/lib/components/thread/thread-panel.component.js.map +0 -1
  315. package/dist/lib/services/realtime-pcm-wav.d.ts +0 -79
  316. package/dist/lib/services/realtime-pcm-wav.d.ts.map +0 -1
  317. package/dist/lib/services/realtime-pcm-wav.js +0 -213
  318. package/dist/lib/services/realtime-pcm-wav.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The `MJ: User Settings` keys under which the call overlay saves the user's layout of its channel surfaces, per user via
3
+ * `UserInfoEngine`. The saved forms, and how they are read back, are the shared ones in
4
+ * `@memberjunction/ai-realtime-client/media`, which the meeting room uses too:
5
+ * - {@link SURFACE_PLACEMENT_PREF_KEY}: where the user moved each channel's surface (the stage, a picture-in-picture
6
+ * box, its tab, hidden), as `SerializePlacementMoves` writes the moves: oldest first, one per surface, so the most
7
+ * recent move to the stage wins it in every later session too.
8
+ * - {@link SURFACE_PIP_PREF_KEY}: where the user put each picture-in-picture box, as `SerializePipRects` writes them.
9
+ */
10
+ /** `MJ: User Settings` key for the surface placement preference (versioned shape). */
11
+ export declare const SURFACE_PLACEMENT_PREF_KEY = "mj.realtime.placement.v1";
12
+ /** `MJ: User Settings` key for picture-in-picture boxes: `{ [channelKey]: { X, Y, W, H } }`, fractions of the stage. */
13
+ export declare const SURFACE_PIP_PREF_KEY = "mj.realtime.pip.v1";
14
+ //# sourceMappingURL=realtime-surface-placement-prefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-surface-placement-prefs.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-surface-placement-prefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,sFAAsF;AACtF,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAErE,wHAAwH;AACxH,eAAO,MAAM,oBAAoB,uBAAuB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The `MJ: User Settings` keys under which the call overlay saves the user's layout of its channel surfaces, per user via
3
+ * `UserInfoEngine`. The saved forms, and how they are read back, are the shared ones in
4
+ * `@memberjunction/ai-realtime-client/media`, which the meeting room uses too:
5
+ * - {@link SURFACE_PLACEMENT_PREF_KEY}: where the user moved each channel's surface (the stage, a picture-in-picture
6
+ * box, its tab, hidden), as `SerializePlacementMoves` writes the moves: oldest first, one per surface, so the most
7
+ * recent move to the stage wins it in every later session too.
8
+ * - {@link SURFACE_PIP_PREF_KEY}: where the user put each picture-in-picture box, as `SerializePipRects` writes them.
9
+ */
10
+ /** `MJ: User Settings` key for the surface placement preference (versioned shape). */
11
+ export const SURFACE_PLACEMENT_PREF_KEY = 'mj.realtime.placement.v1';
12
+ /** `MJ: User Settings` key for picture-in-picture boxes: `{ [channelKey]: { X, Y, W, H } }`, fractions of the stage. */
13
+ export const SURFACE_PIP_PREF_KEY = 'mj.realtime.pip.v1';
14
+ //# sourceMappingURL=realtime-surface-placement-prefs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-surface-placement-prefs.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-surface-placement-prefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,sFAAsF;AACtF,MAAM,CAAC,MAAM,0BAA0B,GAAG,0BAA0B,CAAC;AAErE,wHAAwH;AACxH,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC","sourcesContent":["/**\n * The `MJ: User Settings` keys under which the call overlay saves the user's layout of its channel surfaces, per user via\n * `UserInfoEngine`. The saved forms, and how they are read back, are the shared ones in\n * `@memberjunction/ai-realtime-client/media`, which the meeting room uses too:\n * - {@link SURFACE_PLACEMENT_PREF_KEY}: where the user moved each channel's surface (the stage, a picture-in-picture\n * box, its tab, hidden), as `SerializePlacementMoves` writes the moves: oldest first, one per surface, so the most\n * recent move to the stage wins it in every later session too.\n * - {@link SURFACE_PIP_PREF_KEY}: where the user put each picture-in-picture box, as `SerializePipRects` writes them.\n */\n\n/** `MJ: User Settings` key for the surface placement preference (versioned shape). */\nexport const SURFACE_PLACEMENT_PREF_KEY = 'mj.realtime.placement.v1';\n\n/** `MJ: User Settings` key for picture-in-picture boxes: `{ [channelKey]: { X, Y, W, H } }`, fractions of the stage. */\nexport const SURFACE_PIP_PREF_KEY = 'mj.realtime.pip.v1';\n"]}
@@ -0,0 +1,74 @@
1
+ import { type MediaPlacementMove } from '@memberjunction/ai-realtime-client/media';
2
+ import type { MediaStagePlacement, MediaStageSurface } from '@memberjunction/ng-realtime-media';
3
+ import type { BaseRealtimeChannelClient } from '@memberjunction/realtime-runtime';
4
+ /**
5
+ * Which channel surfaces the call overlay's stage (`mj-media-stage`) holds, and where each one shows.
6
+ *
7
+ * **Placement.** Every surface starts where its channel's registry row places it (`SurfacePlacement`: its tab, unless the
8
+ * row says otherwise). The user moves it to the stage (it fills the call), into a picture-in-picture box, to its tab, or
9
+ * out of sight, within the placements the row allows; the moves are kept in order, one per surface, and resolved by
10
+ * `ResolveSurfacePlacements`, so the most recent move to the stage wins it, the surface it displaces returns to where its
11
+ * channel places it, and picture-in-picture boxes stack newest first. The host saves {@link Moves} and loads them back
12
+ * ({@link LoadMoves}), so a layout carries over to later sessions.
13
+ *
14
+ * **Creation.** A channel's surface is created the first time it is seen (its tab shows it, or it is on the stage or
15
+ * in a picture-in-picture box) and kept until the channel leaves the session. Moving it, hiding the panel or switching tabs only changes where it
16
+ * shows, so a whiteboard keeps its view and a stream keeps playing.
17
+ *
18
+ * Pure state with no Angular: the overlay reports the session's channels, the channel tab the panel is showing and
19
+ * the user's moves, and binds {@link Surfaces} to the stage.
20
+ */
21
+ export declare class RealtimeSurfaceStageModel {
22
+ /** Channels with a surface, by key, in the order their tabs registered. */
23
+ private readonly plugins;
24
+ /** Keys whose surface has been seen, so it stays created. */
25
+ private readonly seen;
26
+ private moves;
27
+ private activeTabKey;
28
+ private placements;
29
+ /** Picture-in-picture surfaces, newest first. */
30
+ private pipOrder;
31
+ private surfaces;
32
+ private allowedPlacements;
33
+ /** The stage's surfaces. The array is replaced only when a surface or a placement changes, so it binds cheaply. */
34
+ get Surfaces(): readonly MediaStageSurface[];
35
+ /** Where each registered channel's surface is placed, by key. Replaced only when a placement changes. */
36
+ get Placements(): ReadonlyMap<string, MediaStagePlacement>;
37
+ /** Where the user may move each registered channel's surface, by key. Replaced only when the channels change. */
38
+ get AllowedPlacements(): ReadonlyMap<string, readonly MediaStagePlacement[]>;
39
+ /** The user's moves, oldest first, one per surface: what the host saves. */
40
+ get Moves(): readonly MediaPlacementMove[];
41
+ /** The channel whose surface is on the stage, or `null`. */
42
+ get StageKey(): string | null;
43
+ /** The plugin behind a surface, or `null` once its channel has left. */
44
+ PluginFor(key: string): BaseRealtimeChannelClient | null;
45
+ /** Where the user may move a channel's surface; nowhere for a channel without a surface in this session. */
46
+ AllowedFor(key: string): readonly MediaStagePlacement[];
47
+ /**
48
+ * Where a channel's surface goes when it leaves the stage (the user leaves the focus layout, or the channel lets go of
49
+ * it): where its channel places it, or the first of picture-in-picture, tab and hidden that it allows.
50
+ */
51
+ OffStagePlacement(key: string): MediaStagePlacement;
52
+ /** A channel with a surface got its tab. Registering its key again follows the channel's new plugin instance. */
53
+ Register(plugin: BaseRealtimeChannelClient): void;
54
+ /** The session's channels changed: a surface whose plugin is no longer among them is dropped. Moves are kept. */
55
+ KeepOnly(channels: readonly BaseRealtimeChannelClient[]): void;
56
+ /** The channel whose tab the panel is showing, or `null` when it shows none (another tab, collapsed, hidden). */
57
+ SetActiveTab(key: string | null): void;
58
+ /** Starts from saved moves, such as the user's last layout. */
59
+ LoadMoves(moves: readonly MediaPlacementMove[]): void;
60
+ /**
61
+ * Moves a channel's surface. Returns `false`, changing nothing, for a channel without a surface in this session, a
62
+ * placement its channel does not allow, or the placement it already has.
63
+ */
64
+ Move(key: string, placement: MediaStagePlacement): boolean;
65
+ /** Forgets every move: each surface returns to where its channel places it. */
66
+ ResetLayout(): void;
67
+ private update;
68
+ /** Rebuilds {@link AllowedPlacements} from the registered channels, keeping the map when nothing in it changed. */
69
+ private updateAllowedPlacements;
70
+ /** A stage surface for a channel: its placement, its name, and where it stacks when it is picture-in-picture. */
71
+ private surfaceFor;
72
+ private resolvePlacements;
73
+ }
74
+ //# sourceMappingURL=realtime-surface-stage.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-surface-stage.model.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-surface-stage.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoE,KAAK,kBAAkB,EAAqB,MAAM,0CAA0C,CAAC;AACxK,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAChG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAElF;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,yBAAyB;IACpC,2EAA2E;IAC3E,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgD;IACxE,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,UAAU,CAAuD;IACzE,iDAAiD;IACjD,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,iBAAiB,CAAkE;IAE3F,mHAAmH;IACnH,IAAW,QAAQ,IAAI,SAAS,iBAAiB,EAAE,CAElD;IAED,yGAAyG;IACzG,IAAW,UAAU,IAAI,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAEhE;IAED,iHAAiH;IACjH,IAAW,iBAAiB,IAAI,WAAW,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,CAAC,CAElF;IAED,4EAA4E;IAC5E,IAAW,KAAK,IAAI,SAAS,kBAAkB,EAAE,CAEhD;IAED,4DAA4D;IAC5D,IAAW,QAAQ,IAAI,MAAM,GAAG,IAAI,CAOnC;IAED,wEAAwE;IACjE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,GAAG,IAAI;IAI/D,4GAA4G;IACrG,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,mBAAmB,EAAE;IAI9D;;;OAGG;IACI,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB;IAK1D,iHAAiH;IAC1G,QAAQ,CAAC,MAAM,EAAE,yBAAyB,GAAG,IAAI;IAMxD,iHAAiH;IAC1G,QAAQ,CAAC,QAAQ,EAAE,SAAS,yBAAyB,EAAE,GAAG,IAAI;IAWrE,iHAAiH;IAC1G,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAK7C,+DAA+D;IACxD,SAAS,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,GAAG,IAAI;IAK5D;;;OAGG;IACI,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,GAAG,OAAO;IASjE,+EAA+E;IACxE,WAAW,IAAI,IAAI;IAK1B,OAAO,CAAC,MAAM;IAad,mHAAmH;IACnH,OAAO,CAAC,uBAAuB;IAO/B,iHAAiH;IACjH,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,iBAAiB;CAc1B"}
@@ -0,0 +1,171 @@
1
+ import { PlacementOffStage, RecordPlacementMove, ResolveSurfacePlacements } from '@memberjunction/ai-realtime-client/media';
2
+ /**
3
+ * Which channel surfaces the call overlay's stage (`mj-media-stage`) holds, and where each one shows.
4
+ *
5
+ * **Placement.** Every surface starts where its channel's registry row places it (`SurfacePlacement`: its tab, unless the
6
+ * row says otherwise). The user moves it to the stage (it fills the call), into a picture-in-picture box, to its tab, or
7
+ * out of sight, within the placements the row allows; the moves are kept in order, one per surface, and resolved by
8
+ * `ResolveSurfacePlacements`, so the most recent move to the stage wins it, the surface it displaces returns to where its
9
+ * channel places it, and picture-in-picture boxes stack newest first. The host saves {@link Moves} and loads them back
10
+ * ({@link LoadMoves}), so a layout carries over to later sessions.
11
+ *
12
+ * **Creation.** A channel's surface is created the first time it is seen (its tab shows it, or it is on the stage or
13
+ * in a picture-in-picture box) and kept until the channel leaves the session. Moving it, hiding the panel or switching tabs only changes where it
14
+ * shows, so a whiteboard keeps its view and a stream keeps playing.
15
+ *
16
+ * Pure state with no Angular: the overlay reports the session's channels, the channel tab the panel is showing and
17
+ * the user's moves, and binds {@link Surfaces} to the stage.
18
+ */
19
+ export class RealtimeSurfaceStageModel {
20
+ /** Channels with a surface, by key, in the order their tabs registered. */
21
+ plugins = new Map();
22
+ /** Keys whose surface has been seen, so it stays created. */
23
+ seen = new Set();
24
+ moves = [];
25
+ activeTabKey = null;
26
+ placements = new Map();
27
+ /** Picture-in-picture surfaces, newest first. */
28
+ pipOrder = [];
29
+ surfaces = [];
30
+ allowedPlacements = new Map();
31
+ /** The stage's surfaces. The array is replaced only when a surface or a placement changes, so it binds cheaply. */
32
+ get Surfaces() {
33
+ return this.surfaces;
34
+ }
35
+ /** Where each registered channel's surface is placed, by key. Replaced only when a placement changes. */
36
+ get Placements() {
37
+ return this.placements;
38
+ }
39
+ /** Where the user may move each registered channel's surface, by key. Replaced only when the channels change. */
40
+ get AllowedPlacements() {
41
+ return this.allowedPlacements;
42
+ }
43
+ /** The user's moves, oldest first, one per surface: what the host saves. */
44
+ get Moves() {
45
+ return this.moves;
46
+ }
47
+ /** The channel whose surface is on the stage, or `null`. */
48
+ get StageKey() {
49
+ for (const [key, placement] of this.placements) {
50
+ if (placement === 'stage') {
51
+ return key;
52
+ }
53
+ }
54
+ return null;
55
+ }
56
+ /** The plugin behind a surface, or `null` once its channel has left. */
57
+ PluginFor(key) {
58
+ return this.plugins.get(key) ?? null;
59
+ }
60
+ /** Where the user may move a channel's surface; nowhere for a channel without a surface in this session. */
61
+ AllowedFor(key) {
62
+ return this.allowedPlacements.get(key) ?? [];
63
+ }
64
+ /**
65
+ * Where a channel's surface goes when it leaves the stage (the user leaves the focus layout, or the channel lets go of
66
+ * it): where its channel places it, or the first of picture-in-picture, tab and hidden that it allows.
67
+ */
68
+ OffStagePlacement(key) {
69
+ const plugin = this.plugins.get(key);
70
+ return plugin ? PlacementOffStage(surfaceOf(plugin)) : 'tab';
71
+ }
72
+ /** A channel with a surface got its tab. Registering its key again follows the channel's new plugin instance. */
73
+ Register(plugin) {
74
+ this.plugins.set(plugin.ChannelName, plugin);
75
+ this.updateAllowedPlacements();
76
+ this.update();
77
+ }
78
+ /** The session's channels changed: a surface whose plugin is no longer among them is dropped. Moves are kept. */
79
+ KeepOnly(channels) {
80
+ for (const [key, plugin] of [...this.plugins]) {
81
+ if (!channels.includes(plugin)) {
82
+ this.plugins.delete(key);
83
+ this.seen.delete(key);
84
+ }
85
+ }
86
+ this.updateAllowedPlacements();
87
+ this.update();
88
+ }
89
+ /** The channel whose tab the panel is showing, or `null` when it shows none (another tab, collapsed, hidden). */
90
+ SetActiveTab(key) {
91
+ this.activeTabKey = key;
92
+ this.update();
93
+ }
94
+ /** Starts from saved moves, such as the user's last layout. */
95
+ LoadMoves(moves) {
96
+ this.moves = [...moves];
97
+ this.update();
98
+ }
99
+ /**
100
+ * Moves a channel's surface. Returns `false`, changing nothing, for a channel without a surface in this session, a
101
+ * placement its channel does not allow, or the placement it already has.
102
+ */
103
+ Move(key, placement) {
104
+ if (!this.AllowedFor(key).includes(placement) || this.placements.get(key) === placement) {
105
+ return false;
106
+ }
107
+ this.moves = RecordPlacementMove(this.moves, { SurfaceKey: key, Placement: placement });
108
+ this.update();
109
+ return true;
110
+ }
111
+ /** Forgets every move: each surface returns to where its channel places it. */
112
+ ResetLayout() {
113
+ this.moves = [];
114
+ this.update();
115
+ }
116
+ update() {
117
+ this.resolvePlacements();
118
+ for (const [key, placement] of this.placements) {
119
+ if (placement === 'stage' || placement === 'pip' || (placement === 'tab' && key === this.activeTabKey)) {
120
+ this.seen.add(key);
121
+ }
122
+ }
123
+ const surfaces = [...this.plugins.keys()].filter((key) => this.seen.has(key)).map((key) => this.surfaceFor(key));
124
+ if (!sameSurfaces(surfaces, this.surfaces)) {
125
+ this.surfaces = surfaces;
126
+ }
127
+ }
128
+ /** Rebuilds {@link AllowedPlacements} from the registered channels, keeping the map when nothing in it changed. */
129
+ updateAllowedPlacements() {
130
+ const allowed = new Map([...this.plugins].map(([key, plugin]) => [key, plugin.SurfacePlacement.Allowed]));
131
+ if (!sameAllowedPlacements(allowed, this.allowedPlacements)) {
132
+ this.allowedPlacements = allowed;
133
+ }
134
+ }
135
+ /** A stage surface for a channel: its placement, its name, and where it stacks when it is picture-in-picture. */
136
+ surfaceFor(key) {
137
+ const placement = this.placements.get(key) ?? 'tab';
138
+ const surface = { Key: key, Placement: placement, Label: this.plugins.get(key)?.TabTitle };
139
+ return placement === 'pip' ? { ...surface, PipIndex: this.pipOrder.indexOf(key) } : surface;
140
+ }
141
+ resolvePlacements() {
142
+ const resolved = ResolveSurfacePlacements([...this.plugins.values()].map(surfaceOf), this.moves);
143
+ const placements = new Map();
144
+ if (resolved.Stage) {
145
+ placements.set(resolved.Stage.Key, 'stage');
146
+ }
147
+ resolved.Pips.forEach((surface) => placements.set(surface.Key, 'pip'));
148
+ resolved.Tabs.forEach((surface) => placements.set(surface.Key, 'tab'));
149
+ resolved.Hidden.forEach((surface) => placements.set(surface.Key, 'hidden'));
150
+ if (!samePlacements(placements, this.placements)) {
151
+ this.placements = placements;
152
+ }
153
+ this.pipOrder = resolved.Pips.map((surface) => surface.Key);
154
+ }
155
+ }
156
+ /** A channel's surface as the layout model sees it: where its channel places it unless moved, and where it may go. */
157
+ function surfaceOf(plugin) {
158
+ const { Default, Allowed } = plugin.SurfacePlacement;
159
+ return { Key: plugin.ChannelName, Label: plugin.TabTitle, DefaultPlacement: Default, AllowedPlacements: Allowed };
160
+ }
161
+ function sameAllowedPlacements(a, b) {
162
+ return a.size === b.size && [...a].every(([key, allowed]) => b.get(key) === allowed);
163
+ }
164
+ function samePlacements(a, b) {
165
+ return a.size === b.size && [...a].every(([key, placement]) => b.get(key) === placement);
166
+ }
167
+ function sameSurfaces(a, b) {
168
+ return (a.length === b.length &&
169
+ a.every((surface, i) => surface.Key === b[i].Key && surface.Placement === b[i].Placement && surface.Label === b[i].Label && surface.PipIndex === b[i].PipIndex));
170
+ }
171
+ //# sourceMappingURL=realtime-surface-stage.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-surface-stage.model.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-surface-stage.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,wBAAwB,EAA8C,MAAM,0CAA0C,CAAC;AAIxK;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,yBAAyB;IACpC,2EAA2E;IAC1D,OAAO,GAAG,IAAI,GAAG,EAAqC,CAAC;IACxE,6DAA6D;IAC5C,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,KAAK,GAAyB,EAAE,CAAC;IACjC,YAAY,GAAkB,IAAI,CAAC;IACnC,UAAU,GAA6C,IAAI,GAAG,EAAE,CAAC;IACzE,iDAAiD;IACzC,QAAQ,GAAsB,EAAE,CAAC;IACjC,QAAQ,GAAiC,EAAE,CAAC;IAC5C,iBAAiB,GAAwD,IAAI,GAAG,EAAE,CAAC;IAE3F,mHAAmH;IACnH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,yGAAyG;IACzG,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,iHAAiH;IACjH,IAAW,iBAAiB;QAC1B,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED,4EAA4E;IAC5E,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,4DAA4D;IAC5D,IAAW,QAAQ;Q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AC,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CACzI,CACF,CAAC;AACJ,CAAC","sourcesContent":["import { PlacementOffStage, RecordPlacementMove, ResolveSurfacePlacements, type MediaPlacementMove, type MediaSurface } from '@memberjunction/ai-realtime-client/media';\nimport type { MediaStagePlacement, MediaStageSurface } from '@memberjunction/ng-realtime-media';\nimport type { BaseRealtimeChannelClient } from '@memberjunction/realtime-runtime';\n\n/**\n * Which channel surfaces the call overlay's stage (`mj-media-stage`) holds, and where each one shows.\n *\n * **Placement.** Every surface starts where its channel's registry row places it (`SurfacePlacement`: its tab, unless the\n * row says otherwise). The user moves it to the stage (it fills the call), into a picture-in-picture box, to its tab, or\n * out of sight, within the placements the row allows; the moves are kept in order, one per surface, and resolved by\n * `ResolveSurfacePlacements`, so the most recent move to the stage wins it, the surface it displaces returns to where its\n * channel places it, and picture-in-picture boxes stack newest first. The host saves {@link Moves} and loads them back\n * ({@link LoadMoves}), so a layout carries over to later sessions.\n *\n * **Creation.** A channel's surface is created the first time it is seen (its tab shows it, or it is on the stage or\n * in a picture-in-picture box) and kept until the channel leaves the session. Moving it, hiding the panel or switching tabs only changes where it\n * shows, so a whiteboard keeps its view and a stream keeps playing.\n *\n * Pure state with no Angular: the overlay reports the session's channels, the channel tab the panel is showing and\n * the user's moves, and binds {@link Surfaces} to the stage.\n */\nexport class RealtimeSurfaceStageModel {\n /** Channels with a surface, by key, in the order their tabs registered. */\n private readonly plugins = new Map<string, BaseRealtimeChannelClient>();\n /** Keys whose surface has been seen, so it stays created. */\n private readonly seen = new Set<string>();\n private moves: MediaPlacementMove[] = [];\n private activeTabKey: string | null = null;\n private placements: ReadonlyMap<string, MediaStagePlacement> = new Map();\n /** Picture-in-picture surfaces, newest first. */\n private pipOrder: readonly string[] = [];\n private surfaces: readonly MediaStageSurface[] = [];\n private allowedPlacements: ReadonlyMap<string, readonly MediaStagePlacement[]> = new Map();\n\n /** The stage's surfaces. The array is replaced only when a surface or a placement changes, so it binds cheaply. */\n public get Surfaces(): readonly MediaStageSurface[] {\n return this.surfaces;\n }\n\n /** Where each registered channel's surface is placed, by key. Replaced only when a placement changes. */\n public get Placements(): ReadonlyMap<string, MediaStagePlacement> {\n return this.placements;\n }\n\n /** Where the user may move each registered channel's surface, by key. Replaced only when the channels change. */\n public get AllowedPlacements(): ReadonlyMap<string, readonly MediaStagePlacement[]> {\n return this.allowedPlacements;\n }\n\n /** The user's moves, oldest first, one per surface: what the host saves. */\n public get Moves(): readonly MediaPlacementMove[] {\n return this.moves;\n }\n\n /** The channel whose surface is on the stage, or `null`. */\n public get StageKey(): string | null {\n for (const [key, placement] of this.placements) {\n if (placement === 'stage') {\n return key;\n }\n }\n return null;\n }\n\n /** The plugin behind a surface, or `null` once its channel has left. */\n public PluginFor(key: string): BaseRealtimeChannelClient | null {\n return this.plugins.get(key) ?? null;\n }\n\n /** Where the user may move a channel's surface; nowhere for a channel without a surface in this session. */\n public AllowedFor(key: string): readonly MediaStagePlacement[] {\n return this.allowedPlacements.get(key) ?? [];\n }\n\n /**\n * Where a channel's surface goes when it leaves the stage (the user leaves the focus layout, or the channel lets go of\n * it): where its channel places it, or the first of picture-in-picture, tab and hidden that it allows.\n */\n public OffStagePlacement(key: string): MediaStagePlacement {\n const plugin = this.plugins.get(key);\n return plugin ? PlacementOffStage(surfaceOf(plugin)) : 'tab';\n }\n\n /** A channel with a surface got its tab. Registering its key again follows the channel's new plugin instance. */\n public Register(plugin: BaseRealtimeChannelClient): void {\n this.plugins.set(plugin.ChannelName, plugin);\n this.updateAllowedPlacements();\n this.update();\n }\n\n /** The session's channels changed: a surface whose plugin is no longer among them is dropped. Moves are kept. */\n public KeepOnly(channels: readonly BaseRealtimeChannelClient[]): void {\n for (const [key, plugin] of [...this.plugins]) {\n if (!channels.includes(plugin)) {\n this.plugins.delete(key);\n this.seen.delete(key);\n }\n }\n this.updateAllowedPlacements();\n this.update();\n }\n\n /** The channel whose tab the panel is showing, or `null` when it shows none (another tab, collapsed, hidden). */\n public SetActiveTab(key: string | null): void {\n this.activeTabKey = key;\n this.update();\n }\n\n /** Starts from saved moves, such as the user's last layout. */\n public LoadMoves(moves: readonly MediaPlacementMove[]): void {\n this.moves = [...moves];\n this.update();\n }\n\n /**\n * Moves a channel's surface. Returns `false`, changing nothing, for a channel without a surface in this session, a\n * placement its channel does not allow, or the placement it already has.\n */\n public Move(key: string, placement: MediaStagePlacement): boolean {\n if (!this.AllowedFor(key).includes(placement) || this.placements.get(key) === placement) {\n return false;\n }\n this.moves = RecordPlacementMove(this.moves, { SurfaceKey: key, Placement: placement });\n this.update();\n return true;\n }\n\n /** Forgets every move: each surface returns to where its channel places it. */\n public ResetLayout(): void {\n this.moves = [];\n this.update();\n }\n\n private update(): void {\n this.resolvePlacements();\n for (const [key, placement] of this.placements) {\n if (placement === 'stage' || placement === 'pip' || (placement === 'tab' && key === this.activeTabKey)) {\n this.seen.add(key);\n }\n }\n const surfaces = [...this.plugins.keys()].filter((key) => this.seen.has(key)).map((key) => this.surfaceFor(key));\n if (!sameSurfaces(surfaces, this.surfaces)) {\n this.surfaces = surfaces;\n }\n }\n\n /** Rebuilds {@link AllowedPlacements} from the registered channels, keeping the map when nothing in it changed. */\n private updateAllowedPlacements(): void {\n const allowed = new Map([...this.plugins].map(([key, plugin]) => [key, plugin.SurfacePlacement.Allowed]));\n if (!sameAllowedPlacements(allowed, this.allowedPlacements)) {\n this.allowedPlacements = allowed;\n }\n }\n\n /** A stage surface for a channel: its placement, its name, and where it stacks when it is picture-in-picture. */\n private surfaceFor(key: string): MediaStageSurface {\n const placement = this.placements.get(key) ?? 'tab';\n const surface: MediaStageSurface = { Key: key, Placement: placement, Label: this.plugins.get(key)?.TabTitle };\n return placement === 'pip' ? { ...surface, PipIndex: this.pipOrder.indexOf(key) } : surface;\n }\n\n private resolvePlacements(): void {\n const resolved = ResolveSurfacePlacements([...this.plugins.values()].map(surfaceOf), this.moves);\n const placements = new Map<string, MediaStagePlacement>();\n if (resolved.Stage) {\n placements.set(resolved.Stage.Key, 'stage');\n }\n resolved.Pips.forEach((surface) => placements.set(surface.Key, 'pip'));\n resolved.Tabs.forEach((surface) => placements.set(surface.Key, 'tab'));\n resolved.Hidden.forEach((surface) => placements.set(surface.Key, 'hidden'));\n if (!samePlacements(placements, this.placements)) {\n this.placements = placements;\n }\n this.pipOrder = resolved.Pips.map((surface) => surface.Key);\n }\n}\n\n/** A channel's surface as the layout model sees it: where its channel places it unless moved, and where it may go. */\nfunction surfaceOf(plugin: BaseRealtimeChannelClient): MediaSurface {\n const { Default, Allowed } = plugin.SurfacePlacement;\n return { Key: plugin.ChannelName, Label: plugin.TabTitle, DefaultPlacement: Default, AllowedPlacements: Allowed };\n}\n\nfunction sameAllowedPlacements(\n a: ReadonlyMap<string, readonly MediaStagePlacement[]>,\n b: ReadonlyMap<string, readonly MediaStagePlacement[]>\n): boolean {\n return a.size === b.size && [...a].every(([key, allowed]) => b.get(key) === allowed);\n}\n\nfunction samePlacements(a: ReadonlyMap<string, MediaStagePlacement>, b: ReadonlyMap<string, MediaStagePlacement>): boolean {\n return a.size === b.size && [...a].every(([key, placement]) => b.get(key) === placement);\n}\n\nfunction sameSurfaces(a: readonly MediaStageSurface[], b: readonly MediaStageSurface[]): boolean {\n return (\n a.length === b.length &&\n a.every(\n (surface, i) =>\n surface.Key === b[i].Key && surface.Placement === b[i].Placement && surface.Label === b[i].Label && surface.PipIndex === b[i].PipIndex\n )\n );\n}\n"]}
@@ -1,18 +1,25 @@
1
- import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
1
+ import { AfterViewChecked, EventEmitter, OnInit, OnDestroy } from '@angular/core';
2
+ import { type MediaMoveRequest, type MediaStagePlacement } from '@memberjunction/ng-realtime-media';
2
3
  import { UserInfo } from '@memberjunction/core';
3
4
  import { RealtimeSessionState } from './realtime-session-state';
4
5
  import { ChannelOnboardingDetails } from '@memberjunction/realtime-runtime';
5
6
  import { RealtimeSurfaceTabsModel, RealtimeSurfaceTab, RealtimeChannelTabRegistration } from './realtime-surface-tabs.model';
6
7
  import { ParsedDelegationArtifact } from '@memberjunction/realtime-runtime';
7
8
  import * as i0 from "@angular/core";
9
+ /** Where the active channel tab's surface shows: the tab's key and the element its pane keeps for the surface. */
10
+ export interface RealtimeChannelSlot {
11
+ Key: string;
12
+ Element: HTMLElement;
13
+ }
8
14
  /**
9
15
  * The call overlay's TABBED SURFACE PANEL (the right panel) — decluttered redesign:
10
16
  *
11
17
  * - **Channel tabs** (LEFT cluster) — one per channel that has come into play. The whiteboard
12
18
  * tabs immediately at session start; every other channel tabs only once the agent first
13
- * USES it. Each carries a distinct accent color + its plugin icon. The pane creates the
14
- * plugin's surface component dynamically (via `mj-realtime-channel-pane`); a placeholder
15
- * shows the "coming online…" state until a plugin/template is supplied.
19
+ * USES it. Each carries a distinct accent color + its plugin icon. A plugin's surface lives
20
+ * on the overlay's stage, which lays it over the pane's slot while the tab is active
21
+ * ({@link ChannelSlotChange}); a placeholder shows the "coming online…" state until a
22
+ * plugin/template is supplied.
16
23
  * - **Activity** (RIGHT-aligned, pinned LAST) — gated: appears only once ≥1 agent run has
17
24
  * occurred (or in review mode). Hosts {@link RealtimeActivityRailComponent}, which now also
18
25
  * renders inline artifact previews and a split-pane artifact viewer. Styled distinctly from
@@ -22,15 +29,16 @@ import * as i0 from "@angular/core";
22
29
  * Artifacts NO LONGER get their own tab — they live inside the Activity tab (cleaner than a
23
30
  * row of per-artifact tabs).
24
31
  *
25
- * Panes are kept ALIVE while hidden (CSS `display:none`) so switching tabs never reloads a
26
- * channel surface or resets the rail. The whole panel collapses to a slim strip via the chevron.
32
+ * Panes are kept ALIVE while hidden (CSS `display:none`) so switching tabs never resets the rail;
33
+ * channel surfaces are on the overlay's stage, so switching tabs or collapsing the panel never
34
+ * reloads them either. The whole panel collapses to a slim strip via the chevron.
27
35
  *
28
36
  * SIZING IS EXTERNAL: the overlay shell hosts this panel in a fixed-width flex item and owns
29
37
  * the width. This panel just fills it and REPORTS the layout signals the shell sizes from:
30
38
  * {@link CollapsedChange} (slim-strip toggle) and {@link WideChanged} (a channel tab is focused
31
39
  * → the default width tier widens).
32
40
  */
33
- export declare class RealtimeSurfaceTabsComponent implements OnInit, OnDestroy {
41
+ export declare class RealtimeSurfaceTabsComponent implements OnInit, OnDestroy, AfterViewChecked {
34
42
  /** How long a just-revealed channel tab keeps its flash highlight. */
35
43
  private static readonly flashDurationMs;
36
44
  /** Shared live-session state, owned by the overlay shell (feeds the Activity rail). */
@@ -38,9 +46,9 @@ export declare class RealtimeSurfaceTabsComponent implements OnInit, OnDestroy {
38
46
  /** Whether developer affordances ("Open run" links) are revealed (gear-gated). */
39
47
  DevMode: boolean;
40
48
  /**
41
- * FILL presentation: the panel stretches to the overlay's full width (the board-focus
42
- * layout, where the main call column is hidden and a channel surface owns the screen).
43
- * Bound by the overlay shell; overrides the normal / wide width tiers.
49
+ * FILL presentation: the panel stretches to its host's full width with no left border,
50
+ * overriding the normal / wide width tiers. The overlay no longer binds it: in focus mode
51
+ * the focused channel's surface fills the overlay's stage instead.
44
52
  */
45
53
  Fill: boolean;
46
54
  /** The signed-in user, threaded to the artifact viewer panel. */
@@ -73,12 +81,45 @@ export declare class RealtimeSurfaceTabsComponent implements OnInit, OnDestroy {
73
81
  * the user has never dragged an explicit width).
74
82
  */
75
83
  WideChanged: EventEmitter<boolean>;
84
+ /**
85
+ * The channel whose tab the user is looking at changed (`null` when a non-channel tab, such as Activity, is active).
86
+ * Lets the session show the model the surface the user is on when it can only watch one.
87
+ */
88
+ ActiveChannelChange: EventEmitter<string | null>;
89
+ /**
90
+ * The active channel tab's slot changed: the element its pane keeps for the channel's surface, or `null` while no
91
+ * channel tab is showing (another tab is active, or the panel is collapsed). The overlay's stage lays the surface
92
+ * over this element.
93
+ */
94
+ ChannelSlotChange: EventEmitter<RealtimeChannelSlot | null>;
95
+ /**
96
+ * Where each channel's surface is placed, by channel key (a channel not listed is on its tab). A channel whose
97
+ * surface is elsewhere shows where in its pane, with "Bring it here" when its channel allows the tab.
98
+ */
99
+ SurfacePlacements: ReadonlyMap<string, MediaStagePlacement>;
100
+ /** Where each channel lets the user move its surface, by channel key (a channel not listed allows anywhere). */
101
+ AllowedPlacements: ReadonlyMap<string, readonly MediaStagePlacement[]>;
102
+ /** The user asked to move a channel's surface (from "Move to…" or "Bring it here"). */
103
+ MoveRequested: EventEmitter<MediaMoveRequest>;
104
+ /** The user asked to put every surface back where its channel places it. */
105
+ ResetLayoutRequested: EventEmitter<void>;
76
106
  /** The panel's tab state (add / focus / dedupe / flash) — see the model for the rules. */
77
107
  readonly Model: RealtimeSurfaceTabsModel;
78
- /** Whether the panel is collapsed to its slim strip. */
79
- Collapsed: boolean;
108
+ /**
109
+ * Whether the panel is collapsed to its slim strip. The chevron toggles it, a reveal expands it, and the panel reports
110
+ * each such change through {@link CollapsedChange}. A host may bind it, so that a panel it creates again starts as the
111
+ * user left the one before (the call overlay does when only the call's width hid the panel, #5433). A value the host
112
+ * sets is not reported back.
113
+ */
114
+ set Collapsed(value: boolean);
115
+ get Collapsed(): boolean;
116
+ private collapsed;
80
117
  /** The embedded Activity rail (owns the inline artifact previews + the split-pane viewer). */
81
118
  private activityRail?;
119
+ /** The slots of the plugin channel panes, one per tab. */
120
+ private channelSlots?;
121
+ /** The slot last reported through {@link ChannelSlotChange}. */
122
+ private reportedSlot;
82
123
  private flashTimer;
83
124
  private subs;
84
125
  private lastWide;
@@ -96,7 +137,20 @@ export declare class RealtimeSurfaceTabsComponent implements OnInit, OnDestroy {
96
137
  /** Wide presentation when a channel tab is focused (the Activity tab keeps the normal tier). */
97
138
  get IsWide(): boolean;
98
139
  ngOnInit(): void;
140
+ ngAfterViewChecked(): void;
99
141
  ngOnDestroy(): void;
142
+ /** Reports the active channel tab's slot when it differs from the one last reported. */
143
+ private reportChannelSlot;
144
+ /** The active tab's slot: present while that tab is a plugin channel and the panel is expanded. */
145
+ private activeChannelSlot;
146
+ /** Where a channel's surface is placed. */
147
+ PlacementOf(key: string): MediaStagePlacement;
148
+ /** Where a channel lets the user move its surface. */
149
+ AllowedOf(key: string): readonly MediaStagePlacement[];
150
+ /** Where a moved channel's surface is, as its tab says it: "on the stage", "in picture-in-picture", "hidden". */
151
+ AwayText(key: string): string;
152
+ /** The icon for where a moved channel's surface is. */
153
+ AwayIcon(key: string): string;
100
154
  /** Toggle the panel between expanded and slim-collapsed. */
101
155
  ToggleCollapsed(): void;
102
156
  /** Collapse-state transitions funnel through here so the shell always hears about them. */
@@ -140,6 +194,10 @@ export declare class RealtimeSurfaceTabsComponent implements OnInit, OnDestroy {
140
194
  RegisterArtifactTab(artifact: ParsedDelegationArtifact, focus?: boolean): void;
141
195
  /** On model changes: schedule the flash clear, report a wide-tier flip, re-render. */
142
196
  private onModelChanged;
197
+ /** The channel key last reported through {@link ActiveChannelChange}. */
198
+ private lastReportedChannel;
199
+ /** Reports the focused channel when it differs from the last one reported. */
200
+ private emitActiveChannelIfChanged;
143
201
  /**
144
202
  * Decides whether the first-run channel intro should be visible for the ACTIVE tab: shows it
145
203
  * the first time the user opens (focuses) a channel tab whose plugin supplies onboarding and
@@ -166,6 +224,6 @@ export declare class RealtimeSurfaceTabsComponent implements OnInit, OnDestroy {
166
224
  /** Clears the model's flash highlight after a beat (one timer; latest flash wins). */
167
225
  private scheduleFlashClear;
168
226
  static ɵfac: i0.ɵɵFactoryDeclaration<RealtimeSurfaceTabsComponent, never>;
169
- static ɵcmp: i0.ɵɵComponentDeclaration<RealtimeSurfaceTabsComponent, "mj-realtime-surface-tabs", never, { "State": { "alias": "State"; "required": true; }; "DevMode": { "alias": "DevMode"; "required": false; }; "Fill": { "alias": "Fill"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "EnvironmentID": { "alias": "EnvironmentID"; "required": false; }; "ExtraArtifacts": { "alias": "ExtraArtifacts"; "required": false; }; "ShowActivityTab": { "alias": "ShowActivityTab"; "required": false; }; }, { "OpenRunRequested": "OpenRunRequested"; "CollapsedChange": "CollapsedChange"; "WideChanged": "WideChanged"; }, never, never, true, never>;
227
+ static ɵcmp: i0.ɵɵComponentDeclaration<RealtimeSurfaceTabsComponent, "mj-realtime-surface-tabs", never, { "State": { "alias": "State"; "required": true; }; "DevMode": { "alias": "DevMode"; "required": false; }; "Fill": { "alias": "Fill"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "EnvironmentID": { "alias": "EnvironmentID"; "required": false; }; "ExtraArtifacts": { "alias": "ExtraArtifacts"; "required": false; }; "ShowActivityTab": { "alias": "ShowActivityTab"; "required": false; }; "SurfacePlacements": { "alias": "SurfacePlacements"; "required": false; }; "AllowedPlacements": { "alias": "AllowedPlacements"; "required": false; }; "Collapsed": { "alias": "Collapsed"; "required": false; }; }, { "OpenRunRequested": "OpenRunRequested"; "CollapsedChange": "CollapsedChange"; "WideChanged": "WideChanged"; "ActiveChannelChange": "ActiveChannelChange"; "ChannelSlotChange": "ChannelSlotChange"; "MoveRequested": "MoveRequested"; "ResetLayoutRequested": "ResetLayoutRequested"; }, never, never, true, never>;
170
228
  }
171
229
  //# sourceMappingURL=realtime-surface-tabs.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"realtime-surface-tabs.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-surface-tabs.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACM,YAAY,EAAiB,MAAM,EAAE,SAAS,EAC1D,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIhE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EACL,wBAAwB,EAAE,kBAAkB,EAAE,8BAA8B,EAC7E,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;;AAU5E;;;;;;;;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O,CAAC,YAAY;IAQpB,yFAAyF;IACzF,OAAO,CAAC,QAAQ;IAQhB,uCAAuC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,kBAAkB,GAAG,MAAM;IAI/D;;;;OAIG;IACI,aAAa,CAAC,QAAQ,EAAE,wBAAwB,GAAG,IAAI;IAc9D;;;OAGG;IACI,kBAAkB,CAAC,YAAY,EAAE,8BAA8B,GAAG,IAAI;IAW7E;;;;OAIG;IACI,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAavC;;;;;;;OAOG;IACI,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAQtC;;;;;OAKG;IACI,mBAAmB,CAAC,QAAQ,EAAE,wBAAwB,EAAE,KAAK,GAAE,OAAe,GAAG,IAAI;IAQ5F,sFAAsF;IACtF,OAAO,CAAC,cAAc;IAOtB;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;;OAGG;IACI,iBAAiB,IAAI,IAAI;IAUhC,+FAA+F;IAC/F,OAAO,CAAC,iBAAiB;IAIzB,kFAAkF;IAClF,OAAO,CAAC,kBAAkB;IAS1B,8FAA8F;IAC9F,OAAO,CAAC,kBAAkB;IAe1B;;;OAGG;IACI,aAAa,IAAI,IAAI;IAQ5B,sFAAsF;IACtF,OAAO,CAAC,kBAAkB;yCApTf,4BAA4B;2CAA5B,4BAA4B;CAgUxC"}
1
+ {"version":3,"file":"realtime-surface-tabs.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-surface-tabs.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAAyB,YAAY,EAAiB,MAAM,EAAE,SAAS,EAExF,MAAM,eAAe,CAAC;AAEvB,OAAO,EAA0B,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAI5H,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE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