vdb-ai-chat 1.0.37 → 1.0.38

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.
@@ -273,4 +273,4 @@
273
273
  `,ua=vn.Text`
274
274
  font-size: 12px;
275
275
  color: ${e=>{let{theme:t}=e;return t["core-06"]||"#4F4E57"}};
276
- `,ca=i.A.create({listContent:{paddingVertical:8,flexGrow:1,justifyContent:"flex-end"},loading:{paddingVertical:8,alignItems:"center"}}),da=i.A.create({root:{flex:1,height:"100%",width:"100%"}});window.createChatWidget=function(e){const{id:i="chat-widget",apiUrl:a,theme:s,height:l="500px",width:u="360px",button:c={label:"",icon:"",iconColor:"transparent",labelColor:"transparent",backgroundColor:"transparent",borderRadius:"9999px",padding:"0",buttonPosition:{bottom:"60px",right:"44px"}},segmentWriteKey:d,isBetaMode:h,locale:f,translations:p}=e;(f||p)&&zr({locale:f,translations:p});const m=`${i}-modal`,g=`${i}-launcher`;let v=document.getElementById(g);v||(v=document.createElement("button"),v.id=g,v.type="button",v.innerText=c.label||"",v.innerHTML=c.icon||"<svg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 72 72' fill='none'> <g filter='url(#filter0_d_10_66)'> <g clip-path='url(#clip0_10_66)'> <foreignObject x='-33.12' y='-33.12' width='138.24' height='138.24'><div xmlns='http://www.w3.org/1999/xhtml' style='backdrop-filter:blur(1px);clip-path:url(#bgblur_1_10_66_clip_path);height:100%;width:100%'></div></foreignObject><g filter='url(#filter1_g_10_66)' data-figma-bg-blur-radius='2'> <rect width='72' height='72' fill='white' fill-opacity='0.05'/> </g> <g filter='url(#filter2_iii_10_66)'> <rect width='72' height='72' rx='36' fill='url(#paint0_linear_10_66)' fill-opacity='0.7'/> <rect x='0.5' y='0.5' width='71' height='71' rx='35.5' stroke='white' stroke-opacity='0.2'/> </g> <path d='M36 20C36 20 36.8828 28.2399 40.3215 31.6785C43.7601 35.1172 52 36 52 36C52 36 43.7601 36.8828 40.3215 40.3215C36.8828 43.7601 36 52 36 52C36 52 35.1172 43.7601 31.6785 40.3215C28.2399 36.8828 20 36 20 36C20 36 28.2399 35.1172 31.6785 31.6785C35.1172 28.2399 36 20 36 20Z' fill='white'/> </g> </g> <defs> <filter id='filter0_d_10_66' x='0' y='0' width='112' height='112' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'> <feFlood flood-opacity='0' result='BackgroundImageFix'/> <feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/> <feOffset dx='20' dy='20'/> <feGaussianBlur stdDeviation='10'/> <feComposite in2='hardAlpha' operator='out'/> <feColorMatrix type='matrix' values='0 0 0 0 0.862354 0 0 0 0 0.862354 0 0 0 0 0.89855 0 0 0 0.2 0'/> <feBlend mode='normal' in2='BackgroundImageFix' result='effect1_dropShadow_10_66'/> <feBlend mode='normal' in='SourceGraphic' in2='effect1_dropShadow_10_66' result='shape'/> </filter> <filter id='filter1_g_10_66' x='-33.12' y='-33.12' width='138.24' height='138.24' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'> <feFlood flood-opacity='0' result='BackgroundImageFix'/> <feBlend mode='normal' in='SourceGraphic' in2='BackgroundImageFix' result='shape'/> <feTurbulence type='fractalNoise' baseFrequency='0.012303149327635765 0.012303149327635765' numOctaves='3' seed='8425'/> <feDisplacementMap in='shape' scale='66.239997863769531' xChannelSelector='R' yChannelSelector='G' result='displacedImage' width='100%' height='100%'/> <feMerge result='effect1_texture_10_66'> <feMergeNode in='displacedImage'/> </feMerge> </filter> <clipPath id='bgblur_1_10_66_clip_path' transform='translate(33.12 33.12)'><rect width='72' height='72'/> </clipPath><filter id='filter2_iii_10_66' x='-1' y='-2' width='74' height='76' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'> <feFlood flood-opacity='0' result='BackgroundImageFix'/> <feBlend mode='normal' in='SourceGraphic' in2='BackgroundImageFix' result='shape'/> <feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/> <feOffset/> <feGaussianBlur stdDeviation='7'/> <feComposite in2='hardAlpha' operator='arithmetic' k2='-1' k3='1'/> <feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.3 0'/> <feBlend mode='normal' in2='shape' result='effect1_innerShadow_10_66'/> <feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/> <feOffset dx='-1' dy='-3'/> <feGaussianBlur stdDeviation='1'/> <feComposite in2='hardAlpha' operator='arithmetic' k2='-1' k3='1'/> <feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.1 0'/> <feBlend mode='normal' in2='effect1_innerShadow_10_66' result='effect2_innerShadow_10_66'/> <feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/> <feOffset dx='1' dy='3'/> <feGaussianBlur stdDeviation='1'/> <feComposite in2='hardAlpha' operator='arithmetic' k2='-1' k3='1'/> <feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.3 0'/> <feBlend mode='normal' in2='effect2_innerShadow_10_66' result='effect3_innerShadow_10_66'/> </filter> <linearGradient id='paint0_linear_10_66' x1='4.5' y1='16' x2='67.5' y2='52.5' gradientUnits='userSpaceOnUse'> <stop stop-color='#C000FF'/> <stop offset='1' stop-color='#2BFFCA'/> </linearGradient> <clipPath id='clip0_10_66'> <rect width='72' height='72' rx='36' fill='white'/> </clipPath> </defs> </svg>",v.style.color=c.iconColor||"#ffffff",v.style.position="fixed",v.style.zIndex="2147483000",v.style.borderRadius="100px",v.style.padding="0",v.style.width="56px",v.style.height="56px",v.style.backgroundColor=c.backgroundColor||"transparent",v.style.color=c.labelColor||"transparent",v.style.border="none",v.style.cursor="pointer",v.style.boxShadow="0 4px 12px rgba(0,0,0,0.2)",v.style.fontFamily="system-ui, -apple-system, BlinkMacSystemFont, sans-serif",v.style.fontSize="14px",v.style.bottom=c.buttonPosition?.bottom||"24px",c.buttonPosition?.top&&(v.style.top=c.buttonPosition.top),v.style.right=c.buttonPosition?.right||"20px",c.buttonPosition?.left&&(v.style.left=c.buttonPosition.left),document.body.appendChild(v));let y=document.getElementById(m);y||(y=document.createElement("div"),y.id=m,y.style.position="fixed",y.style.zIndex="2147483000",y.style.bottom=c.modalPosition?.bottom||"30px",c.modalPosition?.top&&(y.style.top=c.modalPosition.top),y.style.right=c.modalPosition?.right||"30px",c.modalPosition?.left&&(y.style.left=c.modalPosition.left),y.style.width=u,y.style.height=l,y.style.maxWidth="30%",y.style.maxHeight="80%",y.style.backgroundColor="#ffffff",y.style.borderRadius="12px",y.style.overflow="hidden",y.style.boxShadow="0 16px 40px rgba(0,0,0,0.25)",y.style.display="none",y.style.opacity="0",y.style.transform="translateY(16px) scale(0.98)",y.style.transition="transform 220ms ease-out, opacity 220ms ease-out",document.body.appendChild(y)),function(e,i,a,s,l,u,c,d,h){const f=(0,o.H)(e),p=(e,t)=>{const n={source:"vdb-ai-chat",type:e,payload:t},r=JSON.stringify(n),i=window.ReactNativeWebView;if(i?.postMessage)i.postMessage(r);else{try{window.parent?.postMessage(n,"*")}catch{}try{window.dispatchEvent(new CustomEvent("vdb-ai-event",{detail:n}))}catch{}}},m=t.createElement(n.A,{style:da.root},t.createElement(na,{apiUrl:Fi(i),theme:a,onClose:s,onClearChat:()=>{},onViewAllPress:(e,t)=>{p("ai_view_all",{url:e,payload:t}),s?.()},onItemPress:(e,t)=>{p("ai_item_click",{url:e,item:t}),s?.()},isBetaMode:h}));if(f.render(m),"web"===r.A.OS&&u)try{const e="undefined"!=typeof navigator&&(navigator.userAgent.includes("Edg")||navigator.userAgent.includes("Edge"));dt.load({writeKey:u,trackAppLifecycleEvents:!1,flushAt:e?1:10,flushInterval:1e4,maxBatchSize:e?1:10}).then(async e=>{let[n]=e;n?.debug?.(!0),window.analytics=n,n.page?.();try{const e=await oi(),t=e?.id;t&&n.identify(t)}catch{}const r=t.createElement(ft,{client:n},m);f.render(r)}).catch(e=>{console.error("[Segment] init failed",e)})}catch(e){console.error("[Segment] init failed",e)}}(y,a,s,()=>_(!1),0,d,0,0,h);let b=!1;const _=e=>{b=e,e?(y.style.display="block",requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0px) scale(1)";const e=document.getElementById("chat-input");e&&e.focus()})):(y.style.opacity="0",y.style.transform="translateY(16px) scale(0.98)",setTimeout(()=>{b||(y.style.display="none")},230))};v.onclick=()=>{try{const e=window.analytics;e&&(b?e.track(si.WIDGET_CLOSED,{userAgent:"undefined"!=typeof navigator?navigator.userAgent:""}).then?.():e.track(si.WIDGET_OPENED,{userAgent:"undefined"!=typeof navigator?navigator.userAgent:""}).then?.())}catch(e){}_(!b)}},window.clearChat=function(){e.A.emit("clearChat")},window.changePriceMode=function(t){e.A.emit("changePriceMode",{priceMode:t})},window.setTranslations=async e=>{try{const t=await Pr("persist:root"),n=t?JSON.parse(t):{};let r="string"==typeof n?.globalData?JSON.parse(n.globalData):n?.globalData||{};if(r.ai_chat_bot={...r.ai_chat_bot,translations:e},n.globalData=JSON.stringify(r),await Or("persist:root",JSON.stringify(n)),Dr.isInitialized){const t=Fr(e);Dr.addResourceBundle(Dr.language,"translation",t,!0,!0)}}catch{}},window.getTranslations=async()=>{const e=await Vr();return e&&Object.keys(e).length>0?e:Cr},window.changeLanguage=async e=>{const t=await Vr(),n=jr(t,void 0),r=Fr(n);Dr.addResourceBundle(e,"translation",r,!0,!0),await Dr.changeLanguage(e)},window.initI18n=zr})()})();
276
+ `,ca=i.A.create({listContent:{paddingVertical:8,flexGrow:1,justifyContent:"flex-end"},loading:{paddingVertical:8,alignItems:"center"}}),da=i.A.create({root:{flex:1,height:"100%",width:"100%"}});window.createChatWidget=function(e){const{id:i="chat-widget",apiUrl:a,theme:s,height:l="500px",width:u="360px",button:c={label:"",icon:"",iconColor:"transparent",labelColor:"transparent",backgroundColor:"transparent",borderRadius:"9999px",padding:"0",buttonPosition:{bottom:"60px",right:"44px"}},segmentWriteKey:d,isBetaMode:h,locale:f,translations:p}=e;(f||p)&&zr({locale:f,translations:p});const m=`${i}-modal`,g=`${i}-launcher`;let v=document.getElementById(g);v||(v=document.createElement("button"),v.id=g,v.type="button",v.innerText=c.label||"",v.innerHTML=c.icon||"<svg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 72 72' fill='none'> <g filter='url(#filter0_d_10_66)'> <g clip-path='url(#clip0_10_66)'> <foreignObject x='-33.12' y='-33.12' width='138.24' height='138.24'><div xmlns='http://www.w3.org/1999/xhtml' style='backdrop-filter:blur(1px);clip-path:url(#bgblur_1_10_66_clip_path);height:100%;width:100%'></div></foreignObject><g filter='url(#filter1_g_10_66)' data-figma-bg-blur-radius='2'> <rect width='72' height='72' fill='white' fill-opacity='0.05'/> </g> <g filter='url(#filter2_iii_10_66)'> <rect width='72' height='72' rx='36' fill='url(#paint0_linear_10_66)' fill-opacity='0.7'/> <rect x='0.5' y='0.5' width='71' height='71' rx='35.5' stroke='white' stroke-opacity='0.2'/> </g> <path d='M36 20C36 20 36.8828 28.2399 40.3215 31.6785C43.7601 35.1172 52 36 52 36C52 36 43.7601 36.8828 40.3215 40.3215C36.8828 43.7601 36 52 36 52C36 52 35.1172 43.7601 31.6785 40.3215C28.2399 36.8828 20 36 20 36C20 36 28.2399 35.1172 31.6785 31.6785C35.1172 28.2399 36 20 36 20Z' fill='white'/> </g> </g> <defs> <filter id='filter0_d_10_66' x='0' y='0' width='112' height='112' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'> <feFlood flood-opacity='0' result='BackgroundImageFix'/> <feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/> <feOffset dx='20' dy='20'/> <feGaussianBlur stdDeviation='10'/> <feComposite in2='hardAlpha' operator='out'/> <feColorMatrix type='matrix' values='0 0 0 0 0.862354 0 0 0 0 0.862354 0 0 0 0 0.89855 0 0 0 0.2 0'/> <feBlend mode='normal' in2='BackgroundImageFix' result='effect1_dropShadow_10_66'/> <feBlend mode='normal' in='SourceGraphic' in2='effect1_dropShadow_10_66' result='shape'/> </filter> <filter id='filter1_g_10_66' x='-33.12' y='-33.12' width='138.24' height='138.24' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'> <feFlood flood-opacity='0' result='BackgroundImageFix'/> <feBlend mode='normal' in='SourceGraphic' in2='BackgroundImageFix' result='shape'/> <feTurbulence type='fractalNoise' baseFrequency='0.012303149327635765 0.012303149327635765' numOctaves='3' seed='8425'/> <feDisplacementMap in='shape' scale='66.239997863769531' xChannelSelector='R' yChannelSelector='G' result='displacedImage' width='100%' height='100%'/> <feMerge result='effect1_texture_10_66'> <feMergeNode in='displacedImage'/> </feMerge> </filter> <clipPath id='bgblur_1_10_66_clip_path' transform='translate(33.12 33.12)'><rect width='72' height='72'/> </clipPath><filter id='filter2_iii_10_66' x='-1' y='-2' width='74' height='76' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'> <feFlood flood-opacity='0' result='BackgroundImageFix'/> <feBlend mode='normal' in='SourceGraphic' in2='BackgroundImageFix' result='shape'/> <feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/> <feOffset/> <feGaussianBlur stdDeviation='7'/> <feComposite in2='hardAlpha' operator='arithmetic' k2='-1' k3='1'/> <feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.3 0'/> <feBlend mode='normal' in2='shape' result='effect1_innerShadow_10_66'/> <feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/> <feOffset dx='-1' dy='-3'/> <feGaussianBlur stdDeviation='1'/> <feComposite in2='hardAlpha' operator='arithmetic' k2='-1' k3='1'/> <feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.1 0'/> <feBlend mode='normal' in2='effect1_innerShadow_10_66' result='effect2_innerShadow_10_66'/> <feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/> <feOffset dx='1' dy='3'/> <feGaussianBlur stdDeviation='1'/> <feComposite in2='hardAlpha' operator='arithmetic' k2='-1' k3='1'/> <feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.3 0'/> <feBlend mode='normal' in2='effect2_innerShadow_10_66' result='effect3_innerShadow_10_66'/> </filter> <linearGradient id='paint0_linear_10_66' x1='4.5' y1='16' x2='67.5' y2='52.5' gradientUnits='userSpaceOnUse'> <stop stop-color='#C000FF'/> <stop offset='1' stop-color='#2BFFCA'/> </linearGradient> <clipPath id='clip0_10_66'> <rect width='72' height='72' rx='36' fill='white'/> </clipPath> </defs> </svg>",v.style.color=c.iconColor||"#ffffff",v.style.position="fixed",v.style.zIndex="2147483000",v.style.borderRadius="100px",v.style.padding="0",v.style.width="56px",v.style.height="56px",v.style.backgroundColor=c.backgroundColor||"transparent",v.style.color=c.labelColor||"transparent",v.style.border="none",v.style.cursor="pointer",v.style.boxShadow="0 4px 12px rgba(0,0,0,0.2)",v.style.fontFamily="system-ui, -apple-system, BlinkMacSystemFont, sans-serif",v.style.fontSize="14px",v.style.bottom=c.buttonPosition?.bottom||"24px",c.buttonPosition?.top&&(v.style.top=c.buttonPosition.top),v.style.right=c.buttonPosition?.right||"20px",c.buttonPosition?.left&&(v.style.left=c.buttonPosition.left),document.body.appendChild(v));let y=document.getElementById(m);y||(y=document.createElement("div"),y.id=m,y.style.position="fixed",y.style.zIndex="2147483000",y.style.bottom=c.modalPosition?.bottom||"30px",c.modalPosition?.top&&(y.style.top=c.modalPosition.top),y.style.right=c.modalPosition?.right||"30px",c.modalPosition?.left&&(y.style.left=c.modalPosition.left),y.style.width=u,y.style.height=l,y.style.maxWidth="30%",y.style.maxHeight="80%",y.style.backgroundColor="#ffffff",y.style.borderRadius="12px",y.style.overflow="hidden",y.style.boxShadow="0 16px 40px rgba(0,0,0,0.25)",y.style.display="none",y.style.opacity="0",y.style.transform="translateY(16px) scale(0.98)",y.style.transition="transform 220ms ease-out, opacity 220ms ease-out",document.body.appendChild(y)),function(e,i,a,s,l,u,c,d,h){const f=(0,o.H)(e),p=(e,t)=>{const n={source:"vdb-ai-chat",type:e,payload:t},r=JSON.stringify(n),i=window.ReactNativeWebView;if(i?.postMessage)i.postMessage(r);else{try{window.parent?.postMessage(n,"*")}catch{}try{window.dispatchEvent(new CustomEvent("vdb-ai-event",{detail:n}))}catch{}}},m=t.createElement(n.A,{style:da.root},t.createElement(na,{apiUrl:i,theme:a,onClose:s,onClearChat:()=>{},onViewAllPress:(e,t)=>{p("ai_view_all",{url:e,payload:t}),s?.()},onItemPress:(e,t)=>{p("ai_item_click",{url:e,item:t}),s?.()},isBetaMode:h}));if(f.render(m),"web"===r.A.OS&&u)try{const e="undefined"!=typeof navigator&&(navigator.userAgent.includes("Edg")||navigator.userAgent.includes("Edge"));dt.load({writeKey:u,trackAppLifecycleEvents:!1,flushAt:e?1:10,flushInterval:1e4,maxBatchSize:e?1:10}).then(async e=>{let[n]=e;n?.debug?.(!0),window.analytics=n,n.page?.();try{const e=await oi(),t=e?.id;t&&n.identify(t)}catch{}const r=t.createElement(ft,{client:n},m);f.render(r)}).catch(e=>{console.error("[Segment] init failed",e)})}catch(e){console.error("[Segment] init failed",e)}}(y,a,s,()=>_(!1),0,d,0,0,h);let b=!1;const _=e=>{b=e,e?(y.style.display="block",requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0px) scale(1)";const e=document.getElementById("chat-input");e&&e.focus()})):(y.style.opacity="0",y.style.transform="translateY(16px) scale(0.98)",setTimeout(()=>{b||(y.style.display="none")},230))};v.onclick=()=>{try{const e=window.analytics;e&&(b?e.track(si.WIDGET_CLOSED,{userAgent:"undefined"!=typeof navigator?navigator.userAgent:""}).then?.():e.track(si.WIDGET_OPENED,{userAgent:"undefined"!=typeof navigator?navigator.userAgent:""}).then?.())}catch(e){}_(!b)}},window.clearChat=function(){e.A.emit("clearChat")},window.changePriceMode=function(t){e.A.emit("changePriceMode",{priceMode:t})},window.setTranslations=async e=>{try{const t=await Pr("persist:root"),n=t?JSON.parse(t):{};let r="string"==typeof n?.globalData?JSON.parse(n.globalData):n?.globalData||{};if(r.ai_chat_bot={...r.ai_chat_bot,translations:e},n.globalData=JSON.stringify(r),await Or("persist:root",JSON.stringify(n)),Dr.isInitialized){const t=Fr(e);Dr.addResourceBundle(Dr.language,"translation",t,!0,!0)}}catch{}},window.getTranslations=async()=>{const e=await Vr();return e&&Object.keys(e).length>0?e:Cr},window.changeLanguage=async e=>{const t=await Vr(),n=jr(t,void 0),r=Fr(n);Dr.addResourceBundle(e,"translation",r,!0,!0),await Dr.changeLanguage(e)},window.initI18n=zr})()})();
@@ -11,7 +11,6 @@ var _analyticsNext = require("@segment/analytics-next");
11
11
  var _AnalyticsClientContext = require("./contexts/AnalyticsClientContext");
12
12
  var _ChatWidget = require("./components/ChatWidget");
13
13
  var _utils = require("./components/utils");
14
- var _routes = _interopRequireDefault(require("./routes"));
15
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
15
  function renderChatApp(domElement, apiUrl, theme, onClose, onClearChat, segmentWriteKey, onViewAllPress, onItemPress, isBetaMode) {
17
16
  const root = (0, _client.createRoot)(domElement);
@@ -62,7 +61,7 @@ function renderChatApp(domElement, apiUrl, theme, onClose, onClearChat, segmentW
62
61
  const content = /*#__PURE__*/_react.default.createElement(_reactNative.View, {
63
62
  style: styles.root
64
63
  }, /*#__PURE__*/_react.default.createElement(_ChatWidget.ChatWidget, {
65
- apiUrl: _routes.default.AGENCT_CONVERSATIONS(apiUrl),
64
+ apiUrl: apiUrl,
66
65
  theme: theme,
67
66
  onClose: onClose,
68
67
  onClearChat: onClearChat,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_client","_analyticsNext","_AnalyticsClientContext","_ChatWidget","_utils","_routes","e","__esModule","default","renderChatApp","domElement","apiUrl","theme","onClose","onClearChat","segmentWriteKey","onViewAllPress","onItemPress","isBetaMode","root","createRoot","sendToParent","type","payload","msg","source","json","JSON","stringify","rnwv","window","ReactNativeWebView","postMessage","parent","dispatchEvent","CustomEvent","detail","handleViewAll","url","handleItemPress","item","content","createElement","View","style","styles","ChatWidget","Routes","AGENCT_CONVERSATIONS","render","Platform","OS","isEdge","navigator","userAgent","includes","clientPromise","AnalyticsBrowser","load","writeKey","trackAppLifecycleEvents","flushAt","flushInterval","maxBatchSize","then","client","debug","analytics","page","user","getUserDetails","userId","id","identify","contentWithAnalytics","AnalyticsClientProvider","catch","console","error","StyleSheet","create","flex","height","width"],"sourceRoot":"../../src","sources":["index.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAR,sBAAA,CAAAC,OAAA;AAA8B,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvB,SAASG,aAAaA,CAC3BC,UAAuB,EACvBC,MAAc,EACdC,KAA0B,EAC1BC,OAAoB,EACpBC,WAAwB,EACxBC,e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AAGF,IAAI,EAAEG,EAAE;UACvB,IAAID,MAAM,EAAEN,MAAM,CAACQ,QAAQ,CAACF,MAAM,CAAC;QACrC,CAAC,CAAC,MAAM,CAAC;QAET,MAAMG,oBAAoB,gBACxB9E,MAAA,CAAAY,OAAA,CAAAkC,aAAA,CAACxC,uBAAA,CAAAyE,uBAAuB;UAACV,MAAM,EAAEA;QAAO,GACrCxB,OACsB,CAC1B;QACDtB,IAAI,CAAC8B,MAAM,CAACyB,oBAAoB,CAAC;MACnC,CAAC,CAAC,CACDE,KAAK,CAAEtE,CAAM,IAAK;QACjB;QACAuE,OAAO,CAACC,KAAK,CAAC,uBAAuB,EAAExE,CAAC,CAAC;MAC3C,CAAC,CAAC;IACN,CAAC,CAAC,OAAOA,CAAC,EAAE;MACV;MACAuE,OAAO,CAACC,KAAK,CAAC,uBAAuB,EAAExE,CAAC,CAAC;IAC3C;EACF;AACF;AAEA,MAAMuC,MAAM,GAAGkC,uBAAU,CAACC,MAAM,CAAC;EAC/B7D,IAAI,EAAE;IACJ8D,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_client","_analyticsNext","_AnalyticsClientContext","_ChatWidget","_utils","e","__esModule","default","renderChatApp","domElement","apiUrl","theme","onClose","onClearChat","segmentWriteKey","onViewAllPress","onItemPress","isBetaMode","root","createRoot","sendToParent","type","payload","msg","source","json","JSON","stringify","rnwv","window","ReactNativeWebView","postMessage","parent","dispatchEvent","CustomEvent","detail","handleViewAll","url","handleItemPress","item","content","createElement","View","style","styles","ChatWidget","render","Platform","OS","isEdge","navigator","userAgent","includes","clientPromise","AnalyticsBrowser","load","writeKey","trackAppLifecycleEvents","flushAt","flushInterval","maxBatchSize","then","client","debug","analytics","page","user","getUserDetails","userId","id","identify","contentWithAnalytics","AnalyticsClientProvider","catch","console","error","StyleSheet","create","flex","height","width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owser } from "@segment/analytics-next";
5
5
  import { AnalyticsClientProvider } from "./contexts/AnalyticsClientContext";
6
6
  import { ChatWidget } from "./components/ChatWidget";
7
7
  import { getUserDetails } from "./components/utils";
8
- import Routes from "./routes";
9
8
  export function renderChatApp(domElement, apiUrl, theme, onClose, onClearChat, segmentWriteKey, onViewAllPress, onItemPress, isBetaMode) {
10
9
  const root = createRoot(domElement);
11
10
 
@@ -55,7 +54,7 @@ export function renderChatApp(domElement, apiUrl, theme, onClose, onClearChat, s
55
54
  const content = /*#__PURE__*/React.createElement(View, {
56
55
  style: styles.root
57
56
  }, /*#__PURE__*/React.createElement(ChatWidget, {
58
- apiUrl: Routes.AGENCT_CONVERSATIONS(apiUrl),
57
+ apiUrl: apiUrl,
59
58
  theme: theme,
60
59
  onClose: onClose,
61
60
  onClearChat: onClearChat,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","StyleSheet","View","createRoot","AnalyticsBrowser","AnalyticsClientProvider","ChatWidget","getUserDetails","Routes","renderChatApp","domElement","apiUrl","theme","onClose","onClearChat","segmentWriteKey","onViewAllPress","onItemPress","isBetaMode","root","sendToParent","type","payload","msg","source","json","JSON","stringify","rnwv","window","ReactNativeWebView","postMessage","parent","dispatchEvent","CustomEvent","detail","handleViewAll","url","handleItemPress","item","content","createElement","style","styles","AGENCT_CONVERSATIONS","render","OS","isEdge","navigator","userAgent","includes","clientPromise","load","writeKey","trackAppLifecycleEvents","flushAt","flushInterval","maxBatchSize","then","client","debug","analytics","page","user","userId","id","identify","contentWithAnalytics","catch","e","console","error","create","flex","height","width"],"sourceRoot":"../../src","sources":["index.web.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,uBAAuB,QAAQ,mCAAmC;AAC3E,SAASC,UAAU,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AM;QAElCA,MAAM,CAACG,IAAI,GAAG,CAAC;QACf,IAAI;UACF,MAAMC,IAAI,GAAG,MAAMxD,cAAc,CAAC,CAAC;UACnC,MAAMyD,MAAM,GAAGD,IAAI,EAAEE,EAAE;UACvB,IAAID,MAAM,EAAEL,MAAM,CAACO,QAAQ,CAACF,MAAM,CAAC;QACrC,CAAC,CAAC,MAAM,CAAC;QAET,MAAMG,oBAAoB,gBACxBpE,KAAA,CAAA0C,aAAA,CAACpC,uBAAuB;UAACsD,MAAM,EAAEA;QAAO,GACrCnB,OACsB,CAC1B;QACDrB,IAAI,CAAC0B,MAAM,CAACsB,oBAAoB,CAAC;MACnC,CAAC,CAAC,CACDC,KAAK,CAAEC,CAAM,IAAK;QACjB;QACAC,OAAO,CAACC,KAAK,CAAC,uBAAuB,EAAEF,CAAC,CAAC;MAC3C,CAAC,CAAC;IACN,CAAC,CAAC,OAAOA,CAAC,EAAE;MACV;MACAC,OAAO,CAACC,KAAK,CAAC,uBAAuB,EAAEF,CAAC,CAAC;IAC3C;EACF;AACF;AAEA,MAAM1B,MAAM,GAAG1C,UAAU,CAACuE,MAAM,CAAC;EAC/BrD,IAAI,EAAE;IACJsD,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","StyleSheet","View","createRoot","AnalyticsBrowser","AnalyticsClientProvider","ChatWidget","getUserDetails","renderChatApp","domElement","apiUrl","theme","onClose","onClearChat","segmentWriteKey","onViewAllPress","onItemPress","isBetaMode","root","sendToParent","type","payload","msg","source","json","JSON","stringify","rnwv","window","ReactNativeWebView","postMessage","parent","dispatchEvent","CustomEvent","detail","handleViewAll","url","handleItemPress","item","content","createElement","style","styles","render","OS","isEdge","navigator","userAgent","includes","clientPromise","load","writeKey","trackAppLifecycleEvents","flushAt","flushInterval","maxBatchSize","then","client","debug","analytics","page","user","userId","id","identify","contentWithAnalytics","catch","e","console","error","create","flex","height","width"],"sourceRoot":"../../src","sources":["index.web.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,uBAAuB,QAAQ,mCAAmC;AAC3E,SAASC,UAAU,QAAQ,yBAAyB;AAEpD,SAASC,cAAc,QAAQ,oBAAoB;AAGnD,OAAO,SAASC,aAAaA,CAC3BC,UAAuB,EACvBC,MAAc,EACdC,KAA0B,EAC1BC,OAAoB,EACpBC,WAAwB,EACxBC,eAAwB,EACxBC,cAAoD,EACpDC,WAA8C,EAC9CC,UAAoB,EACpB;EACA,MAAMC,IAAI,GAAGf,UAAU,CAACM,UAAU,CAAC;;EAEnC;EACA,MAAMU,YAAY,GAAGA,CAACC,IAAY,EAAEC,OAAY,KAAK;IACnD,MAAMC,GAAG,GAAG;MAAEC,MAAM,EAAE,aAAa;MAAEH,IAAI;MAAEC;IAAQ,CAAC;IACpD,MAAMG,IAAI,GAAGC,IAAI,CAACC,SAAS,CAACJ,GAAG,CAAC;;IAEhC;IACA,MAAMK,IAAI,GAAIC,MAAM,CAASC,kBAAkB;IAC/C,IAAIF,IAAI,EAAEG,WAAW,EAAE;MACrBH,IAAI,CAACG,WAAW,CAACN,IAAI,CAAC;IACxB,CAAC,MAAM;MACL;MACA,IAAI;QACFI,MAAM,CAACG,MAAM,EAAED,WAAW,CAACR,GAAG,EAAE,GAAG,CAAC;MACtC,CAAC,CAAC,MAAM,CAAC;MACT,IAAI;QACFM,MAAM,CAACI,aAAa,CAAC,IAAIC,WAAW,CAAC,cAAc,EAAE;UAAEC,MAAM,EAAEZ;QAAI,CAAC,CAAC,CAAC;MACxE,CAAC,CAAC,MAAM,CAAC;IACX;EACF,CAAC;EAED,MAAMa,aAAa,GAAGA,CAACC,GAAW,EAAEf,OAAY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BC,YAAY,EAAGV,MAAM,GAAG,CAAC,GAAG;MAC9B,CAAQ,CAAC;MAETI,aAAa,CACVO,IAAI,CAAC,OAAO,CAACC,MAAM,CAAM,KAAK;QAC5BA,MAAM,EAAUC,KAAK,GAAG,IAAI,CAAC;QAC7B9B,MAAM,CAAS+B,SAAS,GAAGF,MAAM;QAElCA,MAAM,CAACG,IAAI,GAAG,CAAC;QACf,IAAI;UACF,MAAMC,IAAI,GAAG,MAAMtD,cAAc,CAAC,CAAC;UACnC,MAAMuD,MAAM,GAAGD,IAAI,EAAEE,EAAE;UACvB,IAAID,MAAM,EAAEL,MAAM,CAACO,QAAQ,CAACF,MAAM,CAAC;QACrC,CAAC,CAAC,MAAM,CAAC;QAET,MAAMG,oBAAoB,gBACxBlE,KAAA,CAAAyC,aAAA,CAACnC,uBAAuB;UAACoD,MAAM,EAAEA;QAAO,GACrClB,OACsB,CAC1B;QACDrB,IAAI,CAACyB,MAAM,CAACsB,oBAAoB,CAAC;MACnC,CAAC,CAAC,CACDC,KAAK,CAAEC,CAAM,IAAK;QACjB;QACAC,OAAO,CAACC,KAAK,CAAC,uBAAuB,EAAEF,CAAC,CAAC;MAC3C,CAAC,CAAC;IACN,CAAC,CAAC,OAAOA,CAAC,EAAE;MACV;MACAC,OAAO,CAACC,KAAK,CAAC,uBAAuB,EAAEF,CAAC,CAAC;IAC3C;EACF;AACF;AAEA,MAAMzB,MAAM,GAAGzC,UAAU,CAACqE,MAAM,CAAC;EAC/BpD,IAAI,EAAE;IACJqD,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vdb-ai-chat",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "Cross-platform AI chat widget for React Native and Web",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
package/src/index.web.tsx CHANGED
@@ -57,7 +57,7 @@ export function renderChatApp(
57
57
  const content = (
58
58
  <View style={styles.root}>
59
59
  <ChatWidget
60
- apiUrl={Routes.AGENCT_CONVERSATIONS(apiUrl)}
60
+ apiUrl={apiUrl}
61
61
  theme={theme}
62
62
  onClose={onClose}
63
63
  onClearChat={onClearChat}