tia-gpc-widget 1.1.5 → 1.1.6

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/dist/loader.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * TIA GPC Widget Loader
3
- * @version 1.1.5
3
+ * @version 1.1.6
4
4
  */
5
5
 
6
6
  (function() {
@@ -12,7 +12,7 @@
12
12
  timeout: 15000,
13
13
  maxRetries: 3,
14
14
  retryDelay: 2000,
15
- fallbackVersion: '1.1.5',
15
+ fallbackVersion: '1.1.6',
16
16
  fallbackCdn: 'https://cdn.jsdelivr.net/npm/tia-gpc-widget'
17
17
  };
18
18
 
@@ -106,7 +106,6 @@
106
106
  return buildFallbackUrls(loaderConfig.version);
107
107
  }
108
108
 
109
- // Add cache buster to force CDN to serve latest version
110
109
  const cacheBuster = Date.now();
111
110
  const versionUrlWithCacheBuster = `${CONFIG.versionUrl}?_=${cacheBuster}`;
112
111
 
@@ -266,7 +265,7 @@
266
265
  }
267
266
 
268
267
  window.TiaGPCLoader = {
269
- version: '1.1.5',
268
+ version: '1.1.6',
270
269
  reload: init,
271
270
  config: CONFIG
272
271
  };
@@ -1,3 +1,3 @@
1
1
  /*! TIA GPC Widget Loader v1.0.0 | (c) 2025 TIA | UNLICENSED */
2
- !function(){"use strict";const e={versionUrl:"https://cdn.jsdelivr.net/npm/tia-gpc-widget@latest/dist/version.json",defaultChannel:"stable",timeout:15e3,maxRetries:3,retryDelay:2e3,fallbackVersion:"1.1.5",fallbackCdn:"https://cdn.jsdelivr.net/npm/tia-gpc-widget"};let t=0,n=Date.now();const o=function(e,t){console.log("[TIA GPC Loader]",e,t||"")},i=function(e,t){console.warn("[TIA GPC Loader]",e,t||"")},a=function(e,t){console.error("[TIA GPC Loader]",e,t||"")};function r(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function s(t){const n=e.fallbackCdn;return{version:t,js:`${n}@${t}/dist/tia-gpc-widget.standalone.js`,css:`${n}@${t}/dist/tia-gpc-widget.standalone.css`,timestamp:null}}async function d(s,c){t++;try{if(o(`Loading widget v${s.version} (attempt ${t}/${e.maxRetries})...`),(l=s.css,new Promise((e,t)=>{if(document.querySelector(`link[href*="${l}"]`))return void e();const n=document.createElement("link");n.rel="stylesheet",n.href=l,n.crossOrigin="anonymous",n.onload=e,n.onerror=()=>t(new Error(`Failed to load CSS: ${l}`)),document.head.appendChild(n)})).catch(e=>{i("CSS loading failed, continuing anyway",e)}),await function(t,n){return new Promise((o,i)=>{const a=document.createElement("script");let r;a.src=t,a.async=!0,a.crossOrigin="anonymous",a.onload=function(){clearTimeout(r),o()},a.onerror=function(){clearTimeout(r),i(new Error(`Failed to load script: ${t}`))},r=setTimeout(()=>{i(new Error(`Timeout loading script: ${t}`))},n||e.timeout),document.head.appendChild(a)})}(s.js,e.timeout),!window.TiaGPC)throw new Error("Widget loaded but TiaGPC global not found");const a=Date.now()-n;return o(`Widget v${s.version} loaded successfully in ${a}ms`),window.TiaGPCWidgetLoaded=!0,window.TiaGPCWidgetVersion=s.version,r("tia-gpc-loader-ready",{version:s.version,loadTime:a,attempts:t,channel:c.channel}),c.apiUrl&&function(e,t){try{fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).catch(()=>{})}catch(e){}}(c.apiUrl,{event:"widget_loaded",version:s.version,loadTime:a,url:window.location.href}),!0}catch(n){if(a(`Failed to load widget (attempt ${t})`,n.message),t<e.maxRetries)return o(`Retrying in ${e.retryDelay}ms...`),await new Promise(t=>setTimeout(t,e.retryDelay)),d(s,c);throw r("tia-gpc-loader-error",{error:n.message,attempts:t,version:s.version}),new Error(`Failed to load widget after ${t} attempts: ${n.message}`)}var l}async function c(){try{if(!0===window.TiaGPCWidgetLoaded||void 0!==window.TiaGPC)return void i("Widget already loaded, skipping");o("Initializing TIA GPC Widget Loader...");const t=function(){const t=document.currentScript||document.querySelector('script[src*="loader"]');return t?{channel:t.getAttribute("data-channel")||e.defaultChannel,version:t.getAttribute("data-version")||null,debug:"true"===t.getAttribute("data-debug"),apiUrl:t.getAttribute("data-api-url")||null}:{}}();t.debug&&o("Loader config:",t);const n=await async function(t){try{if(t.version)return s(t.version);const n=Date.now(),o=`${e.versionUrl}?_=${n}`,i=await fetch(o,{cache:"no-cache",headers:{"Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache"}});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);const a=await i.json(),r=a[t.channel]||a.stable;return{version:a.version,js:r.js,css:r.css,timestamp:a.timestamp}}catch(t){return i("Failed to fetch version info, using fallback",t.message),s(e.fallbackVersion)}}(t);t.debug&&o("Version info:",n),await d(n,t)}catch(e){a("Fatal error initializing widget",e);const t=document.querySelectorAll("tia-gpc-widget");t.length>0&&t.forEach(t=>{t.innerHTML=`\n <div style="padding: 20px; background: #fee; border: 2px solid #c00; border-radius: 8px; font-family: sans-serif;">\n <strong>Error loading TIA GPC Widget</strong>\n <p style="margin: 10px 0 0 0; font-size: 14px;">${e.message}</p>\n </div>\n `})}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c):c(),window.TiaGPCLoader={version:"1.1.5",reload:c,config:e}}();
2
+ !function(){"use strict";const e={versionUrl:"https://cdn.jsdelivr.net/npm/tia-gpc-widget@latest/dist/version.json",defaultChannel:"stable",timeout:15e3,maxRetries:3,retryDelay:2e3,fallbackVersion:"1.1.6",fallbackCdn:"https://cdn.jsdelivr.net/npm/tia-gpc-widget"};let t=0,n=Date.now();const o=function(e,t){console.log("[TIA GPC Loader]",e,t||"")},i=function(e,t){console.warn("[TIA GPC Loader]",e,t||"")},a=function(e,t){console.error("[TIA GPC Loader]",e,t||"")};function r(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function s(t){const n=e.fallbackCdn;return{version:t,js:`${n}@${t}/dist/tia-gpc-widget.standalone.js`,css:`${n}@${t}/dist/tia-gpc-widget.standalone.css`,timestamp:null}}async function d(s,c){t++;try{if(o(`Loading widget v${s.version} (attempt ${t}/${e.maxRetries})...`),(l=s.css,new Promise((e,t)=>{if(document.querySelector(`link[href*="${l}"]`))return void e();const n=document.createElement("link");n.rel="stylesheet",n.href=l,n.crossOrigin="anonymous",n.onload=e,n.onerror=()=>t(new Error(`Failed to load CSS: ${l}`)),document.head.appendChild(n)})).catch(e=>{i("CSS loading failed, continuing anyway",e)}),await function(t,n){return new Promise((o,i)=>{const a=document.createElement("script");let r;a.src=t,a.async=!0,a.crossOrigin="anonymous",a.onload=function(){clearTimeout(r),o()},a.onerror=function(){clearTimeout(r),i(new Error(`Failed to load script: ${t}`))},r=setTimeout(()=>{i(new Error(`Timeout loading script: ${t}`))},n||e.timeout),document.head.appendChild(a)})}(s.js,e.timeout),!window.TiaGPC)throw new Error("Widget loaded but TiaGPC global not found");const a=Date.now()-n;return o(`Widget v${s.version} loaded successfully in ${a}ms`),window.TiaGPCWidgetLoaded=!0,window.TiaGPCWidgetVersion=s.version,r("tia-gpc-loader-ready",{version:s.version,loadTime:a,attempts:t,channel:c.channel}),c.apiUrl&&function(e,t){try{fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).catch(()=>{})}catch(e){}}(c.apiUrl,{event:"widget_loaded",version:s.version,loadTime:a,url:window.location.href}),!0}catch(n){if(a(`Failed to load widget (attempt ${t})`,n.message),t<e.maxRetries)return o(`Retrying in ${e.retryDelay}ms...`),await new Promise(t=>setTimeout(t,e.retryDelay)),d(s,c);throw r("tia-gpc-loader-error",{error:n.message,attempts:t,version:s.version}),new Error(`Failed to load widget after ${t} attempts: ${n.message}`)}var l}async function c(){try{if(!0===window.TiaGPCWidgetLoaded||void 0!==window.TiaGPC)return void i("Widget already loaded, skipping");o("Initializing TIA GPC Widget Loader...");const t=function(){const t=document.currentScript||document.querySelector('script[src*="loader"]');return t?{channel:t.getAttribute("data-channel")||e.defaultChannel,version:t.getAttribute("data-version")||null,debug:"true"===t.getAttribute("data-debug"),apiUrl:t.getAttribute("data-api-url")||null}:{}}();t.debug&&o("Loader config:",t);const n=await async function(t){try{if(t.version)return s(t.version);const n=Date.now(),o=`${e.versionUrl}?_=${n}`,i=await fetch(o,{cache:"no-cache",headers:{"Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache"}});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);const a=await i.json(),r=a[t.channel]||a.stable;return{version:a.version,js:r.js,css:r.css,timestamp:a.timestamp}}catch(t){return i("Failed to fetch version info, using fallback",t.message),s(e.fallbackVersion)}}(t);t.debug&&o("Version info:",n),await d(n,t)}catch(e){a("Fatal error initializing widget",e);const t=document.querySelectorAll("tia-gpc-widget");t.length>0&&t.forEach(t=>{t.innerHTML=`\n <div style="padding: 20px; background: #fee; border: 2px solid #c00; border-radius: 8px; font-family: sans-serif;">\n <strong>Error loading TIA GPC Widget</strong>\n <p style="margin: 10px 0 0 0; font-size: 14px;">${e.message}</p>\n </div>\n `})}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c):c(),window.TiaGPCLoader={version:"1.1.6",reload:c,config:e}}();
3
3
  //# sourceMappingURL=loader.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader.min.js","names":["CONFIG","versionUrl","defaultChannel","timeout","maxRetries","retryDelay","fallbackVersion","fallbackCdn","loadAttempts","loadStartTime","Date","now","log","msg","data","console","warn","error","emit","eventName","detail","window","dispatchEvent","CustomEvent","buildFallbackUrls","version","baseUrl","js","css","timestamp","async","loadWidgetWithRetry","versionInfo","loaderConfig","url","Promise","resolve","reject","document","querySelector","link","createElement","rel","href","crossOrigin","onload","onerror","Error","head","appendChild","catch","err","script","timeoutId","src","clearTimeout","setTimeout","loadScript","TiaGPC","loadTime","TiaGPCWidgetLoaded","TiaGPCWidgetVersion","attempts","channel","apiUrl","fetch","method","headers","body","JSON","stringify","e","sendAnalytics","event","location","message","init","undefined","scriptTag","currentScript","getAttribute","debug","getLoaderConfig","cacheBuster","versionUrlWithCacheBuster","response","cache","Pragma","ok","status","statusText","json","channelData","stable","fetchVersionInfo","widgets","querySelectorAll","length","forEach","widget","innerHTML","readyState","addEventListener","TiaGPCLoader","reload","config"],"sources":["0"],"mappings":";CAKA,WACE,aAEA,MAAMA,EAAS,CACbC,WAAY,uEACZC,eAAgB,SAChBC,QAAS,KACTC,WAAY,EACZC,WAAY,IACZC,gBAAiB,QACjBC,YAAa,+CAGf,IAAIC,EAAe,EACfC,EAAgBC,KAAKC,MAEzB,MAAMC,EACE,SAASC,EAAKC,GAClBC,QAAQH,IAAI,mBAAoBC,EAAKC,GAAQ,GAC/C,EAHIF,EAIE,SAASC,EAAKC,GAClBC,QAAQC,KAAK,mBAAoBH,EAAKC,GAAQ,GAChD,EANIF,EAOG,SAASC,EAAKC,GACnBC,QAAQE,MAAM,mBAAoBJ,EAAKC,GAAQ,GACjD,EAqBF,SAASI,EAAKC,EAAWC,GACvBC,OAAOC,cAAc,IAAIC,YAAYJ,EAAW,CAAEC,WACpD,CAuFA,SAASI,EAAkBC,GACzB,MAAMC,EAAU1B,EAAOO,YACvB,MAAO,CACLkB,QAASA,EACTE,GAAI,GAAGD,KAAWD,sCAClBG,IAAK,GAAGF,KAAWD,uCACnBI,UAAW,KAEf,CAEAC,eAAeC,EAAoBC,EAAaC,GAC9CzB,IAEA,IASE,GARAI,EAAS,mBAAmBoB,EAAYP,oBAAoBjB,KAAgBR,EAAOI,mBAxEnE8B,EA0ELF,EAAYJ,IAzElB,IAAIO,QAAQ,CAACC,EAASC,KAE3B,GADqBC,SAASC,cAAc,eAAeL,OAGzD,YADAE,IAIF,MAAMI,EAAOF,SAASG,cAAc,QACpCD,EAAKE,IAAM,aACXF,EAAKG,KAAOT,EACZM,EAAKI,YAAc,YAEnBJ,EAAKK,OAAST,EACdI,EAAKM,QAAU,IAAMT,EAAO,IAAIU,MAAM,uBAAuBb,MAE7DI,SAASU,KAAKC,YAAYT,MA0DEU,MAAMC,IAChCvC,EAAS,wCAAyCuC,WAtGxD,SAAoBjB,EAAK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D,GAEvCA,EAAagD,OACfrE,EAAS,gBAAiBoB,SAGtBD,EAAoBC,EAAaC,EAEzC,CAAE,MAAOhB,GACPL,EAAU,kCAAmCK,GAE7C,MAAM8E,EAAUzD,SAAS0D,iBAAiB,kBACtCD,EAAQE,OAAS,GACnBF,EAAQG,QAAQC,IACdA,EAAOC,UAAY,iQAGmCnF,EAAM0D,+CAKlE,CACF,CAE4B,YAAxBrC,SAAS+D,WACX/D,SAASgE,iBAAiB,mBAAoB1B,GAE9CA,IAGFvD,OAAOkF,aAAe,CACpB9E,QAAS,QACT+E,OAAQ5B,EACR6B,OAAQzG,EAGX,CA5QD","ignoreList":[]}
1
+ {"version":3,"file":"loader.min.js","names":["CONFIG","versionUrl","defaultChannel","timeout","maxRetries","retryDelay","fallbackVersion","fallbackCdn","loadAttempts","loadStartTime","Date","now","log","msg","data","console","warn","error","emit","eventName","detail","window","dispatchEvent","CustomEvent","buildFallbackUrls","version","baseUrl","js","css","timestamp","async","loadWidgetWithRetry","versionInfo","loaderConfig","url","Promise","resolve","reject","document","querySelector","link","createElement","rel","href","crossOrigin","onload","onerror","Error","head","appendChild","catch","err","script","timeoutId","src","clearTimeout","setTimeout","loadScript","TiaGPC","loadTime","TiaGPCWidgetLoaded","TiaGPCWidgetVersion","attempts","channel","apiUrl","fetch","method","headers","body","JSON","stringify","e","sendAnalytics","event","location","message","init","undefined","scriptTag","currentScript","getAttribute","debug","getLoaderConfig","cacheBuster","versionUrlWithCacheBuster","response","cache","Pragma","ok","status","statusText","json","channelData","stable","fetchVersionInfo","widgets","querySelectorAll","length","forEach","widget","innerHTML","readyState","addEventListener","TiaGPCLoader","reload","config"],"sources":["0"],"mappings":";CAKA,WACE,aAEA,MAAMA,EAAS,CACbC,WAAY,uEACZC,eAAgB,SAChBC,QAAS,KACTC,WAAY,EACZC,WAAY,IACZC,gBAAiB,QACjBC,YAAa,+CAGf,IAAIC,EAAe,EACfC,EAAgBC,KAAKC,MAEzB,MAAMC,EACE,SAASC,E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CA,IAGFvD,OAAOkF,aAAe,CACpB9E,QAAS,QACT+E,OAAQ5B,EACR6B,OAAQzG,EAGX,CA3QD","ignoreList":[]}
@@ -26,7 +26,7 @@ var Q={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"
26
26
  *
27
27
  * This source code is licensed under the ISC license.
28
28
  * See the LICENSE file in the root directory of this source tree.
29
- */const J=l.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},u)=>l.createElement("svg",{ref:u,...Q,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:W("lucide",o),...!i&&!K(s)&&{"aria-hidden":"true"},...s},[...a.map(([e,t])=>l.createElement(e,t)),...Array.isArray(i)?i:[i]])),Y=(e,t)=>{const n=l.forwardRef(({className:n,...r},o)=>{return l.createElement(J,{ref:o,iconNode:t,className:W(`lucide-${i=q(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var i});return n.displayName=q(e),n},G=Y("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),X=Y("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),Z=Y("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),ee=Y("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),te=Y("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),ne=Y("mic-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),re=Y("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]),oe=Y("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),ie=Y("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),ae=Y("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),se=({onClick:e,unreadCount:t=0,widgetConfig:n})=>{const{t:r}=V(),o=n?.company_name||r("widget.title");return O.jsxs("button",{onClick:e,className:"gpc-floating-button gpc-floating-button-with-text gpc-animate-fade-in gpc-pulse-animation","aria-label":r("chat.title"),title:r("chat.title"),style:{boxShadow:"0 4px 20px rgba(59, 130, 246, 0.5)"},children:[O.jsxs("div",{className:"gpc-floating-content",children:[O.jsx(ee,{className:"gpc-floating-icon"}),O.jsxs("span",{className:"gpc-floating-text",children:["💬 ",r("widget.questionsTo")," ",o]})]}),t>0&&O.jsx("span",{className:"gpc-notification-badge",children:t>9?"9+":t})]})};
29
+ */const J=l.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},u)=>l.createElement("svg",{ref:u,...Q,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:W("lucide",o),...!i&&!K(s)&&{"aria-hidden":"true"},...s},[...a.map(([e,t])=>l.createElement(e,t)),...Array.isArray(i)?i:[i]])),Y=(e,t)=>{const n=l.forwardRef(({className:n,...r},o)=>{return l.createElement(J,{ref:o,iconNode:t,className:W(`lucide-${i=q(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var i});return n.displayName=q(e),n},G=Y("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),X=Y("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),Z=Y("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),ee=Y("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),te=Y("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),ne=Y("mic-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),re=Y("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]),oe=Y("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),ie=Y("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),ae=Y("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),se=({onClick:e,unreadCount:t=0,widgetConfig:n})=>{const{t:r}=V(),o=n?.company_name||r("widget.title");return O.jsxs("button",{onClick:e,className:"gpc-floating-button gpc-floating-button-with-text gpc-animate-fade-in","aria-label":r("chat.title"),title:r("chat.title"),children:[O.jsxs("div",{className:"gpc-floating-content",children:[O.jsx(ee,{className:"gpc-floating-icon"}),O.jsxs("span",{className:"gpc-floating-text",children:[r("widget.questionsTo")," ",o]})]}),t>0&&O.jsx("span",{className:"gpc-notification-badge",children:t>9?"9+":t})]})};
30
30
  /**
31
31
  * @license lucide-react v0.525.0 - ISC
32
32
  *