@onlive.ai/common-121 0.2.187 → 0.2.190

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 (467) hide show
  1. package/README.md +300 -89
  2. package/{audi-dark.theme-aO_Pa27x.d.cts → audi-dark.theme-a2WmOyVS.d.cts} +1 -1
  3. package/{audi-dark.theme-aO_Pa27x.d.ts → audi-dark.theme-a2WmOyVS.d.ts} +1 -1
  4. package/{audi.theme-BP7nboRq.d.cts → audi.theme-DkdflnT8.d.cts} +1 -1
  5. package/{audi.theme-BP7nboRq.d.ts → audi.theme-DkdflnT8.d.ts} +1 -1
  6. package/{australia.theme-BkfhMf1z.d.cts → australia.theme-B5n8F3QH.d.cts} +1 -1
  7. package/{australia.theme-BkfhMf1z.d.ts → australia.theme-B5n8F3QH.d.ts} +1 -1
  8. package/{chunk-V7XHRWMT.js → chunk-4DKWCKNT.js} +1 -1
  9. package/components/asset/asset-modal-portal.cjs +1 -1
  10. package/components/asset/asset-modal-portal.d.cts +1 -1
  11. package/components/asset/asset-modal-portal.d.ts +1 -1
  12. package/components/asset/asset-modal-portal.js +1 -1
  13. package/components/asset/asset.cjs +1 -1
  14. package/components/asset/asset.d.cts +1 -1
  15. package/components/asset/asset.d.ts +1 -1
  16. package/components/asset/asset.js +1 -1
  17. package/components/asset/asset.loaders.cjs +1 -1
  18. package/components/asset/asset.loaders.d.cts +1 -1
  19. package/components/asset/asset.loaders.d.ts +1 -1
  20. package/components/asset/asset.loaders.js +1 -1
  21. package/components/asset/asset.renderer.cjs +1 -1
  22. package/components/asset/asset.renderer.d.cts +1 -1
  23. package/components/asset/asset.renderer.d.ts +1 -1
  24. package/components/asset/asset.renderer.js +1 -1
  25. package/components/asset/asset.styles.cjs +1 -1
  26. package/components/asset/asset.styles.d.cts +1 -1
  27. package/components/asset/asset.styles.d.ts +1 -1
  28. package/components/asset/asset.styles.js +1 -1
  29. package/components/asset/asset.types.cjs +1 -1
  30. package/components/asset/asset.types.d.cts +1 -1
  31. package/components/asset/asset.types.d.ts +1 -1
  32. package/components/asset/asset.types.js +1 -1
  33. package/components/asset/index.cjs +1 -1
  34. package/components/asset/index.d.cts +1 -1
  35. package/components/asset/index.d.ts +1 -1
  36. package/components/asset/index.js +1 -1
  37. package/components/player/player.cjs +1 -1
  38. package/components/player/player.d.cts +1 -1
  39. package/components/player/player.d.ts +1 -1
  40. package/components/player/player.js +1 -1
  41. package/components/player/player.styles.cjs +1 -1
  42. package/components/player/player.styles.d.cts +1 -1
  43. package/components/player/player.styles.d.ts +1 -1
  44. package/components/player/player.styles.js +1 -1
  45. package/components/side-bar/index.cjs +1 -1
  46. package/components/side-bar/index.d.cts +1 -1
  47. package/components/side-bar/index.d.ts +1 -1
  48. package/components/side-bar/index.js +1 -1
  49. package/components/side-bar/side-bar.cjs +1 -1
  50. package/components/side-bar/side-bar.d.cts +1 -1
  51. package/components/side-bar/side-bar.d.ts +1 -1
  52. package/components/side-bar/side-bar.js +1 -1
  53. package/components/side-bar/side-bar.styles.cjs +1 -1
  54. package/components/side-bar/side-bar.styles.d.cts +1 -1
  55. package/components/side-bar/side-bar.styles.d.ts +1 -1
  56. package/components/side-bar/side-bar.styles.js +1 -1
  57. package/components/side-bar/side-bar.types.cjs +1 -1
  58. package/components/side-bar/side-bar.types.d.cts +1 -1
  59. package/components/side-bar/side-bar.types.d.ts +1 -1
  60. package/components/side-bar/side-bar.types.js +1 -1
  61. package/components/upload/index.cjs +1 -1
  62. package/components/upload/index.d.cts +1 -1
  63. package/components/upload/index.d.ts +1 -1
  64. package/components/upload/index.js +1 -1
  65. package/components/upload/upload.cjs +1 -1
  66. package/components/upload/upload.d.cts +1 -1
  67. package/components/upload/upload.d.ts +1 -1
  68. package/components/upload/upload.js +1 -1
  69. package/components/upload/upload.styles.cjs +1 -1
  70. package/components/upload/upload.styles.d.cts +1 -1
  71. package/components/upload/upload.styles.d.ts +1 -1
  72. package/components/upload/upload.styles.js +1 -1
  73. package/components/upload/upload.types.cjs +1 -1
  74. package/components/upload/upload.types.d.cts +1 -1
  75. package/components/upload/upload.types.d.ts +1 -1
  76. package/components/upload/upload.types.js +1 -1
  77. package/{cuernavaca.theme-Bez8yPGT.d.cts → cuernavaca.theme-BzcZX1EJ.d.cts} +1 -1
  78. package/{cuernavaca.theme-Bez8yPGT.d.ts → cuernavaca.theme-BzcZX1EJ.d.ts} +1 -1
  79. package/{cupra-diagonal.theme-CvdXkM9K.d.cts → cupra-diagonal.theme-CKxsGYdb.d.cts} +1 -1
  80. package/{cupra-diagonal.theme-CvdXkM9K.d.ts → cupra-diagonal.theme-CKxsGYdb.d.ts} +1 -1
  81. package/{cupra-events.theme-ln2vh1C0.d.cts → cupra-events.theme-kGaXJptG.d.cts} +1 -1
  82. package/{cupra-events.theme-ln2vh1C0.d.ts → cupra-events.theme-kGaXJptG.d.ts} +1 -1
  83. package/{cupra.theme-xa6yZhYo.d.cts → cupra.theme-C-oFRdQw.d.cts} +1 -1
  84. package/{cupra.theme-xa6yZhYo.d.ts → cupra.theme-C-oFRdQw.d.ts} +1 -1
  85. package/{germany.theme-Dra_5Jz0.d.cts → germany.theme-Cxz60Lv5.d.cts} +1 -1
  86. package/{germany.theme-Dra_5Jz0.d.ts → germany.theme-Cxz60Lv5.d.ts} +1 -1
  87. package/{hyundai.theme-BATWnkTl.d.cts → hyundai.theme-DNFeBfk4.d.cts} +1 -1
  88. package/{hyundai.theme-BATWnkTl.d.ts → hyundai.theme-DNFeBfk4.d.ts} +1 -1
  89. package/index.cjs +33 -33
  90. package/index.css +1 -0
  91. package/index.d.cts +4 -2
  92. package/index.d.ts +4 -2
  93. package/index.js +140 -139
  94. package/{italy.theme-YukqsD2q.d.cts → italy.theme-YKt3PHQM.d.cts} +1 -1
  95. package/{italy.theme-YukqsD2q.d.ts → italy.theme-YKt3PHQM.d.ts} +1 -1
  96. package/{magimix.theme-C7eoXRAA.d.cts → magimix.theme-lIo3UAYh.d.cts} +1 -1
  97. package/{magimix.theme-C7eoXRAA.d.ts → magimix.theme-lIo3UAYh.d.ts} +1 -1
  98. package/{media-MWJPMNO2.js → media-BU4KDZMS.js} +2 -2
  99. package/{onlive-ai.theme-CMYahnHv.d.cts → onlive-ai.theme-Dk4K7dnu.d.cts} +1 -1
  100. package/{onlive-ai.theme-CMYahnHv.d.ts → onlive-ai.theme-Dk4K7dnu.d.ts} +1 -1
  101. package/{onlive.theme-B7tNdG9s.d.cts → onlive.theme-BU4h4zKz.d.cts} +1 -1
  102. package/{onlive.theme-B7tNdG9s.d.ts → onlive.theme-BU4h4zKz.d.ts} +1 -1
  103. package/package.json +4 -2
  104. package/react/components/asset/Asset.cjs +1 -1
  105. package/react/components/asset/Asset.jsx +1 -1
  106. package/react/components/side-bar/SideBar.cjs +1 -1
  107. package/react/components/side-bar/SideBar.jsx +1 -1
  108. package/react/components/upload/Upload.cjs +1 -1
  109. package/react/components/upload/Upload.jsx +1 -1
  110. package/{seat-cupra.theme-CzvloqhA.d.cts → seat-cupra.theme-C-PJk0pi.d.cts} +1 -1
  111. package/{seat-cupra.theme-CzvloqhA.d.ts → seat-cupra.theme-C-PJk0pi.d.ts} +1 -1
  112. package/services/audio.service.cjs +1 -1
  113. package/services/audio.service.d.cts +1 -1
  114. package/services/audio.service.d.ts +1 -1
  115. package/services/audio.service.js +1 -1
  116. package/services/conversation/conversation.service.cjs +1 -1
  117. package/services/conversation/conversation.service.d.cts +1 -1
  118. package/services/conversation/conversation.service.d.ts +1 -1
  119. package/services/conversation/conversation.service.js +1 -1
  120. package/services/conversation/conversation.types.cjs +2 -2
  121. package/services/conversation/conversation.types.d.cts +3 -1
  122. package/services/conversation/conversation.types.d.ts +3 -1
  123. package/services/conversation/conversation.types.js +1 -1
  124. package/services/conversation/index.cjs +2 -2
  125. package/services/conversation/index.d.cts +1 -1
  126. package/services/conversation/index.d.ts +1 -1
  127. package/services/conversation/index.js +2 -2
  128. package/services/conversation/mock/actor/agent.cjs +1 -1
  129. package/services/conversation/mock/actor/agent.d.cts +1 -1
  130. package/services/conversation/mock/actor/agent.d.ts +1 -1
  131. package/services/conversation/mock/actor/agent.js +1 -1
  132. package/services/conversation/mock/actor/index.cjs +1 -1
  133. package/services/conversation/mock/actor/index.d.cts +1 -1
  134. package/services/conversation/mock/actor/index.d.ts +1 -1
  135. package/services/conversation/mock/actor/index.js +1 -1
  136. package/services/conversation/mock/actor/strategies.cjs +1 -1
  137. package/services/conversation/mock/actor/strategies.d.cts +1 -1
  138. package/services/conversation/mock/actor/strategies.d.ts +1 -1
  139. package/services/conversation/mock/actor/strategies.js +1 -1
  140. package/services/conversation/mock/errors.cjs +1 -1
  141. package/services/conversation/mock/errors.d.cts +1 -1
  142. package/services/conversation/mock/errors.d.ts +1 -1
  143. package/services/conversation/mock/errors.js +1 -1
  144. package/services/conversation/mock/events.cjs +1 -1
  145. package/services/conversation/mock/events.d.cts +1 -1
  146. package/services/conversation/mock/events.d.ts +1 -1
  147. package/services/conversation/mock/events.js +1 -1
  148. package/services/conversation/mock/factory.cjs +2 -2
  149. package/services/conversation/mock/factory.d.cts +1 -1
  150. package/services/conversation/mock/factory.d.ts +1 -1
  151. package/services/conversation/mock/factory.js +2 -2
  152. package/services/conversation/mock/fixtures.cjs +1 -1
  153. package/services/conversation/mock/fixtures.d.cts +1 -1
  154. package/services/conversation/mock/fixtures.d.ts +1 -1
  155. package/services/conversation/mock/fixtures.js +1 -1
  156. package/services/conversation/mock/generators.cjs +1 -1
  157. package/services/conversation/mock/generators.d.cts +1 -1
  158. package/services/conversation/mock/generators.d.ts +1 -1
  159. package/services/conversation/mock/generators.js +1 -1
  160. package/services/conversation/mock/index.cjs +2 -2
  161. package/services/conversation/mock/index.d.cts +1 -1
  162. package/services/conversation/mock/index.d.ts +1 -1
  163. package/services/conversation/mock/index.js +2 -2
  164. package/services/conversation/mock/livekit/index.cjs +1 -1
  165. package/services/conversation/mock/livekit/index.d.cts +1 -1
  166. package/services/conversation/mock/livekit/index.d.ts +1 -1
  167. package/services/conversation/mock/livekit/index.js +1 -1
  168. package/services/conversation/mock/livekit/local-participant.cjs +1 -1
  169. package/services/conversation/mock/livekit/local-participant.d.cts +1 -1
  170. package/services/conversation/mock/livekit/local-participant.d.ts +1 -1
  171. package/services/conversation/mock/livekit/local-participant.js +1 -1
  172. package/services/conversation/mock/livekit/participant.cjs +1 -1
  173. package/services/conversation/mock/livekit/participant.d.cts +1 -1
  174. package/services/conversation/mock/livekit/participant.d.ts +1 -1
  175. package/services/conversation/mock/livekit/participant.js +1 -1
  176. package/services/conversation/mock/livekit/room.cjs +1 -1
  177. package/services/conversation/mock/livekit/room.d.cts +1 -1
  178. package/services/conversation/mock/livekit/room.d.ts +1 -1
  179. package/services/conversation/mock/livekit/room.js +1 -1
  180. package/services/conversation/mock/livekit/streams.cjs +1 -1
  181. package/services/conversation/mock/livekit/streams.d.cts +1 -1
  182. package/services/conversation/mock/livekit/streams.d.ts +1 -1
  183. package/services/conversation/mock/livekit/streams.js +1 -1
  184. package/services/conversation/mock/livekit/tracks.cjs +1 -1
  185. package/services/conversation/mock/livekit/tracks.d.cts +1 -1
  186. package/services/conversation/mock/livekit/tracks.d.ts +1 -1
  187. package/services/conversation/mock/livekit/tracks.js +1 -1
  188. package/services/conversation/mock/media.cjs +1 -1
  189. package/services/conversation/mock/media.d.cts +1 -1
  190. package/services/conversation/mock/media.d.ts +1 -1
  191. package/services/conversation/mock/media.js +1 -1
  192. package/services/conversation/mock/service.cjs +2 -2
  193. package/services/conversation/mock/service.d.cts +1 -1
  194. package/services/conversation/mock/service.d.ts +1 -1
  195. package/services/conversation/mock/service.js +2 -2
  196. package/services/conversation/mock/service.test.cjs +2 -2
  197. package/services/conversation/mock/service.test.d.cts +1 -1
  198. package/services/conversation/mock/service.test.d.ts +1 -1
  199. package/services/conversation/mock/service.test.js +2 -2
  200. package/services/conversation/mock/state.cjs +1 -1
  201. package/services/conversation/mock/state.d.cts +1 -1
  202. package/services/conversation/mock/state.d.ts +1 -1
  203. package/services/conversation/mock/state.js +1 -1
  204. package/services/conversation/mock/storybook.cjs +2 -2
  205. package/services/conversation/mock/storybook.d.cts +1 -1
  206. package/services/conversation/mock/storybook.d.ts +1 -1
  207. package/services/conversation/mock/storybook.js +2 -2
  208. package/services/conversation/mock/types.cjs +1 -1
  209. package/services/conversation/mock/types.d.cts +1 -1
  210. package/services/conversation/mock/types.d.ts +1 -1
  211. package/services/conversation/mock/types.js +1 -1
  212. package/services/deep-link.service.cjs +1 -1
  213. package/services/deep-link.service.d.cts +1 -1
  214. package/services/deep-link.service.d.ts +1 -1
  215. package/services/deep-link.service.js +1 -1
  216. package/services/faqs/faqs.service.cjs +1 -1
  217. package/services/faqs/faqs.service.d.cts +1 -1
  218. package/services/faqs/faqs.service.d.ts +1 -1
  219. package/services/faqs/faqs.service.js +1 -1
  220. package/services/faqs/faqs.types.cjs +1 -1
  221. package/services/faqs/faqs.types.d.cts +1 -1
  222. package/services/faqs/faqs.types.d.ts +1 -1
  223. package/services/faqs/faqs.types.js +1 -1
  224. package/services/faqs/index.cjs +1 -1
  225. package/services/faqs/index.d.cts +1 -1
  226. package/services/faqs/index.d.ts +1 -1
  227. package/services/faqs/index.js +1 -1
  228. package/services/file/file.service.cjs +1 -1
  229. package/services/file/file.service.d.cts +1 -1
  230. package/services/file/file.service.d.ts +1 -1
  231. package/services/file/file.service.js +1 -1
  232. package/services/file/file.types.cjs +1 -1
  233. package/services/file/file.types.d.cts +1 -1
  234. package/services/file/file.types.d.ts +1 -1
  235. package/services/file/file.types.js +1 -1
  236. package/services/file/index.cjs +1 -1
  237. package/services/file/index.d.cts +1 -1
  238. package/services/file/index.d.ts +1 -1
  239. package/services/file/index.js +1 -1
  240. package/services/firebase/firebase-api.cjs +1 -1
  241. package/services/firebase/firebase-api.d.cts +1 -1
  242. package/services/firebase/firebase-api.d.ts +1 -1
  243. package/services/firebase/firebase-api.js +1 -1
  244. package/services/multimedia/config.example.cjs +1 -1
  245. package/services/multimedia/config.example.d.cts +1 -1
  246. package/services/multimedia/config.example.d.ts +1 -1
  247. package/services/multimedia/config.example.js +1 -1
  248. package/services/multimedia/index.cjs +1 -1
  249. package/services/multimedia/index.d.cts +1 -1
  250. package/services/multimedia/index.d.ts +1 -1
  251. package/services/multimedia/index.js +1 -1
  252. package/services/multimedia/multimedia.service.cjs +1 -1
  253. package/services/multimedia/multimedia.service.d.cts +1 -1
  254. package/services/multimedia/multimedia.service.d.ts +1 -1
  255. package/services/multimedia/multimedia.service.js +1 -1
  256. package/services/multimedia/multimedia.types.cjs +1 -1
  257. package/services/multimedia/multimedia.types.d.cts +1 -1
  258. package/services/multimedia/multimedia.types.d.ts +1 -1
  259. package/services/multimedia/multimedia.types.js +1 -1
  260. package/services/product/index.cjs +1 -1
  261. package/services/product/index.d.cts +1 -1
  262. package/services/product/index.d.ts +1 -1
  263. package/services/product/index.js +1 -1
  264. package/services/product/product.service.cjs +1 -1
  265. package/services/product/product.service.d.cts +1 -1
  266. package/services/product/product.service.d.ts +1 -1
  267. package/services/product/product.service.js +1 -1
  268. package/services/product/product.types.cjs +1 -1
  269. package/services/product/product.types.d.cts +1 -1
  270. package/services/product/product.types.d.ts +1 -1
  271. package/services/product/product.types.js +1 -1
  272. package/services/request.provider.cjs +1 -1
  273. package/services/request.provider.d.cts +1 -1
  274. package/services/request.provider.d.ts +1 -1
  275. package/services/request.provider.js +1 -1
  276. package/services/session.service.cjs +1 -1
  277. package/services/session.service.d.cts +1 -1
  278. package/services/session.service.d.ts +1 -1
  279. package/services/session.service.js +1 -1
  280. package/services/upload/index.cjs +1 -1
  281. package/services/upload/index.d.cts +1 -1
  282. package/services/upload/index.d.ts +1 -1
  283. package/services/upload/index.js +1 -1
  284. package/services/upload/upload.service.cjs +1 -1
  285. package/services/upload/upload.service.d.cts +1 -1
  286. package/services/upload/upload.service.d.ts +1 -1
  287. package/services/upload/upload.service.js +1 -1
  288. package/themes/custom/audi-dark.theme.cjs +7 -3
  289. package/themes/custom/audi-dark.theme.css +921 -0
  290. package/themes/custom/audi-dark.theme.d.cts +2 -2
  291. package/themes/custom/audi-dark.theme.d.ts +2 -2
  292. package/themes/custom/audi-dark.theme.js +6 -2
  293. package/themes/custom/audi.theme.cjs +1 -1
  294. package/themes/custom/audi.theme.css +774 -0
  295. package/themes/custom/audi.theme.d.cts +2 -2
  296. package/themes/custom/audi.theme.d.ts +2 -2
  297. package/themes/custom/audi.theme.js +1 -1
  298. package/themes/custom/australia.theme.cjs +1 -1
  299. package/themes/custom/australia.theme.css +383 -0
  300. package/themes/custom/australia.theme.d.cts +2 -2
  301. package/themes/custom/australia.theme.d.ts +2 -2
  302. package/themes/custom/australia.theme.js +1 -1
  303. package/themes/custom/cuernavaca.theme.cjs +1 -1
  304. package/themes/custom/cuernavaca.theme.css +193 -0
  305. package/themes/custom/cuernavaca.theme.d.cts +2 -2
  306. package/themes/custom/cuernavaca.theme.d.ts +2 -2
  307. package/themes/custom/cuernavaca.theme.js +1 -1
  308. package/themes/custom/cupra-diagonal.theme.cjs +3 -22
  309. package/themes/custom/cupra-diagonal.theme.css +1009 -0
  310. package/themes/custom/cupra-diagonal.theme.d.cts +2 -2
  311. package/themes/custom/cupra-diagonal.theme.d.ts +2 -2
  312. package/themes/custom/cupra-diagonal.theme.js +3 -22
  313. package/themes/custom/cupra-events.theme.cjs +1 -1
  314. package/themes/custom/cupra-events.theme.css +552 -0
  315. package/themes/custom/cupra-events.theme.d.cts +2 -2
  316. package/themes/custom/cupra-events.theme.d.ts +2 -2
  317. package/themes/custom/cupra-events.theme.js +1 -1
  318. package/themes/custom/cupra.theme.cjs +1 -1
  319. package/themes/custom/cupra.theme.css +144 -0
  320. package/themes/custom/cupra.theme.d.cts +2 -2
  321. package/themes/custom/cupra.theme.d.ts +2 -2
  322. package/themes/custom/cupra.theme.js +1 -1
  323. package/themes/custom/germany.theme.cjs +5 -5
  324. package/themes/custom/germany.theme.css +713 -0
  325. package/themes/custom/germany.theme.d.cts +2 -2
  326. package/themes/custom/germany.theme.d.ts +2 -2
  327. package/themes/custom/germany.theme.js +4 -4
  328. package/themes/custom/hyundai.theme.cjs +1 -1
  329. package/themes/custom/hyundai.theme.css +291 -0
  330. package/themes/custom/hyundai.theme.d.cts +2 -2
  331. package/themes/custom/hyundai.theme.d.ts +2 -2
  332. package/themes/custom/hyundai.theme.js +1 -1
  333. package/themes/custom/italy.theme.cjs +3 -23
  334. package/themes/custom/italy.theme.css +827 -0
  335. package/themes/custom/italy.theme.d.cts +2 -2
  336. package/themes/custom/italy.theme.d.ts +2 -2
  337. package/themes/custom/italy.theme.js +3 -23
  338. package/themes/custom/magimix.theme.cjs +1 -1
  339. package/themes/custom/magimix.theme.css +116 -0
  340. package/themes/custom/magimix.theme.d.cts +2 -2
  341. package/themes/custom/magimix.theme.d.ts +2 -2
  342. package/themes/custom/magimix.theme.js +1 -1
  343. package/themes/custom/onlive-ai.theme.cjs +1 -1
  344. package/themes/custom/onlive-ai.theme.css +71 -0
  345. package/themes/custom/onlive-ai.theme.d.cts +2 -2
  346. package/themes/custom/onlive-ai.theme.d.ts +2 -2
  347. package/themes/custom/onlive-ai.theme.js +1 -1
  348. package/themes/custom/onlive.theme.cjs +1 -1
  349. package/themes/custom/onlive.theme.css +30 -0
  350. package/themes/custom/onlive.theme.d.cts +2 -2
  351. package/themes/custom/onlive.theme.d.ts +2 -2
  352. package/themes/custom/onlive.theme.js +1 -1
  353. package/themes/custom/seat-cupra.theme.cjs +1 -1
  354. package/themes/custom/seat-cupra.theme.css +475 -0
  355. package/themes/custom/seat-cupra.theme.d.cts +2 -2
  356. package/themes/custom/seat-cupra.theme.d.ts +2 -2
  357. package/themes/custom/seat-cupra.theme.js +1 -1
  358. package/themes/dark.cjs +367 -369
  359. package/themes/dark.css +413 -0
  360. package/themes/dark.d.cts +1 -1
  361. package/themes/dark.d.ts +1 -1
  362. package/themes/dark.js +367 -369
  363. package/themes/light.cjs +365 -366
  364. package/themes/light.css +411 -0
  365. package/themes/light.d.cts +1 -1
  366. package/themes/light.d.ts +1 -1
  367. package/themes/light.js +365 -366
  368. package/types/deep-link.types.cjs +1 -1
  369. package/types/deep-link.types.d.cts +1 -1
  370. package/types/deep-link.types.d.ts +1 -1
  371. package/types/deep-link.types.js +1 -1
  372. package/types/globals.cjs +1 -1
  373. package/types/globals.d.cts +1 -1
  374. package/types/globals.d.ts +1 -1
  375. package/types/globals.js +1 -1
  376. package/types/tracking-options.cjs +1 -1
  377. package/types/tracking-options.d.cts +1 -1
  378. package/types/tracking-options.d.ts +1 -1
  379. package/types/tracking-options.js +1 -1
  380. package/utils/adopt-styles.cjs +1 -1
  381. package/utils/adopt-styles.d.cts +1 -1
  382. package/utils/adopt-styles.d.ts +1 -1
  383. package/utils/adopt-styles.js +1 -1
  384. package/utils/apply-optional-styles.cjs +28 -63
  385. package/utils/apply-optional-styles.d.cts +15 -15
  386. package/utils/apply-optional-styles.d.ts +15 -15
  387. package/utils/apply-optional-styles.js +28 -63
  388. package/utils/browser-preferences.cjs +1 -1
  389. package/utils/browser-preferences.d.cts +1 -1
  390. package/utils/browser-preferences.d.ts +1 -1
  391. package/utils/browser-preferences.js +1 -1
  392. package/utils/classify-media.cjs +1 -1
  393. package/utils/classify-media.d.cts +1 -1
  394. package/utils/classify-media.d.ts +1 -1
  395. package/utils/classify-media.js +1 -1
  396. package/utils/decorators.cjs +1 -1
  397. package/utils/decorators.d.cts +1 -1
  398. package/utils/decorators.d.ts +1 -1
  399. package/utils/decorators.js +1 -1
  400. package/utils/detected-lang.cjs +1 -1
  401. package/utils/detected-lang.d.cts +1 -1
  402. package/utils/detected-lang.d.ts +1 -1
  403. package/utils/detected-lang.js +1 -1
  404. package/utils/fullscreen.cjs +1 -1
  405. package/utils/fullscreen.d.cts +1 -1
  406. package/utils/fullscreen.d.ts +1 -1
  407. package/utils/fullscreen.js +1 -1
  408. package/utils/insert-script.cjs +1 -1
  409. package/utils/insert-script.d.cts +1 -1
  410. package/utils/insert-script.d.ts +1 -1
  411. package/utils/insert-script.js +1 -1
  412. package/utils/is-map-compatible.cjs +1 -1
  413. package/utils/is-map-compatible.d.cts +1 -1
  414. package/utils/is-map-compatible.d.ts +1 -1
  415. package/utils/is-map-compatible.js +1 -1
  416. package/utils/markdown.cjs +1 -1
  417. package/utils/markdown.d.cts +1 -1
  418. package/utils/markdown.d.ts +1 -1
  419. package/utils/markdown.js +1 -1
  420. package/utils/merge.cjs +1 -1
  421. package/utils/merge.d.cts +1 -1
  422. package/utils/merge.d.ts +1 -1
  423. package/utils/merge.js +1 -1
  424. package/utils/multiband-track-volume.cjs +1 -1
  425. package/utils/multiband-track-volume.d.cts +1 -1
  426. package/utils/multiband-track-volume.d.ts +1 -1
  427. package/utils/multiband-track-volume.js +1 -1
  428. package/utils/onlive-url-params.cjs +1 -1
  429. package/utils/onlive-url-params.d.cts +1 -1
  430. package/utils/onlive-url-params.d.ts +1 -1
  431. package/utils/onlive-url-params.js +1 -1
  432. package/utils/pretty-distance.cjs +1 -1
  433. package/utils/pretty-distance.d.cts +1 -1
  434. package/utils/pretty-distance.d.ts +1 -1
  435. package/utils/pretty-distance.js +1 -1
  436. package/utils/pretty-time.cjs +1 -1
  437. package/utils/pretty-time.d.cts +1 -1
  438. package/utils/pretty-time.d.ts +1 -1
  439. package/utils/pretty-time.js +1 -1
  440. package/utils/random-string.cjs +1 -1
  441. package/utils/random-string.d.cts +1 -1
  442. package/utils/random-string.d.ts +1 -1
  443. package/utils/random-string.js +1 -1
  444. package/utils/resource-type.cjs +1 -1
  445. package/utils/resource-type.d.cts +1 -1
  446. package/utils/resource-type.d.ts +1 -1
  447. package/utils/resource-type.js +1 -1
  448. package/utils/round-number.cjs +1 -1
  449. package/utils/round-number.d.cts +1 -1
  450. package/utils/round-number.d.ts +1 -1
  451. package/utils/round-number.js +1 -1
  452. package/utils/safe-html.cjs +1 -1
  453. package/utils/safe-html.d.cts +1 -1
  454. package/utils/safe-html.d.ts +1 -1
  455. package/utils/safe-html.js +1 -1
  456. package/utils/sanitize.cjs +1 -1
  457. package/utils/sanitize.d.cts +1 -1
  458. package/utils/sanitize.d.ts +1 -1
  459. package/utils/sanitize.js +1 -1
  460. package/utils/spread.cjs +1 -1
  461. package/utils/spread.d.cts +1 -1
  462. package/utils/spread.d.ts +1 -1
  463. package/utils/spread.js +1 -1
  464. package/utils/watch.cjs +1 -1
  465. package/utils/watch.d.cts +1 -1
  466. package/utils/watch.d.ts +1 -1
  467. package/utils/watch.js +1 -1
package/README.md CHANGED
@@ -1,154 +1,365 @@
1
- # Onlive Common 121
1
+ # @onlive.ai/common-121
2
2
 
3
- A shared utility package containing common services, utilities, types, and themes used across the Onlive 121 ecosystem. This package provides the foundational components for building interactive chat, flow, and video meeting applications.
3
+ > Shared foundation package for the Onlive 121 ecosystem services, utilities, UI components, and themes for building interactive chat, flow, and video meeting applications.
4
4
 
5
- ## 📦 Installation
5
+ [![npm version](https://img.shields.io/npm/v/@onlive.ai/flow-client)](https://www.npmjs.com/package/@onlive.ai/flow-client)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue?logo=typescript)](https://www.typescriptlang.org/)
7
+ [![Lit](https://img.shields.io/badge/Lit-3.x-purple?logo=lit)](https://lit.dev/)
8
+ [![React](https://img.shields.io/badge/React-19.x-61DAFB?logo=react)](https://react.dev/)
9
+
10
+ ## Installation
6
11
 
7
12
  ```bash
8
13
  npm install @onlive.ai/common-121
14
+ # or
15
+ pnpm add @onlive.ai/common-121
9
16
  ```
10
17
 
11
- ## 📂 Package Structure
18
+ **Prerequisites**: Node.js 18+, TypeScript 5.7+
12
19
 
13
- ### 🛠️ Services
20
+ ---
14
21
 
15
- - **AudioService**: Handles audio notifications and sound management for incoming calls and interactions
16
- - **FirebaseService**: Manages real-time Firebase connections for chat requests and agent presence
17
- - **LivekitService**: Provides WebRTC functionality for video/audio communication using LiveKit
22
+ ## Package Structure
18
23
 
19
- ### 🔧 Utilities
24
+ ```
25
+ common-121/
26
+ ├── services/ # Core application services
27
+ ├── utils/ # Framework-agnostic utility functions
28
+ ├── components/ # Lit web components (OSBAsset, OSBSideBar, OSBUpload)
29
+ ├── react/ # React wrapper components
30
+ ├── themes/ # CSS themes (light, dark, brand-specific)
31
+ └── types/ # Shared TypeScript type definitions
32
+ ```
20
33
 
21
- - **adopt-styles**: Utility for adopting CSS styles in web components
22
- - **browser-preferences**: Browser preference detection and management
23
- - **classify-media**: Media file classification and type detection
24
- - **decorators**: Custom element decorators and helpers
25
- - **detected-lang**: Language detection utilities
26
- - **fullscreen**: Fullscreen API helpers
27
- - **markdown**: Markdown parsing with sanitization
28
- - **merge**: Deep object merging utilities
29
- - **sanitize**: HTML content sanitization
30
- - **watch**: Reactive property watching utilities
34
+ ---
31
35
 
32
- ### 🎨 Themes
36
+ ## Services
33
37
 
34
- - **Light Theme**: Default light mode styling
35
- - **Dark Theme**: Dark mode color scheme
36
- - **Custom Themes**: Brand-specific themes (Audi, Cupra, Hyundai, Magimix, Onlive)
38
+ ### AudioService
37
39
 
38
- ### 📋 Types
40
+ Singleton service for managing audio notifications during calls and interactions. Preloads sounds on initialization.
39
41
 
40
- - **TrackingOptions**: Configuration types for analytics tracking
41
- - **WindowContext**: Global window context definitions
42
+ ```typescript
43
+ import { AudioService } from "@onlive.ai/common-121/services/audio.service.js";
44
+
45
+ const audio = AudioService.getInstance();
46
+
47
+ audio.playRinging(); // Play ringing tone (looped by default)
48
+ audio.playIncoming(); // Play incoming call tone (looped by default)
49
+ audio.playSound("ringing", false); // Play a named sound, no loop
50
+ audio.stopCurrentSound(); // Stop whatever is currently playing
51
+ ```
52
+
53
+ ### FirebaseApi
54
+
55
+ Low-level wrapper around the Firebase Realtime Database SDK. Provides a typed interface for reading, writing, and subscribing to database nodes.
56
+
57
+ ```typescript
58
+ import { FirebaseApi, type FirebaseConfig } from "@onlive.ai/common-121/services/firebase/firebase-api.js";
59
+
60
+ const config: FirebaseConfig = {
61
+ apiKey: "...",
62
+ authDomain: "...",
63
+ databaseURL: "...",
64
+ projectId: "...",
65
+ storageBucket: "...",
66
+ messagingSenderId: "...",
67
+ appId: "...",
68
+ };
69
+
70
+ const firebase = new FirebaseApi({ config });
71
+
72
+ // Get a reference and read data
73
+ const snapshot = await firebase.get(firebase.ref("rooms/room-id"));
74
+
75
+ // Subscribe to child additions
76
+ firebase.onChildAdded(firebase.ref("requests"), (key, data, snap) => {
77
+ console.log("New request:", key, data);
78
+ });
79
+ ```
42
80
 
43
- ## 🚀 Usage
81
+ ### ConversationService
44
82
 
45
- ### Basic Import
83
+ Manages the full lifecycle of a LiveKit-powered conversation room, including connection, messaging, typing indicators, media tracks, and agent interactions.
46
84
 
47
85
  ```typescript
48
- import { AudioService } from "@onlive.ai/common-121/services/audio.service";
49
- import { markdown } from "@onlive.ai/common-121/utils/markdown";
50
- import { merge } from "@onlive.ai/common-121/utils/merge";
86
+ import { ConversationServiceFactory } from "@onlive.ai/common-121/services/conversation/index.js";
87
+
88
+ const service = ConversationServiceFactory.create(options);
89
+
90
+ // Connect and join a room
91
+ await service.quickStart({ installationId: "...", language: "en" });
92
+
93
+ // Send a message
94
+ service.sendMessage("Hello!");
95
+
96
+ // Listen for incoming messages
97
+ service.onMessage((message) => {
98
+ console.log("Received:", message);
99
+ });
51
100
  ```
52
101
 
53
- ### Audio Service
102
+ ### SessionService
103
+
104
+ Manages persistent chat sessions via cookies, with support for role-based sessions (agent vs. guest).
54
105
 
55
106
  ```typescript
56
- import { AudioService } from "@onlive.ai/common-121/services/audio.service";
107
+ import { SessionService } from "@onlive.ai/common-121/services/session.service.js";
57
108
 
58
- const audioService = AudioService.getInstance();
109
+ if (!SessionService.hasSession()) {
110
+ const session = SessionService.getSession({ role: "guest" });
111
+ console.log("Session created:", session.externalId);
112
+ }
113
+ ```
59
114
 
60
- // Play incoming call sound
61
- audioService.playIncoming();
115
+ ### DeepLinkService
62
116
 
63
- // Stop current sound
64
- audioService.stopCurrentSound();
117
+ Parses and manages Onlive-specific deep link parameters (`ol*` prefix) from the current page URL.
118
+
119
+ ```typescript
120
+ import { DeepLinkService } from "@onlive.ai/common-121/services/deep-link.service.js";
121
+
122
+ const deepLink = new DeepLinkService();
123
+
124
+ if (deepLink.has("action")) {
125
+ const action = deepLink.get("action");
126
+ deepLink.clean(); // Remove ol* params from the URL
127
+ }
65
128
  ```
66
129
 
67
- ### Firebase Service
130
+ ---
131
+
132
+ ## Utilities
133
+
134
+ All utilities are tree-shakeable and framework-agnostic unless noted.
135
+
136
+ | Utility | Description |
137
+ |---|---|
138
+ | `adopt-styles` | Adopts CSS `CSSStyleSheet` into a shadow root |
139
+ | `apply-optional-styles` | Conditionally applies styles based on a predicate |
140
+ | `browser-preferences` | Detects browser preferences (reduced motion, color scheme) |
141
+ | `classify-media` | Classifies a URL or MIME type into a media category |
142
+ | `decorators` | Lit element decorators and helpers |
143
+ | `detected-lang` | Detects the user's preferred language from browser/DOM signals |
144
+ | `fullscreen` | Fullscreen API helpers with cross-browser support |
145
+ | `insert-script` | Dynamically inserts a `<script>` tag with dedup protection |
146
+ | `is-map-compatible` | Checks if a value is safe to use as a `Map` key |
147
+ | `markdown` | Parses Markdown to sanitized HTML, safe for Lit `unsafeHTML` |
148
+ | `merge` | Deep merges objects recursively (objects merged, arrays overwritten) |
149
+ | `multiband-track-volume` | Analyzes audio track volume across frequency bands |
150
+ | `onlive-url-params` | Reads and writes Onlive-specific URL query parameters |
151
+ | `pretty-distance` | Formats a geographic distance into a human-readable string |
152
+ | `pretty-time` | Formats a duration (seconds) into `mm:ss` or `hh:mm:ss` |
153
+ | `random-string` | Generates a cryptographically-random alphanumeric string |
154
+ | `resource-type` | Determines the resource type of a URL (image, video, document…) |
155
+ | `round-number` | Rounds a number to a given number of decimal places |
156
+ | `safe-html` | Tags template literal for safe HTML rendering in Lit |
157
+ | `sanitize` | Sanitizes an HTML string with DOMPurify |
158
+ | `spread` | Spreads an object as Lit element attributes/properties |
159
+ | `watch` | Observes reactive property changes in Lit elements |
160
+
161
+ ### Usage examples
68
162
 
69
163
  ```typescript
70
- import { FirebaseService } from "@onlive.ai/common-121/services/firebase/firebase.service";
164
+ import { markdown } from "@onlive.ai/common-121/utils/markdown.js";
165
+ import { merge } from "@onlive.ai/common-121/utils/merge.js";
166
+ import { sanitize } from "@onlive.ai/common-121/utils/sanitize.js";
167
+ import { randomString } from "@onlive.ai/common-121/utils/random-string.js";
71
168
 
72
- const firebaseService = new FirebaseService(firebaseConfig, organizationId);
169
+ // Parse Markdown safely (returns a Lit TemplateResult)
170
+ const content = markdown("# Hello **World**");
73
171
 
74
- // Listen for new requests
75
- firebaseService.onNewRequest((id, request) => {
76
- console.log("New request:", request);
77
- });
172
+ // Deep merge configuration objects
173
+ const config = merge(defaults, userConfig);
174
+
175
+ // Sanitize arbitrary HTML input
176
+ const clean = sanitize(userProvidedHtml);
177
+
178
+ // Generate a random ID
179
+ const id = randomString(16);
78
180
  ```
79
181
 
80
- ### LiveKit Service
182
+ ---
183
+
184
+ ## Components
185
+
186
+ ### Lit Web Components
81
187
 
82
188
  ```typescript
83
- import { LivekitService } from "@onlive.ai/common-121/services/livekit.service";
189
+ import { OSBAsset } from "@onlive.ai/common-121/components/asset/asset.js";
190
+ import { OSBSideBar } from "@onlive.ai/common-121/components/side-bar/side-bar.js";
191
+ import { OSBUpload } from "@onlive.ai/common-121/components/upload/upload.js";
192
+ ```
84
193
 
85
- const livekitService = new LivekitService();
194
+ Or import everything from the package root:
86
195
 
87
- // Join a room
88
- await livekitService.joinRoom(roomId, timezone, language);
196
+ ```typescript
197
+ import { OSBAsset, OSBSideBar, OSBUpload } from "@onlive.ai/common-121";
89
198
  ```
90
199
 
91
- ### Utilities
200
+ ### React Components
201
+
202
+ React wrappers are provided for all Lit components via `@lit/react`:
203
+
204
+ ```typescript
205
+ import { Asset } from "@onlive.ai/common-121/react/components/asset/Asset.js";
206
+ import { SideBar } from "@onlive.ai/common-121/react/components/side-bar/SideBar.js";
207
+ import { Upload } from "@onlive.ai/common-121/react/components/upload/Upload.js";
208
+
209
+ // Use as standard React components
210
+ function MyApp() {
211
+ return <Asset src="https://cdn.example.com/image.jpg" />;
212
+ }
213
+ ```
214
+
215
+ ---
216
+
217
+ ## Themes
218
+
219
+ Themes are CSS files applied directly to Lit components via `adoptedStyleSheets` or `<link>` tags. Two base themes and fourteen brand themes are included.
220
+
221
+ ### Base themes
92
222
 
93
223
  ```typescript
94
- import { markdown } from "@onlive.ai/common-121/utils/markdown";
95
- import { merge } from "@onlive.ai/common-121/utils/merge";
96
- import { sanitize } from "@onlive.ai/common-121/utils/sanitize";
224
+ import lightTheme from "@onlive.ai/common-121/themes/light.css" assert { type: "css" };
225
+ import darkTheme from "@onlive.ai/common-121/themes/dark.css" assert { type: "css" };
97
226
 
98
- // Parse markdown safely
99
- const htmlContent = markdown("# Hello **World**");
227
+ document.adoptedStyleSheets = [lightTheme];
228
+ ```
100
229
 
101
- // Merge objects deeply
102
- const merged = merge(defaultOptions, userOptions);
230
+ ### Brand themes
231
+
232
+ | Theme file | Brand |
233
+ |---|---|
234
+ | `themes/custom/onlive.theme.css` | Onlive (default brand) |
235
+ | `themes/custom/onlive-ai.theme.css` | Onlive AI |
236
+ | `themes/custom/audi.theme.css` | Audi |
237
+ | `themes/custom/audi-dark.theme.css` | Audi (dark variant) |
238
+ | `themes/custom/cupra.theme.css` | Cupra |
239
+ | `themes/custom/cupra-diagonal.theme.css` | Cupra Diagonal |
240
+ | `themes/custom/cupra-events.theme.css` | Cupra Events |
241
+ | `themes/custom/seat-cupra.theme.css` | SEAT/Cupra |
242
+ | `themes/custom/hyundai.theme.css` | Hyundai |
243
+ | `themes/custom/magimix.theme.css` | Magimix |
244
+ | `themes/custom/australia.theme.css` | Australia market |
245
+ | `themes/custom/cuernavaca.theme.css` | Cuernavaca market |
246
+ | `themes/custom/germany.theme.css` | Germany market |
247
+ | `themes/custom/italy.theme.css` | Italy market |
248
+
249
+ ---
250
+
251
+ ## Types
103
252
 
104
- // Sanitize HTML content
105
- const cleanHtml = sanitize(userInput);
253
+ ```typescript
254
+ import type { TrackingOptions } from "@onlive.ai/common-121/types/tracking-options.js";
255
+ import type { DeepLinkParams } from "@onlive.ai/common-121/types/deep-link.types.js";
106
256
  ```
107
257
 
108
- ### Themes
258
+ **`TrackingOptions<T>`** — Configuration for the analytics tracking layer:
259
+
260
+ | Property | Type | Description |
261
+ |---|---|---|
262
+ | `enabled` | `boolean` | Enable or disable tracking |
263
+ | `apiUrl` | `string` | Base URL for the tracking API |
264
+ | `data` | `Partial<T>` | Additional event payload data |
265
+ | `removeExtraneousValues` | `boolean` | Strip non-essential fields from events |
266
+ | `allowBotTraffic` | `boolean` | Include bot-originated traffic in tracking |
267
+ | `adapters` | `string[]` | List of tracking adapter identifiers |
268
+ | `emitters.windowEvent` | `boolean` | Emit as `window` custom events |
269
+ | `emitters.dataLayer` | `boolean` | Push to GTM `dataLayer` |
270
+ | `emitters.windowPostMessage` | `boolean` | Emit via `window.postMessage` |
271
+
272
+ ---
273
+
274
+ ## Testing & Mocks
275
+
276
+ This package exports a full mock implementation of `ConversationService` for use in unit tests, Storybook stories, and development environments — no real LiveKit or Firebase connection required.
109
277
 
110
278
  ```typescript
111
- import { styles as lightTheme } from '@onlive.ai/common-121/themes/light';
112
- import { styles as darkTheme } from '@onlive.ai/common-121/themes/dark';
279
+ import {
280
+ MockConversationService,
281
+ createMockConversationService,
282
+ createConversationFixture,
283
+ createMessageFixture,
284
+ createRoomWithAgent,
285
+ generateMockToken,
286
+ } from "@onlive.ai/common-121";
287
+
288
+ const mockService = createMockConversationService();
289
+
290
+ // Seed a fixture room with an agent
291
+ const room = createRoomWithAgent();
292
+
293
+ // Generate message fixtures
294
+ const messages = [
295
+ createMessageFixture({ content: "Hello from agent" }),
296
+ createMessageFixture({ content: "How can I help?" }),
297
+ ];
298
+ ```
113
299
 
114
- // Apply theme to a Lit component
115
- static styles = [lightTheme];
300
+ For Storybook, use the dedicated helpers:
301
+
302
+ ```typescript
303
+ import {
304
+ getStorybookMockService,
305
+ destroyStorybookMockService,
306
+ } from "@onlive.ai/common-121";
116
307
  ```
117
308
 
118
- ## 🏗️ Architecture
309
+ ---
310
+
311
+ ## Architecture
119
312
 
120
- This package is designed to be used as a foundation for the Onlive 121 ecosystem, providing:
313
+ - **ESM + CJS**: Dual output for Node.js and browser environments
314
+ - **Modular imports**: Every service, utility, and component is independently importable — no side effects from unused exports
315
+ - **Full type safety**: TypeScript `.d.ts` declarations shipped alongside every module
316
+ - **Build-time minification**: All outputs are minified (whitespace, identifiers, syntax) via `tsup` + `esbuild`
317
+ - **Versioned banner**: Each built file includes a `©` copyright banner with the package version
121
318
 
122
- - **Modular Design**: Each service and utility can be imported independently
123
- - **Type Safety**: Full TypeScript support with comprehensive type definitions
124
- - **Performance**: Optimized for production use with efficient caching and lazy loading
125
- - **Extensibility**: Easy to extend and customize for specific use cases
319
+ ---
126
320
 
127
- ## 🔗 Dependencies
321
+ ## Dependencies
128
322
 
129
- This package integrates with several key technologies:
323
+ | Package | Version | Purpose |
324
+ |---|---|---|
325
+ | `lit` | `^3.3` | Web components framework |
326
+ | `@lit/react` | `^1.0` | React wrappers for Lit elements |
327
+ | `livekit-client` | `^2.17` | WebRTC infrastructure for real-time audio/video |
328
+ | `@livekit/components-core` | `^0.12` | LiveKit component primitives |
329
+ | `firebase` | `^11.10` | Firebase Realtime Database |
330
+ | `rxjs` | `^7.8` | Reactive programming utilities |
331
+ | `marked` | `^15.0` | Markdown parsing |
332
+ | `dompurify` | `^3.3` | HTML sanitization |
333
+ | `video.js` | `^8.23` | Video playback |
334
+ | `@onlive.ai/tracker` | `^1.0` | Onlive analytics tracking |
335
+ | `@onlive.ai/ui` | `^1.9` | Onlive UI design system |
130
336
 
131
- - **Firebase**: Real-time database and authentication
132
- - **LiveKit**: WebRTC infrastructure for video/audio
133
- - **Lit**: Web components framework
134
- - **RxJS**: Reactive programming utilities
135
- - **Marked**: Markdown parsing
136
- - **DOMPurify**: HTML sanitization
337
+ **Peer dependencies**: `react ^19.1`
137
338
 
138
- ## 📱 Compatibility
339
+ ---
139
340
 
140
- - **Frameworks**: Lit, Web Components
141
- - **Browsers**: Modern browsers with ES2020+ support
142
- - **Node.js**: 18.x or higher
341
+ ## Compatibility
342
+
343
+ - **Browsers**: Modern browsers with ES2020+ support (Chrome 90+, Firefox 88+, Safari 14+)
344
+ - **Node.js**: 18.x or higher (for build tooling only — not required at runtime)
143
345
  - **TypeScript**: 5.7.x
346
+ - **React**: 19.x (peer dependency, optional — only required when using React components)
347
+ - **Module format**: ESM primary (`import`), CJS secondary (`require`)
348
+
349
+ ---
350
+
351
+ ## Related Packages
144
352
 
145
- ## 🤝 Related Packages
353
+ | Package | Description |
354
+ |---|---|
355
+ | [`@onlive.ai/chat`](../chat) | Chat UI components and messaging |
356
+ | [`@onlive.ai/flow`](../flow) | Interactive flow builder components |
357
+ | [`@onlive.ai/meet`](../meet) | Video conferencing components |
358
+ | [`@onlive.ai/flow-client`](../flow-client) | Flow client SDK |
359
+ | [`@onlive.ai/calendar`](../calendar) | Calendar integration components |
146
360
 
147
- - [`@onlive.ai/chat`](../chat): Chat component and messaging functionality
148
- - [`@onlive.ai/flow`](../flow): Interactive flow components
149
- - [`@onlive.ai/meet`](../meet): Video conferencing components
150
- - [`@onlive.ai/flow-client`](../flow-client): Flow client SDK
361
+ ---
151
362
 
152
- ## 📄 License
363
+ ## License
153
364
 
154
365
  This package is part of the Onlive 121 ecosystem and follows the project's licensing terms.
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import * as lit from 'lit';
3
3
 
4
4
  declare const styles: lit.CSSResult;
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import * as lit from 'lit';
3
3
 
4
4
  declare const styles: lit.CSSResult;
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import * as lit from 'lit';
3
3
 
4
4
  declare const styles: lit.CSSResult;
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import * as lit from 'lit';
3
3
 
4
4
  declare const styles: lit.CSSResult;
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import * as lit from 'lit';
3
3
 
4
4
  declare const styles: lit.CSSResult;
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import * as lit from 'lit';
3
3
 
4
4
  declare const styles: lit.CSSResult;
@@ -1,2 +1,2 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  var w=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var I=(s,a,t,i)=>{for(var n=i>1?void 0:i?x(a,t):a,d=s.length-1,l;d>=0;d--)(l=s[d])&&(n=(i?l(a,t,n):l(n))||n);return i&&n&&w(a,t,n),n};function A(s={}){let{width:a=640,height:t=480,fps:i=30,backgroundColor:n="#1a1a2e",foregroundColor:d="#4361ee",label:l="Mock Video",animation:S="wave"}=s,r=document.createElement("canvas");r.width=a,r.height=t;let e=r.getContext("2d"),m,h=Date.now(),v={wave:u=>{e.fillStyle=n,e.fillRect(0,0,a,t),e.strokeStyle=d,e.lineWidth=3,e.beginPath();for(let o=0;o<a;o++){let c=t/2+Math.sin(o/a*4*Math.PI+u*.002)*(t/4);o===0?e.moveTo(o,c):e.lineTo(o,c)}e.stroke()},pulse:u=>{e.fillStyle=n,e.fillRect(0,0,a,t);let o=Math.sin(u*.003)*.3+.7,c=Math.min(a,t)*.3*o;e.beginPath(),e.arc(a/2,t/2,c,0,Math.PI*2),e.fillStyle=d,e.fill()},bars:u=>{e.fillStyle=n,e.fillRect(0,0,a,t);let o=20,c=a/o,f=t*.7;e.fillStyle=d;for(let g=0;g<o;g++){let k=Math.abs(Math.sin(g/o*Math.PI*2+u*.004))*f,T=g*c,C=t-k;e.fillRect(T+2,C,c-4,k)}},avatar:u=>{e.fillStyle=n,e.fillRect(0,0,a,t);let o=a/2,c=t/2-20,f=Math.min(a,t)*.15;e.beginPath(),e.arc(o,c,f,0,Math.PI*2),e.fillStyle=d,e.fill(),e.beginPath(),e.ellipse(o,c+f*2.2,f*1.5,f,0,Math.PI,0),e.fill(),Math.sin(u*.01)>0&&(e.beginPath(),e.arc(o,c+f*3,5+Math.sin(u*.02)*3,0,Math.PI*2),e.fillStyle="#22c55e",e.fill())},none:()=>{e.fillStyle=n,e.fillRect(0,0,a,t)}},y=()=>{e.fillStyle="rgba(255, 255, 255, 0.8)",e.font=`${Math.floor(t*.04)}px system-ui, sans-serif`,e.textAlign="center",e.fillText(l,a/2,t-20)},b=()=>{let u=Date.now()-h;v[S](u),y(),m=requestAnimationFrame(b)};b();let p=r.captureStream(i),M=p.getVideoTracks()[0];return{track:M,stream:p,cleanup:()=>{cancelAnimationFrame(m),M.stop()}}}function E(s={}){let{frequency:a=440,volume:t=.1,waveType:i="sine",addVariation:n=!0,enabled:d=!1}=s,l=new AudioContext,S=l.createMediaStreamDestination(),r=l.createOscillator();r.type=i,r.frequency.value=a;let e=l.createGain();e.gain.value=d?t:0;let m=null,h=null;n&&(m=l.createOscillator(),m.frequency.value=.5,h=l.createGain(),h.gain.value=10,m.connect(h),h.connect(r.frequency),m.start()),r.connect(e),e.connect(S),r.start();let v=S.stream,y=v.getAudioTracks()[0];return{track:y,stream:v,setVolume:b=>{e.gain.value=Math.max(0,Math.min(1,b))},setEnabled:b=>{e.gain.value=b?t:0},cleanup:()=>{r.stop(),m?.stop(),l.close(),y.stop()}}}function P(s,a){let t=A(s),i=E(a),n=new MediaStream([t.track,i.track]);return{videoTrack:t.track,audioTrack:i.track,combinedStream:n,setAudioVolume:i.setVolume,setAudioEnabled:i.setEnabled,cleanup:()=>{t.cleanup(),i.cleanup()}}}var V={localCamera:{video:{width:640,height:480,animation:"avatar",label:"You",foregroundColor:"#4361ee"},audio:{enabled:!1}},agentCamera:{video:{width:640,height:480,animation:"avatar",label:"AI Agent",foregroundColor:"#22c55e",backgroundColor:"#0f172a"},audio:{enabled:!1,frequency:300}},screenShare:{video:{width:1920,height:1080,animation:"bars",label:"Screen Share",backgroundColor:"#0a0a0a",foregroundColor:"#f59e0b"},audio:{enabled:!1}},voiceOnly:{video:{width:320,height:240,animation:"wave",label:"Voice Call"},audio:{enabled:!1,volume:.05}}};function q(s){let a=V[s];return P(a.video,a.audio)}export{I as a,A as b,E as c,P as d,V as e,q as f};
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  "use strict";var f=Object.create;var r=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var b=(t,a)=>{for(var e in a)r(t,e,{get:a[e],enumerable:!0})},v=(t,a,e,l)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of y(a))!w.call(t,o)&&o!==e&&r(t,o,{get:()=>a[o],enumerable:!(l=x(a,o))||l.enumerable});return t};var m=(t,a,e)=>(e=t!=null?f($(t)):{},v(a||!t||!t.__esModule?r(e,"default",{value:t,enumerable:!0}):e,t)),z=t=>v(r({},"__esModule",{value:!0}),t);var M={};b(M,{AssetModalPortal:()=>p});module.exports=z(M);var p=class{constructor(a,e){this.asset=a,this.onClose=e}getMultimediaSubtype(a){let e=a.format||"";return e.startsWith("video/")?"video":e.startsWith("image/")?"image":e.includes("presentation")||e.includes("pdf")||e.includes("powerpoint")||e.includes("slides")||e.includes("application/vnd.ms-powerpoint")||e.includes("application/vnd.openxmlformats-officedocument.presentationml")||a.slides&&a.slides.length>0?"presentation":a.duration||a.vodUrl?"video":"image"}formatDuration(a){let e=Math.floor(a/60),l=Math.floor(a%60);return`${e}:${l.toString().padStart(2,"0")}`}async open(){await import("@onlive.ai/ui/dist/components/dialog/dialog.js"),await import("@onlive.ai/ui/dist/components/icon-button/icon-button.js"),await import("@onlive.ai/ui/dist/components/button/button.js"),await import("@onlive.ai/ui/dist/components/icon/icon.js");let a=this.asset;this.getMultimediaSubtype(a)==="presentation"&&(a.slides?.length??0)>0&&await Promise.all([import("@onlive.ai/ui/dist/components/carousel/carousel.js"),import("@onlive.ai/ui/dist/components/carousel-item/carousel-item.js")]),this.injectStyles(),this.createDialog(),this.dialog?.show()}close(){this.dialog?.hide(),setTimeout(()=>{this.removeDialog()},300)}createDialog(){if(this.dialog||!this.asset)return;let a=this.createDialogHTML(),e=document.createElement("div");e.innerHTML=a,this.dialog=e.firstElementChild,this.dialog&&(document.body.appendChild(this.dialog),this.attachEventListeners())}removeDialog(){this.dialog&&(this.dialog.parentNode&&this.dialog.parentNode.removeChild(this.dialog),this.dialog=void 0)}injectStyles(){if(document.getElementById("asset-modal-styles"))return;let a=document.createElement("style");a.id="asset-modal-styles",a.textContent=this.getModalStyles(),document.head.appendChild(a)}getModalStyles(){return`
3
3
 
4
4
  ol-dialog::part(base){
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import { IAsset } from './asset.types.cjs';
3
3
 
4
4
  declare class AssetModalPortal {
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import { IAsset } from './asset.types.js';
3
3
 
4
4
  declare class AssetModalPortal {
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  var c=class{constructor(e,a){this.asset=e,this.onClose=a}getMultimediaSubtype(e){let a=e.format||"";return a.startsWith("video/")?"video":a.startsWith("image/")?"image":a.includes("presentation")||a.includes("pdf")||a.includes("powerpoint")||a.includes("slides")||a.includes("application/vnd.ms-powerpoint")||a.includes("application/vnd.openxmlformats-officedocument.presentationml")||e.slides&&e.slides.length>0?"presentation":e.duration||e.vodUrl?"video":"image"}formatDuration(e){let a=Math.floor(e/60),l=Math.floor(e%60);return`${a}:${l.toString().padStart(2,"0")}`}async open(){await import("@onlive.ai/ui/dist/components/dialog/dialog.js"),await import("@onlive.ai/ui/dist/components/icon-button/icon-button.js"),await import("@onlive.ai/ui/dist/components/button/button.js"),await import("@onlive.ai/ui/dist/components/icon/icon.js");let e=this.asset;this.getMultimediaSubtype(e)==="presentation"&&(e.slides?.length??0)>0&&await Promise.all([import("@onlive.ai/ui/dist/components/carousel/carousel.js"),import("@onlive.ai/ui/dist/components/carousel-item/carousel-item.js")]),this.injectStyles(),this.createDialog(),this.dialog?.show()}close(){this.dialog?.hide(),setTimeout(()=>{this.removeDialog()},300)}createDialog(){if(this.dialog||!this.asset)return;let e=this.createDialogHTML(),a=document.createElement("div");a.innerHTML=e,this.dialog=a.firstElementChild,this.dialog&&(document.body.appendChild(this.dialog),this.attachEventListeners())}removeDialog(){this.dialog&&(this.dialog.parentNode&&this.dialog.parentNode.removeChild(this.dialog),this.dialog=void 0)}injectStyles(){if(document.getElementById("asset-modal-styles"))return;let e=document.createElement("style");e.id="asset-modal-styles",e.textContent=this.getModalStyles(),document.head.appendChild(e)}getModalStyles(){return`
3
3
 
4
4
  ol-dialog::part(base){
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  "use strict";var K=Object.create;var w=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty;var ee=(i,e)=>{for(var t in e)w(i,t,{get:e[t],enumerable:!0})},$=(i,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of X(e))!Z.call(i,s)&&s!==t&&w(i,s,{get:()=>e[s],enumerable:!(o=I(e,s))||o.enumerable});return i};var u=(i,e,t)=>(t=i!=null?K(W(i)):{},$(e||!i||!i.__esModule?w(t,"default",{value:i,enumerable:!0}):t,i)),te=i=>$(w({},"__esModule",{value:!0}),i),c=(i,e,t,o)=>{for(var s=o>1?void 0:o?I(e,t):e,l=i.length-1,a;l>=0;l--)(a=i[l])&&(s=(o?a(e,t,s):a(s))||s);return o&&s&&w(e,t,s),s};var ae={};ee(ae,{OSBAsset:()=>v});module.exports=te(ae);var g=require("lit"),p=require("lit/decorators.js"),G=require("lit/directives/class-map.js");var oe=(i,e)=>(customElements.get(i)?console.debug(`Custom element <${i}> is already defined, skipping definition of ${e.name}.`):window.customElements.define(i,e),e),se=(i,e)=>{let{kind:t,elements:o}=e;return{kind:t,elements:o,finisher(s){customElements.get(i)||window.customElements.define(i,s)}}},A=i=>e=>typeof e=="function"?oe(i,e):se(i,e);var k=class i{constructor(e){this.config=e}static initialize(e){return new i(e)}getBaseUrl(){return`${this.config.baseUrl}`}getHeaders(){return{"Content-Type":"application/json"}}async makeRequest(e,t={}){let o=`${this.getBaseUrl()}${e}`,s=await fetch(o,{...t,headers:{...this.getHeaders(),...t.headers}});if(!s.ok)throw new Error(`FAQs API error: ${s.status} ${s.statusText}`);return s.json()}async getSettingsByOrganization(e,t){try{let o=new URLSearchParams;t&&o.append("userGroupId",t);let s=o.toString(),l=`${this.getBaseUrl()}/settings/organization/${e}${s?`?${s}`:""}`,a=await fetch(l,{method:"GET",headers:this.getHeaders(),credentials:"include"});if(a.status===404)return null;if(!a.ok)throw new Error(`Failed to fetch settings: ${a.statusText}`);return await a.json()}catch(o){return console.error("Error fetching settings:",o),null}}async getFaqs(e={}){let t=new URLSearchParams;if(e.search&&t.append("search",e.search),e.organizationId&&t.append("organizationId",e.organizationId),e.groupId&&t.append("groupId",e.groupId),e.isActive!==void 0&&t.append("isActive",e.isActive.toString()),e.page&&t.append("page",e.page.toString()),e.limit&&t.append("limit",e.limit.toString()),e.sortBy&&t.append("sortBy",e.sortBy),e.sortOrder&&t.append("sortOrder",e.sortOrder),e.extraFilters){for(let[l,a]of Object.entries(e.extraFilters))if(a&&(Array.isArray(a)?a.length>0:a.toString().trim()!=="")){let d=Array.isArray(a)?a.join(","):a.toString();t.append(`extra_${l}`,d)}}let o=t.toString(),s=`/faqs${o?`?${o}`:""}`;return this.makeRequest(s)}async getFaqById(e){return this.makeRequest(`/faqs/${e}`,{})}};var b=async(i,e)=>{let t=await fetch(i,e);if(!t.ok){let o=await t.json().catch(()=>({}));throw new Error(JSON.stringify({status:t.status,statusText:t.statusText,...o}))}return t&&t.json()};var S=class i{constructor(e){this.config=e,this.enableUpload=e.enableUpload||!1}static getInstance(e){if(!i.instance&&e&&(i.instance=new i(e)),!i.instance)throw new Error("FileService must be initialized with config first");return i.instance}static initialize(e){return i.instance=new i(e),i.instance}async uploadFile(e,t={}){try{let o=await this.requestSignedUrl({filename:e.name,description:t.description,loadDirection:"up",bucketType:t.bucketType||"conversations",path:t.path||".temp",mimeType:e.type});return await this.uploadToSignedUrl(o.data.signedUrlData.signedUrl,e),{success:!0,id:o.data.file.id,name:o.data.file.name,url:o.data.file.url,type:o.data.file.type}}catch(o){return console.error("Error uploading file:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error"}}}async requestSignedUrl(e){let t=`${this.config.baseUrl}/files/upload-url`;return this.makeRequest(t,{method:"POST",body:JSON.stringify(e)})}async uploadToSignedUrl(e,t){let o=await fetch(e,{method:"PUT",body:t,headers:{"Content-Type":t.type}});if(!o.ok){let s=await o.text().catch(()=>"No response");throw new Error(`Upload failed with status: ${o.status}. Response: ${s}`)}}async uploadFileWithRetry(e,t={}){let o=t.maxRetries||3,s=null;for(let l=1;l<=o;l++)try{let a=await this.uploadFile(e,t);if(a.success)return a;throw new Error(a.error||"Upload failed")}catch(a){if(s=a instanceof Error?a:new Error("Unknown error"),l===o)break;let d=2**l*1e3;await new Promise(r=>setTimeout(r,d))}return{success:!1,error:s?.message||"Upload failed after retries"}}async getFileById(e){let t=`${this.config.baseUrl}/files/${e}`,o=await this.makeRequest(t);if(!o.success)throw new Error("Failed to get file");return o.data}async makeRequest(e,t){let o={"Content-Type":"application/json"};return this.config.organizationId&&(o["X-Onlive-Organization-Id"]=this.config.organizationId),t?.headers&&Object.assign(o,t.headers),b(e,{...t,headers:o})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var z=class i{constructor(e){this.config=e}static getInstance(e){if(!i.instance&&e&&(i.instance=new i(e)),!i.instance)throw new Error("MultimediaService must be initialized with config first");return i.instance}static initialize(e){return i.instance=new i(e),i.instance}async getImages(e={}){let t=new URLSearchParams({type:"image",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getVideos(e={}){let t=new URLSearchParams({type:"video",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getPresentations(e={}){let t=new URLSearchParams({type:"presentation",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getAllMultimedia(e={}){let[t,o,s]=await Promise.all([this.getImages(e),this.getVideos(e),this.getPresentations(e)]);return{images:t,videos:o,presentations:s}}async getMultimediaByToken(e){let t=`${this.config.baseUrl}/multimedia/secure-token/${e}`;return this.makeRequest(t,!1)}async searchMultimedia(e,t){let o={search:e,page:1,limit:50,includeSecureToken:!0};if(t)return this.getMultimediaByType(t,o);let[s,l,a]=await Promise.all([this.getImages(o),this.getVideos(o),this.getPresentations(o)]),d=[...s.items,...l.items,...a.items];return{items:d,total:d.length,count:d.length,currentPage:1,totalPages:1}}async getMultimediaByType(e,t){switch(e){case"image":return this.getImages(t);case"video":return this.getVideos(t);case"presentation":return this.getPresentations(t);default:throw new Error(`Invalid multimedia type: ${e}`)}}appendExtraFilters(e,t){if(t){for(let[o,s]of Object.entries(t))if(s&&(Array.isArray(s)?s.length>0:s.toString().trim()!=="")){let l=Array.isArray(s)?s.join(","):s.toString();e.append(`extra_${o}`,l)}}}async makeRequest(e,t=!0){let o={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return b(e,{method:"GET",headers:o,credentials:t?"include":void 0})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var x=class i{constructor(e){this.config=e}static getInstance(e){if(!i.instance&&e&&(i.instance=new i(e)),!i.instance)throw new Error("ProductService must be initialized with config first");return i.instance}static initialize(e){return i.instance=new i(e),i.instance}async getProducts(e={}){let t=new URLSearchParams({...e.title&&{title:e.title},...e.search&&{search:e.search},...e.category&&{category:e.category},...e.tags&&{tags:e.tags.join(",")},...e.sortBy&&{sortBy:e.sortBy},...e.sortOrder&&{sortOrder:e.sortOrder},...e.minPrice&&{minPrice:e.minPrice.toString()},...e.maxPrice&&{maxPrice:e.maxPrice.toString()},...e.inStock!==void 0&&{inStock:e.inStock.toString()},...e.offset&&{offset:e.offset.toString()},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});e.extraFields&&Object.keys(e.extraFields).length>0&&t.append("extraFields",JSON.stringify(e.extraFields));let o=`${this.config.baseUrl}/products?${t}`;return this.makeRequest(o,!0)}async getProductByToken(e){let t=`${this.config.baseUrl}/products/secure-token/${e}`;return this.makeRequest(t)}async searchProducts(e,t={}){return this.getProducts({...t,search:e})}async makeRequest(e,t=!1){let o={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return b(e,{method:"GET",headers:o,credentials:t?"include":"same-origin"})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var P=class{constructor(e){e?.multimediaService&&(this.multimediaService=z.initialize(e.multimediaService)),e?.faqsService&&(this.faqsService=k.initialize(e.faqsService)),e?.productService&&(this.productService=x.initialize(e.productService)),e?.fileService&&(this.fileService=S.initialize(e.fileService))}async loadAsset(e,t){switch(e){case"multimedia":return this.loadMultimediaAsset(t);case"product":return this.loadProductAsset(t);case"faq":return this.loadFaqAsset(t);case"file":return this.loadFileAsset(t);default:throw new Error(`Unsupported asset type: ${e}`)}}async loadMultimediaAsset(e){if(!this.multimediaService)throw new Error("MultimediaService not configured");let t=await this.multimediaService.getMultimediaByToken(e);if(!t)throw new Error("Multimedia not found");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:t.animatedCoverUrl||t.url,type:"multimedia",externalId:t.id,format:t.format,size:t.size||void 0,duration:t.duration||void 0,vodUrl:t.vodUrl||void 0,slides:t.slides||[],labels:t.labels,animatedCoverUrl:t.animatedCoverUrl||void 0,metadata:{organizationId:t.organizationId,status:t.status,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadProductAsset(e){if(!this.productService)throw new Error("MultimediaService not configured");let t=await this.productService.getProductByToken(e);if(!t)throw new Error("Product not found");return{id:t.id,name:t.name,description:t.description,url:t.url,thumbnail:t.images?.[0],type:"product",externalId:t.externalId,price:t.price,currency:t.currency,category:t.category,tags:t.tags,images:t.images,variants:t.variants?.map(o=>({id:o.id,externalId:o.externalId,price:o.price,currency:o.currency,images:o.images})),options:t.options,metadata:{providerType:t.providerType,providerId:t.providerId,discountType:t.discountType,discount:t.discount,stock:t.stock,broken:t.broken}}}async loadFaqAsset(e){if(!this.faqsService)throw new Error("FaqsService not configured");let t=await this.faqsService.getFaqById(e);return{id:t.id,name:t.question,description:t.answer,url:`#faq-${t.id}`,type:"faq",externalId:t.id,question:t.question,answer:t.answer,priority:t.priority,isActive:t.isActive,metadata:{organizationId:t.organizationId,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadFileAsset(e){if(!this.fileService)throw new Error("FileService not configured");let t=await this.fileService.getFileById(e),o=t.type||"",s=o.startsWith("video/"),l=o.startsWith("image/");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:l?t.url:void 0,type:"file",externalId:t.id,format:o,size:t.metadata?.size,duration:void 0,vodUrl:s?t.url:void 0,labels:[],animatedCoverUrl:s?t.url:void 0,metadata:{path:t.metadata?.path,bucketType:t.metadata?.bucketType,loadDirection:t.metadata?.loadDirection,createdAt:t.createdAt,updatedAt:t.updatedAt}}}};var n=require("lit"),J=require("lit/directives/class-map.js"),y=require("lit/directives/if-defined.js"),f=require("lit/directives/when.js");var L=require("lit/directives/unsafe-html.js");var E=u(require("dompurify"),1),ie={ALLOWED_TAGS:["p","br","span","b","strong","i","em","u","s","del","ul","ol","li","code","pre","a","h1","h2","h3","h4","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","target","rel","title","aria-label","role","colspan","rowspan"],FORCE_HTTPS:!0,ALLOW_DATA_ATTR:!1};E.default.addHook("afterSanitizeAttributes",i=>{"target"in i&&i.target==="_blank"&&i.setAttribute("rel","noopener noreferrer")});var U=(i,e=ie)=>E.default.sanitize(i,e);function V(i=""){return(0,L.unsafeHTML)(ne(i))}function ne(i=""){return U(i,{ADD_ATTR:["target","rel"],ADD_TAGS:["ol-"],CUSTOM_ELEMENT_HANDLING:{tagNameCheck:/^ol-/,attributeNameCheck:null,allowCustomizedBuiltInElements:!0}})}var Te=require("@onlive.ai/ui/dist/components/button/button.js"),Fe=require("@onlive.ai/ui/dist/components/icon/icon.js"),_=require("lit"),T=require("lit/decorators.js"),Y=require("lit/directives/repeat.js"),H=u(require("video.js"),1);var M=require("lit"),D=u(require("video.js/dist/video-js.min.css?inline"),1),B=M.css`
3
3
  ${(0,M.unsafeCSS)(D.default)}
4
4
  .och__player {
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import * as lit from 'lit';
3
3
  import { LitElement, TemplateResult } from 'lit';
4
4
  import { AssetType, AssetConfig } from './asset.types.cjs';
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  import * as lit from 'lit';
3
3
  import { LitElement, TemplateResult } from 'lit';
4
4
  import { AssetType, AssetConfig } from './asset.types.js';
@@ -1,4 +1,4 @@
1
- /*! @onlive.ai/common-121 v0.2.187 | © 2026 Onlive.ai */
1
+ /*! @onlive.ai/common-121 v0.2.190 | © 2026 Onlive.ai */
2
2
  var U=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var c=(n,e,t,o)=>{for(var s=o>1?void 0:o?L(e,t):e,l=n.length-1,a;l>=0;l--)(a=n[l])&&(s=(o?a(e,t,s):a(s))||s);return o&&s&&U(e,t,s),s};import{html as z,LitElement as te}from"lit";import{property as T,state as h}from"lit/decorators.js";import{classMap as oe}from"lit/directives/class-map.js";var V=(n,e)=>(customElements.get(n)?console.debug(`Custom element <${n}> is already defined, skipping definition of ${e.name}.`):window.customElements.define(n,e),e),D=(n,e)=>{let{kind:t,elements:o}=e;return{kind:t,elements:o,finisher(s){customElements.get(n)||window.customElements.define(n,s)}}},y=n=>e=>typeof e=="function"?V(n,e):D(n,e);var w=class n{constructor(e){this.config=e}static initialize(e){return new n(e)}getBaseUrl(){return`${this.config.baseUrl}`}getHeaders(){return{"Content-Type":"application/json"}}async makeRequest(e,t={}){let o=`${this.getBaseUrl()}${e}`,s=await fetch(o,{...t,headers:{...this.getHeaders(),...t.headers}});if(!s.ok)throw new Error(`FAQs API error: ${s.status} ${s.statusText}`);return s.json()}async getSettingsByOrganization(e,t){try{let o=new URLSearchParams;t&&o.append("userGroupId",t);let s=o.toString(),l=`${this.getBaseUrl()}/settings/organization/${e}${s?`?${s}`:""}`,a=await fetch(l,{method:"GET",headers:this.getHeaders(),credentials:"include"});if(a.status===404)return null;if(!a.ok)throw new Error(`Failed to fetch settings: ${a.statusText}`);return await a.json()}catch(o){return console.error("Error fetching settings:",o),null}}async getFaqs(e={}){let t=new URLSearchParams;if(e.search&&t.append("search",e.search),e.organizationId&&t.append("organizationId",e.organizationId),e.groupId&&t.append("groupId",e.groupId),e.isActive!==void 0&&t.append("isActive",e.isActive.toString()),e.page&&t.append("page",e.page.toString()),e.limit&&t.append("limit",e.limit.toString()),e.sortBy&&t.append("sortBy",e.sortBy),e.sortOrder&&t.append("sortOrder",e.sortOrder),e.extraFilters){for(let[l,a]of Object.entries(e.extraFilters))if(a&&(Array.isArray(a)?a.length>0:a.toString().trim()!=="")){let d=Array.isArray(a)?a.join(","):a.toString();t.append(`extra_${l}`,d)}}let o=t.toString(),s=`/faqs${o?`?${o}`:""}`;return this.makeRequest(s)}async getFaqById(e){return this.makeRequest(`/faqs/${e}`,{})}};var j=async(n,e)=>{let t=await fetch(n,e);if(!t.ok){let o=await t.json().catch(()=>({}));throw new Error(JSON.stringify({status:t.status,statusText:t.statusText,...o}))}return t&&t.json()};var x=class n{constructor(e){this.config=e,this.enableUpload=e.enableUpload||!1}static getInstance(e){if(!n.instance&&e&&(n.instance=new n(e)),!n.instance)throw new Error("FileService must be initialized with config first");return n.instance}static initialize(e){return n.instance=new n(e),n.instance}async uploadFile(e,t={}){try{let o=await this.requestSignedUrl({filename:e.name,description:t.description,loadDirection:"up",bucketType:t.bucketType||"conversations",path:t.path||".temp",mimeType:e.type});return await this.uploadToSignedUrl(o.data.signedUrlData.signedUrl,e),{success:!0,id:o.data.file.id,name:o.data.file.name,url:o.data.file.url,type:o.data.file.type}}catch(o){return console.error("Error uploading file:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error"}}}async requestSignedUrl(e){let t=`${this.config.baseUrl}/files/upload-url`;return this.makeRequest(t,{method:"POST",body:JSON.stringify(e)})}async uploadToSignedUrl(e,t){let o=await fetch(e,{method:"PUT",body:t,headers:{"Content-Type":t.type}});if(!o.ok){let s=await o.text().catch(()=>"No response");throw new Error(`Upload failed with status: ${o.status}. Response: ${s}`)}}async uploadFileWithRetry(e,t={}){let o=t.maxRetries||3,s=null;for(let l=1;l<=o;l++)try{let a=await this.uploadFile(e,t);if(a.success)return a;throw new Error(a.error||"Upload failed")}catch(a){if(s=a instanceof Error?a:new Error("Unknown error"),l===o)break;let d=2**l*1e3;await new Promise(r=>setTimeout(r,d))}return{success:!1,error:s?.message||"Upload failed after retries"}}async getFileById(e){let t=`${this.config.baseUrl}/files/${e}`,o=await this.makeRequest(t);if(!o.success)throw new Error("Failed to get file");return o.data}async makeRequest(e,t){let o={"Content-Type":"application/json"};return this.config.organizationId&&(o["X-Onlive-Organization-Id"]=this.config.organizationId),t?.headers&&Object.assign(o,t.headers),j(e,{...t,headers:o})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var _=class n{constructor(e){this.config=e}static getInstance(e){if(!n.instance&&e&&(n.instance=new n(e)),!n.instance)throw new Error("MultimediaService must be initialized with config first");return n.instance}static initialize(e){return n.instance=new n(e),n.instance}async getImages(e={}){let t=new URLSearchParams({type:"image",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getVideos(e={}){let t=new URLSearchParams({type:"video",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getPresentations(e={}){let t=new URLSearchParams({type:"presentation",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getAllMultimedia(e={}){let[t,o,s]=await Promise.all([this.getImages(e),this.getVideos(e),this.getPresentations(e)]);return{images:t,videos:o,presentations:s}}async getMultimediaByToken(e){let t=`${this.config.baseUrl}/multimedia/secure-token/${e}`;return this.makeRequest(t,!1)}async searchMultimedia(e,t){let o={search:e,page:1,limit:50,includeSecureToken:!0};if(t)return this.getMultimediaByType(t,o);let[s,l,a]=await Promise.all([this.getImages(o),this.getVideos(o),this.getPresentations(o)]),d=[...s.items,...l.items,...a.items];return{items:d,total:d.length,count:d.length,currentPage:1,totalPages:1}}async getMultimediaByType(e,t){switch(e){case"image":return this.getImages(t);case"video":return this.getVideos(t);case"presentation":return this.getPresentations(t);default:throw new Error(`Invalid multimedia type: ${e}`)}}appendExtraFilters(e,t){if(t){for(let[o,s]of Object.entries(t))if(s&&(Array.isArray(s)?s.length>0:s.toString().trim()!=="")){let l=Array.isArray(s)?s.join(","):s.toString();e.append(`extra_${o}`,l)}}}async makeRequest(e,t=!0){let o={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return j(e,{method:"GET",headers:o,credentials:t?"include":void 0})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var g=class n{constructor(e){this.config=e}static getInstance(e){if(!n.instance&&e&&(n.instance=new n(e)),!n.instance)throw new Error("ProductService must be initialized with config first");return n.instance}static initialize(e){return n.instance=new n(e),n.instance}async getProducts(e={}){let t=new URLSearchParams({...e.title&&{title:e.title},...e.search&&{search:e.search},...e.category&&{category:e.category},...e.tags&&{tags:e.tags.join(",")},...e.sortBy&&{sortBy:e.sortBy},...e.sortOrder&&{sortOrder:e.sortOrder},...e.minPrice&&{minPrice:e.minPrice.toString()},...e.maxPrice&&{maxPrice:e.maxPrice.toString()},...e.inStock!==void 0&&{inStock:e.inStock.toString()},...e.offset&&{offset:e.offset.toString()},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});e.extraFields&&Object.keys(e.extraFields).length>0&&t.append("extraFields",JSON.stringify(e.extraFields));let o=`${this.config.baseUrl}/products?${t}`;return this.makeRequest(o,!0)}async getProductByToken(e){let t=`${this.config.baseUrl}/products/secure-token/${e}`;return this.makeRequest(t)}async searchProducts(e,t={}){return this.getProducts({...t,search:e})}async makeRequest(e,t=!1){let o={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return j(e,{method:"GET",headers:o,credentials:t?"include":"same-origin"})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var A=class{constructor(e){e?.multimediaService&&(this.multimediaService=_.initialize(e.multimediaService)),e?.faqsService&&(this.faqsService=w.initialize(e.faqsService)),e?.productService&&(this.productService=g.initialize(e.productService)),e?.fileService&&(this.fileService=x.initialize(e.fileService))}async loadAsset(e,t){switch(e){case"multimedia":return this.loadMultimediaAsset(t);case"product":return this.loadProductAsset(t);case"faq":return this.loadFaqAsset(t);case"file":return this.loadFileAsset(t);default:throw new Error(`Unsupported asset type: ${e}`)}}async loadMultimediaAsset(e){if(!this.multimediaService)throw new Error("MultimediaService not configured");let t=await this.multimediaService.getMultimediaByToken(e);if(!t)throw new Error("Multimedia not found");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:t.animatedCoverUrl||t.url,type:"multimedia",externalId:t.id,format:t.format,size:t.size||void 0,duration:t.duration||void 0,vodUrl:t.vodUrl||void 0,slides:t.slides||[],labels:t.labels,animatedCoverUrl:t.animatedCoverUrl||void 0,metadata:{organizationId:t.organizationId,status:t.status,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadProductAsset(e){if(!this.productService)throw new Error("MultimediaService not configured");let t=await this.productService.getProductByToken(e);if(!t)throw new Error("Product not found");return{id:t.id,name:t.name,description:t.description,url:t.url,thumbnail:t.images?.[0],type:"product",externalId:t.externalId,price:t.price,currency:t.currency,category:t.category,tags:t.tags,images:t.images,variants:t.variants?.map(o=>({id:o.id,externalId:o.externalId,price:o.price,currency:o.currency,images:o.images})),options:t.options,metadata:{providerType:t.providerType,providerId:t.providerId,discountType:t.discountType,discount:t.discount,stock:t.stock,broken:t.broken}}}async loadFaqAsset(e){if(!this.faqsService)throw new Error("FaqsService not configured");let t=await this.faqsService.getFaqById(e);return{id:t.id,name:t.question,description:t.answer,url:`#faq-${t.id}`,type:"faq",externalId:t.id,question:t.question,answer:t.answer,priority:t.priority,isActive:t.isActive,metadata:{organizationId:t.organizationId,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadFileAsset(e){if(!this.fileService)throw new Error("FileService not configured");let t=await this.fileService.getFileById(e),o=t.type||"",s=o.startsWith("video/"),l=o.startsWith("image/");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:l?t.url:void 0,type:"file",externalId:t.id,format:o,size:t.metadata?.size,duration:void 0,vodUrl:s?t.url:void 0,labels:[],animatedCoverUrl:s?t.url:void 0,metadata:{path:t.metadata?.path,bucketType:t.metadata?.bucketType,loadDirection:t.metadata?.loadDirection,createdAt:t.createdAt,updatedAt:t.updatedAt}}}};import{html as i}from"lit";import{classMap as Z}from"lit/directives/class-map.js";import{ifDefined as b}from"lit/directives/if-defined.js";import{when as m}from"lit/directives/when.js";import{unsafeHTML as Y}from"lit/directives/unsafe-html.js";import F from"dompurify";var B={ALLOWED_TAGS:["p","br","span","b","strong","i","em","u","s","del","ul","ol","li","code","pre","a","h1","h2","h3","h4","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","target","rel","title","aria-label","role","colspan","rowspan"],FORCE_HTTPS:!0,ALLOW_DATA_ATTR:!1};F.addHook("afterSanitizeAttributes",n=>{"target"in n&&n.target==="_blank"&&n.setAttribute("rel","noopener noreferrer")});var q=(n,e=B)=>F.sanitize(n,e);function C(n=""){return Y(H(n))}function H(n=""){return q(n,{ADD_ATTR:["target","rel"],ADD_TAGS:["ol-"],CUSTOM_ELEMENT_HANDLING:{tagNameCheck:/^ol-/,attributeNameCheck:null,allowCustomizedBuiltInElements:!0}})}import"@onlive.ai/ui/dist/components/button/button.js";import"@onlive.ai/ui/dist/components/icon/icon.js";import{html as E,LitElement as G}from"lit";import{property as Q,query as K}from"lit/decorators.js";import{repeat as X}from"lit/directives/repeat.js";import W from"video.js";import{css as J,unsafeCSS as O}from"lit";import N from"video.js/dist/video-js.min.css?inline";var R=J`
3
3
  ${O(N)}
4
4
  .och__player {