@bcrumbs.net/bc-chat 1.0.61 → 1.0.62

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.
package/build/index.es.js CHANGED
@@ -1,10 +1,10 @@
1
- import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCallback as i,useState as r,useRef as a,useEffect as s,useMemo as c,useLayoutEffect as l}from"react";import d from"@emotion/styled";import g from"react-markdown";import p from"rehype-raw";import{franc as h}from"franc-min";import{v4 as m}from"uuid";import{BlobServiceClient as u,AnonymousCredential as b}from"@azure/storage-blob";const C={MaxFileSize:52428800,SupportedFormats:["png","jpg","jpeg","gif","bmp","pdf","doc","xls","xlsx","docx","ppt","pptx","avi","m4a","m4v","mov","mp4","wav","wma","wmv"],SupportedImageFormats:["png","jpg","jpeg","gif","bmp","webp"],SupportedAudioFormats:["mp3","acc","m4a","ogg","amr","webm","m4a"]},x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAACXBIWXMAAAsSAAALEgHS3X78AAAFa0lEQVR42u2bX0xTVxzHvzqqVOqQrtJC2gmF4ooMWNg6FEJE3NhClpnG8aBzsTHugbgsLltiJg/6NI3J5pLFLbpIIjEjLuriiH9qnESlI6BQWcGsSEvT2lK8q0CvFChme1hwXs5tKfTWXfT83s6fe3Lz6fn9zvl9f7eL9L/u/xvPuS0GNQqBQqAQKAQKYaYlzfdBk0qPtzRFnL7L7ttoGLzz/EBQSlNRrMzj9HUzA9QdaEygECgECoFCoBAoBAqBQqAQKASaRQph6UlLUCJToCjtZcgkydCmqh6PPQyPo39kEP7QCDoeeGCbCD5bEN5dkQljlgFl6sKo854c97EMfvf2osl1K+FAEgqhPEWBuvyNRModi2XIFDDmVcCYV4FLjnZ8Zf8NQ1OTCysmmFR6HK2smxeAmVatNaC56lPUKrIXzk74Jv8dVGsNEcfZcAh3A25OX4pECp1cE/EZmUSKfaXbUGi/hnp7i7gh7M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XrD3Fjwm7Gw/iWOGrYQgWq01oFprgI9l0D3kgD80DEfQj+DUBFTJqVBKU5GTqkKRUhdVH+gLuLGz/aSgxVnBIQxNTUYEAfxbbY70C89mrZ5u7LWdF7w6nZDAODQ1ifctDThjvybIemw4hH1tjdhp/SUh5fmEfp9Qb29Bk+sWduSURa1SRzIfy+CyqzPmOuZTh+APjRCnQTBMvqhtIojdvRdR0N+K9StzUKTIgnZFJq9LTJfsHSODaB2y48KwF0/DFtE/h1JliUKgECgECoFCoBAi2D8QCAe+XuY7HAAAAABJRU5ErkJggg==",f=["🤓","🙃","😕","â˜šī¸","😲","đŸ˜ŗ","😠","😇","😀","😁","😂","đŸ¤Ŗ","😃","😄","😅","😆","😉","😊","😏","đŸ˜Ŗ","đŸ˜Ĩ","😮","😴","😌","😋","😎","😍","🙂","🤗","🤔","😐","😑","đŸ˜ļ","🙄"],v="bc-message-list-content";const w=d.div`
1
+ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useCallback as o,useState as a,useRef as r,useEffect as s,useMemo as c,useLayoutEffect as l}from"react";import d from"@emotion/styled";import g from"react-markdown";import p from"rehype-raw";import{franc as h}from"franc-min";import{v4 as m}from"uuid";import{BlobServiceClient as u,AnonymousCredential as b}from"@azure/storage-blob";const C={MaxFileSize:52428800,SupportedFormats:["png","jpg","jpeg","gif","bmp","pdf","doc","xls","xlsx","docx","ppt","pptx","avi","m4a","m4v","mov","mp4","wav","wma","wmv"],SupportedImageFormats:["png","jpg","jpeg","gif","bmp","webp"],SupportedAudioFormats:["mp3","acc","m4a","ogg","amr","webm","m4a"]},x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAACXBIWXMAAAsSAAALEgHS3X78AAAFa0lEQVR42u2bX0xTVxzHvzqqVOqQrtJC2gmF4ooMWNg6FEJE3NhClpnG8aBzsTHugbgsLltiJg/6NI3J5pLFLbpIIjEjLuriiH9qnESlI6BQWcGsSEvT2lK8q0C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JzigrBJW8ppM48mUd/VNGcQjlEvDjmvE67AJ9t3B1zigqCTawhV2DIWQH1XExyj3tjyj4E27Lp9Gswjrp/vyCnjvaqfinMnJERP+LxkM1qufMsJVpaxACydP2HbyjzUaEqgfTGTSME7/H/iylAv4QLTN0I+8fWyq1OcypJMIsXh14zY0tFEjDXet6Pxvv1xbiFLWgr3eBB3JtmI65WnKLD/za0xaxeiuSwVK/NwrHgT57SYaZaxAMyjvlkBfF1u4k2Svr/dLEhVSlAIVr+d0y5TF+KYYeu8lZ9d6uKIAFo93YJJ7oK6Q2PfNaKSpJNrcLSyDpcc7TjtuhmT+mxS6fHhK5XIkPHD6wu4sdd2XrD3Fjwm7Gw/iWOGrYQgWq01oFprgI9l0D3kgD80DEfQj+DUBFTJqVBKU5GTqkKRUhdVH+gLuLGz/aSgxVnBIQxNTUYEAfxbbY70C89mrZ5u7LWdF7w6nZDAODQ1ifctDThjvybIemw4hH1tjdhp/SUh5fmEfp9Qb29Bk+sWduSURa1SRzIfy+CyqzPmOuZTh+APjRCnQTBMvqhtIojdvRdR0N+K9StzUKTIgnZFJq9LTJfsHSODaB2y48KwF0/DFtE/h1JliUKgECgECoFCoBAi2D8QCAe+XuY7HAAAAABJRU5ErkJggg==",f=["🤓","🙃","😕","â˜šī¸","😲","đŸ˜ŗ","😠","😇","😀","😁","😂","đŸ¤Ŗ","😃","😄","😅","😆","😉","😊","😏","đŸ˜Ŗ","đŸ˜Ĩ","😮","😴","😌","😋","😎","😍","🙂","🤗","🤔","😐","😑","đŸ˜ļ","🙄"],v="bc-message-list-content";const y=d.div`
2
2
  font-size: var(--bc-chat-fontSize-xs);
3
3
  opacity: 0.7;
4
4
  font-weight: 400;
5
5
  display: inline;
6
6
  white-space: nowrap;
7
- `,y=({createdAt:n})=>e(w,{children:new Date(n).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}),M=()=>n("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M1.5 12.5L5.57574 16.5757C5.81005 16.8101 6.18995 16.8101 6.42426 16.5757L9 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e("path",{d:"M16 7L12 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e("path",{d:"M7 12L11.5757 16.5757C11.8101 16.8101 12.1899 16.8101 12.4243 16.5757L22 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),A={delivered:M,failed:()=>e("svg",{width:"12",height:"12",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),read:M,sent:()=>e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M5 13L9 17L19 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),pending:()=>e("svg",{width:"12",height:"12",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})},k=({message:n})=>{if(!n.status)return null;const t=A[n.status];return e("div",{className:`status-icon ${n.status||""}`,children:e(t,{})})},L=d.div`
7
+ `,w=({createdAt:n})=>e(y,{children:new Date(n).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}),M=()=>n("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M1.5 12.5L5.57574 16.5757C5.81005 16.8101 6.18995 16.8101 6.42426 16.5757L9 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e("path",{d:"M16 7L12 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e("path",{d:"M7 12L11.5757 16.5757C11.8101 16.8101 12.1899 16.8101 12.4243 16.5757L22 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),A={delivered:M,failed:()=>e("svg",{width:"12",height:"12",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),read:M,sent:()=>e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M5 13L9 17L19 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),pending:()=>e("svg",{width:"12",height:"12",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})},k=({message:n})=>{if(!n.status)return null;const t=A[n.status];return e("div",{className:`status-icon ${n.status||""}`,children:e(t,{})})},I=d.div`
8
8
  padding: 8px;
9
9
  margin-bottom: 4px;
10
10
  border-left: 3px solid var(--bc-border-primary);
@@ -20,7 +20,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
20
20
  max-width: 90%;
21
21
  min-width: 100px;
22
22
  width: auto;
23
- `,I=({className:n,context:t,isMyMessage:o,language:r})=>{const a=i((()=>{const e=document.getElementById(v),n=document.getElementById(t.replyToId);e&&n&&(e.style.scrollBehavior="smooth",n.scrollIntoView())}),[t.replyToId]);return e(L,{className:n,isMyMessage:o,language:r,onClick:a,children:"image"===t.replyToType?e("img",{src:t.replyToContent,alt:"Media preview",style:{width:"30px",height:"30px",objectFit:"cover",marginLeft:"8px",verticalAlign:"middle"}}):t.replyToContent})},E=d.div`
23
+ `,L=({className:n,context:t,isMyMessage:i,language:a})=>{const r=o((()=>{const e=document.getElementById(v),n=document.getElementById(t.replyToId);e&&n&&(e.style.scrollBehavior="smooth",n.scrollIntoView())}),[t.replyToId]);return e(I,{className:n,isMyMessage:i,language:a,onClick:r,children:"image"===t.replyToType?e("img",{src:t.replyToContent,alt:"Media preview",style:{width:"30px",height:"30px",objectFit:"cover",marginLeft:"8px",verticalAlign:"middle"}}):t.replyToContent})},E=d.div`
24
24
  position: relative;
25
25
  background-image: ${e=>e.isMyMessage?"linear-gradient(104deg,var(--bc-chat-my-message-background-start-color),var(--bc-chat-my-message-background-end-color))":"linear-gradient(104deg,var(--bc-chat-other-message-background-start-color),var(--bc-chat-other-message-background-end-color))"};
26
26
  color: ${e=>e.isMyMessage?"var(--bc-chat-my-message-text-color)":"var(--bc-chat-other-message-text-color)"};
@@ -28,22 +28,24 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
28
28
  border-width: 1px;
29
29
  border-style: solid;
30
30
  border-radius: 8px;
31
- padding: 8px 16px;
31
+ padding: 6px 12px;
32
32
  max-width: 80%;
33
33
  display: inline-block;
34
34
  word-break: break-word;
35
35
  text-decoration: none;
36
36
  background-color: transparent;
37
- ${e=>e.isMyMessage?"border-bottom-right-radius: 0;":"border-bottom-left-radius: 0;"}
38
-
37
+ ${e=>"AR"===e.language&&e.isMyMessage||"AR"!==e.language&&!e.isMyMessage?"border-bottom-left-radius: 0;":""}
38
+ ${e=>"AR"!==e.language&&e.isMyMessage||"AR"===e.language&&!e.isMyMessage?"border-bottom-right-radius: 0;":""}
39
39
  &::after {
40
40
  content: '';
41
41
  position: absolute;
42
42
  bottom: -1px;
43
- ${e=>e.isMyMessage?"right: -8px;":"left: -8px;"}
43
+ ${e=>"AR"===e.language&&e.isMyMessage||"AR"!==e.language&&!e.isMyMessage?"left: -8px;":""}
44
+ ${e=>"AR"!==e.language&&e.isMyMessage||"AR"===e.language&&!e.isMyMessage?"right: -8px;":""}
44
45
  width: 8px;
45
46
  height: 8px;
46
47
  background-image: ${e=>e.isMyMessage?"url(data:image/svg+xml,%3Csvg%20width%3D%226%22%20height%3D%228%22%20viewBox%3D%220%200%206%208%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5.51475%206.81291C3.16611%205.49945%200%203.14549%200%206.97374e-06V8.00001L5.24113%208.00001C5.79778%208.00001%206.00058%207.08461%205.51475%206.81291Z%22%20fill%3D%22%23258694%22%2F%3E%3C%2Fsvg%3E)":"url(data:image/svg+xml,%3Csvg%20width%3D%226%22%20height%3D%228%22%20viewBox%3D%220%200%206%208%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M0.485255%206.81291C2.83389%205.49945%206%203.14549%206%206.97374e-06V8.00001L0.758872%208.00001C0.202224%208.00001%20-0.000580311%207.08461%200.485255%206.81291Z%22%20fill%3D%22%23E5E7EB%22%2F%3E%3C%2Fsvg%3E)"};
48
+ transform: ${e=>"AR"===e.language?"scaleX(-1)":"none"};
47
49
  background-size: 100% 100%;
48
50
  background-repeat: no-repeat;
49
51
  }
@@ -51,60 +53,83 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
51
53
  display: flex;
52
54
  gap: 8px;
53
55
  ${e=>e.isMyMessage?"flex-direction: row;":"flex-direction: row-reverse;"}
54
- `,D=d.div`
56
+ `,F=d.div`
55
57
  direction: ${e=>"arb"===e.language?"rtl":"ltr"};
56
58
  flex: 1;
57
- `,F=d.div`
59
+ `,D=d.div`
58
60
  display: flex;
59
61
  align-items: flex-end;
60
62
  margin-bottom: -4px;
61
63
  gap: 4px;
62
- `,B=({isMyMessage:t,createdAt:o,children:i,className:r,message:a,config:s,style:c})=>{const l=h(a.content);return n(E,{isMyMessage:t,className:r,style:c,children:[a.context&&a.context.replyToId?e(I,{context:a.context,isMyMessage:t,language:l}):null,n(S,{isMyMessage:t,children:[e(D,{language:l,children:i}),(o||a&&s&&s.isAgent===a.isAgent)&&n(F,{children:[a&&s&&s.isAgent===a.isAgent&&e(k,{message:a,config:s}),o&&e(y,{createdAt:o})]})]})]})};const z=({message:t,config:o})=>{const[c,l]=r(!1),[d,g]=r(!0),p=a(null),h=i((()=>{const e=p.current;e&&console.error("Media playback error:",{src:e.src,error:e.error,networkState:e.networkState,readyState:e.readyState,messageType:t.type}),l(!0),g(!1)}),[t.type]),m=i((()=>{console.log("Media loaded successfully:",t.content),g(!1)}),[t.content]),u=i((()=>{console.log("Media can play:",t.content),g(!1)}),[t.content]),b=i((()=>{console.log("Media load started:",t.content)}),[t.content]);s((()=>{console.log("MediaMessage component mounted for:",t.content,"type:",t.type);const e=()=>{document.querySelectorAll("video, audio").forEach((e=>{e!==p.current&&e.pause()}))},n=p.current;if(n){n.addEventListener("play",e),n.addEventListener("loadeddata",m),n.addEventListener("canplay",u),n.addEventListener("error",h),n.addEventListener("loadstart",b);const o=setTimeout((()=>{console.log("Loading timeout reached for:",t.content),g(!1)}),5e3);return()=>{n&&(n.removeEventListener("play",e),n.removeEventListener("loadeddata",m),n.removeEventListener("canplay",u),n.removeEventListener("error",h),n.removeEventListener("loadstart",b)),clearTimeout(o)}}}),[u,b,h,m,t.content,t.type]);const C=o.isAgent===t.isAgent;return c?n(B,{className:"bc-mediaMessage"+("audio"===t.type?" audio":""),isMyMessage:C,createdAt:t.createdAt,message:t,config:o,children:[n("p",{style:{margin:0,color:"#666"},children:["Unable to load ","audio"===t.type?"audio":"video"," file."]}),n("a",{href:t.content,target:"_blank",rel:"noopener noreferrer",style:{color:"#007bff",textDecoration:"none"},children:["Open ","audio"===t.type?"audio":"video"," in new tab"]})]}):"audio"===t.type?n(B,{className:"bc-mediaMessage audio",isMyMessage:C,createdAt:t.createdAt,message:t,config:o,style:{position:"relative"},children:[e("audio",{ref:p,src:t.content,controls:!0,preload:"metadata",onError:h,onLoadedData:m,onCanPlay:u,onLoadStart:b}),d&&e("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:"14px",zIndex:1},children:"Loading audio..."})]}):n(B,{className:"bc-mediaMessage",isMyMessage:C,createdAt:t.createdAt,message:t,config:o,style:{position:"relative"},children:[e("video",{ref:p,src:t.content,controls:!0,preload:"metadata",playsInline:!0,onError:h,onLoadedData:m,onCanPlay:u,onLoadStart:b}),d&&e("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:"14px",zIndex:1},children:"Loading video..."})]})},N=d.i`
63
- background-image: ${e=>`url("data:image/svg+xml,%3Csvg%20width%3D%2215%22%20height%3D%2215%22%20viewBox%3D%220%200%2015%2015%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.51194%203.00541C9.18829%202.54594%2010.0435%202.53694%2010.6788%202.95419C10.8231%203.04893%2010.9771%203.1993%2011.389%203.61119C11.8009%204.02307%2011.9513%204.17714%2012.046%204.32141C12.4633%204.95675%2012.4543%205.81192%2011.9948%206.48827C11.8899%206.64264%2011.7276%206.80811%2011.3006%207.23511L10.6819%207.85383C10.4867%208.04909%2010.4867%208.36567%2010.6819%208.56093C10.8772%208.7562%2011.1938%208.7562%2011.389%208.56093L12.0077%207.94221L12.0507%207.89929C12.4203%207.52976%2012.6568%207.2933%2012.822%207.0502C13.4972%206.05623%2013.5321%204.76252%2012.8819%203.77248C12.7233%203.53102%2012.4922%203.30001%2012.1408%202.94871L12.0961%202.90408L12.0515%202.85942C11.7002%202.508%2011.4692%202.27689%2011.2277%202.11832C10.2377%201.46813%208.94398%201.50299%207.95001%202.17822C7.70691%202.34336%207.47044%202.57991%207.1009%202.94955L7.058%202.99247L6.43928%203.61119C6.24401%203.80645%206.24401%204.12303%206.43928%204.31829C6.63454%204.51355%206.95112%204.51355%207.14638%204.31829L7.7651%203.69957C8.1921%203.27257%208.35757%203.11027%208.51194%203.00541ZM4.31796%207.14672C4.51322%206.95146%204.51322%206.63487%204.31796%206.43961C4.12269%206.24435%203.80611%206.24435%203.61085%206.43961L2.99213%207.05833L2.94922%207.10124C2.57957%207.47077%202.34303%207.70724%202.17788%207.95035C1.50265%208.94432%201.4678%2010.238%202.11799%2011.2281C2.27656%2011.4695%202.50766%2011.7005%202.8591%2012.0518L2.90374%2012.0965L2.94837%2012.1411C3.29967%2012.4925%203.53068%2012.7237%203.77214%2012.8822C4.76219%2013.5324%206.05589%2013.4976%207.04986%2012.8223C7.29296%2012.6572%207.52943%2012.4206%207.89896%2012.051L7.89897%2012.051L7.94188%2012.0081L8.5606%2011.3894C8.75586%2011.1941%208.75586%2010.8775%208.5606%2010.6823C8.36533%2010.487%208.04875%2010.487%207.85349%2010.6823L7.23477%2011.301C6.80777%2011.728%206.6423%2011.8903%206.48794%2011.9951C5.81158%2012.4546%204.95642%2012.4636%204.32107%2012.0464C4.17681%2011.9516%204.02274%2011.8012%203.61085%2011.3894C3.19896%2010.9775%203.0486%2010.8234%202.95385%2010.6791C2.53661%2010.0438%202.54561%209.18863%203.00507%208.51227C3.10993%208.35791%203.27224%208.19244%203.69924%207.76544L4.31796%207.14672ZM9.62172%206.08558C9.81698%205.89032%209.81698%205.57373%209.62172%205.37847C9.42646%205.18321%209.10988%205.18321%208.91461%205.37847L5.37908%208.91401C5.18382%209.10927%205.18382%209.42585%205.37908%209.62111C5.57434%209.81637%205.89092%209.81637%206.08619%209.62111L9.62172%206.08558Z%22%20fill%3D%22%23${e.color}%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")`};
64
- width: 24px;
65
- background-position: center;
66
- background-size: contain;
67
- background-repeat: no-repeat;
68
- `,Z=d.a`
64
+ `,B=({isMyMessage:t,createdAt:i,children:o,className:a,message:r,config:s,style:c})=>{const l=h(r.content);return n(E,{isMyMessage:t,language:s.language,className:a,style:c,children:[r.context&&r.context.replyToId?e(L,{context:r.context,isMyMessage:t,language:l}):null,n(S,{isMyMessage:t,children:[e(F,{language:l,children:o}),(i||r&&s&&s.isAgent===r.isAgent)&&n(D,{children:[r&&s&&s.isAgent===r.isAgent&&e(k,{message:r,config:s}),i&&e(w,{createdAt:i})]})]})]})};const z=({message:t,config:i})=>{const[c,l]=a(!1),[d,g]=a(!0),p=r(null),h=o((()=>{const e=p.current;e&&console.error("Media playback error:",{src:e.src,error:e.error,networkState:e.networkState,readyState:e.readyState,messageType:t.type}),l(!0),g(!1)}),[t.type]),m=o((()=>{console.log("Media loaded successfully:",t.content),g(!1)}),[t.content]),u=o((()=>{console.log("Media can play:",t.content),g(!1)}),[t.content]),b=o((()=>{console.log("Media load started:",t.content)}),[t.content]);s((()=>{console.log("MediaMessage component mounted for:",t.content,"type:",t.type);const e=()=>{document.querySelectorAll("video, audio").forEach((e=>{e!==p.current&&e.pause()}))},n=p.current;if(n){n.addEventListener("play",e),n.addEventListener("loadeddata",m),n.addEventListener("canplay",u),n.addEventListener("error",h),n.addEventListener("loadstart",b);const i=setTimeout((()=>{console.log("Loading timeout reached for:",t.content),g(!1)}),5e3);return()=>{n&&(n.removeEventListener("play",e),n.removeEventListener("loadeddata",m),n.removeEventListener("canplay",u),n.removeEventListener("error",h),n.removeEventListener("loadstart",b)),clearTimeout(i)}}}),[u,b,h,m,t.content,t.type]);const C=i.isAgent===t.isAgent;return c?n(B,{className:"bc-mediaMessage"+("audio"===t.type?" audio":""),isMyMessage:C,createdAt:t.createdAt,message:t,config:i,children:[n("p",{style:{margin:0,color:"#666"},children:["Unable to load ","audio"===t.type?"audio":"video"," file."]}),n("a",{href:t.content,target:"_blank",rel:"noopener noreferrer",style:{color:"#007bff",textDecoration:"none"},children:["Open ","audio"===t.type?"audio":"video"," in new tab"]})]}):"audio"===t.type?n(B,{className:"bc-mediaMessage audio",isMyMessage:C,createdAt:t.createdAt,message:t,config:i,style:{position:"relative"},children:[e("audio",{ref:p,src:t.content,controls:!0,preload:"metadata",onError:h,onLoadedData:m,onCanPlay:u,onLoadStart:b}),d&&e("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:"14px",zIndex:1},children:"Loading audio..."})]}):n(B,{className:"bc-mediaMessage",isMyMessage:C,createdAt:t.createdAt,message:t,config:i,style:{position:"relative"},children:[e("video",{ref:p,src:t.content,controls:!0,preload:"metadata",playsInline:!0,onError:h,onLoadedData:m,onCanPlay:u,onLoadStart:b}),d&&e("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:"14px",zIndex:1},children:"Loading video..."})]})};var N={EN:{share_my_location:"Share My Location",share_my_current_location:"Share My Current Location",placeholder:"Message...",see_your_location:"See Your Location",location_permission:"Please give location permission",download:"Download"},AR:{share_my_location:"Ų…Ø´Ø§ØąŲƒØŠ Ų…ŲˆŲ‚ØšŲŠ",share_my_current_location:"Ų…Ø´Ø§ØąŲƒØŠ Ų…ŲˆŲ‚ØšŲŠ Ø§Ų„Ø­Ø§Ų„ŲŠ",placeholder:"Ø§Ų„ØąØŗØ§Ų„ØŠ...",see_your_location:"ØąØ¤ŲŠØŠ Ų…ŲˆŲ‚ØšŲƒ",location_permission:"ŲŠØąØŦŲ‰ Ų…Ų†Ø­ ØĨØ°Ų† Ø§Ų„Ų…ŲˆŲ‚Øš",download:"ØĒØ­Ų…ŲŠŲ„"},TR:{share_my_location:"Konumumu paylaş",share_my_current_location:"GÃŧncel konumumu paylaş",placeholder:"MesajÄąnÄązÄą yazÄąn",see_your_location:"Konumunuzu GÃļrÃŧntÃŧleyin",location_permission:"LÃŧtfen konum paylaÅŸÄąmÄą için izin verin",download:"İndir"}};const R=()=>e("svg",{width:"18",height:"22",viewBox:"0 0 18 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M8.56055 0.249878C9.16365 0.249377 9.64011 0.249415 10.0869 0.407104C10.1792 0.439689 10.2701 0.477175 10.3584 0.519409C10.7858 0.723899 11.1227 1.06135 11.5488 1.48816L16.4443 6.38367C16.9387 6.87712 17.3304 7.26784 17.541 7.77625C17.7515 8.28461 17.7507 8.83754 17.75 9.53601V13.0565C17.75 14.8942 17.7498 16.3499 17.5967 17.4891C17.439 18.6615 17.1067 19.61 16.3584 20.3583C15.6101 21.1066 14.6616 21.4389 13.4893 21.5966C12.3501 21.7497 10.8943 21.7499 9.05664 21.7499H8.94336C7.10571 21.7499 5.64991 21.7497 4.51074 21.5966C3.33844 21.4389 2.38991 21.1066 1.6416 20.3583C0.893309 19.61 0.560952 18.6615 0.40332 17.4891C0.25016 16.3499 0.249984 14.8942 0.25 13.0565V8.4071C0.249988 6.82577 0.250388 5.57298 0.366211 4.58093C0.485107 3.56261 0.733898 2.72281 1.30176 2.01843C1.51427 1.75486 1.755 1.51514 2.01855 1.30261C2.72296 0.734673 3.56267 0.484993 4.58105 0.366089C5.57311 0.250277 6.8259 0.249866 8.40723 0.249878H8.56055ZM8.45605 1.74988C6.81549 1.74988 5.6499 1.75086 4.75488 1.85535C3.87608 1.95795 3.35453 2.15151 2.95996 2.4696C2.77959 2.61504 2.61516 2.77947 2.46973 2.95984C2.15159 3.35441 1.95808 3.87589 1.85547 4.75476C1.75097 5.64979 1.75 6.8153 1.75 8.45593V12.9999C1.75 14.9066 1.75151 16.2613 1.88965 17.2889C2.02491 18.295 2.27897 18.8745 2.70215 19.2977C3.12536 19.7209 3.70485 19.975 4.71094 20.1102C5.73859 20.2484 7.09323 20.2499 9 20.2499C10.9068 20.2499 12.2614 20.2484 13.2891 20.1102C14.2952 19.975 14.8746 19.7209 15.2979 19.2977C15.721 18.8745 15.9751 18.295 16.1104 17.2889C16.2485 16.2613 16.25 14.9066 16.25 12.9999V9.6571C16.25 9.21922 16.2468 8.94195 16.2334 8.74988H15.9453C14.5778 8.7499 13.4753 8.7502 12.6084 8.63367C11.7083 8.51265 10.9505 8.25316 10.3486 7.65125C9.74676 7.04934 9.48722 6.29156 9.36621 5.39148C9.24969 4.52456 9.24998 3.422 9.25 2.05457V1.76355C9.08319 1.75292 8.84192 1.74988 8.45605 1.74988ZM13 15.2499C13.4142 15.2499 13.75 15.5857 13.75 15.9999C13.75 16.4141 13.4142 16.7499 13 16.7499H5C4.58579 16.7499 4.25 16.4141 4.25 15.9999C4.25 15.5857 4.58579 15.2499 5 15.2499H13ZM9 11.2499C9.41421 11.2499 9.75 11.5857 9.75 11.9999C9.75 12.4141 9.41421 12.7499 9 12.7499H5C4.58579 12.7499 4.25 12.4141 4.25 11.9999C4.25 11.5857 4.58579 11.2499 5 11.2499H9ZM10.751 2.8114C10.7546 3.82629 10.7723 4.58818 10.8535 5.19226C10.9522 5.92571 11.1325 6.31399 11.4092 6.5907C11.6859 6.86746 12.0748 7.04771 12.8086 7.14636C13.4126 7.22753 14.1738 7.24524 15.1885 7.2489L10.751 2.8114Z",fill:"#16616C"})}),Z=d.a`
65
+ ${e=>e.isMyMessage?"flex-direction: row;":"flex-direction: row-reverse;"}
66
+ min-width: 300px;
67
+ display: flex;
68
+ align-items: center;
69
+ text-decoration: none;
70
+ gap: 5px;
71
+ color: inherit;
72
+ font-size: var(--bc-chat-fontSize-sm);
73
+
74
+ &:hover {
75
+ opacity: 0.9;
76
+ }
77
+
78
+ i {
79
+ vertical-align: middle;
80
+ width: 15px;
81
+ height: 16px;
82
+ }
83
+ `,H=d.div`
69
84
  display: flex;
70
85
  flex-direction: row;
71
86
  align-items: center;
72
- text-decoration: none;
73
- gap: 5px;
74
- color: inherit;
87
+ gap: 6px;
88
+ ${e=>e.isMyMessage?"flex-direction: row;":"flex-direction: row-reverse;"}
89
+ `,j=d.div`
90
+ width: 32px;
91
+ height: 32px;
92
+ border-radius: 6px;
93
+ background: #F3F4F6;
94
+ display: flex;
95
+ align-items: center;
96
+ justify-content: center;
97
+ padding: 8px;
98
+ `,G=d.div`
99
+ display: flex;
100
+ flex-direction: column;
101
+ gap: 4px;
102
+ `,J=d.span`
103
+ font-size: var(--bc-chat-fontSize-xs);
104
+ font-weight: var(--bc-chat-fontWeight-regular);
105
+ line-height: var(--bc-chat-lineHeight-xs);
106
+ `,U=d.span`
75
107
  font-size: var(--bc-chat-fontSize-sm);
76
-
77
- &:hover {
78
- opacity: 0.8;
79
- }
80
-
81
- i {
82
- vertical-align: middle;
83
- width: 15px;
84
- height: 16px;
85
- }
86
- `,R=d.a`
108
+ opacity: 0.7;
109
+ font-weight: var(--bc-chat-fontWeight-regular);
110
+ line-height: var(--bc-chat-lineHeight-sm);
111
+ `;const P=d.a`
87
112
  font-size: var(--bc-chat-fontSize-sm);
88
113
  color: inherit;
89
114
  text-decoration: none;
90
115
  &:hover {
91
116
  opacity: 0.8;
92
117
  }
93
- `,j=d.div`
118
+ `,K=d.div`
94
119
  display: flex;
95
120
  flex-direction: row;
96
121
  align-items: center;
97
122
  gap: 5px;
98
- `,H=d.span`
123
+ `,T=d.span`
99
124
  color: inherit;
100
- `;const G=d.i`
125
+ `;const V=d.i`
101
126
  background-image: ${e=>`url("data:image/svg+xml,%3Csvg%20width%3D%2215%22%20height%3D%2215%22%20viewBox%3D%220%200%2015%2015%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M9.62129%201.13607C9.81656%200.940808%2010.1331%200.940809%2010.3284%201.13607L11.3891%202.19673L12.8033%203.61094L13.8639%204.6716C14.0592%204.86687%2014.0592%205.18345%2013.8639%205.37871C13.6687%205.57397%2013.3521%205.57397%2013.1568%205.37871L12.5038%204.7257L8.86727%209.57443L9.97485%2010.682C10.1701%2010.8773%2010.1701%2011.1939%209.97485%2011.3891C9.77959%2011.5844%209.463%2011.5844%209.26774%2011.3891L7.85353%209.97491L6.79287%208.91425L3.5225%2012.1846C3.32724%2012.3799%203.01065%2012.3799%202.81539%2012.1846C2.62013%2011.9894%202.62013%2011.6728%202.81539%2011.4775L6.08576%208.20714L5.0251%207.14648L3.61089%205.73226C3.41563%205.537%203.41562%205.22042%203.61089%205.02516C3.80615%204.8299%204.12273%204.8299%204.31799%205.02516L5.42557%206.13274L10.2743%202.49619L9.62129%201.84318C9.42603%201.64792%209.42603%201.33133%209.62129%201.13607Z%22%20fill%3D%22currentColor%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M9.62129%201.13607C9.81656%200.940808%2010.1331%200.940809%2010.3284%201.13607L11.3891%202.19673L12.8033%203.61094L13.8639%204.6716C14.0592%204.86687%2014.0592%205.18345%2013.8639%205.37871C13.6687%205.57397%2013.3521%205.57397%2013.1568%205.37871L12.5038%204.7257L8.86727%209.57443L9.97485%2010.682C10.1701%2010.8773%2010.1701%2011.1939%209.97485%2011.3891C9.77959%2011.5844%209.463%2011.5844%209.26774%2011.3891L7.85353%209.97491L6.79287%208.91425L3.5225%2012.1846C3.32724%2012.3799%203.01065%2012.3799%202.81539%2012.1846C2.62013%2011.9894%202.62013%2011.6728%202.81539%2011.4775L6.08576%208.20714L5.0251%207.14648L3.61089%205.73226C3.41563%205.537%203.41562%205.22042%203.61089%205.02516C3.80615%204.8299%204.12273%204.8299%204.31799%205.02516L5.42557%206.13274L10.2743%202.49619L9.62129%201.84318C9.42603%201.64792%209.42603%201.33133%209.62129%201.13607Z%22%20fill%3D%22%23${e.color}%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")`};
102
127
  background-position: center;
103
128
  background-size: contain;
104
129
  background-repeat: no-repeat;
105
130
  width: 15px;
106
131
  height: 15px;
107
- `,J=d.div`
132
+ `,Q=d.div`
108
133
  display: inline-block;
109
134
  background-color: #fff !important;
110
135
  text-align: center;
@@ -117,9 +142,9 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
117
142
  word-break: break-word;
118
143
  text-decoration: none;
119
144
  max-width: 60%;
120
- `,P=d.span`
145
+ `,W=d.span`
121
146
  direction: ${e=>"arb"===e.language?"rtl":"ltr"};
122
- `,U={document:({message:t,config:o})=>{let i=t.content.split("/"),r=i[i.length-1];const a=o.isAgent===t.isAgent;return e(B,{isMyMessage:a,createdAt:t.createdAt,message:t,config:o,children:n(Z,{href:t.content,target:"_blank",download:r,rel:"noopener noreferrer",children:[e(N,{color:"000000"}),e("span",{children:r})]})})},image:({message:n,config:t})=>{const o=t.isAgent===n.isAgent;return e(B,{className:"bc-mediaMessage",isMyMessage:o,createdAt:n.createdAt,message:n,config:t,children:e("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e("img",{src:n.content,alt:"message content",style:{width:"100%",height:"auto",borderRadius:"8px"}})})})},location:({message:t,config:o})=>{const i=o.isAgent===t.isAgent;return e(B,{isMyMessage:i,createdAt:t.createdAt,message:t,config:o,children:e(R,{href:"https://www.google.com/maps/?q="+t.content,target:"_blank",rel:"noopener noreferrer",children:n(j,{children:[e(G,{color:"000000"}),e(H,{children:"Open location"})]})})})},text:({message:n,config:t,searchPattern:o})=>{const i=t.isAgent===n.isAgent;return e(B,{className:"bc-textMessage",isMyMessage:i,createdAt:n.createdAt,message:n,config:t,children:(n.content&&n.content.indexOf("\n")>-1?n.content.split("\n"):[n.content]).map(((t,i)=>{const r=o&&o.trim()?function(e,n){const t=(o=n.trim(),o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));var o;if(!t)return e;const i=new RegExp(`(${t})`,"gi");return e.replace(i,'<span style="background-color: var(--bc-chat-message-highlight-color, yellow); padding: 3px 0;">$1</span>')}(t,o):t;return e(g,{rehypePlugins:[p],skipHtml:!1,children:r},`${n.messageId}-${i}`)}))})},video:z,audio:z,interactive:null,template:({message:t,config:o})=>{const i=c((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]),r=o.isAgent===t.isAgent;return n(B,{isMyMessage:r,createdAt:t.createdAt,message:t,config:o,children:[e("b",{children:"Template message:"})," ",i.name," ",i.language?.code?`/ ${i.language.code}`:null]})},note:({message:t})=>{const o=h(t.content);return n(J,{children:[e(P,{language:o,children:t.content})," ",e(y,{createdAt:t.createdAt})]})}};function K(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}K("/* Shared styles between agent and client messages */\n.bc-otherMessage,\n.bc-myMessage {\n margin: 24px;\n font-size: var(--bc-chat-body-4-size);\n line-height: var(--bc-chat-body-4-lineheight);\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 12px;\n}\n.bc-otherMessage div p,\n.bc-myMessage div p {\n padding: 0;\n margin: 0;\n}\n\n/* Styles for agent messages */\n.bc-otherMessage {\n justify-content: flex-start;\n}\n.bc-otherMessage:first-child {\n flex: 1 0 50%;\n}\n.bc-otherMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n/* Styles for other messages */\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n\n.bc-myMessage {\n justify-content: flex-end;\n}\n.bc-myMessage > div:not(.bc-debugCon),\n.bc-myMessage .bc-locationMessage,\n.bc-myMessage audio {\n color: #fff;\n}\n.bc-myMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n max-width: 400px !important;\n}\n.bc-mediaMessage audio,\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n max-width: 100%;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n width: 400px;\n min-height: 40px !important;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}\n\n.status-icon {\n color: var(--bc-chat-my-message-text-color) !important;\n opacity: 0.7;\n}\n.status-icon.failed {\n color: var(--bc-chat-danger-color) !important;\n}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color) !important;\n cursor: pointer;\n margin: 0 10px;\n}");const T=d.i`
147
+ `,Y={document:({message:t,config:i})=>{const o=i.isAgent===t.isAgent,[r,l]=a(""),d=c((()=>{try{const e=(t.content||"").split("/");return decodeURIComponent(e[e.length-1]||"file")}catch{return"file"}}),[t.content]);s((()=>{let e=!1;const n=t.content;if(n)return fetch(n,{method:"HEAD"}).then((n=>{const t=n.headers.get("content-length");if(!t)return;const i=Number(t);var o;Number.isFinite(i)&&(e||l((o=i)<1024?`${o} B`:o<1048576?`${(o/1024).toFixed(1)}KB`:o<1073741824?`${(o/1048576).toFixed(1)}MB`:`${(o/1073741824).toFixed(1)}GB`))})).catch((()=>{})),()=>{e=!0}}),[t.content]);const g=r?`${r} - ${N[i.language]?.download}`:N[i.language]?.download;return e(B,{isMyMessage:o,createdAt:t.createdAt,message:t,config:i,children:e(Z,{href:t.content,target:"_blank",download:d,rel:"noopener noreferrer",isMyMessage:o,children:n(H,{isMyMessage:o,children:[e(j,{children:e(R,{})}),n(G,{children:[e(J,{children:d}),e(U,{children:g})]})]})})})},image:({message:n,config:t})=>{const i=t.isAgent===n.isAgent;return e(B,{className:"bc-mediaMessage",isMyMessage:i,createdAt:n.createdAt,message:n,config:t,children:e("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e("img",{src:n.content,alt:"message content",style:{width:"100%",height:"auto",borderRadius:"8px"}})})})},location:({message:t,config:i})=>{const o=i.isAgent===t.isAgent;return e(B,{isMyMessage:o,createdAt:t.createdAt,message:t,config:i,children:e(P,{href:"https://www.google.com/maps/?q="+t.content,target:"_blank",rel:"noopener noreferrer",children:n(K,{children:[e(V,{color:"000000"}),e(T,{children:"Open location"})]})})})},text:({message:n,config:t,searchPattern:i})=>{const o=t.isAgent===n.isAgent;return e(B,{className:"bc-textMessage",isMyMessage:o,createdAt:n.createdAt,message:n,config:t,children:(n.content&&n.content.indexOf("\n")>-1?n.content.split("\n"):[n.content]).map(((t,o)=>{const a=i&&i.trim()?function(e,n){const t=(i=n.trim(),i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));var i;if(!t)return e;const o=new RegExp(`(${t})`,"gi");return e.replace(o,'<span style="background-color: var(--bc-chat-message-highlight-color, yellow); padding: 3px 0;">$1</span>')}(t,i):t;return e(g,{rehypePlugins:[p],skipHtml:!1,children:a},`${n.messageId}-${o}`)}))})},video:z,audio:z,interactive:null,template:({message:t,config:i})=>{const o=c((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]),a=i.isAgent===t.isAgent;return n(B,{isMyMessage:a,createdAt:t.createdAt,message:t,config:i,children:[e("b",{children:"Template message:"})," ",o.name," ",o.language?.code?`/ ${o.language.code}`:null]})},note:({message:t})=>{const i=h(t.content);return n(Q,{children:[e(W,{language:i,children:t.content})," ",e(w,{createdAt:t.createdAt})]})}};function O(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}O("/* Shared styles between agent and client messages */\n.bc-otherMessage,\n.bc-myMessage {\n margin: 24px;\n font-size: var(--bc-chat-body-4-size);\n line-height: var(--bc-chat-body-4-lineheight);\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 12px;\n}\n.bc-otherMessage div p,\n.bc-myMessage div p {\n padding: 0;\n margin: 0;\n}\n\n/* Styles for agent messages */\n.bc-otherMessage {\n justify-content: flex-start;\n}\n.bc-otherMessage:first-child {\n flex: 1 0 50%;\n}\n.bc-otherMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n/* Styles for other messages */\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n\n.bc-myMessage {\n justify-content: flex-end;\n}\n.bc-myMessage > div:not(.bc-debugCon),\n.bc-myMessage .bc-locationMessage,\n.bc-myMessage audio {\n color: #fff;\n}\n.bc-myMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n max-width: 400px !important;\n}\n.bc-mediaMessage audio,\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n max-width: 100%;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n width: 400px;\n min-height: 40px !important;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}\n\n.status-icon {\n color: var(--bc-chat-my-message-text-color) !important;\n opacity: 0.7;\n}\n.status-icon.failed {\n color: var(--bc-chat-danger-color) !important;\n}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color) !important;\n cursor: pointer;\n margin: 0 10px;\n}");const q=d.i`
123
148
  background-image: url(${e=>e.avatar||x});
124
149
  width: 30px;
125
150
  height: 30px;
@@ -128,7 +153,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
128
153
  display: inline-block;
129
154
  border-radius: 50%;
130
155
  background-repeat: no-repeat;
131
- `;function V(e,n,t){return"note"===e?"bc-note":t.isAgent?n?"bc-myMessage":"bc-otherMessage":n?"bc-otherMessage":"bc-myMessage"}const Q=t=>{const{type:o,isAgent:i}=t.message,r=t.message.isAgent&&t.message.agentId&&t.agentsIdsAvatarsMap?.[t.message.agentId]||t.config?.brandLogo,a=U[o]??null;return a?n("div",{className:V(o,i,t.config),id:t.message.messageId,style:{flexDirection:"AR"===t.config.language?"row-reverse":"row",alignItems:"flex-end"},children:[e(a,{message:t.message,config:t.config,searchPattern:t.searchPattern}),t.config.isAgent&&i&&"note"!==o?e(T,{avatar:r}):null]}):null},W=d.div`
156
+ `;function X(e,n,t){return"note"===e?"bc-note":t.isAgent?n?"bc-myMessage":"bc-otherMessage":n?"bc-otherMessage":"bc-myMessage"}const $=t=>{const{type:i,isAgent:o}=t.message,a=t.message.isAgent&&t.message.agentId&&t.agentsIdsAvatarsMap?.[t.message.agentId]||t.config?.brandLogo,r=Y[i]??null;return r?n("div",{className:X(i,o,t.config),id:t.message.messageId,style:{flexDirection:"AR"===t.config.language?"row-reverse":"row",alignItems:"flex-end"},children:[e(r,{message:t.message,config:t.config,searchPattern:t.searchPattern}),t.config.isAgent&&o&&"note"!==i?e(q,{avatar:a}):null]}):null},_=d.div`
132
157
  width: 90%;
133
158
  display: flex;
134
159
  align-items: center;
@@ -143,7 +168,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
143
168
  margin-bottom: -10px;
144
169
  padding:0 16px;
145
170
  }
146
- `,Y=({data:n,config:t})=>e("div",{children:e(W,{backgroundColor:t.backgroundColor,children:e("div",{className:"seperator-content",children:n.content})})}),O=d.div`
171
+ `,ee=({data:n,config:t})=>e("div",{children:e(_,{backgroundColor:t.backgroundColor,children:e("div",{className:"seperator-content",children:n.content})})}),ne=d.div`
147
172
  height: 100%;
148
173
  width: 100%;
149
174
  overflow-y: auto;
@@ -151,7 +176,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
151
176
  background-size: 100% 100%;
152
177
  background-image: ${e=>`url(${e.config.backgroundImage})`};
153
178
  ${e=>e.config.backgroundColor&&`background-color: ${e.config.backgroundColor};`}
154
- `,q=d.div`
179
+ `,te=d.div`
155
180
  position: absolute;
156
181
  right: 10px;
157
182
  bottom: 124px;
@@ -166,12 +191,12 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
166
191
  align-items: center;
167
192
  justify-content: center;
168
193
 
169
- `,X=({sendMessage:t,debug:o,config:i,messages:c,onReachingUp:d,agentsIdsAvatarsMap:g,searchPattern:p,searchMatchNo:h,onSearchMatchCount:m})=>{const u=a(null),b=a(0),[C,x]=r(null),[f,w]=r(!0);return s((()=>{const e=document.getElementById(v);if(!e)return;b.current=e.scrollHeight;const n=()=>{0===e.scrollTop&&d?.();const n=e.scrollHeight-e.scrollTop-e.clientHeight<=4;w(n)};return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}}),[d]),l((()=>{const e=u.current;if(!e)return;const n=b.current;if(e.scrollHeight-e.scrollTop<=e.clientHeight+200){const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),w(!0)}else{const t=e.scrollHeight-n;e.style.scrollBehavior="auto",e.scrollTop=e.scrollTop+t;const o=4,i=e.scrollHeight-e.scrollTop-e.clientHeight<=o;w(i)}b.current=e.scrollHeight}),[c]),s((()=>{if(!p||!p.trim())return x(null),void m?.(0);const e=p.toLowerCase(),n=[];for(const t of c){const o=t&&t.content,i=t&&t.messageId;i&&o&&(String(o).toLowerCase().includes(e)&&n.push(i))}if(m?.(n.length),0===n.length)return void x(null);const t=n[Math.min(Math.max((h??1)-1,0),n.length-1)];x(t);const o=u.current,i=t?document.getElementById(t):null;o&&i&&(o.style.scrollBehavior="smooth",i.scrollIntoView())}),[p,h,c,m]),n(O,{ref:u,id:v,config:i,children:[c?.map(((n,r)=>"seperator"===n.type?e(Y,{data:n,config:i}):e("div",{children:e(Q,{message:n,index:r,sendMessage:t,messageActionsEnabled:c.length-1===r,debug:o,config:i,agentsIdsAvatarsMap:g,highlighted:C===n.messageId,searchPattern:p})},n.messageId?n.messageId:"message"+r))),!f&&e(q,{"aria-label":"Scroll to latest message",onClick:()=>{const e=u.current;if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),w(!0)},children:e("svg",{width:"14",height:"8",viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M1.60372 0.555285C1.7256 0.716659 2.08951 1.1984 2.30624 1.47611C2.74031 2.03233 3.33342 2.77142 3.97323 3.50831C4.61627 4.24893 5.29178 4.97022 5.89189 5.50046C6.19281 5.76634 6.45714 5.96837 6.67527 6.09987C6.88042 6.22355 7.00161 6.24927 7.00161 6.24927C7.00161 6.24927 7.11923 6.22355 7.32437 6.09988C7.5425 5.96838 7.80684 5.76635 8.10775 5.50047C8.70786 4.97022 9.38337 4.24892 10.0264 3.5083C10.6662 2.7714 11.2593 2.0323 11.6934 1.47608C11.9101 1.19837 12.2735 0.717304 12.3954 0.555928C12.6411 0.222405 13.1111 0.150469 13.4446 0.396102C13.7781 0.641734 13.8494 1.11123 13.6037 1.44476L13.6018 1.4473C13.474 1.61655 13.0971 2.11556 12.8759 2.39892C12.4321 2.9677 11.8216 3.72861 11.1591 4.49171C10.4997 5.25109 9.77408 6.02979 9.10096 6.62454C8.76526 6.92116 8.42497 7.18788 8.0988 7.3845C7.79322 7.56872 7.40633 7.75 6.99982 7.75C6.59331 7.75 6.20642 7.56871 5.90084 7.3845C5.57468 7.18787 5.23439 6.92116 4.89869 6.62454C4.22557 6.02979 3.4999 5.2511 2.84058 4.49173C2.17803 3.72863 1.5676 2.96774 1.12372 2.39896C0.902432 2.11541 0.525506 1.61637 0.397929 1.44747L0.396279 1.44528C0.150645 1.11176 0.22154 0.641787 0.555062 0.396152C0.888572 0.150526 1.35808 0.221792 1.60372 0.555285Z",fill:"white"})})})]},v)},$="text";async function _(e,n,t){const o=new u("https://bcuserres.blob.core.windows.net?sp=rc&st=2024-12-31T17:52:49Z&se=2026-01-01T01:52:49Z&spr=https&sv=2022-11-02&sr=c&sig=ZM%2Fdd4vGMglDs%2F9GtJ8y510iYCcXpUO%2Bj5CvVAq8QDg%3D",new b).getContainerClient("anonymous"),i=new Date,r=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}`,a=o.getBlockBlobClient(`${r}/${m()}`);try{await a.uploadBrowserData(e,{onProgress:t=>{const o=Math.round(t.loadedBytes/e.size*100);n(o)},blockSize:4194304,concurrency:20,blobHTTPHeaders:{blobContentType:e.type}});t(a.url.split("?")[0])}catch(e){t(void 0,"Error uploading file:"+e.message)}}var ee={EN:{share_my_location:"Share My Location",share_my_current_location:"Share My Current Location",placeholder:"Message...",see_your_location:"See Your Location",location_permission:"Please give location permission"},AR:{share_my_location:"Ų…Ø´Ø§ØąŲƒØŠ Ų…ŲˆŲ‚ØšŲŠ",share_my_current_location:"Ų…Ø´Ø§ØąŲƒØŠ Ų…ŲˆŲ‚ØšŲŠ Ø§Ų„Ø­Ø§Ų„ŲŠ",placeholder:"Ø§Ų„ØąØŗØ§Ų„ØŠ...",see_your_location:"ØąØ¤ŲŠØŠ Ų…ŲˆŲ‚ØšŲƒ",location_permission:"ŲŠØąØŦŲ‰ Ų…Ų†Ø­ ØĨØ°Ų† Ø§Ų„Ų…ŲˆŲ‚Øš"},TR:{share_my_location:"Konumumu paylaş",share_my_current_location:"GÃŧncel konumumu paylaş",placeholder:"MesajÄąnÄązÄą yazÄąn",see_your_location:"Konumunuzu GÃļrÃŧntÃŧleyin",location_permission:"LÃŧtfen konum paylaÅŸÄąmÄą için izin verin"}};const ne=d.span`
194
+ `,ie=({sendMessage:t,debug:i,config:o,messages:c,onReachingUp:d,agentsIdsAvatarsMap:g,searchPattern:p,searchMatchNo:h,onSearchMatchCount:m})=>{const u=r(null),b=r(0),[C,x]=a(null),[f,y]=a(!0);return s((()=>{const e=document.getElementById(v);if(!e)return;b.current=e.scrollHeight;const n=()=>{0===e.scrollTop&&d?.();const n=e.scrollHeight-e.scrollTop-e.clientHeight<=4;y(n)};return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}}),[d]),l((()=>{const e=u.current;if(!e)return;const n=b.current;if(e.scrollHeight-e.scrollTop<=e.clientHeight+200){const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),y(!0)}else{const t=e.scrollHeight-n;e.style.scrollBehavior="auto",e.scrollTop=e.scrollTop+t;const i=4,o=e.scrollHeight-e.scrollTop-e.clientHeight<=i;y(o)}b.current=e.scrollHeight}),[c]),s((()=>{if(!p||!p.trim())return x(null),void m?.(0);const e=p.toLowerCase(),n=[];for(const t of c){const i=t&&t.content,o=t&&t.messageId;o&&i&&(String(i).toLowerCase().includes(e)&&n.push(o))}if(m?.(n.length),0===n.length)return void x(null);const t=n[Math.min(Math.max((h??1)-1,0),n.length-1)];x(t);const i=u.current,o=t?document.getElementById(t):null;i&&o&&(i.style.scrollBehavior="smooth",o.scrollIntoView())}),[p,h,c,m]),n(ne,{ref:u,id:v,config:o,children:[c?.map(((n,a)=>"seperator"===n.type?e(ee,{data:n,config:o}):e("div",{children:e($,{message:n,index:a,sendMessage:t,messageActionsEnabled:c.length-1===a,debug:i,config:o,agentsIdsAvatarsMap:g,highlighted:C===n.messageId,searchPattern:p})},n.messageId?n.messageId:"message"+a))),!f&&e(te,{"aria-label":"Scroll to latest message",onClick:()=>{const e=u.current;if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),y(!0)},children:e("svg",{width:"14",height:"8",viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M1.60372 0.555285C1.7256 0.716659 2.08951 1.1984 2.30624 1.47611C2.74031 2.03233 3.33342 2.77142 3.97323 3.50831C4.61627 4.24893 5.29178 4.97022 5.89189 5.50046C6.19281 5.76634 6.45714 5.96837 6.67527 6.09987C6.88042 6.22355 7.00161 6.24927 7.00161 6.24927C7.00161 6.24927 7.11923 6.22355 7.32437 6.09988C7.5425 5.96838 7.80684 5.76635 8.10775 5.50047C8.70786 4.97022 9.38337 4.24892 10.0264 3.5083C10.6662 2.7714 11.2593 2.0323 11.6934 1.47608C11.9101 1.19837 12.2735 0.717304 12.3954 0.555928C12.6411 0.222405 13.1111 0.150469 13.4446 0.396102C13.7781 0.641734 13.8494 1.11123 13.6037 1.44476L13.6018 1.4473C13.474 1.61655 13.0971 2.11556 12.8759 2.39892C12.4321 2.9677 11.8216 3.72861 11.1591 4.49171C10.4997 5.25109 9.77408 6.02979 9.10096 6.62454C8.76526 6.92116 8.42497 7.18788 8.0988 7.3845C7.79322 7.56872 7.40633 7.75 6.99982 7.75C6.59331 7.75 6.20642 7.56871 5.90084 7.3845C5.57468 7.18787 5.23439 6.92116 4.89869 6.62454C4.22557 6.02979 3.4999 5.2511 2.84058 4.49173C2.17803 3.72863 1.5676 2.96774 1.12372 2.39896C0.902432 2.11541 0.525506 1.61637 0.397929 1.44747L0.396279 1.44528C0.150645 1.11176 0.22154 0.641787 0.555062 0.396152C0.888572 0.150526 1.35808 0.221792 1.60372 0.555285Z",fill:"white"})})})]},v)},oe="text";async function ae(e,n,t){const i=new u("https://bcuserres.blob.core.windows.net?sp=rc&st=2024-12-31T17:52:49Z&se=2026-01-01T01:52:49Z&spr=https&sv=2022-11-02&sr=c&sig=ZM%2Fdd4vGMglDs%2F9GtJ8y510iYCcXpUO%2Bj5CvVAq8QDg%3D",new b).getContainerClient("anonymous"),o=new Date,a=`${o.getFullYear()}-${String(o.getMonth()+1).padStart(2,"0")}`,r=i.getBlockBlobClient(`${a}/${m()}`);try{await r.uploadBrowserData(e,{onProgress:t=>{const i=Math.round(t.loadedBytes/e.size*100);n(i)},blockSize:4194304,concurrency:20,blobHTTPHeaders:{blobContentType:e.type}});t(r.url.split("?")[0])}catch(e){t(void 0,"Error uploading file:"+e.message)}}const re=d.span`
170
195
  cursor: pointer;
171
196
  width: 20px;
172
197
  height: 20px;
173
198
  margin: 5px;
174
- `,te=d.div`
199
+ `,se=d.div`
175
200
  display: flex;
176
201
  align-items: center;
177
202
  justify-content: space-between;
@@ -180,14 +205,14 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
180
205
  color: #111827;
181
206
  font-weight: 500;
182
207
  cursor: pointer;
183
- `,oe=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.8165 10.197L3.28454 11.453C3.19795 11.4674 3.11669 11.5044 3.04893 11.5602C2.98117 11.6161 2.9293 11.6887 2.89854 11.771L0.301545 18.728C0.0535447 19.368 0.722545 19.978 1.33654 19.671L19.3365 10.671C19.4612 10.6087 19.5661 10.513 19.6394 10.3944C19.7127 10.2759 19.7515 10.1393 19.7515 9.99996C19.7515 9.86061 19.7127 9.72401 19.6394 9.60549C19.5661 9.48697 19.4612 9.39122 19.3365 9.32896L1.33654 0.328962C0.722545 0.0219617 0.0535447 0.632962 0.301545 1.27196L2.89954 8.22896C2.93016 8.31138 2.98196 8.38426 3.04973 8.44027C3.1175 8.49627 3.19884 8.53342 3.28554 8.54796L10.8175 9.80296C10.8639 9.81108 10.9059 9.83529 10.9362 9.87132C10.9664 9.90735 10.983 9.9529 10.983 9.99996C10.983 10.047 10.9664 10.0926 10.9362 10.1286C10.9059 10.1646 10.8639 10.1888 10.8175 10.197H10.8165Z",fill:"#16616C"})}),ie=()=>e("svg",{width:"16",height:"18",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.3548 0.250249C10.7253 0.251243 11.0486 0.256214 11.3268 0.28107C11.6959 0.31408 12.0399 0.38555 12.3742 0.55897C12.5063 0.6275 12.6326 0.70664 12.7519 0.79561C13.0537 1.02075 13.2681 1.29917 13.4588 1.61688C13.6385 1.91618 13.8209 2.29263 14.0359 2.7361L14.5274 3.75H19C19.4142 3.75 19.75 4.08579 19.75 4.5C19.75 4.91422 19.4142 5.25 19 5.25H18.2051L17.6265 14.6101C17.5493 15.858 17.4881 16.8482 17.3627 17.6392C17.234 18.4504 17.028 19.126 16.616 19.7169C16.239 20.2574 15.7537 20.7137 15.1909 21.0565C14.5758 21.4313 13.8888 21.5952 13.0712 21.6736C12.274 21.75 11.2818 21.75 10.0316 21.75H9.9539L9.54609 21.7499C8.48365 21.7491 7.61989 21.7415 6.91041 21.6735C6.09186 21.5949 5.40416 21.4307 4.78854 21.0553C4.22537 20.7118 3.73991 20.2547 3.36311 19.7133C2.95121 19.1214 2.74587 18.4449 2.61816 17.6325C2.49362 16.8404 2.43377 15.8488 2.35833 14.5991L1.79393 5.25H1C0.58579 5.25 0.25 4.91422 0.25 4.5C0.25 4.08579 0.58579 3.75 1 3.75H5.57232L5.99135 2.83074L6.11352 2.56332C6.27199 2.21814 6.41408 1.91891 6.55567 1.67073C6.74349 1.34153 6.95704 1.05248 7.26255 0.81811C7.38312 0.72561 7.51116 0.64326 7.64533 0.57192C7.98531 0.39114 8.3369 0.31672 8.7143 0.28236C9.07 0.25 9.4986 0.25 10.0039 0.25L10.3548 0.250249ZM16.7022 5.25H3.29666L3.85327 14.47C3.93157 15.767 3.9879 16.6868 4.09996 17.3996C4.21012 18.1003 4.36439 18.5261 4.59431 18.8565C4.85213 19.2269 5.18428 19.5396 5.56961 19.7747C5.91325 19.9842 6.34758 20.1126 7.05365 20.1803C7.77186 20.2492 8.6934 20.25 9.9928 20.25C11.2905 20.25 12.2107 20.2492 12.928 20.1805C13.6332 20.1128 14.0671 19.9848 14.4105 19.7755C14.7956 19.5409 15.1277 19.2288 15.3856 18.8589C15.6156 18.5291 15.7702 18.1039 15.8812 17.4042C15.9941 16.6925 16.0517 15.7741 16.1317 14.4788L16.7022 5.25ZM10.451 1.75071L9.65985 1.75051C9.31502 1.75191 9.06007 1.75709 8.8503 1.77618C8.5849 1.80035 8.4499 1.84298 8.3496 1.89633C8.2886 1.92876 8.2304 1.96619 8.1756 2.00823C8.0854 2.07739 7.99063 2.18253 7.85853 2.41407C7.71937 2.65798 7.56941 2.98523 7.34281 3.48234L7.2208 3.75H12.8604L12.6999 3.41888C12.4674 2.93926 12.3137 2.62382 12.1727 2.38884C12.0389 2.16588 11.9443 2.06458 11.8551 1.99801C11.8009 1.95756 11.7434 1.92159 11.6834 1.89044C11.5845 1.83916 11.4522 1.79827 11.1932 1.77511C10.9982 1.75767 10.7635 1.75233 10.451 1.75071Z",fill:"#161616"})}),re=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),ae=({file:t,isFileSelected:o,cancelFileUpload:i})=>{const r=C.SupportedImageFormats.indexOf(t.extension)>=0,a=C.SupportedAudioFormats.indexOf(t.extension)>=0;return n("div",{className:"bc-uploadFileDetails",style:{border:o?"green dashed 1px":""},id:"uploadFileDetails",children:[e("div",{className:"bc-uploadedFile",style:{maxWidth:a?300:"auto",pointerEvents:a?"auto":"none"},children:r?e("img",{src:t.fileUrl,alt:"",className:"bc-imageFile"}):a?e("audio",{src:t.fileUrl,controls:!0,style:{height:28}}):e("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPq0lEQVR4nO2caXQUVRbHc2bmw8wXP82MJiyByKiDEHCYccN9QXFFEURxZlRcZkBRXHAXN0TZ3FAIKqABEQggSxKWRBwdBR0cUMCQQEhn6e5s3Z1OSIcl/e6c11WVfvXqvlevqjvCHOqe8zt+qeqU95f/va9aMCPDK6+88sorr7zyyiuvvPLKK6+8Os4rVnrKRbGSrCmx0sy5sZKsPEq7iZ557Zt65rXZ0jsvStnIkq1RnODt1uLek1uKsse0FvX73bH+9z7uqq3k9yfHSjO3xEqzQKMHxEo02rvoCe2be8JBE70StG0y07qpN7RuNBPdmA3RDUlaEvSBSHH20UhRn+LQht7nH+s+HBcF3/T8Tawkc2dHl4ykkHYFIbyMNipjEyJjo1VGgmKNcHGfeKSo79yqLdm/zjiRq720xyRMhrt0YDLE6TCERLroC+GivhtOaCkdpZnfpCsdrS7TEdFlGISK+qyDKRm/yDgRq6M00+8mHW3dkI4IpSiREirl1YwTsTpKshrt0nHw50pHkSYjIaQwh4TW9xmdcaJVrEuIg1GllI5s1+kIJ8iBcGHftnBhzsCME1JISYrp2Ji+dISpDJ3m9TlVrWtP+23GiSXkOExHUQ4dWxrrczbB8oxfZpwwQo7TdIQMIYWn0n/Oblp/6hB3nJFk9RlDAt3CwCHVPMuT1K4YkBtYPtj+W4lYSY/G7k9HH/fpKDSEnArNlPUG/aDJYJ3BH6DRYK1Gw9rTkqzRqF9zuongZ5QzTARWU/7YhZ+yitI/QR3LyjMT1LIUDIAanhUDwLd8wC5fQ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NRf1OylQkLmzdtkpQMUcC2o+pZwC1Ut1PjkFfJ9kgm9JJlRRFmfCgcVZGvlZUEn5uAfsp3zUA/ZRFvWECspCSi8oX6Cx90NK70Qjjgf2LsrZUZHf7yRUhllM7/7BVVmzgyuz8ln8tvR0QK8kBb3y63RqllOyk3yapJpnaXZ+FWVJH43FSQ4kyMnfv/jU/P0fa+wz+OjYsv/jfjMr8vv3txXhlVdeeeWVV1555ZVXXnnllVdeeeWVV1555VXG/2f9D+lROV6EKZDWAAAAAElFTkSuQmCC",alt:"",className:"bc-documentFile"})}),e("div",{className:"bc-uploadFileName",children:e("span",{children:t.fileName})}),e("div",{className:"bc-uploadFileCancel",children:e("span",{onClick:()=>{try{a&&t.blob&&t.fileUrl.startsWith("blob:")&&URL.revokeObjectURL(t.fileUrl)}catch{}i()},children:e(ie,{})})})]})},se=({text:n,setText:t,config:o,send:r,placeholder:c})=>{const l=a(null),d=i((()=>{const e=l.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return s((()=>{n||(d(),l.current.focus())}),[d,n]),e("textarea",{ref:l,value:n,className:"bc-messageInputTextArea",id:"textInput",placeholder:c,maxLength:1024,onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const o=l.current.selectionStart,i=n.slice(0,o)+"\n"+n.slice(o);return t(i),void d()}"Enter"===e.key&&(e.preventDefault(),r(),d())},onChange:e=>{t(e.target.value),d()}})},ce=({config:t,send:o,file:i,isFileSelected:r,text:a,setText:s,cancelFileUpload:c,noteMode:l,onCloseNoteMode:d,notePlaceholder:g})=>n("div",{className:"bc-messageInput",children:[l?e(te,{onClick:d,children:e(re,{})}):null,i?e(ae,{file:i,isFileSelected:r,cancelFileUpload:c}):e(se,{text:a,setText:s,config:t,send:o,placeholder:l?g||"Add your note":t.inputPlaceholder||ee[t.language]?.placeholder}),e(ne,{onClick:()=>o(),children:a||i?e(oe,{}):null})]}),le=(e,n)=>`\n &:hover {\n background-image: ${e.replaceAll("%23a3a3a3",n.activeColor)};\n }\n background-image: ${n.isActive?e.replaceAll("%23a3a3a3",n.activeColor):e};\n`,de="\ndisplay: flex;\njustify-content: center;\nalign-items: center;\ngap: 4px;\nborder-radius: 8px;\nborder: 1px solid #D2D6DB;\nbackground: #FFF;\ntransition: background-color 0.2s ease, border-color 0.2s ease;\ncursor: pointer;\nfont-size: 14px;\n&:hover {\n background: #f7f7f7;\n border-color: #dcdcdc;\n}\n&:active {\n background: #f0f0f0;\n}\n";d.button`
184
- ${de}
208
+ `,ce=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.8165 10.197L3.28454 11.453C3.19795 11.4674 3.11669 11.5044 3.04893 11.5602C2.98117 11.6161 2.9293 11.6887 2.89854 11.771L0.301545 18.728C0.0535447 19.368 0.722545 19.978 1.33654 19.671L19.3365 10.671C19.4612 10.6087 19.5661 10.513 19.6394 10.3944C19.7127 10.2759 19.7515 10.1393 19.7515 9.99996C19.7515 9.86061 19.7127 9.72401 19.6394 9.60549C19.5661 9.48697 19.4612 9.39122 19.3365 9.32896L1.33654 0.328962C0.722545 0.0219617 0.0535447 0.632962 0.301545 1.27196L2.89954 8.22896C2.93016 8.31138 2.98196 8.38426 3.04973 8.44027C3.1175 8.49627 3.19884 8.53342 3.28554 8.54796L10.8175 9.80296C10.8639 9.81108 10.9059 9.83529 10.9362 9.87132C10.9664 9.90735 10.983 9.9529 10.983 9.99996C10.983 10.047 10.9664 10.0926 10.9362 10.1286C10.9059 10.1646 10.8639 10.1888 10.8175 10.197H10.8165Z",fill:"#16616C"})}),le=()=>e("svg",{width:"16",height:"18",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.3548 0.250249C10.7253 0.251243 11.0486 0.256214 11.3268 0.28107C11.6959 0.31408 12.0399 0.38555 12.3742 0.55897C12.5063 0.6275 12.6326 0.70664 12.7519 0.79561C13.0537 1.02075 13.2681 1.29917 13.4588 1.61688C13.6385 1.91618 13.8209 2.29263 14.0359 2.7361L14.5274 3.75H19C19.4142 3.75 19.75 4.08579 19.75 4.5C19.75 4.91422 19.4142 5.25 19 5.25H18.2051L17.6265 14.6101C17.5493 15.858 17.4881 16.8482 17.3627 17.6392C17.234 18.4504 17.028 19.126 16.616 19.7169C16.239 20.2574 15.7537 20.7137 15.1909 21.0565C14.5758 21.4313 13.8888 21.5952 13.0712 21.6736C12.274 21.75 11.2818 21.75 10.0316 21.75H9.9539L9.54609 21.7499C8.48365 21.7491 7.61989 21.7415 6.91041 21.6735C6.09186 21.5949 5.40416 21.4307 4.78854 21.0553C4.22537 20.7118 3.73991 20.2547 3.36311 19.7133C2.95121 19.1214 2.74587 18.4449 2.61816 17.6325C2.49362 16.8404 2.43377 15.8488 2.35833 14.5991L1.79393 5.25H1C0.58579 5.25 0.25 4.91422 0.25 4.5C0.25 4.08579 0.58579 3.75 1 3.75H5.57232L5.99135 2.83074L6.11352 2.56332C6.27199 2.21814 6.41408 1.91891 6.55567 1.67073C6.74349 1.34153 6.95704 1.05248 7.26255 0.81811C7.38312 0.72561 7.51116 0.64326 7.64533 0.57192C7.98531 0.39114 8.3369 0.31672 8.7143 0.28236C9.07 0.25 9.4986 0.25 10.0039 0.25L10.3548 0.250249ZM16.7022 5.25H3.29666L3.85327 14.47C3.93157 15.767 3.9879 16.6868 4.09996 17.3996C4.21012 18.1003 4.36439 18.5261 4.59431 18.8565C4.85213 19.2269 5.18428 19.5396 5.56961 19.7747C5.91325 19.9842 6.34758 20.1126 7.05365 20.1803C7.77186 20.2492 8.6934 20.25 9.9928 20.25C11.2905 20.25 12.2107 20.2492 12.928 20.1805C13.6332 20.1128 14.0671 19.9848 14.4105 19.7755C14.7956 19.5409 15.1277 19.2288 15.3856 18.8589C15.6156 18.5291 15.7702 18.1039 15.8812 17.4042C15.9941 16.6925 16.0517 15.7741 16.1317 14.4788L16.7022 5.25ZM10.451 1.75071L9.65985 1.75051C9.31502 1.75191 9.06007 1.75709 8.8503 1.77618C8.5849 1.80035 8.4499 1.84298 8.3496 1.89633C8.2886 1.92876 8.2304 1.96619 8.1756 2.00823C8.0854 2.07739 7.99063 2.18253 7.85853 2.41407C7.71937 2.65798 7.56941 2.98523 7.34281 3.48234L7.2208 3.75H12.8604L12.6999 3.41888C12.4674 2.93926 12.3137 2.62382 12.1727 2.38884C12.0389 2.16588 11.9443 2.06458 11.8551 1.99801C11.8009 1.95756 11.7434 1.92159 11.6834 1.89044C11.5845 1.83916 11.4522 1.79827 11.1932 1.77511C10.9982 1.75767 10.7635 1.75233 10.451 1.75071Z",fill:"#161616"})}),de=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),ge=({file:t,isFileSelected:i,cancelFileUpload:o})=>{const a=C.SupportedImageFormats.indexOf(t.extension)>=0,r=C.SupportedAudioFormats.indexOf(t.extension)>=0;return n("div",{className:"bc-uploadFileDetails",style:{border:i?"green dashed 1px":""},id:"uploadFileDetails",children:[e("div",{className:"bc-uploadedFile",style:{maxWidth:r?300:"auto",pointerEvents:r?"auto":"none"},children:a?e("img",{src:t.fileUrl,alt:"",className:"bc-imageFile"}):r?e("audio",{src:t.fileUrl,controls:!0,style:{height:28}}):e("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPq0lEQVR4nO2caXQUVRbHc2bmw8wXP82MJiyByKiDEHCYccN9QXFFEURxZlRcZkBRXHAXN0TZ3FAIKqABEQggSxKWRBwdBR0cUMCQQEhn6e5s3Z1OSIcl/e6c11WVfvXqvlevqjvCHOqe8zt+qeqU95f/va9aMCPDK6+88sorr7zyyiuvvPLKK6+8Os4rVnrKRbGSrCmx0sy5sZKsPEq7iZ557Zt65rXZ0jsvStnIkq1RnODt1uLek1uKsse0FvX73bH+9z7uqq3k9yfHSjO3xEqzQKMHxEo02rvoCe2be8JBE70StG0y07qpN7RuNBPdmA3RDUlaEvSBSHH20UhRn+LQht7nH+s+HBcF3/T8Tawkc2dHl4ykkHYFIbyMNipjEyJjo1VGgmKNcHGfeKSo79yqLdm/zjiRq720xyRMhrt0YDLE6TCERLroC+GivhtOaCkdpZnfpCsdrS7TEdFlGISK+qyDKRm/yDgRq6M00+8mHW3dkI4IpSiREirl1YwTsTpKshrt0nHw50pHkSYjIaQwh4TW9xmdcaJVrEuIg1GllI5s1+kIJ8iBcGHftnBhzsCME1JISYrp2Ji+dISpDJ3m9TlVrWtP+23GiSXkOExHUQ4dWxrrczbB8oxfZpwwQo7TdIQMIYWn0n/Oblp/6hB3nJFk9RlDAt3CwCHVPMuT1K4YkBtYPtj+W4lYSY/G7k9HH/fpKDSEnArNlPUG/aDJYJ3BH6DRYK1Gw9rTkqzRqF9zuongZ5QzTARWU/7YhZ+yitI/QR3LyjMT1LIUDIAanhUDwLd8wC5fQe5IZ0JKs6H9i/4cZ8LBLWbatgyA1s/NRD8fqFGq0VJCydXYrBFJMEhj0yAIdzG4i9BGg7MSNG8aAqHNZ0NowwAIbRiYoJlSbJALTSxFGo2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srZUZHf7yRUhllM7/7BVVmzgyuz8ln8tvR0QK8kBb3y63RqllOyk3yapJpnaXZ+FWVJH43FSQ4kyMnfv/jU/P0fa+wz+OjYsv/jfjMr8vv3txXhlVdeeeWVV1555ZVXXnnllVdeeeWVV1555VXG/2f9D+lROV6EKZDWAAAAAElFTkSuQmCC",alt:"",className:"bc-documentFile"})}),e("div",{className:"bc-uploadFileName",children:e("span",{children:t.fileName})}),e("div",{className:"bc-uploadFileCancel",children:e("span",{onClick:()=>{try{r&&t.blob&&t.fileUrl.startsWith("blob:")&&URL.revokeObjectURL(t.fileUrl)}catch{}o()},children:e(le,{})})})]})},pe=({text:n,setText:t,config:i,send:a,placeholder:c})=>{const l=r(null),d=o((()=>{const e=l.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return s((()=>{n||(d(),l.current.focus())}),[d,n]),e("textarea",{ref:l,value:n,className:"bc-messageInputTextArea",id:"textInput",placeholder:c,maxLength:1024,onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const i=l.current.selectionStart,o=n.slice(0,i)+"\n"+n.slice(i);return t(o),void d()}"Enter"===e.key&&(e.preventDefault(),a(),d())},onChange:e=>{t(e.target.value),d()}})},he=({config:t,send:i,file:o,isFileSelected:a,text:r,setText:s,cancelFileUpload:c,noteMode:l,onCloseNoteMode:d,notePlaceholder:g})=>n("div",{className:"bc-messageInput",children:[l?e(se,{onClick:d,children:e(de,{})}):null,o?e(ge,{file:o,isFileSelected:a,cancelFileUpload:c}):e(pe,{text:r,setText:s,config:t,send:i,placeholder:l?g||"Add your note":t.inputPlaceholder||N[t.language]?.placeholder}),e(re,{onClick:()=>i(),children:r||o?e(ce,{}):null})]}),me=(e,n)=>`\n &:hover {\n background-image: ${e.replaceAll("%23a3a3a3",n.activeColor)};\n }\n background-image: ${n.isActive?e.replaceAll("%23a3a3a3",n.activeColor):e};\n`,ue="\ndisplay: flex;\njustify-content: center;\nalign-items: center;\ngap: 4px;\nborder-radius: 8px;\nborder: 1px solid #D2D6DB;\nbackground: #FFF;\ntransition: background-color 0.2s ease, border-color 0.2s ease;\ncursor: pointer;\nfont-size: 14px;\n&:hover {\n background: #f7f7f7;\n border-color: #dcdcdc;\n}\n&:active {\n background: #f0f0f0;\n}\n";d.button`
209
+ ${ue}
185
210
  height: 32px;
186
211
  min-height: 32px;
187
212
  max-height: 32px;
188
213
  padding: 0 12px;
189
- `;const ge=d.label`
190
- ${de}
214
+ `;const be=d.label`
215
+ ${ue}
191
216
  width: 32px;
192
217
  height: 32px;
193
218
  min-width: 32px;
@@ -195,19 +220,19 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
195
220
  min-height: 32px;
196
221
  max-height: 32px;
197
222
  padding: 0;
198
- `,pe=d.i`
199
- ${e=>le('url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2218%22%20viewBox%3D%220%200%2016%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.667%207.54199C15.012%207.54217%2015.292%207.82192%2015.292%208.16699C15.2918%2011.9834%2012.3594%2015.1146%208.625%2015.4316V16.708H10.5C10.8451%2016.708%2011.1248%2016.988%2011.125%2017.333C11.125%2017.6782%2010.8452%2017.958%2010.5%2017.958H5.5C5.15482%2017.958%204.875%2017.6782%204.875%2017.333C4.87518%2016.988%205.15493%2016.708%205.5%2016.708H7.375V15.4316C3.64062%2015.1146%200.708174%2011.9834%200.708008%208.16699C0.708008%207.82192%200.98798%207.54217%201.33301%207.54199C1.67819%207.54199%201.95801%207.82181%201.95801%208.16699C1.95818%2011.5036%204.66339%2014.208%208%2014.208C11.3366%2014.208%2014.0418%2011.5036%2014.042%208.16699C14.042%207.82181%2014.3218%207.54199%2014.667%207.54199ZM8%200.0419922C10.6463%200.0419922%2012.7918%202.18679%2012.792%204.83301V8.16699C12.7918%2010.8132%2010.6463%2012.958%208%2012.958C5.35374%2012.958%203.20818%2010.8132%203.20801%208.16699V4.83301C3.20818%202.18679%205.35374%200.0419924%208%200.0419922ZM8%201.29199C6.0441%201.29199%204.45818%202.87715%204.45801%204.83301V8.16699C4.45818%2010.1229%206.0441%2011.708%208%2011.708C9.74256%2011.708%2011.1899%2010.4496%2011.4854%208.79199H9.66699C9.32192%208.79199%209.04217%208.51202%209.04199%208.16699C9.04199%207.82181%209.32181%207.54199%209.66699%207.54199H11.542V5.45801H9.66699C9.32181%205.45801%209.04199%205.17819%209.04199%204.83301C9.04217%204.48798%209.32192%204.20801%209.66699%204.20801H11.4854C11.1899%202.55035%209.74256%201.29199%208%201.29199Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
200
- `,he=d.div`
223
+ `,Ce=d.i`
224
+ ${e=>me('url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2218%22%20viewBox%3D%220%200%2016%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.667%207.54199C15.012%207.54217%2015.292%207.82192%2015.292%208.16699C15.2918%2011.9834%2012.3594%2015.1146%208.625%2015.4316V16.708H10.5C10.8451%2016.708%2011.1248%2016.988%2011.125%2017.333C11.125%2017.6782%2010.8452%2017.958%2010.5%2017.958H5.5C5.15482%2017.958%204.875%2017.6782%204.875%2017.333C4.87518%2016.988%205.15493%2016.708%205.5%2016.708H7.375V15.4316C3.64062%2015.1146%200.708174%2011.9834%200.708008%208.16699C0.708008%207.82192%200.98798%207.54217%201.33301%207.54199C1.67819%207.54199%201.95801%207.82181%201.95801%208.16699C1.95818%2011.5036%204.66339%2014.208%208%2014.208C11.3366%2014.208%2014.0418%2011.5036%2014.042%208.16699C14.042%207.82181%2014.3218%207.54199%2014.667%207.54199ZM8%200.0419922C10.6463%200.0419922%2012.7918%202.18679%2012.792%204.83301V8.16699C12.7918%2010.8132%2010.6463%2012.958%208%2012.958C5.35374%2012.958%203.20818%2010.8132%203.20801%208.16699V4.83301C3.20818%202.18679%205.35374%200.0419924%208%200.0419922ZM8%201.29199C6.0441%201.29199%204.45818%202.87715%204.45801%204.83301V8.16699C4.45818%2010.1229%206.0441%2011.708%208%2011.708C9.74256%2011.708%2011.1899%2010.4496%2011.4854%208.79199H9.66699C9.32192%208.79199%209.04217%208.51202%209.04199%208.16699C9.04199%207.82181%209.32181%207.54199%209.66699%207.54199H11.542V5.45801H9.66699C9.32181%205.45801%209.04199%205.17819%209.04199%204.83301C9.04217%204.48798%209.32192%204.20801%209.66699%204.20801H11.4854C11.1899%202.55035%209.74256%201.29199%208%201.29199Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
225
+ `,xe=d.div`
201
226
  ${e=>e.isRecording&&`\n &:before {\n transform: scale(${1+e.audioLevel/255});\n opacity: ${.6+e.audioLevel/255*.4};\n }\n `}
202
- `,me=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:"#666",fillRule:"evenodd",clipRule:"evenodd"})}),ue=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),be={sampleRate:48e3,channelCount:1,sampleSize:128,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,googEchoCancellation:!0,googAutoGainControl:!0,googNoiseSuppression:!0,googHighpassFilter:!0,googTypingNoiseDetection:!0,googAudioMirroring:!1},Ce=({setProgress:o,setError:c,setFile:l,onActiveChange:d})=>{const[g,p]=r(!1),[h,m]=r(0),u=a(null),b=a(null),C=a(null),x=a(null),f=a(null),v=a(null);s((()=>{const e=document.createElement("script");return e.src="https://cdn.bcrumbs.net/bc-assets/scripts/mic-recorder-to-mp3.js",e.async=!0,e.onload=()=>console.log("Voice recording library loaded successfully"),e.onerror=()=>{console.error("Failed to load voice recording library"),c("Failed to load voice recording library. Please refresh the page.")},document.body.appendChild(e),()=>{document.body.contains(e)&&document.body.removeChild(e)}}),[c]);const w=i((e=>{try{if(!e.active)return void navigator.mediaDevices.getUserMedia({audio:be}).then((e=>{b.current=e,w(e)})).catch((e=>{console.error("Failed to get fresh stream:",e)}));C.current=new(window.AudioContext||window.webkitAudioContext),"suspended"===C.current.state&&C.current.resume().then((()=>{}));const n=C.current.createMediaStreamSource(e);x.current=C.current.createAnalyser(),x.current.fftSize=256,x.current.smoothingTimeConstant=.8,x.current.minDecibels=-90,x.current.maxDecibels=-10,n.connect(x.current);const t=x.current.frequencyBinCount;f.current=new Uint8Array(t);const o=()=>{if(!x.current)return;x.current.getByteFrequencyData(f.current);let e=0;for(let n=0;n<t;n++)e+=f.current[n]*f.current[n];const n=Math.sqrt(e/t),i=Math.min(255,2*n);m(i),v.current=requestAnimationFrame(o)};o()}catch(e){console.error("Audio level monitoring error:",e)}}),[]),y=i((()=>{v.current&&(cancelAnimationFrame(v.current),v.current=null),C.current&&(C.current.close(),C.current=null),m(0)}),[]),M=i((()=>{b.current&&(b.current.getTracks().forEach((e=>{e.stop()})),b.current=null)}),[]);s((()=>()=>{u.current&&g&&u.current.stop(),M(),y()}),[g,y,M]);const A=i((()=>{if(!u.current){if("function"!=typeof MicRecorder)return void c("Please wait a little until voice library is loaded");u.current=new MicRecorder({bitRate:128,sampleRate:48e3})}c(void 0),g?u.current.stop().getMp3().then((([e,n])=>{if(p(!1),y(),M(),d&&d(!0),n.size<1e3)return void c("Recording seems too short. Please try again.");if(!n||0===n.size)return void c("Invalid audio recording. Please try again.");const t=(new Date).toISOString().replace(/[:.]/g,"-"),o=new File([n],`recording-${t}.mp3`,{type:"audio/mpeg"}),i=URL.createObjectURL(o);l({fileUrl:i,fileName:`recording-${t}.mp3`,extension:"mp3",blob:o}),d&&d(!1)})).catch((e=>{p(!1),y(),M(),c(`Recording failed: ${e.message}`),d&&d(!1)})):navigator.mediaDevices.getUserMedia({audio:be}).then((e=>{b.current=e,u.current.start().then((()=>{p(!0),d&&d(!0),setTimeout((()=>{C.current&&"suspended"===C.current.state?C.current.resume().then((()=>{w(e)})).catch((n=>{console.error("Failed to resume audio context:",n),w(e)})):w(e)}),100)})).catch((n=>{c(`Failed to start recording: ${n.message}`),e.getTracks().forEach((e=>e.stop())),d&&d(!1)}))})).catch((e=>{"NotAllowedError"===e.name?c("Microphone access denied. Please allow microphone access and try again."):"NotFoundError"===e.name?c("No microphone found. Please connect a microphone and try again."):c(`Microphone error: ${e.message}`),d&&d(!1)}))}),[g,c,l,w,y,M,d]),k=i((()=>{u.current&&g&&u.current.stop(),p(!1),y(),M(),c(void 0),d&&d(!1)}),[g,y,M,c,d]);return n(t,{children:[g?e(ge,{onClick:k,children:e(ue,{})}):null,e(ge,{onClick:A,id:"voiceRecorderIcon",className:"mic-container",children:g?n(t,{children:[e(me,{}),e(he,{className:"circle "+(g?"active":""),isRecording:g,audioLevel:h})]}):e(pe,{activeColor:"var(--bc-chat-dark-gray-color)"})})]})};const xe=d.i`
203
- ${e=>le('url("data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10%2019.084C15.0163%2019.0838%2019.0838%2015.0163%2019.084%2010C19.0838%204.98367%2015.0163%200.917168%2010%200.916992C4.98367%200.917168%200.917168%204.98367%200.916992%2010C0.917168%2015.0163%204.98367%2019.0838%2010%2019.084ZM10%2017.584C5.8121%2017.5838%202.41717%2014.1879%202.41699%2010C2.41717%205.8121%205.8121%202.41717%2010%202.41699C14.1879%202.41717%2017.5838%205.8121%2017.584%2010C17.5838%2014.1879%2014.1879%2017.5838%2010%2017.584ZM6.6748%208.5C7.22679%208.49964%207.6748%208.05206%207.6748%207.5C7.6748%206.94794%207.22679%206.50036%206.6748%206.5H6.66699C6.11471%206.5%205.66699%206.94771%205.66699%207.5C5.66699%208.05229%206.11471%208.5%206.66699%208.5H6.6748ZM13.334%208.5C13.886%208.49965%2014.334%208.05207%2014.334%207.5C14.334%206.94793%2013.886%206.50035%2013.334%206.5H13.3262C12.7739%206.50001%2012.3262%206.94772%2012.3262%207.5C12.3262%208.05228%2012.7739%208.49999%2013.3262%208.5H13.334ZM10%2014.917C11.6088%2014.9169%2013.038%2014.1426%2013.9336%2012.9502C14.1819%2012.6191%2014.115%2012.1491%2013.7842%2011.9004C13.453%2011.6517%2012.9832%2011.7188%2012.7344%2012.0498C12.1099%2012.8813%2011.117%2013.4169%2010%2013.417C8.88307%2013.4169%207.89111%2012.8811%207.2666%2012.0498C7.01792%2011.7187%206.54798%2011.6519%206.2168%2011.9004C5.88563%2012.1491%205.81871%2012.619%206.06738%2012.9502C6.96298%2014.1425%208.39126%2014.9169%2010%2014.917Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
204
- `,fe=d.span`
227
+ `,fe=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:"#666",fillRule:"evenodd",clipRule:"evenodd"})}),ve=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),ye={sampleRate:48e3,channelCount:1,sampleSize:128,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,googEchoCancellation:!0,googAutoGainControl:!0,googNoiseSuppression:!0,googHighpassFilter:!0,googTypingNoiseDetection:!0,googAudioMirroring:!1},we=({setProgress:i,setError:c,setFile:l,onActiveChange:d})=>{const[g,p]=a(!1),[h,m]=a(0),u=r(null),b=r(null),C=r(null),x=r(null),f=r(null),v=r(null);s((()=>{const e=document.createElement("script");return e.src="https://cdn.bcrumbs.net/bc-assets/scripts/mic-recorder-to-mp3.js",e.async=!0,e.onload=()=>console.log("Voice recording library loaded successfully"),e.onerror=()=>{console.error("Failed to load voice recording library"),c("Failed to load voice recording library. Please refresh the page.")},document.body.appendChild(e),()=>{document.body.contains(e)&&document.body.removeChild(e)}}),[c]);const y=o((e=>{try{if(!e.active)return void navigator.mediaDevices.getUserMedia({audio:ye}).then((e=>{b.current=e,y(e)})).catch((e=>{console.error("Failed to get fresh stream:",e)}));C.current=new(window.AudioContext||window.webkitAudioContext),"suspended"===C.current.state&&C.current.resume().then((()=>{}));const n=C.current.createMediaStreamSource(e);x.current=C.current.createAnalyser(),x.current.fftSize=256,x.current.smoothingTimeConstant=.8,x.current.minDecibels=-90,x.current.maxDecibels=-10,n.connect(x.current);const t=x.current.frequencyBinCount;f.current=new Uint8Array(t);const i=()=>{if(!x.current)return;x.current.getByteFrequencyData(f.current);let e=0;for(let n=0;n<t;n++)e+=f.current[n]*f.current[n];const n=Math.sqrt(e/t),o=Math.min(255,2*n);m(o),v.current=requestAnimationFrame(i)};i()}catch(e){console.error("Audio level monitoring error:",e)}}),[]),w=o((()=>{v.current&&(cancelAnimationFrame(v.current),v.current=null),C.current&&(C.current.close(),C.current=null),m(0)}),[]),M=o((()=>{b.current&&(b.current.getTracks().forEach((e=>{e.stop()})),b.current=null)}),[]);s((()=>()=>{u.current&&g&&u.current.stop(),M(),w()}),[g,w,M]);const A=o((()=>{if(!u.current){if("function"!=typeof MicRecorder)return void c("Please wait a little until voice library is loaded");u.current=new MicRecorder({bitRate:128,sampleRate:48e3})}c(void 0),g?u.current.stop().getMp3().then((([e,n])=>{if(p(!1),w(),M(),d&&d(!0),n.size<1e3)return void c("Recording seems too short. Please try again.");if(!n||0===n.size)return void c("Invalid audio recording. Please try again.");const t=(new Date).toISOString().replace(/[:.]/g,"-"),i=new File([n],`recording-${t}.mp3`,{type:"audio/mpeg"}),o=URL.createObjectURL(i);l({fileUrl:o,fileName:`recording-${t}.mp3`,extension:"mp3",blob:i}),d&&d(!1)})).catch((e=>{p(!1),w(),M(),c(`Recording failed: ${e.message}`),d&&d(!1)})):navigator.mediaDevices.getUserMedia({audio:ye}).then((e=>{b.current=e,u.current.start().then((()=>{p(!0),d&&d(!0),setTimeout((()=>{C.current&&"suspended"===C.current.state?C.current.resume().then((()=>{y(e)})).catch((n=>{console.error("Failed to resume audio context:",n),y(e)})):y(e)}),100)})).catch((n=>{c(`Failed to start recording: ${n.message}`),e.getTracks().forEach((e=>e.stop())),d&&d(!1)}))})).catch((e=>{"NotAllowedError"===e.name?c("Microphone access denied. Please allow microphone access and try again."):"NotFoundError"===e.name?c("No microphone found. Please connect a microphone and try again."):c(`Microphone error: ${e.message}`),d&&d(!1)}))}),[g,c,l,y,w,M,d]),k=o((()=>{u.current&&g&&u.current.stop(),p(!1),w(),M(),c(void 0),d&&d(!1)}),[g,w,M,c,d]);return n(t,{children:[g?e(be,{onClick:k,children:e(ve,{})}):null,e(be,{onClick:A,id:"voiceRecorderIcon",className:"mic-container",children:g?n(t,{children:[e(fe,{}),e(xe,{className:"circle "+(g?"active":""),isRecording:g,audioLevel:h})]}):e(Ce,{activeColor:"var(--bc-chat-dark-gray-color)"})})]})};const Me=d.i`
228
+ ${e=>me('url("data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10%2019.084C15.0163%2019.0838%2019.0838%2015.0163%2019.084%2010C19.0838%204.98367%2015.0163%200.917168%2010%200.916992C4.98367%200.917168%200.917168%204.98367%200.916992%2010C0.917168%2015.0163%204.98367%2019.0838%2010%2019.084ZM10%2017.584C5.8121%2017.5838%202.41717%2014.1879%202.41699%2010C2.41717%205.8121%205.8121%202.41717%2010%202.41699C14.1879%202.41717%2017.5838%205.8121%2017.584%2010C17.5838%2014.1879%2014.1879%2017.5838%2010%2017.584ZM6.6748%208.5C7.22679%208.49964%207.6748%208.05206%207.6748%207.5C7.6748%206.94794%207.22679%206.50036%206.6748%206.5H6.66699C6.11471%206.5%205.66699%206.94771%205.66699%207.5C5.66699%208.05229%206.11471%208.5%206.66699%208.5H6.6748ZM13.334%208.5C13.886%208.49965%2014.334%208.05207%2014.334%207.5C14.334%206.94793%2013.886%206.50035%2013.334%206.5H13.3262C12.7739%206.50001%2012.3262%206.94772%2012.3262%207.5C12.3262%208.05228%2012.7739%208.49999%2013.3262%208.5H13.334ZM10%2014.917C11.6088%2014.9169%2013.038%2014.1426%2013.9336%2012.9502C14.1819%2012.6191%2014.115%2012.1491%2013.7842%2011.9004C13.453%2011.6517%2012.9832%2011.7188%2012.7344%2012.0498C12.1099%2012.8813%2011.117%2013.4169%2010%2013.417C8.88307%2013.4169%207.89111%2012.8811%207.2666%2012.0498C7.01792%2011.7187%206.54798%2011.6519%206.2168%2011.9004C5.88563%2012.1491%205.81871%2012.619%206.06738%2012.9502C6.96298%2014.1425%208.39126%2014.9169%2010%2014.917Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
229
+ `,Ae=d.span`
205
230
  margin: 8px;
206
231
  cursor: pointer;
207
232
  font-size: var(--bc-chat-fontSize-xl);
208
- `,ve=({onClick:n})=>e("div",{id:"emojiIcon",children:e(ge,{children:e(xe,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})})}),we=({text:n,setText:t,onClick:o})=>{const r=function(e){const n=a(null);return s((()=>{const t=t=>{n.current&&!n.current.contains(t.target)&&e()};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}}),[e]),n}(o),c=i((e=>{t(n+e)}),[t,n]),l=f.map(((n,t)=>e(fe,{className:"emoji",onClick:e=>c(e.target.innerText),children:n},"emoji"+t)));return e("div",{ref:r,children:e("div",{className:"bc-emojiPicker",id:"emojiPicker",children:l})})},ye=d.i`
209
- ${e=>le('url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2218%22%20viewBox%3D%220%200%2014%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.91667%202.12488C2.96066%202.12488%201.375%203.71054%201.375%205.66655L1.375%2010.2499C1.375%2013.3565%203.8934%2015.8749%207%2015.8749C10.1066%2015.8749%2012.625%2013.3565%2012.625%2010.2499V8.99993C12.625%208.65475%2012.9048%208.37493%2013.25%208.37493C13.5952%208.37493%2013.875%208.65475%2013.875%208.99993V10.2499C13.875%2014.0469%2010.797%2017.1249%207%2017.1249C3.20304%2017.1249%200.125%2014.0469%200.125%2010.2499L0.125%205.66655C0.125%203.02018%202.2703%200.874878%204.91667%200.874878C7.56303%200.874878%209.70833%203.02018%209.70833%205.66654V10.2499C9.70833%2011.7456%208.49577%2012.9582%207%2012.9582C5.50423%2012.9582%204.29167%2011.7456%204.29167%2010.2499L4.29167%206.91654C4.29167%206.57137%204.57149%206.29154%204.91667%206.29154C5.26184%206.29154%205.54167%206.57137%205.54167%206.91654L5.54167%2010.2499C5.54167%2011.0553%206.19458%2011.7082%207%2011.7082C7.80542%2011.7082%208.45833%2011.0553%208.45833%2010.2499V5.66654C8.45833%203.71054%206.87267%202.12488%204.91667%202.12488Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
210
- `,Me=({setProgress:t,setFile:o,setError:r})=>{const a=i((e=>{o(void 0),r(void 0);const n=Array.from(e.target.files);if(e.target.value="",n.length<1)return;const i=n[0],{name:a,size:s}=i,c=a.substring(a.lastIndexOf(".")+1).toLowerCase();return C.SupportedFormats.indexOf(c)<0?r("File type is not valid."):s>C.MaxFileSize?r("Maximum limit is 20 MBs"):void _(i,t,((e,n)=>{e?o({fileUrl:e,fileName:a,extension:c}):n&&r(n)}))}),[t,o,r]);return n("div",{id:"attachIcon",children:[e(ge,{htmlFor:"fileInput",children:e(ye,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:a})]})},Ae=d.div`
233
+ `,ke=({onClick:n})=>e("div",{id:"emojiIcon",children:e(be,{children:e(Me,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})})}),Ie=({text:n,setText:t,onClick:i})=>{const a=function(e){const n=r(null);return s((()=>{const t=t=>{n.current&&!n.current.contains(t.target)&&e()};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}}),[e]),n}(i),c=o((e=>{t(n+e)}),[t,n]),l=f.map(((n,t)=>e(Ae,{className:"emoji",onClick:e=>c(e.target.innerText),children:n},"emoji"+t)));return e("div",{ref:a,children:e("div",{className:"bc-emojiPicker",id:"emojiPicker",children:l})})},Le=d.i`
234
+ ${e=>me('url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2218%22%20viewBox%3D%220%200%2014%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.91667%202.12488C2.96066%202.12488%201.375%203.71054%201.375%205.66655L1.375%2010.2499C1.375%2013.3565%203.8934%2015.8749%207%2015.8749C10.1066%2015.8749%2012.625%2013.3565%2012.625%2010.2499V8.99993C12.625%208.65475%2012.9048%208.37493%2013.25%208.37493C13.5952%208.37493%2013.875%208.65475%2013.875%208.99993V10.2499C13.875%2014.0469%2010.797%2017.1249%207%2017.1249C3.20304%2017.1249%200.125%2014.0469%200.125%2010.2499L0.125%205.66655C0.125%203.02018%202.2703%200.874878%204.91667%200.874878C7.56303%200.874878%209.70833%203.02018%209.70833%205.66654V10.2499C9.70833%2011.7456%208.49577%2012.9582%207%2012.9582C5.50423%2012.9582%204.29167%2011.7456%204.29167%2010.2499L4.29167%206.91654C4.29167%206.57137%204.57149%206.29154%204.91667%206.29154C5.26184%206.29154%205.54167%206.57137%205.54167%206.91654L5.54167%2010.2499C5.54167%2011.0553%206.19458%2011.7082%207%2011.7082C7.80542%2011.7082%208.45833%2011.0553%208.45833%2010.2499V5.66654C8.45833%203.71054%206.87267%202.12488%204.91667%202.12488Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
235
+ `,Ee=({setProgress:t,setFile:i,setError:a})=>{const r=o((e=>{i(void 0),a(void 0);const n=Array.from(e.target.files);if(e.target.value="",n.length<1)return;const o=n[0],{name:r,size:s}=o,c=r.substring(r.lastIndexOf(".")+1).toLowerCase();return C.SupportedFormats.indexOf(c)<0?a("File type is not valid."):s>C.MaxFileSize?a("Maximum limit is 20 MBs"):void ae(o,t,((e,n)=>{e?i({fileUrl:e,fileName:r,extension:c}):n&&a(n)}))}),[t,i,a]);return n("div",{id:"attachIcon",children:[e(be,{htmlFor:"fileInput",children:e(Le,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:r})]})},Se=d.div`
211
236
  padding: 0px 0px 0px 10px;
212
237
  margin: 0px;
213
238
  width: fit-content;
@@ -222,7 +247,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
222
247
  cursor: pointer;
223
248
  display: block;
224
249
  }
225
- `,ke=({setView:o,setFile:i,setProgress:a,setError:s,text:c,setText:l,send:d})=>{const[g,p]=r(!1),[h,m]=r(!1);return n("div",{className:"bc-inputActions",id:"bc-inputActions",children:[n(Ae,{id:"iconsContainer",children:[h?null:n(t,{children:[e(Me,{setFile:i,setProgress:a,setError:s}),e(ve,{onClick:()=>p(!0)})]}),e(Ce,{setFile:i,setError:s,setProgress:a,onActiveChange:e=>{m(e),e&&p(!1)}})]}),g?e(we,{text:c,setText:l,onClick:()=>p(!1)}):null]})};K('.bc-trademark {\n height: 40px;\n width: 100%;\n box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.1);\n background-color: #fff;\n overflow-y: hidden;\n border-bottom-left-radius: 15px;\n border-bottom-right-radius: 15px;\n padding: 15px 0;\n}\n\n.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.bc-messageInput .bc-messageInputTextArea {\n color: var(--bc-chat-dark-gray-color);\n display: block;\n min-height: 36px;\n background-color: #fff;\n box-sizing: border-box;\n font-size: var(--bc-chat-fontSize-md);\n padding: 10px 0;\n resize: none;\n overflow: auto;\n border-width: 0;\n width: calc(100% - 20px);\n word-wrap: break-word;\n border: none;\n overflow: hidden;\n outline: none;\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n}\n\n.bc-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: fit-content;\n height: 36px;\n margin-left: auto;\n}\n.bc-inputActions .bc-fileUpload {\n display: none;\n}\n.bc-inputActions i {\n display: block;\n margin: 0 5px;\n}\n\n.bc-ActionChips {\n display: flex;\n gap: 10px;\n}\n\n.bc-BottomBar {\n width: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding-top: 8px;\n}\n\n.bc-CommandsArea {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n\n.bc-emojiPicker {\n position: absolute;\n bottom: 40px;\n right: 0;\n width: 200px;\n background: #ffffff 0% 0% no-repeat padding-box;\n box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1019607843);\n border-radius: 10px;\n opacity: 1;\n padding: 10px;\n z-index: 10;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n max-width: calc(100% - 40px);\n width: calc(100% - 40px);\n height: 40px;\n padding: 4px 10px;\n}\n.bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-documentFile {\n max-width: 100%;\n max-height: 100%;\n margin-top: 4px;\n min-width: 25px;\n min-height: 25px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px;\n margin-left: 6px;\n}\n\n.mic-container {\n position: relative;\n}\n.mic-container svg {\n z-index: 5;\n}\n.mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative;\n}\n.mic-container .circle {\n z-index: 4;\n top: 3px;\n left: 3px;\n position: absolute;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n transition: 0.5s;\n}\n.mic-container .circle:before {\n content: "";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute;\n}\n.mic-container .circle.active {\n background-color: #A8E6A3;\n}\n.mic-container .circle.active:before {\n background: #A8E6A3;\n}\n\n@keyframes bounce {\n 0% {\n transform: scale(1);\n }\n 25% {\n transform: scale(1.4);\n }\n 75% {\n transform: scale(1);\n }\n 100% {\n transform: scale(1.3);\n }\n}');const Le=d.div`
250
+ `,Fe=({setView:i,setFile:o,setProgress:r,setError:s,text:c,setText:l,send:d})=>{const[g,p]=a(!1),[h,m]=a(!1);return n("div",{className:"bc-inputActions",id:"bc-inputActions",children:[n(Se,{id:"iconsContainer",children:[h?null:n(t,{children:[e(Ee,{setFile:o,setProgress:r,setError:s}),e(ke,{onClick:()=>p(!0)})]}),e(we,{setFile:o,setError:s,setProgress:r,onActiveChange:e=>{m(e),e&&p(!1)}})]}),g?e(Ie,{text:c,setText:l,onClick:()=>p(!1)}):null]})};O('.bc-trademark {\n height: 40px;\n width: 100%;\n box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.1);\n background-color: #fff;\n overflow-y: hidden;\n border-bottom-left-radius: 15px;\n border-bottom-right-radius: 15px;\n padding: 15px 0;\n}\n\n.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.bc-messageInput .bc-messageInputTextArea {\n color: var(--bc-chat-dark-gray-color);\n display: block;\n min-height: 36px;\n background-color: #fff;\n box-sizing: border-box;\n font-size: var(--bc-chat-fontSize-md);\n padding: 10px 0;\n resize: none;\n overflow: auto;\n border-width: 0;\n width: calc(100% - 20px);\n word-wrap: break-word;\n border: none;\n overflow: hidden;\n outline: none;\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n}\n\n.bc-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: fit-content;\n height: 36px;\n margin-left: auto;\n}\n.bc-inputActions .bc-fileUpload {\n display: none;\n}\n.bc-inputActions i {\n display: block;\n margin: 0 5px;\n}\n\n.bc-ActionChips {\n display: flex;\n gap: 10px;\n}\n\n.bc-BottomBar {\n width: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding-top: 8px;\n}\n\n.bc-CommandsArea {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n\n.bc-emojiPicker {\n position: absolute;\n bottom: 40px;\n right: 0;\n width: 200px;\n background: #ffffff 0% 0% no-repeat padding-box;\n box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1019607843);\n border-radius: 10px;\n opacity: 1;\n padding: 10px;\n z-index: 10;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n max-width: calc(100% - 40px);\n width: calc(100% - 40px);\n height: 40px;\n padding: 4px 10px;\n}\n.bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-documentFile {\n max-width: 100%;\n max-height: 100%;\n margin-top: 4px;\n min-width: 25px;\n min-height: 25px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px;\n margin-left: 6px;\n}\n\n.mic-container {\n position: relative;\n}\n.mic-container svg {\n z-index: 5;\n}\n.mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative;\n}\n.mic-container .circle {\n z-index: 4;\n top: 3px;\n left: 3px;\n position: absolute;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n transition: 0.5s;\n}\n.mic-container .circle:before {\n content: "";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute;\n}\n.mic-container .circle.active {\n background-color: #A8E6A3;\n}\n.mic-container .circle.active:before {\n background: #A8E6A3;\n}\n\n@keyframes bounce {\n 0% {\n transform: scale(1);\n }\n 25% {\n transform: scale(1.4);\n }\n 75% {\n transform: scale(1);\n }\n 100% {\n transform: scale(1.3);\n }\n}');const De=d.div`
226
251
  display: flex;
227
252
  padding: 8px 16px 16px 16px;
228
253
  flex-direction: column;
@@ -244,26 +269,26 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
244
269
  margin-top: 6px;
245
270
  text-align: center;
246
271
  }
247
- `,Ie=({config:t,sendMessage:o,setView:a,actionChips:s,noteMode:c,onNoteSend:l,onCloseNoteMode:d,notePlaceholder:g})=>{const[p,h]=r(),[m,u]=r(),[b,x]=r(),[f,v]=r(0),w=i((e=>{if(c){const e=(p||"").trim();return l&&l(e),void h("")}const n=e=>{const{fileUrl:n,extension:t}=e;o(C.SupportedImageFormats.indexOf(t)>=0?"image":C.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)};e?e.blob&&e.fileUrl.startsWith("blob:")?_(e.blob,v,((t,o)=>{if(t){try{URL.revokeObjectURL(e.fileUrl)}catch{}n({...e,fileUrl:t,blob:void 0})}else o&&x(o)})):n(e):m?m.blob&&m.fileUrl.startsWith("blob:")?_(m.blob,v,((e,t)=>{if(e){try{URL.revokeObjectURL(m.fileUrl)}catch{}n({...m,fileUrl:e,blob:void 0}),u(void 0)}else t&&x(t)})):(n(m),u(void 0)):(o($,p),h(""))}),[m,p,o,c,l]);return n(Le,{children:[e("div",{className:"bc-InputArea",children:e(ce,{config:t,send:w,text:p,setText:h,file:c?void 0:m,isFileSelected:!!m,cancelFileUpload:()=>u(void 0),noteMode:c,onCloseNoteMode:()=>{h(""),d?.()},notePlaceholder:g})}),n("div",{className:"bc-BottomBar",children:[void 0!==s?s:null,e("div",{className:"bc-CommandsArea",children:c?null:e(ke,{setView:a,setFile:u,setProgress:v,setError:x,setText:h,text:p,send:w})})]}),b?e("div",{className:"bc-uploadFileError",children:b}):null]})},Ee="bc-chat-header-banner",Se=390,De=d.div`
248
- ${e=>e.bannerWidth>Se?"height: 60px;":"height: 90px;"}
272
+ `,Be=({config:t,sendMessage:i,setView:r,actionChips:s,noteMode:c,onNoteSend:l,onCloseNoteMode:d,notePlaceholder:g})=>{const[p,h]=a(),[m,u]=a(),[b,x]=a(),[f,v]=a(0),y=o((e=>{if(c){const e=(p||"").trim();return l&&l(e),void h("")}const n=e=>{const{fileUrl:n,extension:t}=e;i(C.SupportedImageFormats.indexOf(t)>=0?"image":C.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)};e?e.blob&&e.fileUrl.startsWith("blob:")?ae(e.blob,v,((t,i)=>{if(t){try{URL.revokeObjectURL(e.fileUrl)}catch{}n({...e,fileUrl:t,blob:void 0})}else i&&x(i)})):n(e):m?m.blob&&m.fileUrl.startsWith("blob:")?ae(m.blob,v,((e,t)=>{if(e){try{URL.revokeObjectURL(m.fileUrl)}catch{}n({...m,fileUrl:e,blob:void 0}),u(void 0)}else t&&x(t)})):(n(m),u(void 0)):(i(oe,p),h(""))}),[m,p,i,c,l]);return n(De,{children:[e("div",{className:"bc-InputArea",children:e(he,{config:t,send:y,text:p,setText:h,file:c?void 0:m,isFileSelected:!!m,cancelFileUpload:()=>u(void 0),noteMode:c,onCloseNoteMode:()=>{h(""),d?.()},notePlaceholder:g})}),n("div",{className:"bc-BottomBar",children:[void 0!==s?s:null,e("div",{className:"bc-CommandsArea",children:c?null:e(Fe,{setView:r,setFile:u,setProgress:v,setError:x,setText:h,text:p,send:y})})]}),b?e("div",{className:"bc-uploadFileError",children:b}):null]})},ze="bc-chat-header-banner",Ne=390,Re=d.div`
273
+ ${e=>e.bannerWidth>Ne?"height: 60px;":"height: 90px;"}
249
274
  display: block;
250
275
  width: 100%;
251
276
  background-color: transparent;
252
277
  z-index: 10;
253
278
  border-top-left-radius: 15px;
254
279
  border-top-right-radius: 15px;
255
- `,Fe=d.div`
280
+ `,Ze=d.div`
256
281
  width: 100%;
257
282
  display: flex;
258
283
  align-items: center;
259
284
  background-image: ${e=>`linear-gradient(103deg, ${e.startColor},${e.endColor})`};
260
- ${e=>e.bannerWidth<=Se?'\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzkwIiBoZWlnaHQ9Ijg4LjM1NCIgdmlld0JveD0iMCAwIDM5MCA4OC4zNTQiPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgyPSIxIiB5Mj0iMSIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM2NjJkOTEiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZWUyYTdiIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8cGF0aCBpZD0iUGF0aF84NzgiIGRhdGEtbmFtZT0iUGF0aCA4NzgiIGQ9Ik0xMCwwSDM4MGExMCwxMCwwLDAsMSwxMCwxMFY3MHMtNzUuMDYtNy44ODYtMTk5LjYxNywxMS44NjJTMCw3MCwwLDcwVjEwQTEwLDEwLDAsMCwxLDEwLDAiIGZpbGw9InVybCgjbGluZWFyLWdyYWRpZW50KSIvPgo8L3N2Zz4K");\n mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzkwIiBoZWlnaHQ9Ijg4LjM1NCIgdmlld0JveD0iMCAwIDM5MCA4OC4zNTQiPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgyPSIxIiB5Mj0iMSIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM2NjJkOTEiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZWUyYTdiIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8cGF0aCBpZD0iUGF0aF84NzgiIGRhdGEtbmFtZT0iUGF0aCA4NzgiIGQ9Ik0xMCwwSDM4MGExMCwxMCwwLDAsMSwxMCwxMFY3MHMtNzUuMDYtNy44ODYtMTk5LjYxNywxMS44NjJTMCw3MCwwLDcwVjEwQTEwLDEwLDAsMCwxLDEwLDAiIGZpbGw9InVybCgjbGluZWFyLWdyYWRpZW50KSIvPgo8L3N2Zz4K");\n mask-repeat: no-repeat;\n mask-size: auto;\n -webkit-mask-size: auto;\n -webkit-mask-repeat: no-repeat;\n height: 90px;\n ':"height: 60px;"}
261
- `,Be=d.div`
285
+ ${e=>e.bannerWidth<=Ne?'\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzkwIiBoZWlnaHQ9Ijg4LjM1NCIgdmlld0JveD0iMCAwIDM5MCA4OC4zNTQiPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgyPSIxIiB5Mj0iMSIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM2NjJkOTEiLz4KICAgICAgPHN0b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ask-repeat: no-repeat;\n mask-size: auto;\n -webkit-mask-size: auto;\n -webkit-mask-repeat: no-repeat;\n height: 90px;\n ':"height: 60px;"}
286
+ `,He=d.div`
262
287
  width: 100%;
263
288
  height: 100%;
264
289
  display: flex;
265
- `,ze=d.div`
266
- ${e=>e.bannerWidth>Se?"padding-bottom: 0 !important;":""}
290
+ `,je=d.div`
291
+ ${e=>e.bannerWidth>Ne?"padding-bottom: 0 !important;":""}
267
292
  display: flex;
268
293
  gap: 10px;
269
294
  align-items: center;
@@ -284,8 +309,8 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
284
309
  color: #fff;
285
310
  font-style: normal;
286
311
  }
287
- `,Ne=d.div`
288
- ${e=>e.bannerWidth>Se?"padding-bottom: 0 !important;":""}
312
+ `,Ge=d.div`
313
+ ${e=>e.bannerWidth>Ne?"padding-bottom: 0 !important;":""}
289
314
  display: flex;
290
315
  flex-direction: row-reverse;
291
316
  gap: 10px;
@@ -300,9 +325,9 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
300
325
  cursor: pointer;
301
326
  display: block;
302
327
  }
303
- `,Ze=d.i`
328
+ `,Je=d.i`
304
329
  background-image: url("data:image/svg+xml;base64,PHN2ZyBpZD0ibWluaW1pemUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgdmlld0JveD0iMCAwIDE2IDEuODE3Ij4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iY2xpcC1wYXRoIj4KICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZV82OCIgZGF0YS1uYW1lPSJSZWN0YW5nbGUgNjgiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgZmlsbD0iIzAwMCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgaWQ9Ikdyb3VwXzMwMSIgZGF0YS1uYW1lPSJHcm91cCAzMDEiIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj4KICAgIDxwYXRoIGlkPSJQYXRoXzgwNCIgZGF0YS1uYW1lPSJQYXRoIDgwNCIgZD0iTTE1LjM5NCwyLjIxMUguNjA2QS42MDYuNjA2LDAsMSwxLC42MDYsMUgxNS4zOTRhLjYwNi42MDYsMCwwLDEsMCwxLjIxMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMC4zOTQpIiBmaWxsPSIjZmZmIi8+CiAgPC9nPgo8L3N2Zz4K");
305
- `,Re=({config:t,minimize:o})=>{const[i,a]=r();return s((()=>{new ResizeObserver((()=>{const e=document.getElementById(Ee)?.offsetWidth;e&&e>50&&e!==i&&a(e)})).observe(document.getElementById(Ee))}),[]),e(De,{bannerWidth:i,className:"bc-header",children:e(Fe,{className:"bc-banner",id:Ee,startColor:"#065A60",endColor:"#006466",bannerWidth:i,children:n(Be,{className:"bc-bannerContents",children:[n(ze,{className:"bc-companyInfo",bannerWidth:i,logo:t.brandLogo||x,children:[e("i",{}),e("span",{children:t.brandName||"BreadCrumbs"})]}),e(Ne,{className:"bc-bannerActions",bannerWidth:i,children:o?e(Ze,{className:"bc-flow-minimize",onClick:()=>o()}):null})]})})})},je=d.div`
330
+ `,Ue=({config:t,minimize:i})=>{const[o,r]=a();return s((()=>{new ResizeObserver((()=>{const e=document.getElementById(ze)?.offsetWidth;e&&e>50&&e!==o&&r(e)})).observe(document.getElementById(ze))}),[]),e(Re,{bannerWidth:o,className:"bc-header",children:e(Ze,{className:"bc-banner",id:ze,startColor:"#065A60",endColor:"#006466",bannerWidth:o,children:n(He,{className:"bc-bannerContents",children:[n(je,{className:"bc-companyInfo",bannerWidth:o,logo:t.brandLogo||x,children:[e("i",{}),e("span",{children:t.brandName||"BreadCrumbs"})]}),e(Ge,{className:"bc-bannerActions",bannerWidth:o,children:i?e(Je,{className:"bc-flow-minimize",onClick:()=>i()}):null})]})})})},Pe=d.div`
306
331
  width: 100%;
307
332
  text-align: center;
308
333
  i {
@@ -333,7 +358,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
333
358
  border-radius: 0px 0px 10px 10px;
334
359
  opacity: 1;
335
360
  }
336
- `,He=o.forwardRef((({forRate:t},o)=>n(je,{className:""+(t?"bc-ratingPositioning":""),children:[e("i",{}),e("span",{children:"Powered by Bread Crumbs"})]})));K('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");\n:root {\n --bc-chat-font-stack: "Poppins", "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 16px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\n --bc-chat-body-4-size: 12px;\n --bc-chat-body-4-lineheight: 20px;\n --bc-text-secondary: #6C737F;\n --bc-chat-fontWeight-light: 100;\n --bc-chat-fontWeight-regular: 400;\n --bc-chat-fontWeight-medium: 500;\n --bc-chat-fontWeight-bold: 700;\n --bc-chat-lineHeight-xs: 18px;\n --bc-chat-lineHeight-sm: 22px;\n --bc-chat-lineHeight-md: 28px;\n --bc-chat-light-gray-color: #9b9b9b;\n --bc-chat-dark-gray-color: #4d4d4d;\n --bc-chat-other-message-border-color: #E5E7EB;\n --bc-chat-other-message-background-start-color: #E5E7EB;\n --bc-chat-other-message-background-end-color: #E5E7EB;\n --bc-chat-other-message-text-color: #161616;\n --bc-chat-my-message-border-color: #258694;\n --bc-chat-my-message-background-start-color: #258694;\n --bc-chat-my-message-background-end-color: #258694;\n --bc-chat-message-highlight-color: #EBC10466;\n --bc-chat-my-message-text-color: #fff;\n --bc-chat-danger-color: #d6312e;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px;\n --bc-background-primary-50: #F3FBFC;\n --bc-border-primary: #16616C;\n}');const Ge=d.div`
361
+ `,Ke=i.forwardRef((({forRate:t},i)=>n(Pe,{className:""+(t?"bc-ratingPositioning":""),children:[e("i",{}),e("span",{children:"Powered by Bread Crumbs"})]})));O('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");\n:root {\n --bc-chat-font-stack: "Poppins", "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 16px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\n --bc-chat-body-4-size: 12px;\n --bc-chat-body-4-lineheight: 20px;\n --bc-text-secondary: #6C737F;\n --bc-chat-fontWeight-light: 100;\n --bc-chat-fontWeight-regular: 400;\n --bc-chat-fontWeight-medium: 500;\n --bc-chat-fontWeight-bold: 700;\n --bc-chat-lineHeight-xs: 18px;\n --bc-chat-lineHeight-sm: 22px;\n --bc-chat-lineHeight-md: 28px;\n --bc-chat-light-gray-color: #9b9b9b;\n --bc-chat-dark-gray-color: #4d4d4d;\n --bc-chat-other-message-border-color: #E5E7EB;\n --bc-chat-other-message-background-start-color: #E5E7EB;\n --bc-chat-other-message-background-end-color: #E5E7EB;\n --bc-chat-other-message-text-color: #161616;\n --bc-chat-my-message-border-color: #258694;\n --bc-chat-my-message-background-start-color: #258694;\n --bc-chat-my-message-background-end-color: #258694;\n --bc-chat-message-highlight-color: #EBC10466;\n --bc-chat-my-message-text-color: #fff;\n --bc-chat-danger-color: #d6312e;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px;\n --bc-background-primary-50: #F3FBFC;\n --bc-border-primary: #16616C;\n}');const Te=d.div`
337
362
  position: relative;
338
363
  height: 100%;
339
364
  display: flex;
@@ -360,5 +385,5 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import o,{useCal
360
385
  line-height: inherit;
361
386
  font-weight: inherit;
362
387
  }
363
- `,Je=({config:t={language:"EN",backgroundColor:"#F3F4F6"},messages:o=[],sendMessage:i,debug:a,minimize:s,onReachingUp:c,agentsIdsAvatarsMap:l,actionChips:d,noteMode:g,onNoteSend:p,onCloseNoteMode:h,searchPattern:m,notePlaceholder:u,searchMatchNo:b=1,onSearchMatchCount:C})=>{const[x,f]=r("MESSAGE_LIST"),v="interactive"===(o&&o.length>0&&o[o.length-1].type);return n(Ge,{className:"bc-chat",children:[t.hideHeader?null:e(Re,{config:t,minimize:s}),"MESSAGE_LIST"===x?e(X,{messages:o,sendMessage:i,debug:a,config:t,onReachingUp:c,agentsIdsAvatarsMap:l,searchPattern:m,searchMatchNo:b,onSearchMatchCount:C},"message-list"):null,v?e(He,{forRate:!0}):t.inputDisabled?null:e(Ie,{sendMessage:i,setView:f,config:t,actionChips:d,noteMode:g,onCloseNoteMode:h,onNoteSend:p,notePlaceholder:u},"message-input")]})};export{Je as BCChat};
388
+ `,Ve=({config:t={language:"EN",backgroundColor:"#F3F4F6"},messages:i=[],sendMessage:o,debug:r,minimize:s,onReachingUp:c,agentsIdsAvatarsMap:l,actionChips:d,noteMode:g,onNoteSend:p,onCloseNoteMode:h,searchPattern:m,notePlaceholder:u,searchMatchNo:b=1,onSearchMatchCount:C})=>{const[x,f]=a("MESSAGE_LIST"),v="interactive"===(i&&i.length>0&&i[i.length-1].type);return n(Te,{className:"bc-chat",children:[t.hideHeader?null:e(Ue,{config:t,minimize:s}),"MESSAGE_LIST"===x?e(ie,{messages:i,sendMessage:o,debug:r,config:t,onReachingUp:c,agentsIdsAvatarsMap:l,searchPattern:m,searchMatchNo:b,onSearchMatchCount:C},"message-list"):null,v?e(Ke,{forRate:!0}):t.inputDisabled?null:e(Be,{sendMessage:o,setView:f,config:t,actionChips:d,noteMode:g,onCloseNoteMode:h,onNoteSend:p,notePlaceholder:u},"message-input")]})};export{Ve as BCChat};
364
389
  //# sourceMappingURL=index.es.js.map