isometrik-plugin-chat-sdk 2.0.12 → 2.0.14

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 (118) hide show
  1. package/dist/cjs/{app-globals-c433d8a6.js → app-globals-95486d77.js} +2 -2
  2. package/dist/cjs/{app-globals-c433d8a6.js.map → app-globals-95486d77.js.map} +1 -1
  3. package/dist/cjs/attachment-preview_22.cjs.entry.js +65 -57
  4. package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
  5. package/dist/cjs/audio-bubble_4.cjs.entry.js +3 -2
  6. package/dist/cjs/audio-bubble_4.cjs.entry.js.map +1 -1
  7. package/dist/cjs/index.cjs.js +2 -2
  8. package/dist/cjs/isometrik-webchat.cjs.js +4 -4
  9. package/dist/cjs/loader.cjs.js +4 -4
  10. package/dist/cjs/login-page_3.cjs.entry.js +88 -35
  11. package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/{runtime-controls-95f6cb3b.js → runtime-controls-959fe6ed.js} +4 -2
  13. package/dist/cjs/runtime-controls-959fe6ed.js.map +1 -0
  14. package/dist/cjs/{send-media-37e09e83.js → send-media-2dadbb03.js} +98 -19
  15. package/dist/cjs/send-media-2dadbb03.js.map +1 -0
  16. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +53 -12
  17. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
  18. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +12 -32
  19. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
  20. package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +11 -6
  21. package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -1
  22. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +5 -5
  23. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
  24. package/dist/collection/components/ChatUIComponent/shared/GroupCast/GroupCast.js +2 -2
  25. package/dist/collection/components/ChatUIComponent/shared/GroupCast/GroupCast.js.map +1 -1
  26. package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +21 -2
  27. package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js.map +1 -1
  28. package/dist/collection/components/my-component/web-chat/WebChat.js +19 -0
  29. package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
  30. package/dist/collection/components/my-component/web-chat/data-fetch.js +13 -3
  31. package/dist/collection/components/my-component/web-chat/data-fetch.js.map +1 -1
  32. package/dist/collection/components/my-component/web-chat/shell-render.js +1 -1
  33. package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
  34. package/dist/collection/lib/chat/index.js +1 -1
  35. package/dist/collection/lib/chat/index.js.map +1 -1
  36. package/dist/collection/lib/chat/send-media.js +96 -18
  37. package/dist/collection/lib/chat/send-media.js.map +1 -1
  38. package/dist/collection/lib/mqtt/dispatch.js +56 -31
  39. package/dist/collection/lib/mqtt/dispatch.js.map +1 -1
  40. package/dist/collection/lib/mqtt/index.js +1 -1
  41. package/dist/collection/lib/mqtt/index.js.map +1 -1
  42. package/dist/collection/lib/mqtt/types.js +17 -0
  43. package/dist/collection/lib/mqtt/types.js.map +1 -1
  44. package/dist/collection/sdk/init.js +2 -0
  45. package/dist/collection/sdk/init.js.map +1 -1
  46. package/dist/components/ChatFooter.js +12 -32
  47. package/dist/components/ChatFooter.js.map +1 -1
  48. package/dist/components/ChatSidebar.js +36 -12
  49. package/dist/components/ChatSidebar.js.map +1 -1
  50. package/dist/components/GroupCast2.js +2 -2
  51. package/dist/components/GroupCast2.js.map +1 -1
  52. package/dist/components/WebChat.js +88 -34
  53. package/dist/components/WebChat.js.map +1 -1
  54. package/dist/components/WebChatBody.js +6 -6
  55. package/dist/components/WebChatBody.js.map +1 -1
  56. package/dist/components/WebChatHeader.js +11 -6
  57. package/dist/components/WebChatHeader.js.map +1 -1
  58. package/dist/components/index.js +2 -0
  59. package/dist/components/index.js.map +1 -1
  60. package/dist/components/send-media.js +97 -19
  61. package/dist/components/send-media.js.map +1 -1
  62. package/dist/components/video-message2.js +4 -2
  63. package/dist/components/video-message2.js.map +1 -1
  64. package/dist/esm/{app-globals-dfce8a5b.js → app-globals-879c137f.js} +2 -2
  65. package/dist/esm/{app-globals-dfce8a5b.js.map → app-globals-879c137f.js.map} +1 -1
  66. package/dist/esm/attachment-preview_22.entry.js +65 -57
  67. package/dist/esm/attachment-preview_22.entry.js.map +1 -1
  68. package/dist/esm/audio-bubble_4.entry.js +3 -2
  69. package/dist/esm/audio-bubble_4.entry.js.map +1 -1
  70. package/dist/esm/index.js +3 -3
  71. package/dist/esm/isometrik-webchat.js +4 -4
  72. package/dist/esm/loader.js +4 -4
  73. package/dist/esm/login-page_3.entry.js +88 -35
  74. package/dist/esm/login-page_3.entry.js.map +1 -1
  75. package/dist/esm/{runtime-controls-ec6d5c75.js → runtime-controls-6b7c852a.js} +4 -2
  76. package/dist/esm/runtime-controls-6b7c852a.js.map +1 -0
  77. package/dist/esm/{send-media-a946c6dd.js → send-media-ac360d8e.js} +98 -20
  78. package/dist/esm/send-media-ac360d8e.js.map +1 -0
  79. package/dist/isometrik-webchat/index.esm.js +1 -1
  80. package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
  81. package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
  82. package/dist/isometrik-webchat/{p-46dcd38f.js → p-217b9dc2.js} +2 -2
  83. package/dist/isometrik-webchat/p-217b9dc2.js.map +1 -0
  84. package/dist/isometrik-webchat/p-2c87c3fd.entry.js +2 -0
  85. package/dist/isometrik-webchat/p-2c87c3fd.entry.js.map +1 -0
  86. package/dist/isometrik-webchat/p-30855ba7.js +2 -0
  87. package/dist/isometrik-webchat/p-30855ba7.js.map +1 -0
  88. package/dist/isometrik-webchat/{p-cc5b86e6.entry.js → p-3120b9d3.entry.js} +2 -2
  89. package/dist/isometrik-webchat/p-3120b9d3.entry.js.map +1 -0
  90. package/dist/isometrik-webchat/{p-63ff4eea.entry.js.map → p-5672fae7.entry.js} +2 -1
  91. package/dist/isometrik-webchat/p-5672fae7.entry.js.map +1 -0
  92. package/dist/isometrik-webchat/p-79d1a171.js +2 -0
  93. package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +2 -0
  94. package/dist/types/components/ChatUIComponent/shared/video-message/video-message.d.ts +2 -0
  95. package/dist/types/components/my-component/web-chat/WebChat.d.ts +322 -0
  96. package/dist/types/components/my-component/web-chat/data-fetch.d.ts +14 -0
  97. package/dist/types/components.d.ts +24 -0
  98. package/dist/types/lib/chat/index.d.ts +1 -1
  99. package/dist/types/lib/chat/send-media.d.ts +21 -0
  100. package/dist/types/lib/mqtt/index.d.ts +1 -1
  101. package/dist/types/lib/mqtt/types.d.ts +11 -0
  102. package/dist/types/sdk/init.d.ts +7 -0
  103. package/package.json +1 -1
  104. package/dist/cjs/runtime-controls-95f6cb3b.js.map +0 -1
  105. package/dist/cjs/send-media-37e09e83.js.map +0 -1
  106. package/dist/components/urls.js +0 -5
  107. package/dist/components/urls.js.map +0 -1
  108. package/dist/esm/runtime-controls-ec6d5c75.js.map +0 -1
  109. package/dist/esm/send-media-a946c6dd.js.map +0 -1
  110. package/dist/isometrik-webchat/p-2d69086d.entry.js +0 -2
  111. package/dist/isometrik-webchat/p-2d69086d.entry.js.map +0 -1
  112. package/dist/isometrik-webchat/p-3f355f9e.js +0 -2
  113. package/dist/isometrik-webchat/p-3f355f9e.js.map +0 -1
  114. package/dist/isometrik-webchat/p-46dcd38f.js.map +0 -1
  115. package/dist/isometrik-webchat/p-63ff4eea.entry.js +0 -2
  116. package/dist/isometrik-webchat/p-86be30fe.js +0 -2
  117. package/dist/isometrik-webchat/p-cc5b86e6.entry.js.map +0 -1
  118. /package/dist/isometrik-webchat/{p-86be30fe.js.map → p-79d1a171.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const runtimeControls = require('./runtime-controls-95f6cb3b.js');
3
+ const runtimeControls = require('./runtime-controls-959fe6ed.js');
4
4
  const groupcast = require('./groupcast-5e3d49c4.js');
5
5
 
6
6
  /**
@@ -35,4 +35,4 @@ const globalScripts = appGlobalScript;
35
35
 
36
36
  exports.globalScripts = globalScripts;
37
37
 
38
- //# sourceMappingURL=app-globals-c433d8a6.js.map
38
+ //# sourceMappingURL=app-globals-95486d77.js.map
@@ -1 +1 @@
1
- {"file":"app-globals-c433d8a6.js","mappings":";;;;;AAAA;;;;;IAwBE,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAC1C,MAAM,CAAC,GAAG,MAAa,CAAC;IACxB,CAAC,CAAC,0BAA0B,GAAGA,0CAA0B,CAAC;IAC1D,CAAC,CAAC,uBAAuB,GAAGC,uCAAuB,CAAC;IACpD,CAAC,CAAC,sBAAsB,GAAGC,sCAAsB,CAAC;IAClD,CAAC,CAAC,sBAAsB,GAAGC,sCAAsB,CAAC;IAClD,CAAC,CAAC,uBAAuB,GAAGC,uCAAuB,CAAC;IACpD,CAAC,CAAC,cAAc,GAAGJ,0CAA0B,CAAC;IAC9C,CAAC,CAAC,WAAW,GAAGC,uCAAuB,CAAC;IACxC,CAAC,CAAC,mBAAmB,GAAGI,mCAAmB,CAAC;IAC5C,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,iBAAiB,GAAGC,2BAAiB,CAAC;IACxC,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,qBAAqB,GAAGC,qCAAqB,CAAC;IAChD,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,eAAe,GAAGC,+BAAe,CAAC;IACpC,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,WAAW,GAAGC,2BAAW,CAAC;IAC5B,CAAC,CAAC,oBAAoB,GAAGC,oCAAoB,CAAC;IAC9C,CAAC,CAAC,cAAc,GAAGC,8BAAc,CAAC;AACpC;;AC3CY,MAAC,aAAa,GAAG;;;;","names":["initializeIsometrikWebchat","destroyIsometrikWebchat","ensureIsometrikWebchat","retainIsometrikWebchat","releaseIsometrikWebchat","isometrikWebchatApi","createWebChatApi","THEME_TOKEN_NAMES","mountReactInSlot","defineReactCustomPart","unmountReactSlot","switchChatTheme","applyCustomTheme","toggleTheme","resolveThemeProvider","resolveWebChat"],"sources":["src/global/expose-sdk.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Expose public SDK helpers on window for www demos / script-tag hosts.\n * Bundlers should prefer named ESM imports from the package entry.\n */\nimport {\n initializeIsometrikWebchat,\n destroyIsometrikWebchat,\n ensureIsometrikWebchat,\n retainIsometrikWebchat,\n releaseIsometrikWebchat,\n mountReactInSlot,\n defineReactCustomPart,\n unmountReactSlot,\n createWebChatApi,\n isometrikWebchatApi,\n THEME_TOKEN_NAMES,\n switchChatTheme,\n applyCustomTheme,\n toggleTheme,\n resolveThemeProvider,\n resolveWebChat,\n} from '../sdk';\n\nexport default function () {\n if (typeof window === 'undefined') return;\n const w = window as any;\n w.initializeIsometrikWebchat = initializeIsometrikWebchat;\n w.destroyIsometrikWebchat = destroyIsometrikWebchat;\n w.ensureIsometrikWebchat = ensureIsometrikWebchat;\n w.retainIsometrikWebchat = retainIsometrikWebchat;\n w.releaseIsometrikWebchat = releaseIsometrikWebchat;\n w.initializeChat = initializeIsometrikWebchat;\n w.destroyChat = destroyIsometrikWebchat;\n w.isometrikWebchatApi = isometrikWebchatApi;\n w.createWebChatApi = createWebChatApi;\n w.THEME_TOKEN_NAMES = THEME_TOKEN_NAMES;\n w.mountReactInSlot = mountReactInSlot;\n w.defineReactCustomPart = defineReactCustomPart;\n w.unmountReactSlot = unmountReactSlot;\n w.switchChatTheme = switchChatTheme;\n w.applyCustomTheme = applyCustomTheme;\n w.toggleTheme = toggleTheme;\n w.resolveThemeProvider = resolveThemeProvider;\n w.resolveWebChat = resolveWebChat;\n}\n","import appGlobalScript from '/Users/3embed/Desktop/isometrik-webchat/src/global/expose-sdk.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
1
+ {"file":"app-globals-95486d77.js","mappings":";;;;;AAAA;;;;;IAwBE,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAC1C,MAAM,CAAC,GAAG,MAAa,CAAC;IACxB,CAAC,CAAC,0BAA0B,GAAGA,0CAA0B,CAAC;IAC1D,CAAC,CAAC,uBAAuB,GAAGC,uCAAuB,CAAC;IACpD,CAAC,CAAC,sBAAsB,GAAGC,sCAAsB,CAAC;IAClD,CAAC,CAAC,sBAAsB,GAAGC,sCAAsB,CAAC;IAClD,CAAC,CAAC,uBAAuB,GAAGC,uCAAuB,CAAC;IACpD,CAAC,CAAC,cAAc,GAAGJ,0CAA0B,CAAC;IAC9C,CAAC,CAAC,WAAW,GAAGC,uCAAuB,CAAC;IACxC,CAAC,CAAC,mBAAmB,GAAGI,mCAAmB,CAAC;IAC5C,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,iBAAiB,GAAGC,2BAAiB,CAAC;IACxC,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,qBAAqB,GAAGC,qCAAqB,CAAC;IAChD,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,eAAe,GAAGC,+BAAe,CAAC;IACpC,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,WAAW,GAAGC,2BAAW,CAAC;IAC5B,CAAC,CAAC,oBAAoB,GAAGC,oCAAoB,CAAC;IAC9C,CAAC,CAAC,cAAc,GAAGC,8BAAc,CAAC;AACpC;;AC3CY,MAAC,aAAa,GAAG;;;;","names":["initializeIsometrikWebchat","destroyIsometrikWebchat","ensureIsometrikWebchat","retainIsometrikWebchat","releaseIsometrikWebchat","isometrikWebchatApi","createWebChatApi","THEME_TOKEN_NAMES","mountReactInSlot","defineReactCustomPart","unmountReactSlot","switchChatTheme","applyCustomTheme","toggleTheme","resolveThemeProvider","resolveWebChat"],"sources":["src/global/expose-sdk.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Expose public SDK helpers on window for www demos / script-tag hosts.\n * Bundlers should prefer named ESM imports from the package entry.\n */\nimport {\n initializeIsometrikWebchat,\n destroyIsometrikWebchat,\n ensureIsometrikWebchat,\n retainIsometrikWebchat,\n releaseIsometrikWebchat,\n mountReactInSlot,\n defineReactCustomPart,\n unmountReactSlot,\n createWebChatApi,\n isometrikWebchatApi,\n THEME_TOKEN_NAMES,\n switchChatTheme,\n applyCustomTheme,\n toggleTheme,\n resolveThemeProvider,\n resolveWebChat,\n} from '../sdk';\n\nexport default function () {\n if (typeof window === 'undefined') return;\n const w = window as any;\n w.initializeIsometrikWebchat = initializeIsometrikWebchat;\n w.destroyIsometrikWebchat = destroyIsometrikWebchat;\n w.ensureIsometrikWebchat = ensureIsometrikWebchat;\n w.retainIsometrikWebchat = retainIsometrikWebchat;\n w.releaseIsometrikWebchat = releaseIsometrikWebchat;\n w.initializeChat = initializeIsometrikWebchat;\n w.destroyChat = destroyIsometrikWebchat;\n w.isometrikWebchatApi = isometrikWebchatApi;\n w.createWebChatApi = createWebChatApi;\n w.THEME_TOKEN_NAMES = THEME_TOKEN_NAMES;\n w.mountReactInSlot = mountReactInSlot;\n w.defineReactCustomPart = defineReactCustomPart;\n w.unmountReactSlot = unmountReactSlot;\n w.switchChatTheme = switchChatTheme;\n w.applyCustomTheme = applyCustomTheme;\n w.toggleTheme = toggleTheme;\n w.resolveThemeProvider = resolveThemeProvider;\n w.resolveWebChat = resolveWebChat;\n}\n","import appGlobalScript from '/Users/3embed/Desktop/isometrik-webchat/src/global/expose-sdk.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f624fc47.js');
6
6
  const chatAssets = require('./chat-assets-686620e7.js');
7
7
  const cancel = require('./cancel-1ffd86d3.js');
8
- const sendMedia = require('./send-media-37e09e83.js');
8
+ const sendMedia = require('./send-media-2dadbb03.js');
9
9
  const doublecheck = require('./doublecheck-c2461adc.js');
10
10
  const index_m = require('./index.m-ff115b26.js');
11
11
  const drawer = require('./drawer-960b3f5d.js');
@@ -167,8 +167,6 @@ const NewChat = class {
167
167
  };
168
168
  NewChat.style = ":host {\n display: block;\n height: var(--h-full);\n }\n .new-chat {\n display: flex;\n flex-direction: column;\n height: var(--h-full);\n min-height: 0;\n background: var(--bg-primary);\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .header {\n height: 4rem;\n padding: 0 var(--space-16);\n border-bottom: 1px solid var(--border);\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .back-btn {\n width: 2.25rem;\n height: 2.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n color: var(--icon);\n border-radius: var(--rounded-full);\n cursor: pointer;\n padding: 0;\n }\n .back-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .back-btn:hover {\n color: var(--text-primary);\n background: var(--hover-overlay);\n }\n .title {\n margin: 0;\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .search-wrap {\n padding: var(--space-8);\n }\n .search-bar {\n display: flex;\n align-items: center;\n gap: var(--gap-8);\n padding: var(--gap-6) var(--space-12);\n border-radius: var(--rounded-8);\n background: var(--bg-secondary);\n }\n .search-bar:focus-within {\n background: var(--bg-primary);\n box-shadow: 0 0 0 1px var(--border);\n }\n .search-bar input {\n border: none;\n outline: none;\n width: var(--w-full);\n background: transparent;\n color: var(--text-primary);\n font-size: var(--text-14);\n padding: var(--gap-4);\n }\n .search-bar input::placeholder {\n color: var(--text-tertiary);\n }\n .list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n .row {\n display: flex;\n align-items: center;\n gap: var(--space-12);\n padding: var(--space-8) var(--space-16);\n cursor: pointer;\n transition: background-color 0.15s;\n }\n .row:hover {\n background: var(--bg-secondary);\n }\n .action-icon {\n width: var(--avatar);\n height: var(--avatar);\n border-radius: var(--rounded-full);\n background: var(--brand);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n .action-icon img {\n width: var(--icon-md);\n height: var(--icon-md);\n filter: brightness(0) invert(1);\n }\n .action-label {\n font-size: var(--text-18);\n font-weight: 500;\n }\n .section-label {\n padding: var(--space-16) var(--space-16) var(--space-8);\n font-size: var(--text-10);\n font-weight: 600;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--brand);\n }\n .avatar {\n width: var(--avatar);\n height: var(--avatar);\n border-radius: var(--rounded-full);\n object-fit: cover;\n background: var(--brand-soft);\n color: var(--brand);\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n font-size: var(--text-14);\n flex-shrink: 0;\n overflow: hidden;\n }\n .avatar img {\n width: var(--w-full);\n height: var(--h-full);\n object-fit: cover;\n }\n .row-meta {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n gap: var(--gap-2);\n padding-bottom: var(--gap-4);\n border-bottom: 1px solid var(--border);\n }\n .row-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--gap-8);\n }\n .row-name {\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .row-side {\n font-size: var(--text-10);\n color: var(--text-tertiary);\n flex-shrink: 0;\n }\n .empty {\n padding: var(--space-16);\n text-align: center;\n color: var(--text-secondary);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
169
169
 
170
- const GROUP_PROFILE_PLACEHOLDER_IMAGE = 'https://chatstorage.isometrik.ai/5eb3db9ba9252000014f82ff/e1241039-2fef-4830-b927-5bb3424f1764/Users/65eabd45837d05000165d096_1739274360060.svg';
171
-
172
170
  const { state, onChange } = groupMembers.createStore({
173
171
  conversationTitle: '',
174
172
  conversationId: '',
@@ -409,6 +407,7 @@ const ChatSidebar = class {
409
407
  }
410
408
  };
411
409
  this.isMqttConnected = undefined;
410
+ this.showMqttStatus = true;
412
411
  this.conversationList = [];
413
412
  this.isChatFilter = undefined;
414
413
  this.isAllChatButton = undefined;
@@ -705,9 +704,12 @@ const ChatSidebar = class {
705
704
  ? 'you'
706
705
  : ((_b = members === null || members === void 0 ? void 0 : members[0]) === null || _b === void 0 ? void 0 : _b.memberName) || (memberAdded === null || memberAdded === void 0 ? void 0 : memberAdded[0])}`;
707
706
  case 'membersRemove':
707
+ case 'memberRemove':
708
708
  return `${userId === (userMetaData === null || userMetaData === void 0 ? void 0 : userMetaData.userId) ? 'You' : userName} removed ${((_c = members === null || members === void 0 ? void 0 : members[0]) === null || _c === void 0 ? void 0 : _c.memberId) === (userMetaData === null || userMetaData === void 0 ? void 0 : userMetaData.userId) || (memberAdded === null || memberAdded === void 0 ? void 0 : memberAdded[0]) === (userMetaData === null || userMetaData === void 0 ? void 0 : userMetaData.userName)
709
709
  ? 'you'
710
710
  : ((_d = members === null || members === void 0 ? void 0 : members[0]) === null || _d === void 0 ? void 0 : _d.memberName) || (memberAdded === null || memberAdded === void 0 ? void 0 : memberAdded[0])}`;
711
+ case 'memberLeave':
712
+ return `${userId === (userMetaData === null || userMetaData === void 0 ? void 0 : userMetaData.userId) ? 'You' : userName || 'Someone'} left the conversation`;
711
713
  case 'conversationTitleUpdated':
712
714
  return 'Conversation Title Updated';
713
715
  case 'conversationImageUpdated':
@@ -730,7 +732,7 @@ const ChatSidebar = class {
730
732
  if ((details === null || details === void 0 ? void 0 : details.action) === 'conversationCreated') {
731
733
  return formatUnixTimestamp((details === null || details === void 0 ? void 0 : details.createdAt) || ((_a = details === null || details === void 0 ? void 0 : details.conversationDetails) === null || _a === void 0 ? void 0 : _a.createdAt) || (tile === null || tile === void 0 ? void 0 : tile.createdAt));
732
734
  }
733
- if (['addAdmin', 'removeAdmin', 'membersAdd', 'membersRemove'].includes(details === null || details === void 0 ? void 0 : details.action)) {
735
+ if (['addAdmin', 'removeAdmin', 'membersAdd', 'membersRemove', 'memberRemove', 'memberLeave'].includes(details === null || details === void 0 ? void 0 : details.action)) {
734
736
  return formatUnixTimestamp(details === null || details === void 0 ? void 0 : details.sentAt);
735
737
  }
736
738
  return formatUnixTimestamp((details === null || details === void 0 ? void 0 : details.updatedAt) || (details === null || details === void 0 ? void 0 : details.sentAt) || (tile === null || tile === void 0 ? void 0 : tile.updatedAt) || '');
@@ -978,13 +980,29 @@ const ChatSidebar = class {
978
980
  const { conversationTitle, imageFile, selectedUserIds, isGroupCast, selectedUsers } = event.detail;
979
981
  try {
980
982
  this.isGroupCreationLoading = true;
983
+ // Empty → profile-avatar group fallback (avoid broken X placeholder CDN asset).
981
984
  let conversationImageUrl = '';
982
985
  if (imageFile) {
983
- // @ts-ignore
984
- conversationImageUrl = await this.getPresignedUrl(imageFile);
985
- }
986
- else {
987
- conversationImageUrl = GROUP_PROFILE_PLACEHOLDER_IMAGE;
986
+ try {
987
+ conversationImageUrl = await this.getPresignedUrl(imageFile);
988
+ }
989
+ catch (uploadErr) {
990
+ console.error('Group image upload failed', uploadErr);
991
+ toast.showToast({
992
+ message: 'Could not upload group photo. Try again or create without a photo.',
993
+ type: 'error',
994
+ position: 'bottom-right',
995
+ });
996
+ return;
997
+ }
998
+ if (!conversationImageUrl) {
999
+ toast.showToast({
1000
+ message: 'Group photo upload returned an empty URL',
1001
+ type: 'error',
1002
+ position: 'bottom-right',
1003
+ });
1004
+ return;
1005
+ }
988
1006
  }
989
1007
  const paramsForCreateConversation = {
990
1008
  typingEvents: true,
@@ -1047,13 +1065,17 @@ const ChatSidebar = class {
1047
1065
  members: selectedUserIds,
1048
1066
  };
1049
1067
  this.conversationList = [newConversation, ...this.conversationList];
1050
- // this.sortConversations();
1051
1068
  this.selectedConversationID = res.conversationId;
1052
- // Update URL
1069
+ // Keep header avatar in sync immediately (details fetch can lag / omit image).
1070
+ conversationStore.updateConversationDetails({
1071
+ conversationId: res.conversationId,
1072
+ conversationTitle,
1073
+ conversationImageUrl: conversationImageUrl || '',
1074
+ isGroup: true,
1075
+ });
1053
1076
  const url = new URL(window.location.href);
1054
1077
  url.searchParams.set('conversation', res.conversationId);
1055
1078
  window.history.pushState({}, '', url);
1056
- // Emit chat tile selected event
1057
1079
  this.chatTileSelected.emit(res.conversationId);
1058
1080
  toast.showToast({
1059
1081
  message: 'Group created successfully',
@@ -1166,7 +1188,7 @@ const ChatSidebar = class {
1166
1188
  return (title || '').toLowerCase().includes(searchQuery);
1167
1189
  });
1168
1190
  return (index.h("div", { class: "chat-sidebar-container", style: { backgroundColor: this.sidebarColor || undefined } }, this.isGroupCreationLoading && (index.h("div", { class: "loader" }, index.h("spinner-loader", { height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" }))), this.showGroupInfo ? (index.h("div", { class: "new-chat-panel" }, index.h("iso-group-info", { label: this.memberPickerIsGroupCast ? 'Create New Groupcast' : 'Create New Group', selectedUserIds: this.pendingGroupMembers.map(m => m.userId), selectedUsers: this.pendingGroupMembers, isGroupCast: this.memberPickerIsGroupCast, closeGroupInfo: this.closeGroupInfoStep, afterCreate: this.finishGroupInfoStep }))) : this.showMemberPicker ? (index.h("div", { class: "new-chat-panel" }, index.h("div", { class: "picker-back" }, index.h("button", { type: "button", onClick: this.closeMemberPicker, "aria-label": "Back" }, index.h("img", { class: "theme-icon", src: chatAssets.Left_Arrow, alt: "" })), index.h("h2", { class: "picker-title" }, this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group')), index.h("searchable-list", { label: this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group', hideTopbar: true, contactList: this.nonBlockedContacts, isSearching: true, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, getForwardMessageMemberList: (query, skip) => this.getAllGroupMemeber(query || '', skip || 0), onSend: this.submitMemberPicker, height: "100%" }))) : this.showNewChat ? (index.h("div", { class: "new-chat-panel" }, index.h("new-chat", { contactList: this.nonBlockedContacts, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, onSearch: (query, skip) => this.getAllMemeber(query || '', skip || 0), onSelect: this.handleNewChatContactPick, onClose: () => this.closeNewChat(), customParts: this.customParts, groupcastEnabled: this.groupcastEnabled }))) : ([
1169
- index.h("div", { class: "chat-sidebar-top" }, index.h("div", { class: "chat-sidebar-header-row" }, this.isSidebarHeaderLabel ? (index.h("h1", { class: "chat-sidebar-header" }, this.sidebarHeaderLabel || 'Chats')) : (index.h("span", null)), index.h("div", { class: "chat-sidebar-actions" }, index.h("button", { type: "button", class: "icon-btn", title: "New Chat", onClick: () => this.openNewChat() }, index.h("img", { src: chatAssets.New_Chat, alt: "New chat" })), index.h("div", { class: "more-wrap" }, index.h("button", { type: "button", class: "icon-btn", title: "More Options", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.showMoreMenu ? 'true' : 'false', onClick: this.toggleMoreMenu }, index.h("img", { class: "theme-icon", src: chatAssets.Three_Dots, alt: "" })), this.showMoreMenu ? (index.h("div", { class: "more-menu", role: "menu" }, index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.onNewGroupFromMenu }, index.h("img", { class: "theme-icon", src: chatAssets.New_Group, alt: "" }), index.h("span", null, "New group")), index.h("div", { class: "more-divider" }), index.h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.onLogoutFromMenu }, index.h("img", { class: "theme-icon", src: chatAssets.Logout, alt: "" }), index.h("span", null, "Log out")))) : null))), this.isSidebarHeaderSearch !== false ? (index.h("div", { class: "chat-sidebar-search" }, index.h("input", { type: "search", placeholder: "Search or start new chat", value: this.searchQuery, onInput: (e) => this.handleSearch(e) }))) : null),
1191
+ index.h("div", { class: "chat-sidebar-top" }, index.h("div", { class: "chat-sidebar-header-row" }, this.isSidebarHeaderLabel ? (index.h("h1", { class: "chat-sidebar-header" }, this.sidebarHeaderLabel || 'Chats', this.showMqttStatus !== false ? (index.h("span", { class: "mqtt-status", title: this.isMqttConnected ? 'Realtime connected' : 'Realtime disconnected', "aria-label": this.isMqttConnected ? 'MQTT connected' : 'MQTT disconnected' }, index.h("span", { class: { 'mqtt-status-dot': true, 'is-connected': !!this.isMqttConnected } }))) : null)) : this.showMqttStatus !== false ? (index.h("span", { class: "mqtt-status", title: this.isMqttConnected ? 'Realtime connected' : 'Realtime disconnected', "aria-label": this.isMqttConnected ? 'MQTT connected' : 'MQTT disconnected' }, index.h("span", { class: { 'mqtt-status-dot': true, 'is-connected': !!this.isMqttConnected } }))) : (index.h("span", null)), index.h("div", { class: "chat-sidebar-actions" }, index.h("button", { type: "button", class: "icon-btn", title: "New Chat", onClick: () => this.openNewChat() }, index.h("img", { src: chatAssets.New_Chat, alt: "New chat" })), index.h("div", { class: "more-wrap" }, index.h("button", { type: "button", class: "icon-btn", title: "More Options", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.showMoreMenu ? 'true' : 'false', onClick: this.toggleMoreMenu }, index.h("img", { class: "theme-icon", src: chatAssets.Three_Dots, alt: "" })), this.showMoreMenu ? (index.h("div", { class: "more-menu", role: "menu" }, index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.onNewGroupFromMenu }, index.h("img", { class: "theme-icon", src: chatAssets.New_Group, alt: "" }), index.h("span", null, "New group")), index.h("div", { class: "more-divider" }), index.h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.onLogoutFromMenu }, index.h("img", { class: "theme-icon", src: chatAssets.Logout, alt: "" }), index.h("span", null, "Log out")))) : null))), this.isSidebarHeaderSearch !== false ? (index.h("div", { class: "chat-sidebar-search" }, index.h("input", { type: "search", placeholder: "Search or start new chat", value: this.searchQuery, onInput: (e) => this.handleSearch(e) }))) : null),
1170
1192
  index.h("div", { class: "chat-sidebar-list", onScroll: (e) => this.handleListScroll(e) }, this.isConversationLoading ? (index.h("div", { class: "chat-sidebar-loading" }, index.h("spinner-loader", { height: "15px", width: "15px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" }))) : filteredConversations.length > 0 ? (filteredConversations.map((tile) => this.renderConversationTile(tile))) : (index.h("div", { class: "chat-sidebar-empty" }, "No conversation found")), this.isLoading && this.hasMoreConversations && (index.h("div", { class: "chat-sidebar-loading" }, index.h("spinner-loader", { height: "15px", width: "15px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))),
1171
1193
  ])));
1172
1194
  }
@@ -1176,7 +1198,7 @@ const ChatSidebar = class {
1176
1198
  "conversationDetails": ["handleConversationDetailsChange"]
1177
1199
  }; }
1178
1200
  };
1179
- ChatSidebar.style = ":host {\n display: block;\n height: var(--h-full);\n width: var(--w-full);\n min-width: 0;\n max-width: var(--w-full);\n min-height: 0;\n overflow: hidden;\n font-family: var(--font-primary);\n }\n .chat-sidebar-container {\n display: flex;\n flex-direction: column;\n height: var(--h-full);\n width: var(--w-full);\n max-width: var(--w-full);\n min-width: 0;\n min-height: 0;\n box-sizing: border-box;\n background: var(--bg-primary);\n border-right: 1px solid var(--border);\n z-index: 10;\n font-family: var(--font-primary);\n overflow: hidden;\n }\n .chat-sidebar-top {\n padding: var(--space-16) var(--space-16) var(--space-8);\n }\n .chat-sidebar-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: var(--gap-4);\n }\n .chat-sidebar-header {\n font-size: var(--text-24);\n font-weight: 700;\n letter-spacing: -0.02em;\n color: var(--text-primary);\n margin: 0;\n }\n .chat-sidebar-actions {\n display: flex;\n align-items: center;\n gap: var(--gap-4);\n }\n .icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8);\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n color: var(--icon);\n transition: background-color 0.15s;\n }\n .icon-btn:hover {\n background-color: var(--hover-overlay);\n }\n .icon-btn img {\n width: var(--icon-lg);\n height: var(--icon-lg);\n display: block;\n }\n .more-wrap .icon-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n }\n .more-wrap {\n position: relative;\n }\n .more-menu {\n position: absolute;\n right: 0;\n top: 100%;\n margin-top: var(--gap-4);\n width: 13rem;\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);\n border: 1px solid var(--border-subtle);\n padding: var(--space-8) 0;\n z-index: 50;\n }\n .more-item {\n width: calc(100% - 12px);\n margin: 0 6px;\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n padding: var(--space-8) var(--space-12);\n border: none;\n background: transparent;\n border-radius: var(--rounded-8);\n cursor: pointer;\n text-align: left;\n font-size: var(--text-14);\n color: var(--text-primary);\n }\n .more-item:hover {\n background: var(--brand-soft);\n color: var(--brand);\n }\n .more-item.danger {\n color: var(--danger);\n }\n .more-item.danger:hover {\n background: rgba(250, 0, 0, 0.08);\n color: var(--danger);\n }\n .more-item img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n display: block;\n }\n .more-divider {\n height: 1px;\n background: var(--border-subtle);\n margin: var(--gap-4) var(--space-8);\n }\n .chat-sidebar-header-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .chat-sidebar-header-actions button {\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n }\n .chat-sidebar-header-actions img {\n width: 28px;\n height: 28px;\n }\n .new-chat-overlay {\n position: absolute;\n inset: 0;\n z-index: 20;\n background: var(--bg-primary-color);\n }\n .chat-sidebar-search {\n position: relative;\n margin-bottom: var(--gap-8);\n }\n .chat-sidebar-search input {\n width: var(--w-full);\n box-sizing: border-box;\n padding: var(--space-12) var(--space-12);\n border: none;\n border-radius: var(--rounded-8);\n background: var(--bg-input);\n color: var(--text-primary);\n font-size: var(--text-14);\n outline: none;\n }\n .chat-sidebar-search input::placeholder {\n color: var(--text-tertiary);\n }\n .chat-sidebar-search input:focus {\n box-shadow: 0 0 0 2px var(--focus-ring);\n }\n .chat-sidebar-list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n }\n .chat-sidebar-list::-webkit-scrollbar {\n width: var(--scrollbar);\n }\n .chat-sidebar-list::-webkit-scrollbar-track {\n background: transparent;\n }\n .chat-sidebar-list::-webkit-scrollbar-thumb {\n background-color: var(--bg-input);\n border-radius: var(--rounded-10);\n }\n .chat-sidebar-empty,\n .chat-sidebar-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-16) var(--space-12);\n color: var(--text-primary);\n text-align: center;\n }\n .loader {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: var(--space-16);\n border-radius: var(--rounded-4);\n z-index: 10000;\n height: var(--h-full);\n width: var(--w-full);\n background: var(--overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .toaster {\n position: fixed;\n bottom: var(--space-16);\n right: var(--space-16);\n z-index: 1000;\n }\n .new-chat-panel {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n height: var(--h-full);\n }\n .new-chat-panel new-chat,\n .new-chat-panel searchable-list {\n display: block;\n flex: 1;\n min-height: 0;\n height: var(--h-full);\n }\n .picker-back {\n height: 4rem;\n padding: 0 var(--space-16);\n border-bottom: 1px solid var(--border);\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n flex-shrink: 0;\n font-family: var(--font-primary);\n }\n .picker-back button {\n width: 2.25rem;\n height: 2.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n padding: 0;\n }\n .picker-back button img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .picker-back button:hover {\n background: var(--hover-overlay);\n }\n .picker-title {\n margin: 0;\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
1201
+ ChatSidebar.style = ":host {\n display: block;\n height: var(--h-full);\n width: var(--w-full);\n min-width: 0;\n max-width: var(--w-full);\n min-height: 0;\n overflow: hidden;\n font-family: var(--font-primary);\n }\n .chat-sidebar-container {\n display: flex;\n flex-direction: column;\n height: var(--h-full);\n width: var(--w-full);\n max-width: var(--w-full);\n min-width: 0;\n min-height: 0;\n box-sizing: border-box;\n background: var(--bg-primary);\n border-right: 1px solid var(--border);\n z-index: 10;\n font-family: var(--font-primary);\n overflow: hidden;\n }\n .chat-sidebar-top {\n padding: var(--space-16) var(--space-16) var(--space-8);\n }\n .chat-sidebar-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: var(--gap-4);\n }\n .chat-sidebar-header {\n font-size: var(--text-24);\n font-weight: 700;\n letter-spacing: -0.02em;\n color: var(--text-primary);\n margin: 0;\n }\n .chat-sidebar-actions {\n display: flex;\n align-items: center;\n gap: var(--gap-4);\n }\n .icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8);\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n color: var(--icon);\n transition: background-color 0.15s;\n }\n .icon-btn:hover {\n background-color: var(--hover-overlay);\n }\n .icon-btn img {\n width: var(--icon-lg);\n height: var(--icon-lg);\n display: block;\n }\n .more-wrap .icon-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n }\n .more-wrap {\n position: relative;\n }\n .more-menu {\n position: absolute;\n right: 0;\n top: 100%;\n margin-top: var(--gap-4);\n width: 13rem;\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);\n border: 1px solid var(--border-subtle);\n padding: var(--space-8) 0;\n z-index: 50;\n }\n .more-item {\n width: calc(100% - 12px);\n margin: 0 6px;\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n padding: var(--space-8) var(--space-12);\n border: none;\n background: transparent;\n border-radius: var(--rounded-8);\n cursor: pointer;\n text-align: left;\n font-size: var(--text-14);\n color: var(--text-primary);\n }\n .more-item:hover {\n background: var(--brand-soft);\n color: var(--brand);\n }\n .more-item.danger {\n color: var(--danger);\n }\n .more-item.danger:hover {\n background: rgba(250, 0, 0, 0.08);\n color: var(--danger);\n }\n .more-item img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n display: block;\n }\n .more-divider {\n height: 1px;\n background: var(--border-subtle);\n margin: var(--gap-4) var(--space-8);\n }\n .chat-sidebar-header-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .chat-sidebar-header-actions button {\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n }\n .chat-sidebar-header-actions img {\n width: 28px;\n height: 28px;\n }\n .new-chat-overlay {\n position: absolute;\n inset: 0;\n z-index: 20;\n background: var(--bg-primary-color);\n }\n .chat-sidebar-search {\n position: relative;\n margin-bottom: var(--gap-8);\n }\n .chat-sidebar-search input {\n width: var(--w-full);\n box-sizing: border-box;\n padding: var(--space-12) var(--space-12);\n border: none;\n border-radius: var(--rounded-8);\n background: var(--bg-input);\n color: var(--text-primary);\n font-size: var(--text-14);\n outline: none;\n }\n .chat-sidebar-search input::placeholder {\n color: var(--text-tertiary);\n }\n .chat-sidebar-search input:focus {\n box-shadow: 0 0 0 2px var(--focus-ring);\n }\n .chat-sidebar-list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n }\n .chat-sidebar-list::-webkit-scrollbar {\n width: var(--scrollbar);\n }\n .chat-sidebar-list::-webkit-scrollbar-track {\n background: transparent;\n }\n .chat-sidebar-list::-webkit-scrollbar-thumb {\n background-color: var(--bg-input);\n border-radius: var(--rounded-10);\n }\n .chat-sidebar-empty,\n .chat-sidebar-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-16) var(--space-12);\n color: var(--text-primary);\n text-align: center;\n }\n .loader {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: var(--space-16);\n border-radius: var(--rounded-4);\n z-index: 10000;\n height: var(--h-full);\n width: var(--w-full);\n background: var(--overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .toaster {\n position: fixed;\n bottom: var(--space-16);\n right: var(--space-16);\n z-index: 1000;\n }\n .new-chat-panel {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n height: var(--h-full);\n }\n .new-chat-panel new-chat,\n .new-chat-panel searchable-list {\n display: block;\n flex: 1;\n min-height: 0;\n height: var(--h-full);\n }\n .picker-back {\n height: 4rem;\n padding: 0 var(--space-16);\n border-bottom: 1px solid var(--border);\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n flex-shrink: 0;\n font-family: var(--font-primary);\n }\n .picker-back button {\n width: 2.25rem;\n height: 2.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n padding: 0;\n }\n .picker-back button img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .picker-back button:hover {\n background: var(--hover-overlay);\n }\n .picker-title {\n margin: 0;\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .theme-icon { filter: var(--svg-icon-filter); }\n .mqtt-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-left: 8px;\n font-size: 11px;\n font-weight: 500;\n color: var(--text-tertiary);\n letter-spacing: 0.01em;\n user-select: none;\n }\n .mqtt-status-dot {\n width: 8px;\n height: 8px;\n border-radius: 999px;\n flex-shrink: 0;\n background: #ef4444;\n box-shadow: 0 0 0 2px color-mix(in srgb, #ef4444 25%, transparent);\n }\n .mqtt-status-dot.is-connected {\n background: #22c55e;\n box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 25%, transparent);\n }";
1180
1202
 
1181
1203
  const ContextMenu = class {
1182
1204
  constructor(hostRef) {
@@ -1393,7 +1415,8 @@ const GroupCast = class {
1393
1415
  const { conversationTitle, imageFile, selectedUserIds, selectedUsers } = event.detail || {};
1394
1416
  try {
1395
1417
  this.isCreating = true;
1396
- let groupcastImageUrl = GROUP_PROFILE_PLACEHOLDER_IMAGE;
1418
+ // Empty → avatar fallback (avoid broken CDN placeholder X).
1419
+ let groupcastImageUrl = '';
1397
1420
  if (imageFile)
1398
1421
  groupcastImageUrl = await this.getPresignedUrl(imageFile);
1399
1422
  const members = (selectedUserIds || []).map((id) => {
@@ -1732,15 +1755,20 @@ const WebChatHeader = class {
1732
1755
  const imageUrl = newValue.isGroup
1733
1756
  ? newValue.conversationImageUrl
1734
1757
  : (_a = newValue.opponentDetails) === null || _a === void 0 ? void 0 : _a.userProfileImageUrl;
1758
+ // Keep prior store image when details briefly omit it (group create race).
1759
+ const nextId = String((newValue === null || newValue === void 0 ? void 0 : newValue.conversationId) || '');
1760
+ const sameConversation = nextId === String(conversationStore.state.conversationId || '');
1761
+ const resolvedImage = imageUrl ||
1762
+ (sameConversation && newValue.isGroup ? conversationStore.state.conversationImageUrl : '') ||
1763
+ '';
1735
1764
  conversationStore.updateConversationDetails({
1736
1765
  conversationTitle: newValue.isGroup ? newValue.conversationTitle : (_b = newValue.opponentDetails) === null || _b === void 0 ? void 0 : _b.userName,
1737
- // @ts-ignore
1738
- conversationId: newValue.conversationId,
1766
+ conversationId: nextId,
1739
1767
  isGroup: newValue.isGroup,
1740
- conversationImageUrl: imageUrl || '',
1768
+ conversationImageUrl: resolvedImage,
1741
1769
  opponentDetails: newValue.opponentDetails,
1742
1770
  });
1743
- this.displayImageUrl = imageUrl || '';
1771
+ this.displayImageUrl = resolvedImage;
1744
1772
  }
1745
1773
  }
1746
1774
  handleDocumentClick(e) {
@@ -1819,10 +1847,10 @@ const WebChatHeader = class {
1819
1847
  const groupcast = this.isGroupcast();
1820
1848
  const isGroup = !!((_a = this.conversationDetails) === null || _a === void 0 ? void 0 : _a.isGroup) && !groupcast;
1821
1849
  const showBlock = !groupcast && !((_b = this.conversationDetails) === null || _b === void 0 ? void 0 : _b.isGroup);
1822
- return (index.h(index.Fragment, { key: '57a94c04c51d4f734dd70f0b66de3fcf08152816' }, index.h("div", { key: '7763a5e9b131839e5a5f150763ccbee42f2b83bf', class: "head-container", style: {
1850
+ return (index.h(index.Fragment, { key: 'e4989621054b476ce51c0e9087a5ca30106af3ba' }, index.h("div", { key: 'fb93b8d0bfbc24b6f19d3529a2542d6b54749234', class: "head-container", style: {
1823
1851
  backgroundColor: this.headerBgColor || undefined,
1824
1852
  color: this.headerUsernameColor || undefined,
1825
- } }, index.h("div", { key: '0febc95ec5b3cd047f3efe822419d84e1b8649cf', class: "head-left" }, index.h("button", { key: '9944b8aa9869d8232f68f70eab151b83b6dcd42f', class: "back-button", type: "button", onClick: () => typeof this.onBackButtonClick === 'function' && this.onBackButtonClick(), "aria-label": "Back" }, index.h("img", { key: '143b10007a063bb1b1d0f2338ada2ff976c2032d', class: "theme-icon", src: chatAssets.Left_Arrow, alt: "" })), index.h("div", { key: '90913639f468f40c2f5086541e23af179a464e4a', class: "identity", onClick: this.handleTextClick }, index.h("profile-avatar", { key: '8361c0dfeab12d5bc9964caa313313abeaa33bce', src: this.avatarSrc(), name: this.title(), size: "var(--avatar-sm)", isGroup: this.avatarIsGroup() }), index.h("div", { key: '2eea1c6e4694ec49db17087318c6e29efeed6866', class: "text-container" }, index.h("div", { key: '3815b900951bdd4e9fa206a8b36b4345c5ad1853', class: "title" }, this.title()), index.h("div", { key: '98e18e86abb970c5853b56ffa8eb6ef8a755d2ef', class: "subtitle", style: { color: this.headerLastSeenColor || undefined } }, this.subtitle(formattedLastSeen))))), index.h("div", { key: 'a1f43c9e9cce0af81a08c0dff7cbf800d40c7d5e', class: "actions" }, !groupcast ? (index.h("button", { type: "button", class: "icon-btn", title: "Search in conversation", onClick: () => this.openSearch() }, index.h("img", { class: "theme-icon", src: chatAssets.Search, alt: "" }))) : null, index.h("div", { key: '1eb744c5e5df5d94203fd1c534626d959322ed46', class: "more-wrap" }, index.h("button", { key: '0f6649a741e2e72adb57567296326dc2c4c15537', type: "button", class: "icon-btn", title: "Menu", "aria-label": "Menu", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.toggleMenu }, index.h("img", { key: '92d40afb11d9a96ff31b9fc175520fb5c5188618', class: "theme-icon", src: chatAssets.Three_Dots, alt: "" })), this.menuOpen ? (index.h("div", { class: "more-menu", role: "menu" }, isGroup ? (index.h(index.Fragment, null, index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openAddMember }, index.h("img", { class: "theme-icon", src: chatAssets.Add_User, alt: "" }), index.h("span", null, "Add member")), index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openGroupInfo }, index.h("img", { class: "theme-icon", src: chatAssets.Info, alt: "" }), index.h("span", null, "Group info")))) : null, !groupcast ? (index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.openSearch() }, index.h("img", { class: "theme-icon", src: chatAssets.Search, alt: "" }), index.h("span", null, "Search"))) : null, index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.doCloseChat() }, index.h("img", { class: "theme-icon", src: chatAssets.CloseButton, alt: "" }), index.h("span", null, "Close chat")), !groupcast ? (index.h(index.Fragment, null, index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.handleClearChat }, index.h("img", { class: "theme-icon", src: chatAssets.Clear_Chat, alt: "" }), index.h("span", null, "Clear chat")), index.h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.deleteChat }, index.h("img", { class: "theme-icon", src: chatAssets.Delete, alt: "" }), index.h("span", null, "Delete chat")))) : null, isGroup ? (index.h(index.Fragment, null, index.h("div", { class: "more-divider" }), index.h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.exitGroup }, index.h("img", { class: "theme-icon", src: chatAssets.Logout, alt: "" }), index.h("span", null, "Exit group")))) : null, showBlock ? (index.h(index.Fragment, null, index.h("div", { class: "more-divider" }), index.h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.doBlock }, index.h("img", { class: "theme-icon", src: chatAssets.Block_User, alt: "" }), index.h("span", null, this.isBlocked ? 'Unblock Chat' : 'Block Chat')))) : null)) : null))), this.isLoading && (index.h("div", { key: 'b7308b2385393a374edbb60a72a04f4eb12ba828', class: "loading-overlay" }, index.h("spinner-loader", { key: '93fe73e5a422c0e75827f8605c6458b80bf2953e', height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))));
1853
+ } }, index.h("div", { key: '069215af70baf46d900f48ddda1232bd861495a1', class: "head-left" }, index.h("button", { key: '5841d03c58c113f4b132226490f9001ca4326a79', class: "back-button", type: "button", onClick: () => typeof this.onBackButtonClick === 'function' && this.onBackButtonClick(), "aria-label": "Back" }, index.h("img", { key: '45bd54812559e8777df86e946c3123d431e301b3', class: "theme-icon", src: chatAssets.Left_Arrow, alt: "" })), index.h("div", { key: 'faf94dd0d56d0ec3c97731b22732bd3f5fe40cb2', class: "identity", onClick: this.handleTextClick }, index.h("profile-avatar", { key: '2e59dafbe6027af70a7b8c0d92e0a9fefcb8c76f', src: this.avatarSrc(), name: this.title(), size: "var(--avatar-sm)", isGroup: this.avatarIsGroup() }), index.h("div", { key: '33fadb7d1f78386b386877597ddf37e0966fb885', class: "text-container" }, index.h("div", { key: '9e324b54d9361aefe765834d3fe22057bf362e60', class: "title" }, this.title()), index.h("div", { key: 'dfcd78f382fac8d2fea01fa32225815c52e947c7', class: "subtitle", style: { color: this.headerLastSeenColor || undefined } }, this.subtitle(formattedLastSeen))))), index.h("div", { key: 'f509642674589183ec7b51c449ad347000427e42', class: "actions" }, !groupcast ? (index.h("button", { type: "button", class: "icon-btn", title: "Search in conversation", onClick: () => this.openSearch() }, index.h("img", { class: "theme-icon", src: chatAssets.Search, alt: "" }))) : null, index.h("div", { key: 'e5364213c7fa7c928d5a514bf3ebd7c1504338a0', class: "more-wrap" }, index.h("button", { key: '59f70c417841e40235c66d4133c86953499eda73', type: "button", class: "icon-btn", title: "Menu", "aria-label": "Menu", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.toggleMenu }, index.h("img", { key: 'ca10b629d529026fc06dd0938d1ed68b01d81513', class: "theme-icon", src: chatAssets.Three_Dots, alt: "" })), this.menuOpen ? (index.h("div", { class: "more-menu", role: "menu" }, isGroup ? (index.h(index.Fragment, null, index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openAddMember }, index.h("img", { class: "theme-icon", src: chatAssets.Add_User, alt: "" }), index.h("span", null, "Add member")), index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openGroupInfo }, index.h("img", { class: "theme-icon", src: chatAssets.Info, alt: "" }), index.h("span", null, "Group info")))) : null, !groupcast ? (index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.openSearch() }, index.h("img", { class: "theme-icon", src: chatAssets.Search, alt: "" }), index.h("span", null, "Search"))) : null, index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.doCloseChat() }, index.h("img", { class: "theme-icon", src: chatAssets.CloseButton, alt: "" }), index.h("span", null, "Close chat")), !groupcast ? (index.h(index.Fragment, null, index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.handleClearChat }, index.h("img", { class: "theme-icon", src: chatAssets.Clear_Chat, alt: "" }), index.h("span", null, "Clear chat")), index.h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.deleteChat }, index.h("img", { class: "theme-icon", src: chatAssets.Delete, alt: "" }), index.h("span", null, "Delete chat")))) : null, isGroup ? (index.h(index.Fragment, null, index.h("div", { class: "more-divider" }), index.h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.exitGroup }, index.h("img", { class: "theme-icon", src: chatAssets.Logout, alt: "" }), index.h("span", null, "Exit group")))) : null, showBlock ? (index.h(index.Fragment, null, index.h("div", { class: "more-divider" }), index.h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.doBlock }, index.h("img", { class: "theme-icon", src: chatAssets.Block_User, alt: "" }), index.h("span", null, this.isBlocked ? 'Unblock Chat' : 'Block Chat')))) : null)) : null))), this.isLoading && (index.h("div", { key: '8949c76692e5f0bd8d95f6ea077e2f4e45785348', class: "loading-overlay" }, index.h("spinner-loader", { key: '34003652980ba02171ced3b7302bc973dda5f965', height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))));
1826
1854
  }
1827
1855
  get el() { return index.getElement(this); }
1828
1856
  static get watchers() { return {
@@ -5713,38 +5741,18 @@ const ChatFooter = class {
5713
5741
  var _a, _b, _c;
5714
5742
  const allPayloads = [];
5715
5743
  const uploadPromises = presignedUrls.map(async (urlDetails, index) => {
5716
- let mediaId, mediaUrl, thumbnailUrl, mediaPresignedUrl;
5717
- if (this.isGroupcast) {
5718
- mediaUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
5719
- mediaPresignedUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.presignedUrl;
5720
- mediaId = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
5721
- thumbnailUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
5722
- }
5723
- else {
5724
- ({ mediaPresignedUrl, mediaId, mediaUrl, thumbnailUrl } = urlDetails);
5725
- }
5726
5744
  const attachmentPayload = attachments[index];
5727
- const fileExtensionType = attachmentPayload.mimeType.split('/')[1];
5728
- const newPayload = {
5729
- mediaId,
5730
- mediaUrl,
5731
- thumbnailUrl,
5732
- mediaType: attachmentPayload.mediaType,
5733
- nameWithExtension: attachmentPayload.nameWithExtension,
5734
- name: attachmentPayload.nameWithExtension,
5735
- mimeType: attachmentPayload.mimeType,
5736
- extension: fileExtensionType,
5737
- size: attachmentPayload.size,
5738
- attachmentType: 0,
5739
- };
5740
- allPayloads.push(newPayload);
5741
- await fetch(mediaPresignedUrl, {
5742
- method: 'PUT',
5743
- body: attachmentPayload.file,
5744
- headers: {
5745
- 'Content-Type': attachmentPayload.mimeType,
5746
- },
5745
+ if (!attachmentPayload)
5746
+ return;
5747
+ // Groupcast presign shape differs — map onto the shared uploader contract.
5748
+ const normalized = this.isGroupcast
5749
+ ? Object.assign(Object.assign({}, urlDetails), { mediaPresignedUrl: (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.presignedUrl) || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaPresignedUrl), mediaId: (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaId) || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl), thumbnailUrl: (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.thumbnailUrl) || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl), thumbnailPresignedUrl: urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.thumbnailPresignedUrl }) : urlDetails;
5750
+ const payload = await sendMedia.uploadPresignedMediaAttachment({
5751
+ urlDetails: normalized,
5752
+ attachment: attachmentPayload,
5747
5753
  });
5754
+ if (payload)
5755
+ allPayloads.push(payload);
5748
5756
  });
5749
5757
  await Promise.all(uploadPromises);
5750
5758
  // One attachment → typed; 2–5 together → Multiple (same message)
@@ -5843,7 +5851,7 @@ const ChatFooter = class {
5843
5851
  const webChat = index$1.findWebChatHost(this.el);
5844
5852
  const hasCustomReply = (webChat ? index$1.hasNamedSlot(webChat, 'reply-preview') : false) || index$1.hasNamedSlot(this.el, 'reply-preview');
5845
5853
  const showAttachment = this.attachmentDetails || this.showCamera;
5846
- return (index.h(index.Host, { key: 'de774ccefb329af2fe95f29fc90fa4cad874af9c', class: { 'attachment-open': !!showAttachment } }, index.h("div", { key: '0e8d6829943505e92e45c38980c827b57366902c', class: "chat-footer-container" }, showAttachment ? (index.h("slot", { name: "attachment-preview" }, index.h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, "onattachment-removed": this.handleRemoveAttachment, "oncamera-retake": this.handleCameraRetake, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBorderRadius: "10px", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData }))) : (index.h(index.Fragment, null, hasCustomReply ? index.h("slot", { name: "reply-preview" }) : null, index.h("slot", { name: "composer-input" }, !hasCustomReply && this.replyMessage ? (index.h("reply-block", { messageBody: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.body, messageInfo: this.replyMessage, senderName: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) === ((_d = (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.senderInfo) === null || _d === void 0 ? void 0 : _d.userId)
5854
+ return (index.h(index.Host, { key: '41aa3584baa28864ebbaa4177f9109ab89fc1afa', class: { 'attachment-open': !!showAttachment } }, index.h("div", { key: '7f5c23e432043756124aaf3af2956764eaa5481d', class: "chat-footer-container" }, showAttachment ? (index.h("slot", { name: "attachment-preview" }, index.h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, "onattachment-removed": this.handleRemoveAttachment, "oncamera-retake": this.handleCameraRetake, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBorderRadius: "10px", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData }))) : (index.h(index.Fragment, null, hasCustomReply ? index.h("slot", { name: "reply-preview" }) : null, index.h("slot", { name: "composer-input" }, !hasCustomReply && this.replyMessage ? (index.h("reply-block", { messageBody: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.body, messageInfo: this.replyMessage, senderName: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) === ((_d = (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.senderInfo) === null || _d === void 0 ? void 0 : _d.userId)
5847
5855
  ? 'You'
5848
5856
  : (_f = (_e = this.replyMessage) === null || _e === void 0 ? void 0 : _e.senderInfo) === null || _f === void 0 ? void 0 : _f.userName, onIconClick: this.handleremoveReplyMessage })) : null, index.h("div", { class: "composer-wrap", key: this.inputKey, ref: el => (this.composerWrapRef = el) }, this.showEmojiPicker ? (index.h("div", { class: "emoji-panel", style: this.emojiPanelStyle }, index.h("div", { class: "emoji-panel-header" }, index.h("span", null, "Emoji"), index.h("button", { class: "emoji-panel-close", type: "button", "aria-label": "Close", onClick: this.handleEmojiToggle }, "\u00D7")), index.h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, index.h("div", { class: { composer: true, recording: this.isRecording } }, this.isRecording ? (index.h("div", { class: "rec-body" }, index.h("div", { class: "rec-left" }, index.h("button", { class: "rec-icon-btn danger", type: "button", title: "Delete recording", "aria-label": "Delete recording", onClick: this.handleRecDelete }, index.h("img", { class: "theme-icon", src: chatAssets.Delete, alt: "" })), index.h("div", { class: "rec-timer-wrap" }, index.h("span", { class: { 'rec-dot': true, live: !this.isPaused } }), index.h("span", { class: "rec-timer" }, this.formatRecTime(this.recordingSeconds)))), index.h("div", { class: "rec-wave" }, index.h("audio-bubble", { liveRecord: true, audioProgressColor: "#2563eb", audioWaveColor: "#2563eb", ref: el => (this.recBubble = el), onRecordingProgress: this.onRecordingProgress, onRecordingError: this.onRecordingError })), index.h("button", { class: { 'rec-icon-btn': true, 'rec-toggle': true, pause: !this.isPaused }, type: "button", title: this.isPaused ? 'Resume recording' : 'Pause recording', "aria-label": this.isPaused ? 'Resume recording' : 'Pause recording', onClick: this.handleRecPauseToggle }, index.h("img", { class: "theme-icon", src: this.isPaused ? PlayIcon : PauseIcon, alt: "" })), index.h("button", { class: "rec-send", type: "button", title: "Send voice note", "aria-label": "Send voice note", onClick: this.handleRecSend }, index.h("img", { src: chatAssets.Send, alt: "" })))) : (index.h(index.Fragment, null, index.h("div", { class: "attach-wrap" }, index.h("button", { class: "icon-btn", type: "button", title: "Attach file", "aria-label": "Attach", onClick: this.handleAttachClick }, index.h("img", { src: chatAssets.Attachment, alt: "" })), this.showAttachMenu ? (index.h("div", { class: "attach-menu", style: this.attachMenuStyle }, index.h("button", { class: "attach-opt", type: "button", onClick: this.pickDocument }, index.h("span", { class: "attach-opt-icon attach-opt-icon--doc" }, index.h("img", { src: DocumentsIcon, alt: "" })), index.h("span", null, "Document")), index.h("button", { class: "attach-opt", type: "button", onClick: this.pickPhotos }, index.h("span", { class: "attach-opt-icon attach-opt-icon--photos" }, index.h("img", { class: "theme-icon", src: PhotosIcon, alt: "" })), index.h("span", null, "Photos & videos")), index.h("button", { class: "attach-opt", type: "button", onClick: this.pickCamera }, index.h("span", { class: "attach-opt-icon attach-opt-icon--camera" }, index.h("img", { class: "theme-icon", src: CameraIcon, alt: "" })), index.h("span", null, "Camera")))) : null), index.h("button", { class: "icon-btn", type: "button", title: "Emojis", "aria-label": "Emojis", onClick: this.handleEmojiToggle }, index.h("img", { src: chatAssets.Smile, alt: "" })), index.h("input", { class: "file-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv,.mp3,.wav,.m4a,.aac,.ogg", ref: el => (this.mediaInputRef = el), onChange: this.handleNativeFileChange }), index.h("input", { class: "file-input", type: "file", multiple: true, accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.rtf,application/*", ref: el => (this.docInputRef = el), onChange: this.handleNativeFileChange }), index.h("textarea", { class: "composer-input", rows: 1, placeholder: "Type a message", value: this.messageBody, ref: el => (this.inputRef = el), onInput: this.handleComposerInput, onKeyDown: this.handleComposerKeyDown }), this.messageBody.trim() ? (index.h("button", { class: "icon-btn", type: "button", title: "Send", "aria-label": "Send", onClick: this.handleSendMessage }, index.h("img", { src: chatAssets.Send, alt: "" }))) : (index.h("button", { class: "icon-btn", type: "button", title: "Voice note", "aria-label": "Voice note", onClick: this.handleMicClick }, index.h("img", { src: chatAssets.Microphone, alt: "" })))))))))))));
5849
5857
  }
@@ -7714,7 +7722,7 @@ const WebChatBody = class {
7714
7722
  return (index.h("document-message", Object.assign({}, props, { docType: attachment === null || attachment === void 0 ? void 0 : attachment.mimeType, fileName: attachment === null || attachment === void 0 ? void 0 : attachment.name, href: attachment === null || attachment === void 0 ? void 0 : attachment.mediaUrl, width: "220px", padding: "10px", docName: attachment === null || attachment === void 0 ? void 0 : attachment.name })));
7715
7723
  }
7716
7724
  if (((_c = attachment === null || attachment === void 0 ? void 0 : attachment.mimeType) === null || _c === void 0 ? void 0 : _c.startsWith('video/')) || (message === null || message === void 0 ? void 0 : message.customType) === 'AttachmentMessage:Video') {
7717
- return (index.h("video-message", Object.assign({}, props, { height: '220px', width: '250px', padding: "10px 10px 30px 10px", type: attachment === null || attachment === void 0 ? void 0 : attachment.mimeType, videoSrc: attachment === null || attachment === void 0 ? void 0 : attachment.mediaUrl })));
7725
+ return (index.h("video-message", Object.assign({}, props, { height: '220px', width: '250px', padding: "10px 10px 30px 10px", type: attachment === null || attachment === void 0 ? void 0 : attachment.mimeType, videoSrc: attachment === null || attachment === void 0 ? void 0 : attachment.mediaUrl, poster: (attachment === null || attachment === void 0 ? void 0 : attachment.thumbnailUrl) || '' })));
7718
7726
  }
7719
7727
  if (((_d = attachment === null || attachment === void 0 ? void 0 : attachment.mimeType) === null || _d === void 0 ? void 0 : _d.startsWith('image/')) || (message === null || message === void 0 ? void 0 : message.customType) === 'AttachmentMessage:Image') {
7720
7728
  return (index.h("image-message", Object.assign({}, props, { height: '220px', width: '250px', padding: "10px 10px 10px 10px", imageSrc: attachment === null || attachment === void 0 ? void 0 : attachment.mediaUrl, borderWidth: '5px', borderColor: isSelf ? 'var(--bg-grey-color)' : '#F2F2F2', borderStyle: 'solid', allAttachments: this.allAttachments, onImageClick: this.onMediaClick, loadingMediaGallery: this.loadingMediaGallery })));
@@ -8114,7 +8122,7 @@ const WebChatBody = class {
8114
8122
  var _a, _b, _c, _d, _e, _f, _g, _h;
8115
8123
  const currentConversation = (_a = this.conversationList) === null || _a === void 0 ? void 0 : _a.find(conversation => (conversation === null || conversation === void 0 ? void 0 : conversation.conversationId) === this.selectedConversationId);
8116
8124
  const shouldShowPlaceholder = ((_b = this.allMessages) === null || _b === void 0 ? void 0 : _b.length) === 1 && ((_d = (_c = this.allMessages) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.action) !== 'clearConversation' && ((_e = this.allMessages) === null || _e === void 0 ? void 0 : _e.some(message => (message === null || message === void 0 ? void 0 : message.action) === 'clearConversation'));
8117
- return (index.h("div", { key: '04d498fc21493a71497a28f855d184eb14e32763', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, (this.showScrollButton || this.newMessageNotification) && (index.h("div", { key: '42c9a73991cfb913403d104dce510ba6ca9eb5bb', class: "jump-latest", onClick: this.scrollToBottom, role: "button", "aria-label": "Jump to latest messages", style: {
8125
+ return (index.h("div", { key: 'fdb79d6e91df3996d26a8e34ca2294c5a9748911', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, (this.showScrollButton || this.newMessageNotification) && (index.h("div", { key: '001e8486fcc83b0a7169cc00769c3ad684f045c3', class: "jump-latest", onClick: this.scrollToBottom, role: "button", "aria-label": "Jump to latest messages", style: {
8118
8126
  position: 'sticky',
8119
8127
  bottom: '1rem',
8120
8128
  marginLeft: 'auto',
@@ -8131,7 +8139,7 @@ const WebChatBody = class {
8131
8139
  cursor: 'pointer',
8132
8140
  boxShadow: '0 2px 8px rgba(0,0,0,0.14)',
8133
8141
  zIndex: '100',
8134
- } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (index.h("div", { key: '2004cdee625a06da51879110339379878072d93f', style: {
8142
+ } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (index.h("div", { key: '3774b25b962a80d916fa2959c371d566ee242164', style: {
8135
8143
  position: 'absolute',
8136
8144
  bottom: '22px',
8137
8145
  right: '-2px',
@@ -8145,7 +8153,7 @@ const WebChatBody = class {
8145
8153
  justifyContent: 'center',
8146
8154
  fontSize: '12px',
8147
8155
  padding: '0 4px',
8148
- } })), index.h("svg", { key: '12e09d0c2ac7327e64ae671ebb1ce406ca0a5538', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'e67f759077573794ea5923aeaff2a18143ec1887', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (index.h("div", { key: 'ad56d354279bc44df4e53a583976cb02f208bdc8', style: {
8156
+ } })), index.h("svg", { key: '6453eb80f1157871dc8e0491a1ea3062dd7b615e', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '7e79caf3621cce0c12c5979bf8e26c6c38cd633f', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (index.h("div", { key: 'df3d217231d691f2a1d1ec80c0daef9a2938e543', style: {
8149
8157
  display: 'flex',
8150
8158
  flexDirection: 'column',
8151
8159
  alignItems: 'center',
@@ -8155,7 +8163,7 @@ const WebChatBody = class {
8155
8163
  textAlign: 'center',
8156
8164
  color: 'var(--text-secondary-color)',
8157
8165
  marginTop: '20px',
8158
- } }, index.h("img", { key: 'bd08d76f2db678ee4af1aae5d39bf0ae3c083b6f', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), index.h("div", { key: '1fbb6c63dbc25065bf7248c4e03503b6693901d4', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, index.h("span", { key: 'ffdfd34864bfa277e433ced72e0de8670301b86b', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), index.h("span", { key: '5c3827cbd2ab1dacb9f75f248d7bbf4c83b33e89', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (index.h("spinner-loader", { key: '88169d80e7d17419beb4094b3ce89f91927d8784', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
8166
+ } }, index.h("img", { key: '632263e5acde91cf1c7d07f7a24c65e28272356c', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), index.h("div", { key: 'e4c81c8c4abc260616693deecc9f9410269c07e1', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, index.h("span", { key: '0b00d9f2b07732b00bad8dfcf01877bd6591b5c0', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), index.h("span", { key: '65e2ea1e6ba9c56d37cb504f97667756bd6ee593', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (index.h("spinner-loader", { key: '1810734057073e94d00f2d7eb38c0326afed8482', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
8159
8167
  ((_h = this.userMetaData) === null || _h === void 0 ? void 0 : _h.userId) &&
8160
8168
  (() => {
8161
8169
  const total = this.allMessages.length;