@eshal-bot/chat-widget 0.2.8 → 0.2.10

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.
@@ -1,20 +0,0 @@
1
- import e,{useMemo as t,useState as o,useRef as r,useCallback as a,useEffect as n,forwardRef as i,createElement as s,createContext as l,Suspense as c,lazy as d}from"react";import{createRoot as u}from"react-dom/client";import{jsx as g,jsxs as h,Fragment as p}from"react/jsx-runtime";import{createPortal as m}from"react-dom";const b="processing_start",w="text_chunk",f="processing_end",v="complete",y="follow_up_prompts",k="error",x="human_decision_required",C=e=>{if(!e||"string"!=typeof e)return null;if("[DONE]"===e||"[PROCESSING]"===e)return null;try{const t=JSON.parse(e);if(!t||"object"!=typeof t)return null;const o=t.type||t.event_type;if(o===w||t.content){const e=t.content||t.choices?.[0]?.delta?.content||"";return{type:w,content:e,...t}}return o===b||"processing_start"===t.type?{type:b,...t}:o===f||"processing_end"===t.type?{type:f,...t}:o===v||"complete"===t.type?{type:v,finalContent:t.finalContent||t.content||"",...t}:o===k||"error"===t.type?{type:k,error:t.error||t.message||"Unknown error",...t}:o===x||"human_decision_required"===t.type?{type:x,decisionId:t.decisionId||t.decision_id,question:t.question||"",options:t.options||[],context:t.context||{},...t}:o?{type:o,...t}:t}catch(e){return null}};class S extends Error{constructor(e="SSE stream ended before completion"){super(e),this.name="IncompleteStreamError"}}const M=async(e,t,o,r)=>{const a={"Content-Type":"application/json",Accept:"text/event-stream"};if("function"==typeof o){const e=await o();e&&(a.Authorization=`Bearer ${e}`)}const n=await fetch(`${t.replace(/\/$/,"")}/api/v1/support`,{method:"POST",headers:a,credentials:"include",body:JSON.stringify(e),...r?{signal:r}:{}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);if(!n.body)throw new Error("Response body is null");return n.body},P=()=>({id:`skeleton-${Date.now()}`,role:"assistant",content:"",timestamp:new Date,isProcessing:!0,processingStatus:""}),z=e=>{if(!Array.isArray(e)||0===e.length)return;const t=e.map(e=>({type:e.type||"prompt",text:"string"==typeof e.text?e.text:"",submitText:"string"==typeof e.submitText?e.submitText:void 0,promptId:"string"==typeof e.promptId?e.promptId:void 0,confidence:"number"==typeof e.confidence?e.confidence:void 0})).filter(e=>e.text);return t.length?t:void 0},T=(e,t,o={})=>{e(e=>{const r=[...e||[]],a=r[r.length-1];if("assistant"===a?.role){const{prompts:e,...n}=o||{};r[r.length-1]={...a,...n,content:t,isProcessing:!1,...null!=e&&{prompts:z(e)}}}return r})},F=/model.candidates.failed|gateway|502|redis|litellm|openai.*error|Failed to initialize agent|Streaming error:/i,L="I'm having a little trouble right now. Please try again in a moment.";function N(e){return e&&"string"==typeof e?F.test(e)?L:e:L}const A=(e,t,o,r,a)=>{if(e&&e.type)switch(e.type){case b:{const o=e.choices?.[0]?.delta?.content||"";t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&r.isProcessing?t[t.length-1]={...r,processingStatus:o}:o&&t.push({...P(),processingStatus:o}),t});break}case w:a.current||(a.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],P()]}return e}));const n=e.content||e.choices?.[0]?.delta?.content||"";n&&(o.current+=n,r(o.current));break;case f:(e=>{e(e=>{const t=[...e||[]],o=t[t.length-1];return o?.isProcessing&&(t[t.length-1]={...o,isProcessing:!1}),t})})(t);break;case v:{const r=e.finalContent||o.current,a={};"boolean"==typeof e.conclusionDetected?a.conclusionDetected=e.conclusionDetected:"boolean"==typeof e.conclusion_detected&&(a.conclusionDetected=e.conclusion_detected);const n={...a,prompts:e.prompts};T(t,r,n);break}case y:{const o=Array.isArray(e.prompts)?e.prompts:[];o.length>0&&t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&(t[t.length-1]={...r,prompts:z(o)}),t});break}case k:((e,t)=>{t=N(t),e(e=>{const o=[...e||[]],r=o[o.length-1];return"assistant"===r?.role&&(o[o.length-1]={...r,content:(r.content||"")+`\n\nError: ${t}`,isProcessing:!1}),o})})(t,e.error||"Unknown error occurred");break;case x:{const o={id:`decision-${Date.now()}`,role:"assistant",content:e.question||"",timestamp:new Date,isProcessing:!1,requiresDecision:!0,decisionData:{decisionId:e.decisionId,question:e.question,options:e.options||[],context:e.context||{}}};t(e=>[...(e||[]).filter(e=>!e.isProcessing||e.content),o]);break}default:console.warn("Unknown stream event type:",e.type)}},j=e=>{const t=e.Sources??e.sources??[];return Array.isArray(t)?t.map(e=>({source_type:e.source_type??e.sourceType??"website",source_id:e.sourceid??e.source_id,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices,effective_date:e.effective_date??e.effectiveDate,stale:e.stale})).filter(e=>e.source_id||e.url||"database"===e.source_type):[]},I=async(e,t)=>{const o=(e=>{let t=null,o=null,r=0;const a=n=>{if(n-r<16)o=requestAnimationFrame(a);else{if(null!==t){const o=t;t=null,r=n,e(e=>{const t=[...e||[]],r=t[t.length-1];return"assistant"===r?.role&&(t[t.length-1]={...r,content:o}),t})}o=null}},n=e=>{t=e,null===o&&(o=requestAnimationFrame(a))};return n.cancel=()=>{null!==o&&(cancelAnimationFrame(o),o=null,t=null)},n})(t),r=e.getReader(),a=new TextDecoder;let n="";const i={current:""},s={current:!1};let l=!1;try{for(;;){const{value:e,done:c}=await r.read();if(c)break;n+=a.decode(e,{stream:!0});const d=n.split(/\r?\n\r?\n/);n=d.pop()||"";for(const e of d){const r=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===r.length)continue;const a=r.filter(e=>e.startsWith("data:")).map(e=>e.slice(5).trim());if(0===a.length)continue;const n=a.join("\n");if("[DONE]"===n)continue;let c;try{c=JSON.parse(n)}catch(e){continue}if(c){if(c.type){if("processing_start"===c.type){const e=c.choices?.[0]?.delta?.content||"";t(t=>{const o=[...t||[]],r=o[o.length-1];return r&&"assistant"===r.role&&r.isProcessing?o[o.length-1]={...r,processingStatus:e}:e&&o.push({...P(),processingStatus:e}),o});continue}if("processing_end"===c.type)continue;if("human_handoff"===c.type){l=!0;continue}if("duplicate_suppressed"===c.type){l=!0;continue}if("follow_up_prompts"===c.type){const e=Array.isArray(c.prompts)?c.prompts:[];e.length>0&&t(t=>{const o=[...t||[]],r=o[o.length-1];return r&&"assistant"===r.role&&(o[o.length-1]={...r,prompts:z(e)}),o});continue}if("text_chunk"===c.type){s.current||(s.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],P()]}return e}));const e=c.choices?.[0]?.delta?.content||c.content;e&&(i.current+=e,o(i.current));continue}if("sources"===c.type){const e=j(c);e.length>0&&t(t=>{const o=[...t||[]],r=o[o.length-1];return"assistant"===r?.role&&(o[o.length-1]={...r,sources:e,sourcesPreliminary:!0}),o});continue}if("complete"===c.type){l=!0;const e=j(c),r=c.finalContent||c.choices?.[0]?.delta?.content||i.current,a={};"boolean"==typeof c.conclusionDetected?a.conclusionDetected=c.conclusionDetected:"boolean"==typeof c.conclusion_detected&&(a.conclusionDetected=c.conclusion_detected);const n={...a,prompts:c.prompts};o.cancel(),T(t,r,n),t(t=>{const o=[...t||[]],a=o[o.length-1];if("assistant"===a?.role&&(e.length>0||a.sourcesPreliminary)){const{sourcesPreliminary:t,...n}=a;o[o.length-1]={...n,sources:e,content:r,isProcessing:!1}}return o});continue}if("error"===c.type){t(e=>{const t=[...e||[]],o=t[t.length-1];return"assistant"===o?.role&&(t[t.length-1]={...o,content:(o.content||"")+`\n\nError: ${N(c.error||"Unknown error occurred")}`,isProcessing:!1}),t});continue}const e=C(n);if(e&&e.type){console.log("🔍 Parsed stream event:",e.type,e),A(e,t,i,o,s);continue}}if("chat.completion.chunk"===c.object&&c.choices?.[0]?.delta?.content)s.current||(s.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],P()]}return e})),i.current+=c.choices[0].delta.content,o(i.current);else if(c.choices?.[0]?.finish_reason&&null!==c.choices[0].finish_reason){l=!0;const e={prompts:c.prompts};T(t,i.current,e)}}}}}catch(e){if(e&&"AbortError"===e.name)return void(i.current?T(t,i.current,{stoppedByUser:!0}):t(e=>(e||[]).filter(e=>!e.isProcessing)));throw e}finally{r.releaseLock()}if(!l)throw new S(i.current?"Stream ended mid-response - partial content received":"Stream ended before any content was received")};async function E(e){if("undefined"==typeof window)throw new Error("Audio recorder can only run in the browser");const t=new AudioContext({sampleRate:16e3}),o=new Blob(["\n class PCMRecorderProcessor extends AudioWorkletProcessor {\n process(inputs) {\n if (!inputs.length || !inputs[0].length) {\n return true;\n }\n const inputChannel = inputs[0][0];\n this.port.postMessage(new Float32Array(inputChannel));\n return true;\n }\n }\n registerProcessor('pcm-recorder-processor', PCMRecorderProcessor);\n "],{type:"application/javascript"}),r=URL.createObjectURL(o);await t.audioWorklet.addModule(r),URL.revokeObjectURL(r);const a=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1}}),n=t.createMediaStreamSource(a),i=new AudioWorkletNode(t,"pcm-recorder-processor");return i.port.onmessage=t=>{const o=function(e){const t=new Int16Array(e.length);for(let o=0;o<e.length;o+=1)t[o]=Math.max(-1,Math.min(1,e[o]))*R;return t.buffer}(t.data);e(o)},n.connect(i),[i,t,a]}function B(e){e&&e.getTracks().forEach(e=>e.stop())}const R=32767;const D=.025,V=200,O=1e3,$=300;function U(e,t){const o=e.sampleRate,r=e.energyThreshold??D,a=e.speechStartMs??V,n=e.hangoverMs??O,i=e.preRollMs??$;let s=!1,l=0,c=0,d=[],u=0;return{process:e=>{const g=(e=>e.byteLength/2/o*1e3)(e),h=function(e){const t=new Int16Array(e);if(0===t.length)return 0;let o=0;for(let e=0;e<t.length;e+=1){const r=t[e]/32768;o+=r*r}return Math.sqrt(o/t.length)}(e)>=r;if(s)t.onVoiceFrame(e),h?c=0:(c+=g,c>=n&&(s=!1,l=0,c=0,t.onSpeechEnd()));else{for(d.push({pcm:e,durationMs:g}),u+=g;u>i&&d.length>1;){const e=d.shift();u-=e?.durationMs??0}if(h){if(l+=g,l>=a){s=!0,c=0,t.onSpeechStart?.();for(const e of d)t.onVoiceFrame(e.pcm);d=[],u=0}}else l=0}},reset:()=>{s=!1,l=0,c=0,d=[],u=0},isSpeaking:()=>s}}const H={connectionError:"Sorry, I'm having trouble connecting right now. Please try again.",micDenied:"We couldn't access your microphone. Please allow access and try again.",micNotFound:"No microphone found. Please connect one and try again.",voiceUnavailable:"Voice isn't available right now. Please try again.",categoryTopicsHeading:"Please ask your **{category}** question below.",quickQuestionsHeadingLabel:"Or ask a quick question:",chooseTopicLabel:"Choose a topic to get started:",typeYourMessage:"Type your message...",agentIsLoading:"Agent is loading...",conversationResolved:"Conversation resolved",howWasYourExperience:"How was your experience?",feedbackPrompt:"Please rate our support to help us improve.",feedbackPlaceholder:"Tell us more about your experience...",submitFeedback:"Submit Feedback",submitting:"Submitting...",selectRatingFirst:"Please select a rating first",pleaseSubmitRatingFirst:"Please submit your rating first.",completeOnboardingToEnableVoice:"Complete the onboarding to enable voice",sendMessageToCompleteOnboarding:"Send a message to complete onboarding and enable voice.",resolve:"Resolve",scrollLeft:"Scroll left",scrollRight:"Scroll right",sendMessage:"Send message",stopGenerating:"Stop generating",sessionExpiringSoon:"Your session will expire soon due to inactivity.",startVoiceInput:"Start voice input",stopVoiceInput:"Stop voice input",voiceSessionLive:"Voice session live - speak or type to converse.",connectingVoice:"Connecting to voice session...",poweredBy:"Powered by",poweredByBefore:"Powered by",poweredByAfter:"",menu:"Menu",close:"Close",openChat:"Open chat",closeChat:"Close chat",lightMode:"Light Mode",nightMode:"Night Mode",refreshChat:"Refresh Chat",copyChat:"Copy Chat",startChat:"Start Chat",startingVoiceSession:"Starting voice session...",allowMicAccess:"Allow microphone access",emailRequired:"Please enter your email address",nameRequired:"Please enter your name",phoneRequired:"Please enter your phone number",fieldRequiredSuffix:"is required",emailInvalid:"Please enter a valid email address",nameInvalid:"Please enter a valid name",phoneInvalid:"Please enter a valid phone number",uploadFile:"Upload file",suggestedQuestions:"Suggested questions",agentIsTyping:"Agent is typing",rate:"Rate",rateExperience:"Rate your experience",thumbsUp:"Thumbs up",thumbsDown:"Thumbs down",submittingFeedback:"Submitting feedback...",cancel:"Cancel",submit:"Submit",messageNotDelivered:"Not delivered",retrySend:"Retry"},q={en:H,ar:{connectionError:"عذرًا، أواجه مشكلة في الاتصال حاليًا. يرجى المحاولة مرة أخرى.",micDenied:"لم نتمكن من الوصول إلى الميكروفون. يرجى السماح بالوصول والمحاولة مرة أخرى.",micNotFound:"لم يتم العثور على ميكروفون. يرجى توصيل ميكروفون والمحاولة مرة أخرى.",voiceUnavailable:"الميزة الصوتية غير متوفرة حاليًا. يرجى المحاولة مرة أخرى.",chooseTopicLabel:"اختر موضوعًا للبدء:",categoryTopicsHeading:"يرجى طرح سؤالك حول **{category}** أدناه.",quickQuestionsHeadingLabel:"أو اطرح سؤالًا سريعًا:",typeYourMessage:"اكتب رسالتك هنا...",agentIsLoading:"جارٍ تحميل الوكيل...",conversationResolved:"تم إنهاء المحادثة",howWasYourExperience:"كيف كانت تجربتك؟",feedbackPrompt:"يرجى تقييم خدمتنا لمساعدتنا على التحسن.",feedbackPlaceholder:"أخبرنا المزيد عن تجربتك...",submitFeedback:"إرسال التقييم",submitting:"جارٍ الإرسال...",selectRatingFirst:"يرجى تحديد التقييم أولاً",pleaseSubmitRatingFirst:"يرجى إرسال تقييمك أولاً.",completeOnboardingToEnableVoice:"أكمل التسجيل لتفعيل الصوت",sendMessageToCompleteOnboarding:"أرسل رسالة لإكمال التسجيل وتفعيل الصوت.",resolve:"إنهاء",scrollLeft:"تمرير لليسار",scrollRight:"تمرير لليمين",sendMessage:"إرسال رسالة",voiceSessionLive:"الجلسة الصوتية نشطة - تحدث أو اكتب للتواصل.",connectingVoice:"جارٍ الاتصال بالجلسة الصوتية...",poweredBy:"مدعوم من",menu:"القائمة",close:"إغلاق",openChat:"فتح المحادثة",closeChat:"إغلاق المحادثة",lightMode:"الوضع الفاتح",nightMode:"الوضع الداكن",refreshChat:"تحديث المحادثة",copyChat:"نسخ المحادثة",startChat:"بدء المحادثة",startingVoiceSession:"جارٍ بدء الجلسة الصوتية...",allowMicAccess:"السماح بالوصول إلى الميكروفون",uploadFile:"رفع ملف",suggestedQuestions:"أسئلة مقترحة",agentIsTyping:"الوكيل يكتب",rate:"تقييم",rateExperience:"قيّم تجربتك",thumbsUp:"إعجاب",thumbsDown:"عدم إعجاب",submittingFeedback:"جارٍ إرسال التقييم...",cancel:"إلغاء",submit:"إرسال",messageNotDelivered:"لم يتم الإرسال",retrySend:"إعادة المحاولة"},es:{connectionError:"Lo sentimos, estoy teniendo problemas de conexión en este momento. Inténtalo de nuevo.",micDenied:"No pudimos acceder a tu micrófono. Permite el acceso e inténtalo de nuevo.",micNotFound:"No se encontró ningún micrófono. Conecta uno e inténtalo de nuevo.",voiceUnavailable:"La voz no está disponible en este momento. Inténtalo de nuevo.",chooseTopicLabel:"Elige un tema para empezar:",categoryTopicsHeading:"Por favor, haz tu pregunta sobre **{category}** a continuación.",quickQuestionsHeadingLabel:"O haz una pregunta rápida:",typeYourMessage:"Escribe tu mensaje...",agentIsLoading:"El agente está cargando...",conversationResolved:"Conversación resuelta",howWasYourExperience:"¿Cómo fue tu experiencia?",feedbackPrompt:"Califica nuestro soporte para ayudarnos a mejorar.",feedbackPlaceholder:"Cuéntanos más sobre tu experiencia...",submitFeedback:"Enviar comentarios",submitting:"Enviando...",selectRatingFirst:"Primero selecciona una calificación",pleaseSubmitRatingFirst:"Por favor, envía tu calificación primero.",completeOnboardingToEnableVoice:"Completa la configuración para habilitar la voz",sendMessageToCompleteOnboarding:"Envía un mensaje para completar la configuración y habilitar la voz.",resolve:"Resolver",scrollLeft:"Desplazar a la izquierda",scrollRight:"Desplazar a la derecha",sendMessage:"Enviar mensaje",voiceSessionLive:"Sesión de voz activa - habla o escribe para conversar.",connectingVoice:"Conectando a la sesión de voz...",poweredBy:"Desarrollado por",menu:"Menú",close:"Cerrar",openChat:"Abrir chat",closeChat:"Cerrar chat",lightMode:"Modo claro",nightMode:"Modo oscuro",refreshChat:"Actualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sesión de voz...",allowMicAccess:"Permitir acceso al micrófono"},be:{connectionError:"Прабачце, зараз узнікаюць праблемы з падключэннем. Паспрабуйце яшчэ раз.",micDenied:"Не ўдалося атрымаць доступ да мікрафона. Дазвольце доступ і паспрабуйце яшчэ раз.",micNotFound:"Мікрафон не знойдзены. Падключыце яго і паспрабуйце яшчэ раз.",voiceUnavailable:"Галасавая функцыя зараз недаступная. Паспрабуйце яшчэ раз.",chooseTopicLabel:"Выберыце тэму, каб пачаць:",categoryTopicsHeading:"Калі ласка, задайце сваё пытанне пра **{category}** ніжэй.",quickQuestionsHeadingLabel:"Або задайце хуткае пытанне:",typeYourMessage:"Увядзіце паведамленне...",agentIsLoading:"Агент загружаецца...",conversationResolved:"Размова завершана",howWasYourExperience:"Як прайшоў ваш досвед?",feedbackPrompt:"Калі ласка, ацаніце нашу падтрымку, каб дапамагчы нам стаць лепш.",feedbackPlaceholder:"Раскажыце нам больш пра свой досвед...",submitFeedback:"Адправіць водгук",submitting:"Адпраўка...",selectRatingFirst:"Спачатку абярыце ацэнку",pleaseSubmitRatingFirst:"Калі ласка, спачатку адпраўце сваю ацэнку.",completeOnboardingToEnableVoice:"Завяршыце ўводны этап, каб уключыць голас",sendMessageToCompleteOnboarding:"Адпраўце паведамленне, каб завяршыць уводны этап і ўключыць голас.",resolve:"Завяршыць",scrollLeft:"Пракруціць улева",scrollRight:"Пракруціць управа",sendMessage:"Адправіць паведамленне",voiceSessionLive:"Галасавая сесія актыўная - гаварыце або пішыце.",connectingVoice:"Злучэнне з галасавой сесіяй...",poweredBy:"Працуе на",menu:"Меню",close:"Закрыць",openChat:"Адкрыць чат",closeChat:"Закрыць чат",lightMode:"Светлы рэжым",nightMode:"Цёмны рэжым",refreshChat:"Абнавіць чат",copyChat:"Капіраваць чат",startChat:"Пачаць чат",startingVoiceSession:"Запуск галасавой сесіі...",allowMicAccess:"Дазволіць доступ да мікрафона"},bs:{connectionError:"Izvinite, trenutno imam problema s povezivanjem. Pokušajte ponovo.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dozvolite pristup i pokušajte ponovo.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovo.",voiceUnavailable:"Glasovna funkcija trenutno nije dostupna. Pokušajte ponovo.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** ispod.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite vašu poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o vašem iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite vašu ocjenu.",completeOnboardingToEnableVoice:"Završite registraciju da omogućite glas",sendMessageToCompleteOnboarding:"Pošaljite poruku da završite registraciju i omogućite glas.",resolve:"Završi",scrollLeft:"Pomjeri lijevo",scrollRight:"Pomjeri desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Meni",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Započni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dozvoli pristup mikrofonu"},bg:{connectionError:"Съжалявам, в момента имам проблеми с връзката. Опитайте отново.",micDenied:"Не успяхме да получим достъп до микрофона ви. Разрешете достъпа и опитайте отново.",micNotFound:"Не е намерен микрофон. Свържете микрофон и опитайте отново.",voiceUnavailable:"Гласовата функция не е достъпна в момента. Опитайте отново.",chooseTopicLabel:"Изберете тема, за да започнете:",categoryTopicsHeading:"Моля, задайте въпроса си за **{category}** по-долу.",quickQuestionsHeadingLabel:"Или задайте бърз въпрос:",typeYourMessage:"Въведете съобщението си...",agentIsLoading:"Агентът се зарежда...",conversationResolved:"Разговорът е приключен",howWasYourExperience:"Как беше вашето изживяване?",feedbackPrompt:"Моля, оценете нашата поддръжка, за да ни помогнете да се подобрим.",feedbackPlaceholder:"Разкажете ни повече за вашето изживяване...",submitFeedback:"Изпрати отзив",submitting:"Изпращане...",selectRatingFirst:"Първо изберете оценка",pleaseSubmitRatingFirst:"Моля, първо изпратете оценката си.",completeOnboardingToEnableVoice:"Завършете регистрацията, за да активирате гласа",sendMessageToCompleteOnboarding:"Изпратете съобщение, за да завършите регистрацията и активирате гласа.",resolve:"Приключи",scrollLeft:"Превърти наляво",scrollRight:"Превърти надясно",sendMessage:"Изпрати съобщение",voiceSessionLive:"Гласовата сесия е активна - говорете или пишете.",connectingVoice:"Свързване с гласова сесия...",poweredBy:"Задвижвано от",menu:"Меню",close:"Затвори",openChat:"Отвори чат",closeChat:"Затвори чат",lightMode:"Светъл режим",nightMode:"Тъмен режим",refreshChat:"Опресни чата",copyChat:"Копирай чата",startChat:"Започни чат",startingVoiceSession:"Стартиране на гласова сесия...",allowMicAccess:"Позволете достъп до микрофона"},my:{connectionError:"ဝမ်းနည်းပါသည်၊ ယခု ချိတ်ဆက်ရာတွင် အခက်အခဲရှိနေပါသည်။ ထပ်မံကြိုးစားပါ။",micDenied:"သင့်မိုက်ခရိုဖုန်းကို အသုံးပြုခွင့် မရနိုင်ပါ။ ခွင့်ပြုပြီး ထပ်မံကြိုးစားပါ။",micNotFound:"မိုက်ခရိုဖုန်း မတွေ့ပါ။ ချိတ်ဆက်ပြီး ထပ်မံကြိုးစားပါ။",voiceUnavailable:"အသံလုပ်ဆောင်ချက် ယခုအချိန် မရနိုင်ပါ။ ထပ်မံကြိုးစားပါ။",chooseTopicLabel:"စတင်ရန် ခေါင်းစဉ်တစ်ခု ရွေးချယ်ပါ:",categoryTopicsHeading:"ကျေးဇူးပြု၍ သင်၏ **{category}** မေးခွန်းကို အောက်တွင် မေးပါ။",quickQuestionsHeadingLabel:"သို့မဟုတ် မြန်ဆန်သော မေးခွန်းတစ်ခု မေးပါ:",typeYourMessage:"သင့်မက်ဆေ့ချ်ကို ရိုက်ထည့်ပါ...",agentIsLoading:"အေးဂျင့်ကို ဖွင့်နေသည်...",conversationResolved:"စကားဝိုင်း ပြီးစီးပြီ",howWasYourExperience:"သင့်အတွေ့အကြုံ မည်သို့ရှိခဲ့သနည်း?",feedbackPrompt:"ကျွန်ုပ်တို့၏ ဝန်ဆောင်မှုကို အဆင့်သတ်မှတ်ပေးပါ။",feedbackPlaceholder:"သင့်အတွေ့အကြုံအကြောင်း ပိုမိုပြောပြပါ...",submitFeedback:"တုံ့ပြန်ချက် ပေးပို့ရန်",submitting:"ပေးပို့နေသည်...",selectRatingFirst:"အရင်ဆုံး အဆင့်ရွေးပါ",pleaseSubmitRatingFirst:"ကျေးဇူးပြု၍ အဆင့်ကို အရင်ဆုံးပို့ပါ။",completeOnboardingToEnableVoice:"အသံကို ဖွင့်ရန် မိတ်ဆက်ခြင်းကို ပြီးဆုံးပါ",sendMessageToCompleteOnboarding:"မိတ်ဆက်ခြင်းကို ပြီးဆုံးပြီး အသံဖွင့်ရန် မက်ဆေ့ချ်ပို့ပါ။",resolve:"ပြီးဆုံး",scrollLeft:"ဘယ်ဘက်သို့ ရွှေ့ပါ",scrollRight:"ညာဘက်သို့ ရွှေ့ပါ",sendMessage:"မက်ဆေ့ချ်ပို့ရန်",voiceSessionLive:"အသံစီရင်ချက် တက်ကြွနေသည် - ပြောပါ သို့မဟုတ် ရိုက်ပါ။",connectingVoice:"အသံစီရင်ချက်သို့ ချိတ်ဆက်နေသည်...",poweredBy:"လုပ်ဆောင်ပေးသူ",menu:"မီနူး",close:"ပိတ်",openChat:"ချတ်ဖွင့်",closeChat:"ချတ်ပိတ်",lightMode:"အလင်းမုဒ်",nightMode:"အမှောင်မုဒ်",refreshChat:"ချတ်ပြန်လည်ရယူ",copyChat:"ချတ်ကူးယူ",startChat:"ချတ်စတင်",startingVoiceSession:"အသံစီရင်ချက် စတင်နေသည်...",allowMicAccess:"မိုက်ခရိုဖုန်း ဝင်ရောက်ခွင့်ပြုပါ"},ca:{connectionError:"Ho sentim, ara mateix tinc problemes de connexió. Torna-ho a provar.",micDenied:"No hem pogut accedir al teu micròfon. Permet l'accés i torna-ho a provar.",micNotFound:"No s'ha trobat cap micròfon. Connecta'n un i torna-ho a provar.",voiceUnavailable:"La veu no està disponible ara mateix. Torna-ho a provar.",chooseTopicLabel:"Tria un tema per començar:",categoryTopicsHeading:"Si us plau, fes la teva pregunta sobre **{category}** a continuació.",quickQuestionsHeadingLabel:"O fes una pregunta ràpida:",typeYourMessage:"Escriu el teu missatge...",agentIsLoading:"L'agent està carregant...",conversationResolved:"Conversa resolta",howWasYourExperience:"Com ha estat la teva experiència?",feedbackPrompt:"Si us plau, valora el nostre suport per ajudar-nos a millorar.",feedbackPlaceholder:"Explica'ns més sobre la teva experiència...",submitFeedback:"Enviar comentaris",submitting:"Enviant...",selectRatingFirst:"Primer selecciona una valoració",pleaseSubmitRatingFirst:"Si us plau, envia primer la teva valoració.",completeOnboardingToEnableVoice:"Completa la configuració per activar la veu",sendMessageToCompleteOnboarding:"Envia un missatge per completar la configuració i activar la veu.",resolve:"Resoldre",scrollLeft:"Desplaçar a l'esquerra",scrollRight:"Desplaçar a la dreta",sendMessage:"Enviar missatge",voiceSessionLive:"Sessió de veu activa - parla o escriu per conversar.",connectingVoice:"Connectant a la sessió de veu...",poweredBy:"Impulsat per",menu:"Menú",close:"Tancar",openChat:"Obrir xat",closeChat:"Tancar xat",lightMode:"Mode clar",nightMode:"Mode fosc",refreshChat:"Actualitzar xat",copyChat:"Copiar xat",startChat:"Iniciar xat",startingVoiceSession:"Iniciant sessió de veu...",allowMicAccess:"Permetre accés al micròfon"},zh:{connectionError:"抱歉,我现在连接遇到问题。请重试。",micDenied:"无法访问您的麦克风。请允许访问后重试。",micNotFound:"未检测到麦克风。请连接麦克风后重试。",voiceUnavailable:"语音功能当前不可用。请重试。",chooseTopicLabel:"选择一个主题开始:",categoryTopicsHeading:"请在下方提出您关于 **{category}** 的问题。",quickQuestionsHeadingLabel:"或者提一个快速问题:",typeYourMessage:"输入您的消息...",agentIsLoading:"客服正在加载...",conversationResolved:"对话已结束",howWasYourExperience:"您的体验如何?",feedbackPrompt:"请为我们的支持评分,帮助我们改进。",feedbackPlaceholder:"告诉我们更多关于您的体验...",submitFeedback:"提交反馈",submitting:"提交中...",selectRatingFirst:"请先选择评分",pleaseSubmitRatingFirst:"请先提交您的评分。",completeOnboardingToEnableVoice:"完成引导以启用语音",sendMessageToCompleteOnboarding:"发送消息完成引导并启用语音。",resolve:"结束",scrollLeft:"向左滚动",scrollRight:"向右滚动",sendMessage:"发送消息",voiceSessionLive:"语音会话进行中 - 请说话或输入。",connectingVoice:"正在连接语音会话...",poweredBy:"技术支持",menu:"菜单",close:"关闭",openChat:"打开聊天",closeChat:"关闭聊天",lightMode:"浅色模式",nightMode:"深色模式",refreshChat:"刷新聊天",copyChat:"复制聊天",startChat:"开始聊天",startingVoiceSession:"正在启动语音会话...",allowMicAccess:"允许访问麦克风"},hr:{connectionError:"Nažalost, trenutno imam problema s povezivanjem. Pokušajte ponovno.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dopustite pristup i pokušajte ponovno.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovno.",voiceUnavailable:"Glasovna funkcija trenutačno nije dostupna. Pokušajte ponovno.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** u nastavku.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite svoju poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o svom iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite ocjenu.",completeOnboardingToEnableVoice:"Dovršite uvod za omogućavanje glasa",sendMessageToCompleteOnboarding:"Pošaljite poruku da dovršite uvod i omogućite glas.",resolve:"Završi",scrollLeft:"Pomakni lijevo",scrollRight:"Pomakni desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Izbornik",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Pokreni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dopustite pristup mikrofonu"},cs:{connectionError:"Omlouváme se, momentálně mám problémy s připojením. Zkuste to prosím znovu.",micDenied:"Nepodařilo se získat přístup k mikrofonu. Povolte přístup a zkuste to znovu.",micNotFound:"Mikrofon nebyl nalezen. Připojte jej a zkuste to znovu.",voiceUnavailable:"Hlasová funkce není momentálně dostupná. Zkuste to znovu.",chooseTopicLabel:"Vyberte téma a začněte:",categoryTopicsHeading:"Prosím, položte svou otázku ohledně **{category}** níže.",quickQuestionsHeadingLabel:"Nebo položte rychlou otázku:",typeYourMessage:"Napište zprávu...",agentIsLoading:"Agent se načítá...",conversationResolved:"Konverzace ukončena",howWasYourExperience:"Jaká byla vaše zkušenost?",feedbackPrompt:"Ohodnoťte prosím naši podporu, abychom se mohli zlepšit.",feedbackPlaceholder:"Řekněte nám více o své zkušenosti...",submitFeedback:"Odeslat zpětnou vazbu",submitting:"Odesílání...",selectRatingFirst:"Nejprve vyberte hodnocení",pleaseSubmitRatingFirst:"Nejprve prosím odešlete své hodnocení.",completeOnboardingToEnableVoice:"Dokončete úvod pro povolení hlasu",sendMessageToCompleteOnboarding:"Odešlete zprávu pro dokončení úvodu a povolení hlasu.",resolve:"Dokončit",scrollLeft:"Posunout doleva",scrollRight:"Posunout doprava",sendMessage:"Odeslat zprávu",voiceSessionLive:"Hlasová relace je aktivní - mluvte nebo pište.",connectingVoice:"Připojování k hlasové relaci...",poweredBy:"Používá",menu:"Nabídka",close:"Zavřít",openChat:"Otevřít chat",closeChat:"Zavřít chat",lightMode:"Světlý režim",nightMode:"Tmavý režim",refreshChat:"Obnovit chat",copyChat:"Kopírovat chat",startChat:"Začít chat",startingVoiceSession:"Spouštění hlasové relace...",allowMicAccess:"Povolit přístup k mikrofonu"},da:{connectionError:"Beklager, jeg har problemer med at oprette forbindelse lige nu. Prøv igen.",micDenied:"Vi kunne ikke få adgang til din mikrofon. Tillad adgang og prøv igen.",micNotFound:"Der blev ikke fundet nogen mikrofon. Tilslut en og prøv igen.",voiceUnavailable:"Stemme er ikke tilgængelig lige nu. Prøv igen.",chooseTopicLabel:"Vælg et emne for at komme i gang:",categoryTopicsHeading:"Stil venligst dit spørgsmål om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller stil et hurtigt spørgsmål:",typeYourMessage:"Skriv din besked...",agentIsLoading:"Agenten indlæses...",conversationResolved:"Samtale afsluttet",howWasYourExperience:"Hvordan var din oplevelse?",feedbackPrompt:"Bedøm venligst vores support for at hjælpe os med at blive bedre.",feedbackPlaceholder:"Fortæl os mere om din oplevelse...",submitFeedback:"Indsend feedback",submitting:"Sender...",selectRatingFirst:"Vælg først en vurdering",pleaseSubmitRatingFirst:"Indsend venligst din vurdering først.",completeOnboardingToEnableVoice:"Fuldfør onboarding for at aktivere stemme",sendMessageToCompleteOnboarding:"Send en besked for at fuldføre onboarding og aktivere stemme.",resolve:"Afslut",scrollLeft:"Rul til venstre",scrollRight:"Rul til højre",sendMessage:"Send besked",voiceSessionLive:"Stemmesession aktiv - tal eller skriv for at samtale.",connectingVoice:"Forbinder til stemmesession...",poweredBy:"Drevet af",menu:"Menu",close:"Luk",openChat:"Åbn chat",closeChat:"Luk chat",lightMode:"Lys tilstand",nightMode:"Mørk tilstand",refreshChat:"Opdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter stemmesession...",allowMicAccess:"Tillad mikrofonadgang"},nl:{connectionError:"Sorry, ik heb momenteel verbindingsproblemen. Probeer het opnieuw.",micDenied:"We konden geen toegang krijgen tot je microfoon. Geef toegang en probeer het opnieuw.",micNotFound:"Geen microfoon gevonden. Sluit een microfoon aan en probeer het opnieuw.",voiceUnavailable:"Spraak is momenteel niet beschikbaar. Probeer het opnieuw.",chooseTopicLabel:"Kies een onderwerp om te beginnen:",categoryTopicsHeading:"Stel hieronder uw vraag over **{category}**.",quickQuestionsHeadingLabel:"Of stel een snelle vraag:",typeYourMessage:"Typ je bericht...",agentIsLoading:"Agent wordt geladen...",conversationResolved:"Gesprek beëindigd",howWasYourExperience:"Hoe was je ervaring?",feedbackPrompt:"Beoordeel onze service om ons te helpen verbeteren.",feedbackPlaceholder:"Vertel ons meer over je ervaring...",submitFeedback:"Feedback versturen",submitting:"Versturen...",selectRatingFirst:"Selecteer eerst een beoordeling",pleaseSubmitRatingFirst:"Dien eerst je beoordeling in.",completeOnboardingToEnableVoice:"Voltooi de onboarding om spraak in te schakelen",sendMessageToCompleteOnboarding:"Verstuur een bericht om de onboarding te voltooien en spraak in te schakelen.",resolve:"Afronden",scrollLeft:"Naar links scrollen",scrollRight:"Naar rechts scrollen",sendMessage:"Bericht versturen",voiceSessionLive:"Spraaksessie actief - spreek of typ om te converseren.",connectingVoice:"Verbinden met spraaksessie...",poweredBy:"Mogelijk gemaakt door",menu:"Menu",close:"Sluiten",openChat:"Chat openen",closeChat:"Chat sluiten",lightMode:"Lichte modus",nightMode:"Donkere modus",refreshChat:"Chat vernieuwen",copyChat:"Chat kopiëren",startChat:"Chat starten",startingVoiceSession:"Spraaksessie starten...",allowMicAccess:"Toegang tot microfoon toestaan"},et:{connectionError:"Kahjuks on mul praegu ühendusprobleeme. Palun proovige uuesti.",micDenied:"Mikrofonile ei pääsenud ligi. Lubage juurdepääs ja proovige uuesti.",micNotFound:"Mikrofoni ei leitud. Ühendage mikrofon ja proovige uuesti.",voiceUnavailable:"Hääl ei ole praegu saadaval. Palun proovige uuesti.",chooseTopicLabel:"Vali alustamiseks teema:",categoryTopicsHeading:"Palun esita oma **{category}** küsimus allpool.",quickQuestionsHeadingLabel:"Või esita kiire küsimus:",typeYourMessage:"Sisesta oma sõnum...",agentIsLoading:"Agent laeb...",conversationResolved:"Vestlus lõpetatud",howWasYourExperience:"Kuidas oli teie kogemus?",feedbackPrompt:"Palun hinnake meie tuge, et aidata meil paremaks saada.",feedbackPlaceholder:"Rääkige meile oma kogemusest rohkem...",submitFeedback:"Saada tagasiside",submitting:"Saatmine...",selectRatingFirst:"Vali esmalt hinnang",pleaseSubmitRatingFirst:"Palun esita esmalt oma hinnang.",completeOnboardingToEnableVoice:"Häälefunktsiooni lubamiseks lõpeta sissejuhatus",sendMessageToCompleteOnboarding:"Saada sõnum, et lõpetada sissejuhatus ja lubada hääl.",resolve:"Lõpeta",scrollLeft:"Keri vasakule",scrollRight:"Keri paremale",sendMessage:"Saada sõnum",voiceSessionLive:"Häälseanss aktiivne - rääkige või kirjutage.",connectingVoice:"Ühendamine häälseansiga...",poweredBy:"Võimaldab",menu:"Menüü",close:"Sulge",openChat:"Ava vestlus",closeChat:"Sulge vestlus",lightMode:"Hele režiim",nightMode:"Tume režiim",refreshChat:"Värskenda vestlust",copyChat:"Kopeeri vestlus",startChat:"Alusta vestlust",startingVoiceSession:"Häälseansi käivitamine...",allowMicAccess:"Luba mikrofoni juurdepääs"},fi:{connectionError:"Pahoittelut, minulla on nyt yhteysongelmia. Yritä uudelleen.",micDenied:"Mikrofoniin ei saatu yhteyttä. Salli käyttöoikeus ja yritä uudelleen.",micNotFound:"Mikrofonia ei löytynyt. Liitä mikrofoni ja yritä uudelleen.",voiceUnavailable:"Ääni ei ole juuri nyt käytettävissä. Yritä uudelleen.",chooseTopicLabel:"Aloita valitsemalla aihe:",categoryTopicsHeading:"Esitä **{category}**-kysymyksesi alla.",quickQuestionsHeadingLabel:"Tai esitä nopea kysymys:",typeYourMessage:"Kirjoita viestisi...",agentIsLoading:"Agenttia ladataan...",conversationResolved:"Keskustelu päättynyt",howWasYourExperience:"Millainen kokemuksesi oli?",feedbackPrompt:"Arvioi tukipalveluamme auttaaksesi meitä kehittymään.",feedbackPlaceholder:"Kerro lisää kokemuksestasi...",submitFeedback:"Lähetä palaute",submitting:"Lähetetään...",selectRatingFirst:"Valitse ensin arvio",pleaseSubmitRatingFirst:"Lähetä arviosi ensin.",completeOnboardingToEnableVoice:"Suorita perehdytys ottaaksesi äänen käyttöön",sendMessageToCompleteOnboarding:"Lähetä viesti suorittaaksesi perehdytyksen ja ottaaksesi äänen käyttöön.",resolve:"Lopeta",scrollLeft:"Vieritä vasemmalle",scrollRight:"Vieritä oikealle",sendMessage:"Lähetä viesti",voiceSessionLive:"Ääni-istunto aktiivinen - puhu tai kirjoita.",connectingVoice:"Yhdistetään ääni-istuntoon...",poweredBy:"Toimittaa",menu:"Valikko",close:"Sulje",openChat:"Avaa chat",closeChat:"Sulje chat",lightMode:"Vaalea tila",nightMode:"Tumma tila",refreshChat:"Päivitä chat",copyChat:"Kopioi chat",startChat:"Aloita chat",startingVoiceSession:"Käynnistetään ääni-istuntoa...",allowMicAccess:"Salli mikrofonin käyttö"},fr:{connectionError:"Désolé, je rencontre des problèmes de connexion en ce moment. Veuillez réessayer.",micDenied:"Nous n'avons pas pu accéder à votre microphone. Autorisez l'accès et réessayez.",micNotFound:"Aucun microphone détecté. Connectez-en un et réessayez.",voiceUnavailable:"La voix n'est pas disponible pour le moment. Veuillez réessayer.",chooseTopicLabel:"Choisissez un sujet pour commencer :",categoryTopicsHeading:"Veuillez poser votre question sur **{category}** ci-dessous.",quickQuestionsHeadingLabel:"Ou posez une question rapide :",typeYourMessage:"Tapez votre message...",agentIsLoading:"L'agent est en cours de chargement...",conversationResolved:"Conversation terminée",howWasYourExperience:"Comment s'est passée votre expérience ?",feedbackPrompt:"Veuillez évaluer notre support pour nous aider à nous améliorer.",feedbackPlaceholder:"Dites-nous en plus sur votre expérience...",submitFeedback:"Envoyer les commentaires",submitting:"Envoi en cours...",selectRatingFirst:"Sélectionnez d'abord une note",pleaseSubmitRatingFirst:"Veuillez d'abord envoyer votre note.",completeOnboardingToEnableVoice:"Terminez l'intégration pour activer la voix",sendMessageToCompleteOnboarding:"Envoyez un message pour terminer l'intégration et activer la voix.",resolve:"Terminer",scrollLeft:"Faire défiler à gauche",scrollRight:"Faire défiler à droite",sendMessage:"Envoyer un message",voiceSessionLive:"Session vocale active - parlez ou tapez pour converser.",connectingVoice:"Connexion à la session vocale...",poweredBy:"Propulsé par",menu:"Menu",close:"Fermer",openChat:"Ouvrir le chat",closeChat:"Fermer le chat",lightMode:"Mode clair",nightMode:"Mode sombre",refreshChat:"Actualiser le chat",copyChat:"Copier le chat",startChat:"Commencer le chat",startingVoiceSession:"Démarrage de la session vocale...",allowMicAccess:"Autoriser l'accès au microphone"},de:{connectionError:"Entschuldigung, ich habe gerade Verbindungsprobleme. Bitte versuchen Sie es erneut.",micDenied:"Wir konnten nicht auf Ihr Mikrofon zugreifen. Bitte erlauben Sie den Zugriff und versuchen Sie es erneut.",micNotFound:"Kein Mikrofon gefunden. Bitte schließen Sie eines an und versuchen Sie es erneut.",voiceUnavailable:"Sprache ist derzeit nicht verfügbar. Bitte versuchen Sie es erneut.",chooseTopicLabel:"Wählen Sie ein Thema, um zu beginnen:",categoryTopicsHeading:"Bitte stellen Sie Ihre Frage zu **{category}** unten.",quickQuestionsHeadingLabel:"Oder stellen Sie eine schnelle Frage:",typeYourMessage:"Geben Sie Ihre Nachricht ein...",agentIsLoading:"Agent wird geladen...",conversationResolved:"Gespräch beendet",howWasYourExperience:"Wie war Ihre Erfahrung?",feedbackPrompt:"Bitte bewerten Sie unseren Support, um uns bei der Verbesserung zu helfen.",feedbackPlaceholder:"Erzählen Sie uns mehr über Ihre Erfahrung...",submitFeedback:"Feedback senden",submitting:"Wird gesendet...",selectRatingFirst:"Wählen Sie zuerst eine Bewertung aus",pleaseSubmitRatingFirst:"Bitte senden Sie zuerst Ihre Bewertung.",completeOnboardingToEnableVoice:"Schließen Sie das Onboarding ab, um die Sprache zu aktivieren",sendMessageToCompleteOnboarding:"Senden Sie eine Nachricht, um das Onboarding abzuschließen und die Sprache zu aktivieren.",resolve:"Beenden",scrollLeft:"Nach links scrollen",scrollRight:"Nach rechts scrollen",sendMessage:"Nachricht senden",voiceSessionLive:"Sprachsitzung aktiv - sprechen oder tippen Sie.",connectingVoice:"Verbindung zur Sprachsitzung...",poweredBy:"Bereitgestellt von",menu:"Menü",close:"Schließen",openChat:"Chat öffnen",closeChat:"Chat schließen",lightMode:"Heller Modus",nightMode:"Dunkler Modus",refreshChat:"Chat aktualisieren",copyChat:"Chat kopieren",startChat:"Chat starten",startingVoiceSession:"Sprachsitzung wird gestartet...",allowMicAccess:"Mikrofonzugriff erlauben"},el:{connectionError:"Συγγνώμη, αντιμετωπίζω πρόβλημα σύνδεσης αυτή τη στιγμή. Δοκιμάστε ξανά.",micDenied:"Δεν μπορέσαμε να αποκτήσουμε πρόσβαση στο μικρόφωνό σας. Επιτρέψτε την πρόσβαση και δοκιμάστε ξανά.",micNotFound:"Δεν βρέθηκε μικρόφωνο. Συνδέστε ένα και δοκιμάστε ξανά.",voiceUnavailable:"Η φωνή δεν είναι διαθέσιμη αυτή τη στιγμή. Δοκιμάστε ξανά.",chooseTopicLabel:"Επιλέξτε ένα θέμα για να ξεκινήσετε:",categoryTopicsHeading:"Παρακαλώ κάντε την ερώτησή σας σχετικά με το **{category}** παρακάτω.",quickQuestionsHeadingLabel:"Ή κάντε μια γρήγορη ερώτηση:",typeYourMessage:"Πληκτρολογήστε το μήνυμά σας...",agentIsLoading:"Ο πράκτορας φορτώνει...",conversationResolved:"Η συζήτηση ολοκληρώθηκε",howWasYourExperience:"Πώς ήταν η εμπειρία σας;",feedbackPrompt:"Παρακαλούμε αξιολογήστε την υποστήριξή μας για να βελτιωθούμε.",feedbackPlaceholder:"Πείτε μας περισσότερα για την εμπειρία σας...",submitFeedback:"Υποβολή σχολίων",submitting:"Υποβολή...",selectRatingFirst:"Επιλέξτε πρώτα μια βαθμολογία",pleaseSubmitRatingFirst:"Υποβάλετε πρώτα τη βαθμολογία σας.",completeOnboardingToEnableVoice:"Ολοκληρώστε την εισαγωγή για ενεργοποίηση φωνής",sendMessageToCompleteOnboarding:"Στείλτε ένα μήνυμα για ολοκλήρωση της εισαγωγής και ενεργοποίηση φωνής.",resolve:"Ολοκλήρωση",scrollLeft:"Κύλιση αριστερά",scrollRight:"Κύλιση δεξιά",sendMessage:"Αποστολή μηνύματος",voiceSessionLive:"Φωνητική συνεδρία ενεργή - μιλήστε ή πληκτρολογήστε.",connectingVoice:"Σύνδεση σε φωνητική συνεδρία...",poweredBy:"Υποστηρίζεται από",menu:"Μενού",close:"Κλείσιμο",openChat:"Άνοιγμα συνομιλίας",closeChat:"Κλείσιμο συνομιλίας",lightMode:"Φωτεινή λειτουργία",nightMode:"Σκοτεινή λειτουργία",refreshChat:"Ανανέωση συνομιλίας",copyChat:"Αντιγραφή συνομιλίας",startChat:"Έναρξη συνομιλίας",startingVoiceSession:"Εκκίνηση φωνητικής συνεδρίας...",allowMicAccess:"Επιτρέψτε πρόσβαση στο μικρόφωνο"},hi:{connectionError:"क्षमा करें, मुझे अभी कनेक्ट होने में समस्या हो रही है। कृपया पुनः प्रयास करें।",micDenied:"हम आपके माइक्रोफ़ोन का उपयोग नहीं कर सके। कृपया अनुमति दें और पुनः प्रयास करें।",micNotFound:"कोई माइक्रोफ़ोन नहीं मिला। कृपया एक कनेक्ट करें और पुनः प्रयास करें।",voiceUnavailable:"वॉइस अभी उपलब्ध नहीं है। कृपया पुनः प्रयास करें।",chooseTopicLabel:"शुरू करने के लिए एक विषय चुनें:",categoryTopicsHeading:"कृपया अपना **{category}** प्रश्न नीचे पूछें।",quickQuestionsHeadingLabel:"या एक त्वरित प्रश्न पूछें:",typeYourMessage:"अपना संदेश लिखें...",agentIsLoading:"एजेंट लोड हो रहा है...",conversationResolved:"बातचीत समाप्त हुई",howWasYourExperience:"आपका अनुभव कैसा रहा?",feedbackPrompt:"हमें बेहतर बनाने में मदद के लिए कृपया हमारे समर्थन को रेट करें।",feedbackPlaceholder:"अपने अनुभव के बारे में और बताएं...",submitFeedback:"फीडबैक भेजें",submitting:"भेजा जा रहा है...",selectRatingFirst:"पहले रेटिंग चुनें",pleaseSubmitRatingFirst:"कृपया पहले अपनी रेटिंग जमा करें।",completeOnboardingToEnableVoice:"वॉयस सक्षम करने के लिए ऑनबोर्डिंग पूरी करें",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूरी करने और वॉयस सक्षम करने के लिए संदेश भेजें।",resolve:"समाप्त करें",scrollLeft:"बाएं स्क्रॉल करें",scrollRight:"दाएं स्क्रॉल करें",sendMessage:"संदेश भेजें",voiceSessionLive:"वॉयस सत्र सक्रिय - बात करने के लिए बोलें या टाइप करें।",connectingVoice:"वॉयस सत्र से कनेक्ट हो रहा है...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारा संचालित",menu:"मेनू",close:"बंद करें",openChat:"चैट खोलें",closeChat:"चैट बंद करें",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चैट रीफ्रेश करें",copyChat:"चैट कॉपी करें",startChat:"चैट शुरू करें",startingVoiceSession:"वॉयस सत्र शुरू हो रहा है...",allowMicAccess:"माइक्रोफ़ोन एक्सेस की अनुमति दें"},mr:{connectionError:"क्षमस्व, सध्या कनेक्ट होण्यात अडचण येत आहे. कृपया पुन्हा प्रयत्न करा.",micDenied:"आम्ही तुमचा मायक्रोफोन वापरू शकलो नाही. कृपया परवानगी द्या आणि पुन्हा प्रयत्न करा.",micNotFound:"मायक्रोफोन आढळला नाही. कृपया एक जोडा आणि पुन्हा प्रयत्न करा.",voiceUnavailable:"व्हॉइस सध्या उपलब्ध नाही. कृपया पुन्हा प्रयत्न करा.",chooseTopicLabel:"सुरू करण्यासाठी एक विषय निवडा:",categoryTopicsHeading:"कृपया तुमचा **{category}** प्रश्न खाली विचारा.",quickQuestionsHeadingLabel:"किंवा एक झटपट प्रश्न विचारा:",typeYourMessage:"तुमचा संदेश टाइप करा...",agentIsLoading:"एजंट लोड होत आहे...",conversationResolved:"संभाषण समाप्त",howWasYourExperience:"तुमचा अनुभव कसा होता?",feedbackPrompt:"आम्हाला सुधारण्यास मदत करण्यासाठी कृपया आमच्या समर्थनाला रेट करा.",feedbackPlaceholder:"तुमच्या अनुभवाबद्दल आम्हाला अधिक सांगा...",submitFeedback:"फीडबॅक सबमिट करा",submitting:"सबमिट करत आहे...",selectRatingFirst:"प्रथम रेटिंग निवडा",pleaseSubmitRatingFirst:"कृपया प्रथम आपले रेटिंग सबमिट करा.",completeOnboardingToEnableVoice:"व्हॉइस सक्षम करण्यासाठी ऑनबोर्डिंग पूर्ण करा",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूर्ण करून व्हॉइस सक्षम करण्यासाठी संदेश पाठवा.",resolve:"समाप्त",scrollLeft:"डावीकडे स्क्रोल करा",scrollRight:"उजवीकडे स्क्रोल करा",sendMessage:"संदेश पाठवा",voiceSessionLive:"व्हॉइस सत्र सक्रिय - बोला किंवा टाइप करा.",connectingVoice:"व्हॉइस सत्रास जोडत आहे...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारे समर्थित",menu:"मेनू",close:"बंद करा",openChat:"चॅट उघडा",closeChat:"चॅट बंद करा",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चॅट रीफ्रेश करा",copyChat:"चॅट कॉपी करा",startChat:"चॅट सुरू करा",startingVoiceSession:"व्हॉइस सत्र सुरू होत आहे...",allowMicAccess:"मायक्रोफोन प्रवेशास परवानगी द्या"},hu:{connectionError:"Sajnáljuk, jelenleg kapcsolódási problémám van. Kérjük, próbálja újra.",micDenied:"Nem sikerült hozzáférni a mikrofonjához. Engedélyezze a hozzáférést, és próbálja újra.",micNotFound:"Nem található mikrofon. Csatlakoztasson egyet, és próbálja újra.",voiceUnavailable:"A hang jelenleg nem elérhető. Kérjük, próbálja újra.",chooseTopicLabel:"Válassz egy témát a kezdéshez:",categoryTopicsHeading:"Kérjük, tedd fel **{category}** kérdésedet alább.",quickQuestionsHeadingLabel:"Vagy tegyél fel egy gyors kérdést:",typeYourMessage:"Írja be az üzenetét...",agentIsLoading:"Az ügynök betöltődik...",conversationResolved:"Beszélgetés befejezve",howWasYourExperience:"Milyen volt az élménye?",feedbackPrompt:"Kérjük, értékelje támogatásunkat, hogy segítsen nekünk fejlődni.",feedbackPlaceholder:"Meséljen többet az élményéről...",submitFeedback:"Visszajelzés küldése",submitting:"Küldés...",selectRatingFirst:"Először válasszon értékelést",pleaseSubmitRatingFirst:"Kérjük, először küldje el értékelését.",completeOnboardingToEnableVoice:"Fejezze be a beállítást a hang engedélyezéséhez",sendMessageToCompleteOnboarding:"Küldjön üzenetet a beállítás befejezéséhez és a hang engedélyezéséhez.",resolve:"Befejezés",scrollLeft:"Balra görgetés",scrollRight:"Jobbra görgetés",sendMessage:"Üzenet küldése",voiceSessionLive:"Hangmenet aktív - beszéljen vagy írjon.",connectingVoice:"Csatlakozás hangmenet...",poweredBy:"Működteti",menu:"Menü",close:"Bezárás",openChat:"Csevegés megnyitása",closeChat:"Csevegés bezárása",lightMode:"Világos mód",nightMode:"Sötét mód",refreshChat:"Csevegés frissítése",copyChat:"Csevegés másolása",startChat:"Csevegés indítása",startingVoiceSession:"Hangmenet indítása...",allowMicAccess:"Mikrofon hozzáférés engedélyezése"},is:{connectionError:"Því miður næ ég ekki sambandi núna. Vinsamlegast prófaðu aftur.",micDenied:"Við fengum ekki aðgang að hljóðnemanum þínum. Leyfðu aðgang og prófaðu aftur.",micNotFound:"Enginn hljóðnemi fannst. Tengdu hljóðnema og prófaðu aftur.",voiceUnavailable:"Tal er ekki í boði núna. Vinsamlegast prófaðu aftur.",chooseTopicLabel:"Veldu efni til að byrja:",categoryTopicsHeading:"Vinsamlegast spurðu spurningu þinnar um **{category}** hér að neðan.",quickQuestionsHeadingLabel:"Eða spurðu fljótlegrar spurningar:",typeYourMessage:"Sláðu inn skilaboð...",agentIsLoading:"Fulltrúi hleðst...",conversationResolved:"Samtali lokið",howWasYourExperience:"Hvernig var upplifun þín?",feedbackPrompt:"Vinsamlegast metið þjónustu okkar til að hjálpa okkur að bæta okkur.",feedbackPlaceholder:"Segðu okkur meira um upplifun þína...",submitFeedback:"Senda umsögn",submitting:"Sendir...",selectRatingFirst:"Veldu fyrst einkunn",pleaseSubmitRatingFirst:"Vinsamlegast sendu inn einkunn þína fyrst.",completeOnboardingToEnableVoice:"Ljúktu kynningu til að virkja rödd",sendMessageToCompleteOnboarding:"Sendu skilaboð til að ljúka kynningu og virkja rödd.",resolve:"Ljúka",scrollLeft:"Skruna til vinstri",scrollRight:"Skruna til hægri",sendMessage:"Senda skilaboð",voiceSessionLive:"Raddsamtal virkt - talaðu eða skrifaðu.",connectingVoice:"Tengist raddsamtali...",poweredBy:"Knúið af",menu:"Valmynd",close:"Loka",openChat:"Opna spjall",closeChat:"Loka spjalli",lightMode:"Ljóst þema",nightMode:"Dökkt þema",refreshChat:"Endurnýja spjall",copyChat:"Afrita spjall",startChat:"Byrja spjall",startingVoiceSession:"Byrjar raddsamtal...",allowMicAccess:"Leyfa aðgang að hljóðnema"},id:{connectionError:"Maaf, saya sedang mengalami masalah koneksi. Silakan coba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon Anda. Izinkan akses dan coba lagi.",micNotFound:"Mikrofon tidak ditemukan. Hubungkan mikrofon dan coba lagi.",voiceUnavailable:"Fitur suara tidak tersedia saat ini. Silakan coba lagi.",chooseTopicLabel:"Pilih topik untuk memulai:",categoryTopicsHeading:"Silakan ajukan pertanyaan **{category}** Anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan pertanyaan cepat:",typeYourMessage:"Ketik pesan Anda...",agentIsLoading:"Agen sedang dimuat...",conversationResolved:"Percakapan selesai",howWasYourExperience:"Bagaimana pengalaman Anda?",feedbackPrompt:"Silakan nilai dukungan kami untuk membantu kami berkembang.",feedbackPlaceholder:"Ceritakan lebih banyak tentang pengalaman Anda...",submitFeedback:"Kirim umpan balik",submitting:"Mengirim...",selectRatingFirst:"Pilih peringkat terlebih dahulu",pleaseSubmitRatingFirst:"Silakan kirim peringkat Anda terlebih dahulu.",completeOnboardingToEnableVoice:"Selesaikan pengenalan untuk mengaktifkan suara",sendMessageToCompleteOnboarding:"Kirim pesan untuk menyelesaikan pengenalan dan mengaktifkan suara.",resolve:"Selesai",scrollLeft:"Gulir kiri",scrollRight:"Gulir kanan",sendMessage:"Kirim pesan",voiceSessionLive:"Sesi suara aktif - bicara atau ketik untuk berbincang.",connectingVoice:"Menghubungkan ke sesi suara...",poweredBy:"Didukung oleh",menu:"Menu",close:"Tutup",openChat:"Buka obrolan",closeChat:"Tutup obrolan",lightMode:"Mode terang",nightMode:"Mode gelap",refreshChat:"Segarkan obrolan",copyChat:"Salin obrolan",startChat:"Mulai obrolan",startingVoiceSession:"Memulai sesi suara...",allowMicAccess:"Izinkan akses mikrofon"},it:{connectionError:"Spiacenti, al momento ho problemi di connessione. Riprova.",micDenied:"Non siamo riusciti ad accedere al tuo microfono. Consenti l'accesso e riprova.",micNotFound:"Nessun microfono rilevato. Collegane uno e riprova.",voiceUnavailable:"La voce non è disponibile al momento. Riprova.",chooseTopicLabel:"Scegli un argomento per iniziare:",categoryTopicsHeading:"Per favore, poni la tua domanda su **{category}** qui sotto.",quickQuestionsHeadingLabel:"Oppure fai una domanda rapida:",typeYourMessage:"Scrivi il tuo messaggio...",agentIsLoading:"L'agente sta caricando...",conversationResolved:"Conversazione conclusa",howWasYourExperience:"Com'è stata la tua esperienza?",feedbackPrompt:"Valuta il nostro supporto per aiutarci a migliorare.",feedbackPlaceholder:"Raccontaci di più sulla tua esperienza...",submitFeedback:"Invia feedback",submitting:"Invio in corso...",selectRatingFirst:"Seleziona prima una valutazione",pleaseSubmitRatingFirst:"Invia prima la tua valutazione.",completeOnboardingToEnableVoice:"Completa l'onboarding per abilitare la voce",sendMessageToCompleteOnboarding:"Invia un messaggio per completare l'onboarding e abilitare la voce.",resolve:"Concludi",scrollLeft:"Scorri a sinistra",scrollRight:"Scorri a destra",sendMessage:"Invia messaggio",voiceSessionLive:"Sessione vocale attiva - parla o scrivi per conversare.",connectingVoice:"Connessione alla sessione vocale...",poweredBy:"Fornito da",menu:"Menu",close:"Chiudi",openChat:"Apri chat",closeChat:"Chiudi chat",lightMode:"Modalità chiara",nightMode:"Modalità scura",refreshChat:"Aggiorna chat",copyChat:"Copia chat",startChat:"Inizia chat",startingVoiceSession:"Avvio sessione vocale...",allowMicAccess:"Consenti l'accesso al microfono"},ja:{connectionError:"申し訳ありません。現在接続に問題が発生しています。もう一度お試しください。",micDenied:"マイクにアクセスできませんでした。アクセスを許可してもう一度お試しください。",micNotFound:"マイクが見つかりません。マイクを接続してもう一度お試しください。",voiceUnavailable:"音声機能は現在利用できません。もう一度お試しください。",chooseTopicLabel:"始めるにはトピックを選択してください:",categoryTopicsHeading:"**{category}** に関するご質問を以下にお書きください。",quickQuestionsHeadingLabel:"または、簡単な質問をどうぞ:",typeYourMessage:"メッセージを入力してください...",agentIsLoading:"エージェントを読み込んでいます...",conversationResolved:"会話が終了しました",howWasYourExperience:"ご体験はいかがでしたか?",feedbackPrompt:"サポート向上のため、評価をお願いします。",feedbackPlaceholder:"体験について詳しく教えてください...",submitFeedback:"フィードバックを送信",submitting:"送信中...",selectRatingFirst:"最初に評価を選択してください",pleaseSubmitRatingFirst:"最初に評価を送信してください。",completeOnboardingToEnableVoice:"音声を有効にするにはオンボーディングを完了してください",sendMessageToCompleteOnboarding:"オンボーディングを完了して音声を有効にするにはメッセージを送信してください。",resolve:"終了",scrollLeft:"左へスクロール",scrollRight:"右へスクロール",sendMessage:"メッセージを送信",voiceSessionLive:"音声セッション中 - 話すか入力してください。",connectingVoice:"音声セッションに接続中...",poweredBy:"提供元",menu:"メニュー",close:"閉じる",openChat:"チャットを開く",closeChat:"チャットを閉じる",lightMode:"ライトモード",nightMode:"ダークモード",refreshChat:"チャットを更新",copyChat:"チャットをコピー",startChat:"チャットを開始",startingVoiceSession:"音声セッションを開始しています...",allowMicAccess:"マイクへのアクセスを許可"},ko:{connectionError:"죄송합니다. 현재 연결에 문제가 있습니다. 다시 시도해 주세요.",micDenied:"마이크에 접근할 수 없습니다. 접근을 허용한 후 다시 시도해 주세요.",micNotFound:"마이크를 찾을 수 없습니다. 마이크를 연결한 후 다시 시도해 주세요.",voiceUnavailable:"음성 기능을 현재 사용할 수 없습니다. 다시 시도해 주세요.",chooseTopicLabel:"시작하려면 주제를 선택하세요:",categoryTopicsHeading:"**{category}** 에 대한 질문을 아래에 작성해 주세요.",quickQuestionsHeadingLabel:"또는 간단한 질문을 해보세요:",typeYourMessage:"메시지를 입력하세요...",agentIsLoading:"상담원을 불러오는 중...",conversationResolved:"대화가 종료되었습니다",howWasYourExperience:"경험은 어떠셨나요?",feedbackPrompt:"개선을 위해 저희 지원 서비스를 평가해주세요.",feedbackPlaceholder:"경험에 대해 더 알려주세요...",submitFeedback:"피드백 제출",submitting:"제출 중...",selectRatingFirst:"먼저 평점을 선택해주세요",pleaseSubmitRatingFirst:"먼저 평점을 제출해주세요.",completeOnboardingToEnableVoice:"음성을 사용하려면 온보딩을 완료하세요",sendMessageToCompleteOnboarding:"온보딩을 완료하고 음성을 사용하려면 메시지를 보내세요.",resolve:"종료",scrollLeft:"왼쪽으로 스크롤",scrollRight:"오른쪽으로 스크롤",sendMessage:"메시지 보내기",voiceSessionLive:"음성 세션 활성화 - 말하거나 입력하세요.",connectingVoice:"음성 세션에 연결 중...",poweredBy:"제공",menu:"메뉴",close:"닫기",openChat:"채팅 열기",closeChat:"채팅 닫기",lightMode:"라이트 모드",nightMode:"다크 모드",refreshChat:"채팅 새로고침",copyChat:"채팅 복사",startChat:"채팅 시작",startingVoiceSession:"음성 세션 시작 중...",allowMicAccess:"마이크 액세스 허용"},lv:{connectionError:"Atvainojiet, šobrīd ir savienojuma problēmas. Lūdzu, mēģiniet vēlreiz.",micDenied:"Neizdevās piekļūt mikrofonam. Lūdzu, atļaujiet piekļuvi un mēģiniet vēlreiz.",micNotFound:"Mikrofons nav atrasts. Lūdzu, pievienojiet mikrofonu un mēģiniet vēlreiz.",voiceUnavailable:"Balss funkcija šobrīd nav pieejama. Lūdzu, mēģiniet vēlreiz.",chooseTopicLabel:"Izvēlieties tēmu, lai sāktu:",categoryTopicsHeading:"Lūdzu, uzdodiet savu jautājumu par **{category}** zemāk.",quickQuestionsHeadingLabel:"Vai uzdodiet ātru jautājumu:",typeYourMessage:"Ierakstiet savu ziņu...",agentIsLoading:"Aģents tiek ielādēts...",conversationResolved:"Saruna pabeigta",howWasYourExperience:"Kāda bija jūsu pieredze?",feedbackPrompt:"Lūdzu, novērtējiet mūsu atbalstu, lai palīdzētu mums uzlabot.",feedbackPlaceholder:"Pastāstiet mums vairāk par savu pieredzi...",submitFeedback:"Nosūtīt atsauksmes",submitting:"Sūta...",selectRatingFirst:"Vispirms izvēlieties vērtējumu",pleaseSubmitRatingFirst:"Lūdzu, vispirms nosūtiet savu vērtējumu.",completeOnboardingToEnableVoice:"Pabeidziet ievadu, lai iespējotu balsi",sendMessageToCompleteOnboarding:"Nosūtiet ziņu, lai pabeigtu ievadu un iespējotu balsi.",resolve:"Pabeigt",scrollLeft:"Ritināt pa kreisi",scrollRight:"Ritināt pa labi",sendMessage:"Nosūtīt ziņu",voiceSessionLive:"Balss sesija aktīva - runājiet vai rakstiet.",connectingVoice:"Pieslēdzas balss sesijai...",poweredBy:"Darbina",menu:"Izvēlne",close:"Aizvērt",openChat:"Atvērt tērzēšanu",closeChat:"Aizvērt tērzēšanu",lightMode:"Gaišais režīms",nightMode:"Tumšais režīms",refreshChat:"Atsvaidzināt tērzēšanu",copyChat:"Kopēt tērzēšanu",startChat:"Sākt tērzēšanu",startingVoiceSession:"Sāk balss sesiju...",allowMicAccess:"Atļaut piekļuvi mikrofonam"},lt:{connectionError:"Atsiprašome, šiuo metu kyla ryšio problemų. Bandykite dar kartą.",micDenied:"Nepavyko pasiekti jūsų mikrofono. Leiskite prieigą ir bandykite dar kartą.",micNotFound:"Mikrofonas nerastas. Prijunkite mikrofoną ir bandykite dar kartą.",voiceUnavailable:"Balso funkcija šiuo metu nepasiekiama. Bandykite dar kartą.",chooseTopicLabel:"Pasirinkite temą, kad pradėtumėte:",categoryTopicsHeading:"Prašome užduoti savo klausimą apie **{category}** žemiau.",quickQuestionsHeadingLabel:"Arba užduokite greitą klausimą:",typeYourMessage:"Įveskite pranešimą...",agentIsLoading:"Agentas kraunamas...",conversationResolved:"Pokalbis baigtas",howWasYourExperience:"Kokia buvo jūsų patirtis?",feedbackPrompt:"Įvertinkite mūsų pagalbą, kad padėtumėte mums tobulėti.",feedbackPlaceholder:"Papasakokite daugiau apie savo patirtį...",submitFeedback:"Pateikti atsiliepimą",submitting:"Siunčiama...",selectRatingFirst:"Pirmiausia pasirinkite įvertinimą",pleaseSubmitRatingFirst:"Pirmiausia pateikite įvertinimą.",completeOnboardingToEnableVoice:"Užbaikite įvadą, kad įjungtumėte balsą",sendMessageToCompleteOnboarding:"Išsiųskite pranešimą, kad užbaigtumėte įvadą ir įjungtumėte balsą.",resolve:"Baigti",scrollLeft:"Slinkti į kairę",scrollRight:"Slinkti į dešinę",sendMessage:"Siųsti pranešimą",voiceSessionLive:"Balso sesija aktyvi - kalbėkite arba rašykite.",connectingVoice:"Jungiamasi prie balso sesijos...",poweredBy:"Veikia",menu:"Meniu",close:"Uždaryti",openChat:"Atidaryti pokalbį",closeChat:"Uždaryti pokalbį",lightMode:"Šviesus režimas",nightMode:"Tamsus režimas",refreshChat:"Atnaujinti pokalbį",copyChat:"Kopijuoti pokalbį",startChat:"Pradėti pokalbį",startingVoiceSession:"Pradedama balso sesija...",allowMicAccess:"Leisti prieigą prie mikrofono"},mk:{connectionError:"Извинете, моментално имам проблеми со поврзувањето. Обидете се повторно.",micDenied:"Не можевме да пристапиме до вашиот микрофон. Дозволете пристап и обидете се повторно.",micNotFound:"Не е најден микрофон. Поврзете микрофон и обидете се повторно.",voiceUnavailable:"Гласовната функција моментално не е достапна. Обидете се повторно.",chooseTopicLabel:"Изберете тема за да започнете:",categoryTopicsHeading:"Ве молиме поставете го вашето прашање за **{category}** подолу.",quickQuestionsHeadingLabel:"Или поставете брзо прашање:",typeYourMessage:"Напишете ја вашата порака...",agentIsLoading:"Агентот се вчитува...",conversationResolved:"Разговорот е завршен",howWasYourExperience:"Какво беше вашето искуство?",feedbackPrompt:"Оценете ја нашата поддршка за да ни помогнете да се подобриме.",feedbackPlaceholder:"Кажете ни повеќе за вашето искуство...",submitFeedback:"Испрати повратна информација",submitting:"Испраќање...",selectRatingFirst:"Прво изберете оценка",pleaseSubmitRatingFirst:"Прво испратете ја вашата оценка.",completeOnboardingToEnableVoice:"Завршете го воведот за да овозможите глас",sendMessageToCompleteOnboarding:"Испратете порака за да го завршите воведот и овозможите глас.",resolve:"Заврши",scrollLeft:"Скролај лево",scrollRight:"Скролај десно",sendMessage:"Испрати порака",voiceSessionLive:"Гласовната сесија е активна - зборувајте или пишувајте.",connectingVoice:"Поврзување со гласовна сесија...",poweredBy:"Поддржано од",menu:"Мени",close:"Затвори",openChat:"Отвори разговор",closeChat:"Затвори разговор",lightMode:"Светол режим",nightMode:"Темен режим",refreshChat:"Освежи разговор",copyChat:"Копирај разговор",startChat:"Започни разговор",startingVoiceSession:"Започнува гласовна сесија...",allowMicAccess:"Дозволи пристап до микрофонот"},ms:{connectionError:"Maaf, saya menghadapi masalah sambungan sekarang. Sila cuba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon anda. Sila benarkan akses dan cuba lagi.",micNotFound:"Tiada mikrofon ditemui. Sila sambungkan mikrofon dan cuba lagi.",voiceUnavailable:"Ciri suara tidak tersedia sekarang. Sila cuba lagi.",chooseTopicLabel:"Pilih topik untuk memulakan:",categoryTopicsHeading:"Sila ajukan soalan **{category}** anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan soalan ringkas:",typeYourMessage:"Taip mesej anda...",agentIsLoading:"Ejen sedang dimuatkan...",conversationResolved:"Perbualan selesai",howWasYourExperience:"Bagaimanakah pengalaman anda?",feedbackPrompt:"Sila nilaikan sokongan kami untuk membantu kami menambah baik.",feedbackPlaceholder:"Beritahu kami lebih lanjut tentang pengalaman anda...",submitFeedback:"Hantar maklum balas",submitting:"Menghantar...",selectRatingFirst:"Pilih penilaian dahulu",pleaseSubmitRatingFirst:"Sila hantar penilaian anda dahulu.",completeOnboardingToEnableVoice:"Lengkapkan pengenalan untuk mendayakan suara",sendMessageToCompleteOnboarding:"Hantar mesej untuk melengkapkan pengenalan dan mendayakan suara.",resolve:"Selesai",scrollLeft:"Tatal ke kiri",scrollRight:"Tatal ke kanan",sendMessage:"Hantar mesej",voiceSessionLive:"Sesi suara aktif - bercakap atau taip untuk berbual.",connectingVoice:"Menyambung ke sesi suara...",poweredBy:"Dikuasakan oleh",menu:"Menu",close:"Tutup",openChat:"Buka sembang",closeChat:"Tutup sembang",lightMode:"Mod terang",nightMode:"Mod gelap",refreshChat:"Muat semula sembang",copyChat:"Salin sembang",startChat:"Mula sembang",startingVoiceSession:"Memulakan sesi suara...",allowMicAccess:"Benarkan akses mikrofon"},no:{connectionError:"Beklager, jeg har problemer med tilkoblingen akkurat nå. Prøv igjen.",micDenied:"Vi fikk ikke tilgang til mikrofonen din. Gi tilgang og prøv igjen.",micNotFound:"Ingen mikrofon funnet. Koble til en mikrofon og prøv igjen.",voiceUnavailable:"Tale er ikke tilgjengelig akkurat nå. Prøv igjen.",chooseTopicLabel:"Velg et emne for å komme i gang:",categoryTopicsHeading:"Vennligst still spørsmålet ditt om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller still et raskt spørsmål:",typeYourMessage:"Skriv meldingen din...",agentIsLoading:"Agenten laster...",conversationResolved:"Samtale avsluttet",howWasYourExperience:"Hvordan var opplevelsen din?",feedbackPrompt:"Vennligst vurder vår støtte for å hjelpe oss med å bli bedre.",feedbackPlaceholder:"Fortell oss mer om opplevelsen din...",submitFeedback:"Send tilbakemelding",submitting:"Sender...",selectRatingFirst:"Velg en vurdering først",pleaseSubmitRatingFirst:"Vennligst send inn vurderingen din først.",completeOnboardingToEnableVoice:"Fullfør introduksjonen for å aktivere tale",sendMessageToCompleteOnboarding:"Send en melding for å fullføre introduksjonen og aktivere tale.",resolve:"Avslutt",scrollLeft:"Bla til venstre",scrollRight:"Bla til høyre",sendMessage:"Send melding",voiceSessionLive:"Talesesjon aktiv - snakk eller skriv for å samtale.",connectingVoice:"Kobler til talesesjon...",poweredBy:"Drevet av",menu:"Meny",close:"Lukk",openChat:"Åpne chat",closeChat:"Lukk chat",lightMode:"Lys modus",nightMode:"Mørk modus",refreshChat:"Oppdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter talesesjon...",allowMicAccess:"Tillat mikrofontilgang"},fa:{connectionError:"متأسفیم، در حال حاضر در اتصال مشکل دارم. لطفاً دوباره تلاش کنید.",micDenied:"نتوانستیم به میکروفون شما دسترسی پیدا کنیم. لطفاً دسترسی را اجازه دهید و دوباره تلاش کنید.",micNotFound:"میکروفونی یافت نشد. لطفاً یک میکروفون وصل کنید و دوباره تلاش کنید.",voiceUnavailable:"قابلیت صدا در حال حاضر در دسترس نیست. لطفاً دوباره تلاش کنید.",chooseTopicLabel:"برای شروع، یک موضوع را انتخاب کنید:",categoryTopicsHeading:"لطفاً سؤال خود درباره **{category}** را در زیر مطرح کنید.",quickQuestionsHeadingLabel:"یا یک سؤال سریع بپرسید:",typeYourMessage:"پیام خود را تایپ کنید...",agentIsLoading:"در حال بارگذاری نماینده...",conversationResolved:"مکالمه به پایان رسید",howWasYourExperience:"تجربه شما چگونه بود؟",feedbackPrompt:"لطفاً برای کمک به بهبود ما، پشتیبانی ما را ارزیابی کنید.",feedbackPlaceholder:"درباره تجربه خود بیشتر به ما بگویید...",submitFeedback:"ارسال بازخورد",submitting:"در حال ارسال...",selectRatingFirst:"ابتدا یک امتیاز انتخاب کنید",pleaseSubmitRatingFirst:"لطفاً ابتدا امتیاز خود را ارسال کنید.",completeOnboardingToEnableVoice:"برای فعال‌سازی صدا، راه‌اندازی را تکمیل کنید",sendMessageToCompleteOnboarding:"برای تکمیل راه‌اندازی و فعال‌سازی صدا، پیام ارسال کنید.",resolve:"پایان",scrollLeft:"پیمایش به چپ",scrollRight:"پیمایش به راست",sendMessage:"ارسال پیام",voiceSessionLive:"جلسه صوتی فعال - صحبت کنید یا تایپ کنید.",connectingVoice:"اتصال به جلسه صوتی...",poweredBy:"قدرت گرفته از",menu:"منو",close:"بستن",openChat:"باز کردن چت",closeChat:"بستن چت",lightMode:"حالت روشن",nightMode:"حالت تاریک",refreshChat:"تازه‌سازی چت",copyChat:"کپی چت",startChat:"شروع چت",startingVoiceSession:"شروع جلسه صوتی...",allowMicAccess:"اجازه دسترسی به میکروفون"},pl:{connectionError:"Przepraszamy, mam teraz problem z połączeniem. Spróbuj ponownie.",micDenied:"Nie udało się uzyskać dostępu do mikrofonu. Zezwól na dostęp i spróbuj ponownie.",micNotFound:"Nie znaleziono mikrofonu. Podłącz mikrofon i spróbuj ponownie.",voiceUnavailable:"Funkcja głosowa jest obecnie niedostępna. Spróbuj ponownie.",chooseTopicLabel:"Wybierz temat, aby rozpocząć:",categoryTopicsHeading:"Proszę zadać pytanie dotyczące **{category}** poniżej.",quickQuestionsHeadingLabel:"Lub zadaj szybkie pytanie:",typeYourMessage:"Wpisz wiadomość...",agentIsLoading:"Agent się ładuje...",conversationResolved:"Rozmowa zakończona",howWasYourExperience:"Jakie było Twoje doświadczenie?",feedbackPrompt:"Oceń proszę naszą obsługę, aby pomóc nam się rozwijać.",feedbackPlaceholder:"Opowiedz nam więcej o swoim doświadczeniu...",submitFeedback:"Wyślij opinię",submitting:"Wysyłanie...",selectRatingFirst:"Najpierw wybierz ocenę",pleaseSubmitRatingFirst:"Najpierw prześlij swoją ocenę.",completeOnboardingToEnableVoice:"Zakończ wprowadzenie, aby włączyć głos",sendMessageToCompleteOnboarding:"Wyślij wiadomość, aby zakończyć wprowadzenie i włączyć głos.",resolve:"Zakończ",scrollLeft:"Przewiń w lewo",scrollRight:"Przewiń w prawo",sendMessage:"Wyślij wiadomość",voiceSessionLive:"Sesja głosowa aktywna - mów lub pisz.",connectingVoice:"Łączenie z sesją głosową...",poweredBy:"Napędzane przez",menu:"Menu",close:"Zamknij",openChat:"Otwórz czat",closeChat:"Zamknij czat",lightMode:"Tryb jasny",nightMode:"Tryb ciemny",refreshChat:"Odśwież czat",copyChat:"Kopiuj czat",startChat:"Rozpocznij czat",startingVoiceSession:"Uruchamianie sesji głosowej...",allowMicAccess:"Zezwól na dostęp do mikrofonu"},pt:{connectionError:"Desculpe, estou com problemas de conexão neste momento. Tente novamente.",micDenied:"Não foi possível acessar o seu microfone. Permita o acesso e tente novamente.",micNotFound:"Nenhum microfone encontrado. Conecte um e tente novamente.",voiceUnavailable:"A voz não está disponível neste momento. Tente novamente.",chooseTopicLabel:"Escolha um tópico para começar:",categoryTopicsHeading:"Por favor, faça sua pergunta sobre **{category}** abaixo.",quickQuestionsHeadingLabel:"Ou faça uma pergunta rápida:",typeYourMessage:"Digite sua mensagem...",agentIsLoading:"O agente está carregando...",conversationResolved:"Conversa encerrada",howWasYourExperience:"Como foi sua experiência?",feedbackPrompt:"Avalie nosso suporte para nos ajudar a melhorar.",feedbackPlaceholder:"Conte-nos mais sobre sua experiência...",submitFeedback:"Enviar feedback",submitting:"Enviando...",selectRatingFirst:"Selecione uma avaliação primeiro",pleaseSubmitRatingFirst:"Envie sua avaliação primeiro.",completeOnboardingToEnableVoice:"Complete a integração para ativar a voz",sendMessageToCompleteOnboarding:"Envie uma mensagem para completar a integração e ativar a voz.",resolve:"Encerrar",scrollLeft:"Rolar para a esquerda",scrollRight:"Rolar para a direita",sendMessage:"Enviar mensagem",voiceSessionLive:"Sessão de voz ativa - fale ou digite para conversar.",connectingVoice:"Conectando à sessão de voz...",poweredBy:"Desenvolvido por",menu:"Menu",close:"Fechar",openChat:"Abrir chat",closeChat:"Fechar chat",lightMode:"Modo claro",nightMode:"Modo escuro",refreshChat:"Atualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sessão de voz...",allowMicAccess:"Permitir acesso ao microfone"},ro:{connectionError:"Ne pare rău, întâmpin probleme de conexiune în acest moment. Încercați din nou.",micDenied:"Nu am putut accesa microfonul. Permiteți accesul și încercați din nou.",micNotFound:"Nu a fost găsit niciun microfon. Conectați unul și încercați din nou.",voiceUnavailable:"Funcția vocală nu este disponibilă momentan. Încercați din nou.",chooseTopicLabel:"Alegeți un subiect pentru a începe:",categoryTopicsHeading:"Vă rugăm să adresați întrebarea dvs. despre **{category}** mai jos.",quickQuestionsHeadingLabel:"Sau puneți o întrebare rapidă:",typeYourMessage:"Scrieți mesajul dvs...",agentIsLoading:"Agentul se încarcă...",conversationResolved:"Conversație încheiată",howWasYourExperience:"Cum a fost experiența dvs.?",feedbackPrompt:"Vă rugăm să evaluați asistența noastră pentru a ne ajuta să ne îmbunătățim.",feedbackPlaceholder:"Spuneți-ne mai multe despre experiența dvs...",submitFeedback:"Trimite feedback",submitting:"Se trimite...",selectRatingFirst:"Selectați mai întâi o evaluare",pleaseSubmitRatingFirst:"Vă rugăm să trimiteți mai întâi evaluarea.",completeOnboardingToEnableVoice:"Finalizați procesul pentru a activa vocea",sendMessageToCompleteOnboarding:"Trimiteți un mesaj pentru a finaliza procesul și a activa vocea.",resolve:"Închide",scrollLeft:"Derulați la stânga",scrollRight:"Derulați la dreapta",sendMessage:"Trimite mesaj",voiceSessionLive:"Sesiune vocală activă - vorbiți sau tastați.",connectingVoice:"Se conectează la sesiunea vocală...",poweredBy:"Oferit de",menu:"Meniu",close:"Închide",openChat:"Deschide chat",closeChat:"Închide chat",lightMode:"Mod luminos",nightMode:"Mod întunecat",refreshChat:"Reîmprospătează chat",copyChat:"Copiază chat",startChat:"Începe chat",startingVoiceSession:"Începe sesiunea vocală...",allowMicAccess:"Permiteți accesul la microfon"},ru:{connectionError:"Извините, сейчас возникли проблемы с подключением. Попробуйте снова.",micDenied:"Не удалось получить доступ к микрофону. Разрешите доступ и попробуйте снова.",micNotFound:"Микрофон не найден. Подключите микрофон и попробуйте снова.",voiceUnavailable:"Голосовая функция сейчас недоступна. Попробуйте снова.",chooseTopicLabel:"Выберите тему, чтобы начать:",categoryTopicsHeading:"Пожалуйста, задайте свой вопрос о **{category}** ниже.",quickQuestionsHeadingLabel:"Или задайте быстрый вопрос:",typeYourMessage:"Введите ваше сообщение...",agentIsLoading:"Агент загружается...",conversationResolved:"Разговор завершен",howWasYourExperience:"Как прошел ваш опыт?",feedbackPrompt:"Пожалуйста, оцените нашу поддержку, чтобы помочь нам улучшиться.",feedbackPlaceholder:"Расскажите нам больше о вашем опыте...",submitFeedback:"Отправить отзыв",submitting:"Отправка...",selectRatingFirst:"Сначала выберите оценку",pleaseSubmitRatingFirst:"Пожалуйста, сначала отправьте свою оценку.",completeOnboardingToEnableVoice:"Завершите знакомство, чтобы включить голос",sendMessageToCompleteOnboarding:"Отправьте сообщение, чтобы завершить знакомство и включить голос.",resolve:"Завершить",scrollLeft:"Прокрутить влево",scrollRight:"Прокрутить вправо",sendMessage:"Отправить сообщение",voiceSessionLive:"Голосовая сессия активна - говорите или пишите.",connectingVoice:"Подключение к голосовой сессии...",poweredBy:"Работает на",menu:"Меню",close:"Закрыть",openChat:"Открыть чат",closeChat:"Закрыть чат",lightMode:"Светлый режим",nightMode:"Темный режим",refreshChat:"Обновить чат",copyChat:"Копировать чат",startChat:"Начать чат",startingVoiceSession:"Запуск голосовой сессии...",allowMicAccess:"Разрешить доступ к микрофону"},sr:{connectionError:"Извините, тренутно имам проблема са повезивањем. Пробајте поново.",micDenied:"Нисмо могли да приступимо вашем микрофону. Дозволите приступ и пробајте поново.",micNotFound:"Микрофон није пронађен. Прикључите микрофон и пробајте поново.",voiceUnavailable:"Гласовна функција тренутно није доступна. Пробајте поново.",chooseTopicLabel:"Изаберите тему да бисте започели:",categoryTopicsHeading:"Молимо поставите своје питање о **{category}** испод.",quickQuestionsHeadingLabel:"Или поставите брзо питање:",typeYourMessage:"Укуцајте вашу поруку...",agentIsLoading:"Агент се учитава...",conversationResolved:"Разговор је завршен",howWasYourExperience:"Какво је било ваше искуство?",feedbackPrompt:"Молимо оцените нашу подршку да бисмо се побољшали.",feedbackPlaceholder:"Реците нам више о свом искуству...",submitFeedback:"Пошаљи повратне информације",submitting:"Слање...",selectRatingFirst:"Прво одаберите оцену",pleaseSubmitRatingFirst:"Молимо прво пошаљите оцену.",completeOnboardingToEnableVoice:"Завршите увод да омогућите глас",sendMessageToCompleteOnboarding:"Пошаљите поруку да завршите увод и омогућите глас.",resolve:"Заврши",scrollLeft:"Скроловати лево",scrollRight:"Скроловати десно",sendMessage:"Пошаљи поруку",voiceSessionLive:"Гласовна сесија активна - говорите или куцајте.",connectingVoice:"Повезивање са гласовном сесијом...",poweredBy:"Покреће",menu:"Мени",close:"Затвори",openChat:"Отвори ћаскање",closeChat:"Затвори ћаскање",lightMode:"Светли режим",nightMode:"Тамни режим",refreshChat:"Освежи ћаскање",copyChat:"Копирај ћаскање",startChat:"Започни ћаскање",startingVoiceSession:"Покретање гласовне сесије...",allowMicAccess:"Дозволи приступ микрофону"},sk:{connectionError:"Ľutujeme, momentálne mám problém s pripojením. Skúste to znova.",micDenied:"Nepodarilo sa získať prístup k mikrofónu. Povoľte prístup a skúste to znova.",micNotFound:"Mikrofón sa nenašiel. Pripojte ho a skúste to znova.",voiceUnavailable:"Hlasová funkcia momentálne nie je dostupná. Skúste to znova.",chooseTopicLabel:"Vyberte tému, aby ste začali:",categoryTopicsHeading:"Prosím, položte svoju otázku o **{category}** nižšie.",quickQuestionsHeadingLabel:"Alebo položte rýchlu otázku:",typeYourMessage:"Napíšte svoju správu...",agentIsLoading:"Agent sa načítava...",conversationResolved:"Konverzácia ukončená",howWasYourExperience:"Aká bola vaša skúsenosť?",feedbackPrompt:"Ohodnoťte prosím našu podporu, aby sme sa mohli zlepšiť.",feedbackPlaceholder:"Povedzte nám viac o svojej skúsenosti...",submitFeedback:"Odoslať spätnú väzbu",submitting:"Odosielanie...",selectRatingFirst:"Najprv vyberte hodnotenie",pleaseSubmitRatingFirst:"Najprv odošlite svoje hodnotenie.",completeOnboardingToEnableVoice:"Dokončite úvod pre zapnutie hlasu",sendMessageToCompleteOnboarding:"Pošlite správu na dokončenie úvodu a zapnutie hlasu.",resolve:"Ukončiť",scrollLeft:"Posunúť doľava",scrollRight:"Posunúť doprava",sendMessage:"Odoslať správu",voiceSessionLive:"Hlasová relácia aktívna - hovorte alebo píšte.",connectingVoice:"Pripájanie k hlasovej relácii...",poweredBy:"Prevádzkuje",menu:"Ponuka",close:"Zavrieť",openChat:"Otvoriť chat",closeChat:"Zavrieť chat",lightMode:"Svetlý režim",nightMode:"Tmavý režim",refreshChat:"Obnoviť chat",copyChat:"Kopírovať chat",startChat:"Začať chat",startingVoiceSession:"Spúšťanie hlasovej relácie...",allowMicAccess:"Povoliť prístup k mikrofónu"},sl:{connectionError:"Oprostite, trenutno imam težave s povezavo. Poskusite znova.",micDenied:"Do mikrofona ni bilo mogoče dostopati. Dovolite dostop in poskusite znova.",micNotFound:"Mikrofona ni bilo mogoče najti. Priključite ga in poskusite znova.",voiceUnavailable:"Glasovna funkcija trenutno ni na voljo. Poskusite znova.",chooseTopicLabel:"Izberite temo za začetek:",categoryTopicsHeading:"Prosimo, postavite vprašanje o **{category}** spodaj.",quickQuestionsHeadingLabel:"Ali postavite hitro vprašanje:",typeYourMessage:"Vnesite svoje sporočilo...",agentIsLoading:"Agent se nalaga...",conversationResolved:"Pogovor je končan",howWasYourExperience:"Kakšna je bila vaša izkušnja?",feedbackPrompt:"Prosimo, ocenite našo podporo, da nam pomagate izboljšati.",feedbackPlaceholder:"Povejte nam več o svoji izkušnji...",submitFeedback:"Pošlji povratne informacije",submitting:"Pošiljanje...",selectRatingFirst:"Najprej izberite oceno",pleaseSubmitRatingFirst:"Prosimo, najprej pošljite svojo oceno.",completeOnboardingToEnableVoice:"Zaključite uvodne korake za omogočanje glasu",sendMessageToCompleteOnboarding:"Pošljite sporočilo, da zaključite uvod in omogočite glas.",resolve:"Končaj",scrollLeft:"Premakni levo",scrollRight:"Premakni desno",sendMessage:"Pošlji sporočilo",voiceSessionLive:"Glasovna seja aktivna - govorite ali tipkajte.",connectingVoice:"Povezovanje z glasovno sejo...",poweredBy:"Poganja",menu:"Meni",close:"Zapri",openChat:"Odpri klepet",closeChat:"Zapri klepet",lightMode:"Svetli način",nightMode:"Temni način",refreshChat:"Osveži klepet",copyChat:"Kopiraj klepet",startChat:"Začni klepet",startingVoiceSession:"Začetek glasovne seje...",allowMicAccess:"Dovoli dostop do mikrofona"},sv:{connectionError:"Ursäkta, jag har anslutningsproblem just nu. Försök igen.",micDenied:"Vi kunde inte komma åt din mikrofon. Tillåt åtkomst och försök igen.",micNotFound:"Ingen mikrofon hittades. Anslut en mikrofon och försök igen.",voiceUnavailable:"Röst är inte tillgängligt just nu. Försök igen.",chooseTopicLabel:"Välj ett ämne för att komma igång:",categoryTopicsHeading:"Ställ gärna din **{category}**-fråga nedan.",quickQuestionsHeadingLabel:"Eller ställ en snabb fråga:",typeYourMessage:"Skriv ditt meddelande...",agentIsLoading:"Agenten laddas...",conversationResolved:"Konversation avslutad",howWasYourExperience:"Hur var din upplevelse?",feedbackPrompt:"Betygsätt vår support för att hjälpa oss att bli bättre.",feedbackPlaceholder:"Berätta mer om din upplevelse...",submitFeedback:"Skicka feedback",submitting:"Skickar...",selectRatingFirst:"Välj först ett betyg",pleaseSubmitRatingFirst:"Vänligen skicka in ditt betyg först.",completeOnboardingToEnableVoice:"Slutför introduktionen för att aktivera röst",sendMessageToCompleteOnboarding:"Skicka ett meddelande för att slutföra introduktionen och aktivera röst.",resolve:"Avsluta",scrollLeft:"Bläddra åt vänster",scrollRight:"Bläddra åt höger",sendMessage:"Skicka meddelande",voiceSessionLive:"Röstsession aktiv - tala eller skriv för att samtala.",connectingVoice:"Ansluter till röstsession...",poweredBy:"Drivs av",menu:"Meny",close:"Stäng",openChat:"Öppna chatt",closeChat:"Stäng chatt",lightMode:"Ljust läge",nightMode:"Mörkt läge",refreshChat:"Uppdatera chatt",copyChat:"Kopiera chatt",startChat:"Starta chatt",startingVoiceSession:"Startar röstsession...",allowMicAccess:"Tillåt mikrofonåtkomst"},th:{connectionError:"ขออภัย ขณะนี้เกิดปัญหาในการเชื่อมต่อ โปรดลองอีกครั้ง",micDenied:"เราไม่สามารถเข้าถึงไมโครโฟนของคุณได้ โปรดอนุญาตการเข้าถึงแล้วลองอีกครั้ง",micNotFound:"ไม่พบไมโครโฟน โปรดเชื่อมต่อไมโครโฟนแล้วลองอีกครั้ง",voiceUnavailable:"ฟีเจอร์เสียงไม่พร้อมใช้งานในขณะนี้ โปรดลองอีกครั้ง",chooseTopicLabel:"เลือกหัวข้อเพื่อเริ่มต้น:",categoryTopicsHeading:"โปรดถามคำถามเกี่ยวกับ **{category}** ด้านล่าง",quickQuestionsHeadingLabel:"หรือถามคำถามด่วน:",typeYourMessage:"พิมพ์ข้อความของคุณ...",agentIsLoading:"กำลังโหลดตัวแทน...",conversationResolved:"การสนทนาสิ้นสุดลง",howWasYourExperience:"ประสบการณ์ของคุณเป็นอย่างไร?",feedbackPrompt:"โปรดให้คะแนนการสนับสนุนของเราเพื่อช่วยให้เราปรับปรุง",feedbackPlaceholder:"บอกเราเพิ่มเติมเกี่ยวกับประสบการณ์ของคุณ...",submitFeedback:"ส่งความคิดเห็น",submitting:"กำลังส่ง...",selectRatingFirst:"โปรดเลือกคะแนนก่อน",pleaseSubmitRatingFirst:"โปรดส่งคะแนนของคุณก่อน",completeOnboardingToEnableVoice:"ทำการเริ่มต้นให้เสร็จเพื่อเปิดใช้งานเสียง",sendMessageToCompleteOnboarding:"ส่งข้อความเพื่อทำการเริ่มต้นให้เสร็จและเปิดใช้งานเสียง",resolve:"สิ้นสุด",scrollLeft:"เลื่อนไปทางซ้าย",scrollRight:"เลื่อนไปทางขวา",sendMessage:"ส่งข้อความ",voiceSessionLive:"เซสชันเสียงใช้งานอยู่ - พูดหรือพิมพ์เพื่อสนทนา",connectingVoice:"กำลังเชื่อมต่อกับเซสชันเสียง...",poweredBy:"ขับเคลื่อนโดย",menu:"เมนู",close:"ปิด",openChat:"เปิดแชท",closeChat:"ปิดแชท",lightMode:"โหมดสว่าง",nightMode:"โหมดมืด",refreshChat:"รีเฟรชแชท",copyChat:"คัดลอกแชท",startChat:"เริ่มแชท",startingVoiceSession:"กำลังเริ่มเซสชันเสียง...",allowMicAccess:"อนุญาตการเข้าถึงไมโครโฟน"},tr:{connectionError:"Üzgünüz, şu anda bağlantı sorunu yaşıyorum. Lütfen tekrar deneyin.",micDenied:"Mikrofonunuza erişemedik. Lütfen erişime izin verin ve tekrar deneyin.",micNotFound:"Mikrofon bulunamadı. Lütfen bir mikrofon bağlayın ve tekrar deneyin.",voiceUnavailable:"Sesli özellik şu anda kullanılamıyor. Lütfen tekrar deneyin.",chooseTopicLabel:"Başlamak için bir konu seçin:",categoryTopicsHeading:"Lütfen **{category}** sorunuzu aşağıya yazın.",quickQuestionsHeadingLabel:"Veya hızlı bir soru sorun:",typeYourMessage:"Mesajınızı yazın...",agentIsLoading:"Temsilci yükleniyor...",conversationResolved:"Görüşme sonlandırıldı",howWasYourExperience:"Deneyiminiz nasıldı?",feedbackPrompt:"Gelişmemize yardımcı olmak için lütfen desteğimizi değerlendirin.",feedbackPlaceholder:"Deneyiminiz hakkında bize daha fazla bilgi verin...",submitFeedback:"Geri bildirim gönder",submitting:"Gönderiliyor...",selectRatingFirst:"Önce bir değerlendirme seçin",pleaseSubmitRatingFirst:"Lütfen önce değerlendirmenizi gönderin.",completeOnboardingToEnableVoice:"Sesi etkinleştirmek için tanıtımı tamamlayın",sendMessageToCompleteOnboarding:"Tanıtımı tamamlamak ve sesi etkinleştirmek için bir mesaj gönderin.",resolve:"Bitir",scrollLeft:"Sola kaydır",scrollRight:"Sağa kaydır",sendMessage:"Mesaj gönder",voiceSessionLive:"Sesli oturum aktif - konuşun veya yazın.",connectingVoice:"Sesli oturuma bağlanılıyor...",poweredBy:"Tarafından sağlandı",menu:"Menü",close:"Kapat",openChat:"Sohbeti aç",closeChat:"Sohbeti kapat",lightMode:"Açık mod",nightMode:"Karanlık mod",refreshChat:"Sohbeti yenile",copyChat:"Sohbeti kopyala",startChat:"Sohbete başla",startingVoiceSession:"Sesli oturum başlatılıyor...",allowMicAccess:"Mikrofon erişimine izin ver"},uk:{connectionError:"Вибачте, зараз виникли проблеми з підключенням. Спробуйте ще раз.",micDenied:"Не вдалося отримати доступ до мікрофона. Дозвольте доступ і спробуйте ще раз.",micNotFound:"Мікрофон не знайдено. Підключіть мікрофон і спробуйте ще раз.",voiceUnavailable:"Голосова функція зараз недоступна. Спробуйте ще раз.",chooseTopicLabel:"Виберіть тему, щоб почати:",categoryTopicsHeading:"Будь ласка, поставте своє запитання щодо **{category}** нижче.",quickQuestionsHeadingLabel:"Або поставте швидке запитання:",typeYourMessage:"Введіть ваше повідомлення...",agentIsLoading:"Агент завантажується...",conversationResolved:"Розмову завершено",howWasYourExperience:"Яким був ваш досвід?",feedbackPrompt:"Будь ласка, оцініть нашу підтримку, щоб допомогти нам вдосконалюватися.",feedbackPlaceholder:"Розкажіть нам більше про свій досвід...",submitFeedback:"Надіслати відгук",submitting:"Надсилання...",selectRatingFirst:"Спочатку оберіть оцінку",pleaseSubmitRatingFirst:"Будь ласка, спочатку надішліть оцінку.",completeOnboardingToEnableVoice:"Завершіть вступ, щоб увімкнути голос",sendMessageToCompleteOnboarding:"Надішліть повідомлення, щоб завершити вступ та увімкнути голос.",resolve:"Завершити",scrollLeft:"Прокрутити ліворуч",scrollRight:"Прокрутити праворуч",sendMessage:"Надіслати повідомлення",voiceSessionLive:"Голосовий сеанс активний - говоріть або пишіть.",connectingVoice:"Підключення до голосового сеансу...",poweredBy:"Працює на",menu:"Меню",close:"Закрити",openChat:"Відкрити чат",closeChat:"Закрити чат",lightMode:"Світлий режим",nightMode:"Темний режим",refreshChat:"Оновити чат",copyChat:"Копіювати чат",startChat:"Почати чат",startingVoiceSession:"Запуск голосового сеансу...",allowMicAccess:"Дозволити доступ до мікрофона"},ur:{connectionError:"معذرت، اس وقت رابطہ قائم کرنے میں دشواری ہو رہی ہے۔ براہ کرم دوبارہ کوشش کریں۔",micDenied:"ہم آپ کے مائیکروفون تک رسائی حاصل نہیں کر سکے۔ براہ کرم رسائی کی اجازت دیں اور دوبارہ کوشش کریں۔",micNotFound:"کوئی مائیکروفون نہیں ملا۔ براہ کرم ایک منسلک کریں اور دوبارہ کوشش کریں۔",voiceUnavailable:"صوتی سہولت اس وقت دستیاب نہیں ہے۔ براہ کرم دوبارہ کوشش کریں۔",chooseTopicLabel:"شروع کرنے کے لیے ایک موضوع منتخب کریں:",categoryTopicsHeading:"براہ کرم اپنا **{category}** سوال نیچے پوچھیں۔",quickQuestionsHeadingLabel:"یا کوئی فوری سوال پوچھیں:",typeYourMessage:"اپنا پیغام ٹائپ کریں...",agentIsLoading:"ایجنٹ لوڈ ہو رہا ہے...",conversationResolved:"گفتگو مکمل",howWasYourExperience:"آپ کا تجربہ کیسا تھا؟",feedbackPrompt:"براہ کرم ہماری بہتری میں مدد کے لیے ہماری معاونت کی درجہ بندی کریں۔",feedbackPlaceholder:"ہمیں اپنے تجربے کے بارے میں مزید بتائیں...",submitFeedback:"رائے جمع کروائیں",submitting:"جمع ہو رہا ہے...",selectRatingFirst:"پہلے درجہ بندی منتخب کریں",pleaseSubmitRatingFirst:"براہ کرم پہلے اپنی درجہ بندی جمع کروائیں۔",completeOnboardingToEnableVoice:"آواز کو فعال کرنے کے لیے ابتدائی مراحل مکمل کریں",sendMessageToCompleteOnboarding:"ابتدائی مراحل مکمل کرنے اور آواز فعال کرنے کے لیے پیغام بھیجیں۔",resolve:"مکمل کریں",scrollLeft:"بائیں اسکرول کریں",scrollRight:"دائیں اسکرول کریں",sendMessage:"پیغام بھیجیں",voiceSessionLive:"صوتی سیشن فعال - بات کریں یا ٹائپ کریں۔",connectingVoice:"صوتی سیشن سے جڑ رہا ہے...",poweredBy:"پاور بذریعہ",menu:"مینو",close:"بند کریں",openChat:"چیٹ کھولیں",closeChat:"چیٹ بند کریں",lightMode:"ہلکا موڈ",nightMode:"تاریک موڈ",refreshChat:"چیٹ ریفریش کریں",copyChat:"چیٹ کاپی کریں",startChat:"چیٹ شروع کریں",startingVoiceSession:"صوتی سیشن شروع ہو رہا ہے...",allowMicAccess:"مائیکروفون تک رسائی کی اجازت دیں"},vi:{connectionError:"Xin lỗi, hiện tôi đang gặp sự cố kết nối. Vui lòng thử lại.",micDenied:"Chúng tôi không thể truy cập micrô của bạn. Vui lòng cho phép truy cập và thử lại.",micNotFound:"Không tìm thấy micrô. Vui lòng kết nối micrô và thử lại.",voiceUnavailable:"Tính năng giọng nói hiện không khả dụng. Vui lòng thử lại.",chooseTopicLabel:"Chọn một chủ đề để bắt đầu:",categoryTopicsHeading:"Vui lòng đặt câu hỏi của bạn về **{category}** bên dưới.",quickQuestionsHeadingLabel:"Hoặc đặt một câu hỏi nhanh:",typeYourMessage:"Nhập tin nhắn của bạn...",agentIsLoading:"Đang tải trợ lý...",conversationResolved:"Cuộc trò chuyện đã kết thúc",howWasYourExperience:"Trải nghiệm của bạn như thế nào?",feedbackPrompt:"Vui lòng đánh giá hỗ trợ của chúng tôi để giúp chúng tôi cải thiện.",feedbackPlaceholder:"Hãy cho chúng tôi biết thêm về trải nghiệm của bạn...",submitFeedback:"Gửi phản hồi",submitting:"Đang gửi...",selectRatingFirst:"Vui lòng chọn đánh giá trước",pleaseSubmitRatingFirst:"Vui lòng gửi đánh giá của bạn trước.",completeOnboardingToEnableVoice:"Hoàn thành hướng dẫn để bật giọng nói",sendMessageToCompleteOnboarding:"Gửi tin nhắn để hoàn thành hướng dẫn và bật giọng nói.",resolve:"Kết thúc",scrollLeft:"Cuộn sang trái",scrollRight:"Cuộn sang phải",sendMessage:"Gửi tin nhắn",voiceSessionLive:"Phiên giọng nói đang hoạt động - hãy nói hoặc gõ.",connectingVoice:"Đang kết nối phiên giọng nói...",poweredBy:"Được cung cấp bởi",menu:"Menu",close:"Đóng",openChat:"Mở trò chuyện",closeChat:"Đóng trò chuyện",lightMode:"Chế độ sáng",nightMode:"Chế độ tối",refreshChat:"Làm mới trò chuyện",copyChat:"Sao chép trò chuyện",startChat:"Bắt đầu trò chuyện",startingVoiceSession:"Đang bắt đầu phiên giọng nói...",allowMicAccess:"Cho phép truy cập micrô"}},W={en:{onboardingNamePlaceholder:"Please enter your name",onboardingEmailPlaceholder:"Please enter your email address",onboardingPhonePlaceholder:"Please enter your phone number"},ar:{onboardingNamePlaceholder:"الرجاء إدخال اسمك",onboardingEmailPlaceholder:"الرجاء إدخال بريدك الإلكتروني",onboardingPhonePlaceholder:"الرجاء إدخال رقم هاتفك"},es:{onboardingNamePlaceholder:"Introduce tu nombre",onboardingEmailPlaceholder:"Introduce tu correo electrónico",onboardingPhonePlaceholder:"Introduce tu número de teléfono"},be:{onboardingNamePlaceholder:"Калі ласка, увядзіце ваша імя",onboardingEmailPlaceholder:"Калі ласка, увядзіце адрас электроннай пошты",onboardingPhonePlaceholder:"Калі ласка, увядзіце нумар тэлефона"},bs:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju email adresu",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},bg:{onboardingNamePlaceholder:"Моля, въведете вашето име",onboardingEmailPlaceholder:"Моля, въведете имейл адреса си",onboardingPhonePlaceholder:"Моля, въведете телефонния си номер"},my:{onboardingNamePlaceholder:"ကျေးဇူးပြု၍ သင့်အမည်ကို ထည့်ပါ",onboardingEmailPlaceholder:"ကျေးဇူးပြု၍ သင့်အီးမေးလ်လိပ်စာကို ထည့်ပါ",onboardingPhonePlaceholder:"ကျေးဇူးပြု၍ သင့်ဖုန်းနံပါတ်ကို ထည့်ပါ"},ca:{onboardingNamePlaceholder:"Introdueix el teu nom",onboardingEmailPlaceholder:"Introdueix el teu correu electrònic",onboardingPhonePlaceholder:"Introdueix el teu número de telèfon"},zh:{onboardingNamePlaceholder:"请输入您的姓名",onboardingEmailPlaceholder:"请输入您的电子邮箱地址",onboardingPhonePlaceholder:"请输入您的电话号码"},hr:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju adresu e-pošte",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},cs:{onboardingNamePlaceholder:"Zadejte své jméno",onboardingEmailPlaceholder:"Zadejte svou e-mailovou adresu",onboardingPhonePlaceholder:"Zadejte své telefonní číslo"},da:{onboardingNamePlaceholder:"Indtast dit navn",onboardingEmailPlaceholder:"Indtast din e-mailadresse",onboardingPhonePlaceholder:"Indtast dit telefonnummer"},nl:{onboardingNamePlaceholder:"Voer uw naam in",onboardingEmailPlaceholder:"Voer uw e-mailadres in",onboardingPhonePlaceholder:"Voer uw telefoonnummer in"},et:{onboardingNamePlaceholder:"Sisestage oma nimi",onboardingEmailPlaceholder:"Sisestage oma e-posti aadress",onboardingPhonePlaceholder:"Sisestage oma telefoninumber"},fi:{onboardingNamePlaceholder:"Anna nimesi",onboardingEmailPlaceholder:"Anna sähköpostiosoitteesi",onboardingPhonePlaceholder:"Anna puhelinnumerosi"},fr:{onboardingNamePlaceholder:"Veuillez saisir votre nom",onboardingEmailPlaceholder:"Veuillez saisir votre adresse e-mail",onboardingPhonePlaceholder:"Veuillez saisir votre numéro de téléphone"},de:{onboardingNamePlaceholder:"Bitte geben Sie Ihren Namen ein",onboardingEmailPlaceholder:"Bitte geben Sie Ihre E-Mail-Adresse ein",onboardingPhonePlaceholder:"Bitte geben Sie Ihre Telefonnummer ein"},el:{onboardingNamePlaceholder:"Παρακαλώ εισαγάγετε το όνομά σας",onboardingEmailPlaceholder:"Παρακαλώ εισαγάγετε τη διεύθυνση email σας",onboardingPhonePlaceholder:"Παρακαλώ εισαγάγετε τον αριθμό τηλεφώνου σας"},hi:{onboardingNamePlaceholder:"कृपया अपना नाम दर्ज करें",onboardingEmailPlaceholder:"कृपया अपना ईमेल पता दर्ज करें",onboardingPhonePlaceholder:"कृपया अपना फ़ोन नंबर दर्ज करें"},mr:{onboardingNamePlaceholder:"कृपया आपले नाव प्रविष्ट करा",onboardingEmailPlaceholder:"कृपया आपला ईमेल पत्ता प्रविष्ट करा",onboardingPhonePlaceholder:"कृपया आपला फोन नंबर प्रविष्ट करा"},hu:{onboardingNamePlaceholder:"Adja meg a nevét",onboardingEmailPlaceholder:"Adja meg az e-mail-címét",onboardingPhonePlaceholder:"Adja meg a telefonszámát"},is:{onboardingNamePlaceholder:"Sláðu inn nafn þitt",onboardingEmailPlaceholder:"Sláðu inn netfangið þitt",onboardingPhonePlaceholder:"Sláðu inn símanúmerið þitt"},id:{onboardingNamePlaceholder:"Masukkan nama Anda",onboardingEmailPlaceholder:"Masukkan alamat email Anda",onboardingPhonePlaceholder:"Masukkan nomor telepon Anda"},it:{onboardingNamePlaceholder:"Inserisci il tuo nome",onboardingEmailPlaceholder:"Inserisci il tuo indirizzo email",onboardingPhonePlaceholder:"Inserisci il tuo numero di telefono"},ja:{onboardingNamePlaceholder:"お名前を入力してください",onboardingEmailPlaceholder:"メールアドレスを入力してください",onboardingPhonePlaceholder:"電話番号を入力してください"},ko:{onboardingNamePlaceholder:"이름을 입력해 주세요",onboardingEmailPlaceholder:"이메일 주소를 입력해 주세요",onboardingPhonePlaceholder:"전화번호를 입력해 주세요"},lv:{onboardingNamePlaceholder:"Lūdzu, ievadiet savu vārdu",onboardingEmailPlaceholder:"Lūdzu, ievadiet savu e-pasta adresi",onboardingPhonePlaceholder:"Lūdzu, ievadiet savu tālruņa numuru"},lt:{onboardingNamePlaceholder:"Įveskite savo vardą",onboardingEmailPlaceholder:"Įveskite savo el. pašto adresą",onboardingPhonePlaceholder:"Įveskite savo telefono numerį"},mk:{onboardingNamePlaceholder:"Внесете го вашето име",onboardingEmailPlaceholder:"Внесете ја вашата е-пошта",onboardingPhonePlaceholder:"Внесете го вашиот телефонски број"},ms:{onboardingNamePlaceholder:"Masukkan nama anda",onboardingEmailPlaceholder:"Masukkan alamat e-mel anda",onboardingPhonePlaceholder:"Masukkan nombor telefon anda"},no:{onboardingNamePlaceholder:"Skriv inn navnet ditt",onboardingEmailPlaceholder:"Skriv inn e-postadressen din",onboardingPhonePlaceholder:"Skriv inn telefonnummeret ditt"},fa:{onboardingNamePlaceholder:"لطفاً نام خود را وارد کنید",onboardingEmailPlaceholder:"لطفاً ایمیل خود را وارد کنید",onboardingPhonePlaceholder:"لطفاً شماره تلفن خود را وارد کنید"},pl:{onboardingNamePlaceholder:"Wpisz swoje imię",onboardingEmailPlaceholder:"Wpisz swój adres e-mail",onboardingPhonePlaceholder:"Wpisz swój numer telefonu"},pt:{onboardingNamePlaceholder:"Insira o seu nome",onboardingEmailPlaceholder:"Insira o seu endereço de e-mail",onboardingPhonePlaceholder:"Insira o seu número de telefone"},ro:{onboardingNamePlaceholder:"Introduceți numele dvs.",onboardingEmailPlaceholder:"Introduceți adresa dvs. de e-mail",onboardingPhonePlaceholder:"Introduceți numărul dvs. de telefon"},ru:{onboardingNamePlaceholder:"Введите ваше имя",onboardingEmailPlaceholder:"Введите адрес электронной почты",onboardingPhonePlaceholder:"Введите номер телефона"},sr:{onboardingNamePlaceholder:"Унесите своје име",onboardingEmailPlaceholder:"Унесите своју адресу е-поште",onboardingPhonePlaceholder:"Унесите свој број телефона"},sk:{onboardingNamePlaceholder:"Zadajte svoje meno",onboardingEmailPlaceholder:"Zadajte svoju e-mailovú adresu",onboardingPhonePlaceholder:"Zadajte svoje telefónne číslo"},sl:{onboardingNamePlaceholder:"Vnesite svoje ime",onboardingEmailPlaceholder:"Vnesite svoj e-poštni naslov",onboardingPhonePlaceholder:"Vnesite svojo telefonsko številko"},sv:{onboardingNamePlaceholder:"Ange ditt namn",onboardingEmailPlaceholder:"Ange din e-postadress",onboardingPhonePlaceholder:"Ange ditt telefonnummer"},th:{onboardingNamePlaceholder:"กรุณากรอกชื่อของคุณ",onboardingEmailPlaceholder:"กรุณากรอกอีเมลของคุณ",onboardingPhonePlaceholder:"กรุณากรอกหมายเลขโทรศัพท์ของคุณ"},tr:{onboardingNamePlaceholder:"Lütfen adınızı girin",onboardingEmailPlaceholder:"Lütfen e-posta adresinizi girin",onboardingPhonePlaceholder:"Lütfen telefon numaranızı girin"},uk:{onboardingNamePlaceholder:"Введіть ваше ім’я",onboardingEmailPlaceholder:"Введіть вашу адресу електронної пошти",onboardingPhonePlaceholder:"Введіть ваш номер телефону"},ur:{onboardingNamePlaceholder:"براہ کرم اپنا نام درج کریں",onboardingEmailPlaceholder:"براہ کرم اپنا ای میل پتہ درج کریں",onboardingPhonePlaceholder:"براہ کرم اپنا فون نمبر درج کریں"},vi:{onboardingNamePlaceholder:"Vui lòng nhập tên của bạn",onboardingEmailPlaceholder:"Vui lòng nhập địa chỉ email của bạn",onboardingPhonePlaceholder:"Vui lòng nhập số điện thoại của bạn"}},_=new Set(["ar","fa","he","ur"]);function Y(e){if(!e||"string"!=typeof e)return"en";const t=e.toLowerCase().split(/[-_]/)[0];return q[t]?t:"en"}function Q(e){const t=(e||"").toLowerCase().split(/[-_]/)[0];return _.has(t)}const K=/[\u0590-\u05ff\u0600-\u06ff\u0700-\u074f\u0750-\u077f\u08a0-\u08ff\ufb1d-\ufb4f\ufb50-\ufdff\ufe70-\ufeff]/,G=/[A-Za-z\u00c0-\u024f\u0370-\u03ff\u0400-\u04ff]/;function J(e,t=!1){if("string"!=typeof e||0===e.length)return t;for(const t of e){if(K.test(t))return!0;if(G.test(t))return!1}return t}function X(e){const t=Y(e);return e=>function(e,t){const o=Y(e),r=q[o]||H,a=W[o];return a?.[t]??r[t]??W.en[t]??H[t]??t}(t,e)}const Z=new Set(["NotAllowedError","PermissionDeniedError","SecurityError"]),ee=new Set(["NotFoundError","DevicesNotFoundError","OverconstrainedError"]);function te(e){try{const t="string"==typeof e?.name?e.name:"";if(Z.has(t))return"micDenied";if(ee.has(t))return"micNotFound";const o="string"==typeof e?.message?e.message.toLowerCase():"";if(o.includes("permission denied")||o.includes("permission dismissed"))return"micDenied";if(o.includes("device not found")||o.includes("no microphone"))return"micNotFound"}catch{}return"voiceUnavailable"}const oe=e=>e.replace(/([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])\s+([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])/g,"$1$2"),re=/^(https?|mailto|tel):/i,ae=e=>{const t=(e||"").trim();return t?/^https?:\/\//i.test(t)||re.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?"":`https://${t.replace(/^\/+/,"")}`:""},ne=(...e)=>e.filter(Boolean).join(" "),ie={fullname:0,name:0,username:0,email:1,phone:2,mobileno:2},se=e=>{if(!e)return 99;const t=String(e).toLowerCase();return ie[t]??99},le="eshal_chat_session",ce="eshal_chat_session_messages";function de(e,t=200,o=50){if(!Array.isArray(e))return[];("number"!=typeof t||t<=0)&&(t=200),("number"!=typeof o||o<=0||o>=t)&&(o=Math.min(50,t-1));let r=e;for(;r.length>t;)r=r.slice(o);return r}const ue=(e,t,o,r)=>{if(e&&t)try{const a=r?.cap,n=r?.trimBatch,i=function(e){return Array.isArray(e)?e.filter(e=>e&&!e.isWelcome&&(e.content||Array.isArray(e.sources)&&e.sources.length>0||Array.isArray(e.attachments)&&e.attachments.length>0)).map(e=>({id:e.id,role:e.role,content:e.content,timestamp:e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:(new Date).toISOString(),type:e.type??null,...Array.isArray(e.sources)&&e.sources.length>0?{sources:e.sources}:{},...void 0!==e.feedback?{feedback:e.feedback}:{},...Array.isArray(e.prompts)&&e.prompts.length>0?{prompts:e.prompts}:{},...Array.isArray(e.attachments)&&e.attachments.length>0?{attachments:e.attachments.filter(e=>e&&(e.filename||e.storageKey)).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url}))}:{}})):[]}(de(o,a,n));localStorage.setItem(`${ce}_${e}_${t}`,JSON.stringify(i))}catch{}},ge=(e,t)=>{if(e&&t)try{localStorage.removeItem(`${ce}_${e}_${t}`)}catch{}},he=(e,t)=>{if(null==e||!t)return null;const o={MINUTES:6e4,HOURS:36e5,DAYS:864e5}[t.toUpperCase()];return void 0===o?(console.warn(`[Session] Unknown timeout unit: ${t}`),null):Number(e)*o},pe=e=>{try{const t=localStorage.getItem(`${le}_${e}`);return t?JSON.parse(t):null}catch{return null}},me=(e,t,o)=>{if(!e||!e.lastActivity)return!1;if(null==t||0===t)return!0;if(null!==t&&null!==o){const r=JSON.stringify({value:t,unit:o?.toUpperCase()});if(e.settingsSnapshot&&e.settingsSnapshot!==r)return console.log("[Session] Timeout settings changed - treating session as invalid."),!1}if(null===e.firstInteractionAt)return!0;const r=he(t,o);if(!r)return!0;const a=new Date(e.lastActivity).getTime(),n=Date.now()-a,i=n<r;return i||console.log(`[Session] Session expired. Elapsed: ${Math.floor(n/1e3)}s, Timeout: ${Math.floor(r/1e3)}s`),i},be=(e,t,o={})=>{try{const r=(new Date).toISOString();console.log(`[Session] Saving new session: ${t} for org: ${e}`),localStorage.setItem(`${le}_${e}`,JSON.stringify({conversationId:t,lastActivity:r,createdAt:r,firstInteractionAt:null,...o}))}catch{}},we=e=>{try{const t=pe(e);if(!t)return;const o=(new Date).toISOString();t.lastActivity=o,t.firstInteractionAt||(t.firstInteractionAt=o),localStorage.setItem(`${le}_${e}`,JSON.stringify(t))}catch{}},fe=e=>{try{return pe(e)?.onboardingName??""}catch{return""}},ve=(e,t)=>{try{if(!e)return;if(!Array.isArray(t)||0===t.length)return void localStorage.removeItem(`${le}_prompts_${e}`);localStorage.setItem(`${le}_prompts_${e}`,JSON.stringify(t))}catch{}};function ye(e,t){const o=null==e?"":String(e),r=String(t??"").trim();if(!r||!o.trim())return o;const a=function(e){return String(e??"").trim().split(/\s+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}(r);if(new RegExp(`^\\s*(?:hi|hey|hello)\\s+${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"i").test(o))return o;const n=o.match(/^\s*(hi|hey|hello)(?:\s+there)?\s*([-,!.:;]+)?\s*/i);if(n){const e=n[1],t=n[2]??",",r=o.slice(n[0].length);return`${e} ${a}${t}${r?` ${r}`:""}`}return`Hi ${a}, ${o}`}const ke=new Set(["fullname","name","username"]);const xe=({id:e,role:t,content:o,isProcessing:r=!1,isError:a=!1,metadata:n,attachments:i})=>({id:e,role:t,content:o,timestamp:new Date,isProcessing:r,...a?{isError:!0}:{},metadata:n,...Array.isArray(i)&&i.length>0?{attachments:i}:{}}),Ce=(e,t)=>{const o=[...e.map(e=>({...e,metadata:e.metadata||{source:"sse"}})),...t];return Array.from(new Map(o.map(e=>[e.id,e])).values()).sort((e,t)=>(e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime())-(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime()))};function Se(){return`widget-session-${"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}`}const Me=e=>e&&e.length>0?e:[],Pe=({welcomeMessage:e,quickQuestions:i=[],apiBaseUrl:s,wsBaseUrl:l,apiKey:c,organizationId:d,getAuthToken:u,autoOpen:g,openDelay:h,darkMode:p,enableVoiceInteraction:m=!1,provideCitations:b=!0,onboardingQuestions:w=[],onboardingEnabled:f=!1,collectionPrompt:v,inactivityTimeoutValue:y,inactivityTimeoutUnit:k,messageLimits:x,locale:C="en"})=>{const P=t(()=>X(C),[C]),z=t(()=>({cap:"number"==typeof x?.cap&&x.cap>0?x.cap:200,trimBatch:"number"==typeof x?.trimBatch&&x.trimBatch>0?x.trimBatch:50}),[x?.cap,x?.trimBatch]),[T,F]=o(g),[L,N]=o(!1),[A,j]=o(p),[R,D]=o(()=>{try{const e=pe(d);if(void 0!==y&&e&&me(e,y,k))return[]}catch{}if(!e)return[];let t=e;try{t=ye(e,fe(d))}catch{}return[{...xe({id:Date.now().toString(),role:"assistant",content:t}),isWelcome:!0}]}),[V,O]=o(""),$=r(""),H=a(e=>{const t="function"==typeof e?e($.current):e;$.current=t,O(t)},[]),[q,W]=o(!1),_=r(null),Y=r(null),Q=r(1),[K,G]=o(null),[J,Z]=o(null),ee=r(null);n(()=>{ee.current=J},[J]);const[re,ae]=o(null),ne=r(null);n(()=>{ne.current=re},[re]);const[ie,Pe]=o(!1),[ze,Te]=o(()=>{try{const e=pe(d);if(e&&e.onboardingCompleted)return!0}catch{}return!1}),[Fe,Le]=o(()=>{try{return fe(d)||""}catch{return""}}),Ne=t(()=>ye(e,Fe),[e,Fe]),[Ae,je]=o(null),[Ie,Ee]=o({}),Be=r(!1),Re=r(!1),[De,Ve]=o(!1),[Oe,$e]=o(!1),[Ue,He]=o([]),[qe,We]=o("idle"),[_e,Ye]=o(null),[Qe,Ke]=o(!1),[Ge,Je]=o(()=>{try{const e=pe(d);if(void 0!==y&&e&&me(e,y,k))return e.conversationId}catch{}return Se()}),Xe=r(null),[Ze,et]=o(!1),tt=r(!1),ot=a(()=>{tt.current=!0,et(!0)},[]),rt=r(null),at=r(null),nt=r(null),it=r(null),st=r(null),lt=r(null),ct=r(null),dt=r(null),ut=r(null),gt=r(!1),ht=r(!1);r(null);const pt=r(null);r(null);const mt=r(!1),bt=r(null),wt=r(!1),ft=r(!1),vt=r(null),yt=r(null),kt=r(null),xt=r(null),Ct=a(async e=>{if(Xe.current)return void(e&&e());if(!s||!Ge)return;let t=`${s.replace(/\/$/,"")}/api/v1/widget/events/${encodeURIComponent(Ge)}`;if("function"==typeof u)try{const e=await u();e&&(t+=`${t.includes("?")?"&":"?"}token=${encodeURIComponent(e)}`)}catch{}if(Xe.current)return void(e&&e());const o=new EventSource(t);o.onmessage=e=>{try{const t=JSON.parse(e.data);"message_created"===t.type&&t.message&&D(e=>e.some(e=>e.id===t.message.id)?e:[...e,xe({id:t.message.id,role:t.message.role||"assistant",content:t.message.content,isProcessing:!1,metadata:{senderName:t.message.senderName}})])}catch{}},o.onopen=()=>{e&&e()},o.onerror=()=>{},Xe.current=o},[s,Ge,u]);n(()=>()=>{Xe.current&&(Xe.current.close(),Xe.current=null)},[]);const St=t(()=>{if(!d)return null;const e=((e,t)=>{if(t)return t.replace(/\/$/,"");if(!e)return"wss://dev.eshal.ai/voice/ws";try{const t=new URL(e);return t.protocol=t.protocol.replace(/^http/,"ws"),t.pathname="/voice/ws",t.toString().replace(/\/$/,"")}catch(e){return console.error("Invalid API base URL provided for WebSocket:",e),"wss://dev.eshal.ai/voice/ws"}})(s,l);return`${e}/${d}/${Ge}`},[s,l,d,Ge]),Mt=a(()=>{const e=`msg-${Q.current}`;return Q.current+=1,e},[]);n(()=>{if(g&&h>0){const e=setTimeout(()=>F(!0),h);return()=>clearTimeout(e)}},[g,h]),n(()=>{let e=!1;return(async()=>{try{const{default:t}=await import("./chat-widget-index-BdOGBqbs.esm.js").then(function(e){return e.i}),o=new t({cache:!0,geoFromBrowser:!0,preferredProvider:"ipwho.is",onError:()=>{}}),r=await o.init();if(e)return;if(r?.fingerprintId&&(kt.current=r.fingerprintId),r?.geo||r?.ip){const e=r.geo||{};xt.current={ip:r.ip||e.ip||null,country:e.country||null,countryCode:e.countryCode||null,region:e.region||null,city:e.city||null,timezone:e.timezone||null}}}catch{}})(),()=>{e=!0}},[]),n(()=>{j(p)},[p]);const Pt=r(!1),zt=r(!1),Tt=r(!1),Ft=r({value:null,unit:null}),[Lt,Nt]=o(!1);n(()=>{if(!d||!Ge||void 0===y)return;const t=pe(d);if(t&&me(t,y,k)){if(Ge!==t.conversationId)return void Je(t.conversationId);if(!Pt.current){Pt.current=!0;const t=((e,t)=>{if(!e||!t)return[];try{const o=localStorage.getItem(`${ce}_${e}_${t}`);if(!o)return[];const r=JSON.parse(o);return Array.isArray(r)?r.map(e=>({...e,timestamp:e.timestamp?new Date(e.timestamp):new Date})):[]}catch{return[]}})(d,Ge);if(t.length>0){if(zt.current=!0,e){const e=t[0]?.timestamp,o=e instanceof Date?e.getTime():e?new Date(e).getTime():Date.now(),r={...xe({id:"welcome-restored",role:"assistant",content:Ne}),isWelcome:!0,timestamp:new Date(o-1)};D([r,...t])}else D(t);if(!t.some(e=>"assistant"===e.role&&Array.isArray(e.prompts)&&e.prompts.length>0)){const e=(e=>{try{const t=localStorage.getItem(`${le}_prompts_${e}`);return t&&JSON.parse(t)||[]}catch{return[]}})(d);e.length>0&&D(t=>{const o=[...t];for(let t=o.length-1;t>=0;t-=1)if("assistant"===o[t].role){o[t]={...o[t],prompts:e};break}return o})}}}}else if(Pt.current||(Pt.current=!0),t&&Ge===t.conversationId){const e=Se();console.warn(`[Session] Rotating expired ID ${Ge} -> ${e}`),ge(d,Ge),Je(e)}else t?.conversationId&&t.conversationId!==Ge&&ge(d,t.conversationId),t&&t.conversationId===Ge||be(d,Ge,{settingsSnapshot:JSON.stringify({value:y,unit:k?.toUpperCase()})})},[d,Ge,s,y,k]);const At=r(null);n(()=>{if(!s||!d||!Ge)return;if(At.current===Ge)return;At.current=Ge;let e=!1;return(async()=>{try{const t={};if("function"==typeof u){const e=await u();e&&(t.Authorization=`Bearer ${e}`)}const o=await fetch(`${s.replace(/\/$/,"")}/api/v1/widget/history/${encodeURIComponent(Ge)}`,{headers:t,credentials:"include"});if(!o.ok||e)return;const r=await o.json(),a=(Array.isArray(r?.messages)?r.messages:[]).filter(e=>"human_reply"===e?.contentType||"handoff_ack"===e?.contentType);!e&&a.length>0&&D(e=>{const t=new Set(e.map(e=>e.id)),o=a.filter(e=>!t.has(e.id)).map(e=>({...xe({id:e.id,role:e.role||"assistant",content:e.content,isProcessing:!1}),timestamp:e.createdAt?new Date(e.createdAt):new Date}));if(0===o.length)return e;const r=e=>{const t=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return Number.isFinite(t)?t:0},n=[...e,...o];return n.sort((e,t)=>r(e)-r(t)),n}),e||"human"!==r?.responder||(ot(),Ct())}catch{}})(),()=>{e=!0}},[s,d,Ge,u,Ct,ot]),n(()=>{if(d&&R&&0!==R.length)for(let e=R.length-1;e>=0;e-=1){const t=R[e];if("assistant"===t?.role&&Array.isArray(t.prompts)&&t.prompts.length>0)return void ve(d,t.prompts)}},[R,d]),n(()=>{De||q||R.length<=z.cap||D(e=>de(e,z.cap,z.trimBatch))},[R.length,De,q,z.cap,z.trimBatch]),n(()=>{d&&Ge&&(De||q||ue(d,Ge,Ce(R,Ue),z))},[R,Ue,d,Ge,De,q,z]),n(()=>{if(!f||ze)return;Me(w).length>0&&Pe(!0)},[f,ze,w]),n(()=>{e&&!zt.current&&D(e=>{if(!e.length)return[{...xe({id:Date.now().toString(),role:"assistant",content:Ne}),isWelcome:!0}];const[t,...o]=e;return t.isWelcome?[{...t,content:Ne},...o]:e})},[e,Ne]),a(e=>{D(t=>t.map(t=>t.id===e.id?{...t,...e.update(t)}:t))},[]);const jt=a((e,t={})=>{if(!e)return;const o=t.replaceMarker||null;D(t=>[...o?(t||[]).filter(e=>e?.metadata?.synthesizedKind!==o):t||[],xe({id:Mt(),role:"assistant",content:e,metadata:o?{synthesizedKind:o}:void 0})])},[Mt]),It=a(()=>{try{_.current&&_.current.abort()}catch{}},[]),Et=a(async(e,t,o)=>{const r=String(e??"").trim(),a=Array.isArray(o?.attachments)?o.attachments:[];if(!r&&0===a.length)return{success:!1,error:"Message cannot be empty"};if(Re.current)return{success:!1,error:"A message is already being sent"};if(Re.current=!0,"Connect with a human representative"===r){const e=async()=>{if(s&&Ge){const e={"Content-Type":"application/json"};if("function"==typeof u){const t=await u();t&&(e.Authorization=`Bearer ${t}`)}fetch(`${s.replace(/\/$/,"")}/api/v1/widget/handoff/${encodeURIComponent(Ge)}`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({reason:"User clicked handoff button"})}).catch(()=>{})}};ot(),Ct(e)}if(t&&!["inquiry","complaint","technical"].includes((t||"").toLowerCase())||(ne.current=r,ae(r)),!s)return Re.current=!1,D(e=>[...e||[],xe({id:Mt(),role:"assistant",content:P("connectionError"),isProcessing:!1,isError:!0})]),console.error("Chat widget configuration error: apiBaseUrl is required for streaming."),{success:!1,error:"API base URL is required"};const n=["inquiry","complaint","technical","userName","email","phone","fullname","mobileno"];let i="inquiry";if(t){const e=t.toLowerCase();"fullname"===e||"name"===e?i="userName":"email"===e?i="email":"phone"===e||"mobileno"===e?i="phone":n.includes(e)&&(i=e)}let l=null;const c=(e,t)=>{null!=e&&D(o=>(o||[]).map(o=>o.id===e?{...o,status:t}:o))};if("inquiry"===i||"complaint"===i||"technical"===i){l=Mt();const e=xe({id:l,role:"user",content:r,...a.length?{attachments:a}:{}});D(t=>{const r=(t||[]).map(e=>"assistant"===e.role&&e.prompts?.length?{...e,prompts:void 0}:e);return o&&o.skipUserAppend?r:[...r,e]}),H(""),tt.current||W(!0)}else H("");try{const e={message:r,type:i,conversationId:Ge,enable_citation:b??!0,channel:"WIDGET",...kt.current?{fingerprintId:kt.current}:{},...xt.current?{visitor:xt.current}:{},...K&&(K.category||K.tags&&K.tags.length)?{filter:K}:{},...ee.current?{routing:ee.current}:{},...a.length?{attachments:a}:{},messageHistory:R.filter(e=>!e.isProcessing&&e.content&&e.content.trim()&&!["userName","email","phone"].includes(e.type)).map(e=>{let t;return t=e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:e.timestamp?new Date(e.timestamp).toISOString():(new Date).toISOString(),{id:e.id,role:e.role,content:e.content,timestamp:t,isProcessing:!1}})},t=[500,1500];if("userName"===i||"email"===i||"phone"===i){const t=(await M(e,s,u)).getReader(),o=new TextDecoder;for(;;){const{done:e,value:r}=await t.read();if(e)break;o.decode(r)}return{success:!0}}if(tt.current&&("inquiry"===i||"complaint"===i||"technical"===i)){try{const t=(await M(e,s,u)).getReader();for(;;){const{done:e}=await t.read();if(e)break}}catch(e){return console.error("Error sending message (handed off):",e),c(l,"failed"),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}return c(l,"sent"),we(d),{success:!0}}if("inquiry"===i||"complaint"===i||"technical"===i){let o;for(let r=0;r<=t.length;r+=1)try{_.current=new AbortController;const t=await M(e,s,u,_.current.signal);return await I(t,D),c(l,"sent"),we(d),{success:!0}}catch(e){if(o=e,e&&"AbortError"===e.name)return D(e=>(e||[]).filter(e=>!e.isProcessing)),c(l,"sent"),{success:!0,stopped:!0};if(e instanceof S&&r<t.length){D(e=>(e||[]).filter(e=>!e.isProcessing));const o=t[r];console.warn(`[chat] stream dropped (attempt ${r+1}); retrying in ${o}ms - ${e.message}`),await new Promise(e=>setTimeout(e,o));continue}throw e}throw o}return await M(e,s,u),we(d),{success:!0}}catch(e){return console.error("Error sending message:",e),"inquiry"!==i&&"complaint"!==i&&"technical"!==i||(W(!1),c(l,"failed"),D(e=>[...(e||[]).filter(e=>!e.isProcessing),xe({id:Mt(),role:"assistant",content:P("connectionError"),isProcessing:!1,isError:!0})])),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}finally{W(!1),Re.current=!1}},[s,c,Mt,u,R,Ge,J,K,b]),Bt=a(e=>e&&"failed"===e.status?(D(t=>(t||[]).filter(t=>t.id!==e.id)),Et(e.content,void 0,{attachments:e.attachments})):Promise.resolve({success:!1,error:"Nothing to retry"}),[Et]),Rt=a(async e=>{const t=Me(w);if(0===t.length)return;const o=function(e,t){if(!Array.isArray(e)||!t)return"";for(const o of e){const e=String(o?.fieldType??"").toLowerCase();if(!ke.has(e))continue;const r=t[o?.fieldType??""];if("string"!=typeof r)continue;const a=r.trim();if(a)return a}return""}(t,e);Pe(!1),Te(!0),((e,t)=>{try{const o=pe(e);if(!o)return;o.onboardingCompleted=!0;const r=(t??"").trim();r&&(o.onboardingName=r),localStorage.setItem(`${le}_${e}`,JSON.stringify(o))}catch{}})(d,o),o&&Le(o),Ee(t=>({...t,...e})),Ae&&!Be.current&&(Be.current=!0,H(Ae),je(null));const r=[...t].sort((e,t)=>se(e.fieldType)-se(t.fieldType)),a={};for(const t of r){const o=t.fieldType||"question",r=(e[o]??"").trim();r&&(a[o]=r)}if(Object.keys(a).length>0&&s&&Ge)try{await(async(e,{conversationId:t,organizationId:o},r,a)=>{const n={"Content-Type":"application/json"};if("function"==typeof a){const e=await a();e&&(n.Authorization=`Bearer ${e}`)}const i=await fetch(`${r.replace(/\/$/,"")}/api/v1/support/onboarding`,{method:"POST",headers:n,credentials:"include",body:JSON.stringify({conversationId:t,organizationId:o,answers:e})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.json()})(a,{conversationId:Ge,organizationId:d},s,u)}catch(e){console.error("[onboarding] failed to save onboarding answers",e)}},[w,Ae,d,s,Ge,u]),Dt=r(null);n(()=>{if(q||Re.current||!Dt.current)return;const{text:e,attachments:t}=Dt.current;Dt.current=null;const o=Array.isArray(t)&&t.length>0;Et(e,void 0,o?{attachments:t}:void 0)},[q,Et]);const Vt=a(async(e,t)=>{const o=String(e??$.current).trim(),r=Array.isArray(t)&&t.length>0;if(o||r)return Re.current?(Dt.current={text:o,attachments:r?t:void 0},void H("")):void await Et(o,void 0,r?{attachments:t}:void 0)},[Et,H]),Ot=a(async(e,t)=>{await Vt(e,t)},[Vt]),$t=a(async e=>{const t=e?.trim();t&&await Et(t)},[Et]),Ut=a(async(e,t,o)=>{if(D(t=>t.filter(t=>t.decisionData?.decisionId!==e)),"routing-clarification"===e){const e=String(o||"").toLowerCase(),r="database"===t||"knowledge"===t?t:"database"===e||"knowledge"===e?e:null;if(r){ee.current=r,Z(r);const e=ne.current;ne.current=null,ae(null),e&&e.trim()&&setTimeout(()=>{Et(e,"inquiry",{skipUserAppend:!0}).catch(e=>console.warn("[routing-clarification] re-send failed:",e))},0)}return}if("connect_agent"===o){const e=xe({id:Mt(),role:"assistant",content:"Great! I'm setting up a connection with a live customer service agent. Please hold on for a moment while I transfer you."});D(t=>[...t,e])}else if("decline"===o){const e=xe({id:Mt(),role:"assistant",content:"I understand. I apologize that I don't have specific information about your query in my knowledge base. Is there anything else I can help you with?"});D(t=>[...t,e])}},[Mt,Et,re]);a(()=>{dt.current&&(He(e=>e.map(e=>e.id===dt.current?{...e,isProcessing:!1}:e)),dt.current=null)},[]);const Ht=a((e,t=!1)=>{if(wt.current=!0,!e||"string"==typeof e&&!e.trim())return void(t&&dt.current&&(He(e=>e.map(e=>e.id===dt.current?{...e,isProcessing:!1}:e)),dt.current=null));const o=oe(e);He(e=>{const r=e.length;let a=[...e];if(dt.current){if(a.some(e=>e.id===dt.current))a=a.map(e=>{if(e.id!==dt.current)return e;const r=oe(`${e.content||""}${o}`);return{...e,content:r,isProcessing:!t,metadata:{...e.metadata,transcriptionType:"input"}}});else{console.error("[BIDI] appendUserTranscription: ERROR - user message not found!",{expectedId:dt.current,existingIds:a.map(e=>e.id)});const e=`bidi-input-${Date.now()}`;dt.current=e;const r=xe({id:e,role:"user",content:o,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}});a=[...a,r],console.log("[BIDI] appendUserTranscription: recreated lost user message",{messageId:e})}}else{const r=`bidi-input-${Date.now()}`,n=e.filter(e=>"assistant"===e.role&&"bidi"===e.metadata?.source).sort((e,t)=>{const o=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime())-o})[0];n&&(n.timestamp instanceof Date?n.timestamp.getTime():new Date(n.timestamp).getTime());const i=xe({id:r,role:"user",content:o,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}});a.some(e=>e.id===r)?(console.warn("[BIDI] appendUserTranscription: message already exists, updating instead",{messageId:r}),dt.current=r,a=a.map(e=>e.id===r?{...e,content:`${e.content||""}${o}`,isProcessing:!t}:e)):(a=[...a,i],dt.current=r)}return a.length<r?(console.error("[BIDI] appendUserTranscription: CRITICAL ERROR - losing messages!",{prevLength:r,resultLength:a.length,prevIds:e.map(e=>({id:e.id,role:e.role,content:e.content?.substring(0,30)})),resultIds:a.map(e=>({id:e.id,role:e.role,content:e.content?.substring(0,30)}))}),e):a}),t&&(dt.current=null,W(!0))},[]),qt=a((e,t=!1)=>{if(W(!1),console.log("[BIDI] appendAssistantContent called",{text:e?.substring(0,50),finished:t,currentAssistantId:ut.current,currentInputId:dt.current}),!e||"string"==typeof e&&!e.trim())return console.log("[BIDI] appendAssistantContent: skipping empty text"),void(t&&ut.current&&(He(e=>e.map(e=>e.id!==ut.current?e:{...e,isProcessing:!1})),ut.current=null,pt.current=null));const o=`${ut.current||"new"}-${e.substring(0,100)}-${t}`;if(mt.current&&bt.current===o)return;mt.current=!0,bt.current=o;const r=dt.current;if(He(o=>{const a=o.length;let n=[...o];if(console.log("[BIDI] appendAssistantContent: starting update",{prevLength:a,prevMessageIds:o.map(e=>e.id),inputMessageIdToFinalize:r,currentAssistantId:ut.current,textLength:e.length}),r){n.some(e=>e.id===r)?n=n.map(e=>e.id===r?{...e,isProcessing:!1}:e):console.warn("[BIDI] appendAssistantContent: input message not found for finalization",{inputMessageId:r,existingIds:n.map(e=>e.id)})}if(ut.current){if(n.some(e=>e.id===ut.current))n=n.map(o=>{if(o.id!==ut.current)return o;const r=`${o.content||""}${e}`;return console.log("[BIDI] appendAssistantContent: updating existing message",{messageId:o.id,oldContentLength:o.content?.length||0,newContentLength:r.length,textLength:e.length}),{...o,content:r,isProcessing:!t,...Array.isArray(yt.current)&&yt.current.length>0?{sources:yt.current}:{}}}),Array.isArray(yt.current)&&yt.current.length>0&&(yt.current=null);else{console.error("[BIDI] appendAssistantContent: ERROR - assistant message not found!",{expectedId:ut.current,existingIds:n.map(e=>e.id)});const o=`bidi-assistant-${Date.now()}`;ut.current=o;const r=xe({id:o,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(yt.current)&&yt.current.length>0&&(r.sources=yt.current,yt.current=null),n=[...n,r],console.log("[BIDI] appendAssistantContent: recreated lost assistant message",{messageId:o})}}else{const o=`bidi-assistant-${Date.now()}`,r=xe({id:o,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(yt.current)&&yt.current.length>0&&(r.sources=yt.current,yt.current=null);n.some(e=>e.id===o)?(console.error("[BIDI] appendAssistantContent: ERROR - message ID collision!",{messageId:o,existingIds:n.map(e=>e.id)}),n=n.map(r=>r.id===o?{...r,content:`${r.content||""}${e}`,isProcessing:!t,...Array.isArray(yt.current)&&yt.current.length>0?{sources:yt.current}:{}}:r),Array.isArray(yt.current)&&yt.current.length>0&&(yt.current=null),ut.current=o):(n=[...n,r],ut.current=o)}return console.log("[BIDI] appendAssistantContent: atomic state update complete",{prevLength:a,newLength:n.length,finished:t,messageIds:n.map(e=>e.id),messageRoles:n.map(e=>e.role)}),n.length<a?(console.error("[BIDI] appendAssistantContent: CRITICAL ERROR - losing messages!",{prevLength:a,resultLength:n.length,prevIds:o.map(e=>({id:e.id,role:e.role,content:e.content?.substring(0,30)})),resultIds:n.map(e=>({id:e.id,role:e.role,content:e.content?.substring(0,30)}))}),o):n}),r&&(dt.current=null),t)console.log("[BIDI] appendAssistantContent: finalizing message",{messageId:ut.current}),ut.current=null,pt.current=null;else{const e=updateKey;Promise.resolve().then(()=>{pt.current===e&&(pt.current=null)})}},[]),Wt=a((e,t=!1,o=!1)=>{if(console.log("[BIDI] handleContentParts called",{partsCount:e?.length,finished:t,audioOnly:o}),!e||!Array.isArray(e))return void console.warn("[BIDI] handleContentParts: invalid parts",e);let r="";e.forEach((e,t)=>{e.inlineData?.data&&e.inlineData.mimeType?.startsWith("audio/pcm")&&(console.log("[BIDI] handleContentParts: sending audio data to player"),at.current?at.current.port.postMessage((e=>{if("undefined"==typeof window)return new ArrayBuffer(0);let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4!=0;)t+="=";const o=window.atob(t),r=o.length,a=new Uint8Array(r);for(let e=0;e<r;e+=1)a[e]=o.charCodeAt(e);return a.buffer})(e.inlineData.data)):console.warn("[BIDI] handleContentParts: audioPlayerNodeRef is null")),!o&&e.text&&(r+=e.text,console.log("[BIDI] handleContentParts: accumulated text part",{text:e.text.substring(0,50),index:t,totalAccumulated:r.length}))}),r&&(console.log("[BIDI] handleContentParts: calling appendAssistantContent once",{textLength:r.length,finished:t}),qt(r,t))},[qt]),_t=a(()=>{W(!1),console.log("[BIDI] handleTurnComplete called",{currentAssistantId:ut.current,currentInputId:dt.current}),He(e=>{const t=e.map(e=>"bidi"===e.metadata?.source&&e.isProcessing?{...e,isProcessing:!1}:e);return console.log("[BIDI] handleTurnComplete: state update",{prevLength:e.length,newLength:t.length,finalizedCount:e.filter(e=>"bidi"===e.metadata?.source&&e.isProcessing).length}),t}),ut.current=null,dt.current=null,ft.current=!1,yt.current=null},[]),Yt=a(()=>{W(!1),at.current&&at.current.port.postMessage({command:"endOfAudio"}),ut.current=null,dt.current=null,yt.current=null,He(e=>e.map(e=>"bidi"===e.metadata?.source?{...e,isProcessing:!1,metadata:{...e.metadata,interrupted:!0}}:e))},[]),Qt=a(()=>{$e(!1),W(!1),ht.current=!1,We("idle"),Ye(null),wt.current=!1,yt.current=null,rt.current&&rt.current.readyState===WebSocket.OPEN&&rt.current.close(),rt.current=null,at.current?.disconnect(),nt.current?.close(),at.current=null,nt.current=null,it.current?.disconnect(),st.current?.close(),it.current=null,st.current=null,B(lt.current),lt.current=null,ct.current?.reset(),ct.current=null,gt.current=!1},[]),Kt=a(e=>{if(console.log("[BIDI] handleBidiEvent called",{event:e,isVoiceSessionActive:ht.current,hasTurnComplete:!!e?.turnComplete,hasInterrupted:!!e?.interrupted,hasInputTranscription:!!e?.inputTranscription,hasOutputTranscription:!!e?.outputTranscription,hasContentParts:!!e?.content?.parts}),!e)return void console.warn("[BIDI] handleBidiEvent: received null/undefined event");e.error&&(console.warn("[BIDI] voice error from backend",e.error),Ye("voiceUnavailable"));const t=e.conclusion_detected??e.conclusionDetected;if("boolean"==typeof t&&t&&(vt.current?.(),Ke(!0)),"boolean"==typeof t&&t)return Qt(),void He(e=>{const t=[...e];for(let e=t.length-1;e>=0;e--)if("assistant"===t[e].role){t[e]={...t[e],conclusionDetected:!0};break}return t});if(e.interrupted)return console.log("[BIDI] handleBidiEvent: processing interrupted"),void Yt();if(e.inputTranscription){const t=e.inputTranscription.text||"",o=Boolean(e.inputTranscription.finished);console.log("[BIDI] handleBidiEvent: processing inputTranscription",{text:t.substring(0,50),textLength:t.length,finished:o,hasText:!!t}),t||o?(we(d),Ht(t,o)):console.warn("[BIDI] handleBidiEvent: inputTranscription event has no text and not finished",e.inputTranscription)}const o=e.sources??e.Sources;if(Array.isArray(o)&&o.length>0){const e=o.map(e=>({source_type:e.source_type??e.sourceType??"file",source_id:e.source_id??e.sourceid??e.sourceId,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices})).filter(e=>e.source_id||e.url||"database"===e.source_type);if(0===e.length)return;He(t=>{const o=[...t];let r=!1;for(let t=o.length-1;t>=0;t--)if("assistant"===o[t].role){o[t]={...o[t],sources:e},r=!0;break}return r||(yt.current=e),o})}const r=e.finalTranscript??e.finaltranscript;if(r&&"string"==typeof r.text){const e=r.text;return void(e&&He(t=>{const o=[...t];for(let t=o.length-1;t>=0;t--)if("assistant"===o[t].role){o[t]={...o[t],content:e,isProcessing:!1};break}return o}))}if(wt.current||!e.outputTranscription?.text&&!e.content?.parts){if(e.outputTranscription?.text&&(ft.current=!0,qt(e.outputTranscription.text,Boolean(e.outputTranscription.finished))),e.content?.parts){const t=e.content?.finished||e.finished||!1;Wt(e.content.parts,t,ft.current)}if(e.prompts&&Array.isArray(e.prompts)&&e.prompts.length>0){console.log("[BIDI] handleBidiEvent: attaching prompts to last assistant message",{count:e.prompts.length}),He(t=>{const o=[...t];for(let t=o.length-1;t>=0;t--)if("assistant"===o[t].role){o[t]={...o[t],prompts:e.prompts};break}return o});try{ve(d,e.prompts)}catch(e){}}e.turnComplete?_t():e.interrupted||e.inputTranscription||e.outputTranscription||e.content||e.prompts||console.warn("[BIDI] handleBidiEvent: event had no recognized fields",e)}else e.turnComplete&&_t()},[qt,Ht,Wt,Yt,_t,Qt]),Gt=a(e=>{if(!ht.current)return;const t=ct.current;if(t)return void t.process(e);const o=rt.current;o&&o.readyState===WebSocket.OPEN&&o.send(e)},[]),Jt=a(async()=>{if(!gt.current&&"undefined"!=typeof window)try{const[e,t]=await async function(){if("undefined"==typeof window)throw new Error("Audio player can only be initialized in the browser");const e=new AudioContext({sampleRate:24e3}),t=new Blob(["\n class PCMPlayerProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.bufferSize = 24000 * 180;\n this.buffer = new Float32Array(this.bufferSize);\n this.writeIndex = 0;\n this.readIndex = 0;\n this.port.onmessage = (event) => {\n if (event.data?.command === 'endOfAudio') {\n this.readIndex = this.writeIndex;\n return;\n }\n const int16Samples = new Int16Array(event.data);\n this.enqueue(int16Samples);\n };\n }\n\n enqueue(samples) {\n for (let i = 0; i < samples.length; i += 1) {\n const floatVal = samples[i] / 32768;\n this.buffer[this.writeIndex] = floatVal;\n this.writeIndex = (this.writeIndex + 1) % this.bufferSize;\n if (this.writeIndex === this.readIndex) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n }\n\n process(inputs, outputs) {\n const output = outputs[0];\n const framesPerBlock = output[0].length;\n for (let frame = 0; frame < framesPerBlock; frame += 1) {\n output[0][frame] = this.buffer[this.readIndex];\n if (output.length > 1) {\n output[1][frame] = this.buffer[this.readIndex];\n }\n if (this.readIndex !== this.writeIndex) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n return true;\n }\n }\n\n registerProcessor('pcm-player-processor', PCMPlayerProcessor);\n "],{type:"application/javascript"}),o=URL.createObjectURL(t);await e.audioWorklet.addModule(o);const r=new AudioWorkletNode(e,"pcm-player-processor");return r.connect(e.destination),URL.revokeObjectURL(o),[r,e]}();at.current=e,nt.current=t,await t.resume();const o=e=>{const t=rt.current;t&&t.readyState===WebSocket.OPEN&&t.send(e)};ct.current=U({sampleRate:16e3},{onSpeechStart:()=>{at.current?.port.postMessage({command:"endOfAudio"});const e=rt.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"interrupt"}))},onVoiceFrame:o,onSpeechEnd:()=>{const e=rt.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"audio_end"}))}});const[r,a,n]=await E(Gt);it.current=r,st.current=a,lt.current=n,await a.resume(),gt.current=!0}catch(e){throw console.error("Failed to initialize audio pipeline",e),e}},[Gt]),Xt=a(()=>{if("undefined"!=typeof window&&St&&(!rt.current||rt.current.readyState!==WebSocket.OPEN)){We("connecting"),Ye(null);try{const e=new WebSocket(St);rt.current=e,e.onopen=()=>{We("connected")},e.onmessage=e=>{try{const t="string"==typeof e.data?e.data.substring(0,200):"binary";console.log("[BIDI] WebSocket message received",{dataLength:e.data?.length,dataPreview:t});const o=JSON.parse(e.data);console.log("[BIDI] WebSocket message parsed",{hasTurnComplete:!!o.turnComplete,hasInterrupted:!!o.interrupted,hasInputTranscription:!!o.inputTranscription,hasOutputTranscription:!!o.outputTranscription,hasContentParts:!!o.content?.parts,payload:o}),Kt(o)}catch(t){console.error("[BIDI] Failed to parse WebSocket event",{error:t,data:e.data})}},e.onerror=()=>{We("error"),Ye("voiceUnavailable"),W(!1)},e.onclose=()=>{rt.current=null,We("idle"),W(!1),ht.current&&setTimeout(()=>{Xt()},5e3)}}catch(e){console.error("Failed to open voice websocket",e),We("error"),Ye(te(e))}}},[Kt,St]),Zt=a(async()=>{if(m&&d){Ye(null),We(e=>"connected"===e?e:"connecting"),$e(!0),ht.current=!0,Ke(!1),wt.current=!1,He(t=>{if(t.length>0||R.length>0)return t;if(!e||""===e.trim())return[];return[xe({id:`bidi-welcome-${Date.now()}`,role:"assistant",content:Ne,metadata:{source:"bidi"}})]}),Xt();try{await Jt()}catch(e){console.error("Failed to start audio pipeline",e),Ye(te(e)),We("error")}}},[m,d,e,Ne,Xt,Jt,R]),eo=a(()=>{Oe?Qt():"connecting"!==qe&&Zt()},[Oe,Zt,Qt,qe]),to=a(e=>{const t=e.trim();if(!t)return;wt.current=!0;const o=rt.current;if(!o||o.readyState!==WebSocket.OPEN)return void Ye("voiceUnavailable");o.send(JSON.stringify({type:"text",text:t})),we(d),W(!0);const r=xe({id:`bidi-user-${Date.now()}`,role:"user",content:t,metadata:{source:"bidi"}});He(e=>[...e,r]),H("")},[]);n(()=>{ht.current=Oe},[Oe]),n(()=>()=>{rt.current&&rt.current.readyState===WebSocket.OPEN&&rt.current.close(),at.current?.disconnect(),nt.current?.close(),it.current?.disconnect(),st.current?.close(),B(lt.current),lt.current=null,gt.current=!1},[]);const oo=a(()=>{(e=>{try{const t=pe(e);localStorage.removeItem(`${le}_${e}`),t?.conversationId&&ge(e,t.conversationId)}catch{}})(d),ve(d,[]),G(null),Z(null),ae(null),ee.current=null,ne.current=null,D([]),He([]),ge(d,Ge),Pe(!1),Te(!1),Ee({}),Le(""),je(null),Be.current=!1,wt.current=!1,Pt.current=!1,zt.current=!1,tt.current=!1,et(!1),At.current=null,Xe.current&&(Xe.current.close(),Xe.current=null);const t=Se();if(be(d,t,{settingsSnapshot:JSON.stringify({value:y,unit:k?.toUpperCase()})}),Je(t),e&&""!==e.trim()&&D([{...xe({id:Date.now().toString(),role:"assistant",content:e}),isWelcome:!0}]),f){Me(w).length>0&&Pe(!0)}},[d,Ge,e,f,w,y,k]),ro=r(oo);n(()=>{ro.current=oo},[oo]),n(()=>{Tt.current=!1,Ft.current={value:null,unit:null}},[d]),n(()=>{if(!d||!y)return;const e=he(y,k);if(!e)return;const t=Ft.current,o=Tt.current&&(t.value!==y||t.unit!==k);if(Tt.current=!0,Ft.current={value:y,unit:k},o)return console.warn("[Session] Inactivity timeout config changed - resetting conversation."),Nt(!1),void ro.current();let r=null;const a=()=>{const t=pe(d);if(!t)return;if(!t.firstInteractionAt)return void(r=setTimeout(a,e));const o=new Date(t.lastActivity).getTime(),n=Date.now()-o,i=e-n;if(i<=0)return console.warn("[Session] Inactivity timeout reached! Resetting conversation immediately."),Nt(!1),void ro.current();const s=Math.max(1e4,Math.min(12e4,.1*e));Nt(i<=s);r=setTimeout(a,i<=s?1e3:i-s)};return a(),()=>{r&&clearTimeout(r)}},[d,y,k,Ge]);const ao=t(()=>i,[i]),no=t(()=>Ce(R,Ue),[Ue,R]);n(()=>{Oe&&console.log("[BIDI] bidiMessages state changed",{count:Ue.length,messages:Ue.map(e=>({id:e.id,role:e.role,contentLength:e.content?.length||0,isProcessing:e.isProcessing,hasContent:!!e.content,contentPreview:e.content?.substring(0,50)}))})},[Ue,Oe]);const io=a((e,t)=>{D(o=>o.map(o=>"assistant"===o.role&&o.content===e?{...o,feedback:t}:o))},[]);return{conversationId:Ge,isOpen:T,isMinimized:L,isDark:A,messages:no,inputValue:V,isLoading:q,isConversationLoading:De,widgetRef:Y,quickQuestions:ao,isVoiceSessionActive:Oe,voiceStatus:qe,voiceError:_e,voiceConclusionForCsat:Qe,onboardingQuestions:w,onboardingActive:ie,onboardingCompleted:ze,handleOnboardingFormSubmit:Rt,widgetFilter:K,setWidgetFilter:G,addAssistantMessage:jt,setInputValue:H,handleSend:Ot,stopGeneration:It,handleQuickQuestion:$t,sendMessage:Et,retryMessage:Bt,toggleChat:()=>{F(e=>!e),N(!1)},toggleTheme:()=>{j(e=>!e)},toggleMinimize:()=>{N(e=>!e)},closeChat:()=>{F(!1)},handleDecision:Ut,handleVoiceToggle:eo,sendBidiTextMessage:to,sessionExpiringSoon:Lt,resetConversation:oo,updateMessageFeedback:io}},ze=(...e)=>e.filter((e,t,o)=>Boolean(e)&&""!==e.trim()&&o.indexOf(e)===t).join(" ").trim(),Te=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,o)=>o?o.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};
2
- /**
3
- * @license lucide-react v0.575.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- var Fe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
9
- /**
10
- * @license lucide-react v0.575.0 - ISC
11
- *
12
- * This source code is licensed under the ISC license.
13
- * See the LICENSE file in the root directory of this source tree.
14
- */const Le=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},Ne=i(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:a="",children:n,iconNode:i,...l},c)=>s("svg",{ref:c,...Fe,width:t,height:t,stroke:e,strokeWidth:r?24*Number(o)/Number(t):o,className:ze("lucide",a),...!n&&!Le(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,t])=>s(e,t)),...Array.isArray(n)?n:[n]])),Ae=(e,t)=>{const o=i(({className:o,...r},a)=>{return s(Ne,{ref:a,iconNode:t,className:ze(`lucide-${n=Te(e),n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...r});var n});return o.displayName=Te(e),o},je=Ae("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]),Ie=Ae("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ee=Ae("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Be=Ae("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Re=Ae("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"}]]),De=Ae("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Ve=Ae("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Oe=Ae("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),$e=Ae("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Ue=Ae("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]),He=Ae("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),qe=Ae("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]),We=Ae("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),_e=Ae("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"}]]),Ye=Ae("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),Qe=Ae("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),Ke=Ae("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"}]]),Ge=Ae("thumbs-down",[["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}],["path",{d:"M17 14V2",key:"8ymqnk"}]]),Je=Ae("thumbs-up",[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]]),Xe=Ae("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ze="undefined"!=typeof window,et=new Set(["Arial","Helvetica","Times New Roman","Georgia","Courier New","Verdana","Trebuchet MS","Palatino","Garamond","Tahoma","Lucida Sans","Lucida Grande","Lucida Console","Gill Sans","Impact","Comic Sans MS","system-ui"].map(e=>e.toLowerCase())),tt=["sans-serif","serif","monospace","cursive","fantasy"],ot=new Set;
15
- /**
16
- * @license lucide-react v0.575.0 - ISC
17
- *
18
- * This source code is licensed under the ISC license.
19
- * See the LICENSE file in the root directory of this source tree.
20
- */let rt=null;function at(e){n(()=>{if(!Ze||!e)return;const t=e.split(",")[0]?.trim();if(!t||ot.has(t))return;if((e=>{const t=e.trim().toLowerCase();return!t||!!et.has(t)||tt.some(e=>t.includes(e))})(t))return void ot.add(t);let o=!0;return(async()=>{try{rt||(rt=import("./chat-widget-webfontloader-BK8fca15.esm.js").then(function(e){return e.w}));const e=await rt,r=e&&"default"in e?e.default:e,a=(e=>e.trim().replace(/\s+/g,"+"))(t);r.load({google:{families:[`${a}:300,400,500,600,700`]},fontactive:e=>{o&&ot.add(e)},fontinactive:e=>{o&&ot.add(e),console.warn(`Warning: failed to load Google Font: ${e}`)}})}catch(e){console.error("Warning: WebFont loader error:",e)}})(),()=>{o=!1}},[e])}function nt(e){return"string"==typeof e&&/^https?:\/\//i.test(e)?e:void 0}const it="__eshalChatWidgetCitationContext",st="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0,lt=st?st[it]||(st[it]=l(null)):l(null);function ct(){return import("./chat-widget-MarkdownRenderer-C3w98UxI.esm.js")}const dt=d(ct);class ut extends e.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error("[widget] markdown chunk failed to load, showing plain text:",e)}render(){return this.state.failed?this.props.fallback:this.props.children}}const gt=/(```|`[^`]+`|(^|\n)\s{0,3}#{1,6}\s|(^|\n)\s*[-*+]\s|(^|\n)\s*\d+\.\s|(^|\n)\s*>\s|\[[^\]]*\]\([^)]*\)|\*\*|__|~~|(^|\n)\s*\||\[\d+\])/;const ht=({content:e,isDark:t,textColor:o,fontFamily:r,fontSize:a})=>g("p",{className:"leading-relaxed [&:first-child]:!mt-0 whitespace-pre-wrap break-words break-all",style:{color:o||(t?"#f3f4f6":"#1A1A1A"),fontFamily:r||"Inter",fontSize:a||"14px",margin:0,lineHeight:"1.6",padding:0,overflowWrap:"anywhere"},children:e}),pt=({content:e,isStreaming:t,isDark:a=!1,isRtl:i=!1,textColor:s,fontFamily:l,fontSize:d,onButtonClick:u,provideCitations:p=!0})=>{const[m,b]=o(""),[w,f]=o(!1),v=r(e),y=r(0),k=r(null),x=r(0);n(()=>{if(e!==v.current){if(v.current=e,y.current>=e.length)return b(e),void f(!1);e.length<m.length&&(y.current=0,b(""))}if(!t)return b(e),f(!1),void(k.current&&cancelAnimationFrame(k.current));f(!0);const o=t=>{if(t-x.current<16)k.current=requestAnimationFrame(o);else if(x.current=t,y.current<e.length){const t=Math.max(2,Math.floor(4*Math.random())),r=Math.min(y.current+t,e.length);b(e.slice(0,r)),y.current=r,k.current=requestAnimationFrame(o)}else f(!1)};return k.current=requestAnimationFrame(o),()=>{k.current&&cancelAnimationFrame(k.current)}},[e,t]);const C="string"==typeof(S=m)&&0!==S.length&&gt.test(S);var S;return h("div",{className:"relative",dir:"auto",style:{textAlign:i?"right":"left",color:s||(a?"#f3f4f6":"#1A1A1A"),fontFamily:l||"Inter",fontSize:d||"14px",margin:0,padding:0},children:[C?g(ut,{fallback:g(ht,{content:m,isDark:a,textColor:s,fontFamily:l,fontSize:d}),children:g(c,{fallback:g(ht,{content:m,isDark:a,textColor:s,fontFamily:l,fontSize:d}),children:g(dt,{content:m,isStreaming:t,isDark:a,isRtl:i,textColor:s,fontFamily:l,fontSize:d,onButtonClick:u,provideCitations:p})})}):g(ht,{content:m,isDark:a,textColor:s,fontFamily:l,fontSize:d}),w&&g("span",{className:"inline-block w-1.5 h-4 bg-blue-500 ms-0.5 animate-pulse align-text-bottom",style:{animationDuration:"0.8s"}})]})},mt=({isDark:e,t:t})=>h("div",{className:"flex gap-1.5",role:"status","aria-label":t("agentIsTyping"),children:[g("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"0ms"},"aria-hidden":"true"}),g("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"150ms"},"aria-hidden":"true"}),g("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"300ms"},"aria-hidden":"true"})]}),bt=({question:e,options:t,onDecision:o,disabled:r,isDark:a=!1})=>h("div",{className:"mt-3 p-3 rounded-lg border "+(a?"bg-blue-900/30 border-blue-700/50":"bg-blue-50 border-blue-200"),children:[g("p",{className:"text-sm font-medium mb-2 "+(a?"text-gray-100":"text-gray-900"),children:e}),g("div",{className:"space-y-2",children:t.map(e=>g("button",{onClick:()=>o(e.id,e.label),disabled:r,className:"w-full text-left px-3 py-2 text-sm rounded transition-all "+(a?"bg-gray-800 border border-gray-700 hover:bg-blue-900/50 hover:border-blue-600 disabled:opacity-50 disabled:cursor-not-allowed":"bg-white border border-gray-300 hover:bg-blue-50 hover:border-blue-400 disabled:opacity-50 disabled:cursor-not-allowed"),children:e.label},e.id))})]});function wt({content:e,isDark:t}){const[r,n]=o(!1),i=a(()=>{e&&(navigator.clipboard?.writeText(e).catch(()=>{}),n(!0),setTimeout(()=>n(!1),1500))},[e]);return g("button",{type:"button",onClick:i,className:"p-0.5 rounded transition-colors "+(t?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":r?"Copied":"Copy message",title:r?"Copied":"Copy message",children:r?g(Ie,{className:"w-3 h-3 text-green-500"}):g(De,{className:"w-3 h-3"})})}const ft=({message:t,formatTime:n,isDark:i,primaryColor:s,agentMessageBubbleColor:l,resolvedAgentBubbleColor:c,textColor:d,assistantTextColor:u,fontFamily:m,agentMessageBubbleFontFamily:b,agentMessageBubbleFontSize:w,fontSize:f,isRtl:v,onDecision:y,companyLogo:k,conciergeName:x,companyName:C,apiBaseUrl:S,getAuthToken:M,onPromptSuggestionClick:P,allowFeedback:z=!0,provideCitations:T=!0,onFeedback:F,headerTextColor:L,t:N})=>{const A="string"==typeof t.content?t.content:"",j=t.isProcessing&&(!A||0===A.length),I=J(A,v),[E,B]=o(()=>t?.feedback??null),[R,D]=o(!1),[V,O]=o(null),[$,U]=o(""),H=r(null),q=a(e=>{if(F&&A){if(E===e)return B(null),D(!1),O(null),U(""),void F(A,null);if("like"===e)return B("like"),D(!1),O(null),U(""),void F(A,"like");B(null),O("dislike"),D(!0),U(""),setTimeout(()=>H.current?.focus(),100)}},[E,F,A]),W=a(()=>{F&&A&&V&&(B(V),F(A,V,$.trim()||void 0),D(!1),U(""),O(null))},[F,A,V,$]),_=a(()=>{D(!1),U(""),O(null)},[]),Y=!0===t?.isError,Q=Y?i?"rgba(239,68,68,0.15)":"#fee2e2":null!=c?c:null!=l?l:i?"#1f2937":"#FFFFFF",K=null!=l&&"#ffffff"!==l&&"#FFFFFF"!==l&&"#1f2937"!==l,G=Y?i?"#fca5a5":"#991b1b":null!=u?u:null!=d?d:i?"#f3f4f6":"#1A1A1A",X=null!=b?b:null!=m?m:"Inter",Z=null!=w?w:null!=f?f:"14px";at(X);const{onSourceActivate:ee,downloadingKey:te}=function({apiBaseUrl:t,getAuthToken:o}){const[r,a]=e.useState(null);return{onSourceActivate:e.useCallback(async e=>{if(!e)return;const r=e.url||e.source_id||e.sourceid||e.source_name||"",n=String(e.source_id||e.sourceid||"").startsWith("attachment:"),i="string"==typeof e.url&&e.url.includes("/api/v1/sharepoint/file/"),s="file"===e.source_type||i||n||!(!e.source_id&&!e.sourceid)&&!e.url;if(!s){const t=nt(e.url);if(t)try{window.open(t,"_blank","noopener,noreferrer")}catch{}return}if(t||n){a(r),console.debug("[widget] citation download starting:",{source_id:e.source_id||e.sourceid,source_name:e.source_name,source_type:e.source_type,isAttachment:n,isSharePointProxy:i,isFileLike:s});try{let r;if(n){if(!e.url)throw new Error("attachment has no URL");const t={};if("function"==typeof o){const e=await o();e&&(t.Authorization=`Bearer ${e}`)}r=await fetch(e.url,{method:"GET",headers:t,credentials:"include"})}else if(i){const a=e.url.startsWith("http")?e.url:`${t.replace(/\/$/,"")}${e.url}`,n={};if("function"==typeof o){const e=await o();e&&(n.Authorization=`Bearer ${e}`)}r=await fetch(a,{method:"GET",headers:n,credentials:"include"})}else{const a=`${t.replace(/\/$/,"")}/api/v1/support/file-download`,n={"Content-Type":"application/json"};if("function"==typeof o){const e=await o();e&&(n.Authorization=`Bearer ${e}`)}r=await fetch(a,{method:"POST",headers:n,credentials:"include",body:JSON.stringify({source_id:e.source_id||e.sourceid,file_name:e.url||"",source_name:e.source_name||""})})}if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.details||e.error||r.statusText)}const a=await r.blob(),s=r.headers.get("content-disposition");let l=e.source_name||"download";if(!n){const e=s&&/filename\*?=(?:UTF-8'')?["']?([^"'\s;]+)["']?/i.exec(s);if(e)try{l=decodeURIComponent(e[1].replace(/\\"/g,'"'))}catch{}}const c=document.createElement("a"),d=URL.createObjectURL(a);c.href=d,c.download=l,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(d)}catch(e){console.error("[widget] source download failed:",e)}finally{a(null)}}else console.warn("[widget] citation download skipped: apiBaseUrl missing and source is not an attachment (no fallback URL to fetch). Source:",e)},[t,o]),downloadingKey:r}}({apiBaseUrl:S,getAuthToken:M}),oe=e.useMemo(()=>({sources:t.sources||[],sourcesPreliminary:!!t.sourcesPreliminary,onSourceActivate:ee,downloadingKey:te,textColor:G}),[t.sources,t.sourcesPreliminary,ee,te,G]);return g(lt.Provider,{value:oe,children:h("div",{className:"flex gap-3 flex-row animate-in min-w-0",children:[g("div",{className:"flex-shrink-0 mt-1",children:g("div",{className:"w-8 h-8 rounded-full overflow-hidden flex items-center justify-center",style:{backgroundColor:s||"#2563eb"},children:g("div",k?{className:"w-full h-full bg-white/10 flex items-center justify-center",children:g("img",{src:k,alt:x||C||"Assistant avatar",className:"object-cover rounded-full",style:{maxWidth:"100%",maxHeight:"100%"}})}:{className:"w-full h-full flex items-center justify-center",style:{fontSize:"18px",fontFamily:m||"Inter",color:L||"#FFFFFF"},children:(x||"A").charAt(0).toUpperCase()})})}),h("div",{className:"flex flex-col items-start min-w-0 max-w-[75%]",children:[g("div",{className:"rounded-2xl px-4 py-2.5 shadow-sm border rounded-tl-sm rtl:rounded-tl-2xl rtl:rounded-tr-sm min-w-0 max-w-full overflow-hidden "+(K?"border-transparent":i?"border-gray-700":"border-gray-200"),style:{backgroundColor:Q,color:G,fontFamily:X,fontSize:Z,direction:I?"rtl":"ltr",textAlign:I?"right":"left",...K?{borderColor:`${Q}33`}:{}},children:j?g(mt,{isDark:i,t:N}):g(p,{children:t.requiresDecision&&t.decisionData&&y?h("div",{children:[A&&g("div",{className:"mb-3",children:g(pt,{content:A,isStreaming:t.isProcessing,isDark:i,isRtl:I,textColor:G,fontFamily:X,fontSize:Z,onButtonClick:P,provideCitations:T})}),g(bt,{question:t.decisionData.question,options:t.decisionData.options,onDecision:(e,o)=>y(t.decisionData.decisionId,e,o),disabled:!!t.decisionResponse,isDark:i}),t.decisionResponse&&h("div",{className:"mt-2 text-xs "+(i?"text-gray-400":"text-gray-500"),children:["Selected: ",t.decisionResponse.selectedOption]})]}):A?g(p,{children:g(pt,{content:A,isStreaming:t.isProcessing,isDark:i,isRtl:I,textColor:G,fontFamily:X,fontSize:Z,onButtonClick:P,provideCitations:T})}):null})}),h("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[g("p",{className:"text-xs leading-none "+(i?"text-gray-400":"text-gray-500"),dir:"auto",children:n(t.timestamp)}),!j&&!t.isProcessing&&A&&g(wt,{content:A,isDark:i}),!1!==z&&F&&!j&&!t.isProcessing&&A&&"welcome"!==t.type&&!t.isWelcome&&h("div",{className:"flex items-center gap-0.5 ms-0.5",children:[g("button",{type:"button",onClick:()=>q("like"),className:"p-0.5 rounded transition-colors "+("like"===E||"like"===V?"text-green-500":i?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Like",children:g(Je,{className:"w-3 h-3"})}),g("button",{type:"button",onClick:()=>q("dislike"),className:"p-0.5 rounded transition-colors "+("dislike"===E||"dislike"===V?"text-red-500":i?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Dislike",children:g(Ge,{className:"w-3 h-3"})})]})]}),R&&"dislike"===V&&h("div",{className:"mt-2 w-full rounded-xl border p-3 shadow "+(i?"bg-gray-800 border-gray-700":"bg-white border-gray-200"),style:{direction:v?"rtl":"ltr"},children:[g("textarea",{ref:H,value:$,onChange:e=>U(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key?(e.preventDefault(),W()):"Escape"===e.key&&(e.preventDefault(),_())},placeholder:N("feedbackPlaceholder"),"aria-label":N("feedbackPlaceholder"),rows:2,className:"w-full resize-none rounded-lg border px-2 py-1.5 text-xs focus:outline-none focus:ring-1 "+(i?"bg-gray-900 border-gray-700 text-gray-100 placeholder-gray-500 focus:ring-gray-600":"bg-white border-gray-200 text-gray-900 placeholder-gray-400 focus:ring-gray-300"),style:{fontFamily:X,textAlign:v?"right":"left"}}),h("div",{className:"flex items-center justify-end gap-1.5 mt-1.5",children:[g("button",{type:"button",onClick:_,className:"text-xs px-2 py-1 rounded transition-colors "+(i?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),style:{border:"none",background:"transparent",cursor:"pointer"},children:N("cancel")}),g("button",{type:"button",onClick:W,className:"text-xs px-2.5 py-1 rounded text-white transition-opacity hover:opacity-90",style:{backgroundColor:s||"#2563eb",border:"none",cursor:"pointer"},children:N("submit")})]})]})]})]})})},vt=({message:e,formatTime:t,userMessageBoxColor:o,primaryColor:r,resolvedUserMessageColor:a,textColor:n,userTextColor:i,fontFamily:s,userMessageBubbleFontFamily:l,userMessageBubbleFontSize:c,fontSize:d,isDark:u,isRtl:p,t:m,onRetryMessage:b})=>{const w=null!=a?a:null!=o?o:null!=r?r:"#2563eb",f=null!=i?i:null!=n?n:"#FFFFFF",v=null!=l?l:null!=s?s:"Inter",y=null!=c?c:null!=d?d:"14px",k=J("string"==typeof e?.content?e.content:"",p);at(v);const x=Array.isArray(e.attachments)?e.attachments:[];return g("div",{className:"flex gap-3 flex-row-reverse animate-in",children:h("div",{className:"flex flex-col items-end max-w-[75%]",children:[x.length>0&&g("div",{className:"mb-1.5 flex flex-wrap justify-end gap-1.5",children:x.map((e,t)=>String(e.mimeType||"").startsWith("image/")&&e.url?g("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"block rounded-md overflow-hidden",style:{maxWidth:160},title:e.filename,children:g("img",{src:e.url,alt:e.filename||"attachment",style:{maxWidth:160,maxHeight:160,display:"block"}})},e.storageKey||t):h("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs",style:{backgroundColor:u?"#1f2937":"#f3f4f6",color:u?"#e5e7eb":"#374151",border:"1px solid "+(u?"#374151":"#e5e7eb"),maxWidth:200},title:e.filename,children:[g(Oe,{size:12}),g("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename})]},e.storageKey||t))}),e.content&&""!==e.content.trim()&&g("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg "+(k?"rounded-tl-sm":"rounded-tr-sm"),dir:"auto",style:{background:`linear-gradient(135deg, ${w} 0%, ${w}dd 100%)`,fontFamily:v,direction:k?"rtl":"ltr",textAlign:k?"right":"left"},children:g("p",{className:"whitespace-pre-wrap break-words break-all",dir:"auto",style:{color:f,fontFamily:v,fontSize:y,lineHeight:"1.5",textAlign:k?"right":"left",overflowWrap:"anywhere",margin:0,padding:0},children:e.content})}),h("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[g("p",{className:"text-xs leading-none "+(u?"text-gray-400":"text-gray-500"),dir:"auto",children:t(e.timestamp)}),e.content&&""!==e.content.trim()&&g(wt,{content:e.content,isDark:u})]}),"failed"===e.status&&h("div",{className:"flex items-center gap-1.5 mt-1 px-1","data-testid":"message-failed-state",children:[g("span",{className:"text-xs leading-none",style:{color:"#dc2626"},dir:"auto",children:m("messageNotDelivered")}),"function"==typeof b&&g("button",{type:"button",onClick:()=>b(e),className:"text-xs leading-none font-medium underline",style:{color:"#dc2626"},dir:"auto",children:m("retrySend")})]})]})})},yt=({message:e,isDark:o,primaryColor:r,agentMessageBubbleColor:a,userMessageBoxColor:n,resolvedUserMessageColor:i,resolvedAgentBubbleColor:s,textColor:l,assistantTextColor:c,userTextColor:d,fontFamily:u,agentMessageBubbleFontFamily:h,agentMessageBubbleFontSize:p,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:b,fontSize:w,formatTime:f,isRtl:v,onDecision:y,companyLogo:k,conciergeName:x,companyName:C,apiBaseUrl:S,getAuthToken:M,onPromptSuggestionClick:P,allowFeedback:z,provideCitations:T,onFeedback:F,headerTextColor:L,onRetryMessage:N,defaultLanguage:A="en"})=>{const j=t(()=>X(A),[A]);return e?"user"===e.role?g(vt,{message:e,formatTime:f,userMessageBoxColor:n,primaryColor:r,resolvedUserMessageColor:i,textColor:l,userTextColor:d,fontFamily:u,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:b,fontSize:w,isDark:o,isRtl:v,t:j,onRetryMessage:N}):g(ft,{message:e,formatTime:f,isDark:o,primaryColor:r,agentMessageBubbleColor:a,resolvedAgentBubbleColor:s,textColor:l,assistantTextColor:c,fontFamily:u,agentMessageBubbleFontFamily:h,agentMessageBubbleFontSize:p,fontSize:w,isRtl:v,onDecision:y,companyLogo:k,conciergeName:x,companyName:C,apiBaseUrl:S,getAuthToken:M,onPromptSuggestionClick:P,allowFeedback:z,provideCitations:T,onFeedback:F,headerTextColor:L,t:j}):null};var kt=e.memo(yt);const xt=(e,t,o)=>Number.isNaN(e)?t:Math.min(Math.max(e,t),o),Ct=e=>{if(!e)return null;const t=(e=>e?.trim().toLowerCase()??"")(e),o=(e=>{const t=e.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i);if(!t)return null;let o=t[1];3===o.length&&(o=o.split("").map(e=>`${e}${e}`).join(""));const r=parseInt(o.slice(0,2),16),a=parseInt(o.slice(2,4),16),n=parseInt(o.slice(4,6),16);return[r,a,n].some(e=>Number.isNaN(e))?null:{r:r,g:a,b:n}})(t);if(o)return o;const r=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)$/i);return t?{r:xt(Number.parseInt(t[1],10),0,255),g:xt(Number.parseInt(t[2],10),0,255),b:xt(Number.parseInt(t[3],10),0,255)}:null})(t);return r||null},St=({r:e,g:t,b:o})=>{const r=e=>{const t=xt(Math.round(e),0,255).toString(16);return 1===t.length?`0${t}`:t};return`#${r(e)}${r(t)}${r(o)}`},Mt=(e,t,o)=>{const r=xt(o,0,1);return{r:Math.round(e.r+(t.r-e.r)*r),g:Math.round(e.g+(t.g-e.g)*r),b:Math.round(e.b+(t.b-e.b)*r)}},Pt=(e,t)=>{const o=xt(t,0,1);return`rgba(${xt(Math.round(e.r),0,255)}, ${xt(Math.round(e.g),0,255)}, ${xt(Math.round(e.b),0,255)}, ${o})`},zt={background:"#f8fafc",hoverBackground:"#f1f5f9",border:"#e2e8f0",hoverBorder:"#cbd5f5",shadow:"0 4px 12px rgba(15, 23, 42, 0.08)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.14)"},Tt={background:"#1f2937",hoverBackground:"#27364a",border:"#334155",hoverBorder:"#3b4c63",shadow:"0 4px 12px rgba(15, 23, 42, 0.45)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.55)"},Ft=(e,t)=>{const o=Ct(e);if(!o)return(e=>e?Tt:zt)(t);const r=(({r:e,g:t,b:o})=>{const r=[e,t,o].map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*r[0]+.7152*r[1]+.0722*r[2]})(o),a=Ct("#0f172a")??{r:15,g:23,b:42},n=Ct(t?"#f8fafc":"#f9fafb")??{r:249,g:250,b:251},i=Ct(t?"#334155":"#e2e8f0")??{r:226,g:232,b:240};let s,l;if(r>=.6){const e=t?.5:.7,r=Math.min(1,e+.15);s=Mt(o,a,e),l=Mt(o,a,r)}else if(r<=.35){const e=t?.9:.8,r=Math.min(1,e+(t?.05:.12));s=Mt(o,n,e),l=Mt(o,n,r)}else{const e=t?.45:.6,r=Math.min(1,e+.1);s=Mt(o,i,e),l=Mt(o,i,r)}const c=Mt(o,s,.65),d=Mt(o,l,.7),u=`0 4px 12px ${Pt(o,t?.28:.12)}`,g=`0 6px 20px ${Pt(o,t?.35:.18)}`;return{background:St(s),hoverBackground:St(l),border:St(c),hoverBorder:St(d),shadow:u,hoverShadow:g}},Lt=({questions:e,isDark:t,palette:i,resolvedTextColor:s,fontFamily:l,fontSize:c,isRtl:d,onQuestionClick:u,applyHoverState:p,headingLabel:m})=>{const b=r(null),[w,f]=o(!1),[v,y]=o(!1),k=a(()=>{const e=b.current;if(!e)return;const{scrollLeft:t,scrollWidth:o,clientWidth:r}=e;f(Math.abs(t)>1),y(Math.abs(t)+r<o-1)},[]);n(()=>{k();const e=b.current;if(!e)return;const t=new ResizeObserver(k);return t.observe(e),()=>t.disconnect()},[k,e]);const x=a(e=>{const t=b.current;if(!t)return;const o="left"===e?-150:150;t.scrollBy({left:d?-o:o,behavior:"smooth"})},[d]),C=t?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.85)",S=t?"#e5e7eb":"#374151",M=t?"#4b5563":"#d1d5db";return h("div",{className:"px-4 py-4 border-t "+(t?"border-gray-700/50":"border-gray-200/60"),children:[h("div",{className:"text-xs mb-3 font-semibold tracking-wide uppercase "+(t?"text-gray-400":"text-gray-500"),children:[m||"Quick questions",":"]}),h("div",{className:"flex items-center gap-1.5",children:[g("button",{onClick:()=>x("left"),disabled:!w,"aria-label":"Scroll left",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:C,border:`1px solid ${M}`,color:S,backdropFilter:"blur(4px)",opacity:w?1:.35,cursor:w?"pointer":"default"},children:g(Ee,{size:16})}),g("div",{ref:b,onScroll:k,className:"flex-1 flex gap-3 overflow-x-auto pb-2",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map((e,t)=>{const o=J(e,d);return h("button",{onClick:()=>u?.(e),className:"group relative text-sm px-5 py-2.5 rounded-full font-medium transition-all duration-300 hover:scale-105 active:scale-95 whitespace-nowrap flex-shrink-0 overflow-hidden backdrop-blur-sm "+(o?"text-right":"text-left"),style:{direction:o?"rtl":"ltr",backgroundColor:i.background,border:`1.5px solid ${i.border}`,boxShadow:i.shadow},onMouseEnter:e=>{p(e.currentTarget,!0),e.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:e=>{p(e.currentTarget,!1),e.currentTarget.style.transform="translateY(0)"},children:[g("div",{className:"absolute inset-0 bg-gradient-to-br from-white/0 via-white/5 to-white/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-xl"}),g("span",{className:"relative z-10",style:{direction:o?"rtl":"ltr",color:s,fontFamily:l,fontSize:c,textAlign:o?"right":"left"},children:e})]},t)})}),g("button",{onClick:()=>x("right"),disabled:!v,"aria-label":"Scroll right",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:C,border:`1px solid ${M}`,color:S,backdropFilter:"blur(4px)",opacity:v?1:.35,cursor:v?"pointer":"default"},children:g(Be,{size:16})})]})]})},Nt=({questions:e=[],isDark:o=!1,primaryColor:r="#2563eb",onQuestionClick:a,isTyping:n=!1,layout:i="vertical",fontFamily:s="Inter",fontSize:l="14px",textColor:c,isRtl:d=!1,questionTextColor:u,questionBoxColor:p,headingLabel:m})=>{if(!e.length||n)return null;const b=u??c??(o?"#f3f4f6":"#111827"),w=t(()=>Ft(b,o),[b,o]);return"horizontal"===i?g(Lt,{questions:e,isDark:o,palette:w,resolvedTextColor:b,fontFamily:s,fontSize:l,isRtl:d,onQuestionClick:a,applyHoverState:(e,t)=>{e.style.backgroundColor=t?w.hoverBackground:w.background,e.style.borderColor=t?w.hoverBorder:w.border,e.style.boxShadow=t?w.hoverShadow:w.shadow},headingLabel:m}):h("div",{style:{paddingInlineStart:"50px"},children:[m?g("div",{className:"mb-2",style:{color:o?"#9ca3af":"#6b7280",fontFamily:s,fontSize:`calc(${l} - 1px)`},children:m}):null,g("div",{className:"flex flex-wrap gap-2",children:e.map((e,t)=>{const n=J(e,d);return g("button",{onClick:()=>a?.(e),className:"transition-all duration-200 active:scale-[0.97]",style:{direction:n?"rtl":"ltr",fontFamily:s,fontSize:l,color:r,backgroundColor:o?"transparent":"#ffffff",border:`1.5px solid ${r}`,borderRadius:"9999px",padding:"5px 14px",fontWeight:500,lineHeight:"1.4",whiteSpace:"normal",textAlign:n?"right":"left"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`${r}14`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=o?"transparent":"#ffffff"},children:e},t)})})]})},At=({active:e=!1,processing:t=!1,deviceId:o,barWidth:a=3,barGap:i=1,barRadius:s=1.5,barColor:l,fadeEdges:c=!0,fadeWidth:d=24,barHeight:u=4,height:p=64,sensitivity:m=1,smoothingTimeConstant:b=.8,fftSize:w=256,historySize:f=60,updateRate:v=30,mode:y="static",onError:k,onStreamReady:x,onStreamEnd:C,className:S,...M})=>{const P=r(null),z=r(null),T=r([]),F=r(null),L=r(null),N=r(null),A=r(0),j=r(0),I=r(null),E=r([]),B=r(0),R=r([]),D=r(!0),V=r(null),O=r(0),$="number"==typeof p?`${p}px`:p;return n(()=>{const e=P.current,t=z.current;if(!e||!t)return;const o=new ResizeObserver(()=>{const o=t.getBoundingClientRect(),r=window.devicePixelRatio||1;e.width=o.width*r,e.height=o.height*r,e.style.width=`${o.width}px`,e.style.height=`${o.height}px`;const a=e.getContext("2d");a&&a.scale(r,r),V.current=null,O.current=o.width,D.current=!0});return o.observe(t),()=>o.disconnect()},[]),n(()=>{if(t&&!e){let e=0;B.current=0;const t=()=>{e+=.03,B.current=Math.min(1,B.current+.02);const o=[],r=Math.floor((z.current?.getBoundingClientRect().width||200)/(a+i));if("static"===y){const t=Math.floor(r/2);for(let a=0;a<r;a++){const r=(a-t)/t,n=1-.4*Math.abs(r),i=(.2+(.25*Math.sin(1.5*e+3*r)+.2*Math.sin(.8*e-2*r)+.15*Math.cos(2*e+r)))*n;let s=i;if(E.current.length>0&&B.current<1){const e=Math.min(a,E.current.length-1);s=(E.current[e]||0)*(1-B.current)+i*B.current}o.push(Math.max(.05,Math.min(1,s)))}}else for(let t=0;t<r;t++){const a=(t-r/2)/(r/2),n=1-.4*Math.abs(a),i=(.2+(.25*Math.sin(1.5*e+.15*t)+.2*Math.sin(.8*e-.1*t)+.15*Math.cos(2*e+.05*t)))*n;let s=i;if(E.current.length>0&&B.current<1){const e=Math.floor(t/r*E.current.length);s=(E.current[e]||0)*(1-B.current)+i*B.current}o.push(Math.max(.05,Math.min(1,s)))}"static"===y?R.current=o:T.current=o,D.current=!0,I.current=requestAnimationFrame(t)};return t(),()=>{I.current&&cancelAnimationFrame(I.current)}}if(!e&&!t){if("static"===y?R.current.length>0:T.current.length>0){let e=0;const t=()=>{e+=.03,e<1?("static"===y?R.current=R.current.map(t=>t*(1-e)):T.current=T.current.map(t=>t*(1-e)),D.current=!0,requestAnimationFrame(t)):"static"===y?R.current=[]:T.current=[]};t()}}},[t,e,a,i,y]),n(()=>{if(!e)return N.current&&(N.current.getTracks().forEach(e=>e.stop()),N.current=null,C?.()),L.current&&"closed"!==L.current.state&&(L.current.close(),L.current=null),void(A.current&&(cancelAnimationFrame(A.current),A.current=0));return(async()=>{try{const e=await navigator.mediaDevices.getUserMedia({audio:o?{deviceId:{exact:o},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});N.current=e,x?.(e);const t=new(window.AudioContext||window.webkitAudioContext),r=t.createAnalyser();r.fftSize=w,r.smoothingTimeConstant=b;t.createMediaStreamSource(e).connect(r),L.current=t,F.current=r,T.current=[]}catch(e){k?.(e)}})(),()=>{N.current&&(N.current.getTracks().forEach(e=>e.stop()),N.current=null,C?.()),L.current&&"closed"!==L.current.state&&(L.current.close(),L.current=null),A.current&&(cancelAnimationFrame(A.current),A.current=0)}},[e,o,w,b,k,x,C]),n(()=>{const o=P.current;if(!o)return;const r=o.getContext("2d");if(!r)return;let n;const g=h=>{const p=o.getBoundingClientRect();if(e&&h-j.current>v&&(j.current=h,F.current)){const e=new Uint8Array(F.current.frequencyBinCount);if(F.current.getByteFrequencyData(e),"static"===y){const t=Math.floor(.05*e.length),o=Math.floor(.4*e.length),r=e.slice(t,o),n=Math.floor(p.width/(a+i)),s=Math.floor(n/2),l=[];for(let e=s-1;e>=0;e--){const t=Math.floor(e/s*r.length),o=Math.min(1,r[t]/255*m);l.push(Math.max(.05,o))}for(let e=0;e<s;e++){const t=Math.floor(e/s*r.length),o=Math.min(1,r[t]/255*m);l.push(Math.max(.05,o))}R.current=l,E.current=l}else{let t=0;const o=Math.floor(.05*e.length),r=Math.floor(.4*e.length),a=e.slice(o,r);for(let e=0;e<a.length;e++)t+=a[e];const n=t/a.length/255*m;T.current.push(Math.min(1,Math.max(.05,n))),E.current=[...T.current],T.current.length>f&&T.current.shift()}D.current=!0}if(!D.current&&!e)return void(n=requestAnimationFrame(g));D.current=e,r.clearRect(0,0,p.width,p.height);const b=l||getComputedStyle(o).color||"#000",w=a+i,k=Math.floor(p.width/w),x=p.height/2;if("static"===y){const o=t||e||R.current.length>0?R.current:[];for(let e=0;e<k&&e<o.length;e++){const t=o[e]||.1,n=e*w,i=Math.max(u,t*p.height*.8),l=x-i/2;r.fillStyle=b,r.globalAlpha=.4+.6*t,s>0?(r.beginPath(),r.roundRect(n,l,a,i,s),r.fill()):r.fillRect(n,l,a,i)}}else for(let e=0;e<k&&e<T.current.length;e++){const t=T.current.length-1-e,o=T.current[t]||.1,n=p.width-(e+1)*w,i=Math.max(u,o*p.height*.8),l=x-i/2;r.fillStyle=b,r.globalAlpha=.4+.6*o,s>0?(r.beginPath(),r.roundRect(n,l,a,i,s),r.fill()):r.fillRect(n,l,a,i)}if(c&&d>0&&p.width>0){if(!V.current||O.current!==p.width){const e=r.createLinearGradient(0,0,p.width,0),t=Math.min(.3,d/p.width);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(t,"rgba(255,255,255,0)"),e.addColorStop(1-t,"rgba(255,255,255,0)"),e.addColorStop(1,"rgba(255,255,255,1)"),V.current=e,O.current=p.width}r.globalCompositeOperation="destination-out",r.fillStyle=V.current,r.fillRect(0,0,p.width,p.height),r.globalCompositeOperation="source-over"}r.globalAlpha=1,n=requestAnimationFrame(g)};return n=requestAnimationFrame(g),()=>{n&&cancelAnimationFrame(n)}},[e,t,m,v,f,a,u,i,s,l,c,d,y]),h("div",{className:ne("relative h-full w-full",S),ref:z,style:{height:$},"aria-label":e?"Live audio waveform":t?"Processing audio":"Audio waveform idle",role:"img",...M,children:[!e&&!t&&g("div",{className:"border-muted-foreground/20 absolute top-1/2 right-0 left-0 -translate-y-1/2 border-t-2 border-dotted"}),g("canvas",{className:"block h-full w-full",ref:P,"aria-hidden":"true"})]})},jt=({messages:e=[],isDark:o,primaryColor:i,isLoading:s,agentMessageBubbleColor:l,userMessageBoxColor:c,textColor:d,assistantTextColor:u,userTextColor:m,fontFamily:b,agentMessageBubbleFontFamily:w,agentMessageBubbleFontSize:f,userMessageBubbleFontFamily:v,userMessageBubbleFontSize:y,fontSize:k,formatTime:x,isRtl:C=!1,defaultLanguage:S="en",quickQuestions:M=[],shouldShowQuickQuestions:z=!1,onQuickQuestion:T,quickQuestionsLayout:F="vertical",onDecision:L,disclaimerEnabled:N=!1,disclaimerText:A,disclaimerPosition:j="top",disclaimerLinkUrl:I,disclaimerLinkLabel:E,resolvedAgentBubbleColor:B,resolvedUserMessageColor:R,resolvedTextColor:D,isVoiceSessionActive:V=!1,voiceStatus:O="idle",messagesContainerRef:$,companyLogo:U,chatbotAvatarEnabled:H,chatbotAvatar:q,conciergeName:W,companyName:_,apiBaseUrl:Y,getAuthToken:Q,onPromptSuggestionClick:K,conversationResetKey:G,allowFeedback:X,provideCitations:Z,onFeedback:ee,headerTextColor:te,onRetryMessage:oe,beforePromptsSlot:re=null,promptsSlot:ne=null,quickQuestionsHeadingLabel:ie})=>{const se=r(null),le=r(!0),ce=r(!1),de=t(()=>e.map(e=>`${e.id}:${e.content?.length??0}:${e.isProcessing?1:0}`).join("|"),[e]),ue=a(()=>{const e=$?.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight;le.current=t<160},[$]);n(()=>{const e=$?.current;if(e)return e.addEventListener("scroll",ue,{passive:!0}),ue(),()=>{e.removeEventListener("scroll",ue)}},[ue,$]),n(()=>{G&&(le.current=!0,ce.current=!1)},[G]),n(()=>{if(ce.current||0===e.length||"undefined"==typeof window)return;ce.current=!0;let t,o=!1;const r=window.requestAnimationFrame(()=>{o||(t=window.requestAnimationFrame(()=>{o||(se.current?.scrollIntoView({behavior:"instant",block:"end"}),le.current=!0)}))});return()=>{o=!0,window.cancelAnimationFrame(r),window.cancelAnimationFrame(t)}},[0===e.length]),n(()=>{if(!le.current)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||se.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[de,s]),n(()=>{if(!V||"connected"!==O)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||se.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[V,O]);const ge=t(()=>ae(I),[I]),he=t(()=>J(A,C),[A,C]);return h(p,{children:[N&&A&&"top"===j&&g("div",{className:"flex justify-center",children:g("div",{className:"rounded-lg px-2 py-1 ",style:{color:o?"#d1d5db":"#6b7280",fontFamily:null!=b?b:"Inter",fontSize:null!=k?`calc(${k} - 2px)`:"12px",direction:he?"rtl":"ltr",textAlign:"center",borderColor:o?"#374151":"#e5e7eb"},children:h("p",{className:"leading-relaxed whitespace-pre-wrap break-words inline",dir:he?"rtl":"ltr",style:{color:o?"#d1d5db":"#6b7280",fontFamily:null!=b?b:"Inter",fontSize:null!=k?`calc(${k} - 2px)`:"12px"},children:[A,ge&&E&&g("a",{href:ge,target:"_blank",rel:"noopener noreferrer",title:ge,style:{color:o?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:E})]})})}),e.map(e=>g(kt,{message:e,isDark:o,primaryColor:i,agentMessageBubbleColor:l,userMessageBoxColor:c,resolvedUserMessageColor:R,resolvedAgentBubbleColor:B,textColor:d,assistantTextColor:u,userTextColor:m,fontFamily:b,agentMessageBubbleFontFamily:w,agentMessageBubbleFontSize:f,userMessageBubbleFontFamily:v,userMessageBubbleFontSize:y,fontSize:k,formatTime:x,isRtl:J(e.content,C),onDecision:L,onPromptSuggestionClick:K,companyLogo:H&&q?q:U,conciergeName:W,companyName:_,apiBaseUrl:Y,getAuthToken:Q,allowFeedback:X,provideCitations:Z,onFeedback:ee,headerTextColor:te,onRetryMessage:oe,defaultLanguage:S},e.id)),(()=>{const t=e[e.length-1],r=s&&"user"===t?.role,a=e.some(e=>"assistant"===e.role&&(e.isProcessing||!e.content));return r&&!a?g(kt,{message:P(),isDark:o,primaryColor:i,agentMessageBubbleColor:l,resolvedAgentBubbleColor:B,userMessageBoxColor:c,textColor:d,assistantTextColor:u,userTextColor:m,fontFamily:b,agentMessageBubbleFontFamily:w,agentMessageBubbleFontSize:f,userMessageBubbleFontFamily:v,userMessageBubbleFontSize:y,fontSize:k,formatTime:x,isRtl:C,onDecision:L,companyLogo:H&&q?q:U,conciergeName:W,companyName:_,apiBaseUrl:Y,getAuthToken:Q,headerTextColor:te,defaultLanguage:S},"skeleton-waiting"):null})(),re,ne?g("div",{className:"pt-1",children:ne}):z&&M.length>0&&g("div",{className:"pt-1",children:g(Nt,{questions:M,isDark:o,primaryColor:i,onQuestionClick:T,isTyping:s,layout:F,fontFamily:b,fontSize:k,textColor:d,isRtl:C,questionTextColor:u,questionBoxColor:l,headingLabel:ie})}),V&&"connected"===O&&!s&&g("div",{className:"flex gap-3 flex-row-reverse animate-in",children:g("div",{className:"flex flex-col items-end max-w-[75%] w-full",children:h("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg rounded-tr-sm w-full",style:{background:`linear-gradient(135deg, ${R||i||"#2563eb"} 0%, ${R||i||"#2563eb"}dd 100%)`,width:"100px"},children:[g("span",{className:"sr-only",children:"Listening for voice input"}),g(At,{active:!0,barWidth:2,barHeight:4,barGap:2,barColor:m||D||"#FFFFFF",height:20,fadeEdges:!0,className:"min-w-[60px]","aria-hidden":"true"})]})})}),g("div",{ref:se,className:"h-px"})]})};function It(e,t){return String(e||"").replace(/\/+$/,"")+(t.startsWith("/")?t:`/${t}`)}function Et({apiEndpoint:e,conversationId:t,size:o,authHeader:r}){fetch(It(e,"/api/v1/chat-attachments/release"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,size:o})}).catch(()=>{})}function Bt({orgId:e,conversationId:n,config:i,apiEndpoint:s,authHeader:l,onError:c}){const[d,u]=o([]),g=r(new Map),h=r(0),p=r(d);p.current=d;const m=r({conversationId:n,bytes:0});m.current.conversationId!==n&&(m.current={conversationId:n,bytes:0});const b=a(()=>(h.current+=1,`att-${Date.now()}-${h.current}`),[]),w=a((e,t)=>{u(o=>o.map(o=>o.id===e?{...o,...t}:o))},[]),f=a((e,t,o)=>{const r={status:"error",error:{code:t,message:o}};u(t=>{const o=t.map(t=>t.id===e?{...t,...r}:t),a=o.find(t=>t.id===e);return a&&c&&c(a),o})},[c]),v=a((e,t)=>{if(!i?.fileUploadEnabled)return{ok:!1,code:"feature_disabled",message:"File uploads are not enabled for this organization."};if(t>=i.fileUploadMaxFiles)return{ok:!1,code:"too_many_files",message:`Max ${i.fileUploadMaxFiles} files per message.`};const o=1024*i.fileUploadMaxSizeMB*1024;if(m.current.bytes+e.size>o){return{ok:!1,code:"size_exceeded",message:`This conversation has already used ${(m.current.bytes/1048576).toFixed(1)} MB of its ${i.fileUploadMaxSizeMB} MB upload limit - this file won't fit.`}}const r=(e.type||"").toLowerCase(),a=new Set((i.fileUploadAllowedMimes||[]).map(e=>String(e).toLowerCase()));return a.size>0&&!a.has(r)?{ok:!1,code:"mime_not_allowed",message:`File type "${e.type||"unknown"}" is not allowed.`}:{ok:!0}},[i]),y=a(async(e,t)=>{let o;try{o=await fetch(It(s,"/api/v1/chat-attachments/presign"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...l?{Authorization:l}:{}},body:JSON.stringify({filename:t.name,mimeType:t.type,size:t.size,conversationId:n})})}catch(o){return m.current.bytes=Math.max(0,m.current.bytes-t.size),void f(e,"network","Network error while requesting upload.")}if(!o.ok){let r="Upload rejected by the server.",a="unknown";try{const e=await o.json();e?.error&&(r=e.error),e?.code&&(a=function(e){switch(e){case"feature_disabled":case"size_exceeded":case"mime_not_allowed":case"storage_unavailable":return e;default:return"unknown"}}(e.code))}catch{}return m.current.bytes=Math.max(0,m.current.bytes-t.size),void f(e,a,r)}let r=0;const a=()=>{r>0&&(Et({apiEndpoint:s,conversationId:n,size:r,authHeader:l}),r=0,w(e,{reservedBytes:0}))},i=()=>{m.current.bytes=Math.max(0,m.current.bytes-t.size)};let c;try{c=await o.json()}catch{return Et({apiEndpoint:s,conversationId:n,size:t.size,authHeader:l}),i(),w(e,{reservedBytes:0}),void f(e,"unknown","Malformed presign response.")}let d,u;("boolean"==typeof c.reserved?c.reserved:!c.useMultipart)&&(r=t.size,w(e,{reservedBytes:t.size}));try{if(c.useMultipart){const o=await function({url:e,file:t,conversationId:o,authHeader:r,onProgress:a,registerXhr:n}){return new Promise((r,i)=>{const s=new XMLHttpRequest;n(s),s.open("POST",e,!0),s.withCredentials=!0;const l=new FormData;l.append("conversationId",o),l.append("file",t,t.name),s.upload.onprogress=e=>{e.lengthComputable&&a(Math.round(e.loaded/e.total*100))},s.onload=()=>{if(s.status>=200&&s.status<300)try{const e=JSON.parse(s.responseText);r({url:"string"==typeof e?.url?e.url:void 0,storageKey:"string"==typeof e?.storageKey?e.storageKey:void 0})}catch{r({})}else i(new Error(`upload_status_${s.status}`))},s.onerror=()=>i(new Error("network")),s.onabort=()=>i({aborted:!0}),s.send(l)})}({url:It(s,"/api/v1/chat-attachments/multipart"),file:t,conversationId:n,authHeader:l,onProgress:t=>w(e,{progress:t}),registerXhr:t=>g.current.set(e,t)});d=o.url,u=o.storageKey,r=t.size,w(e,{reservedBytes:t.size})}else{if(!c.uploadUrl)throw new Error("presign_missing_target");{await function({url:e,file:t,onProgress:o,registerXhr:r}){return new Promise((a,n)=>{const i=new XMLHttpRequest;r(i),i.open("PUT",e,!0),i.setRequestHeader("x-ms-blob-type","BlockBlob"),t.type&&i.setRequestHeader("Content-Type",t.type),i.upload.onprogress=e=>{e.lengthComputable&&o(Math.round(e.loaded/e.total*100))},i.onload=()=>{i.status>=200&&i.status<300?a():n(new Error(`upload_status_${i.status}`))},i.onerror=()=>n(new Error("network")),i.onabort=()=>n({aborted:!0}),i.send(t)})}({url:c.uploadUrl,file:t,onProgress:t=>w(e,{progress:t}),registerXhr:t=>g.current.set(e,t)});const o=await async function({apiEndpoint:e,storageKey:t,filename:o,mimeType:r,authHeader:a}){let n;try{n=await fetch(It(e,"/api/v1/chat-attachments/confirm"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...a?{Authorization:a}:{}},body:JSON.stringify({storageKey:t,filename:o,mimeType:r})})}catch{return{ok:!1,code:"network",message:"Network error while verifying upload."}}if(n.ok)return{ok:!0};let i="Upload rejected - file content did not match its declared type.",s="content_mismatch";try{const e=await n.json();e?.error&&(i=e.error),"password_protected"===e?.code&&(s="password_protected")}catch{}return{ok:!1,code:s,message:i}}({apiEndpoint:s,storageKey:c.storageKey,filename:t.name,mimeType:t.type,authHeader:l});if(!o.ok)return g.current.delete(e),a(),i(),void f(e,o.code,o.message)}}}catch(t){if(g.current.delete(e),t&&t.aborted)return;return a(),i(),void f(e,"network","Upload failed. Please retry.")}g.current.delete(e),w(e,{status:"ready",progress:100,storageKey:u||c.storageKey,...d?{url:d}:{}})},[s,l,n,f,w]),k=a(async e=>{const t=Array.from(e);for(const e of t){const t=p.current.filter(e=>"error"!==e.status).length,o=v(e,t),r=b();if(!o.ok){const t={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"error",error:{code:o.code,message:o.message}};u(e=>(c&&c(t),[...e,t]));continue}const a={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"uploading",progress:0,reservedBytes:0};u(e=>[...e,a]),m.current.bytes+=e.size,y(r,e)}},[v,y,b,c]),x=a(e=>{const t=g.current.get(e);t&&(t.abort(),g.current.delete(e));const o=p.current.find(t=>t.id===e);o&&o.reservedBytes>0&&(Et({apiEndpoint:s,conversationId:n,size:o.reservedBytes,authHeader:l}),m.current.bytes=Math.max(0,m.current.bytes-o.reservedBytes)),u(t=>t.filter(t=>t.id!==e))},[s,l,n]),C=a(()=>{for(const e of g.current.values())e.abort();g.current.clear(),u([])},[]),S=t(()=>d.some(e=>"validating"===e.status||"uploading"===e.status),[d]),M=a(()=>d.filter(e=>"ready"===e.status&&"string"==typeof e.storageKey).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url})),[d]);return{attachments:d,addFiles:k,removeAttachment:x,clearAll:C,isBusy:S,toSendPayload:M}}function Rt(e){if(!e||e<1024)return`${e||0} B`;const t=["KB","MB","GB"];let o=e/1024,r=0;for(;o>=1024&&r<t.length-1;)o/=1024,r+=1;return`${o.toFixed(o>=10?0:1)} ${t[r]}`}function Dt({attachment:e,onRemove:t,isDark:o}){const r="error"===e.status,a="uploading"===e.status,n="ready"===e.status,i=r?o?"rgba(239,68,68,0.15)":"#fee2e2":o?"#1f2937":"#f3f4f6",s=r?o?"#b91c1c":"#fca5a5":o?"#374151":"#e5e7eb",l=r?o?"#fca5a5":"#b91c1c":o?"#e5e7eb":"#374151",c=r?`${e.filename} - ${e.error?.message||"error"}`:a?`${e.filename} - uploading`:`${e.filename} - ready`;return h("div",{className:"inline-flex items-center gap-2 rounded-full pl-2 pr-1 py-1 text-xs",style:{backgroundColor:i,border:`1px solid ${s}`,color:l,maxWidth:240},title:r?e.error?.message:e.filename,"aria-label":c,children:[r?g(Re,{size:12,"aria-hidden":"true"}):a?g($e,{size:12,className:"animate-spin","aria-hidden":"true"}):g(Oe,{size:12,"aria-hidden":"true"}),g("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename}),n&&g("span",{className:"opacity-70 text-chip",children:Rt(e.size)}),a&&"number"==typeof e.progress&&h("span",{className:"opacity-70 text-chip",children:[e.progress,"%"]}),g("button",{type:"button",onClick:()=>t(e.id),className:"w-4 h-4 rounded-full inline-flex items-center justify-center",style:{backgroundColor:"transparent",border:"none",color:l,cursor:"pointer"},"aria-label":"Remove attachment",children:g(Xe,{size:12})})]})}const Vt=({suggestions:e,onSuggestionClick:t,promptPrimary:o,promptTextColor:r,promptFontFamily:a,promptFontSize:n,isRtl:i,t:s,questionDisplay:l=!0})=>g("div",{className:"mb-2 px-5",children:g("div",{className:"flex flex-col gap-2",role:"group","aria-label":s("suggestedQuestions"),children:e.map((e,s)=>{const c=((e,t=!0)=>{if(!e||"string"==typeof e)return e||"";const o="string"==typeof e.text?e.text:"";if(!t)return o;const r="string"==typeof e.submitText?e.submitText.trim():"";return r&&r!==o?r:o})(e,l),d=J(c,i);return g("button",{type:"button",onClick:()=>t(e.submitText||e.text||e,e,s),dir:d?"rtl":"ltr",className:"block w-full rounded-2xl px-4 py-2 border-0 transition-transform duration-150 active:scale-[0.99] "+(d?"text-right":"text-left"),style:{direction:d?"rtl":"ltr",textAlign:d?"right":"left",background:`linear-gradient(135deg, ${o} 0%, ${o}dd 100%)`,color:r,fontFamily:a,fontSize:n},children:c},`${e.text||e}-${s}`)})})}),Ot=({onStopGeneration:e,inputValue:i,setInputValue:s,onSend:l,isDark:c,primaryColor:d,isOpen:u,isMinimized:b,isLoading:w,isConversationLoading:f=!1,placeholder:v,textColor:y,fontFamily:k,fontSize:x,isRtl:C=!1,csatVisible:S=!1,enableVoiceInteraction:M=!1,isVoiceSessionActive:P=!1,voiceStatus:z="idle",voiceError:T=null,onVoiceToggle:F,onBidiSubmit:L,disclaimerEnabled:N=!1,disclaimerText:A,disclaimerPosition:j="top",disclaimerLinkUrl:I,disclaimerLinkLabel:E,showPoweredBy:B=!0,onboardingQuestions:R=[],onboardingActive:D=!1,onboardingCompleted:V=!1,userMessageBubbleFontFamily:O,onboardingEnabled:$=!1,userMessageBubbleFontSize:U,userMessageBoxColor:W,resolvedUserMessageColor:_,userTextColor:Q,promptSuggestions:K,onPromptSuggestionClick:G,autoPromptQuestionDisplay:Z=!0,tagSelectorNode:ee=null,showResolveButton:te=!1,onResolve:oe,defaultLanguage:re="en",chatFeatures:ie,apiEndpoint:se,organizationId:le,conversationId:ce})=>{const de=t(()=>X(re),[re]),ue=t(()=>function(e){const t=Y(e),o=q[t]||H;return{beforeBrand:o.poweredByBefore??o.poweredBy??H.poweredByBefore,afterBrand:o.poweredByAfter??""}}(re),[re]),ge=t(()=>J(i,C),[i,C]),[he,pe]=o(!1),[me,be]=o(!1),we=t(()=>({fileUploadEnabled:ie?.fileUploadEnabled??!1,fileUploadMaxSizeMB:ie?.fileUploadMaxSizeMB??10,fileUploadMaxFiles:ie?.fileUploadMaxFiles??3,fileUploadAllowedMimes:ie?.fileUploadAllowedMimes??[]}),[ie]),{attachments:fe,addFiles:ve,removeAttachment:ye,clearAll:ke,isBusy:xe,toSendPayload:Ce}=Bt({orgId:le,conversationId:ce,config:we,apiEndpoint:se,authHeader:void 0}),Se=r(null),Me=!!we.fileUploadEnabled&&!!se,Pe=fe.length>=we.fileUploadMaxFiles,ze=`Max ${we.fileUploadMaxFiles} files per message.`,Te=t(()=>we.fileUploadAllowedMimes.length>0?we.fileUploadAllowedMimes.join(","):void 0,[we.fileUploadAllowedMimes]),[Fe,Le]=o({top:0,left:0,placement:"top",arrowOffset:0}),[Ne,Ae]=o(!1),Ie=r(null),Ee=r(null),Be=r(null),Re=r(null);at(k),at(O),n(()=>{u&&!b&&Ee.current?.focus()},[u,b]),n(()=>{const e=Ee.current;if(e){e.style.height="auto";const t=e.scrollHeight,o=i.trim().length>0?20:48,r=Math.max(o,Math.min(t,120));e.style.height=`${r}px`}},[i]);const De=a(()=>{const e=Ce();e.length>0?(l(void 0,e),ke()):l()},[Ce,ke,l]),Ve=fe.some(e=>"ready"===e.status),Oe=!i.trim()&&!Ve||w||f||xe,Ue=c?"#374151":"#e5e7eb",He=R&&R.length>0,We=S||f||$&&(He&&!V)||"connecting"===z,Qe=S?de("pleaseSubmitRatingFirst"):He?D?de("completeOnboardingToEnableVoice"):V?"":de("sendMessageToCompleteOnboarding"):"",Ke=()=>{if(!Be.current)return;const e=Be.current.getBoundingClientRect(),t=220,o=e.top,r=window.innerHeight-e.bottom;let a="top",n=0,i=0;o>=73?(a="top",n=e.top-60-5-8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):r>=68?(a="bottom",n=e.bottom+8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):(a="top",n=Math.max(10,e.top-60-5-8),i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10));return{top:n,left:i,placement:a,arrowOffset:e.left+e.width/2-i}};n(()=>{if(me&&Qe){const e=()=>{const e=Ke();Le(e)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}}},[me,Qe]),n(()=>()=>{Ie.current&&clearTimeout(Ie.current)},[]);const Ge=null!=_?_:null!=W?W:null!=d?d:"#2563eb",Je=null!=Q?Q:null!=y?y:"#FFFFFF",Xe=null!=O?O:null!=k?k:"Inter",Ze=null!=U?U:null!=x?x:null,et=Ze?`calc(${Ze} - 2px)`:"12px",tt=ae(I);return h("div",{className:"py-4 flex-shrink-0 relative "+(c?"bg-gray-900":"bg-white"),style:{overflow:"visible"},children:[ee||K.length>0&&G&&g(Vt,{suggestions:K,onSuggestionClick:G,questionDisplay:Z,promptPrimary:Ge,promptTextColor:Je,promptFontFamily:Xe,promptFontSize:et,isRtl:C,t:de}),g("div",{className:"my-4",style:{height:"1px",backgroundColor:Ue}}),Me&&fe.length>0&&g("div",{className:"px-5 mb-2 flex flex-wrap gap-1.5",children:fe.map(e=>g(Dt,{attachment:e,onRemove:ye,isDark:c},e.id))}),h("div",{className:"flex items-center px-5 gap-1.5",children:[Me&&g("input",{ref:Se,type:"file",multiple:!0,accept:Te,"aria-label":de("uploadFile"),className:"hidden",style:{display:"none"},onChange:e=>{const t=e.target.files;t&&t.length&&!Pe&&ve(t),e.currentTarget.value=""}}),h("div",{className:`flex-1 flex items-center gap-1 px-1 min-h-[48px] ${c?"bg-gray-800":"bg-gray-50"} rounded-2xl transition-all duration-200`,style:{borderStyle:"solid",borderColor:i&&i.trim().length>0?d||"#2563eb":Ue,borderWidth:i&&i.trim().length>0?"2px":"1px"},children:[Me&&h("div",{className:"relative group shrink-0",children:[g("button",{type:"button",onClick:()=>Se.current&&Se.current.click(),disabled:S||f||w||Pe,"aria-label":Pe?ze:"Attach file",title:Pe?ze:"Attach file",className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${c?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,style:{border:"none"},children:g(qe,{className:"w-4 h-4"})}),Pe&&g("div",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-2 opacity-0 group-hover:opacity-100 transition-opacity px-3 py-1.5 text-xs rounded-lg whitespace-nowrap shadow-lg "+(c?"bg-gray-700 text-gray-100":"bg-gray-800 text-white"),children:ze})]}),g("div",{className:"relative flex-1 flex items-center min-w-0",children:g("textarea",{id:"chat-widget-input",ref:Ee,"aria-label":v||de("typeYourMessage"),value:i,onChange:e=>{s(e.target.value)},onFocus:()=>pe(!0),onBlur:()=>pe(!1),onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(e.preventDefault(),P&&L)return void L();if(Oe)return;De()}},placeholder:f?de("agentIsLoading"):v||de("typeYourMessage"),rows:1,disabled:S||f||w||P&&"connected"!==z,dir:ge?"rtl":"ltr",className:`w-full px-3 bg-transparent rounded-xl leading-normal ${c?"text-gray-100":"text-gray-900"} placeholder-gray-400 resize-none outline-none scrollbar-hide break-all`,style:{height:"auto",maxHeight:"120px",minHeight:"48px",paddingTop:i.trim().length>0?"12px":"0px",paddingBottom:i.trim().length>0?"12px":"0px",lineHeight:i.trim().length>0?"1.4":"48px",fontFamily:O||k||"Inter",fontSize:x||"14px",color:c?"#F3F4F6":"#1F2937",textAlign:ge?"right":"left",direction:ge?"rtl":"ltr",wordSpacing:"0",letterSpacing:"0"}})}),M&&h("div",{className:"relative shrink-0",onMouseEnter:()=>{if(We&&Qe){Ie.current&&(clearTimeout(Ie.current),Ie.current=null);const e=Ke();Le(e),be(!0)}},onMouseLeave:()=>{Ie.current&&(clearTimeout(Ie.current),Ie.current=null),be(!1)},children:[g("button",{style:{border:"none"},ref:Be,type:"button",onClick:F,"aria-label":de(P?"stopVoiceInput":"startVoiceInput"),className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${P?"bg-red-500 text-white hover:bg-red-600":c?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} ${We?"opacity-60 cursor-not-allowed":""}`,disabled:We,children:"connecting"===z?g($e,{className:"w-4 h-4 animate-spin"}):g(je,{className:"w-4 h-4"})}),me&&Qe&&"undefined"!=typeof document&&m(h("div",{ref:Re,className:"px-3 py-1.5 text-xs shadow-md pointer-events-none",style:{position:"fixed",top:`${Fe.top}px`,left:`${Fe.left}px`,maxWidth:"220px",whiteSpace:"normal",wordWrap:"break-word",minWidth:"180px",zIndex:999999,backgroundColor:c?"#1f2937":"#ffffff",color:c?"#f3f4f6":"#111827",border:c?"1px solid #374151":"1px solid #e5e7eb",borderRadius:"top"===Fe.placement?"6px 6px 6px 6px":"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",overflow:"visible"},children:[g("div",{className:"text-left leading-relaxed",children:Qe}),"top"===Fe.placement&&h(p,{children:[g("div",{style:{position:"absolute",top:"100%",left:`${Fe.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:c?"6px solid #374151":"6px solid #e5e7eb",pointerEvents:"none"}}),g("div",{style:{position:"absolute",top:"100%",left:`${Fe.arrowOffset}px`,transform:"translateX(-50%)",marginTop:"-1px",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:c?"5px solid #1f2937":"5px solid #ffffff",pointerEvents:"none"}})]}),"bottom"===Fe.placement&&h(p,{children:[g("div",{className:"absolute bottom-full",style:{left:`${Fe.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:c?"5px solid #374151":"5px solid #e5e7eb"}}),g("div",{className:"absolute bottom-full -mb-px",style:{left:`${Fe.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:c?"4px solid #1f2937":"4px solid #ffffff"}})]})]}),document.body)]})]}),g("button",w&&!P&&"function"==typeof e?{onClick:e,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md scale-100",style:{backgroundColor:d,color:"white",border:"none"},"aria-label":de("stopGenerating"),children:g(Ye,{className:"w-3.5 h-3.5",fill:"currentColor"})}:{onClick:P&&L?L:De,disabled:S||Oe||P&&"connected"!==z,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none "+(i.trim()?"scale-100":"scale-95"),style:{backgroundColor:i.trim()?d:c?"#374151":"#e5e7eb",color:i.trim()?"white":"#9ca3af",border:"none"},"aria-label":de("sendMessage"),children:g(_e,{className:"w-4 h-4 transition-transform",style:C?{transform:"rotate(-90deg)"}:void 0})})]}),P&&h("p",{"aria-live":"polite",className:`text-xs mt-2 px-5 ${"connected"===z?"text-status-success":"text-gray-500"} flex items-center gap-1`,children:[g("span",{className:"w-1.5 h-1.5 rounded-full bg-current inline-flex"}),de("connected"===z?"voiceSessionLive":"connectingVoice")]}),T&&g("p",{role:"alert",className:"text-xs mt-1 px-5 text-status-error",children:de(T)===T?de("voiceUnavailable"):de(T)}),N&&A&&"footer"===j&&h("p",{className:"text-xs mt-2 px-5 text-center",style:{color:c?"#d1d5db":"#6b7280",fontFamily:k||"Inter",fontSize:x?`calc(${x} - 2px)`:"12px",direction:C?"rtl":"ltr"},dir:C?"rtl":"ltr",children:[A,tt&&E&&g("a",{href:tt,target:"_blank",rel:"noopener noreferrer",title:tt,style:{color:c?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:E})]}),B&&g("div",{className:"mt-1.5 flex justify-center",children:g("a",{href:"https://eshal.ai",target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:h("span",{dir:"ltr",className:"inline-flex items-center gap-1.5 py-1.5 px-3",children:[ue.beforeBrand&&g("span",{className:ne("font-sans text-[10px] font-medium",c?"text-gray-400":"text-gray-500"),children:ue.beforeBrand}),Ne?g("span",{className:ne("font-sans text-[10px] font-semibold",c?"text-gray-300":"text-gray-600"),children:"ESHAL"}):g("img",{src:c?"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='white'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='white'/%3e%3c/g%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='black'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='black'/%3e%3c/g%3e%3c/svg%3e",alt:"ESHAL",className:ne("h-3",c?"opacity-60":"opacity-50"),onError:()=>Ae(!0)}),ue.afterBrand&&g("span",{className:ne("font-sans text-[10px] font-medium",c?"text-gray-400":"text-gray-500"),children:ue.afterBrand})]})})})]})},$t=["sun","mon","tue","wed","thu","fri","sat"];function Ut(e){if(!e||"string"!=typeof e)return null;const t=e.match(/^(\d{1,2}):(\d{2})/);if(!t)return null;const o=parseInt(t[1],10),r=parseInt(t[2],10);return Number.isNaN(o)||Number.isNaN(r)?null:60*o+r}function Ht(e,t=new Date,o={}){if(!e||!e.showStatus)return null;const r=o.online||"Online now",a=o.officeOpen||"Online now",n=o.offlineFallback||"Offline";if("officeHours"!==e.statusMode)return{online:!0,label:r};const i=e.officeHours||{},{dayKey:s,minutes:l}=function(e,t){try{const o=new Intl.DateTimeFormat("en-US",{timeZone:e||void 0,weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(t),r=(o.find(e=>"weekday"===e.type)||{}).value||"";let a=parseInt((o.find(e=>"hour"===e.type)||{}).value||"0",10);const n=parseInt((o.find(e=>"minute"===e.type)||{}).value||"0",10);return 24===a&&(a=0),{dayKey:r.slice(0,3).toLowerCase(),minutes:60*a+n}}catch{return{dayKey:$t[t.getDay()],minutes:60*t.getHours()+t.getMinutes()}}}(i.timezone,t),c=Array.isArray(i.days)?i.days.map(e=>String(e).slice(0,3).toLowerCase()):[],d=Ut(i.open),u=Ut(i.close);if(c.includes(s)&&(null!=d&&null!=u&&(d<=u?l>=d&&l<u:l>=d||l<u))){return{online:!0,label:(i.onlineMessage||"").trim()||a}}return{online:!1,label:(i.offlineMessage||"").trim()||n}}const qt=({conciergeName:e,companyName:a,companyLogo:i,primaryColor:s,isDark:l,isMinimized:c=!1,textColor:d,fontFamily:u,fontSize:p,onToggleTheme:m,onMinimize:b,onClose:w,headerTextBold:f=!1,headerTextItalic:v=!1,headerTextColor:y,headerFontFamily:k,headerFontSize:x,subtitle:C=null,showStatus:S=!1,statusMode:M="always",officeHours:P=null,onRefreshChat:z,onCopyChat:T,defaultLanguage:F="en"})=>{const L=s,N=y||"#FFFFFF",A=k||u||"Inter",j=x||p;at(A);const I=t(()=>X(F),[F]),E=Q(F),B=t(()=>J(C,E),[C,E]),R=t(()=>Ht({showStatus:S,statusMode:M,officeHours:P}),[S,M,P]),[D,V]=o(!1),O=r(null),$=r(null);n(()=>{if(!D)return;const e=e=>{O.current&&!e.composedPath().includes(O.current)&&V(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[D]);const U=r(!1);n(()=>{if(D){U.current=!0;const e=O.current?.querySelector('[role="menuitem"]');e?.focus()}else U.current&&(U.current=!1,$.current?.focus())},[D]);const H=N;return h("div",{className:`text-white ${c?"px-4 py-2.5":"px-3 py-4"} flex items-center justify-between relative overflow-visible rounded-t-2xl z-[60]`,style:{background:L,fontFamily:A},children:[h("div",{className:"flex items-center gap-3 flex-1 min-w-0 pl-1",children:[h("div",{className:"relative w-11 h-11 flex-shrink-0",children:[g("div",{className:"w-full h-full rounded-full overflow-hidden flex items-center justify-center bg-white/20",children:i?g("img",{src:i,alt:"Logo",style:{display:"block",width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}):g("span",{className:"text-lg font-semibold leading-none",style:{color:H},children:(e||a||"")?.charAt(0)?.toUpperCase()})}),R?g("span",{title:R.label,className:ne("absolute bottom-0 h-3 w-3 rounded-full ring-2 ring-white",E?"left-0":"right-0"),style:{backgroundColor:R.online?"#22c55e":"#9ca3af",boxShadow:R.online?"0 0 0 3px rgba(34,197,94,0.25)":"none"},"aria-hidden":"true"}):null]}),h("div",{className:"flex flex-col justify-center min-w-0",style:{fontFamily:A},children:[g("h3",{title:e,className:ne("font-semibold leading-snug truncate",f&&"font-bold",v&&"italic"),style:{fontSize:j?`calc(${j} + 2px)`:"15px",color:H},children:e}),C?g("p",{title:C,className:"leading-snug truncate opacity-75",dir:B?"rtl":"ltr",style:{fontSize:"12px",color:H,textAlign:B?"right":"left"},children:C}):null]})]}),h("div",{className:"flex items-center gap-0 relative z-10 text-white flex-shrink-0 ml-1",children:[h("div",{className:"relative",ref:O,children:[g("button",{type:"button",ref:$,"aria-label":I("menu"),"aria-expanded":D,"aria-haspopup":"true",onClick:()=>V(e=>!e),onKeyDown:e=>{"Escape"===e.key&&D&&(e.preventDefault(),V(!1))},className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:H},children:g(Ve,{className:"w-4 h-4",strokeWidth:1.6})}),D&&h("div",{role:"menu","aria-label":I("menu"),dir:E?"rtl":"ltr",onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),void V(!1);if("Tab"===e.key){const t=O.current?Array.from(O.current.querySelectorAll('[role="menuitem"]')):[];if(0===t.length)return;const o=t[0],r=t[t.length-1],a=document.activeElement;e.shiftKey&&a===o?(e.preventDefault(),r.focus()):e.shiftKey||a!==r||(e.preventDefault(),o.focus())}},className:`absolute top-full mt-1 w-44 rounded-xl border shadow-lg py-1 z-[9999] animate-in fade-in slide-in-from-top-1 duration-150 ${E?"left-0":"right-0"} ${l?"bg-gray-800 border-gray-700":"bg-white border-gray-200"}`,style:{fontFamily:A},children:[h("button",{role:"menuitem",onClick:()=>{V(!1),z?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(l?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:A,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:E?"right":"left"},children:[g(We,{className:"w-3.5 h-3.5 flex-shrink-0"}),I("refreshChat")]}),h("button",{role:"menuitem",onClick:()=>{V(!1),T?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(l?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:A,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:E?"right":"left"},children:[g(De,{className:"w-3.5 h-3.5 flex-shrink-0"}),I("copyChat")]}),h("button",{role:"menuitem",onClick:()=>{V(!1),m?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(l?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:A,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:E?"right":"left"},children:[g(l?Ke:He,{className:"w-3.5 h-3.5 flex-shrink-0"}),I(l?"lightMode":"nightMode")]})]})]}),g("button",{type:"button","aria-label":I("close"),onClick:w,className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:H},children:g(Xe,{className:"w-3.5 h-3.5",strokeWidth:1.6})})]})]})},Wt=({questions:e=[],collapsiblePrompt:a,onSubmit:n,primaryColor:i="#2563eb",isRtl:s=!1,isDark:l=!1,defaultLanguage:c="en"})=>{const d=t(()=>X(c),[c]),[u,p]=o({}),[m,b]=o({}),[w,f]=o(!1),v=r({}),y=[...e].sort((e,t)=>se(e.fieldType)-se(t.fieldType));return g("div",{className:"flex flex-col items-center justify-center p-5 h-full min-h-0 z-50 relative ",style:l?{backgroundColor:"#10141C"}:void 0,children:h("div",{className:"w-full max-w-sm rounded-3xl shadow-xl border p-8 transition-colors duration-300 bg-white border-gray-100",style:l?{backgroundColor:"#1E232B",border:"1px solid #2A303C",borderRadius:"14px"}:void 0,children:[a&&g("div",{className:"mb-5 text-left",children:g("h3",{className:"transition-colors duration-300 text-h4 font-semibold "+(l?"text-white":"text-[#4A5568]"),children:a})}),h("form",{onSubmit:async e=>{e.preventDefault();const t=(()=>{const e={};return y.forEach(t=>{const o=t.fieldType||"question",r=(u[o]??"").trim(),a=t.collectionPrompt||t.askToType||t.question||t.label||o,n=!0===t.required||"true"===t.required;r?("fullName"!==o&&"name"!==o||r.length<2&&(e[o]=d("nameInvalid")),"email"!==o||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e[o]=d("emailInvalid")),"phone"!==o&&"mobileno"!==o||/^[+]?[\d\s-]{8,15}$/.test(r)||(e[o]=d("phoneInvalid"))):n&&(e[o]="email"===o?d("emailRequired"):"fullName"===o||"name"===o?d("nameRequired"):"phone"===o||"mobileno"===o?d("phoneRequired"):`${a} ${d("fieldRequiredSuffix")}`)}),b(e),e})();if(Object.keys(t).length>0){const e=y.map((e,t)=>e.fieldType||`question_${t}`).find(e=>t[e]);return void v.current[e]?.focus()}f(!0);try{await n(u)}finally{f(!1)}},className:"space-y-4",noValidate:!0,children:[y.map((e,t)=>{const o=e.fieldType||`question_${t}`,r=e.collectionPrompt||e.askToType||e.question||e.label;if(!r?.trim())return null;let a="text";"email"===o&&(a="email"),"phone"!==o&&"mobileno"!==o||(a="tel");const n=(o||"").toLowerCase(),i="fullname"===n||"name"===n||"username"===n,c="phone"===n||"mobileno"===n,w="email"===n?d("onboardingEmailPlaceholder"):i?d("onboardingNamePlaceholder"):c?d("onboardingPhonePlaceholder"):r,f=m[o],y="w-full h-12 rounded-lg text-sm px-4 outline-none border transition-colors focus:ring-0 "+(l?"text-white placeholder:text-[#A2A9B2] focus:border-[#5A6069]":"bg-white text-gray-900 placeholder:text-[#8C8C8C] focus:border-[#B0B0B0]"),k=f?"!border-status-error focus:!border-status-error":"",x=`onboarding-field-${o}`,C=`${x}-error`;return h("div",{className:"space-y-1",children:[g("label",{htmlFor:x,className:"sr-only",children:r}),g("input",{id:x,ref:e=>{v.current[o]=e},placeholder:w,type:a,value:u[o]??"",onChange:e=>((e,t)=>{p(o=>({...o,[e]:t})),m[e]&&b(t=>{const o={...t};return delete o[e],o})})(o,e.target.value),className:`${y} ${k}`,"aria-invalid":f?"true":"false","aria-describedby":f?C:void 0,style:{direction:s?"rtl":"ltr",...l?{backgroundColor:"#272C35",borderWidth:"1px",borderStyle:"solid",borderColor:f?void 0:"#3F444C"}:{borderWidth:"1px",borderStyle:"solid",borderColor:f?void 0:"#E0E0E0"}}}),f&&g("p",{id:C,role:"alert",className:"text-xs text-status-error px-1",children:m[o]})]},o)}),g("button",{type:"submit",disabled:w,"aria-busy":w,"aria-label":w?d("submitting"):void 0,className:"w-full h-12 text-sm border-none font-semibold shadow-xl hover:shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all rounded-xl mt-4 text-white",style:{backgroundColor:i},children:w?g($e,{className:"w-5 h-5 animate-spin","aria-hidden":"true"}):d("startChat")})]})]})})},_t=({categories:e=[],selectedCategoryId:t=null,onSelect:i,isDark:s=!1,primaryColor:l="#2563eb",fontFamily:c="Inter",isRtl:d=!1})=>{const u=r(null),[p,m]=o(!1),[b,w]=o(!1),f=a(()=>{const e=u.current;if(!e)return;const{scrollLeft:t,scrollWidth:o,clientWidth:r}=e;m(Math.abs(t)>1),w(Math.abs(t)+r<o-1)},[]);n(()=>{f();const e=u.current;if(!e)return;const t=new ResizeObserver(f);return t.observe(e),()=>t.disconnect()},[f,e]);const v=a(e=>{const t=u.current;if(!t)return;const o="left"===e?-150:150;t.scrollBy({left:d?-o:o,behavior:"smooth"})},[d]);if(!Array.isArray(e)||0===e.length)return null;const y=s?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.95)",k=s?"#e5e7eb":"#374151",x=s?"#4b5563":"#d1d5db";return h("div",{className:"flex-shrink-0 px-2 py-2 border-b flex items-center gap-1",style:{backgroundColor:s?"#111827":"#ffffff",borderColor:s?"#374151":"#e5e7eb",fontFamily:c,direction:d?"rtl":"ltr"},role:"region","aria-label":"Filter by category",children:[g("button",{type:"button",onClick:()=>v("left"),disabled:!p,"aria-label":"Scroll categories left",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:y,border:`1px solid ${x}`,color:k,opacity:p?1:.3,cursor:p?"pointer":"default"},children:g(Ee,{size:14})}),g("div",{ref:u,onScroll:f,className:"flex-1 flex gap-2 overflow-x-auto",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map(e=>{const o=t===e.id;return g("button",{type:"button",onClick:()=>i?.(o?null:e.id),"aria-pressed":o,className:"flex-shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150 whitespace-nowrap",style:{backgroundColor:s?"#1f2937":"#ffffff",border:o?`1.5px solid ${l}`:"1px solid "+(s?"#374151":"#e5e7eb"),color:o?l:s?"#e5e7eb":"#374151",fontFamily:c},children:g("span",{children:e.label})},e.id)})}),g("button",{type:"button",onClick:()=>v("right"),disabled:!b,"aria-label":"Scroll categories right",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:y,border:`1px solid ${x}`,color:k,opacity:b?1:.3,cursor:b?"pointer":"default"},children:g(Be,{size:14})})]})},Yt=({categories:e=[],selectedCategoryId:t=null,onSelect:o,isDark:r=!1,primaryColor:a="#2563eb",fontFamily:n="Inter",fontSize:i="14px",isRtl:s=!1,label:l="Choose a topic to get started:"})=>{if(!Array.isArray(e)||0===e.length)return null;return h("div",{className:"pl-[50px] pt-1",style:{direction:s?"rtl":"ltr",paddingLeft:s?0:50,paddingRight:s?50:void 0},role:"region","aria-label":"Category filter",children:[g("div",{className:"mb-2",style:{color:r?"#9ca3af":"#6b7280",fontFamily:n,fontSize:`calc(${i} - 1px)`},children:l}),g("div",{className:"flex flex-wrap gap-2",children:e.map(e=>{const s=t===e.id;return g("button",{type:"button",onClick:()=>o?.(s?null:e.id),"aria-pressed":s,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full transition-all duration-150 hover:scale-[1.02] active:scale-[0.98]",style:{backgroundColor:r?"#1f2937":"#ffffff",border:s?`1.5px solid ${a}`:"1px solid "+(r?"#374151":"#e5e7eb"),color:s?a:r?"#e5e7eb":"#374151",fontFamily:n,fontSize:`calc(${i} - 1px)`,fontWeight:500},children:e.label},e.id)})})]})};const Qt=[{value:"😡",label:"😡",bg:"bg-red-200"},{value:"😕",label:"😕",bg:"bg-orange-200"},{value:"😐",label:"😐",bg:"bg-yellow-200"},{value:"😊",label:"😊",bg:"bg-green-200"},{value:"😍",label:"😍",bg:"bg-pink-200"}],Kt=[{value:"positive",label:"👍"},{value:"negative",label:"👎"}],Gt=[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],Jt=[{value:"1",label:"⭐"},{value:"2",label:"⭐"},{value:"3",label:"⭐"},{value:"4",label:"⭐"},{value:"5",label:"⭐"}],Xt=({format:e="EMOJI",prompt:r="How was your experience?",onRating:a,disabled:n=!1,isDark:i=!1,primaryColor:s="#2563eb",defaultLanguage:l="en"})=>{const c=t(()=>X(l),[l]),[d,u]=o(null),[p,m]=o(null),[b,w]=o(!1),f=async t=>{if(!n&&!b){u(t),w(!0);try{a&&a(t,e)}finally{w(!1)}}},v=(()=>{switch(e){case"THUMBS":return Kt;case"NUMERIC":return Gt;case"STARS":return Jt;default:return Qt}})();return h("div",{className:ne("transition-all duration-200 rounded-xl px-4",i?"bg-slate-800/50":"bg-slate-50/50"),children:[g("p",{className:ne("text-sm font-semibold text-center mb-3",i?"text-gray-300":"text-gray-500/80"),children:r}),h("div",{className:"flex justify-center items-center",children:["EMOJI"===e&&g("div",{className:"flex gap-2 justify-center items-center",children:v.map(e=>g("button",{onClick:()=>f(e.value),disabled:n||b,className:ne("flex items-center justify-center text-2xl transition-transform","bg-transparent border-0 p-0 cursor-pointer","hover:scale-110 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-0",d===e.value?"":"opacity-80"),children:g("span",{role:"img","aria-label":`${c("rate")} ${e.value}`,children:e.label})},e.value))}),"THUMBS"===e&&g("div",{className:"flex gap-6 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:v.map(e=>g("button",{"aria-label":1===e.value?c("thumbsUp"):c("thumbsDown"),onClick:()=>f(e.value),disabled:n||b,className:ne("w-10 h-10 rounded-xl border flex items-center justify-center shadow-md text-2xl transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","drop-shadow-md",i?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-100 hover:bg-gray-50",d===e.value&&"ring-2 ring-primary/40 scale-110"),style:{borderColor:d===e.value?s:void 0},children:g("span",{className:"drop-shadow-md","aria-hidden":"true",children:e.label})},e.value))}),"NUMERIC"===e&&g("div",{className:"flex gap-2 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:v.map(e=>g("button",{"aria-label":`${c("rate")} ${e.value}`,onClick:()=>f(e.value),disabled:n||b,className:ne("w-10 h-10 rounded-lg flex items-center justify-center text-sm font-semibold transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",d===e.value?"ring-2 ring-primary/40 scale-110 shadow-md text-white":i?"bg-gray-700 border border-gray-600 text-gray-300 hover:bg-gray-600":"bg-white border border-gray-200 text-gray-700 hover:bg-gray-50"),style:{backgroundColor:d===e.value?s:void 0,borderColor:d===e.value?s:void 0},children:e.label},e.value))}),"STARS"===e&&g("div",{className:"flex gap-2 justify-center items-center",onMouseLeave:()=>m(null),children:v.map(e=>{const t=p===e.value;return g("button",{onClick:()=>f(e.value),onMouseEnter:()=>m(e.value),disabled:n||b,className:ne("flex items-center justify-center text-2xl","bg-transparent border-0 p-0 cursor-pointer focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed"),style:{transform:t?"scale(1.25)":"scale(1)",filter:t?"brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.15))":"none",opacity:t?1:.6,transition:"all 0.2s ease"},"aria-label":`${c("rate")} ${e.value}`,children:g("span",{"aria-hidden":"true",children:e.label})},e.value)})})]}),b&&g("p",{"aria-live":"polite",className:ne("text-xs mt-3 text-center",i?"text-slate-400":"text-slate-500"),children:c("submittingFeedback")})]})};async function Zt({apiBaseUrl:e,conversationId:t,chip:o,submitText:r,position:a,source:n="widget",getAuthToken:i,enabled:s=!0}={}){try{if(!1===s)return!1;if(!e||"string"!=typeof e)return!1;if(!t||"string"!=typeof t)return!1;const l=function({chip:e,submitText:t,position:o,conversationId:r,source:a="widget"}={}){const n=e&&"object"==typeof e,i=n&&"string"==typeof e.text?e.text:"",s="string"==typeof t&&t?t:n&&"string"==typeof e.submitText?e.submitText:"string"==typeof e?e:"",l=i||s;if(!l)return null;const c={conversationId:r,chipText:l,submitText:s||void 0,position:Number.isInteger(o)?o:void 0,source:a},d=n?e?.promptId:void 0;return"string"==typeof d&&d&&(c.promptId=d),c}({chip:o,submitText:r,position:a,conversationId:t,source:n});if(!l)return!1;const c=`${e.replace(/\/$/,"")}/api/v1/support/chip-click`,d=JSON.stringify(l);let u;if("function"==typeof i)try{u=await i()}catch{u=void 0}if(!u&&"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&"undefined"!=typeof Blob)try{if(navigator.sendBeacon(c,new Blob([d],{type:"application/json"})))return!0}catch{}if("function"!=typeof fetch)return!1;const g={"Content-Type":"application/json"};return u&&(g.Authorization=`Bearer ${u}`),await fetch(c,{method:"POST",headers:g,credentials:"include",keepalive:!0,body:d}),!0}catch{return!1}}const eo="#ffffff",to="#f5f5f5",oo="#000000",ro="#1f2937",ao="#f3f4f6",no="#2563eb",io="eshal:widget:size",so=(e,t)=>!e||(e=>e?.trim().toLowerCase())(e)===t,lo=e=>(e instanceof Date?e:new Date(e)).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).replace(/am|pm/i,e=>e.toUpperCase()),co=e=>{const t=(e||"EMOJI").toString().trim().toUpperCase();return"THUMBS"===t||"THUMB"===t?"THUMBS":"STARS"===t||"STAR"===t?"STARS":"NUMERIC"===t||"NUMBER"===t?"NUMERIC":"EMOJI"},uo=({isOpen:e,isMinimized:i,isDark:s,onStopGeneration:l,primaryColor:c,textColor:d,conciergeName:u,companyName:m,companyLogo:b,chatbotAvatarEnabled:w,chatbotAvatar:f,messages:v,isLoading:y,isConversationLoading:k=!1,inputValue:x,setInputValue:C,onSend:S,onDirectSend:M,onToggleTheme:P,onMinimize:z,onClose:T,quickQuestions:F=[],quickQuestionsEnabled:L,onQuickQuestion:N,quickQuestionsLayout:A="vertical",agentMessageBubbleColor:j,userMessageBoxColor:I,assistantTextColor:E,userTextColor:B,fontFamily:R="Inter",agentMessageBubbleFontFamily:D,agentMessageBubbleFontSize:V,userMessageBubbleFontFamily:O,userMessageBubbleFontSize:$,fontSize:U="14px",defaultLanguage:H="en",onDecision:q,headerTextBold:W=!1,headerTextItalic:_=!1,headerTextColor:Y,headerFontFamily:K,headerFontSize:G,subtitle:J=null,showStatus:Z=!1,statusMode:ee="always",officeHours:te=null,enableVoiceInteraction:oe=!1,isVoiceSessionActive:re=!1,voiceStatus:ae="idle",voiceError:ie=null,voiceConclusionForCsat:se=!1,onVoiceToggle:ce,onBidiSubmit:de,disclaimerEnabled:ue=!1,disclaimerText:ge,disclaimerPosition:he="top",disclaimerLinkUrl:me,disclaimerLinkLabel:be,showPoweredBy:we=!0,apiBaseUrl:fe,apiKey:ve,getAuthToken:ye,conversationId:ke,conciergeId:xe,onboardingQuestions:Ce=[],onboardingActive:Se=!1,onboardingCompleted:Me=!1,onOnboardingFormSubmit:Pe,collectionPrompt:ze,csatEnabled:Te=!1,csatFormat:Fe="EMOJI",csatPrompt:Le="How was your experience?",onPromptSuggestionClick:Ne,onboardingEnabled:Ae=!1,onResetConversation:je,sessionExpiringSoon:Ie=!1,autoPromptEnabled:Ee=!0,autoPromptQuestionDisplay:Be=!0,autoPromptClickTelemetry:Re=!0,allowFeedback:De=!0,provideCitations:Ve=!0,onFeedback:Oe,onRetryMessage:$e,onRefreshChat:Ue,onCopyChat:He,filterCategories:qe=[],showFilterStep:We=!1,widgetFilter:_e=null,onWidgetFilterChange:Ye,onSynthesizeAssistantMessage:Ke,launcherPosition:Ge="bottom-right",chatFeatures:Je,organizationId:Xe})=>{at(R);const Ze=r(null),et=r(null),tt=t(()=>X(H),[H]);n(()=>{et.current?.focus()},[]);const ot=a((e,t,o)=>{Zt({apiBaseUrl:fe,conversationId:ke,chip:t,submitText:null==e?void 0:String(e),position:o,source:"widget",getAuthToken:ye,enabled:Re})},[fe,ye,ke,Re]),rt=a((e,t,o)=>{t&&"object"==typeof t&&ot(e,t,o),Ne?Ne(e):M?.(e)},[Ne,M,ot]),nt=Ge.includes("right"),it=Ge.includes("bottom"),[st,lt]=o(()=>{if("undefined"==typeof window)return null;try{const e=window.localStorage.getItem(io);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.width&&"number"==typeof t?.height&&t.width>=320&&t.height>=400)return t}catch{}return null}),ct=r(null),dt=r({x:0,y:0}),ut=r({width:380,height:650});n(()=>{const e=e=>{const t=ct.current;if(!t)return;const o=e.clientX-dt.current.x,r=e.clientY-dt.current.y,a={...ut.current},n=.92*window.innerWidth,i=.85*window.innerHeight;if("corner"===t||"horizontal"===t){const e=nt?ut.current.width-o:ut.current.width+o;a.width=Math.min(Math.max(320,e),n)}if("corner"===t||"vertical"===t){const e=it?ut.current.height-r:ut.current.height+r;a.height=Math.min(Math.max(400,e),i)}lt(a)},t=()=>{ct.current&&(ct.current=null,document.body.style.cursor="",document.body.style.userSelect="")};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[nt,it]),n(()=>{if(st)try{window.localStorage.setItem(io,JSON.stringify(st))}catch{}},[st]);const gt=(e,t)=>{t.preventDefault(),t.stopPropagation(),ct.current=e,dt.current={x:t.clientX,y:t.clientY},ut.current=st??{width:380,height:650};const o={corner:nt===it?"nwse-resize":"nesw-resize",horizontal:"ew-resize",vertical:"ns-resize"};document.body.style.cursor=o[e],document.body.style.userSelect="none"},[ht,pt]=o(!1),[mt,bt]=o(()=>{try{return pe(Xe)?.csatSubmitted??!1}catch{return!1}}),[wt,ft]=o(!1),[vt,yt]=o(!1),[kt,xt]=o(0),[Ct,St]=o(""),[Mt,Pt]=o(!1);n(()=>{try{const e=pe(Xe)?.csatSubmitted??!1;bt(e),e&&pt(!1)}catch{}},[ke]),function(e,t=[],o={}){const{enabled:a=!0,threshold:i=30,behavior:s="smooth",delay:l=0}=o,c=r(!0);r(0),n(()=>{if(!a||!e.current)return;const t=e.current,o=()=>{const e=t.scrollHeight-t.scrollTop-t.clientHeight;c.current=e<i},r=()=>{o()};t.addEventListener("scroll",r,{passive:!0}),o();const n=setTimeout(()=>{c.current&&t&&t.scrollTo({top:t.scrollHeight,behavior:s})},l);return()=>{t.removeEventListener("scroll",r),clearTimeout(n)}},[e,a,i,s,l,...t])}(Ze,[v,y],{enabled:!0,threshold:30,behavior:"smooth",delay:0});const zt=Q(H),Tt=t(()=>s?so(j,eo)?ro:j||ro:j||eo,[j,s]),Ft=t(()=>s?so(d,oo)?ao:d||ao:d||oo,[s,d]),Lt=t(()=>s?so(I,to)?c||no:I||c||no:I||to,[s,c,I]),Nt=tt(vt?"conversationResolved":"typeYourMessage"),At=v?.some?.(e=>"user"===e.role),It=t(()=>(v||[]).filter(e=>"user"===e.role).length,[v]),[Et,Bt]=o(0),Rt=_e?.category?(qe||[]).find(e=>e.id===_e.category):null,Dt=a(e=>{if(!Ye)return;const t=_e?.category||null;if(e){if(Ye({category:e,tags:[]}),Bt(It),!At&&e!==t&&Ke){const t=(qe||[]).find(t=>t.id===e),o=t?.label||e,r=tt("categoryTopicsHeading").replace("{category}",o);Ke(r,{replaceMarker:"category-intro"})}}else Ye(null)},[Ye,_e,It,qe,At,Ke,tt]);a(e=>{const t=_e?.category||Rt?.id;t&&Ye&&Ye({category:t,tags:[e]}),M&&M(e)},[_e,Rt,Ye,M]);const Vt=Array.isArray(qe)&&qe.length>0,$t=Vt&&!At&&!_e?.category,Ut=!At&&F.length>0&&L&&!_e?.category,Ht=Ce&&Ce.length>0,Qt=Boolean(Te),Kt=Ae&&Ht&&!Me,Gt=a(async()=>{if(Qt&&!Mt&&!vt&&0!==kt){Pt(!0);try{const e={"Content-Type":"application/json"};if("function"==typeof ye){const t=await ye();t&&(e.Authorization=`Bearer ${t}`)}const t=co(Fe),o=await fetch(`${fe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({conversationId:ke,rating:String(kt),ratingFormat:t,conciergeId:xe,feedback:Ct||void 0})});o.ok?(ft(!1),xt(0),St(""),Ye&&Ye(null),Ue?Ue():je&&je()):console.error("Failed to submit resolve feedback:",await o.text())}catch(e){console.error("Error submitting resolve feedback:",e)}finally{Pt(!1)}}},[Qt,Mt,vt,kt,Ct,ke,ye,xe,fe,Fe,je,Ue,Ye]),Jt=a(()=>{if(!Qt||!ke||!At)return Ye&&Ye(null),Ue?Ue():je&&je(),void T?.();wt?(ft(!1),T?.()):vt?T?.():ft(!0)},[Qt,ke,At,wt,vt,T,Ye,Ue,je]);n(()=>{Qt||(wt&&ft(!1),vt&&yt(!1),0!==kt&&xt(0),Ct&&St(""))},[Qt,wt,vt,kt,Ct]);const uo=t(()=>{if(!v||!Array.isArray(v))return[];for(let e=v.length-1;e>=0;e-=1)if("assistant"===v[e]?.role){const t=v[e].prompts;return Array.isArray(t)?t:[]}return[]},[v]),go=r([]);n(()=>{uo.length>0?go.current=uo:v&&0!==v.length&&v.some(e=>"user"===e.role)||(go.current=[])},[uo,v]);const ho=r(It);n(()=>{It!==ho.current&&(ho.current=It,go.current=[])},[It]);const po=uo.length>0?uo:go.current;n(()=>{if(!Te)return;if(!ht)return;if(mt)return;const e=Ze.current;if(!e)return;const t=window.requestAnimationFrame(()=>{e.scrollTo({top:e.scrollHeight,behavior:"smooth"})});return()=>{window.cancelAnimationFrame(t)}},[ht,Te,mt]);const mo=()=>{const e=co(Fe);if("STARS"===e)return g("div",{className:"flex justify-center gap-2 mb-5",role:"group","aria-label":tt("rateExperience"),children:[1,2,3,4,5].map(e=>g("button",{"aria-label":`${tt("rate")} ${e}`,onClick:()=>xt(e),className:"transition-all duration-150 hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",disabled:Mt,children:g(Qe,{className:ne("w-8 h-8 transition-colors",e<=kt?"text-yellow-400 drop-shadow-sm":s?"text-gray-600":"text-gray-300"),fill:e<=kt?"#FBBF24":"none"})},e))});if("THUMBS"===e)return g("div",{className:"flex gap-4 justify-center mb-5",role:"group","aria-label":tt("rateExperience"),children:[{value:"positive",emoji:"👍"},{value:"negative",emoji:"👎"}].map(e=>g("button",{"aria-label":"positive"===e.value?tt("thumbsUp"):tt("thumbsDown"),onClick:()=>xt(e.value),disabled:Mt,className:ne("w-12 h-12 rounded-xl border flex items-center justify-center text-2xl transition-all hover:scale-105 active:scale-95",kt===e.value?"ring-2 ring-blue-300 scale-110 shadow-lg":"",s?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-200 hover:bg-gray-50"),children:g("span",{className:"drop-shadow-md",children:e.emoji})},e.value))});return g("div",{className:"flex gap-2 justify-center items-center mb-5",role:"group","aria-label":tt("rateExperience"),children:[{value:1,emoji:"😡"},{value:2,emoji:"😕"},{value:3,emoji:"😐"},{value:4,emoji:"😊"},{value:5,emoji:"😍"}].map(e=>g("button",{"aria-label":`${tt("rate")} ${e.value}`,onClick:()=>xt(e.value),disabled:Mt,className:ne("rounded-full w-10 h-10 flex items-center justify-center text-xl transition-all hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",kt===e.value?"ring-2 ring-blue-100 scale-125 bg-gradient-to-b from-yellow-200 to-yellow-400 shadow-md":"grayscale-[0.3] opacity-80 hover:grayscale-0"),children:g("span",{role:"img","aria-label":`${tt("rate")} ${e.value}`,className:"drop-shadow-sm filter",children:e.emoji})},e.value))})};if(!e)return null;const bo=!i&&st?{width:st.width,height:st.height,maxWidth:"92vw",maxHeight:"85vh"}:void 0;return h("div",{dir:zt?"rtl":"ltr",className:"relative flex-shrink-0 z-50 "+(i?"w-80 h-auto":""),style:bo,children:[!i&&h(p,{children:[g("div",{onMouseDown:e=>gt("horizontal",e),className:"absolute top-0 h-full w-1.5 cursor-ew-resize hover:bg-blue-500/20 transition-colors z-[70] "+(nt?"left-0":"right-0"),"aria-hidden":!0}),g("div",{onMouseDown:e=>gt("vertical",e),className:"absolute left-0 w-full h-1.5 cursor-ns-resize hover:bg-blue-500/20 transition-colors z-[70] "+(it?"top-0":"bottom-0"),"aria-hidden":!0})]}),h("div",{id:"chat-window-panel",ref:et,role:"dialog","aria-modal":"true","aria-label":tt("openChat"),tabIndex:-1,className:`relative focus:outline-none ${st||i?"":"w-[380px]"} ${st||i?"":"h-[650px]"} ${i?"w-80 h-auto":""} ${st&&!i?"w-full h-full":""} max-w-[92vw] border rounded-2xl shadow-2xl bg-white border-gray-200 flex flex-col ${i?"":"max-h-[85vh]"} overflow-hidden ${s?"bg-gray-900 border-gray-700":""}`,children:[!i&&g("div",{onMouseDown:e=>gt("corner",e),"aria-hidden":"true",className:`absolute w-4 h-4 ${nt===it?"cursor-nwse-resize":"cursor-nesw-resize"} text-gray-400 hover:text-blue-500 transition-colors z-[71] flex p-0.5 ${it?"top-0 items-start":"bottom-0 items-end"} ${nt?"left-0 justify-start":"right-0 justify-end"}`,children:g("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 "+(it&&nt?"rotate-180":it?"-rotate-90":nt?"rotate-90":""),"aria-hidden":!0,children:g("path",{d:"M11 1 L1 11 M11 5 L5 11 M11 9 L9 11",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"})})}),g(qt,{conciergeName:u,companyName:m,companyLogo:b,primaryColor:c,isDark:s,isMinimized:i,textColor:Ft,fontFamily:R,fontSize:U,onToggleTheme:P,onMinimize:z,onClose:Jt,headerTextBold:W,headerTextItalic:_,headerTextColor:Y,headerFontFamily:K,headerFontSize:G,subtitle:J,showStatus:Z,statusMode:ee,officeHours:te,onRefreshChat:Ue,onCopyChat:He,defaultLanguage:H}),!i&&Vt&&!$t&&!(wt&&!vt)&&!(Se&&!Me)&&g(_t,{categories:qe,selectedCategoryId:_e?.category||null,onSelect:Dt,isDark:s,primaryColor:c,fontFamily:R,isRtl:zt}),!i&&h(p,{children:[g("div",{ref:Ze,role:"log","aria-live":"polite",className:`chat-messages flex-1 overflow-y-auto px-3 py-4 space-y-4 ${s?"bg-gray-900":"bg-gradient-to-b from-gray-50/50 to-white"} break-words`,children:wt&&!vt?g("div",{className:"animate-in slide-in-from-top-4 fade-in duration-300 mt-4 mx-2",children:h("div",{className:ne("w-full rounded-3xl p-6 shadow-lg",s?"bg-gray-800 shadow-black/20":"bg-white shadow-gray-200/80"),children:[g("p",{className:ne("text-sm font-medium text-center mb-5 [font-family:inherit]",s?"text-gray-300":"text-gray-500"),children:Le||tt("feedbackPrompt")}),mo(),g("textarea",{"aria-label":tt("feedbackPlaceholder"),value:Ct,onChange:e=>{e.target.value.length<=1e3&&St(e.target.value)},maxLength:1e3,placeholder:tt("feedbackPlaceholder"),rows:4,disabled:Mt,className:ne("w-full rounded-xl border px-4 py-3 text-sm [font-family:inherit] resize-none outline-none transition-colors mb-5",s?"bg-gray-700 border-gray-600 text-gray-100 placeholder-gray-400":"bg-gray-50 border-gray-200 text-gray-900 placeholder-gray-400")}),h("div",{className:"relative group",children:[g("button",{onClick:Gt,disabled:0===kt||Mt,"aria-describedby":0===kt?"resolve-rating-hint":void 0,className:ne("w-full py-3.5 rounded-xl text-sm font-semibold [font-family:inherit] transition-all duration-200 border-none outline-none focus:outline-none active:outline-none focus:ring-0 active:ring-0","disabled:opacity-50 disabled:cursor-not-allowed",s?"bg-gray-700 text-gray-100 hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:tt(Mt?"submitting":"submitFeedback")}),0===kt&&!Mt&&g("div",{id:"resolve-rating-hint",role:"tooltip",className:"absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-md text-xs bg-gray-800 text-white opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:tt("selectRatingFirst")})]})]})}):Se&&!Me&&Pe?g(Wt,{questions:Ce,onPromptSuggestionClick:rt,collapsiblePrompt:ze,onSubmit:Pe,primaryColor:c,isRtl:zt,isDark:s,defaultLanguage:H}):h(p,{children:[Ie&&g("div",{role:"status",className:"mx-3 mt-1 mb-2 rounded-lg px-3 py-2 text-xs font-medium "+(s?"bg-amber-900/40 text-amber-200 border border-amber-700/50":"bg-amber-50 text-amber-800 border border-amber-200"),children:tt("sessionExpiringSoon")}),g(jt,{messages:v,isDark:s,primaryColor:c,isLoading:y,agentMessageBubbleColor:j,userMessageBoxColor:I,textColor:d,assistantTextColor:E,userTextColor:B,fontFamily:R,agentMessageBubbleFontFamily:D,agentMessageBubbleFontSize:V,userMessageBubbleFontFamily:O,userMessageBubbleFontSize:$,fontSize:U,formatTime:lo,isRtl:zt,defaultLanguage:H,quickQuestions:F,shouldShowQuickQuestions:Ut,onQuickQuestion:N??M,quickQuestionsLayout:A,onDecision:q,disclaimerEnabled:ue,disclaimerText:ge,disclaimerPosition:he,disclaimerLinkUrl:me,disclaimerLinkLabel:be,resolvedAgentBubbleColor:Tt,resolvedUserMessageColor:Lt,resolvedTextColor:Ft,isVoiceSessionActive:re,voiceStatus:ae,messagesContainerRef:Ze,companyLogo:b,chatbotAvatarEnabled:w,chatbotAvatar:f,conciergeName:u,companyName:m,apiBaseUrl:fe,getAuthToken:ye,onPromptSuggestionClick:rt,conversationResetKey:ke,allowFeedback:De,provideCitations:Ve,onFeedback:Oe,onRetryMessage:$e,headerTextColor:Y,beforePromptsSlot:$t?g(Yt,{categories:qe,selectedCategoryId:_e?.category||null,onSelect:Dt,isDark:s,primaryColor:c,fontFamily:R,fontSize:U,isRtl:zt,label:tt("chooseTopicLabel")}):null,quickQuestionsHeadingLabel:Vt?tt("quickQuestionsHeadingLabel"):void 0}),ht&&Te&&!mt&&g("div",{className:"",children:g(Xt,{format:co(Fe),prompt:Le||tt("howWasYourExperience"),onRating:async(e,t)=>{bt(!0),pt(!1),(e=>{try{const t=pe(e);if(!t)return;t.csatSubmitted=!0,localStorage.setItem(`${le}_${e}`,JSON.stringify(t))}catch{}})(void 0);try{const o={"Content-Type":"application/json"};if("function"==typeof ye){const e=await ye();e&&(o.Authorization=`Bearer ${e}`)}const r=await fetch(`${fe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:o,credentials:"include",body:JSON.stringify({conversationId:ke,rating:e,ratingFormat:t,conciergeId:xe})});r.ok||console.error("CSAT submission failed:",await r.text())}catch(e){console.error("CSAT submission error:",e)}},disabled:!1,isDark:s,primaryColor:c,defaultLanguage:H})})]})}),!(Se&&!Me)&&g(Ot,{onStopGeneration:l,inputValue:x,setInputValue:C,onSend:S,isDark:s,primaryColor:c,isOpen:e,isMinimized:i,isLoading:y,isConversationLoading:k,placeholder:Nt,textColor:Ft,fontFamily:R,userMessageBubbleFontFamily:O,userMessageBubbleFontSize:$,fontSize:U,isRtl:zt,csatVisible:ht&&Te&&!mt||Qt&&(wt||vt),enableVoiceInteraction:oe,isVoiceSessionActive:re,voiceStatus:ae,voiceError:ie,onVoiceToggle:ce,onBidiSubmit:de,disclaimerEnabled:ue,disclaimerText:ge,disclaimerPosition:he,disclaimerLinkUrl:me,disclaimerLinkLabel:be,showPoweredBy:we,defaultLanguage:H,onboardingQuestions:Ce,onboardingActive:Se,onboardingCompleted:Me,onboardingEnabled:Ae,userMessageBoxColor:I,resolvedUserMessageColor:Lt,userTextColor:B,promptSuggestions:wt||vt||!1===Ee||y?[]:po,onPromptSuggestionClick:rt,autoPromptQuestionDisplay:Be,tagSelectorNode:null,showResolveButton:Qt&&At&&!vt&&!wt&&!ht&&!Kt,onResolve:()=>{Qt&&ft(!0)},chatFeatures:Je,apiEndpoint:fe,organizationId:Xe,conversationId:ke})]})]})]})},go=new Map;const ho=i(({isDark:e,primaryColor:o,onToggle:r,textColor:a,headerTextColor:n,defaultLanguage:i="en",isOpen:s=!1,className:l},c)=>{const d=t(()=>X(i),[i]),u=n||"#FFFFFF";return h("button",{ref:c,onClick:r,className:`group relative w-16 h-16 rounded-full shadow-2xl transition-all duration-300 flex items-center justify-center text-white overflow-hidden hover:scale-110 ${l||""}`,style:{background:`linear-gradient(135deg, ${o} 0%, ${o}dd 100%)`,boxShadow:`0 10px 30px ${o}40`,border:"none"},"aria-label":d(s?"closeChat":"openChat"),"aria-expanded":s,"aria-controls":"chat-window-panel",children:[g("div",{className:"absolute inset-0 rounded-full bg-white/20 scale-0 group-hover:scale-100 transition-transform duration-500"}),g("div",{className:"relative z-10 transition-transform duration-300",children:g(Ue,{className:"w-7 h-7",style:{color:u}})})]})});ho.displayName="ToggleButton";const po="0.2.8",mo=({getAuthToken:i,apiBaseUrl:s,darkMode:l,primaryColor:c,position:d,companyName:u,conciergeName:p,companyLogo:m,welcomeMessage:b,quickQuestions:w,quickQuestionsEnabled:f,quickQuestionsLayout:v="vertical",textColor:y,agentMessageBubbleColor:k,userMessageBoxColor:x,assistantTextColor:C,userTextColor:S,fontFamily:M,fontSize:P,defaultLanguage:z,apiKey:T,agentMessageBubbleFontFamily:F,agentMessageBubbleFontSize:L,userMessageBubbleFontFamily:N,userMessageBubbleFontSize:A,autoOpen:j=!1,openDelay:I=0,locale:E,className:B="",headerTextBold:R,headerTextItalic:D,enableVoiceInteraction:V,disclaimerEnabled:O,disclaimerText:$,disclaimerPosition:U,disclaimerLinkUrl:H,disclaimerLinkLabel:q,showPoweredBy:W,onboardingQuestions:_,collectionPrompt:Y,allowedDomains:Q,onboardingEnabled:K,wsBaseUrl:G})=>{const[J,X]=o(null),[Z,ee]=o(!0),[te,oe]=o(null),[re,ne]=o(!1),ie=e.useRef(!1);n(()=>{if(ie.current)return;(async()=>{if(!s)return oe("apiBaseUrl is required"),void ee(!1);try{ee(!0);const e=await(async(e,t)=>{if(!e)throw new Error("apiBaseUrl is required");try{const o=e.replace(/\/$/,""),r=po?`${o}/api/v1/deploy-agent?wv=${encodeURIComponent(po)}`:`${o}/api/v1/deploy-agent`,a={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(a.Authorization=`Bearer ${e}`)}const n=await fetch(r,{method:"GET",headers:a,credentials:"include"});if(404===n.status)return null;if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return await n.json()}catch(e){throw console.error("Failed to fetch agent configuration:",e),e}})(s,i);if(null===e)return ie.current=!0,ne(!0),X(null),void oe(null);X(e),oe(null)}catch(e){console.error("Failed to load agent configuration:",e),oe(e.message||"Failed to load configuration")}finally{ee(!1)}})()},[s,i]);const se=t(()=>{if(!J)return null;const e=J.config??{},t=e.identity??{},o=e.branding??{},r=e.typography??{},a=e.messages??{},n=e.voice??{},i=e.onboarding??{},s=e.disclaimer??{},g=e.csat??{},h=e.inactivity??{},v=e.behavior??{},T=e.security??{},j=e.layout??{},I=z??a.defaultLocale??"en",E=a.bundles?.[I]??{},B=a.bundles?.en??{},G={welcome:E.welcome||B.welcome,quickQuestions:Array.isArray(E.quickQuestions)&&E.quickQuestions.length>0?E.quickQuestions:B.quickQuestions},X=Q??T.allowedDomains??(T.domains??[]).map(e=>"string"==typeof e?e:e.domain).filter(Boolean)??[];return{darkMode:l??!1,primaryColor:c??o.brandColor??"#2563eb",companyName:u??t.companyName??"Support Team",conciergeName:p??t.conciergeName,companyLogo:m??o.avatar??null,chatbotAvatarEnabled:o.chatbotAvatarEnabled??!1,chatbotAvatar:o.chatbotAvatar??null,welcomeMessage:b??G.welcome??"Hi! How can we help?",quickQuestions:w??G.quickQuestions??[],quickQuestionsEnabled:f??a.quickQuestionsEnabled,textColor:y??"#000000",agentMessageBubbleColor:k??r.agentMessageBubbleColor,userMessageBoxColor:x??r.userMessageBoxColor,assistantTextColor:C??r.assistantTextColor??"#000000",userTextColor:S??r.userTextColor??"#000000",fontFamily:M??r.agentMessageBubbleFontFamily??"Inter",fontSize:P??r.agentMessageBubbleFontSize??"14px",defaultLanguage:I,headerTextBold:R??r.headerTextBold??!1,headerTextItalic:D??r.headerTextItalic??!1,headerTextColor:r.headerTextColor??"#FFFFFF",headerFontFamily:r.headerFontFamily,headerFontSize:r.headerFontSize,subtitle:t.subtitle??null,showStatus:t.showStatus??!1,statusMode:t.statusMode??"always",officeHours:t.officeHours??null,enableVoiceInteraction:V??n.enableVoiceInteraction??!1,disclaimerEnabled:O??s.enabled??!1,disclaimerText:$??s.text,disclaimerPosition:U??(Z=s.position,Z?Z.toLowerCase():"top"),disclaimerLinkUrl:ae(H??s.linkUrl),disclaimerLinkLabel:q??s.linkLabel,showPoweredBy:W??o.showPoweredBy??!0,onboardingQuestions:_??i.questions??[],collectionPrompt:Y??i.collapsiblePrompt??"Before we begin, I need to verify your details.",allowedDomains:X,launcherPosition:d??(e=>e?e.toLowerCase().replace(/_/g,"-"):"bottom-right")(j.launcherPosition),onboardingEnabled:K??i.enabled??!1,inactivityTimeoutValue:h.timeoutValue??null,inactivityTimeoutUnit:h.timeoutUnit??null,agentMessageBubbleFontFamily:F??r.agentMessageBubbleFontFamily??M??"Inter",agentMessageBubbleFontSize:L??r.agentMessageBubbleFontSize??P??"14px",userMessageBubbleFontFamily:N??r.userMessageBubbleFontFamily??M??"Inter",userMessageBubbleFontSize:A??r.userMessageBubbleFontSize??P??"14px",csatEnabled:g.enabled??!1,csatFormat:g.format??"EMOJI",csatPrompt:g.prompt??"How was your experience?",autoPromptEnabled:v.autoPromptEnabled??!0,autoPromptQuestionDisplay:v.autoPromptQuestionDisplay??!0,autoPromptClickTelemetry:v.autoPromptClickTelemetry??!0,allowFeedback:v.allowFeedback??!0,provideCitations:v.provideCitations??!0,organizationId:J.organizationId??null,chatFeatures:e.chatFeatures??null};var Z},[J,l,c,d,u,p,m,b,w,f,y,k,x,C,S,M,P,z,R,D,V,O,$,U,q,H,W,_,K,Y,Q,F,L,N,A]),le=t(()=>!se||((e=[])=>{if("undefined"==typeof window)return!1;const t=window.location.hostname.toLowerCase(),o=window.location.host.toLowerCase();return!(!e||0===e.length)&&e.some(e=>{const r=e.toLowerCase().trim();return r.includes(":")?o===r:t===r||t.endsWith("."+r)})})(se.allowedDomains),[se]),ce=t(()=>({welcomeMessage:"Hi! How can we help?",quickQuestions:[],apiBaseUrl:s||"",apiKey:T||"",getAuthToken:i,autoOpen:!1,openDelay:0,darkMode:!1,enableVoiceInteraction:!1,onboardingQuestions:[],onboardingEnabled:!1,collectionPrompt:void 0}),[s,T,i]),{isOpen:de,isMinimized:ue,isDark:ge,messages:he,inputValue:pe,isLoading:me,widgetRef:be,setInputValue:we,handleSend:fe,stopGeneration:ve,handleQuickQuestion:ye,sendMessage:ke,retryMessage:xe,toggleChat:Ce,toggleTheme:Se,toggleMinimize:Me,closeChat:ze,handleDecision:Te,isVoiceSessionActive:Fe,voiceStatus:Le,voiceError:Ne,voiceConclusionForCsat:Ae,handleVoiceToggle:je,sendBidiTextMessage:Ie,onboardingActive:Ee,onboardingCompleted:Be,handleOnboardingFormSubmit:Re,conversationId:De,resetConversation:Ve,sessionExpiringSoon:Oe,updateMessageFeedback:$e,widgetFilter:Ue,setWidgetFilter:He,addAssistantMessage:qe}=Pe(se?{welcomeMessage:se.welcomeMessage,quickQuestions:se.quickQuestions,apiBaseUrl:s,wsBaseUrl:G??J?.wsBaseUrl,apiKey:T,locale:se.defaultLanguage||E,organizationId:se.organizationId,getAuthToken:i,autoOpen:j,openDelay:I,darkMode:se.darkMode,enableVoiceInteraction:se.enableVoiceInteraction,onboardingQuestions:se.onboardingQuestions,onboardingEnabled:se.onboardingEnabled,collectionPrompt:se.collectionPrompt,provideCitations:se.provideCitations,inactivityTimeoutValue:se.inactivityTimeoutValue,inactivityTimeoutUnit:se.inactivityTimeoutUnit,messageLimits:J?.messageLimits}:ce),We=r(null),_e=r(de);n(()=>{_e.current&&!de&&We.current?.focus(),_e.current=de},[de]);const Ye=a((e,t,o)=>{if($e(e,t),!De||!s)return;const r=s.replace(/\/$/,"");(async()=>{try{const a={"Content-Type":"application/json"};if("function"==typeof i){const e=await i();e&&(a.Authorization=`Bearer ${e}`)}await fetch(`${r}/api/v1/support/feedback`,{method:"POST",headers:a,credentials:"include",body:JSON.stringify({messageContent:e,conversationId:De,feedback:t,feedbackText:o})})}catch(e){console.error("Feedback submission error:",e)}})()},[De,s,i,$e]),Qe=a(()=>{Ve&&Ve()},[Ve]),{categories:Ke,hasFilters:Ge}=function(e,r){const a=!!e,[i,s]=o({categories:[],loading:a,error:null});n(()=>{if(!e)return void s({categories:[],loading:!1,error:null});const t=r?`${e}|__session__`:`${e}|__proxy__`,o=go.get(t);if(o)return void s({categories:o,loading:!1,error:null});let a=!1;s(e=>({...e,loading:!0,error:null}));const n=`${e.replace(/\/$/,"")}/api/v1/widget/filters`;return(async()=>{try{const e={Accept:"application/json"};if("function"==typeof r){const t=await r();t&&(e.Authorization=`Bearer ${t}`)}const o=await fetch(n,{method:"GET",headers:e});if(!o.ok)throw new Error(`filter catalog HTTP ${o.status}`);const i=await o.json(),l=Array.isArray(i?.categories)?i.categories:[];if(a)return;go.set(t,l),s({categories:l,loading:!1,error:null})}catch(e){if(a)return;console.warn("[useFilterCatalog] catalog fetch failed:",e),s({categories:[],loading:!1,error:e})}})(),()=>{a=!0}},[e,r]);const l=t(()=>Array.isArray(i.categories)&&i.categories.length>0,[i.categories]);return{...i,hasFilters:l}}(s,i),Je=a(()=>{const e=he.filter(e=>e.content&&""!==e.content.trim()).map(e=>`${"user"===e.role?"You":se?.conciergeName||"Assistant"}: ${e.content}`).join("\n\n");e&&navigator.clipboard.writeText(e).catch(()=>{})},[he,se?.conciergeName]);if(n(()=>{be.current&&se&&(be.current.style.setProperty("--cw-primary",se.primaryColor),se.fontFamily&&be.current.style.setProperty("--cw-font-family",se.fontFamily),se.textColor&&be.current.style.setProperty("--cw-text-color",se.textColor))},[se,be]),Z)return null;if(re)return null;if(te||!se)return console.error("ChatWidget configuration error:",te),null;if(!le)return null;const Xe={"bottom-right":"bottom-5 right-5","bottom-left":"bottom-5 left-5","top-right":"top-5 right-5","top-left":"top-5 left-5"};return g("div",{id:"chat-widget-root",children:h("div",{ref:be,className:`chat-widget-root fixed flex flex-col ${se.launcherPosition?.includes("left")?"items-start":"items-end"} z-[999999] ${ge?"dark":""} ${B} ${Xe[se.launcherPosition]||Xe["bottom-right"]}`,children:[g(uo,{isOpen:de,isMinimized:ue,isDark:ge,launcherPosition:se.launcherPosition,primaryColor:se.primaryColor,textColor:se.textColor,companyName:se.companyName,conciergeName:se.conciergeName,companyLogo:se.companyLogo,chatbotAvatarEnabled:se.chatbotAvatarEnabled,chatbotAvatar:se.chatbotAvatar,messages:he,isLoading:me,inputValue:pe,setInputValue:we,onSend:fe,onStopGeneration:ve,onDirectSend:ke,onToggleTheme:Se,onMinimize:Me,onClose:ze,quickQuestions:se.quickQuestions,quickQuestionsEnabled:se.quickQuestionsEnabled,onQuickQuestion:ye,quickQuestionsLayout:v,agentMessageBubbleColor:se.agentMessageBubbleColor,userMessageBoxColor:se.userMessageBoxColor,assistantTextColor:se.assistantTextColor,userTextColor:se.userTextColor,fontFamily:se.fontFamily,agentMessageBubbleFontFamily:se.agentMessageBubbleFontFamily,agentMessageBubbleFontSize:se.agentMessageBubbleFontSize,userMessageBubbleFontFamily:se.userMessageBubbleFontFamily,userMessageBubbleFontSize:se.userMessageBubbleFontSize,fontSize:se.fontSize,defaultLanguage:se.defaultLanguage||E,onDecision:Te,headerTextBold:se.headerTextBold,headerTextItalic:se.headerTextItalic,headerTextColor:se.headerTextColor,headerFontFamily:se.headerFontFamily,headerFontSize:se.headerFontSize,subtitle:se.subtitle,showStatus:se.showStatus,statusMode:se.statusMode,officeHours:se.officeHours,enableVoiceInteraction:se.enableVoiceInteraction,isVoiceSessionActive:Fe,voiceStatus:Le,voiceError:Ne,voiceConclusionForCsat:Ae,onVoiceToggle:je,onBidiSubmit:()=>Ie(pe),disclaimerEnabled:se.disclaimerEnabled,disclaimerText:se.disclaimerText,disclaimerPosition:se.disclaimerPosition,disclaimerLinkUrl:se.disclaimerLinkUrl,disclaimerLinkLabel:se.disclaimerLinkLabel,showPoweredBy:se.showPoweredBy,apiBaseUrl:s,apiKey:T,getAuthToken:i,conversationId:De,conciergeId:J?.conciergeId??J?.id,onboardingQuestions:se.onboardingQuestions,onboardingActive:Ee,onboardingCompleted:Be,onOnboardingFormSubmit:Re,collectionPrompt:se.collectionPrompt,csatEnabled:se.csatEnabled,csatFormat:se.csatFormat,csatPrompt:se.csatPrompt,onboardingEnabled:se.onboardingEnabled,onResetConversation:Ve,sessionExpiringSoon:Oe,autoPromptEnabled:se.autoPromptEnabled,autoPromptQuestionDisplay:se.autoPromptQuestionDisplay,autoPromptClickTelemetry:se.autoPromptClickTelemetry,allowFeedback:se.allowFeedback,provideCitations:se.provideCitations,onFeedback:Ye,onRetryMessage:xe,onRefreshChat:Qe,onCopyChat:Je,filterCategories:Ke,showFilterStep:Ge,widgetFilter:Ue,onWidgetFilterChange:He,onSynthesizeAssistantMessage:qe,chatFeatures:se.chatFeatures,organizationId:se.organizationId}),g(ho,{ref:We,isDark:ge,primaryColor:se.primaryColor,onToggle:Ce,textColor:se.textColor,headerTextColor:se.headerTextColor,defaultLanguage:se.defaultLanguage||E,isOpen:de,className:de?"hidden":void 0})]})})};function bo(t){const o=r(null),a=r(null);return n(()=>{const e=o.current;if(!e||e.shadowRoot)return;const t=e.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=":host { all: initial; display: block; }",t.appendChild(r);const n=document.createElement("style");n.textContent='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.chat-widget-root{--cw-primary:#1d4ed8;--cw-primary-hover:#1e40af;--cw-status-success:160 84% 39%;--cw-status-success-bg:152 81% 96%;--cw-status-warning:35 100% 50%;--cw-status-warning-bg:34 100% 95%;--cw-status-error:350 89% 60%;--cw-status-error-bg:356 100% 97%;--cw-status-info:199 89% 48%;--cw-status-info-bg:204 100% 97%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.chat-widget-root.dark{--cw-status-success:158 64% 52%;--cw-status-success-bg:152 36% 14%;--cw-status-warning:38 92% 60%;--cw-status-warning-bg:36 33% 14%;--cw-status-error:350 89% 65%;--cw-status-error-bg:356 33% 16%;--cw-status-info:199 89% 58%;--cw-status-info-bg:204 33% 14%}.\\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}#chat-widget-root .chat-widget-root *{box-sizing:border-box;margin:0;padding:0}#chat-widget-root .chat-messages::-webkit-scrollbar{width:6px}#chat-widget-root .chat-messages::-webkit-scrollbar-track{background:transparent}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb{background:rgba(156,163,175,.5);border-radius:10px}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(156,163,175,.7)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb{background:rgba(75,85,99,.5)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(75,85,99,.7)}#chat-widget-root .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}#chat-widget-root .pointer-events-none{pointer-events:none}#chat-widget-root .visible{visibility:visible}#chat-widget-root .collapse{visibility:collapse}#chat-widget-root .static{position:static}#chat-widget-root .fixed{position:fixed}#chat-widget-root .absolute{position:absolute}#chat-widget-root .relative{position:relative}#chat-widget-root .sticky{position:sticky}#chat-widget-root .inset-0{inset:0}#chat-widget-root .-top-8{top:-2rem}#chat-widget-root .bottom-0{bottom:0}#chat-widget-root .bottom-5{bottom:1.25rem}#chat-widget-root .bottom-full{bottom:100%}#chat-widget-root .left-0{left:0}#chat-widget-root .left-1\\/2{left:50%}#chat-widget-root .left-5{left:1.25rem}#chat-widget-root .right-0{right:0}#chat-widget-root .right-5{right:1.25rem}#chat-widget-root .top-0{top:0}#chat-widget-root .top-1\\/2{top:50%}#chat-widget-root .top-5{top:1.25rem}#chat-widget-root .top-full{top:100%}#chat-widget-root .isolate{isolation:isolate}#chat-widget-root .z-10{z-index:10}#chat-widget-root .z-50{z-index:50}#chat-widget-root .z-\\[60\\]{z-index:60}#chat-widget-root .z-\\[70\\]{z-index:70}#chat-widget-root .z-\\[71\\]{z-index:71}#chat-widget-root .z-\\[999999\\]{z-index:999999}#chat-widget-root .z-\\[9999\\]{z-index:9999}#chat-widget-root .m-0{margin:0}#chat-widget-root .mx-2{margin-left:.5rem;margin-right:.5rem}#chat-widget-root .mx-3{margin-left:.75rem;margin-right:.75rem}#chat-widget-root .my-3{margin-bottom:.75rem;margin-top:.75rem}#chat-widget-root .my-4{margin-bottom:1rem;margin-top:1rem}#chat-widget-root .-mb-px{margin-bottom:-1px}#chat-widget-root .mb-1{margin-bottom:.25rem}#chat-widget-root .mb-1\\.5{margin-bottom:.375rem}#chat-widget-root .mb-2{margin-bottom:.5rem}#chat-widget-root .mb-3{margin-bottom:.75rem}#chat-widget-root .mb-4{margin-bottom:1rem}#chat-widget-root .mb-5{margin-bottom:1.25rem}#chat-widget-root .ml-1{margin-left:.25rem}#chat-widget-root .ms-0\\.5{margin-inline-start:.125rem}#chat-widget-root .mt-0\\.5{margin-top:.125rem}#chat-widget-root .mt-1{margin-top:.25rem}#chat-widget-root .mt-1\\.5{margin-top:.375rem}#chat-widget-root .mt-2{margin-top:.5rem}#chat-widget-root .mt-3{margin-top:.75rem}#chat-widget-root .mt-4{margin-top:1rem}#chat-widget-root .block{display:block}#chat-widget-root .inline-block{display:inline-block}#chat-widget-root .inline{display:inline}#chat-widget-root .flex{display:flex}#chat-widget-root .inline-flex{display:inline-flex}#chat-widget-root .table{display:table}#chat-widget-root .grid{display:grid}#chat-widget-root .hidden{display:none}#chat-widget-root .h-1\\.5{height:.375rem}#chat-widget-root .h-10{height:2.5rem}#chat-widget-root .h-11{height:2.75rem}#chat-widget-root .h-12{height:3rem}#chat-widget-root .h-16{height:4rem}#chat-widget-root .h-2{height:.5rem}#chat-widget-root .h-3{height:.75rem}#chat-widget-root .h-3\\.5{height:.875rem}#chat-widget-root .h-4{height:1rem}#chat-widget-root .h-5{height:1.25rem}#chat-widget-root .h-6{height:1.5rem}#chat-widget-root .h-7{height:1.75rem}#chat-widget-root .h-8{height:2rem}#chat-widget-root .h-\\[650px\\]{height:650px}#chat-widget-root .h-auto{height:auto}#chat-widget-root .h-full{height:100%}#chat-widget-root .h-px{height:1px}#chat-widget-root .max-h-\\[85vh\\]{max-height:85vh}#chat-widget-root .min-h-0{min-height:0}#chat-widget-root .min-h-\\[48px\\]{min-height:48px}#chat-widget-root .w-1\\.5{width:.375rem}#chat-widget-root .w-10{width:2.5rem}#chat-widget-root .w-11{width:2.75rem}#chat-widget-root .w-12{width:3rem}#chat-widget-root .w-16{width:4rem}#chat-widget-root .w-2{width:.5rem}#chat-widget-root .w-3{width:.75rem}#chat-widget-root .w-3\\.5{width:.875rem}#chat-widget-root .w-4{width:1rem}#chat-widget-root .w-44{width:11rem}#chat-widget-root .w-5{width:1.25rem}#chat-widget-root .w-6{width:1.5rem}#chat-widget-root .w-7{width:1.75rem}#chat-widget-root .w-8{width:2rem}#chat-widget-root .w-80{width:20rem}#chat-widget-root .w-96{width:24rem}#chat-widget-root .w-\\[380px\\]{width:380px}#chat-widget-root .w-full{width:100%}#chat-widget-root .min-w-0{min-width:0}#chat-widget-root .min-w-\\[60px\\]{min-width:60px}#chat-widget-root .min-w-full{min-width:100%}#chat-widget-root .max-w-\\[75\\%\\]{max-width:75%}#chat-widget-root .max-w-\\[92vw\\]{max-width:92vw}#chat-widget-root .max-w-full{max-width:100%}#chat-widget-root .max-w-none{max-width:none}#chat-widget-root .max-w-sm{max-width:24rem}#chat-widget-root .max-w-xs{max-width:20rem}#chat-widget-root .flex-1{flex:1 1 0%}#chat-widget-root .flex-shrink-0,#chat-widget-root .shrink-0{flex-shrink:0}#chat-widget-root .grow{flex-grow:1}#chat-widget-root .border-collapse{border-collapse:collapse}#chat-widget-root .-translate-x-1\\/2{--tw-translate-x:-50%}#chat-widget-root .-translate-x-1\\/2,#chat-widget-root .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .-translate-y-1\\/2{--tw-translate-y:-50%}#chat-widget-root .-rotate-90{--tw-rotate:-90deg}#chat-widget-root .-rotate-90,#chat-widget-root .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .rotate-180{--tw-rotate:180deg}#chat-widget-root .rotate-90{--tw-rotate:90deg}#chat-widget-root .rotate-90,#chat-widget-root .scale-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-0{--tw-scale-x:0;--tw-scale-y:0}#chat-widget-root .scale-100{--tw-scale-x:1;--tw-scale-y:1}#chat-widget-root .scale-100,#chat-widget-root .scale-110{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}#chat-widget-root .scale-125{--tw-scale-x:1.25;--tw-scale-y:1.25}#chat-widget-root .scale-125,#chat-widget-root .scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-95{--tw-scale-x:.95;--tw-scale-y:.95}#chat-widget-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}#chat-widget-root .animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}#chat-widget-root .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}#chat-widget-root .animate-spin{animation:spin 1s linear infinite}#chat-widget-root .cursor-ew-resize{cursor:ew-resize}#chat-widget-root .cursor-nesw-resize{cursor:nesw-resize}#chat-widget-root .cursor-not-allowed{cursor:not-allowed}#chat-widget-root .cursor-ns-resize{cursor:ns-resize}#chat-widget-root .cursor-nwse-resize{cursor:nwse-resize}#chat-widget-root .cursor-pointer{cursor:pointer}#chat-widget-root .resize-none{resize:none}#chat-widget-root .resize{resize:both}#chat-widget-root .list-decimal{list-style-type:decimal}#chat-widget-root .list-disc{list-style-type:disc}#chat-widget-root .list-none{list-style-type:none}#chat-widget-root .flex-row{flex-direction:row}#chat-widget-root .flex-row-reverse{flex-direction:row-reverse}#chat-widget-root .flex-col{flex-direction:column}#chat-widget-root .flex-wrap{flex-wrap:wrap}#chat-widget-root .items-start{align-items:flex-start}#chat-widget-root .items-end{align-items:flex-end}#chat-widget-root .items-center{align-items:center}#chat-widget-root .justify-start{justify-content:flex-start}#chat-widget-root .justify-end{justify-content:flex-end}#chat-widget-root .justify-center{justify-content:center}#chat-widget-root .justify-between{justify-content:space-between}#chat-widget-root .gap-0{gap:0}#chat-widget-root .gap-0\\.5{gap:.125rem}#chat-widget-root .gap-1{gap:.25rem}#chat-widget-root .gap-1\\.5{gap:.375rem}#chat-widget-root .gap-2{gap:.5rem}#chat-widget-root .gap-2\\.5{gap:.625rem}#chat-widget-root .gap-3{gap:.75rem}#chat-widget-root .gap-4{gap:1rem}#chat-widget-root .gap-6{gap:1.5rem}#chat-widget-root :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root .overflow-hidden{overflow:hidden}#chat-widget-root .overflow-visible{overflow:visible}#chat-widget-root .overflow-x-auto{overflow-x:auto}#chat-widget-root .overflow-y-auto{overflow-y:auto}#chat-widget-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#chat-widget-root .whitespace-nowrap{white-space:nowrap}#chat-widget-root .whitespace-pre-wrap{white-space:pre-wrap}#chat-widget-root .break-words{overflow-wrap:break-word}#chat-widget-root .break-all{word-break:break-all}#chat-widget-root .rounded{border-radius:.25rem}#chat-widget-root .rounded-2xl{border-radius:1rem}#chat-widget-root .rounded-3xl{border-radius:1.5rem}#chat-widget-root .rounded-full{border-radius:9999px}#chat-widget-root .rounded-lg{border-radius:.5rem}#chat-widget-root .rounded-md{border-radius:.375rem}#chat-widget-root .rounded-xl{border-radius:.75rem}#chat-widget-root .rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}#chat-widget-root .rounded-tl-sm{border-top-left-radius:.125rem}#chat-widget-root .rounded-tr-sm{border-top-right-radius:.125rem}#chat-widget-root .border{border-width:1px}#chat-widget-root .border-0{border-width:0}#chat-widget-root .border-b{border-bottom-width:1px}#chat-widget-root .border-l-4{border-left-width:4px}#chat-widget-root .border-t{border-top-width:1px}#chat-widget-root .border-t-2{border-top-width:2px}#chat-widget-root .border-dotted{border-style:dotted}#chat-widget-root .border-none{border-style:none}#chat-widget-root .\\!border-status-error{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}#chat-widget-root .border-amber-700\\/50{border-color:rgba(180,83,9,.5)}#chat-widget-root .border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}#chat-widget-root .border-blue-700\\/50{border-color:rgba(29,78,216,.5)}#chat-widget-root .border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200\\/60{border-color:rgba(229,231,235,.6)}#chat-widget-root .border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700\\/50{border-color:rgba(55,65,81,.5)}#chat-widget-root .border-transparent{border-color:transparent}#chat-widget-root .bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}#chat-widget-root .bg-amber-900\\/40{background-color:rgba(120,53,15,.4)}#chat-widget-root .bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-900\\/30{background-color:rgba(30,58,138,.3)}#chat-widget-root .bg-current{background-color:currentColor}#chat-widget-root .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700\\/50{background-color:rgba(55,65,81,.5)}#chat-widget-root .bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-800\\/50{background-color:rgba(31,41,55,.5)}#chat-widget-root .bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}#chat-widget-root .bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}#chat-widget-root .bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}#chat-widget-root .bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}#chat-widget-root .bg-slate-50\\/50{background-color:rgba(248,250,252,.5)}#chat-widget-root .bg-slate-800\\/50{background-color:rgba(30,41,59,.5)}#chat-widget-root .bg-transparent{background-color:transparent}#chat-widget-root .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-white\\/10{background-color:hsla(0,0%,100%,.1)}#chat-widget-root .bg-white\\/20{background-color:hsla(0,0%,100%,.2)}#chat-widget-root .bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}#chat-widget-root .bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}#chat-widget-root .from-gray-50\\/50{--tw-gradient-from:rgba(249,250,251,.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(249,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/0{--tw-gradient-from:hsla(0,0%,100%,0) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/10{--tw-gradient-from:hsla(0,0%,100%,.1) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-yellow-200{--tw-gradient-from:#fef08a var(--tw-gradient-from-position);--tw-gradient-to:hsla(53,98%,77%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .via-white\\/5{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),hsla(0,0%,100%,.05) var(--tw-gradient-via-position),var(--tw-gradient-to)}#chat-widget-root .to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}#chat-widget-root .to-white\\/10{--tw-gradient-to:hsla(0,0%,100%,.1) var(--tw-gradient-to-position)}#chat-widget-root .to-yellow-400{--tw-gradient-to:#facc15 var(--tw-gradient-to-position)}#chat-widget-root .object-cover{-o-object-fit:cover;object-fit:cover}#chat-widget-root .p-0{padding:0}#chat-widget-root .p-0\\.5{padding:.125rem}#chat-widget-root .p-3{padding:.75rem}#chat-widget-root .p-5{padding:1.25rem}#chat-widget-root .p-6{padding:1.5rem}#chat-widget-root .p-8{padding:2rem}#chat-widget-root .px-1{padding-left:.25rem;padding-right:.25rem}#chat-widget-root .px-2{padding-left:.5rem;padding-right:.5rem}#chat-widget-root .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#chat-widget-root .px-3{padding-left:.75rem;padding-right:.75rem}#chat-widget-root .px-4{padding-left:1rem;padding-right:1rem}#chat-widget-root .px-5{padding-left:1.25rem;padding-right:1.25rem}#chat-widget-root .py-1{padding-bottom:.25rem;padding-top:.25rem}#chat-widget-root .py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#chat-widget-root .py-12{padding-bottom:3rem;padding-top:3rem}#chat-widget-root .py-2{padding-bottom:.5rem;padding-top:.5rem}#chat-widget-root .py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}#chat-widget-root .py-3{padding-bottom:.75rem;padding-top:.75rem}#chat-widget-root .py-3\\.5{padding-bottom:.875rem;padding-top:.875rem}#chat-widget-root .py-4{padding-bottom:1rem;padding-top:1rem}#chat-widget-root .pb-1{padding-bottom:.25rem}#chat-widget-root .pb-2{padding-bottom:.5rem}#chat-widget-root .pl-1{padding-left:.25rem}#chat-widget-root .pl-2{padding-left:.5rem}#chat-widget-root .pl-4{padding-left:1rem}#chat-widget-root .pl-\\[50px\\]{padding-left:50px}#chat-widget-root .pr-1{padding-right:.25rem}#chat-widget-root .pt-1{padding-top:.25rem}#chat-widget-root .text-left{text-align:left}#chat-widget-root .text-center{text-align:center}#chat-widget-root .text-right{text-align:right}#chat-widget-root .align-text-bottom{vertical-align:text-bottom}#chat-widget-root .font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}#chat-widget-root .text-2xl{font-size:1.5rem;line-height:2rem}#chat-widget-root .text-\\[10px\\]{font-size:10px}#chat-widget-root .text-base{font-size:1rem;line-height:1.5rem}#chat-widget-root .text-chip{font-size:11px;letter-spacing:0;line-height:1.4}#chat-widget-root .text-h4{font-size:18px;letter-spacing:0;line-height:1.3}#chat-widget-root .text-lg{font-size:1.125rem;line-height:1.75rem}#chat-widget-root .text-sm{font-size:.875rem;line-height:1.25rem}#chat-widget-root .text-xl{font-size:1.25rem;line-height:1.75rem}#chat-widget-root .text-xs{font-size:.75rem;line-height:1rem}#chat-widget-root .font-bold{font-weight:700}#chat-widget-root .font-medium{font-weight:500}#chat-widget-root .font-semibold{font-weight:600}#chat-widget-root .uppercase{text-transform:uppercase}#chat-widget-root .lowercase{text-transform:lowercase}#chat-widget-root .italic{font-style:italic}#chat-widget-root .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#chat-widget-root .leading-5{line-height:1.25rem}#chat-widget-root .leading-none{line-height:1}#chat-widget-root .leading-normal{line-height:1.5}#chat-widget-root .leading-relaxed{line-height:1.625}#chat-widget-root .leading-snug{line-height:1.375}#chat-widget-root .tracking-wide{letter-spacing:.025em}#chat-widget-root .text-\\[\\#4A5568\\]{--tw-text-opacity:1;color:rgb(74 85 104/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}#chat-widget-root .text-current{color:currentColor}#chat-widget-root .text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500\\/80{color:hsla(220,9%,46%,.8)}#chat-widget-root .text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}#chat-widget-root .text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}#chat-widget-root .text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}#chat-widget-root .text-status-error{color:hsl(var(--cw-status-error))}#chat-widget-root .text-status-success{color:hsl(var(--cw-status-success))}#chat-widget-root .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}#chat-widget-root .text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}#chat-widget-root .underline{text-decoration-line:underline}#chat-widget-root .no-underline{text-decoration-line:none}#chat-widget-root .placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .opacity-0{opacity:0}#chat-widget-root .opacity-50{opacity:.5}#chat-widget-root .opacity-60{opacity:.6}#chat-widget-root .opacity-70{opacity:.7}#chat-widget-root .opacity-75{opacity:.75}#chat-widget-root .opacity-80{opacity:.8}#chat-widget-root .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}#chat-widget-root .shadow,#chat-widget-root .shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}#chat-widget-root .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}#chat-widget-root .shadow-lg,#chat-widget-root .shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}#chat-widget-root .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}#chat-widget-root .shadow-sm,#chat-widget-root .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}#chat-widget-root .shadow-black\\/20{--tw-shadow-color:rgba(0,0,0,.2);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .shadow-gray-200\\/80{--tw-shadow-color:rgba(229,231,235,.8);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .outline-none{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .outline{outline-style:solid}#chat-widget-root .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring,#chat-widget-root .ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring-blue-100{--tw-ring-opacity:1;--tw-ring-color:rgb(219 234 254/var(--tw-ring-opacity,1))}#chat-widget-root .ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}#chat-widget-root .ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}#chat-widget-root .blur{--tw-blur:blur(8px)}#chat-widget-root .blur,#chat-widget-root .drop-shadow{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md,#chat-widget-root .drop-shadow-sm{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .drop-shadow-sm{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,0,0,.05))}#chat-widget-root .grayscale-\\[0\\.3\\]{--tw-grayscale:grayscale(0.3)}#chat-widget-root .filter,#chat-widget-root .grayscale-\\[0\\.3\\]{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#chat-widget-root .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .duration-150{transition-duration:.15s}#chat-widget-root .duration-200{transition-duration:.2s}#chat-widget-root .duration-300{transition-duration:.3s}#chat-widget-root .duration-500{transition-duration:.5s}#chat-widget-root :is(#chat-widget-root .animate-in){animation:slideIn .3s ease-out}#chat-widget-root :is(#chat-widget-root .transition-all){transition-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .\\[font-family\\:inherit\\]{font-family:inherit}#chat-widget-root .placeholder\\:text-\\[\\#8C8C8C\\]::-moz-placeholder{--tw-text-opacity:1;color:rgb(140 140 140/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#8C8C8C\\]::placeholder{--tw-text-opacity:1;color:rgb(140 140 140/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::-moz-placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x:1.02;--tw-scale-y:1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:border-blue-600:hover{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-blue-500\\/20:hover{background-color:rgba(59,130,246,.2)}#chat-widget-root .hover\\:bg-blue-900\\/50:hover{background-color:rgba(30,58,138,.5)}#chat-widget-root .hover\\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-transparent:hover{background-color:transparent}#chat-widget-root .hover\\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-200:hover{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:underline:hover{text-decoration-line:underline}#chat-widget-root .hover\\:opacity-80:hover{opacity:.8}#chat-widget-root .hover\\:opacity-90:hover{opacity:.9}#chat-widget-root .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .hover\\:grayscale-0:hover{--tw-grayscale:grayscale(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .focus\\:\\!border-status-error:focus{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .focus\\:border-\\[\\#5A6069\\]:focus{--tw-border-opacity:1;border-color:rgb(90 96 105/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:border-\\[\\#B0B0B0\\]:focus{--tw-border-opacity:1;border-color:rgb(176 176 176/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus\\:ring-gray-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}#chat-widget-root .focus\\:ring-gray-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity,1))}#chat-widget-root .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus-visible\\:ring-white\\/40:focus-visible{--tw-ring-color:hsla(0,0%,100%,.4)}#chat-widget-root .active\\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.97\\]:active{--tw-scale-x:0.97;--tw-scale-y:0.97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.98\\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.99\\]:active{--tw-scale-x:0.99;--tw-scale-y:0.99;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:outline-none:active{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .active\\:ring-0:active{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#chat-widget-root .disabled\\:opacity-40:disabled{opacity:.4}#chat-widget-root .disabled\\:opacity-50:disabled{opacity:.5}#chat-widget-root .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root :is(.group:hover .group-hover\\:scale-100){--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root :is(.group:hover .group-hover\\:opacity-100){opacity:1}#chat-widget-root .dark\\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .dark\\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}#chat-widget-root .rtl\\:rounded-tl-2xl:where([dir=rtl],[dir=rtl] *){border-top-left-radius:1rem}#chat-widget-root .rtl\\:rounded-tr-sm:where([dir=rtl],[dir=rtl] *){border-top-right-radius:.125rem}#chat-widget-root .\\[\\&\\:first-child\\]\\:\\!mt-0:first-child{margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:first-child\\]\\:\\!mt-0>:first-child){margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:last-child\\]\\:\\!mb-0>:last-child){margin-bottom:0!important}\n.chat-widget-root{position:fixed;z-index:999999}.chat-widget-container{color:var(--cw-text-color,inherit);font-family:var(\n --cw-font-family,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif\n )}#chat-widget-root .chat-messages p{overflow-wrap:anywhere;word-break:break-word}textarea#chat-widget-input::-moz-placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input::placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input{border:none;line-height:48px;outline:none}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}#chat-widget-root .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}#chat-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}#chat-widget-root .slim-scrollbar-x{scrollbar-width:thin}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar{height:3px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-track{background:transparent!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb{background:#d1d5db!important;border-radius:2px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb:hover{background:#9ca3af!important}@media print{.chat-widget-root{display:none!important}}',t.appendChild(n);const i=document.createElement("div");i.id="chat-widget-mount",t.appendChild(i),a.current=u(i)},[]),n(()=>{a.current?.render(e.createElement(mo,t))}),n(()=>()=>{const e=a.current;a.current=null,queueMicrotask(()=>e?.unmount())},[]),g("div",{ref:o,id:"chat-widget-host"})}export{Oe as F,$e as L,bo as S,lt as W,Ae as c,nt as s};