@helpai/elements 0.62.0 → 0.62.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/elements-web-component.esm.js +2 -2
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +9 -9
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +10 -10
- package/elements.esm.js.map +3 -3
- package/elements.js +2 -2
- package/elements.js.map +3 -3
- package/index.mjs +9 -6
- package/package.json +1 -1
- package/web-component.mjs +9 -6
package/elements.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var HelpAI=(()=>{var Cr=Object.defineProperty;var Dd=Object.getOwnPropertyDescriptor;var Od=Object.getOwnPropertyNames;var $d=Object.prototype.hasOwnProperty;var Fd=(e,t,n)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Hd=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Od(t))!$d.call(e,a)&&a!==n&&Cr(e,a,{get:()=>t[a],enumerable:!(o=Dd(t,a))||o.enumerable});return e};var Bd=e=>Hd(Cr({},"__esModule",{value:!0}),e);var j=(e,t,n)=>Fd(e,typeof t!="symbol"?t+"":t,n);var Zm={};var x={id:"help-ai",name:"@helpai/elements",global:"HelpAI",tagName:"web-ai-chat",cssPrefix:"helpai",defaultBaseUrl:"https://help.ai",displayName:"Help AI",domain:"help.ai",siteUrl:"https://help.ai"};var ci={attach:"Attach files",attachmentMimeRejected:"File type not supported",attachmentTooLarge:"File is too large",attachmentTooMany:"Attachment limit reached",conversationClosed:"This chat is closed",conversationLoading:"Loading chat\u2026",close:"Close",collapse:"Collapse",collapseSidebar:"Collapse sidebar",composerPlaceholder:"Type a message\u2026",dateLastWeek:"Last 7 days",dateOlder:"Older",dateToday:"Today",dateYesterday:"Yesterday",dropZone:"Drop files to attach",errorGeneric:"Something went wrong",errorRateLimited:"Too many requests \u2014 please try again in a moment.",errorRetry:"Retry",expand:"Expand",expandSidebar:"Expand sidebar",exitFullscreen:"Exit fullscreen",fullscreen:"Fullscreen",history:"History",historyBack:"Back to chat",historyEmpty:"No previous chats yet",historyLoading:"Loading your chats\u2026",historyContinue:"Continue the chat",historyTitle:"Chat history",language:"Language",launcherOpen:"Open chat",launcherLabel:"Chat with us",micStart:"Start voice input",micStop:"Stop voice input",micUnsupported:"Voice input is not supported in this browser",moreActions:"More actions",newConversation:"New chat",panelTitle:"Chat",resizeHandle:"Drag to resize",scrollToBottom:"Scroll to latest",send:"Send",soundOff:"Sound off",soundOn:"Sound on",startNewConversation:"Start a new chat",stop:"Stop",theme:"Theme",themeAuto:"Auto",themeDark:"Dark",themeLight:"Light",textSize:"Text size",textSizeSmall:"Small",textSizeNormal:"Normal",textSizeLarge:"Large",loading:"Loading\u2026",thinking:"Thinking\u2026",thoughts:"Thoughts",toolResult:"Result",sources:"Sources",feedbackUp:"Good response",feedbackDown:"Bad response",feedbackThanks:"Thanks for your feedback",copy:"Copy",copied:"Copied",tabHome:"Home",tabConversations:"Chats",tabHelp:"Help",tabNews:"News",modulesEmpty:"Nothing here yet",moduleBack:"Back",contentLoading:"Loading\u2026",homeGreeting:"How can we help?",homeGreetingNamed:"Hi {name} \u{1F44B}",homeGreetingLead:"How can we help?",homeSearchPlaceholder:"Search for help",homeContentTitle:"Popular articles",homeStatus:"Status",helpTitle:"Help",helpSearchPlaceholder:"Search for help",helpEmpty:"No help articles yet",helpLoading:"Loading help\u2026",helpSearchEmpty:"No results found",newsTitle:"News",newsEmpty:"No news yet",newsLoading:"Loading news\u2026",newsBack:"Back to news",newsPublishedAt:"Published {date}",formSubmit:"Submit",formSkip:"Maybe later",formSubmitted:"Completed",formSkipped:"Maybe later",formFillOut:"Fill out",formRequired:"This field is required",formInvalidEmail:"Enter a valid email address",formInvalidTel:"Enter a valid phone number",formInvalidUrl:"Enter a valid URL",formInvalidNumber:"Enter a valid number",formTooShort:"Too short (min {min} characters)",formTooLong:"Too long (max {max} characters)",formNumberTooSmall:"Must be at least {min}",formNumberTooLarge:"Must be at most {max}",formPatternMismatch:"Please match the requested format",formChooseAtLeast:"Choose at least {min}",formChooseAtMost:"Choose at most {max}",formOther:"Other",formOtherPlaceholder:"Type your answer\u2026",inputRequired:"Questions for you",inputBadge:"Questions",inputAnswered:"Answered",inputSkipped:"Skipped",showOptions:"Show options",hideOptions:"Hide options",qtypeText:"Your answer",qtypeEmail:"Email address",qtypePhone:"Phone number",qtypeNumber:"Number",qtypeDate:"Date",qtypeChooseOne:"Pick one",qtypeChooseAny:"Pick any",qtypeBoolean:"Yes / No",inputSubmit:"Submit answers",inputSubmitHint:"Enter to send \xB7 Shift+Enter = new line",inputSkip:"Skip",confirmYes:"Yes",confirmNo:"No",approve:"Approve",reject:"Reject",approvalPrompt:"{tool} requires your approval to execute.",approvalBody:"Review the tool input above and decide whether to allow this action.",approvalYourResponse:"Your response: {decision}",approvalEditHint:"You can edit this response until this step continues.",approvalSubmitting:"Response submitted. Request in progress\u2026",edit:"Edit",toolParameters:"Parameters",statusAwaiting:"Awaiting Approval",statusResponded:"Responded",statusRunning:"Running",statusCompleted:"Completed",statusDenied:"Denied",statusError:"Error",statusSuperseded:"Skipped"},zd={attach:"Joindre des fichiers",attachmentMimeRejected:"Type de fichier non pris en charge",attachmentTooLarge:"Le fichier est trop volumineux",attachmentTooMany:"Limite de pi\xE8ces jointes atteinte",conversationClosed:"Ce chat est ferm\xE9",conversationLoading:"Chargement du chat\u2026",close:"Fermer",collapse:"R\xE9duire",collapseSidebar:"R\xE9duire la barre lat\xE9rale",composerPlaceholder:"\xC9crivez un message\u2026",dateLastWeek:"7 derniers jours",dateOlder:"Plus ancien",dateToday:"Aujourd'hui",dateYesterday:"Hier",dropZone:"D\xE9posez les fichiers \xE0 joindre",errorGeneric:"Une erreur s'est produite",errorRateLimited:"Trop de requ\xEAtes \u2014 veuillez r\xE9essayer dans un instant.",errorRetry:"R\xE9essayer",expand:"Agrandir",expandSidebar:"D\xE9velopper la barre lat\xE9rale",exitFullscreen:"Quitter le plein \xE9cran",fullscreen:"Plein \xE9cran",history:"Historique",historyBack:"Retour au chat",historyEmpty:"Aucun chat pour le moment",historyContinue:"Poursuivre le chat",historyLoading:"Chargement de vos chats\u2026",historyTitle:"Historique des chats",language:"Langue",launcherOpen:"Ouvrir le chat",launcherLabel:"Discuter avec nous",micStart:"D\xE9marrer la saisie vocale",micStop:"Arr\xEAter la saisie vocale",micUnsupported:"La saisie vocale n'est pas prise en charge par ce navigateur",moreActions:"Plus d'actions",newConversation:"Nouveau chat",panelTitle:"Chat",resizeHandle:"Glisser pour redimensionner",scrollToBottom:"Aller au plus r\xE9cent",send:"Envoyer",soundOff:"Son d\xE9sactiv\xE9",soundOn:"Son activ\xE9",startNewConversation:"D\xE9marrer un nouveau chat",stop:"Arr\xEAter",theme:"Th\xE8me",themeAuto:"Auto",themeDark:"Sombre",themeLight:"Clair",textSize:"Taille du texte",textSizeSmall:"Petite",textSizeNormal:"Normale",textSizeLarge:"Grande",loading:"Chargement\u2026",thinking:"R\xE9flexion\u2026",thoughts:"R\xE9flexions",toolResult:"R\xE9sultat",sources:"Sources",feedbackUp:"Bonne r\xE9ponse",feedbackDown:"Mauvaise r\xE9ponse",feedbackThanks:"Merci pour votre retour",copy:"Copier",copied:"Copi\xE9",tabHome:"Accueil",tabConversations:"Chats",tabHelp:"Aide",tabNews:"Actualit\xE9s",modulesEmpty:"Rien pour le moment",moduleBack:"Retour",contentLoading:"Chargement\u2026",homeGreeting:"Comment pouvons-nous vous aider ?",homeGreetingNamed:"Bonjour {name} \u{1F44B}",homeGreetingLead:"Comment pouvons-nous vous aider ?",homeSearchPlaceholder:"Rechercher de l'aide",homeContentTitle:"Articles populaires",homeStatus:"Statut",helpTitle:"Aide",helpSearchPlaceholder:"Rechercher de l'aide",helpEmpty:"Aucun article d'aide pour le moment",helpLoading:"Chargement de l'aide\u2026",helpSearchEmpty:"Aucun r\xE9sultat trouv\xE9",newsTitle:"Actualit\xE9s",newsEmpty:"Aucune actualit\xE9 pour le moment",newsLoading:"Chargement des actualit\xE9s\u2026",newsBack:"Retour aux actualit\xE9s",newsPublishedAt:"Publi\xE9 le {date}",formSubmit:"Envoyer",formSkip:"Plus tard",formSubmitted:"Termin\xE9",formSkipped:"Plus tard",formFillOut:"Remplir",formRequired:"Ce champ est obligatoire",formInvalidEmail:"Saisissez une adresse e-mail valide",formInvalidTel:"Saisissez un num\xE9ro de t\xE9l\xE9phone valide",formInvalidUrl:"Saisissez une URL valide",formInvalidNumber:"Saisissez un nombre valide",formTooShort:"Trop court (min. {min} caract\xE8res)",formTooLong:"Trop long (max. {max} caract\xE8res)",formNumberTooSmall:"Doit \xEAtre au moins {min}",formNumberTooLarge:"Doit \xEAtre au plus {max}",formPatternMismatch:"Veuillez respecter le format demand\xE9",formChooseAtLeast:"Choisissez au moins {min}",formChooseAtMost:"Choisissez au plus {max}",formOther:"Autre",formOtherPlaceholder:"Saisissez votre r\xE9ponse\u2026",inputRequired:"Questions pour vous",inputBadge:"Questions",inputAnswered:"R\xE9pondu",inputSkipped:"Ignor\xE9",showOptions:"Afficher les options",hideOptions:"Masquer les options",qtypeText:"Votre r\xE9ponse",qtypeEmail:"Adresse e-mail",qtypePhone:"Num\xE9ro de t\xE9l\xE9phone",qtypeNumber:"Nombre",qtypeDate:"Date",qtypeChooseOne:"Choisir une",qtypeChooseAny:"Choisir plusieurs",qtypeBoolean:"Oui / Non",inputSubmit:"Envoyer les r\xE9ponses",inputSubmitHint:"Entr\xE9e pour envoyer \xB7 Maj+Entr\xE9e = saut de ligne",inputSkip:"Ignorer",confirmYes:"Oui",confirmNo:"Non",approve:"Approuver",reject:"Refuser",approvalPrompt:"{tool} n\xE9cessite votre approbation pour s'ex\xE9cuter.",approvalBody:"V\xE9rifiez les param\xE8tres ci-dessus et d\xE9cidez d'autoriser ou non cette action.",approvalYourResponse:"Votre r\xE9ponse : {decision}",approvalEditHint:"Vous pouvez modifier votre r\xE9ponse jusqu'\xE0 la reprise de cette \xE9tape.",approvalSubmitting:"R\xE9ponse envoy\xE9e. Traitement en cours\u2026",edit:"Modifier",toolParameters:"Param\xE8tres",statusAwaiting:"En attente d'approbation",statusResponded:"R\xE9pondu",statusRunning:"En cours",statusCompleted:"Termin\xE9",statusDenied:"Refus\xE9",statusError:"Erreur",statusSuperseded:"Ignor\xE9"},Ud={attach:"\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641\u0627\u062A",attachmentMimeRejected:"\u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",attachmentTooLarge:"\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627",attachmentTooMany:"\u062A\u0645 \u0628\u0644\u0648\u063A \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0645\u0631\u0641\u0642\u0627\u062A",conversationClosed:"\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",conversationLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0629\u2026",close:"\u0625\u063A\u0644\u0627\u0642",collapse:"\u0637\u064A\u0651",collapseSidebar:"\u0637\u064A\u0651 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",composerPlaceholder:"\u0627\u0643\u062A\u0628 \u0631\u0633\u0627\u0644\u0629\u2026",dateLastWeek:"\u0622\u062E\u0631 \u0667 \u0623\u064A\u0627\u0645",dateOlder:"\u0623\u0642\u062F\u0645",dateToday:"\u0627\u0644\u064A\u0648\u0645",dateYesterday:"\u0623\u0645\u0633",dropZone:"\u0623\u0641\u0644\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0644\u0625\u0631\u0641\u0627\u0642\u0647\u0627",errorGeneric:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0645\u0627",errorRateLimited:"\u0637\u0644\u0628\u0627\u062A \u0643\u062B\u064A\u0631\u0629 \u062C\u062F\u064B\u0627 \u2014 \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0628\u0639\u062F \u0644\u062D\u0638\u0629.",errorRetry:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",expand:"\u062A\u0648\u0633\u064A\u0639",expandSidebar:"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",exitFullscreen:"\u0625\u0646\u0647\u0627\u0621 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",fullscreen:"\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",history:"\u0627\u0644\u0633\u062C\u0644",historyBack:"\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",historyEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u062F\u0631\u062F\u0634\u0627\u062A \u0633\u0627\u0628\u0642\u0629 \u0628\u0639\u062F",historyContinue:"\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",historyLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u062F\u0631\u062F\u0634\u0627\u062A\u0643\u2026",historyTitle:"\u0633\u062C\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",language:"\u0627\u0644\u0644\u063A\u0629",launcherOpen:"\u0641\u062A\u062D \u0627\u0644\u062F\u0631\u062F\u0634\u0629",launcherLabel:"\u062A\u062D\u062F\u062B \u0645\u0639\u0646\u0627",micStart:"\u0628\u062F\u0621 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",micStop:"\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",micUnsupported:"\u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645 \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D",moreActions:"\u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629",newConversation:"\u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",panelTitle:"\u0627\u0644\u062F\u0631\u062F\u0634\u0629",resizeHandle:"\u0627\u0633\u062D\u0628 \u0644\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645",scrollToBottom:"\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0623\u062D\u062F\u062B",send:"\u0625\u0631\u0633\u0627\u0644",soundOff:"\u0643\u062A\u0645 \u0627\u0644\u0635\u0648\u062A",soundOn:"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0635\u0648\u062A",startNewConversation:"\u0628\u062F\u0621 \u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",stop:"\u0625\u064A\u0642\u0627\u0641",theme:"\u0627\u0644\u0645\u0638\u0647\u0631",themeAuto:"\u062A\u0644\u0642\u0627\u0626\u064A",themeDark:"\u062F\u0627\u0643\u0646",themeLight:"\u0641\u0627\u062A\u062D",textSize:"\u062D\u062C\u0645 \u0627\u0644\u0646\u0635",textSizeSmall:"\u0635\u063A\u064A\u0631",textSizeNormal:"\u0639\u0627\u062F\u064A",textSizeLarge:"\u0643\u0628\u064A\u0631",loading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",thinking:"\u064A\u0641\u0643\u0651\u0631\u2026",thoughts:"\u0627\u0644\u0623\u0641\u0643\u0627\u0631",toolResult:"\u0627\u0644\u0646\u062A\u064A\u062C\u0629",sources:"\u0627\u0644\u0645\u0635\u0627\u062F\u0631",feedbackUp:"\u0631\u062F \u062C\u064A\u062F",feedbackDown:"\u0631\u062F \u0633\u064A\u0626",feedbackThanks:"\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643",copy:"\u0646\u0633\u062E",copied:"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E",tabHome:"\u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",tabConversations:"\u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",tabHelp:"\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",tabNews:"\u0627\u0644\u0623\u062E\u0628\u0627\u0631",modulesEmpty:"\u0644\u0627 \u0634\u064A\u0621 \u0647\u0646\u0627 \u0628\u0639\u062F",moduleBack:"\u0631\u062C\u0648\u0639",contentLoading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",homeGreeting:"\u0643\u064A\u0641 \u064A\u0645\u0643\u0646\u0646\u0627 \u0645\u0633\u0627\u0639\u062F\u062A\u0643\u061F",homeGreetingNamed:"\u0645\u0631\u062D\u0628\u064B\u0627 {name} \u{1F44B}",homeGreetingLead:"\u0643\u064A\u0641 \u064A\u0645\u0643\u0646\u0646\u0627 \u0645\u0633\u0627\u0639\u062F\u062A\u0643\u061F",homeSearchPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0645\u0633\u0627\u0639\u062F\u0629",homeContentTitle:"\u0645\u0642\u0627\u0644\u0627\u062A \u0634\u0627\u0626\u0639\u0629",homeStatus:"\u0627\u0644\u062D\u0627\u0644\u0629",helpTitle:"\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",helpSearchPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0645\u0633\u0627\u0639\u062F\u0629",helpEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0645\u0642\u0627\u0644\u0627\u062A \u0645\u0633\u0627\u0639\u062F\u0629 \u0628\u0639\u062F",helpLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629\u2026",helpSearchEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C",newsTitle:"\u0627\u0644\u0623\u062E\u0628\u0627\u0631",newsEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0623\u062E\u0628\u0627\u0631 \u0628\u0639\u062F",newsLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0623\u062E\u0628\u0627\u0631\u2026",newsBack:"\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0623\u062E\u0628\u0627\u0631",newsPublishedAt:"\u0646\u064F\u0634\u0631 \u0641\u064A {date}",formSubmit:"\u0625\u0631\u0633\u0627\u0644",formSkip:"\u0644\u0627\u062D\u0642\u064B\u0627",formSubmitted:"\u062A\u0645",formSkipped:"\u0644\u0627\u062D\u0642\u064B\u0627",formFillOut:"\u062A\u0639\u0628\u0626\u0629",formRequired:"\u0647\u0630\u0627 \u0627\u0644\u062D\u0642\u0644 \u0645\u0637\u0644\u0648\u0628",formInvalidEmail:"\u0623\u062F\u062E\u0644 \u0628\u0631\u064A\u062F\u064B\u0627 \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidTel:"\u0623\u062F\u062E\u0644 \u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidUrl:"\u0623\u062F\u062E\u0644 \u0631\u0627\u0628\u0637\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidNumber:"\u0623\u062F\u062E\u0644 \u0631\u0642\u0645\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formTooShort:"\u0642\u0635\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 {min} \u062D\u0631\u0641\u064B\u0627)",formTooLong:"\u0637\u0648\u064A\u0644 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 {max} \u062D\u0631\u0641\u064B\u0627)",formNumberTooSmall:"\u064A\u062C\u0628 \u0623\u0644\u0627 \u064A\u0642\u0644 \u0639\u0646 {min}",formNumberTooLarge:"\u064A\u062C\u0628 \u0623\u0644\u0627 \u064A\u0632\u064A\u062F \u0639\u0646 {max}",formPatternMismatch:"\u064A\u0631\u062C\u0649 \u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u0635\u064A\u063A\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629",formChooseAtLeast:"\u0627\u062E\u062A\u0631 {min} \u0639\u0644\u0649 \u0627\u0644\u0623\u0642\u0644",formChooseAtMost:"\u0627\u062E\u062A\u0631 {max} \u0639\u0644\u0649 \u0627\u0644\u0623\u0643\u062B\u0631",formOther:"\u0623\u062E\u0631\u0649",formOtherPlaceholder:"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643\u2026",inputRequired:"\u0623\u0633\u0626\u0644\u0629 \u0644\u0643",inputBadge:"\u0623\u0633\u0626\u0644\u0629",inputAnswered:"\u062A\u0645\u062A \u0627\u0644\u0625\u062C\u0627\u0628\u0629",inputSkipped:"\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A",showOptions:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",hideOptions:"\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",qtypeText:"\u0625\u062C\u0627\u0628\u062A\u0643",qtypeEmail:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",qtypePhone:"\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641",qtypeNumber:"\u0631\u0642\u0645",qtypeDate:"\u062A\u0627\u0631\u064A\u062E",qtypeChooseOne:"\u0627\u062E\u062A\u0631 \u0648\u0627\u062D\u062F\u064B\u0627",qtypeChooseAny:"\u0627\u062E\u062A\u0631 \u0623\u064A\u064B\u0627",qtypeBoolean:"\u0646\u0639\u0645 / \u0644\u0627",inputSubmit:"\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A",inputSubmitHint:"Enter \u0644\u0644\u0625\u0631\u0633\u0627\u0644 \xB7 Shift+Enter = \u0633\u0637\u0631 \u062C\u062F\u064A\u062F",inputSkip:"\u062A\u062E\u0637\u064D\u0651",confirmYes:"\u0646\u0639\u0645",confirmNo:"\u0644\u0627",approve:"\u0645\u0648\u0627\u0641\u0642\u0629",reject:"\u0631\u0641\u0636",approvalPrompt:"\u062A\u062A\u0637\u0644\u0628 {tool} \u0645\u0648\u0627\u0641\u0642\u062A\u0643 \u0644\u0644\u062A\u0646\u0641\u064A\u0630.",approvalBody:"\u0631\u0627\u062C\u0639 \u0645\u064F\u0639\u0637\u064A\u0627\u062A \u0627\u0644\u0623\u062F\u0627\u0629 \u0623\u0639\u0644\u0627\u0647 \u0648\u0642\u0631\u0651\u0631 \u0627\u0644\u0633\u0645\u0627\u062D \u0628\u0647\u0630\u0627 \u0627\u0644\u0625\u062C\u0631\u0627\u0621 \u0623\u0648 \u0631\u0641\u0636\u0647.",approvalYourResponse:"\u0631\u062F\u0651\u0643: {decision}",approvalEditHint:"\u064A\u0645\u0643\u0646\u0643 \u062A\u0639\u062F\u064A\u0644 \u0631\u062F\u0651\u0643 \u062D\u062A\u0649 \u062A\u0633\u062A\u0623\u0646\u0641 \u0647\u0630\u0647 \u0627\u0644\u062E\u0637\u0648\u0629.",approvalSubmitting:"\u062A\u0645 \u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0631\u062F. \u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0646\u0641\u064A\u0630\u2026",edit:"\u062A\u0639\u062F\u064A\u0644",toolParameters:"\u0627\u0644\u0645\u0639\u0637\u064A\u0627\u062A",statusAwaiting:"\u0628\u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u0645\u0648\u0627\u0641\u0642\u0629",statusResponded:"\u062A\u0645 \u0627\u0644\u0631\u062F",statusRunning:"\u0642\u064A\u062F \u0627\u0644\u062A\u0646\u0641\u064A\u0630",statusCompleted:"\u0645\u0643\u062A\u0645\u0644",statusDenied:"\u0645\u0631\u0641\u0648\u0636",statusError:"\u062E\u0637\u0623",statusSuperseded:"\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A"},qd={attach:"Adjuntar archivos",attachmentMimeRejected:"Tipo de archivo no admitido",attachmentTooLarge:"El archivo es demasiado grande",attachmentTooMany:"Se alcanz\xF3 el l\xEDmite de adjuntos",conversationClosed:"Este chat est\xE1 cerrado",conversationLoading:"Cargando chat\u2026",close:"Cerrar",collapse:"Contraer",collapseSidebar:"Contraer la barra lateral",composerPlaceholder:"Escribe un mensaje\u2026",dateLastWeek:"\xDAltimos 7 d\xEDas",dateOlder:"Anteriores",dateToday:"Hoy",dateYesterday:"Ayer",dropZone:"Suelta los archivos para adjuntarlos",errorGeneric:"Algo sali\xF3 mal",errorRateLimited:"Demasiadas solicitudes: int\xE9ntalo de nuevo en un momento.",errorRetry:"Reintentar",expand:"Ampliar",expandSidebar:"Expandir la barra lateral",exitFullscreen:"Salir de pantalla completa",fullscreen:"Pantalla completa",history:"Historial",historyBack:"Volver al chat",historyEmpty:"A\xFAn no tienes chats",historyContinue:"Continuar el chat",historyLoading:"Cargando tus chats\u2026",historyTitle:"Historial de chats",language:"Idioma",launcherOpen:"Abrir el chat",launcherLabel:"Chatea con nosotros",micStart:"Iniciar entrada de voz",micStop:"Detener entrada de voz",micUnsupported:"Este navegador no admite la entrada de voz",moreActions:"M\xE1s acciones",newConversation:"Nuevo chat",panelTitle:"Chat",resizeHandle:"Arrastra para cambiar el tama\xF1o",scrollToBottom:"Ir a lo m\xE1s reciente",send:"Enviar",soundOff:"Sonido desactivado",soundOn:"Sonido activado",startNewConversation:"Iniciar un chat nuevo",stop:"Detener",theme:"Tema",themeAuto:"Autom\xE1tico",themeDark:"Oscuro",themeLight:"Claro",textSize:"Tama\xF1o del texto",textSizeSmall:"Peque\xF1o",textSizeNormal:"Normal",textSizeLarge:"Grande",loading:"Cargando\u2026",thinking:"Pensando\u2026",thoughts:"Razonamiento",toolResult:"Resultado",sources:"Fuentes",feedbackUp:"Buena respuesta",feedbackDown:"Mala respuesta",feedbackThanks:"Gracias por tu opini\xF3n",copy:"Copiar",copied:"Copiado",tabHome:"Inicio",tabConversations:"Chats",tabHelp:"Ayuda",tabNews:"Novedades",modulesEmpty:"A\xFAn no hay nada aqu\xED",moduleBack:"Atr\xE1s",contentLoading:"Cargando\u2026",homeGreeting:"\xBFC\xF3mo podemos ayudarte?",homeGreetingNamed:"Hola, {name} \u{1F44B}",homeGreetingLead:"\xBFC\xF3mo podemos ayudarte?",homeSearchPlaceholder:"Buscar ayuda",homeContentTitle:"Art\xEDculos populares",homeStatus:"Estado",helpTitle:"Ayuda",helpSearchPlaceholder:"Buscar ayuda",helpEmpty:"A\xFAn no hay art\xEDculos de ayuda",helpLoading:"Cargando la ayuda\u2026",helpSearchEmpty:"No se encontraron resultados",newsTitle:"Novedades",newsEmpty:"A\xFAn no hay novedades",newsLoading:"Cargando novedades\u2026",newsBack:"Volver a novedades",newsPublishedAt:"Publicado el {date}",formSubmit:"Enviar",formSkip:"Quiz\xE1 m\xE1s tarde",formSubmitted:"Completado",formSkipped:"Quiz\xE1 m\xE1s tarde",formFillOut:"Completar",formRequired:"Este campo es obligatorio",formInvalidEmail:"Introduce un correo electr\xF3nico v\xE1lido",formInvalidTel:"Introduce un n\xFAmero de tel\xE9fono v\xE1lido",formInvalidUrl:"Introduce una URL v\xE1lida",formInvalidNumber:"Introduce un n\xFAmero v\xE1lido",formTooShort:"Demasiado corto (m\xEDn. {min} caracteres)",formTooLong:"Demasiado largo (m\xE1x. {max} caracteres)",formNumberTooSmall:"Debe ser al menos {min}",formNumberTooLarge:"Debe ser como m\xE1ximo {max}",formPatternMismatch:"Respeta el formato solicitado",formChooseAtLeast:"Elige al menos {min}",formChooseAtMost:"Elige como m\xE1ximo {max}",formOther:"Otro",formOtherPlaceholder:"Escribe tu respuesta\u2026",inputRequired:"Preguntas para ti",inputBadge:"Preguntas",inputAnswered:"Respondido",inputSkipped:"Omitido",showOptions:"Mostrar opciones",hideOptions:"Ocultar opciones",qtypeText:"Tu respuesta",qtypeEmail:"Correo electr\xF3nico",qtypePhone:"N\xFAmero de tel\xE9fono",qtypeNumber:"N\xFAmero",qtypeDate:"Fecha",qtypeChooseOne:"Elige una",qtypeChooseAny:"Elige varias",qtypeBoolean:"S\xED / No",inputSubmit:"Enviar respuestas",inputSubmitHint:"Enter para enviar \xB7 May\xFAs+Enter = nueva l\xEDnea",inputSkip:"Omitir",confirmYes:"S\xED",confirmNo:"No",approve:"Aprobar",reject:"Rechazar",approvalPrompt:"{tool} requiere tu aprobaci\xF3n para ejecutarse.",approvalBody:"Revisa los par\xE1metros de arriba y decide si permites esta acci\xF3n.",approvalYourResponse:"Tu respuesta: {decision}",approvalEditHint:"Puedes cambiar tu respuesta hasta que este paso contin\xFAe.",approvalSubmitting:"Respuesta enviada. Procesando\u2026",edit:"Editar",toolParameters:"Par\xE1metros",statusAwaiting:"Esperando aprobaci\xF3n",statusResponded:"Respondido",statusRunning:"En curso",statusCompleted:"Completado",statusDenied:"Denegado",statusError:"Error",statusSuperseded:"Omitido"},Wd={attach:"\u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D1\u05E6\u05D9\u05DD",attachmentMimeRejected:"\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA",attachmentTooLarge:"\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",attachmentTooMany:"\u05D4\u05D2\u05E2\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D4\u05DE\u05E8\u05D1\u05D9 \u05E9\u05DC \u05E7\u05D1\u05E6\u05D9\u05DD \u05DE\u05E6\u05D5\u05E8\u05E4\u05D9\u05DD",conversationClosed:"\u05D4\u05E6\u05F3\u05D0\u05D8 \u05D4\u05D6\u05D4 \u05E0\u05E1\u05D2\u05E8",conversationLoading:"\u05D8\u05D5\u05E2\u05DF \u05E6\u05F3\u05D0\u05D8\u2026",close:"\u05E1\u05D2\u05D9\u05E8\u05D4",collapse:"\u05DB\u05D9\u05D5\u05D5\u05E5",collapseSidebar:"\u05DB\u05D9\u05D5\u05D5\u05E5 \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",composerPlaceholder:"\u05DB\u05EA\u05D5\u05D1 \u05D4\u05D5\u05D3\u05E2\u05D4\u2026",dateLastWeek:"7 \u05D4\u05D9\u05DE\u05D9\u05DD \u05D4\u05D0\u05D7\u05E8\u05D5\u05E0\u05D9\u05DD",dateOlder:"\u05D9\u05E9\u05DF \u05D9\u05D5\u05EA\u05E8",dateToday:"\u05D4\u05D9\u05D5\u05DD",dateYesterday:"\u05D0\u05EA\u05DE\u05D5\u05DC",dropZone:"\u05E9\u05D7\u05E8\u05E8 \u05E7\u05D1\u05E6\u05D9\u05DD \u05DB\u05D3\u05D9 \u05DC\u05E6\u05E8\u05E3",errorGeneric:"\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9",errorRateLimited:"\u05D9\u05D5\u05EA\u05E8 \u05DE\u05D3\u05D9 \u05D1\u05E7\u05E9\u05D5\u05EA \u2014 \u05E0\u05E1\u05D4 \u05E9\u05D5\u05D1 \u05D1\u05E2\u05D5\u05D3 \u05E8\u05D2\u05E2.",errorRetry:"\u05E0\u05E1\u05D4 \u05E9\u05D5\u05D1",expand:"\u05D4\u05E8\u05D7\u05D1\u05D4",expandSidebar:"\u05D4\u05E8\u05D7\u05D1\u05EA \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",exitFullscreen:"\u05D9\u05E6\u05D9\u05D0\u05D4 \u05DE\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",fullscreen:"\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",history:"\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4",historyBack:"\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6\u05F3\u05D0\u05D8",historyEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E7\u05D5\u05D3\u05DE\u05D9\u05DD",historyContinue:"\u05D4\u05DE\u05E9\u05DA \u05E6\u05F3\u05D0\u05D8",historyLoading:"\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA\u2026",historyTitle:"\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",language:"\u05E9\u05E4\u05D4",launcherOpen:"\u05E4\u05EA\u05D9\u05D7\u05EA \u05E6\u05F3\u05D0\u05D8",launcherLabel:"\u05D3\u05D1\u05E8\u05D5 \u05D0\u05D9\u05EA\u05E0\u05D5",micStart:"\u05D4\u05EA\u05D7\u05DC\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",micStop:"\u05E2\u05E6\u05D9\u05E8\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",micUnsupported:"\u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF \u05D6\u05D4",moreActions:"\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",newConversation:"\u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",panelTitle:"\u05E6\u05F3\u05D0\u05D8",resizeHandle:"\u05D2\u05E8\u05D5\u05E8 \u05DC\u05E9\u05D9\u05E0\u05D5\u05D9 \u05D4\u05D2\u05D5\u05D3\u05DC",scrollToBottom:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05D7\u05D3\u05E9 \u05D1\u05D9\u05D5\u05EA\u05E8",send:"\u05E9\u05DC\u05D9\u05D7\u05D4",soundOff:"\u05D4\u05E9\u05EA\u05E7\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",soundOn:"\u05D4\u05E4\u05E2\u05DC\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",startNewConversation:"\u05D4\u05EA\u05D7\u05DC\u05EA \u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",stop:"\u05E2\u05E6\u05D9\u05E8\u05D4",theme:"\u05E2\u05E8\u05DB\u05EA \u05E0\u05D5\u05E9\u05D0",themeAuto:"\u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9",themeDark:"\u05DB\u05D4\u05D4",themeLight:"\u05D1\u05D4\u05D9\u05E8",textSize:"\u05D2\u05D5\u05D3\u05DC \u05D8\u05E7\u05E1\u05D8",textSizeSmall:"\u05E7\u05D8\u05DF",textSizeNormal:"\u05E8\u05D2\u05D9\u05DC",textSizeLarge:"\u05D2\u05D3\u05D5\u05DC",loading:"\u05D8\u05D5\u05E2\u05DF\u2026",thinking:"\u05D7\u05D5\u05E9\u05D1\u2026",thoughts:"\u05DE\u05D7\u05E9\u05D1\u05D5\u05EA",toolResult:"\u05EA\u05D5\u05E6\u05D0\u05D4",sources:"\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",feedbackUp:"\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",feedbackDown:"\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D2\u05E8\u05D5\u05E2\u05D4",feedbackThanks:"\u05EA\u05D5\u05D3\u05D4 \u05E2\u05DC \u05D4\u05DE\u05E9\u05D5\u05D1",copy:"\u05D4\u05E2\u05EA\u05E7",copied:"\u05D4\u05D5\u05E2\u05EA\u05E7",tabHome:"\u05D1\u05D9\u05EA",tabConversations:"\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",tabHelp:"\u05E2\u05D6\u05E8\u05D4",tabNews:"\u05D7\u05D3\u05E9\u05D5\u05EA",modulesEmpty:"\u05D0\u05D9\u05DF \u05DB\u05D0\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DB\u05DC\u05D5\u05DD",moduleBack:"\u05D7\u05D6\u05E8\u05D4",contentLoading:"\u05D8\u05D5\u05E2\u05DF\u2026",homeGreeting:"\u05DB\u05D9\u05E6\u05D3 \u05E0\u05D5\u05DB\u05DC \u05DC\u05E2\u05D6\u05D5\u05E8?",homeGreetingNamed:"\u05E9\u05DC\u05D5\u05DD {name} \u{1F44B}",homeGreetingLead:"\u05DB\u05D9\u05E6\u05D3 \u05E0\u05D5\u05DB\u05DC \u05DC\u05E2\u05D6\u05D5\u05E8?",homeSearchPlaceholder:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05E2\u05D6\u05E8\u05D4",homeContentTitle:"\u05DE\u05D0\u05DE\u05E8\u05D9\u05DD \u05E4\u05D5\u05E4\u05D5\u05DC\u05E8\u05D9\u05D9\u05DD",homeStatus:"\u05E1\u05D8\u05D8\u05D5\u05E1",helpTitle:"\u05E2\u05D6\u05E8\u05D4",helpSearchPlaceholder:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05E2\u05D6\u05E8\u05D4",helpEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DE\u05D0\u05DE\u05E8\u05D9 \u05E2\u05D6\u05E8\u05D4",helpLoading:"\u05D8\u05D5\u05E2\u05DF \u05E2\u05D6\u05E8\u05D4\u2026",helpSearchEmpty:"\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA",newsTitle:"\u05D7\u05D3\u05E9\u05D5\u05EA",newsEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05D7\u05D3\u05E9\u05D5\u05EA",newsLoading:"\u05D8\u05D5\u05E2\u05DF \u05D7\u05D3\u05E9\u05D5\u05EA\u2026",newsBack:"\u05D7\u05D6\u05E8\u05D4 \u05DC\u05D7\u05D3\u05E9\u05D5\u05EA",newsPublishedAt:"\u05E4\u05D5\u05E8\u05E1\u05DD \u05D1-{date}",formSubmit:"\u05E9\u05DC\u05D9\u05D7\u05D4",formSkip:"\u05D0\u05D7\u05E8 \u05DB\u05DA",formSubmitted:"\u05E0\u05E9\u05DC\u05D7",formSkipped:"\u05D3\u05D5\u05DC\u05D2",formFillOut:"\u05DE\u05D9\u05DC\u05D5\u05D9",formRequired:"\u05E9\u05D3\u05D4 \u05D7\u05D5\u05D1\u05D4",formInvalidEmail:"\u05D4\u05D6\u05DF \u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05EA\u05E7\u05D9\u05E0\u05D4",formInvalidTel:"\u05D4\u05D6\u05DF \u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05EA\u05E7\u05D9\u05DF",formInvalidUrl:"\u05D4\u05D6\u05DF \u05DB\u05EA\u05D5\u05D1\u05EA URL \u05EA\u05E7\u05D9\u05E0\u05D4",formInvalidNumber:"\u05D4\u05D6\u05DF \u05DE\u05E1\u05E4\u05E8 \u05EA\u05E7\u05D9\u05DF",formTooShort:"\u05E7\u05E6\u05E8 \u05DE\u05D3\u05D9 (\u05DC\u05E4\u05D7\u05D5\u05EA {min} \u05EA\u05D5\u05D5\u05D9\u05DD)",formTooLong:"\u05D0\u05E8\u05D5\u05DA \u05DE\u05D3\u05D9 (\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max} \u05EA\u05D5\u05D5\u05D9\u05DD)",formNumberTooSmall:"\u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05E4\u05D7\u05D5\u05EA {min}",formNumberTooLarge:"\u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max}",formPatternMismatch:"\u05D4\u05EA\u05D0\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D4\u05E0\u05D3\u05E8\u05E9\u05EA",formChooseAtLeast:"\u05D1\u05D7\u05E8 \u05DC\u05E4\u05D7\u05D5\u05EA {min}",formChooseAtMost:"\u05D1\u05D7\u05E8 \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max}",formOther:"\u05D0\u05D7\u05E8",formOtherPlaceholder:"\u05DB\u05EA\u05D5\u05D1 \u05D0\u05EA \u05EA\u05E9\u05D5\u05D1\u05EA\u05DA\u2026",inputRequired:"\u05E9\u05D0\u05DC\u05D5\u05EA \u05E2\u05D1\u05D5\u05E8\u05DA",inputBadge:"\u05E9\u05D0\u05DC\u05D5\u05EA",inputAnswered:"\u05E0\u05E2\u05E0\u05D4",inputSkipped:"\u05D3\u05D5\u05DC\u05D2",showOptions:"\u05D4\u05E6\u05D2 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",hideOptions:"\u05D4\u05E1\u05EA\u05E8 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",qtypeText:"\u05D4\u05EA\u05E9\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA",qtypeEmail:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",qtypePhone:"\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF",qtypeNumber:"\u05DE\u05E1\u05E4\u05E8",qtypeDate:"\u05EA\u05D0\u05E8\u05D9\u05DA",qtypeChooseOne:"\u05D1\u05D7\u05E8 \u05D0\u05D7\u05EA",qtypeChooseAny:"\u05D1\u05D7\u05E8 \u05DB\u05DE\u05D4",qtypeBoolean:"\u05DB\u05DF / \u05DC\u05D0",inputSubmit:"\u05E9\u05DC\u05D9\u05D7\u05EA \u05EA\u05E9\u05D5\u05D1\u05D5\u05EA",inputSubmitHint:"Enter \u05DC\u05E9\u05DC\u05D9\u05D7\u05D4 \xB7 Shift+Enter = \u05E9\u05D5\u05E8\u05D4 \u05D7\u05D3\u05E9\u05D4",inputSkip:"\u05D3\u05D9\u05DC\u05D5\u05D2",confirmYes:"\u05DB\u05DF",confirmNo:"\u05DC\u05D0",approve:"\u05D0\u05D9\u05E9\u05D5\u05E8",reject:"\u05D3\u05D7\u05D9\u05D9\u05D4",approvalPrompt:"\u05D4\u05DB\u05DC\u05D9 {tool} \u05D3\u05D5\u05E8\u05E9 \u05D0\u05EA \u05D0\u05D9\u05E9\u05D5\u05E8\u05DA \u05DB\u05D3\u05D9 \u05DC\u05E4\u05E2\u05D5\u05DC.",approvalBody:"\u05D1\u05D3\u05D5\u05E7 \u05D0\u05EA \u05E4\u05E8\u05DE\u05D8\u05E8\u05D9 \u05D4\u05DB\u05DC\u05D9 \u05E9\u05DC\u05DE\u05E2\u05DC\u05D4 \u05D5\u05D4\u05D7\u05DC\u05D8 \u05D0\u05DD \u05DC\u05D0\u05E9\u05E8 \u05E4\u05E2\u05D5\u05DC\u05D4 \u05D6\u05D5.",approvalYourResponse:"\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA: {decision}",approvalEditHint:"\u05E0\u05D9\u05EA\u05DF \u05DC\u05E2\u05E8\u05D5\u05DA \u05D0\u05EA \u05EA\u05D2\u05D5\u05D1\u05EA\u05DA \u05E2\u05D3 \u05E9\u05D4\u05E9\u05DC\u05D1 \u05D4\u05D6\u05D4 \u05D9\u05EA\u05D7\u05D3\u05E9.",approvalSubmitting:"\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E0\u05E9\u05DC\u05D7\u05D4. \u05DE\u05D1\u05E6\u05E2\u2026",edit:"\u05E2\u05E8\u05D9\u05DB\u05D4",toolParameters:"\u05E4\u05E8\u05DE\u05D8\u05E8\u05D9\u05DD",statusAwaiting:"\u05DE\u05DE\u05EA\u05D9\u05DF \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8",statusResponded:"\u05E0\u05E2\u05E0\u05D4",statusRunning:"\u05E4\u05D5\u05E2\u05DC",statusCompleted:"\u05D4\u05D5\u05E9\u05DC\u05DD",statusDenied:"\u05E0\u05D3\u05D7\u05D4",statusError:"\u05E9\u05D2\u05D9\u05D0\u05D4",statusSuperseded:"\u05D3\u05D5\u05DC\u05D2"},Vd={en:ci,fr:zd,ar:Ud,es:qd,he:Wd};function Xn(e,t){let n=di(e),o=Yn(t),a=n==="en"?{}:Vd[n]??{},i=o?t[n]??{}:t??{},l=o?t.en??{}:{};return{...ci,...a,...l,...i}}function di(e){return(e.split("-")[0]??"en").toLowerCase()}var Gd=new Set(["ar","he","iw","fa","ur","ps","sd","ug","yi","dv","ckb","ks","nqo","prs","syr"]);function _i(e){return Gd.has(di(e))}function Ie(e,t){return e[t]??t}function Yn(e){if(!e)return!1;for(let t of Object.values(e))if(t&&typeof t=="object")return!0;return!1}function ui(e,t){if(!(!e?.length||!t))return e.find(n=>n.locale===t)}function pi(e,t){let{translations:n,defaultLocale:o,...a}=e,i=ui(n,t);return i?{...a,title:i.title??a.title,description:i.description??a.description,content:i.content??a.content}:a}function mi(e,t){let{translations:n,defaultLocale:o,...a}=e,i=ui(n,t);if(!i)return a;let l=new Map((i.fields??[]).map(c=>[c.name,c])),s=a.fields.map(c=>{let _=l.get(c.name);if(!_)return c;let p=new Map((_.options??[]).map(h=>[h.value,h]));return{...c,label:_.label??c.label,placeholder:_.placeholder??c.placeholder,validationHint:_.validationHint??c.validationHint,options:c.options?.map(h=>{let d=p.get(h.value);return d?{...h,label:d.label??h.label,description:d.description??h.description}:h})}});return{...a,title:i.title??a.title,description:i.description??a.description,submitLabel:i.submitLabel??a.submitLabel,fields:s}}var Tr=class{get(t){try{return localStorage.getItem(t)}catch{return null}}set(t,n){try{localStorage.setItem(t,n)}catch{}}remove(t){try{localStorage.removeItem(t)}catch{}}},Jn=new Tr;var Ar=["off","error","warn","info","debug","trace"],Ir=x.cssPrefix,fi=`${Ir}.debug`,Kd=`__${x.global}_DEBUG__`,jd=`${Ir}-debug`,Qn=2,Er=null;function Xd(){if(typeof window>"u")return 2;try{let e=new URLSearchParams(window.location.search).get(jd);if(e!==null){let t=Rr(e);if(t>=0)return t}}catch{}try{let e=window.localStorage?.getItem(fi);if(e){let t=Rr(e);if(t>=0)return t}}catch{}return Reflect.get(window,Kd)?4:2}function Rr(e){if(e===!0||e==="1"||e==="true")return 4;if(e===!1||e==="0"||e==="false"||e==="off")return 0;if(typeof e=="number")return Math.max(0,Math.min(5,Math.floor(e)));if(typeof e=="string"){let t=Ar.indexOf(e);if(t>=0)return t}return-1}function Zn(e){let t=Rr(e);if(!(t<0)){Qn=t;try{window.localStorage?.setItem(fi,Ar[t])}catch{}}}function dn(){return Ar[Qn]}Qn=Xd();function gi(e){let t=`[${Ir}:${e}]`,n=(o,a,i)=>(l,s)=>{if(!(Qn<o)&&(s===void 0?console[a](t,l):console[a](t,l,s),Er))try{Er({level:i,scope:e,message:l,payload:s})}catch{}};return{error:n(1,"error","error"),warn:n(2,"warn","warn"),info:n(3,"info","info"),debug:n(4,"debug","debug"),trace:n(5,"debug","trace"),scope:o=>gi(`${e}:${o}`)}}var W=gi("core");function _n(e){Er=e}var ht=W.scope("context"),Yd=new Set(["visitorId","conversationId","conversationId","jwt","token","authorization","password"]),hi=50,Lr=1024,Jd=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Mr(e){return vi(e,"userContext",!0)}function Nr(e){return vi(e,"pageContext",!1)}function vi(e,t,n){if(e==null)return;if(typeof e!="object"||Array.isArray(e)){ht.warn(`ignored ${t} \u2014 expected an object`,{type:Array.isArray(e)?"array":typeof e});return}let o={},a=0;for(let[i,l]of Object.entries(e)){if(Yd.has(i)){ht.warn(`dropped reserved ${t} key "${i}" \u2014 managed by the widget, not host-settable`);continue}if(l==null)continue;if(a>=hi){ht.warn(`${t} truncated at ${hi} keys \u2014 dropped "${i}"`);continue}let s=Qd(t,i,l);s!==void 0&&(o[i]=s,a++)}return n&&typeof o.email=="string"&&!Jd.test(o.email)&&(ht.warn(`dropped malformed ${t}.email "${o.email}"`),delete o.email),Object.keys(o).length>0?o:void 0}function Qd(e,t,n){if(typeof n=="boolean")return n;if(typeof n=="number"){if(!Number.isFinite(n)){ht.warn(`dropped non-finite ${e}.${t}`);return}return n}if(typeof n=="string"){let o=n.trim();return o===""?void 0:o.length>Lr?(ht.warn(`truncated ${e}.${t} to ${Lr} chars`),o.slice(0,Lr)):o}ht.warn(`dropped ${e}.${t} \u2014 only string/number/boolean values are allowed`,{type:typeof n})}var eo={maxBytes:10485760,maxCount:10,accept:"*/*"},bi={voice:"local"},yi={list:[],byTrigger:{}},Dr={enabled:!0,sampleRate:1},to={upload:"/pai/upload-file",transcribe:"/pai/transcribe-audio",submitForm:"/pai/submit-form"},Dt={variant:"circle",size:"md",label:void 0,icon:"chat",hidden:!1},xi={floating:["theme","textSize","history","close","clear","expand","fullscreen","sound","language"],inline:["theme","textSize","history","close","clear","fullscreen","sound","language"],standalone:["theme","textSize","history","clear","sound","language"],page:["theme","textSize","history","clear","sound","language"],modal:["theme","textSize","history","close","clear","fullscreen","sound","language"],drawer:["theme","textSize","history","close","clear","fullscreen","sound","language"]},Or={enabled:!0,volume:.3,events:void 0},Pi={enabled:!0,events:void 0},Si=[{label:"tabConversations",layout:"chat"}];function ct(e){let t=e!==null&&typeof e=="object"?e:{},n=t.presentation??{},o=t.behavior??{},a=t.i18n??{},i=t.feedback??{},l=t.footer??{},s=t.header??{},{themeMode:c,themeOverrides:_}=Zd(t.theme),p=n.mode??"floating",h=e_(a.defaultLocale),d=a.availableLocales??[a.locale??h],f=Ot(a.locale??h,d,h),m=(t.baseUrl??x.defaultBaseUrl).replace(/\/$/,""),y=(t.agentApiBaseUrl??`${m}/api/agent`).replace(/\/$/,""),v=(t.dataApiBaseUrl??`${m}/api/data`).replace(/\/$/,"");return{widgetId:t.widgetId??"default",publicKey:t.publicKey,aiAgentDeploymentId:t.aiAgentDeploymentId,baseUrl:m,agentApiBaseUrl:y,dataApiBaseUrl:v,userContext:Mr(t.userContext),pageContext:Nr(t.pageContext),position:n.position??"bottom-right",themeMode:c,textSize:"normal",themeOverrides:_,mode:p,iframe:n.iframe??!1,responseMode:o.responseMode??"streaming",showReasoning:o.showReasoning??!1,showToolCalls:o.showToolCalls??!1,showSources:o.showSources??!1,enableMessageFeedback:!(o.disableMessageFeedback??!1),autoSendSuggestions:o.autoSendSuggestions??!1,features:{voice:t.features?.voice??bi.voice,fileUpload:!(t.features?.disableFileUpload??!1),humanInLoop:!(t.features?.disableHumanInLoop??!1),tools:t.features?.tools},forms:un(t.forms,f),endpoints:{upload:t.endpoints?.upload??to.upload,transcribe:t.endpoints?.transcribe??to.transcribe,submitForm:t.endpoints?.submitForm??to.submitForm},attachments:{accept:t.composer?.attachments?.accept??eo.accept,maxBytes:t.composer?.attachments?.maxBytes??eo.maxBytes,maxCount:t.composer?.attachments?.maxCount??eo.maxCount},locale:f,defaultLocale:h,availableLocales:d,startMinimized:o.startMinimized??!0,actions:t_(p,s.actions),size:n.size??{},launcher:c_(t.launcher),sound:n_(i.sound),haptics:o_(i.haptics),strings:Xn(f,a.strings),stringsOverride:a.strings,composerDisclaimer:l.composerDisclaimer??"",poweredBy:a_(l.poweredBy),composer:i_(t.composer),modules:s_(t.modules),tracking:r_(t.tracking,v),storage:t.storage??Jn,onMessage:t.onMessage,onOpen:t.onOpen,onClose:t.onClose,onError:t.onError}}function Zd(e){return typeof e=="string"?{themeMode:e,themeOverrides:{}}:e&&typeof e=="object"?{themeMode:"auto",themeOverrides:e}:{themeMode:"auto",themeOverrides:{}}}function e_(e){return e&&e!=="auto"?e:typeof navigator<"u"&&navigator.language?navigator.language:"en"}function Ot(e,t,n){return t.length<=1||t.includes(e)?e:t.includes(n)?n:t[0]??e}function t_(e,t){return t??xi[e]}function n_(e){return{enabled:e?.enabled??Or.enabled,volume:e?.volume??Or.volume,events:e?.events}}function o_(e){return{enabled:e?.enabled??Pi.enabled,events:e?.events}}function r_(e,t){let n=e?.sampleRate??Dr.sampleRate;return{enabled:e?.enabled??Dr.enabled,endpoint:e?.endpoint??`${t}/pai/elements-px.gif`,sampleRate:Math.min(1,Math.max(0,Number.isFinite(n)?n:1)),token:e?.token}}function a_(e){let n={...{text:`Powered by ${x.displayName}`,href:x.siteUrl},...e};return!!(n.text||n.logoUrl)?n:null}function i_(e){let t=e?.sendButton;return{sendButton:{shape:t?.shape??"circle",icon:t?.icon??"arrowUp",variant:t?.variant??"filled"}}}function s_(e){let t=e===void 0?Si:e,n=new Set,o=[];for(let i of t.slice(0,4)){if(!i?.label||!i?.layout)continue;let l=i.contentTags?.filter(Boolean),s=i.id??l?.[0]??i.layout;for(;n.has(s);)s=`${s}-${o.length}`;n.add(s);let c={id:s,label:i.label,layout:i.layout};l&&l.length>0&&(c.contentTags=l),i.layout==="home"&&(c.brandName=i.brandName,c.greetingText=i.greetingText,c.showGreeting=!(i.hideGreeting??!1),c.showSearchBar=!(i.hideSearchBar??!1),c.showRecentConversations=!(i.hideRecentConversations??!1),i.userAvatars&&i.userAvatars.length>0&&(c.userAvatars=i.userAvatars),i.status&&(c.status=i.status),c.contentBlockTitle=i.contentBlockTitle),o.push(c)}let a=Object.fromEntries(o.map(i=>[i.id,i]));return{list:o,byId:a}}function un(e,t){var i;if(!e?.length)return yi;let n=[],o=new Set;for(let l of e){if(!l?.id||o.has(l.id))continue;let s=mi(l,t),c=(s.fields??[]).filter(p=>!!(p&&p.name&&p.label&&p.type)),_=(Array.isArray(s.on)?s.on:[s.on]).map(l_).filter(p=>p!==null);c.length===0||_.length===0||(o.add(s.id),n.push({id:s.id,triggers:_,when:s.when,fields:c,title:s.title,description:s.description,submitLabel:s.submitLabel,skippable:s.skippable??!1,frequency:s.frequency??"once",mirrorToContext:s.mirrorToContext??!0,reopenable:s.reopenable??!0,reviewable:s.reviewable??!0}))}let a={};for(let l of n)for(let s of l.triggers)(a[i=s.kind]??(a[i]=[])).push(l);return{list:n,byTrigger:a}}function l_(e){if(typeof e!="string")return null;if(e==="pre-chat"||e==="conversation-closed"||e==="panel-close"||e==="manual")return{kind:e};let[t,n]=e.split(":",2);if(t==="after-messages"){let o=Number(n);return Number.isFinite(o)&&o>0?{kind:"after-messages",param:o}:null}if(t==="idle"){let o=Number(n);return Number.isFinite(o)&&o>0?{kind:"idle",param:o}:null}return t==="page-area"&&n?{kind:"page-area",param:n}:null}function c_(e){let t=e?.callout?.text?{shape:"pill",position:"auto",delayMs:1200,autoDismissMs:0,animated:!0,persistent:!0,...e.callout}:null;return{variant:e?.variant??Dt.variant,size:e?.size??Dt.size,label:e?.label??Dt.label,icon:e?.icon??Dt.icon,hidden:e?.hidden??Dt.hidden,callout:t}}function $r(e,t,n,o){let a=Ot(t,e.availableLocales,e.defaultLocale);if(a===e.locale&&n===e.themeMode&&o===e.textSize)return e;let i={...e};return a!==e.locale&&(i.locale=a,i.strings=Xn(a,e.stringsOverride)),n!==e.themeMode&&(i.themeMode=n),o!==e.textSize&&(i.textSize=o),i}var d_=["presentation","behavior","theme","launcher","header","composer","feedback","i18n","footer","features","tracking","endpoints"];function Fr(e,t){if(!t)return e;let n={...e};for(let i of d_){let l=t[i];if(l===void 0)continue;let s=e[i];if(i==="theme"){s===void 0&&(n[i]=l);continue}i!=="i18n"&&(n[i]=ki(l,s))}t.modules!==void 0&&e.modules===void 0&&(n.modules=t.modules),t.dataApiBaseUrl!==void 0&&e.dataApiBaseUrl===void 0&&(n.dataApiBaseUrl=t.dataApiBaseUrl);let o=e.i18n,a=t.i18n;if(o||a){let i=ki(a??{},o);a?.availableLocales!==void 0&&(i.availableLocales=a.availableLocales),a?.defaultLocale!==void 0&&(i.defaultLocale=a.defaultLocale);let l=o?.strings,s=a?.strings;(l||s)&&(i.strings=__(s,l)),n.i18n=i}return n}function ki(e,t){if(!t)return e;let n={...e};for(let[o,a]of Object.entries(t))a!==void 0&&(n[o]=a);return n}function __(e,t){if(!e)return t;if(!t)return e;let n=Yn(e),o=Yn(t);if(!n&&!o)return{...e,...t};let a={},i=n?e:{en:e},l=o?t:{en:t};for(let[s,c]of Object.entries(i))a[s]={...c};for(let[s,c]of Object.entries(l))a[s]={...a[s],...c};return a}var u_=["clear","expand","fullscreen","sound","history","language","theme","textSize","close"],tt=e=>e!=="false",Ci=e=>e.split(",").map(t=>t.trim()).filter(Boolean),Ti=[["public-key","publicKey"],["ai-agent-deployment-id","aiAgentDeploymentId"],["base-url","baseUrl"],["agent-api-base-url","agentApiBaseUrl"],["data-api-base-url","dataApiBaseUrl"],["theme","theme",e=>e]],Ei=[["mode","mode",e=>e],["position","position",e=>e],["iframe","iframe",tt]],Ri=[["width","width"],["height","height"]],Ai=[["response-mode","responseMode",e=>e],["start-minimized","startMinimized",tt],["show-reasoning","showReasoning",tt],["show-tool-calls","showToolCalls",tt],["show-sources","showSources",tt],["disable-message-feedback","disableMessageFeedback",tt],["auto-send-suggestions","autoSendSuggestions",tt]],Ii=[["locale","locale"]],p_=new Set(u_),m_=e=>Ci(e).filter(t=>p_.has(t)),Li=[["launcher-variant","variant",e=>e],["launcher-size","size",e=>e],["launcher-icon","icon"],["launcher-hidden","hidden",tt]],Mi=[["features-disable-file-upload","disableFileUpload",tt],["features-voice","voice",e=>e],["features-tools","tools",Ci]],Ni=[["endpoint-upload","upload"],["endpoint-transcribe","transcribe"]],Di=[["user-id","id"],["user-email","email"],["user-name","name"]],Oi=[["page-area","area"],["page-url","url"],["page-path","path"],["page-title","title"]],f_=["launcher-label","callout-text","callout-delay","actions-main","actions-overflow","user-context","page-context"],g_=[Ti,Ei,Ri,Ai,Ii,Li,Mi,Ni,Di,Oi],h_=new Set(["iframe","start-minimized"]),Hr=[...g_.flatMap(e=>e.map(([t])=>t).filter(t=>!h_.has(t))),...f_];function no(e){let t={},n=f=>{let m=e(f);return m===null||m===""?void 0:m};for(let[f,m,y]of Ti){let v=n(f);v!==void 0&&(t[m]=y?y(v):v)}let o=vt(n,Ei),a=vt(n,Ri);(o||a)&&(t.presentation={...o,...a?{size:a}:{}});let i=vt(n,Ai);i&&(t.behavior=i);let l=vt(n,Ii);l&&(t.i18n=l);let s=b_(e,n);s&&(t.launcher=s);let c=vt(n,Mi);c&&(t.features=c);let _=vt(n,Ni);_&&(t.endpoints=_);let p=wi(n,Di,"user-context");p&&(t.userContext=p);let h=wi(n,Oi,"page-context");h&&(t.pageContext=h);let d=n("actions");return d!==void 0&&(t.header={actions:m_(d)}),t}function Br(e){return e?no(t=>e[v_(t)]??null):{}}function v_(e){return e.replaceAll(/-([a-z])/g,(t,n)=>n.toUpperCase())}function vt(e,t){let n={};for(let[o,a,i]of t){let l=e(o);l!==void 0&&(n[a]=i?i(l):l)}return Object.keys(n).length>0?n:null}function wi(e,t,n){let o={};for(let[s,c]of t){let _=e(s);_!==void 0&&(o[c]=_)}let a={},i=e(n);if(i)try{let s=JSON.parse(i);s&&typeof s=="object"&&!Array.isArray(s)&&(a=s)}catch{}let l={...a,...o};return Object.keys(l).length>0?l:null}function b_(e,t){let n=vt(t,Li)??{},o=e("launcher-label");o!==null&&(n.label=o);let a=t("callout-text");if(a){let i=Number.parseInt(t("callout-delay")??"",10);n.callout={text:a,...Number.isFinite(i)?{delayMs:i}:{}}}return Object.keys(n).length>0?n:null}var co,Z,zi,Wr,dt,$i,Ui,qi,zr,ro,pn,Wi,Vr,Ur,qr,y_,io={},so=[],x_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,_o=Array.isArray;function nt(e,t){for(var n in t)e[n]=t[n];return e}function Gr(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function uo(e,t,n){var o,a,i,l={};for(i in t)i=="key"?o=t[i]:i=="ref"?a=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?co.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return ao(e,l,o,a,null)}function ao(e,t,n,o,a){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++zi,__i:-1,__u:0};return a==null&&Z.vnode!=null&&Z.vnode(i),i}function ie(e){return e.children}function _t(e,t){this.props=e,this.context=t}function $t(e,t){if(t==null)return e.__?$t(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?$t(e):null}function P_(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],a=[],i=nt({},t);i.__v=t.__v+1,Z.vnode&&Z.vnode(i),Kr(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??$t(t),!!(32&t.__u),a),i.__v=t.__v,i.__.__k[i.__i]=i,Xi(o,i,a),t.__e=t.__=null,i.__e!=n&&Vi(i)}}function Vi(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Vi(e)}function Fi(e){(!e.__d&&(e.__d=!0)&&dt.push(e)&&!lo.__r++||$i!=Z.debounceRendering)&&(($i=Z.debounceRendering)||Ui)(lo)}function lo(){try{for(var e,t=1;dt.length;)dt.length>t&&dt.sort(qi),e=dt.shift(),t=dt.length,P_(e)}finally{dt.length=lo.__r=0}}function Gi(e,t,n,o,a,i,l,s,c,_,p){var h,d,f,m,y,v,P,C=o&&o.__k||so,b=t.length;for(c=S_(n,t,C,c,b),h=0;h<b;h++)(f=n.__k[h])!=null&&(d=f.__i!=-1&&C[f.__i]||io,f.__i=h,v=Kr(e,f,d,a,i,l,s,c,_,p),m=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&jr(d.ref,null,f),p.push(f.ref,f.__c||m,f)),y==null&&m!=null&&(y=m),(P=!!(4&f.__u))||d.__k===f.__k?(c=Ki(f,c,e,P),P&&d.__e&&(d.__e=null)):typeof f.type=="function"&&v!==void 0?c=v:m&&(c=m.nextSibling),f.__u&=-7);return n.__e=y,c}function S_(e,t,n,o,a){var i,l,s,c,_,p=n.length,h=p,d=0;for(e.__k=new Array(a),i=0;i<a;i++)(l=t[i])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[i]=ao(null,l,null,null,null):_o(l)?l=e.__k[i]=ao(ie,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[i]=ao(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[i]=l,c=i+d,l.__=e,l.__b=e.__b+1,s=null,(_=l.__i=k_(l,n,c,h))!=-1&&(h--,(s=n[_])&&(s.__u|=2)),s==null||s.__v==null?(_==-1&&(a>p?d--:a<p&&d++),typeof l.type!="function"&&(l.__u|=4)):_!=c&&(_==c-1?d--:_==c+1?d++:(_>c?d--:d++,l.__u|=4))):e.__k[i]=null;if(h)for(i=0;i<p;i++)(s=n[i])!=null&&(2&s.__u)==0&&(s.__e==o&&(o=$t(s)),Ji(s,s));return o}function Ki(e,t,n,o){var a,i;if(typeof e.type=="function"){for(a=e.__k,i=0;a&&i<a.length;i++)a[i]&&(a[i].__=e,t=Ki(a[i],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=$t(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function k_(e,t,n,o){var a,i,l,s=e.key,c=e.type,_=t[n],p=_!=null&&(2&_.__u)==0;if(_===null&&s==null||p&&s==_.key&&c==_.type)return n;if(o>(p?1:0)){for(a=n-1,i=n+1;a>=0||i<t.length;)if((_=t[l=a>=0?a--:i++])!=null&&(2&_.__u)==0&&s==_.key&&c==_.type)return l}return-1}function Hi(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||x_.test(t)?n:n+"px"}function oo(e,t,n,o,a){var i,l;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||Hi(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||Hi(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Wi,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n[pn]=o[pn]:(n[pn]=Vr,e.addEventListener(t,i?qr:Ur,i)):e.removeEventListener(t,i?qr:Ur,i);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Bi(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[ro]==null)t[ro]=Vr++;else if(t[ro]<n[pn])return;return n(Z.event?Z.event(t):t)}}}function Kr(e,t,n,o,a,i,l,s,c,_){var p,h,d,f,m,y,v,P,C,b,E,z,te,ee,J,oe,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[s=t.__e=n.__e]),(p=Z.__b)&&p(t);e:if(typeof T=="function"){h=l.length;try{if(C=t.props,b=T.prototype&&T.prototype.render,E=(p=T.contextType)&&o[p.__c],z=p?E?E.props.value:p.__:o,n.__c?P=(d=t.__c=n.__c).__=d.__E:(b?t.__c=d=new T(C,z):(t.__c=d=new _t(C,z),d.constructor=T,d.render=C_),E&&E.sub(d),d.state||(d.state={}),d.__n=o,f=d.__d=!0,d.__h=[],d._sb=[]),b&&d.__s==null&&(d.__s=d.state),b&&T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=nt({},d.__s)),nt(d.__s,T.getDerivedStateFromProps(C,d.__s))),m=d.props,y=d.state,d.__v=t,f)b&&T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),b&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(b&&T.getDerivedStateFromProps==null&&C!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(C,z),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(C,d.__s,z)===!1){t.__v!=n.__v&&(d.props=C,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(N){N&&(N.__=t)}),so.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&l.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(C,d.__s,z),b&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,y,v)})}if(d.context=z,d.props=C,d.__P=e,d.__e=!1,te=Z.__r,ee=0,b)d.state=d.__s,d.__d=!1,te&&te(t),p=d.render(d.props,d.state,d.context),so.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,te&&te(t),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++ee<25);d.state=d.__s,d.getChildContext!=null&&(o=nt(nt({},o),d.getChildContext())),b&&!f&&d.getSnapshotBeforeUpdate!=null&&(v=d.getSnapshotBeforeUpdate(m,y)),J=p!=null&&p.type===ie&&p.key==null?Yi(p.props.children):p,s=Gi(e,_o(J)?J:[J],t,n,o,a,i,l,s,c,_),d.base=t.__e,t.__u&=-161,d.__h.length&&l.push(d),P&&(d.__E=d.__=null)}catch(N){if(l.length=h,t.__v=null,c||i!=null){if(N.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;i!=null&&(i[i.indexOf(s)]=null),t.__e=s}else if(i!=null)for(oe=i.length;oe--;)Gr(i[oe])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),N.then||ji(t),Z.__e(N,t,n)}}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=w_(n.__e,t,n,o,a,i,l,c,_);return(p=Z.diffed)&&p(t),128&t.__u?void 0:s}function ji(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ji))}function Xi(e,t,n){for(var o=0;o<n.length;o++)jr(n[o],n[++o],n[++o]);Z.__c&&Z.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){Z.__e(i,a.__v)}})}function Yi(e){return typeof e!="object"||e==null||e.__b>0?e:_o(e)?e.map(Yi):e.constructor!==void 0?null:nt({},e)}function w_(e,t,n,o,a,i,l,s,c){var _,p,h,d,f,m,y,v=n.props||io,P=t.props,C=t.type;if(C=="svg"?a="http://www.w3.org/2000/svg":C=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(_=0;_<i.length;_++)if((f=i[_])&&"setAttribute"in f==!!C&&(C?f.localName==C:f.nodeType==3)){e=f,i[_]=null;break}}if(e==null){if(C==null)return document.createTextNode(P);e=document.createElementNS(a,C,P.is&&P),s&&(Z.__m&&Z.__m(t,i),s=!1),i=null}if(C==null)v===P||s&&e.data==P||(e.data=P);else{if(i=C=="textarea"&&P.defaultValue!=null?null:i&&co.call(e.childNodes),!s&&i!=null)for(v={},_=0;_<e.attributes.length;_++)v[(f=e.attributes[_]).name]=f.value;for(_ in v)f=v[_],_=="dangerouslySetInnerHTML"?h=f:_=="children"||_ in P||_=="value"&&"defaultValue"in P||_=="checked"&&"defaultChecked"in P||oo(e,_,null,f,a);for(_ in P)f=P[_],_=="children"?d=f:_=="dangerouslySetInnerHTML"?p=f:_=="value"?m=f:_=="checked"?y=f:s&&typeof f!="function"||v[_]===f||oo(e,_,f,v[_],a);if(p)s||h&&(p.__html==h.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(h&&(e.innerHTML=""),Gi(t.type=="template"?e.content:e,_o(d)?d:[d],t,n,o,C=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,l,i?i[0]:n.__k&&$t(n,0),s,c),i!=null)for(_=i.length;_--;)Gr(i[_]);s&&C!="textarea"||(_="value",C=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[_]||C=="progress"&&!m||C=="option"&&m!=v[_])&&oo(e,_,m,v[_],a),_="checked",y!=null&&y!=e[_]&&oo(e,_,y,v[_],a))}return e}function jr(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(a){Z.__e(a,n)}}function Ji(e,t,n){var o,a;if(Z.unmount&&Z.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||jr(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){Z.__e(i,t)}o.base=o.__P=o.__n=null}if(o=e.__k)for(a=0;a<o.length;a++)o[a]&&Ji(o[a],t,n||typeof e.type!="function");n||Gr(e.__e),e.__c=e.__=e.__e=void 0}function C_(e,t,n){return this.constructor(e,n)}function Ft(e,t,n){var o,a,i,l;t==document&&(t=document.documentElement),Z.__&&Z.__(e,t),a=(o=typeof n=="function")?null:n&&n.__k||t.__k,i=[],l=[],Kr(t,e=(!o&&n||t).__k=uo(ie,null,[e]),a||io,io,t.namespaceURI,!o&&n?[n]:a?null:t.firstChild?co.call(t.childNodes):null,i,!o&&n?n:a?a.__e:t.firstChild,o,l),Xi(i,e,l),e.props.children=null}co=so.slice,Z={__e:function(e,t,n,o){for(var a,i,l;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),l=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,o||{}),l=a.__d),l)return a.__E=a}catch(s){e=s}throw e}},zi=0,Wr=function(e){return e!=null&&e.constructor===void 0},_t.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=nt({},this.state),typeof e=="function"&&(e=e(nt({},n),this.props)),e&&nt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Fi(this))},_t.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fi(this))},_t.prototype.render=ie,dt=[],Ui=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qi=function(e,t){return e.__v.__b-t.__v.__b},lo.__r=0,zr=Math.random().toString(8),ro="__d"+zr,pn="__a"+zr,Wi=/(PointerCapture)$|Capture$/i,Vr=0,Ur=Bi(!1),qr=Bi(!0),y_=0;var Ht="0.62.0";function Qi(e){return`${x.cssPrefix}:${e}`}function mn(e,t,n){e.dispatchEvent(new CustomEvent(Qi(t),{detail:n}))}function Zi(e,t){let o=Object.entries(t).map(([a,i])=>{let l=Qi(a),s=c=>i(c.detail);return e.addEventListener(l,s),[l,s]});return()=>{for(let[a,i]of o)e.removeEventListener(a,i)}}function We(){let e=Date.now(),t=new Uint8Array(16);t[0]=Math.floor(e/2**40)&255,t[1]=Math.floor(e/2**32)&255,t[2]=e>>>24&255,t[3]=e>>>16&255,t[4]=e>>>8&255,t[5]=e&255,T_(t.subarray(6)),t[6]=t[6]&15|112,t[8]=t[8]&63|128;let n=Array.from(t,o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function T_(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){crypto.getRandomValues(e);return}for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256)}var bt=W.scope("persistence");function ut(e,t=Jn,n){let o=n?`${e}.${n}`:e,a=`${x.cssPrefix}.storageVersion`,i=t.get(a)??void 0,l=i?`.v${i}`:"",s=`${x.cssPrefix}.${o}${l}`,c=`${x.cssPrefix}${l}.visitorId`,_=`${s}.conversationId`,p=`${s}.userPrefs`,h=`${s}.panelOpen`,d=`${s}.panelSize`,f=`${s}.calloutDismissed`,m=`${s}.sidebarCollapsed`,y=`${s}.activeModule`,v=`${s}.historyCount`,P=`${s}.formsDone`,C={getVisitorId(){let b=t.get(c);if(b)return b;let E=We();return t.set(c,E),E},setVisitorId(b){bt.debug("setVisitorId (rebind)",{id:b,scope:o}),t.set(c,b)},loadConversationId(){return t.get(_)??void 0},saveConversationId(b){bt.trace("saveConversationId",{id:b,scope:o}),b?t.set(_,b):t.remove(_)},loadUserPrefs(){let b=t.get(p);if(!b)return{};try{let E=JSON.parse(b);return es(E)?E:{}}catch(E){return bt.warn("loadUserPrefs parse failed",{error:E}),{}}},saveUserPrefs(b){try{t.set(p,JSON.stringify(b))}catch(E){bt.warn("saveUserPrefs serialise failed",{error:E})}},patchUserPrefs(b){let E=C.loadUserPrefs();C.saveUserPrefs({...E,...b})},loadPanelOpen(){let b=t.get(h);return b==="1"?!0:b==="0"?!1:null},savePanelOpen(b){t.set(h,b?"1":"0")},loadPanelSize(){let b=t.get(d);return b==="normal"||b==="expanded"||b==="fullscreen"?b:null},savePanelSize(b){t.set(d,b)},loadCalloutDismissed(b){if(!b)return!1;let E=t.get(f);return!!E&&E===b},saveCalloutDismissed(b){b?t.set(f,b):t.remove(f)},loadSidebarCollapsed(){let b=t.get(m);return b==="1"?!0:b==="0"?!1:null},saveSidebarCollapsed(b){t.set(m,b?"1":"0")},loadActiveModule(){return t.get(y)||null},saveActiveModule(b){t.set(y,b)},loadHistoryCount(){let b=t.get(v);if(!b)return null;let E=Number.parseInt(b,10);return Number.isFinite(E)&&E>=0?E:null},saveHistoryCount(b){t.set(v,String(b))},loadFormsDone(){let b=t.get(P);if(!b)return{};try{let E=JSON.parse(b);return es(E)?E:{}}catch(E){return bt.warn("loadFormsDone parse failed",{error:E}),{}}},saveFormDone(b){try{let E=C.loadFormsDone();E[b]=Date.now(),t.set(P,JSON.stringify(E))}catch(E){bt.warn("saveFormDone serialise failed",{error:E})}},rememberStorageVersion(b){b&&b!==t.get(a)&&(bt.debug("rememberStorageVersion (force-reset on next load)",{version:b}),t.set(a,b))},clearConversation(){t.remove(_)}};return C}function es(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var ts=`:host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent: var(--__P__-accent-user);--__P__-accent-text-user: __BRAND_ACCENT_TEXT__;--__P__-accent-text: var(--__P__-accent-text-user);--__P__-accent-fg: var(--__P__-accent);--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-pill-l-min: .3;--__P__-pill-l-max: .46;--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-conversation-max: 768px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-scale: 1;--__P__-text-xs: calc(12px * var(--__P__-text-scale));--__P__-text-sm: calc(13px * var(--__P__-text-scale));--__P__-text-base: calc(15px * var(--__P__-text-scale));--__P__-text-md: calc(16px * var(--__P__-text-scale));--__P__-text-lg: calc(18px * var(--__P__-text-scale));--__P__-text-xl: calc(22px * var(--__P__-text-scale));--__P__-text-2xl: calc(30px * var(--__P__-text-scale))}:host([data-mode="modal"]),:host([data-mode="drawer"]){--__P__-conversation-max: 100%}:host([data-text-size="small"]){--__P__-text-scale: .9}:host([data-text-size="large"]){--__P__-text-scale: 1.15}:host{--__P__-ease: cubic-bezier(.2, .7, .2, 1);--__P__-ease-out: cubic-bezier(.2, .7, .2, 1);--__P__-ease-in: cubic-bezier(.4, 0, 1, 1);--__P__-ease-in-out: cubic-bezier(.65, 0, .35, 1);--__P__-dur-quick: .12s;--__P__-dur-base: .22s;--__P__-dur-slow: .32s;font-family:var(--__P__-font);color:var(--__P__-fg);color-scheme:light;--__P__-color-scheme: light}:host([data-theme="dark"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-danger-text: oklch(.8077 .1035 19.57);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .18);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);--__P__-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .5);--__P__-backdrop: rgba(0, 0, 0, .65);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;color-scheme:dark;--__P__-color-scheme: dark}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);color-scheme:dark;--__P__-color-scheme: dark}}@supports (color: oklch(from red l c h)){:host{--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.3, l, .62) c h);--__P__-accent-text: oklch(from var(--__P__-accent) clamp(0, (l / .623 - 1) * -infinity, 1) 0 h);--__P__-accent-fg: oklch(from var(--__P__-accent-user) clamp(.3, l, .46) c h)}:host([data-theme="dark"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}}}@media(prefers-reduced-motion:reduce){:host{--__P__-dur-quick: 1ms;--__P__-dur-base: 1ms;--__P__-dur-slow: 1ms}}
|
|
1
|
+
"use strict";var HelpAI=(()=>{var Cr=Object.defineProperty;var Dd=Object.getOwnPropertyDescriptor;var Od=Object.getOwnPropertyNames;var $d=Object.prototype.hasOwnProperty;var Fd=(e,t,n)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Hd=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Od(t))!$d.call(e,a)&&a!==n&&Cr(e,a,{get:()=>t[a],enumerable:!(o=Dd(t,a))||o.enumerable});return e};var Bd=e=>Hd(Cr({},"__esModule",{value:!0}),e);var j=(e,t,n)=>Fd(e,typeof t!="symbol"?t+"":t,n);var Zm={};var x={id:"help-ai",name:"@helpai/elements",global:"HelpAI",tagName:"web-ai-chat",cssPrefix:"helpai",defaultBaseUrl:"https://help.ai",displayName:"Help AI",domain:"help.ai",siteUrl:"https://help.ai"};var ci={attach:"Attach files",attachmentMimeRejected:"File type not supported",attachmentTooLarge:"File is too large",attachmentTooMany:"Attachment limit reached",conversationClosed:"This chat is closed",conversationLoading:"Loading chat\u2026",close:"Close",collapse:"Collapse",collapseSidebar:"Collapse sidebar",composerPlaceholder:"Type a message\u2026",dateLastWeek:"Last 7 days",dateOlder:"Older",dateToday:"Today",dateYesterday:"Yesterday",dropZone:"Drop files to attach",errorGeneric:"Something went wrong",errorRateLimited:"Too many requests \u2014 please try again in a moment.",errorRetry:"Retry",expand:"Expand",expandSidebar:"Expand sidebar",exitFullscreen:"Exit fullscreen",fullscreen:"Fullscreen",history:"History",historyBack:"Back to chat",historyEmpty:"No previous chats yet",historyLoading:"Loading your chats\u2026",historyContinue:"Continue the chat",historyTitle:"Chat history",language:"Language",launcherOpen:"Open chat",launcherLabel:"Chat with us",micStart:"Start voice input",micStop:"Stop voice input",micUnsupported:"Voice input is not supported in this browser",moreActions:"More actions",newConversation:"New chat",panelTitle:"Chat",resizeHandle:"Drag to resize",scrollToBottom:"Scroll to latest",send:"Send",soundOff:"Sound off",soundOn:"Sound on",startNewConversation:"Start a new chat",stop:"Stop",theme:"Theme",themeAuto:"Auto",themeDark:"Dark",themeLight:"Light",textSize:"Text size",textSizeSmall:"Small",textSizeNormal:"Normal",textSizeLarge:"Large",loading:"Loading\u2026",thinking:"Thinking\u2026",thoughts:"Thoughts",toolResult:"Result",sources:"Sources",feedbackUp:"Good response",feedbackDown:"Bad response",feedbackThanks:"Thanks for your feedback",copy:"Copy",copied:"Copied",tabHome:"Home",tabConversations:"Chats",tabHelp:"Help",tabNews:"News",modulesEmpty:"Nothing here yet",moduleBack:"Back",contentLoading:"Loading\u2026",homeGreeting:"How can we help?",homeGreetingNamed:"Hi {name} \u{1F44B}",homeGreetingLead:"How can we help?",homeSearchPlaceholder:"Search for help",homeContentTitle:"Popular articles",homeStatus:"Status",helpTitle:"Help",helpSearchPlaceholder:"Search for help",helpEmpty:"No help articles yet",helpLoading:"Loading help\u2026",helpSearchEmpty:"No results found",newsTitle:"News",newsEmpty:"No news yet",newsLoading:"Loading news\u2026",newsBack:"Back to news",newsPublishedAt:"Published {date}",formSubmit:"Submit",formSkip:"Maybe later",formSubmitted:"Completed",formSkipped:"Maybe later",formFillOut:"Fill out",formRequired:"This field is required",formInvalidEmail:"Enter a valid email address",formInvalidTel:"Enter a valid phone number",formInvalidUrl:"Enter a valid URL",formInvalidNumber:"Enter a valid number",formTooShort:"Too short (min {min} characters)",formTooLong:"Too long (max {max} characters)",formNumberTooSmall:"Must be at least {min}",formNumberTooLarge:"Must be at most {max}",formPatternMismatch:"Please match the requested format",formChooseAtLeast:"Choose at least {min}",formChooseAtMost:"Choose at most {max}",formOther:"Other",formOtherPlaceholder:"Type your answer\u2026",inputRequired:"Questions for you",inputBadge:"Questions",inputAnswered:"Answered",inputSkipped:"Skipped",showOptions:"Show options",hideOptions:"Hide options",qtypeText:"Your answer",qtypeEmail:"Email address",qtypePhone:"Phone number",qtypeNumber:"Number",qtypeDate:"Date",qtypeChooseOne:"Pick one",qtypeChooseAny:"Pick any",qtypeBoolean:"Yes / No",inputSubmit:"Submit answers",inputSubmitHint:"Enter to send \xB7 Shift+Enter = new line",inputSkip:"Skip",confirmYes:"Yes",confirmNo:"No",approve:"Approve",reject:"Reject",approvalPrompt:"{tool} requires your approval to execute.",approvalBody:"Review the tool input above and decide whether to allow this action.",approvalYourResponse:"Your response: {decision}",approvalEditHint:"You can edit this response until this step continues.",approvalSubmitting:"Response submitted. Request in progress\u2026",edit:"Edit",toolParameters:"Parameters",statusAwaiting:"Awaiting Approval",statusResponded:"Responded",statusRunning:"Running",statusCompleted:"Completed",statusDenied:"Denied",statusError:"Error",statusSuperseded:"Skipped"},zd={attach:"Joindre des fichiers",attachmentMimeRejected:"Type de fichier non pris en charge",attachmentTooLarge:"Le fichier est trop volumineux",attachmentTooMany:"Limite de pi\xE8ces jointes atteinte",conversationClosed:"Ce chat est ferm\xE9",conversationLoading:"Chargement du chat\u2026",close:"Fermer",collapse:"R\xE9duire",collapseSidebar:"R\xE9duire la barre lat\xE9rale",composerPlaceholder:"\xC9crivez un message\u2026",dateLastWeek:"7 derniers jours",dateOlder:"Plus ancien",dateToday:"Aujourd'hui",dateYesterday:"Hier",dropZone:"D\xE9posez les fichiers \xE0 joindre",errorGeneric:"Une erreur s'est produite",errorRateLimited:"Trop de requ\xEAtes \u2014 veuillez r\xE9essayer dans un instant.",errorRetry:"R\xE9essayer",expand:"Agrandir",expandSidebar:"D\xE9velopper la barre lat\xE9rale",exitFullscreen:"Quitter le plein \xE9cran",fullscreen:"Plein \xE9cran",history:"Historique",historyBack:"Retour au chat",historyEmpty:"Aucun chat pour le moment",historyContinue:"Poursuivre le chat",historyLoading:"Chargement de vos chats\u2026",historyTitle:"Historique des chats",language:"Langue",launcherOpen:"Ouvrir le chat",launcherLabel:"Discuter avec nous",micStart:"D\xE9marrer la saisie vocale",micStop:"Arr\xEAter la saisie vocale",micUnsupported:"La saisie vocale n'est pas prise en charge par ce navigateur",moreActions:"Plus d'actions",newConversation:"Nouveau chat",panelTitle:"Chat",resizeHandle:"Glisser pour redimensionner",scrollToBottom:"Aller au plus r\xE9cent",send:"Envoyer",soundOff:"Son d\xE9sactiv\xE9",soundOn:"Son activ\xE9",startNewConversation:"D\xE9marrer un nouveau chat",stop:"Arr\xEAter",theme:"Th\xE8me",themeAuto:"Auto",themeDark:"Sombre",themeLight:"Clair",textSize:"Taille du texte",textSizeSmall:"Petite",textSizeNormal:"Normale",textSizeLarge:"Grande",loading:"Chargement\u2026",thinking:"R\xE9flexion\u2026",thoughts:"R\xE9flexions",toolResult:"R\xE9sultat",sources:"Sources",feedbackUp:"Bonne r\xE9ponse",feedbackDown:"Mauvaise r\xE9ponse",feedbackThanks:"Merci pour votre retour",copy:"Copier",copied:"Copi\xE9",tabHome:"Accueil",tabConversations:"Chats",tabHelp:"Aide",tabNews:"Actualit\xE9s",modulesEmpty:"Rien pour le moment",moduleBack:"Retour",contentLoading:"Chargement\u2026",homeGreeting:"Comment pouvons-nous vous aider ?",homeGreetingNamed:"Bonjour {name} \u{1F44B}",homeGreetingLead:"Comment pouvons-nous vous aider ?",homeSearchPlaceholder:"Rechercher de l'aide",homeContentTitle:"Articles populaires",homeStatus:"Statut",helpTitle:"Aide",helpSearchPlaceholder:"Rechercher de l'aide",helpEmpty:"Aucun article d'aide pour le moment",helpLoading:"Chargement de l'aide\u2026",helpSearchEmpty:"Aucun r\xE9sultat trouv\xE9",newsTitle:"Actualit\xE9s",newsEmpty:"Aucune actualit\xE9 pour le moment",newsLoading:"Chargement des actualit\xE9s\u2026",newsBack:"Retour aux actualit\xE9s",newsPublishedAt:"Publi\xE9 le {date}",formSubmit:"Envoyer",formSkip:"Plus tard",formSubmitted:"Termin\xE9",formSkipped:"Plus tard",formFillOut:"Remplir",formRequired:"Ce champ est obligatoire",formInvalidEmail:"Saisissez une adresse e-mail valide",formInvalidTel:"Saisissez un num\xE9ro de t\xE9l\xE9phone valide",formInvalidUrl:"Saisissez une URL valide",formInvalidNumber:"Saisissez un nombre valide",formTooShort:"Trop court (min. {min} caract\xE8res)",formTooLong:"Trop long (max. {max} caract\xE8res)",formNumberTooSmall:"Doit \xEAtre au moins {min}",formNumberTooLarge:"Doit \xEAtre au plus {max}",formPatternMismatch:"Veuillez respecter le format demand\xE9",formChooseAtLeast:"Choisissez au moins {min}",formChooseAtMost:"Choisissez au plus {max}",formOther:"Autre",formOtherPlaceholder:"Saisissez votre r\xE9ponse\u2026",inputRequired:"Questions pour vous",inputBadge:"Questions",inputAnswered:"R\xE9pondu",inputSkipped:"Ignor\xE9",showOptions:"Afficher les options",hideOptions:"Masquer les options",qtypeText:"Votre r\xE9ponse",qtypeEmail:"Adresse e-mail",qtypePhone:"Num\xE9ro de t\xE9l\xE9phone",qtypeNumber:"Nombre",qtypeDate:"Date",qtypeChooseOne:"Choisir une",qtypeChooseAny:"Choisir plusieurs",qtypeBoolean:"Oui / Non",inputSubmit:"Envoyer les r\xE9ponses",inputSubmitHint:"Entr\xE9e pour envoyer \xB7 Maj+Entr\xE9e = saut de ligne",inputSkip:"Ignorer",confirmYes:"Oui",confirmNo:"Non",approve:"Approuver",reject:"Refuser",approvalPrompt:"{tool} n\xE9cessite votre approbation pour s'ex\xE9cuter.",approvalBody:"V\xE9rifiez les param\xE8tres ci-dessus et d\xE9cidez d'autoriser ou non cette action.",approvalYourResponse:"Votre r\xE9ponse : {decision}",approvalEditHint:"Vous pouvez modifier votre r\xE9ponse jusqu'\xE0 la reprise de cette \xE9tape.",approvalSubmitting:"R\xE9ponse envoy\xE9e. Traitement en cours\u2026",edit:"Modifier",toolParameters:"Param\xE8tres",statusAwaiting:"En attente d'approbation",statusResponded:"R\xE9pondu",statusRunning:"En cours",statusCompleted:"Termin\xE9",statusDenied:"Refus\xE9",statusError:"Erreur",statusSuperseded:"Ignor\xE9"},Ud={attach:"\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641\u0627\u062A",attachmentMimeRejected:"\u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",attachmentTooLarge:"\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627",attachmentTooMany:"\u062A\u0645 \u0628\u0644\u0648\u063A \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0645\u0631\u0641\u0642\u0627\u062A",conversationClosed:"\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",conversationLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0629\u2026",close:"\u0625\u063A\u0644\u0627\u0642",collapse:"\u0637\u064A\u0651",collapseSidebar:"\u0637\u064A\u0651 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",composerPlaceholder:"\u0627\u0643\u062A\u0628 \u0631\u0633\u0627\u0644\u0629\u2026",dateLastWeek:"\u0622\u062E\u0631 \u0667 \u0623\u064A\u0627\u0645",dateOlder:"\u0623\u0642\u062F\u0645",dateToday:"\u0627\u0644\u064A\u0648\u0645",dateYesterday:"\u0623\u0645\u0633",dropZone:"\u0623\u0641\u0644\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0644\u0625\u0631\u0641\u0627\u0642\u0647\u0627",errorGeneric:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0645\u0627",errorRateLimited:"\u0637\u0644\u0628\u0627\u062A \u0643\u062B\u064A\u0631\u0629 \u062C\u062F\u064B\u0627 \u2014 \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0628\u0639\u062F \u0644\u062D\u0638\u0629.",errorRetry:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",expand:"\u062A\u0648\u0633\u064A\u0639",expandSidebar:"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",exitFullscreen:"\u0625\u0646\u0647\u0627\u0621 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",fullscreen:"\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",history:"\u0627\u0644\u0633\u062C\u0644",historyBack:"\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",historyEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u062F\u0631\u062F\u0634\u0627\u062A \u0633\u0627\u0628\u0642\u0629 \u0628\u0639\u062F",historyContinue:"\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",historyLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u062F\u0631\u062F\u0634\u0627\u062A\u0643\u2026",historyTitle:"\u0633\u062C\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",language:"\u0627\u0644\u0644\u063A\u0629",launcherOpen:"\u0641\u062A\u062D \u0627\u0644\u062F\u0631\u062F\u0634\u0629",launcherLabel:"\u062A\u062D\u062F\u062B \u0645\u0639\u0646\u0627",micStart:"\u0628\u062F\u0621 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",micStop:"\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",micUnsupported:"\u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645 \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D",moreActions:"\u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629",newConversation:"\u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",panelTitle:"\u0627\u0644\u062F\u0631\u062F\u0634\u0629",resizeHandle:"\u0627\u0633\u062D\u0628 \u0644\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645",scrollToBottom:"\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0623\u062D\u062F\u062B",send:"\u0625\u0631\u0633\u0627\u0644",soundOff:"\u0643\u062A\u0645 \u0627\u0644\u0635\u0648\u062A",soundOn:"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0635\u0648\u062A",startNewConversation:"\u0628\u062F\u0621 \u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",stop:"\u0625\u064A\u0642\u0627\u0641",theme:"\u0627\u0644\u0645\u0638\u0647\u0631",themeAuto:"\u062A\u0644\u0642\u0627\u0626\u064A",themeDark:"\u062F\u0627\u0643\u0646",themeLight:"\u0641\u0627\u062A\u062D",textSize:"\u062D\u062C\u0645 \u0627\u0644\u0646\u0635",textSizeSmall:"\u0635\u063A\u064A\u0631",textSizeNormal:"\u0639\u0627\u062F\u064A",textSizeLarge:"\u0643\u0628\u064A\u0631",loading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",thinking:"\u064A\u0641\u0643\u0651\u0631\u2026",thoughts:"\u0627\u0644\u0623\u0641\u0643\u0627\u0631",toolResult:"\u0627\u0644\u0646\u062A\u064A\u062C\u0629",sources:"\u0627\u0644\u0645\u0635\u0627\u062F\u0631",feedbackUp:"\u0631\u062F \u062C\u064A\u062F",feedbackDown:"\u0631\u062F \u0633\u064A\u0626",feedbackThanks:"\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643",copy:"\u0646\u0633\u062E",copied:"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E",tabHome:"\u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",tabConversations:"\u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",tabHelp:"\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",tabNews:"\u0627\u0644\u0623\u062E\u0628\u0627\u0631",modulesEmpty:"\u0644\u0627 \u0634\u064A\u0621 \u0647\u0646\u0627 \u0628\u0639\u062F",moduleBack:"\u0631\u062C\u0648\u0639",contentLoading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",homeGreeting:"\u0643\u064A\u0641 \u064A\u0645\u0643\u0646\u0646\u0627 \u0645\u0633\u0627\u0639\u062F\u062A\u0643\u061F",homeGreetingNamed:"\u0645\u0631\u062D\u0628\u064B\u0627 {name} \u{1F44B}",homeGreetingLead:"\u0643\u064A\u0641 \u064A\u0645\u0643\u0646\u0646\u0627 \u0645\u0633\u0627\u0639\u062F\u062A\u0643\u061F",homeSearchPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0645\u0633\u0627\u0639\u062F\u0629",homeContentTitle:"\u0645\u0642\u0627\u0644\u0627\u062A \u0634\u0627\u0626\u0639\u0629",homeStatus:"\u0627\u0644\u062D\u0627\u0644\u0629",helpTitle:"\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",helpSearchPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0645\u0633\u0627\u0639\u062F\u0629",helpEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0645\u0642\u0627\u0644\u0627\u062A \u0645\u0633\u0627\u0639\u062F\u0629 \u0628\u0639\u062F",helpLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629\u2026",helpSearchEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C",newsTitle:"\u0627\u0644\u0623\u062E\u0628\u0627\u0631",newsEmpty:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0623\u062E\u0628\u0627\u0631 \u0628\u0639\u062F",newsLoading:"\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0623\u062E\u0628\u0627\u0631\u2026",newsBack:"\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0623\u062E\u0628\u0627\u0631",newsPublishedAt:"\u0646\u064F\u0634\u0631 \u0641\u064A {date}",formSubmit:"\u0625\u0631\u0633\u0627\u0644",formSkip:"\u0644\u0627\u062D\u0642\u064B\u0627",formSubmitted:"\u062A\u0645",formSkipped:"\u0644\u0627\u062D\u0642\u064B\u0627",formFillOut:"\u062A\u0639\u0628\u0626\u0629",formRequired:"\u0647\u0630\u0627 \u0627\u0644\u062D\u0642\u0644 \u0645\u0637\u0644\u0648\u0628",formInvalidEmail:"\u0623\u062F\u062E\u0644 \u0628\u0631\u064A\u062F\u064B\u0627 \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidTel:"\u0623\u062F\u062E\u0644 \u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidUrl:"\u0623\u062F\u062E\u0644 \u0631\u0627\u0628\u0637\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formInvalidNumber:"\u0623\u062F\u062E\u0644 \u0631\u0642\u0645\u064B\u0627 \u0635\u062D\u064A\u062D\u064B\u0627",formTooShort:"\u0642\u0635\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 {min} \u062D\u0631\u0641\u064B\u0627)",formTooLong:"\u0637\u0648\u064A\u0644 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 {max} \u062D\u0631\u0641\u064B\u0627)",formNumberTooSmall:"\u064A\u062C\u0628 \u0623\u0644\u0627 \u064A\u0642\u0644 \u0639\u0646 {min}",formNumberTooLarge:"\u064A\u062C\u0628 \u0623\u0644\u0627 \u064A\u0632\u064A\u062F \u0639\u0646 {max}",formPatternMismatch:"\u064A\u0631\u062C\u0649 \u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u0635\u064A\u063A\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629",formChooseAtLeast:"\u0627\u062E\u062A\u0631 {min} \u0639\u0644\u0649 \u0627\u0644\u0623\u0642\u0644",formChooseAtMost:"\u0627\u062E\u062A\u0631 {max} \u0639\u0644\u0649 \u0627\u0644\u0623\u0643\u062B\u0631",formOther:"\u0623\u062E\u0631\u0649",formOtherPlaceholder:"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643\u2026",inputRequired:"\u0623\u0633\u0626\u0644\u0629 \u0644\u0643",inputBadge:"\u0623\u0633\u0626\u0644\u0629",inputAnswered:"\u062A\u0645\u062A \u0627\u0644\u0625\u062C\u0627\u0628\u0629",inputSkipped:"\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A",showOptions:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",hideOptions:"\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",qtypeText:"\u0625\u062C\u0627\u0628\u062A\u0643",qtypeEmail:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",qtypePhone:"\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641",qtypeNumber:"\u0631\u0642\u0645",qtypeDate:"\u062A\u0627\u0631\u064A\u062E",qtypeChooseOne:"\u0627\u062E\u062A\u0631 \u0648\u0627\u062D\u062F\u064B\u0627",qtypeChooseAny:"\u0627\u062E\u062A\u0631 \u0623\u064A\u064B\u0627",qtypeBoolean:"\u0646\u0639\u0645 / \u0644\u0627",inputSubmit:"\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A",inputSubmitHint:"Enter \u0644\u0644\u0625\u0631\u0633\u0627\u0644 \xB7 Shift+Enter = \u0633\u0637\u0631 \u062C\u062F\u064A\u062F",inputSkip:"\u062A\u062E\u0637\u064D\u0651",confirmYes:"\u0646\u0639\u0645",confirmNo:"\u0644\u0627",approve:"\u0645\u0648\u0627\u0641\u0642\u0629",reject:"\u0631\u0641\u0636",approvalPrompt:"\u062A\u062A\u0637\u0644\u0628 {tool} \u0645\u0648\u0627\u0641\u0642\u062A\u0643 \u0644\u0644\u062A\u0646\u0641\u064A\u0630.",approvalBody:"\u0631\u0627\u062C\u0639 \u0645\u064F\u0639\u0637\u064A\u0627\u062A \u0627\u0644\u0623\u062F\u0627\u0629 \u0623\u0639\u0644\u0627\u0647 \u0648\u0642\u0631\u0651\u0631 \u0627\u0644\u0633\u0645\u0627\u062D \u0628\u0647\u0630\u0627 \u0627\u0644\u0625\u062C\u0631\u0627\u0621 \u0623\u0648 \u0631\u0641\u0636\u0647.",approvalYourResponse:"\u0631\u062F\u0651\u0643: {decision}",approvalEditHint:"\u064A\u0645\u0643\u0646\u0643 \u062A\u0639\u062F\u064A\u0644 \u0631\u062F\u0651\u0643 \u062D\u062A\u0649 \u062A\u0633\u062A\u0623\u0646\u0641 \u0647\u0630\u0647 \u0627\u0644\u062E\u0637\u0648\u0629.",approvalSubmitting:"\u062A\u0645 \u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0631\u062F. \u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0646\u0641\u064A\u0630\u2026",edit:"\u062A\u0639\u062F\u064A\u0644",toolParameters:"\u0627\u0644\u0645\u0639\u0637\u064A\u0627\u062A",statusAwaiting:"\u0628\u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u0645\u0648\u0627\u0641\u0642\u0629",statusResponded:"\u062A\u0645 \u0627\u0644\u0631\u062F",statusRunning:"\u0642\u064A\u062F \u0627\u0644\u062A\u0646\u0641\u064A\u0630",statusCompleted:"\u0645\u0643\u062A\u0645\u0644",statusDenied:"\u0645\u0631\u0641\u0648\u0636",statusError:"\u062E\u0637\u0623",statusSuperseded:"\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A"},qd={attach:"Adjuntar archivos",attachmentMimeRejected:"Tipo de archivo no admitido",attachmentTooLarge:"El archivo es demasiado grande",attachmentTooMany:"Se alcanz\xF3 el l\xEDmite de adjuntos",conversationClosed:"Este chat est\xE1 cerrado",conversationLoading:"Cargando chat\u2026",close:"Cerrar",collapse:"Contraer",collapseSidebar:"Contraer la barra lateral",composerPlaceholder:"Escribe un mensaje\u2026",dateLastWeek:"\xDAltimos 7 d\xEDas",dateOlder:"Anteriores",dateToday:"Hoy",dateYesterday:"Ayer",dropZone:"Suelta los archivos para adjuntarlos",errorGeneric:"Algo sali\xF3 mal",errorRateLimited:"Demasiadas solicitudes: int\xE9ntalo de nuevo en un momento.",errorRetry:"Reintentar",expand:"Ampliar",expandSidebar:"Expandir la barra lateral",exitFullscreen:"Salir de pantalla completa",fullscreen:"Pantalla completa",history:"Historial",historyBack:"Volver al chat",historyEmpty:"A\xFAn no tienes chats",historyContinue:"Continuar el chat",historyLoading:"Cargando tus chats\u2026",historyTitle:"Historial de chats",language:"Idioma",launcherOpen:"Abrir el chat",launcherLabel:"Chatea con nosotros",micStart:"Iniciar entrada de voz",micStop:"Detener entrada de voz",micUnsupported:"Este navegador no admite la entrada de voz",moreActions:"M\xE1s acciones",newConversation:"Nuevo chat",panelTitle:"Chat",resizeHandle:"Arrastra para cambiar el tama\xF1o",scrollToBottom:"Ir a lo m\xE1s reciente",send:"Enviar",soundOff:"Sonido desactivado",soundOn:"Sonido activado",startNewConversation:"Iniciar un chat nuevo",stop:"Detener",theme:"Tema",themeAuto:"Autom\xE1tico",themeDark:"Oscuro",themeLight:"Claro",textSize:"Tama\xF1o del texto",textSizeSmall:"Peque\xF1o",textSizeNormal:"Normal",textSizeLarge:"Grande",loading:"Cargando\u2026",thinking:"Pensando\u2026",thoughts:"Razonamiento",toolResult:"Resultado",sources:"Fuentes",feedbackUp:"Buena respuesta",feedbackDown:"Mala respuesta",feedbackThanks:"Gracias por tu opini\xF3n",copy:"Copiar",copied:"Copiado",tabHome:"Inicio",tabConversations:"Chats",tabHelp:"Ayuda",tabNews:"Novedades",modulesEmpty:"A\xFAn no hay nada aqu\xED",moduleBack:"Atr\xE1s",contentLoading:"Cargando\u2026",homeGreeting:"\xBFC\xF3mo podemos ayudarte?",homeGreetingNamed:"Hola, {name} \u{1F44B}",homeGreetingLead:"\xBFC\xF3mo podemos ayudarte?",homeSearchPlaceholder:"Buscar ayuda",homeContentTitle:"Art\xEDculos populares",homeStatus:"Estado",helpTitle:"Ayuda",helpSearchPlaceholder:"Buscar ayuda",helpEmpty:"A\xFAn no hay art\xEDculos de ayuda",helpLoading:"Cargando la ayuda\u2026",helpSearchEmpty:"No se encontraron resultados",newsTitle:"Novedades",newsEmpty:"A\xFAn no hay novedades",newsLoading:"Cargando novedades\u2026",newsBack:"Volver a novedades",newsPublishedAt:"Publicado el {date}",formSubmit:"Enviar",formSkip:"Quiz\xE1 m\xE1s tarde",formSubmitted:"Completado",formSkipped:"Quiz\xE1 m\xE1s tarde",formFillOut:"Completar",formRequired:"Este campo es obligatorio",formInvalidEmail:"Introduce un correo electr\xF3nico v\xE1lido",formInvalidTel:"Introduce un n\xFAmero de tel\xE9fono v\xE1lido",formInvalidUrl:"Introduce una URL v\xE1lida",formInvalidNumber:"Introduce un n\xFAmero v\xE1lido",formTooShort:"Demasiado corto (m\xEDn. {min} caracteres)",formTooLong:"Demasiado largo (m\xE1x. {max} caracteres)",formNumberTooSmall:"Debe ser al menos {min}",formNumberTooLarge:"Debe ser como m\xE1ximo {max}",formPatternMismatch:"Respeta el formato solicitado",formChooseAtLeast:"Elige al menos {min}",formChooseAtMost:"Elige como m\xE1ximo {max}",formOther:"Otro",formOtherPlaceholder:"Escribe tu respuesta\u2026",inputRequired:"Preguntas para ti",inputBadge:"Preguntas",inputAnswered:"Respondido",inputSkipped:"Omitido",showOptions:"Mostrar opciones",hideOptions:"Ocultar opciones",qtypeText:"Tu respuesta",qtypeEmail:"Correo electr\xF3nico",qtypePhone:"N\xFAmero de tel\xE9fono",qtypeNumber:"N\xFAmero",qtypeDate:"Fecha",qtypeChooseOne:"Elige una",qtypeChooseAny:"Elige varias",qtypeBoolean:"S\xED / No",inputSubmit:"Enviar respuestas",inputSubmitHint:"Enter para enviar \xB7 May\xFAs+Enter = nueva l\xEDnea",inputSkip:"Omitir",confirmYes:"S\xED",confirmNo:"No",approve:"Aprobar",reject:"Rechazar",approvalPrompt:"{tool} requiere tu aprobaci\xF3n para ejecutarse.",approvalBody:"Revisa los par\xE1metros de arriba y decide si permites esta acci\xF3n.",approvalYourResponse:"Tu respuesta: {decision}",approvalEditHint:"Puedes cambiar tu respuesta hasta que este paso contin\xFAe.",approvalSubmitting:"Respuesta enviada. Procesando\u2026",edit:"Editar",toolParameters:"Par\xE1metros",statusAwaiting:"Esperando aprobaci\xF3n",statusResponded:"Respondido",statusRunning:"En curso",statusCompleted:"Completado",statusDenied:"Denegado",statusError:"Error",statusSuperseded:"Omitido"},Wd={attach:"\u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D1\u05E6\u05D9\u05DD",attachmentMimeRejected:"\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA",attachmentTooLarge:"\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",attachmentTooMany:"\u05D4\u05D2\u05E2\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D4\u05DE\u05E8\u05D1\u05D9 \u05E9\u05DC \u05E7\u05D1\u05E6\u05D9\u05DD \u05DE\u05E6\u05D5\u05E8\u05E4\u05D9\u05DD",conversationClosed:"\u05D4\u05E6\u05F3\u05D0\u05D8 \u05D4\u05D6\u05D4 \u05E0\u05E1\u05D2\u05E8",conversationLoading:"\u05D8\u05D5\u05E2\u05DF \u05E6\u05F3\u05D0\u05D8\u2026",close:"\u05E1\u05D2\u05D9\u05E8\u05D4",collapse:"\u05DB\u05D9\u05D5\u05D5\u05E5",collapseSidebar:"\u05DB\u05D9\u05D5\u05D5\u05E5 \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",composerPlaceholder:"\u05DB\u05EA\u05D5\u05D1 \u05D4\u05D5\u05D3\u05E2\u05D4\u2026",dateLastWeek:"7 \u05D4\u05D9\u05DE\u05D9\u05DD \u05D4\u05D0\u05D7\u05E8\u05D5\u05E0\u05D9\u05DD",dateOlder:"\u05D9\u05E9\u05DF \u05D9\u05D5\u05EA\u05E8",dateToday:"\u05D4\u05D9\u05D5\u05DD",dateYesterday:"\u05D0\u05EA\u05DE\u05D5\u05DC",dropZone:"\u05E9\u05D7\u05E8\u05E8 \u05E7\u05D1\u05E6\u05D9\u05DD \u05DB\u05D3\u05D9 \u05DC\u05E6\u05E8\u05E3",errorGeneric:"\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9",errorRateLimited:"\u05D9\u05D5\u05EA\u05E8 \u05DE\u05D3\u05D9 \u05D1\u05E7\u05E9\u05D5\u05EA \u2014 \u05E0\u05E1\u05D4 \u05E9\u05D5\u05D1 \u05D1\u05E2\u05D5\u05D3 \u05E8\u05D2\u05E2.",errorRetry:"\u05E0\u05E1\u05D4 \u05E9\u05D5\u05D1",expand:"\u05D4\u05E8\u05D7\u05D1\u05D4",expandSidebar:"\u05D4\u05E8\u05D7\u05D1\u05EA \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",exitFullscreen:"\u05D9\u05E6\u05D9\u05D0\u05D4 \u05DE\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",fullscreen:"\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",history:"\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4",historyBack:"\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6\u05F3\u05D0\u05D8",historyEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E7\u05D5\u05D3\u05DE\u05D9\u05DD",historyContinue:"\u05D4\u05DE\u05E9\u05DA \u05E6\u05F3\u05D0\u05D8",historyLoading:"\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA\u2026",historyTitle:"\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",language:"\u05E9\u05E4\u05D4",launcherOpen:"\u05E4\u05EA\u05D9\u05D7\u05EA \u05E6\u05F3\u05D0\u05D8",launcherLabel:"\u05D3\u05D1\u05E8\u05D5 \u05D0\u05D9\u05EA\u05E0\u05D5",micStart:"\u05D4\u05EA\u05D7\u05DC\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",micStop:"\u05E2\u05E6\u05D9\u05E8\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",micUnsupported:"\u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF \u05D6\u05D4",moreActions:"\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",newConversation:"\u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",panelTitle:"\u05E6\u05F3\u05D0\u05D8",resizeHandle:"\u05D2\u05E8\u05D5\u05E8 \u05DC\u05E9\u05D9\u05E0\u05D5\u05D9 \u05D4\u05D2\u05D5\u05D3\u05DC",scrollToBottom:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05D7\u05D3\u05E9 \u05D1\u05D9\u05D5\u05EA\u05E8",send:"\u05E9\u05DC\u05D9\u05D7\u05D4",soundOff:"\u05D4\u05E9\u05EA\u05E7\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",soundOn:"\u05D4\u05E4\u05E2\u05DC\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",startNewConversation:"\u05D4\u05EA\u05D7\u05DC\u05EA \u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",stop:"\u05E2\u05E6\u05D9\u05E8\u05D4",theme:"\u05E2\u05E8\u05DB\u05EA \u05E0\u05D5\u05E9\u05D0",themeAuto:"\u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9",themeDark:"\u05DB\u05D4\u05D4",themeLight:"\u05D1\u05D4\u05D9\u05E8",textSize:"\u05D2\u05D5\u05D3\u05DC \u05D8\u05E7\u05E1\u05D8",textSizeSmall:"\u05E7\u05D8\u05DF",textSizeNormal:"\u05E8\u05D2\u05D9\u05DC",textSizeLarge:"\u05D2\u05D3\u05D5\u05DC",loading:"\u05D8\u05D5\u05E2\u05DF\u2026",thinking:"\u05D7\u05D5\u05E9\u05D1\u2026",thoughts:"\u05DE\u05D7\u05E9\u05D1\u05D5\u05EA",toolResult:"\u05EA\u05D5\u05E6\u05D0\u05D4",sources:"\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",feedbackUp:"\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",feedbackDown:"\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D2\u05E8\u05D5\u05E2\u05D4",feedbackThanks:"\u05EA\u05D5\u05D3\u05D4 \u05E2\u05DC \u05D4\u05DE\u05E9\u05D5\u05D1",copy:"\u05D4\u05E2\u05EA\u05E7",copied:"\u05D4\u05D5\u05E2\u05EA\u05E7",tabHome:"\u05D1\u05D9\u05EA",tabConversations:"\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",tabHelp:"\u05E2\u05D6\u05E8\u05D4",tabNews:"\u05D7\u05D3\u05E9\u05D5\u05EA",modulesEmpty:"\u05D0\u05D9\u05DF \u05DB\u05D0\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DB\u05DC\u05D5\u05DD",moduleBack:"\u05D7\u05D6\u05E8\u05D4",contentLoading:"\u05D8\u05D5\u05E2\u05DF\u2026",homeGreeting:"\u05DB\u05D9\u05E6\u05D3 \u05E0\u05D5\u05DB\u05DC \u05DC\u05E2\u05D6\u05D5\u05E8?",homeGreetingNamed:"\u05E9\u05DC\u05D5\u05DD {name} \u{1F44B}",homeGreetingLead:"\u05DB\u05D9\u05E6\u05D3 \u05E0\u05D5\u05DB\u05DC \u05DC\u05E2\u05D6\u05D5\u05E8?",homeSearchPlaceholder:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05E2\u05D6\u05E8\u05D4",homeContentTitle:"\u05DE\u05D0\u05DE\u05E8\u05D9\u05DD \u05E4\u05D5\u05E4\u05D5\u05DC\u05E8\u05D9\u05D9\u05DD",homeStatus:"\u05E1\u05D8\u05D8\u05D5\u05E1",helpTitle:"\u05E2\u05D6\u05E8\u05D4",helpSearchPlaceholder:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05E2\u05D6\u05E8\u05D4",helpEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DE\u05D0\u05DE\u05E8\u05D9 \u05E2\u05D6\u05E8\u05D4",helpLoading:"\u05D8\u05D5\u05E2\u05DF \u05E2\u05D6\u05E8\u05D4\u2026",helpSearchEmpty:"\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA",newsTitle:"\u05D7\u05D3\u05E9\u05D5\u05EA",newsEmpty:"\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05D7\u05D3\u05E9\u05D5\u05EA",newsLoading:"\u05D8\u05D5\u05E2\u05DF \u05D7\u05D3\u05E9\u05D5\u05EA\u2026",newsBack:"\u05D7\u05D6\u05E8\u05D4 \u05DC\u05D7\u05D3\u05E9\u05D5\u05EA",newsPublishedAt:"\u05E4\u05D5\u05E8\u05E1\u05DD \u05D1-{date}",formSubmit:"\u05E9\u05DC\u05D9\u05D7\u05D4",formSkip:"\u05D0\u05D7\u05E8 \u05DB\u05DA",formSubmitted:"\u05E0\u05E9\u05DC\u05D7",formSkipped:"\u05D3\u05D5\u05DC\u05D2",formFillOut:"\u05DE\u05D9\u05DC\u05D5\u05D9",formRequired:"\u05E9\u05D3\u05D4 \u05D7\u05D5\u05D1\u05D4",formInvalidEmail:"\u05D4\u05D6\u05DF \u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05EA\u05E7\u05D9\u05E0\u05D4",formInvalidTel:"\u05D4\u05D6\u05DF \u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05EA\u05E7\u05D9\u05DF",formInvalidUrl:"\u05D4\u05D6\u05DF \u05DB\u05EA\u05D5\u05D1\u05EA URL \u05EA\u05E7\u05D9\u05E0\u05D4",formInvalidNumber:"\u05D4\u05D6\u05DF \u05DE\u05E1\u05E4\u05E8 \u05EA\u05E7\u05D9\u05DF",formTooShort:"\u05E7\u05E6\u05E8 \u05DE\u05D3\u05D9 (\u05DC\u05E4\u05D7\u05D5\u05EA {min} \u05EA\u05D5\u05D5\u05D9\u05DD)",formTooLong:"\u05D0\u05E8\u05D5\u05DA \u05DE\u05D3\u05D9 (\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max} \u05EA\u05D5\u05D5\u05D9\u05DD)",formNumberTooSmall:"\u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05E4\u05D7\u05D5\u05EA {min}",formNumberTooLarge:"\u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max}",formPatternMismatch:"\u05D4\u05EA\u05D0\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D4\u05E0\u05D3\u05E8\u05E9\u05EA",formChooseAtLeast:"\u05D1\u05D7\u05E8 \u05DC\u05E4\u05D7\u05D5\u05EA {min}",formChooseAtMost:"\u05D1\u05D7\u05E8 \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8 {max}",formOther:"\u05D0\u05D7\u05E8",formOtherPlaceholder:"\u05DB\u05EA\u05D5\u05D1 \u05D0\u05EA \u05EA\u05E9\u05D5\u05D1\u05EA\u05DA\u2026",inputRequired:"\u05E9\u05D0\u05DC\u05D5\u05EA \u05E2\u05D1\u05D5\u05E8\u05DA",inputBadge:"\u05E9\u05D0\u05DC\u05D5\u05EA",inputAnswered:"\u05E0\u05E2\u05E0\u05D4",inputSkipped:"\u05D3\u05D5\u05DC\u05D2",showOptions:"\u05D4\u05E6\u05D2 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",hideOptions:"\u05D4\u05E1\u05EA\u05E8 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",qtypeText:"\u05D4\u05EA\u05E9\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA",qtypeEmail:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",qtypePhone:"\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF",qtypeNumber:"\u05DE\u05E1\u05E4\u05E8",qtypeDate:"\u05EA\u05D0\u05E8\u05D9\u05DA",qtypeChooseOne:"\u05D1\u05D7\u05E8 \u05D0\u05D7\u05EA",qtypeChooseAny:"\u05D1\u05D7\u05E8 \u05DB\u05DE\u05D4",qtypeBoolean:"\u05DB\u05DF / \u05DC\u05D0",inputSubmit:"\u05E9\u05DC\u05D9\u05D7\u05EA \u05EA\u05E9\u05D5\u05D1\u05D5\u05EA",inputSubmitHint:"Enter \u05DC\u05E9\u05DC\u05D9\u05D7\u05D4 \xB7 Shift+Enter = \u05E9\u05D5\u05E8\u05D4 \u05D7\u05D3\u05E9\u05D4",inputSkip:"\u05D3\u05D9\u05DC\u05D5\u05D2",confirmYes:"\u05DB\u05DF",confirmNo:"\u05DC\u05D0",approve:"\u05D0\u05D9\u05E9\u05D5\u05E8",reject:"\u05D3\u05D7\u05D9\u05D9\u05D4",approvalPrompt:"\u05D4\u05DB\u05DC\u05D9 {tool} \u05D3\u05D5\u05E8\u05E9 \u05D0\u05EA \u05D0\u05D9\u05E9\u05D5\u05E8\u05DA \u05DB\u05D3\u05D9 \u05DC\u05E4\u05E2\u05D5\u05DC.",approvalBody:"\u05D1\u05D3\u05D5\u05E7 \u05D0\u05EA \u05E4\u05E8\u05DE\u05D8\u05E8\u05D9 \u05D4\u05DB\u05DC\u05D9 \u05E9\u05DC\u05DE\u05E2\u05DC\u05D4 \u05D5\u05D4\u05D7\u05DC\u05D8 \u05D0\u05DD \u05DC\u05D0\u05E9\u05E8 \u05E4\u05E2\u05D5\u05DC\u05D4 \u05D6\u05D5.",approvalYourResponse:"\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA: {decision}",approvalEditHint:"\u05E0\u05D9\u05EA\u05DF \u05DC\u05E2\u05E8\u05D5\u05DA \u05D0\u05EA \u05EA\u05D2\u05D5\u05D1\u05EA\u05DA \u05E2\u05D3 \u05E9\u05D4\u05E9\u05DC\u05D1 \u05D4\u05D6\u05D4 \u05D9\u05EA\u05D7\u05D3\u05E9.",approvalSubmitting:"\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E0\u05E9\u05DC\u05D7\u05D4. \u05DE\u05D1\u05E6\u05E2\u2026",edit:"\u05E2\u05E8\u05D9\u05DB\u05D4",toolParameters:"\u05E4\u05E8\u05DE\u05D8\u05E8\u05D9\u05DD",statusAwaiting:"\u05DE\u05DE\u05EA\u05D9\u05DF \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8",statusResponded:"\u05E0\u05E2\u05E0\u05D4",statusRunning:"\u05E4\u05D5\u05E2\u05DC",statusCompleted:"\u05D4\u05D5\u05E9\u05DC\u05DD",statusDenied:"\u05E0\u05D3\u05D7\u05D4",statusError:"\u05E9\u05D2\u05D9\u05D0\u05D4",statusSuperseded:"\u05D3\u05D5\u05DC\u05D2"},Vd={en:ci,fr:zd,ar:Ud,es:qd,he:Wd};function Xn(e,t){let n=di(e),o=Yn(t),a=n==="en"?{}:Vd[n]??{},i=o?t[n]??{}:t??{},l=o?t.en??{}:{};return{...ci,...a,...l,...i}}function di(e){return(e.split("-")[0]??"en").toLowerCase()}var Gd=new Set(["ar","he","iw","fa","ur","ps","sd","ug","yi","dv","ckb","ks","nqo","prs","syr"]);function _i(e){return Gd.has(di(e))}function Ie(e,t){return e[t]??t}function Yn(e){if(!e)return!1;for(let t of Object.values(e))if(t&&typeof t=="object")return!0;return!1}function ui(e,t){if(!(!e?.length||!t))return e.find(n=>n.locale===t)}function pi(e,t){let{translations:n,defaultLocale:o,...a}=e,i=ui(n,t);return i?{...a,title:i.title??a.title,description:i.description??a.description,content:i.content??a.content}:a}function mi(e,t){let{translations:n,defaultLocale:o,...a}=e,i=ui(n,t);if(!i)return a;let l=new Map((i.fields??[]).map(c=>[c.name,c])),s=a.fields.map(c=>{let _=l.get(c.name);if(!_)return c;let p=new Map((_.options??[]).map(h=>[h.value,h]));return{...c,label:_.label??c.label,placeholder:_.placeholder??c.placeholder,validationHint:_.validationHint??c.validationHint,options:c.options?.map(h=>{let d=p.get(h.value);return d?{...h,label:d.label??h.label,description:d.description??h.description}:h})}});return{...a,title:i.title??a.title,description:i.description??a.description,submitLabel:i.submitLabel??a.submitLabel,fields:s}}var Tr=class{get(t){try{return localStorage.getItem(t)}catch{return null}}set(t,n){try{localStorage.setItem(t,n)}catch{}}remove(t){try{localStorage.removeItem(t)}catch{}}},Jn=new Tr;var Ar=["off","error","warn","info","debug","trace"],Ir=x.cssPrefix,fi=`${Ir}.debug`,Kd=`__${x.global}_DEBUG__`,jd=`${Ir}-debug`,Qn=2,Er=null;function Xd(){if(typeof window>"u")return 2;try{let e=new URLSearchParams(window.location.search).get(jd);if(e!==null){let t=Rr(e);if(t>=0)return t}}catch{}try{let e=window.localStorage?.getItem(fi);if(e){let t=Rr(e);if(t>=0)return t}}catch{}return Reflect.get(window,Kd)?4:2}function Rr(e){if(e===!0||e==="1"||e==="true")return 4;if(e===!1||e==="0"||e==="false"||e==="off")return 0;if(typeof e=="number")return Math.max(0,Math.min(5,Math.floor(e)));if(typeof e=="string"){let t=Ar.indexOf(e);if(t>=0)return t}return-1}function Zn(e){let t=Rr(e);if(!(t<0)){Qn=t;try{window.localStorage?.setItem(fi,Ar[t])}catch{}}}function dn(){return Ar[Qn]}Qn=Xd();function gi(e){let t=`[${Ir}:${e}]`,n=(o,a,i)=>(l,s)=>{if(!(Qn<o)&&(s===void 0?console[a](t,l):console[a](t,l,s),Er))try{Er({level:i,scope:e,message:l,payload:s})}catch{}};return{error:n(1,"error","error"),warn:n(2,"warn","warn"),info:n(3,"info","info"),debug:n(4,"debug","debug"),trace:n(5,"debug","trace"),scope:o=>gi(`${e}:${o}`)}}var W=gi("core");function _n(e){Er=e}var ht=W.scope("context"),Yd=new Set(["visitorId","conversationId","conversationId","jwt","token","authorization","password"]),hi=50,Lr=1024,Jd=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Mr(e){return vi(e,"userContext",!0)}function Nr(e){return vi(e,"pageContext",!1)}function vi(e,t,n){if(e==null)return;if(typeof e!="object"||Array.isArray(e)){ht.warn(`ignored ${t} \u2014 expected an object`,{type:Array.isArray(e)?"array":typeof e});return}let o={},a=0;for(let[i,l]of Object.entries(e)){if(Yd.has(i)){ht.warn(`dropped reserved ${t} key "${i}" \u2014 managed by the widget, not host-settable`);continue}if(l==null)continue;if(a>=hi){ht.warn(`${t} truncated at ${hi} keys \u2014 dropped "${i}"`);continue}let s=Qd(t,i,l);s!==void 0&&(o[i]=s,a++)}return n&&typeof o.email=="string"&&!Jd.test(o.email)&&(ht.warn(`dropped malformed ${t}.email "${o.email}"`),delete o.email),Object.keys(o).length>0?o:void 0}function Qd(e,t,n){if(typeof n=="boolean")return n;if(typeof n=="number"){if(!Number.isFinite(n)){ht.warn(`dropped non-finite ${e}.${t}`);return}return n}if(typeof n=="string"){let o=n.trim();return o===""?void 0:o.length>Lr?(ht.warn(`truncated ${e}.${t} to ${Lr} chars`),o.slice(0,Lr)):o}ht.warn(`dropped ${e}.${t} \u2014 only string/number/boolean values are allowed`,{type:typeof n})}var eo={maxBytes:10485760,maxCount:10,accept:"*/*"},bi={voice:"local"},yi={list:[],byTrigger:{}},Dr={enabled:!0,sampleRate:1},to={upload:"/pai/upload-file",transcribe:"/pai/transcribe-audio",submitForm:"/pai/submit-form"},Dt={variant:"circle",size:"md",label:void 0,icon:"chat",hidden:!1},xi={floating:["theme","textSize","history","close","clear","expand","fullscreen","sound","language"],inline:["theme","textSize","history","close","clear","fullscreen","sound","language"],standalone:["theme","textSize","history","clear","sound","language"],page:["theme","textSize","history","clear","sound","language"],modal:["theme","textSize","history","close","clear","fullscreen","sound","language"],drawer:["theme","textSize","history","close","clear","fullscreen","sound","language"]},Or={enabled:!0,volume:.3,events:void 0},Pi={enabled:!0,events:void 0},Si=[{label:"tabConversations",layout:"chat"}];function ct(e){let t=e!==null&&typeof e=="object"?e:{},n=t.presentation??{},o=t.behavior??{},a=t.i18n??{},i=t.feedback??{},l=t.footer??{},s=t.header??{},{themeMode:c,themeOverrides:_}=Zd(t.theme),p=n.mode??"floating",h=e_(a.defaultLocale),d=a.availableLocales??[a.locale??h],f=Ot(a.locale??h,d,h),m=(t.baseUrl??x.defaultBaseUrl).replace(/\/$/,""),y=(t.agentApiBaseUrl??`${m}/api/agent`).replace(/\/$/,""),v=(t.dataApiBaseUrl??`${m}/api/data`).replace(/\/$/,"");return{widgetId:t.widgetId??"default",publicKey:t.publicKey,aiAgentDeploymentId:t.aiAgentDeploymentId,baseUrl:m,agentApiBaseUrl:y,dataApiBaseUrl:v,userContext:Mr(t.userContext),pageContext:Nr(t.pageContext),position:n.position??"bottom-right",themeMode:c,textSize:"normal",themeOverrides:_,mode:p,iframe:n.iframe??!1,responseMode:o.responseMode??"streaming",showReasoning:o.showReasoning??!1,showToolCalls:o.showToolCalls??!1,showSources:o.showSources??!1,enableMessageFeedback:!(o.disableMessageFeedback??!1),autoSendSuggestions:o.autoSendSuggestions??!1,features:{voice:t.features?.voice??bi.voice,fileUpload:!(t.features?.disableFileUpload??!1),humanInLoop:!(t.features?.disableHumanInLoop??!1),tools:t.features?.tools},forms:un(t.forms,f),endpoints:{upload:t.endpoints?.upload??to.upload,transcribe:t.endpoints?.transcribe??to.transcribe,submitForm:t.endpoints?.submitForm??to.submitForm},attachments:{accept:t.composer?.attachments?.accept??eo.accept,maxBytes:t.composer?.attachments?.maxBytes??eo.maxBytes,maxCount:t.composer?.attachments?.maxCount??eo.maxCount},locale:f,defaultLocale:h,availableLocales:d,startMinimized:o.startMinimized??!0,actions:t_(p,s.actions),size:n.size??{},launcher:c_(t.launcher),sound:n_(i.sound),haptics:o_(i.haptics),strings:Xn(f,a.strings),stringsOverride:a.strings,composerDisclaimer:l.composerDisclaimer??"",poweredBy:a_(l.poweredBy),composer:i_(t.composer),modules:s_(t.modules),tracking:r_(t.tracking,v),storage:t.storage??Jn,onMessage:t.onMessage,onOpen:t.onOpen,onClose:t.onClose,onError:t.onError}}function Zd(e){return typeof e=="string"?{themeMode:e,themeOverrides:{}}:e&&typeof e=="object"?{themeMode:"auto",themeOverrides:e}:{themeMode:"auto",themeOverrides:{}}}function e_(e){return e&&e!=="auto"?e:typeof navigator<"u"&&navigator.language?navigator.language:"en"}function Ot(e,t,n){return t.length<=1||t.includes(e)?e:t.includes(n)?n:t[0]??e}function t_(e,t){return t??xi[e]}function n_(e){return{enabled:e?.enabled??Or.enabled,volume:e?.volume??Or.volume,events:e?.events}}function o_(e){return{enabled:e?.enabled??Pi.enabled,events:e?.events}}function r_(e,t){let n=e?.sampleRate??Dr.sampleRate;return{enabled:e?.enabled??Dr.enabled,endpoint:e?.endpoint??`${t}/pai/elements-px.gif`,sampleRate:Math.min(1,Math.max(0,Number.isFinite(n)?n:1)),token:e?.token}}function a_(e){let n={...{text:`Powered by ${x.displayName}`,href:x.siteUrl},...e};return!!(n.text||n.logoUrl)?n:null}function i_(e){let t=e?.sendButton;return{sendButton:{shape:t?.shape??"circle",icon:t?.icon??"arrowUp",variant:t?.variant??"filled"}}}function s_(e){let t=e===void 0?Si:e,n=new Set,o=[];for(let i of t.slice(0,4)){if(!i?.label||!i?.layout)continue;let l=i.contentTags?.filter(Boolean),s=i.id??l?.[0]??i.layout;for(;n.has(s);)s=`${s}-${o.length}`;n.add(s);let c={id:s,label:i.label,layout:i.layout};l&&l.length>0&&(c.contentTags=l),i.layout==="home"&&(c.brandName=i.brandName,c.greetingText=i.greetingText,c.showGreeting=!(i.hideGreeting??!1),c.showSearchBar=!(i.hideSearchBar??!1),c.showRecentConversations=!(i.hideRecentConversations??!1),i.userAvatars&&i.userAvatars.length>0&&(c.userAvatars=i.userAvatars),i.status&&(c.status=i.status),c.contentBlockTitle=i.contentBlockTitle),o.push(c)}let a=Object.fromEntries(o.map(i=>[i.id,i]));return{list:o,byId:a}}function un(e,t){var i;if(!e?.length)return yi;let n=[],o=new Set;for(let l of e){if(!l?.id||o.has(l.id))continue;let s=mi(l,t),c=(s.fields??[]).filter(p=>!!(p&&p.name&&p.label&&p.type)),_=(Array.isArray(s.on)?s.on:[s.on]).map(l_).filter(p=>p!==null);c.length===0||_.length===0||(o.add(s.id),n.push({id:s.id,triggers:_,when:s.when,fields:c,title:s.title,description:s.description,submitLabel:s.submitLabel,skippable:s.skippable??!1,frequency:s.frequency??"once",mirrorToContext:s.mirrorToContext??!0,reopenable:s.reopenable??!0,reviewable:s.reviewable??!0}))}let a={};for(let l of n)for(let s of l.triggers)(a[i=s.kind]??(a[i]=[])).push(l);return{list:n,byTrigger:a}}function l_(e){if(typeof e!="string")return null;if(e==="pre-chat"||e==="conversation-closed"||e==="panel-close"||e==="manual")return{kind:e};let[t,n]=e.split(":",2);if(t==="after-messages"){let o=Number(n);return Number.isFinite(o)&&o>0?{kind:"after-messages",param:o}:null}if(t==="idle"){let o=Number(n);return Number.isFinite(o)&&o>0?{kind:"idle",param:o}:null}return t==="page-area"&&n?{kind:"page-area",param:n}:null}function c_(e){let t=e?.callout?.text?{shape:"pill",position:"auto",delayMs:1200,autoDismissMs:0,animated:!0,persistent:!0,...e.callout}:null;return{variant:e?.variant??Dt.variant,size:e?.size??Dt.size,label:e?.label??Dt.label,icon:e?.icon??Dt.icon,hidden:e?.hidden??Dt.hidden,callout:t}}function $r(e,t,n,o){let a=Ot(t,e.availableLocales,e.defaultLocale);if(a===e.locale&&n===e.themeMode&&o===e.textSize)return e;let i={...e};return a!==e.locale&&(i.locale=a,i.strings=Xn(a,e.stringsOverride)),n!==e.themeMode&&(i.themeMode=n),o!==e.textSize&&(i.textSize=o),i}var d_=["presentation","behavior","theme","launcher","header","composer","feedback","i18n","footer","features","tracking","endpoints"];function Fr(e,t){if(!t)return e;let n={...e};for(let i of d_){let l=t[i];if(l===void 0)continue;let s=e[i];if(i==="theme"){s===void 0&&(n[i]=l);continue}i!=="i18n"&&(n[i]=ki(l,s))}t.modules!==void 0&&e.modules===void 0&&(n.modules=t.modules),t.dataApiBaseUrl!==void 0&&e.dataApiBaseUrl===void 0&&(n.dataApiBaseUrl=t.dataApiBaseUrl);let o=e.i18n,a=t.i18n;if(o||a){let i=ki(a??{},o);a?.availableLocales!==void 0&&(i.availableLocales=a.availableLocales),a?.defaultLocale!==void 0&&(i.defaultLocale=a.defaultLocale);let l=o?.strings,s=a?.strings;(l||s)&&(i.strings=__(s,l)),n.i18n=i}return n}function ki(e,t){if(!t)return e;let n={...e};for(let[o,a]of Object.entries(t))a!==void 0&&(n[o]=a);return n}function __(e,t){if(!e)return t;if(!t)return e;let n=Yn(e),o=Yn(t);if(!n&&!o)return{...e,...t};let a={},i=n?e:{en:e},l=o?t:{en:t};for(let[s,c]of Object.entries(i))a[s]={...c};for(let[s,c]of Object.entries(l))a[s]={...a[s],...c};return a}var u_=["clear","expand","fullscreen","sound","history","language","theme","textSize","close"],tt=e=>e!=="false",Ci=e=>e.split(",").map(t=>t.trim()).filter(Boolean),Ti=[["public-key","publicKey"],["ai-agent-deployment-id","aiAgentDeploymentId"],["base-url","baseUrl"],["agent-api-base-url","agentApiBaseUrl"],["data-api-base-url","dataApiBaseUrl"],["theme","theme",e=>e]],Ei=[["mode","mode",e=>e],["position","position",e=>e],["iframe","iframe",tt]],Ri=[["width","width"],["height","height"]],Ai=[["response-mode","responseMode",e=>e],["start-minimized","startMinimized",tt],["show-reasoning","showReasoning",tt],["show-tool-calls","showToolCalls",tt],["show-sources","showSources",tt],["disable-message-feedback","disableMessageFeedback",tt],["auto-send-suggestions","autoSendSuggestions",tt]],Ii=[["locale","locale"]],p_=new Set(u_),m_=e=>Ci(e).filter(t=>p_.has(t)),Li=[["launcher-variant","variant",e=>e],["launcher-size","size",e=>e],["launcher-icon","icon"],["launcher-hidden","hidden",tt]],Mi=[["features-disable-file-upload","disableFileUpload",tt],["features-voice","voice",e=>e],["features-tools","tools",Ci]],Ni=[["endpoint-upload","upload"],["endpoint-transcribe","transcribe"]],Di=[["user-id","id"],["user-email","email"],["user-name","name"]],Oi=[["page-area","area"],["page-url","url"],["page-path","path"],["page-title","title"]],f_=["launcher-label","callout-text","callout-delay","actions-main","actions-overflow","user-context","page-context"],g_=[Ti,Ei,Ri,Ai,Ii,Li,Mi,Ni,Di,Oi],h_=new Set(["iframe","start-minimized"]),Hr=[...g_.flatMap(e=>e.map(([t])=>t).filter(t=>!h_.has(t))),...f_];function no(e){let t={},n=f=>{let m=e(f);return m===null||m===""?void 0:m};for(let[f,m,y]of Ti){let v=n(f);v!==void 0&&(t[m]=y?y(v):v)}let o=vt(n,Ei),a=vt(n,Ri);(o||a)&&(t.presentation={...o,...a?{size:a}:{}});let i=vt(n,Ai);i&&(t.behavior=i);let l=vt(n,Ii);l&&(t.i18n=l);let s=b_(e,n);s&&(t.launcher=s);let c=vt(n,Mi);c&&(t.features=c);let _=vt(n,Ni);_&&(t.endpoints=_);let p=wi(n,Di,"user-context");p&&(t.userContext=p);let h=wi(n,Oi,"page-context");h&&(t.pageContext=h);let d=n("actions");return d!==void 0&&(t.header={actions:m_(d)}),t}function Br(e){return e?no(t=>e[v_(t)]??null):{}}function v_(e){return e.replaceAll(/-([a-z])/g,(t,n)=>n.toUpperCase())}function vt(e,t){let n={};for(let[o,a,i]of t){let l=e(o);l!==void 0&&(n[a]=i?i(l):l)}return Object.keys(n).length>0?n:null}function wi(e,t,n){let o={};for(let[s,c]of t){let _=e(s);_!==void 0&&(o[c]=_)}let a={},i=e(n);if(i)try{let s=JSON.parse(i);s&&typeof s=="object"&&!Array.isArray(s)&&(a=s)}catch{}let l={...a,...o};return Object.keys(l).length>0?l:null}function b_(e,t){let n=vt(t,Li)??{},o=e("launcher-label");o!==null&&(n.label=o);let a=t("callout-text");if(a){let i=Number.parseInt(t("callout-delay")??"",10);n.callout={text:a,...Number.isFinite(i)?{delayMs:i}:{}}}return Object.keys(n).length>0?n:null}var co,Z,zi,Wr,dt,$i,Ui,qi,zr,ro,pn,Wi,Vr,Ur,qr,y_,io={},so=[],x_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,_o=Array.isArray;function nt(e,t){for(var n in t)e[n]=t[n];return e}function Gr(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function uo(e,t,n){var o,a,i,l={};for(i in t)i=="key"?o=t[i]:i=="ref"?a=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?co.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return ao(e,l,o,a,null)}function ao(e,t,n,o,a){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++zi,__i:-1,__u:0};return a==null&&Z.vnode!=null&&Z.vnode(i),i}function ie(e){return e.children}function _t(e,t){this.props=e,this.context=t}function $t(e,t){if(t==null)return e.__?$t(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?$t(e):null}function P_(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],a=[],i=nt({},t);i.__v=t.__v+1,Z.vnode&&Z.vnode(i),Kr(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??$t(t),!!(32&t.__u),a),i.__v=t.__v,i.__.__k[i.__i]=i,Xi(o,i,a),t.__e=t.__=null,i.__e!=n&&Vi(i)}}function Vi(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Vi(e)}function Fi(e){(!e.__d&&(e.__d=!0)&&dt.push(e)&&!lo.__r++||$i!=Z.debounceRendering)&&(($i=Z.debounceRendering)||Ui)(lo)}function lo(){try{for(var e,t=1;dt.length;)dt.length>t&&dt.sort(qi),e=dt.shift(),t=dt.length,P_(e)}finally{dt.length=lo.__r=0}}function Gi(e,t,n,o,a,i,l,s,c,_,p){var h,d,f,m,y,v,P,C=o&&o.__k||so,b=t.length;for(c=S_(n,t,C,c,b),h=0;h<b;h++)(f=n.__k[h])!=null&&(d=f.__i!=-1&&C[f.__i]||io,f.__i=h,v=Kr(e,f,d,a,i,l,s,c,_,p),m=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&jr(d.ref,null,f),p.push(f.ref,f.__c||m,f)),y==null&&m!=null&&(y=m),(P=!!(4&f.__u))||d.__k===f.__k?(c=Ki(f,c,e,P),P&&d.__e&&(d.__e=null)):typeof f.type=="function"&&v!==void 0?c=v:m&&(c=m.nextSibling),f.__u&=-7);return n.__e=y,c}function S_(e,t,n,o,a){var i,l,s,c,_,p=n.length,h=p,d=0;for(e.__k=new Array(a),i=0;i<a;i++)(l=t[i])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[i]=ao(null,l,null,null,null):_o(l)?l=e.__k[i]=ao(ie,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[i]=ao(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[i]=l,c=i+d,l.__=e,l.__b=e.__b+1,s=null,(_=l.__i=k_(l,n,c,h))!=-1&&(h--,(s=n[_])&&(s.__u|=2)),s==null||s.__v==null?(_==-1&&(a>p?d--:a<p&&d++),typeof l.type!="function"&&(l.__u|=4)):_!=c&&(_==c-1?d--:_==c+1?d++:(_>c?d--:d++,l.__u|=4))):e.__k[i]=null;if(h)for(i=0;i<p;i++)(s=n[i])!=null&&(2&s.__u)==0&&(s.__e==o&&(o=$t(s)),Ji(s,s));return o}function Ki(e,t,n,o){var a,i;if(typeof e.type=="function"){for(a=e.__k,i=0;a&&i<a.length;i++)a[i]&&(a[i].__=e,t=Ki(a[i],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=$t(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function k_(e,t,n,o){var a,i,l,s=e.key,c=e.type,_=t[n],p=_!=null&&(2&_.__u)==0;if(_===null&&s==null||p&&s==_.key&&c==_.type)return n;if(o>(p?1:0)){for(a=n-1,i=n+1;a>=0||i<t.length;)if((_=t[l=a>=0?a--:i++])!=null&&(2&_.__u)==0&&s==_.key&&c==_.type)return l}return-1}function Hi(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||x_.test(t)?n:n+"px"}function oo(e,t,n,o,a){var i,l;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||Hi(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||Hi(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Wi,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n[pn]=o[pn]:(n[pn]=Vr,e.addEventListener(t,i?qr:Ur,i)):e.removeEventListener(t,i?qr:Ur,i);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Bi(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[ro]==null)t[ro]=Vr++;else if(t[ro]<n[pn])return;return n(Z.event?Z.event(t):t)}}}function Kr(e,t,n,o,a,i,l,s,c,_){var p,h,d,f,m,y,v,P,C,b,E,z,te,ee,J,oe,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[s=t.__e=n.__e]),(p=Z.__b)&&p(t);e:if(typeof T=="function"){h=l.length;try{if(C=t.props,b=T.prototype&&T.prototype.render,E=(p=T.contextType)&&o[p.__c],z=p?E?E.props.value:p.__:o,n.__c?P=(d=t.__c=n.__c).__=d.__E:(b?t.__c=d=new T(C,z):(t.__c=d=new _t(C,z),d.constructor=T,d.render=C_),E&&E.sub(d),d.state||(d.state={}),d.__n=o,f=d.__d=!0,d.__h=[],d._sb=[]),b&&d.__s==null&&(d.__s=d.state),b&&T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=nt({},d.__s)),nt(d.__s,T.getDerivedStateFromProps(C,d.__s))),m=d.props,y=d.state,d.__v=t,f)b&&T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),b&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(b&&T.getDerivedStateFromProps==null&&C!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(C,z),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(C,d.__s,z)===!1){t.__v!=n.__v&&(d.props=C,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(N){N&&(N.__=t)}),so.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&l.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(C,d.__s,z),b&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,y,v)})}if(d.context=z,d.props=C,d.__P=e,d.__e=!1,te=Z.__r,ee=0,b)d.state=d.__s,d.__d=!1,te&&te(t),p=d.render(d.props,d.state,d.context),so.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,te&&te(t),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++ee<25);d.state=d.__s,d.getChildContext!=null&&(o=nt(nt({},o),d.getChildContext())),b&&!f&&d.getSnapshotBeforeUpdate!=null&&(v=d.getSnapshotBeforeUpdate(m,y)),J=p!=null&&p.type===ie&&p.key==null?Yi(p.props.children):p,s=Gi(e,_o(J)?J:[J],t,n,o,a,i,l,s,c,_),d.base=t.__e,t.__u&=-161,d.__h.length&&l.push(d),P&&(d.__E=d.__=null)}catch(N){if(l.length=h,t.__v=null,c||i!=null){if(N.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;i!=null&&(i[i.indexOf(s)]=null),t.__e=s}else if(i!=null)for(oe=i.length;oe--;)Gr(i[oe])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),N.then||ji(t),Z.__e(N,t,n)}}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=w_(n.__e,t,n,o,a,i,l,c,_);return(p=Z.diffed)&&p(t),128&t.__u?void 0:s}function ji(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ji))}function Xi(e,t,n){for(var o=0;o<n.length;o++)jr(n[o],n[++o],n[++o]);Z.__c&&Z.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){Z.__e(i,a.__v)}})}function Yi(e){return typeof e!="object"||e==null||e.__b>0?e:_o(e)?e.map(Yi):e.constructor!==void 0?null:nt({},e)}function w_(e,t,n,o,a,i,l,s,c){var _,p,h,d,f,m,y,v=n.props||io,P=t.props,C=t.type;if(C=="svg"?a="http://www.w3.org/2000/svg":C=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(_=0;_<i.length;_++)if((f=i[_])&&"setAttribute"in f==!!C&&(C?f.localName==C:f.nodeType==3)){e=f,i[_]=null;break}}if(e==null){if(C==null)return document.createTextNode(P);e=document.createElementNS(a,C,P.is&&P),s&&(Z.__m&&Z.__m(t,i),s=!1),i=null}if(C==null)v===P||s&&e.data==P||(e.data=P);else{if(i=C=="textarea"&&P.defaultValue!=null?null:i&&co.call(e.childNodes),!s&&i!=null)for(v={},_=0;_<e.attributes.length;_++)v[(f=e.attributes[_]).name]=f.value;for(_ in v)f=v[_],_=="dangerouslySetInnerHTML"?h=f:_=="children"||_ in P||_=="value"&&"defaultValue"in P||_=="checked"&&"defaultChecked"in P||oo(e,_,null,f,a);for(_ in P)f=P[_],_=="children"?d=f:_=="dangerouslySetInnerHTML"?p=f:_=="value"?m=f:_=="checked"?y=f:s&&typeof f!="function"||v[_]===f||oo(e,_,f,v[_],a);if(p)s||h&&(p.__html==h.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(h&&(e.innerHTML=""),Gi(t.type=="template"?e.content:e,_o(d)?d:[d],t,n,o,C=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,l,i?i[0]:n.__k&&$t(n,0),s,c),i!=null)for(_=i.length;_--;)Gr(i[_]);s&&C!="textarea"||(_="value",C=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[_]||C=="progress"&&!m||C=="option"&&m!=v[_])&&oo(e,_,m,v[_],a),_="checked",y!=null&&y!=e[_]&&oo(e,_,y,v[_],a))}return e}function jr(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(a){Z.__e(a,n)}}function Ji(e,t,n){var o,a;if(Z.unmount&&Z.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||jr(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){Z.__e(i,t)}o.base=o.__P=o.__n=null}if(o=e.__k)for(a=0;a<o.length;a++)o[a]&&Ji(o[a],t,n||typeof e.type!="function");n||Gr(e.__e),e.__c=e.__=e.__e=void 0}function C_(e,t,n){return this.constructor(e,n)}function Ft(e,t,n){var o,a,i,l;t==document&&(t=document.documentElement),Z.__&&Z.__(e,t),a=(o=typeof n=="function")?null:n&&n.__k||t.__k,i=[],l=[],Kr(t,e=(!o&&n||t).__k=uo(ie,null,[e]),a||io,io,t.namespaceURI,!o&&n?[n]:a?null:t.firstChild?co.call(t.childNodes):null,i,!o&&n?n:a?a.__e:t.firstChild,o,l),Xi(i,e,l),e.props.children=null}co=so.slice,Z={__e:function(e,t,n,o){for(var a,i,l;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),l=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,o||{}),l=a.__d),l)return a.__E=a}catch(s){e=s}throw e}},zi=0,Wr=function(e){return e!=null&&e.constructor===void 0},_t.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=nt({},this.state),typeof e=="function"&&(e=e(nt({},n),this.props)),e&&nt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Fi(this))},_t.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fi(this))},_t.prototype.render=ie,dt=[],Ui=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qi=function(e,t){return e.__v.__b-t.__v.__b},lo.__r=0,zr=Math.random().toString(8),ro="__d"+zr,pn="__a"+zr,Wi=/(PointerCapture)$|Capture$/i,Vr=0,Ur=Bi(!1),qr=Bi(!0),y_=0;var Ht="0.62.1";function Qi(e){return`${x.cssPrefix}:${e}`}function mn(e,t,n){e.dispatchEvent(new CustomEvent(Qi(t),{detail:n}))}function Zi(e,t){let o=Object.entries(t).map(([a,i])=>{let l=Qi(a),s=c=>i(c.detail);return e.addEventListener(l,s),[l,s]});return()=>{for(let[a,i]of o)e.removeEventListener(a,i)}}function We(){let e=Date.now(),t=new Uint8Array(16);t[0]=Math.floor(e/2**40)&255,t[1]=Math.floor(e/2**32)&255,t[2]=e>>>24&255,t[3]=e>>>16&255,t[4]=e>>>8&255,t[5]=e&255,T_(t.subarray(6)),t[6]=t[6]&15|112,t[8]=t[8]&63|128;let n=Array.from(t,o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function T_(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){crypto.getRandomValues(e);return}for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256)}var bt=W.scope("persistence");function ut(e,t=Jn,n){let o=n?`${e}.${n}`:e,a=`${x.cssPrefix}.storageVersion`,i=t.get(a)??void 0,l=i?`.v${i}`:"",s=`${x.cssPrefix}.${o}${l}`,c=`${x.cssPrefix}${l}.visitorId`,_=`${s}.conversationId`,p=`${s}.userPrefs`,h=`${s}.panelOpen`,d=`${s}.panelSize`,f=`${s}.calloutDismissed`,m=`${s}.sidebarCollapsed`,y=`${s}.activeModule`,v=`${s}.historyCount`,P=`${s}.formsDone`,C={getVisitorId(){let b=t.get(c);if(b)return b;let E=We();return t.set(c,E),E},setVisitorId(b){bt.debug("setVisitorId (rebind)",{id:b,scope:o}),t.set(c,b)},loadConversationId(){return t.get(_)??void 0},saveConversationId(b){bt.trace("saveConversationId",{id:b,scope:o}),b?t.set(_,b):t.remove(_)},loadUserPrefs(){let b=t.get(p);if(!b)return{};try{let E=JSON.parse(b);return es(E)?E:{}}catch(E){return bt.warn("loadUserPrefs parse failed",{error:E}),{}}},saveUserPrefs(b){try{t.set(p,JSON.stringify(b))}catch(E){bt.warn("saveUserPrefs serialise failed",{error:E})}},patchUserPrefs(b){let E=C.loadUserPrefs();C.saveUserPrefs({...E,...b})},loadPanelOpen(){let b=t.get(h);return b==="1"?!0:b==="0"?!1:null},savePanelOpen(b){t.set(h,b?"1":"0")},loadPanelSize(){let b=t.get(d);return b==="normal"||b==="expanded"||b==="fullscreen"?b:null},savePanelSize(b){t.set(d,b)},loadCalloutDismissed(b){if(!b)return!1;let E=t.get(f);return!!E&&E===b},saveCalloutDismissed(b){b?t.set(f,b):t.remove(f)},loadSidebarCollapsed(){let b=t.get(m);return b==="1"?!0:b==="0"?!1:null},saveSidebarCollapsed(b){t.set(m,b?"1":"0")},loadActiveModule(){return t.get(y)||null},saveActiveModule(b){t.set(y,b)},loadHistoryCount(){let b=t.get(v);if(!b)return null;let E=Number.parseInt(b,10);return Number.isFinite(E)&&E>=0?E:null},saveHistoryCount(b){t.set(v,String(b))},loadFormsDone(){let b=t.get(P);if(!b)return{};try{let E=JSON.parse(b);return es(E)?E:{}}catch(E){return bt.warn("loadFormsDone parse failed",{error:E}),{}}},saveFormDone(b){try{let E=C.loadFormsDone();E[b]=Date.now(),t.set(P,JSON.stringify(E))}catch(E){bt.warn("saveFormDone serialise failed",{error:E})}},rememberStorageVersion(b){b&&b!==t.get(a)&&(bt.debug("rememberStorageVersion (force-reset on next load)",{version:b}),t.set(a,b))},clearConversation(){t.remove(_)}};return C}function es(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var ts=`:host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent: var(--__P__-accent-user);--__P__-accent-text-user: __BRAND_ACCENT_TEXT__;--__P__-accent-text: var(--__P__-accent-text-user);--__P__-accent-fg: var(--__P__-accent);--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-pill-l-min: .3;--__P__-pill-l-max: .46;--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-conversation-max: 768px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-scale: 1;--__P__-text-xs: calc(12px * var(--__P__-text-scale));--__P__-text-sm: calc(13px * var(--__P__-text-scale));--__P__-text-base: calc(15px * var(--__P__-text-scale));--__P__-text-md: calc(16px * var(--__P__-text-scale));--__P__-text-lg: calc(18px * var(--__P__-text-scale));--__P__-text-xl: calc(22px * var(--__P__-text-scale));--__P__-text-2xl: calc(30px * var(--__P__-text-scale))}:host([data-mode="modal"]),:host([data-mode="drawer"]){--__P__-conversation-max: 100%}:host([data-text-size="small"]){--__P__-text-scale: .9}:host([data-text-size="large"]){--__P__-text-scale: 1.15}:host{--__P__-ease: cubic-bezier(.2, .7, .2, 1);--__P__-ease-out: cubic-bezier(.2, .7, .2, 1);--__P__-ease-in: cubic-bezier(.4, 0, 1, 1);--__P__-ease-in-out: cubic-bezier(.65, 0, .35, 1);--__P__-dur-quick: .12s;--__P__-dur-base: .22s;--__P__-dur-slow: .32s;font-family:var(--__P__-font);color:var(--__P__-fg);color-scheme:light;--__P__-color-scheme: light}:host([data-theme="dark"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-danger-text: oklch(.8077 .1035 19.57);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .18);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);--__P__-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .5);--__P__-backdrop: rgba(0, 0, 0, .65);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;color-scheme:dark;--__P__-color-scheme: dark}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);color-scheme:dark;--__P__-color-scheme: dark}}@supports (color: oklch(from red l c h)){:host{--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.3, l, .62) c h);--__P__-accent-text: oklch(from var(--__P__-accent) clamp(0, (l / .623 - 1) * -infinity, 1) 0 h);--__P__-accent-fg: oklch(from var(--__P__-accent-user) clamp(.3, l, .46) c h)}:host([data-theme="dark"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}}}@media(prefers-reduced-motion:reduce){:host{--__P__-dur-quick: 1ms;--__P__-dur-base: 1ms;--__P__-dur-slow: 1ms}}
|
|
2
2
|
`;var ns=`*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent-fg);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
|
|
3
3
|
`;var os=`.__P__-anchor{color-scheme:var(--__P__-color-scheme, light);right:16px;bottom:16px}.__P__-surface{display:contents}.__P__-surface[hidden]{display:none}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:calc(14px * var(--__P__-text-scale))}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent-fg);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:calc(14px * var(--__P__-text-scale));background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:color-mix(in srgb,currentColor 15%,transparent)}.__P__-callout-close:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}@media(prefers-reduced-motion:no-preference){.__P__-panel{transition:width var(--__P__-dur-base) var(--__P__-ease),height var(--__P__-dur-base) var(--__P__-ease),max-width var(--__P__-dur-base) var(--__P__-ease),max-height var(--__P__-dur-base) var(--__P__-ease)}.__P__-panel[data-resizing]{transition:none}}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;padding:0;justify-content:flex-end;align-items:flex-end}:host([data-mode="fullscreen"][data-position*="top"]) .__P__-anchor{justify-content:flex-start}:host([data-mode="fullscreen"][data-position*="left"]) .__P__-anchor{align-items:flex-start}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}@media(max-width:640px){:host([data-mode="open"]) .__P__-anchor,:host([data-mode="expanded"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="open"]) .__P__-panel,:host([data-mode="expanded"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent-fg);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent-fg);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list,.__P__-history,.__P__-module-scroll,.__P__-home-scroll,.__P__-help-list,.__P__-toolui-code,.__P__-sidebar-conversations{scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;overscroll-behavior:contain;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar,.__P__-history::-webkit-scrollbar,.__P__-module-scroll::-webkit-scrollbar,.__P__-home-scroll::-webkit-scrollbar,.__P__-help-list::-webkit-scrollbar,.__P__-toolui-code::-webkit-scrollbar,.__P__-sidebar-conversations::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb,.__P__-history::-webkit-scrollbar-thumb,.__P__-module-scroll::-webkit-scrollbar-thumb,.__P__-home-scroll::-webkit-scrollbar-thumb,.__P__-help-list::-webkit-scrollbar-thumb,.__P__-toolui-code::-webkit-scrollbar-thumb,.__P__-sidebar-conversations::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;inset-inline-end:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px}.__P__-list--fade{--__P__-fade-size: 20px;--__P__-fade-top: 0px;--__P__-fade-bottom: 0px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 var(--__P__-fade-top),#000 calc(100% - var(--__P__-fade-bottom)),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 var(--__P__-fade-top),#000 calc(100% - var(--__P__-fade-bottom)),transparent 100%)}.__P__-list--fade[data-fade-top=true]{--__P__-fade-top: var(--__P__-fade-size)}.__P__-list--fade[data-fade-bottom=true]{--__P__-fade-bottom: var(--__P__-fade-size)}.__P__-list>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-date-divider{display:flex;justify-content:center;margin-block:var(--__P__-space-3)}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:calc(11px * var(--__P__-text-scale));font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card)}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;min-width:0;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:calc(14px * var(--__P__-text-scale));word-wrap:break-word;overflow-wrap:break-word;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-end-end-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-end-start-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui){width:100%}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui) .__P__-bubble{width:100%}@media(max-width:640px){.__P__-bubble-col{max-width:92%}.__P__-toolui:not(.__P__-toolui-collapsible){padding:var(--__P__-space-3);gap:var(--__P__-space-2)}details.__P__-toolui-collapsible>summary{padding:var(--__P__-space-2) var(--__P__-space-3)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-3)}.__P__-toolui-section,.__P__-toolui-desc{padding:var(--__P__-space-2) var(--__P__-space-3)}}.__P__-bubble-meta{display:flex;align-items:center;gap:8px;margin-top:2px;padding:0 2px;min-height:24px}.__P__-bubble-actions{display:flex;align-items:center;gap:2px}.__P__-bubble-time{font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-feedback{display:flex;align-items:center;gap:2px}.__P__-msg-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:var(--__P__-radius-sm);background:transparent;color:var(--__P__-fg-muted);cursor:pointer;opacity:.65;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-msg-action:hover{opacity:1;background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-msg-action:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-msg-action[data-active=true]{opacity:1;color:var(--__P__-accent-fg)}.__P__-msg-action svg{width:15px;height:15px}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-inline-start:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-inline-start:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-inline-start:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-start-end-radius:var(--__P__-radius-sm);border-end-end-radius:var(--__P__-radius-sm);color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:start}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-inline-start:var(--__P__-space-3);border-inline-start:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary:hover{color:var(--__P__-fg)}.__P__-reasoning-summary:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;margin-inline-end:6px;padding:var(--__P__-space-1) var(--__P__-space-2);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);text-decoration:none}a.__P__-source:hover{color:var(--__P__-fg);border-color:var(--__P__-accent)}.__P__-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent-fg);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent-fg)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent-fg);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 12px;border-radius:var(--__P__-radius-sm);background:color-mix(in oklab,var(--__P__-danger) 8%,var(--__P__-bg-elevated));border:1px solid color-mix(in oklab,var(--__P__-danger) 20%,transparent);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error span{min-width:0}.__P__-error button{margin-inline-start:auto;flex-shrink:0;border:0;background:none;padding:0;color:var(--__P__-accent-fg);font:inherit;font-size:var(--__P__-text-sm);font-weight:600;text-decoration:underline;white-space:nowrap;cursor:pointer}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-3)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:14px 4px 8px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-card{display:flex;flex-direction:column;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);overflow:hidden}.__P__-history-item{all:unset;display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item+.__P__-history-item{border-top:1px solid var(--__P__-border)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:color-mix(in oklab,var(--__P__-accent) 12%,transparent);color:var(--__P__-accent-fg)}.__P__-history-avatar svg{width:18px;height:18px}.__P__-history-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.__P__-history-row{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2)}.__P__-history-title{flex:1;min-width:0;font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-time{flex:none;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-history-preview{flex:1;min-width:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-history-item[data-unread=true] .__P__-history-title{font-weight:600}.__P__-history-item[data-closed=true] .__P__-history-title{color:var(--__P__-fg-muted)}.__P__-history-item-skeleton{cursor:default;pointer-events:none}.__P__-skeleton{display:block;border-radius:4px;background:linear-gradient(90deg,color-mix(in oklab,var(--__P__-fg) 9%,transparent) 30%,color-mix(in oklab,var(--__P__-fg) 17%,transparent),color-mix(in oklab,var(--__P__-fg) 9%,transparent) 70%);background-size:200% 100%;animation:__P__-skeleton-shimmer 1.8s ease-in-out infinite}.__P__-history-avatar.__P__-skeleton{border-radius:50%}.__P__-skeleton-heading{width:52px;height:8px}.__P__-skeleton-title{width:55%;height:12px}.__P__-skeleton-time{width:34px;height:10px}.__P__-skeleton-preview{width:80%;height:10px}@keyframes __P__-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.__P__-skeleton{animation:none}}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;inset-inline-end:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent-fg)}.__P__-menu-check svg{width:14px;height:14px}.__P__-menu-item-segmented{cursor:default}.__P__-menu-item-segmented:hover{background:transparent}.__P__-segmented{display:inline-flex;gap:2px;padding:2px;background:var(--__P__-bg-elevated);border-radius:var(--__P__-radius-sm)}.__P__-segment{all:unset;min-width:26px;padding:3px 8px;font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.02em;text-align:center;color:var(--__P__-fg-muted);border-radius:calc(var(--__P__-radius-sm) - 2px);cursor:pointer;transition:color .12s ease,background .12s ease}.__P__-segment:hover{color:var(--__P__-fg)}.__P__-segment[data-on=true]{background:var(--__P__-bg);color:var(--__P__-accent-fg);box-shadow:var(--__P__-shadow-card)}.__P__-segment:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body,.__P__-messenger-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-pane[hidden]{display:none}@keyframes __P__-view-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}@media(prefers-reduced-motion:no-preference){.__P__-module,.__P__-history{animation:__P__-view-in .18s var(--__P__-ease-out)}}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent-fg)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-2px;left:calc(50% + 6px);width:8px;height:8px;border-radius:50%;background:var(--__P__-accent);box-shadow:0 0 0 2px var(--__P__-bg-elevated)}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-hero-actions .__P__-icon-btn:hover{background:color-mix(in srgb,#fff 18%,transparent);color:#fff}.__P__-home-hero-actions .__P__-icon-btn:active{background:color-mix(in srgb,#fff 26%,transparent)}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:10px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(15px * var(--__P__-text-scale)),calc(4.2cqi * var(--__P__-text-scale)),var(--__P__-text-xl));font-weight:600;line-height:1.25;letter-spacing:-.005em;color:color-mix(in srgb,var(--__P__-on-accent) 78%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-inline-start:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-inline-start:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:start;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent-fg)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:start}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent-fg)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:start;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-hover)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent-fg);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-history>*,.__P__-home-scroll>*,.__P__-module-scroll>*,.__P__-help-list>*,.__P__-history-footer>*,.__P__-module-pad{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-header,.__P__-back-header{padding-inline:max(12px,calc((100% - var(--__P__-conversation-max, 768px)) / 2))}.__P__-tabbar{padding-inline:max(0px,calc((100% - var(--__P__-conversation-max, 768px)) / 2))}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:start;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;inset-inline-end:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-field{display:flex;flex-direction:column;gap:6px}.__P__-field-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--__P__-space-2)}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-type{flex-shrink:0;align-self:center;margin-inline-start:auto;border:1px solid var(--__P__-border);border-radius:5px;background:color-mix(in oklab,var(--__P__-fg-muted) 9%,transparent);padding:1px 7px;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);white-space:nowrap}.__P__-field-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-input[type=date],.__P__-field-input[type=time]{appearance:none;-webkit-appearance:none}@media(pointer:coarse){.__P__-field-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:10px;padding-top:2px}.__P__-choice{display:flex;align-items:flex-start;gap:10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}.__P__-form-hint{flex:1 1 auto;min-width:6rem;margin-inline-end:auto;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-form-submit{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled){background:var(--__P__-bg-elevated)}@media(max-width:640px){.__P__-form-hint{flex-basis:100%;margin-inline-end:0;font-size:var(--__P__-text-xs)}.__P__-form-submit,.__P__-form-skip{flex:1 1 0;text-align:center}}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done[data-outcome=skipped] svg{color:var(--__P__-fg-muted)}.__P__-form-done-fill{border:0;background:none;padding:0 2px;cursor:pointer;font:inherit;font-weight:600;color:var(--__P__-accent-fg)}.__P__-form-done-fill:hover{text-decoration:underline}details.__P__-form-done{display:block;padding:0;border-radius:var(--__P__-radius-md)}details[open].__P__-form-done{width:min(100%,420px);background:var(--__P__-surface)}.__P__-form-done-summary{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;cursor:pointer;list-style:none}.__P__-form-done-summary::-webkit-details-marker{display:none}.__P__-form-done-summary>svg:last-child{color:var(--__P__-fg-muted);transition:transform .15s var(--__P__-ease)}details[open]>.__P__-form-done-summary>svg:last-child{transform:rotate(90deg)}.__P__-form-answers{margin:0;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);display:grid;gap:var(--__P__-space-3);text-align:start}.__P__-form-answer{display:grid;gap:6px}.__P__-form-answer dt{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-form-answer dd{margin:0;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);font-size:var(--__P__-text-sm);font-weight:400;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui{margin-block:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);background:var(--__P__-bg-elevated);font-size:var(--__P__-text-sm)}.__P__-toolui:not(.__P__-toolui-collapsible){display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4)}.__P__-toolui-group{display:flex;flex-direction:column;gap:var(--__P__-space-3);margin-block:var(--__P__-space-3)}.__P__-toolui-group>.__P__-toolui{margin-block:0}.__P__-toolui-stale{opacity:.7}details.__P__-toolui-collapsible>summary{display:flex;align-items:center;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4);cursor:pointer;list-style:none;-webkit-tap-highlight-color:transparent;user-select:none}details.__P__-toolui-collapsible>summary::-webkit-details-marker{display:none}details.__P__-toolui-collapsible[open]>summary{border-bottom:1px solid var(--__P__-border)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-4)}details.__P__-toolui-collapsible>.__P__-toolui-section~.__P__-toolui-section{margin-top:calc(-1 * var(--__P__-space-2))}.__P__-toolui-name-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-toolui-chevron{display:inline-flex;color:var(--__P__-fg-muted);transition:transform var(--__P__-dur-quick) var(--__P__-ease-out)}details.__P__-toolui-collapsible>summary .__P__-toolui-status{margin-inline-start:auto}.__P__-toolui-chevron svg{width:16px;height:16px}details.__P__-toolui-collapsible[open]>summary .__P__-toolui-chevron{transform:rotate(180deg)}.__P__-toolui-badge,.__P__-toolui-name-pill,.__P__-toolui-q-pill{--__P__-pill: var(--__P__-fg-muted);display:inline-flex;min-width:0;align-items:center;gap:5px;padding:3px 7px;border-radius:5px;border:1px solid var(--__P__-border);background:color-mix(in oklab,var(--__P__-fg-muted) 9%,transparent);color:var(--__P__-pill);font-size:var(--__P__-text-xs);font-weight:600;white-space:nowrap}.__P__-toolui-badge svg,.__P__-toolui-name-pill svg,.__P__-toolui-q-pill svg{flex-shrink:0;width:14px;height:14px}.__P__-toolui-status-icon{display:inline-flex}.__P__-toolui-name-pill{--__P__-pill: oklch(.68 .13 233)}.__P__-toolui-q-pill{--__P__-pill: oklch(.66 .12 195)}.__P__-toolui-status[data-status=completed]{--__P__-pill: var(--__P__-success, #16a34a)}.__P__-toolui-status[data-status=responded]{--__P__-pill: oklch(.62 .15 255)}.__P__-toolui-status[data-status=awaiting]{--__P__-pill: var(--__P__-warning, #f59e0b)}.__P__-toolui-status[data-status=denied]{--__P__-pill: oklch(.66 .16 45)}.__P__-toolui-status[data-status=error]{--__P__-pill: var(--__P__-danger, #dc2626)}.__P__-toolui-status[data-status=superseded]{--__P__-pill: var(--__P__-fg-muted)}@supports (color: oklch(from red l c h)){.__P__-toolui-badge,.__P__-toolui-name-pill,.__P__-toolui-q-pill{color:oklch(from var(--__P__-pill) clamp(var(--__P__-pill-l-min),l,var(--__P__-pill-l-max)) c h)}}.__P__-toolui-head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--__P__-space-2)}.__P__-toolui-head-end{display:inline-flex;align-items:center;gap:var(--__P__-space-2);margin-inline-start:auto}.__P__-toolui-collapse-body{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4)}.__P__-toolui-summary{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-toolui-answer{margin:0;font-size:var(--__P__-text-sm);color:var(--__P__-fg);overflow-wrap:anywhere;white-space:pre-wrap}.__P__-toolui-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);margin-inline:calc(-1 * var(--__P__-space-4));padding:var(--__P__-space-3) var(--__P__-space-4) 0;border-top:1px solid var(--__P__-border)}.__P__-toolui-options-toggle{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;padding:0;cursor:pointer;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);transition:color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-toolui-options-toggle:hover{color:var(--__P__-fg)}.__P__-toolui-options-chevron{display:inline-flex;transition:transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-toolui-options-chevron svg{width:14px;height:14px}.__P__-toolui-options-chevron.__P__-open{transform:rotate(180deg)}.__P__-toolui-desc{margin:0;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-section{display:flex;flex-direction:column;gap:8px;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border)}.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-section,.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-desc{padding:0;background:none;border:0;border-radius:0}.__P__-toolui-label{font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--__P__-fg-muted)}.__P__-toolui-code{margin:0;max-height:240px;overflow:auto;color:var(--__P__-fg);font-family:var(--__P__-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--__P__-text-xs);line-height:1.5;white-space:pre-wrap;word-break:break-word}.__P__-toolui-code[data-error=true]{color:var(--__P__-danger, #dc2626)}.__P__-toolui-body{gap:6px}.__P__-toolui-prompt{margin:0;font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-subtle{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}:host([dir="rtl"]) .__P__-icon-dir{transform:scaleX(-1)}:host([dir="rtl"]) .__P__-field-input[type=date],:host([dir="rtl"]) .__P__-field-input[type=time]{position:relative;text-align:right;padding-left:34px}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-datetime-edit,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-datetime-edit{text-align:right}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-calendar-picker-indicator,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-calendar-picker-indicator{position:absolute;left:var(--__P__-space-3);margin:0}
|
|
4
4
|
`;var rs=`.__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}
|
|
@@ -38,5 +38,5 @@ ${a}`:a;continue}o.startsWith("id:")&&(n=o.slice(3).trim())}if(t==="[DONE]")retu
|
|
|
38
38
|
`){ne(e),re(e,i),e.pending=n;continue}}break}case"~":if(e.token!==19&&e.token!==16){if(e.pending==="~"){if(n==="~"){e.pending=o;continue}}else if(n!==" "&&n!==`
|
|
39
39
|
`){ne(e),re(e,16),e.pending=n;continue}}break;case"$":if(e.token!==19&&e.token!==16&&e.pending==="$")if(n==="$"){e.token=105,e.pending=o;continue}else{if(xp(n.charCodeAt(0)))break;ne(e),re(e,31),e.pending=n;continue}break;case"[":if(e.token!==19&&e.token!==17&&e.token!==30&&e.token!==31&&n!=="]"){ne(e),re(e,17),e.pending=n;continue}break;case"!":if(e.token!==19&&n==="["){ne(e),re(e,19),e.pending="";continue}break;case" ":if(e.pending.length===1&&n===" ")continue;break}if(e.token!==19&&e.token!==17&&e.token!==30&&e.token!==31&&n==="h"&&(e.pending===" "||e.pending==="")){e.text+=e.pending,e.pending=n,e.token=102;continue}e.text+=e.pending,e.pending=n}ne(e)}function ya(e){return{add_token:Pp,end_token:Sp,add_text:kp,set_attr:wp,data:{nodes:[e,,,,,],index:0}}}function Pp(e,t){let n=e.nodes[e.index],o;switch(t){case 1:return;case 20:o=document.createElement("blockquote");break;case 2:o=document.createElement("p");break;case 21:o=document.createElement("br");break;case 22:o=document.createElement("hr");break;case 3:o=document.createElement("h1");break;case 4:o=document.createElement("h2");break;case 5:o=document.createElement("h3");break;case 6:o=document.createElement("h4");break;case 7:o=document.createElement("h5");break;case 8:o=document.createElement("h6");break;case 12:case 13:o=document.createElement("em");break;case 14:case 15:o=document.createElement("strong");break;case 16:o=document.createElement("s");break;case 11:o=document.createElement("code");break;case 18:case 17:o=document.createElement("a");break;case 19:o=document.createElement("img");break;case 23:o=document.createElement("ul");break;case 24:o=document.createElement("ol");break;case 25:o=document.createElement("li");break;case 26:let a=o=document.createElement("input");a.type="checkbox",a.disabled=!0;break;case 9:case 10:n=n.appendChild(document.createElement("pre")),o=document.createElement("code");break;case 27:o=document.createElement("table");break;case 28:switch(n.children.length){case 0:n=n.appendChild(document.createElement("thead"));break;case 1:n=n.appendChild(document.createElement("tbody"));break;default:n=n.children[1]}o=document.createElement("tr");break;case 29:o=document.createElement(n.parentElement?.tagName==="THEAD"?"th":"td");break;case 30:o=document.createElement("equation-block");break;case 31:o=document.createElement("equation-inline");break}e.nodes[++e.index]=n.appendChild(o)}function Sp(e){e.index-=1}function kp(e,t){e.nodes[e.index].appendChild(document.createTextNode(t))}function wp(e,t,n){e.nodes[e.index].setAttribute(gp(t),n)}function Vo({textSig:e,doneSig:t}){let n=D(null);return xt(()=>{let o=n.current;if(!o)return;o.classList.add(`${x.cssPrefix}-md`);let a=ya(o),i=ba(a),l=0,s=rt(()=>{let p=e.value,h=t.value;p.length<l&&(o.replaceChildren(),a=ya(o),i=ba(a),l=0);let d=p.slice(l);d&&Te(i,d),l=p.length,h&&sc(i)}),c=new MutationObserver(p=>{for(let h of p)for(let d of h.addedNodes){if(!(d instanceof HTMLElement))continue;let f=d.matches?.("a")?[d]:[...d.querySelectorAll?.("a")??[]];for(let m of f)lc(m)}});c.observe(o,{childList:!0,subtree:!0});for(let p of o.querySelectorAll("a"))lc(p);let _=p=>{let h=p.target?.closest?.("a");if(!h||!(h instanceof HTMLAnchorElement))return;let d=h.getAttribute("href")??"";!d||d.startsWith("#")||(p.preventDefault(),window.open(d,"_blank","noopener,noreferrer"))};return o.addEventListener("click",_),()=>{s(),c.disconnect(),o.removeEventListener("click",_)}},[e,t]),r("div",{ref:n})}function cc({text:e}){let t=Le(()=>B(e),[e]),n=Le(()=>B(!0),[]);return r(Vo,{textSig:t,doneSig:n})}function lc(e){let t=e.getAttribute("href")??"";if(!t||t.startsWith("#"))return;e.target!=="_blank"&&(e.target="_blank");let n=new Set((e.rel||"").split(/\s+/).filter(Boolean));n.add("noopener"),n.add("noreferrer"),e.rel=[...n].join(" ")}var Go=x.cssPrefix;function dc({messageId:e,initial:t,strings:n,onFeedback:o}){let[a,i]=A(t),l=s=>{let c=a===s?null:s;i(c),o(e,c)};return r("div",{class:`${Go}-feedback`,role:"group","data-testid":k.messageFeedback,children:[r("button",{type:"button",class:`${Go}-msg-action`,"data-active":a==="up"?"true":void 0,"aria-pressed":a==="up","aria-label":n.feedbackUp,title:n.feedbackUp,onClick:()=>l("up"),"data-testid":k.feedbackUp,children:r(Ol,{})}),r("button",{type:"button",class:`${Go}-msg-action`,"data-active":a==="down"?"true":void 0,"aria-pressed":a==="down","aria-label":n.feedbackDown,title:n.feedbackDown,onClick:()=>l("down"),"data-testid":k.feedbackDown,children:r($l,{})}),r("span",{class:`${Go}-sr-only`,role:"status","aria-live":"polite",children:a?n.feedbackThanks:""})]})}var Yt=x.cssPrefix;function _c({part:e,strings:t}){let n=e.title||e.filename||e.url||t.sources;return e.url?r("a",{class:`${Yt}-source`,href:e.url,target:"_blank",rel:"noreferrer noopener","data-testid":k.source,children:[r("span",{class:`${Yt}-source-icon`,"aria-hidden":"true",children:"\u{1F517}"}),r("span",{class:`${Yt}-source-label`,children:n})]}):r("span",{class:`${Yt}-source`,"data-testid":k.source,children:[r("span",{class:`${Yt}-source-icon`,"aria-hidden":"true",children:"\u{1F4C4}"}),r("span",{class:`${Yt}-source-label`,children:n})]})}var Ge=x.cssPrefix;function Pa(e){return e.startsWith("tool:")||e.startsWith("tool-")?e.slice(5):e}function Ko(e,t){let n=e==="output-available"||e==="output-error"||e==="output-denied",o=e==="approval-responded"||t?.approved!==void 0;return{terminal:n,responded:o,decided:n||o}}function Sa({status:e,icon:t,label:n}){return r("span",{class:`${Ge}-toolui-badge ${Ge}-toolui-status`,"data-status":e,children:[r("span",{class:`${Ge}-toolui-status-icon`,children:t}),n]})}function Tp(e,t){return e==="output-error"?"error":e==="output-denied"||t?.approved===!1?"denied":e==="output-available"?"completed":e==="approval-responded"||t?.approved===!0?"responded":e==="approval-requested"?"awaiting":"running"}function Ep({status:e}){return e==="denied"||e==="error"||e==="superseded"?r(No,{}):e==="completed"||e==="responded"?r(Mo,{}):r(Hl,{})}function Rp(e,t){switch(e){case"awaiting":return t.statusAwaiting;case"responded":return t.statusResponded;case"completed":return t.statusCompleted;case"denied":return t.statusDenied;case"error":return t.statusError;case"superseded":return t.statusSuperseded;default:return t.statusRunning}}function Ap({state:e,approval:t,strings:n,superseded:o}){let a=Tp(e,t),i=o&&(a==="awaiting"||a==="running")?"superseded":a;return r(Sa,{status:i,icon:r(Ep,{status:i}),label:Rp(i,n)})}function Ip({name:e,state:t,approval:n,strings:o,superseded:a}){return r(ie,{children:[r("span",{class:`${Ge}-toolui-name-pill`,children:[r(Fl,{}),r("span",{class:`${Ge}-toolui-name-text`,children:e})]}),r(Ap,{state:t,approval:n,strings:o,superseded:a}),r("span",{class:`${Ge}-toolui-chevron`,children:r(Ct,{})})]})}function jo({part:e,strings:t,testid:n,superseded:o}){let a=X(()=>e.inputSig.value),i=X(()=>e.outputSig.value),l=X(()=>e.errorSig.value),s=X(()=>e.stateSig.value),c=X(()=>e.approvalSig.value);return r("details",{class:`${Ge}-toolui ${Ge}-toolui-collapsible`,"data-testid":n,children:[r("summary",{class:`${Ge}-toolui-head`,children:r(Ip,{name:Pa(e.toolName),state:s.value,approval:c.value,strings:t,superseded:o})}),r(xa,{label:t.toolParameters,value:a.value}),i.value!==void 0?r(xa,{label:t.toolResult,value:i.value}):null,l.value?r(xa,{label:t.statusError,value:l.value,error:!0}):null]})}function xa({label:e,value:t,error:n}){let o=n?String(t??""):Xo(ka(t));return o?r("div",{class:`${Ge}-toolui-section`,children:[r("span",{class:`${Ge}-toolui-label`,children:e}),r("pre",{class:`${Ge}-toolui-code`,"data-error":n?"true":void 0,children:o})]}):null}function ka(e){if(e&&typeof e=="object"){let t=e;if(t.storage==="tool-result-ref"&&"summary"in t)return t.summary}return e}function Xo(e){if(e==null)return"";try{let t=typeof e=="string"?e:JSON.stringify(e,null,2);return!t||t==="{}"||t==="[]"||t==='""'?"":t.length>800?`${t.slice(0,800)}\u2026`:t}catch{return""}}var Be=x.cssPrefix;function uc({part:e,strings:t,active:n,superseded:o=!1,onDecision:a,onEdit:i}){let l=X(()=>e.approvalSig.value),s=X(()=>e.stateSig.value),c=Pa(e.toolName),_=l.value?.approved,{terminal:p,responded:h,decided:d}=Ko(s.value,l.value),f=h&&n&&!p,m=o&&!d,y=e.toolCallId;return r("div",{class:`${Be}-toolui-group`,"data-testid":d?k.toolDecision:k.toolApproval,children:[r(jo,{part:e,strings:t,superseded:m}),m||p?null:r("div",{class:`${Be}-toolui ${Be}-toolui-body`,children:[h?r(ie,{children:[r("p",{class:`${Be}-toolui-prompt`,children:[t.approvalYourResponse.replace("{decision}",_?t.approve:t.reject),l.value?.reason?` \u2014 ${l.value.reason}`:""]}),f?r("p",{class:`${Be}-toolui-subtle`,children:t.approvalEditHint}):null,!f&&!p?r("p",{class:`${Be}-toolui-subtle`,children:t.approvalSubmitting}):null]}):r(ie,{children:[r("p",{class:`${Be}-toolui-prompt`,children:t.approvalPrompt.replace("{tool}",c)}),r("p",{class:`${Be}-toolui-subtle`,children:t.approvalBody})]}),!d&&!o?r("div",{class:`${Be}-toolui-actions`,children:[r("button",{type:"button",class:`${Be}-form-skip`,onClick:()=>a(y,!1),"data-testid":k.toolReject,children:t.reject}),r("button",{type:"button",class:`${Be}-form-submit`,onClick:()=>a(y,!0),"data-testid":k.toolApprove,children:t.approve})]}):null,f?r("div",{class:`${Be}-toolui-actions`,children:r("button",{type:"button",class:`${Be}-form-skip`,onClick:()=>i(y),"data-testid":k.toolEdit,children:t.edit})}):null]})]})}var Lp=new Set(["text","email","phone","number","date","single-select","multi-select","boolean"]);function pc(e){let t=e&&typeof e=="object"?e:{},o=(Array.isArray(t.questions)?t.questions:[]).map(Mp).filter(a=>a!==null);return{intro:Yo(t.intro),questions:o}}function Mp(e,t){if(!e||typeof e!="object")return null;let n=e,o=Lp.has(n.type)?n.type:"text";return{key:Yo(n.key)??`q${t+1}`,question:Yo(n.question)??"Please provide the missing information.",type:o,options:Array.isArray(n.options)?n.options.filter(a=>typeof a=="string"&&a.trim().length>0):void 0,required:typeof n.required=="boolean"?n.required:void 0,helpText:Yo(n.helpText)}}function Np(e){switch(e){case"text":return"textarea";case"phone":return"tel";case"single-select":case"boolean":return"radio";case"multi-select":return"multiselect";default:return e}}function wa(e,t,n){return e.questions.map(o=>{let a=Np(o.type),i=o.type==="boolean"?[{value:"yes",label:t},{value:"no",label:n}]:(o.options??[]).map(l=>({value:l,label:l}));return{name:o.key,label:o.question,type:a,required:o.required??!1,options:i.length>0?i:void 0,validationHint:o.helpText}})}function Yo(e){return typeof e=="string"&&e.trim()?e.trim():void 0}var ve=x.cssPrefix,Dp={text:"qtypeText",email:"qtypeEmail",phone:"qtypePhone",number:"qtypeNumber",date:"qtypeDate","single-select":"qtypeChooseOne","multi-select":"qtypeChooseAny",boolean:"qtypeBoolean"};function mc(e,t){let n={};for(let o of e)n[o.key]=t[Dp[o.type]];return n}function fc({part:e,strings:t,active:n,superseded:o=!1,onDecision:a,onEdit:i}){let l=X(()=>e.stateSig.value).value,s=X(()=>e.approvalSig.value).value,c=X(()=>pc(e.inputSig.value)).value,{terminal:_,decided:p}=Ko(l,s),h=p&&s?.approved===!0,d=!p&&!o,f=!d&&!h,m=h&&n&&!_,y=c.questions,[v,P]=A(null),b=v??(d||h),[E,z]=A(!1),te=y.length>1?ia:wn,ee=d?t.inputRequired:t.inputBadge,J=d?r(Op,{req:c,strings:t,resolve:(oe,T)=>a(e.toolCallId,T,oe)}):E?r(Rn,{fields:wa(c,t.confirmYes,t.confirmNo),strings:t,submitLabel:t.inputSubmit,onSubmit:()=>{},disabled:!0,hideActions:!0,fieldTypeLabels:mc(y,t),initialValues:h?zp(y,s?.reason):void 0}):r($p,{questions:y,answers:h?Bp(s?.reason):{},strings:t});return r("details",{class:`${ve}-toolui ${ve}-toolui-collapsible${o?` ${ve}-toolui-stale`:""}`,open:b,onToggle:oe=>{let T=oe.currentTarget.open;T!==b&&P(T)},"data-testid":d?k.toolAskQuestions:k.toolDecision,children:[r("summary",{class:`${ve}-toolui-head`,children:[r("span",{class:`${ve}-toolui-q-pill`,children:[r(te,{}),ee]}),r("span",{class:`${ve}-toolui-head-end`,children:[d?null:r(Sa,{status:f?"superseded":"completed",icon:f?r(No,{}):r(Mo,{}),label:f?t.inputSkipped:t.inputAnswered}),r("span",{class:`${ve}-toolui-chevron`,children:r(Ct,{})})]})]}),r("div",{class:`${ve}-toolui-collapse-body`,children:[c.intro?r("div",{class:`${ve}-toolui-desc`,children:c.intro}):null,J,d?null:r("div",{class:`${ve}-toolui-footer`,children:[r("button",{type:"button",class:`${ve}-toolui-options-toggle`,onClick:()=>z(oe=>!oe),"data-testid":k.toolAskOptions,children:[r("span",{class:`${ve}-toolui-options-chevron${E?` ${ve}-open`:""}`,children:r(Ct,{})}),E?t.hideOptions:t.showOptions]}),m?r("button",{type:"button",class:`${ve}-form-skip`,onClick:()=>i(e.toolCallId),"data-testid":k.toolEdit,children:t.edit}):null]})]})]})}function Op({req:e,strings:t,resolve:n}){let o=wa(e,t.confirmYes,t.confirmNo),a=e.questions.length===1&&e.questions[0]?.type==="text";return r(Rn,{fields:o,strings:t,submitLabel:t.inputSubmit,footerHint:a?t.inputSubmitHint:void 0,onSubmit:i=>n(Hp(e.questions,i),!0),skipLabel:t.inputSkip,onSkip:()=>n(void 0,!1),submitOnEnter:a,fieldTypeLabels:mc(e.questions,t),submitTestId:k.toolInputSubmit,skipTestId:k.toolInputSkip})}function $p({questions:e,answers:t,strings:n}){return r("div",{class:`${ve}-toolui-summary`,"data-testid":k.toolAskSummary,children:e.map(o=>r("div",{class:`${ve}-field`,children:[r("span",{class:`${ve}-field-head`,children:r("span",{class:`${ve}-field-label`,children:[o.question,o.required?r("span",{class:`${ve}-field-req`,"aria-hidden":"true",children:" *"}):null]})}),r("p",{class:`${ve}-toolui-answer`,children:Fp(o,t[o.key],n)||"\u2014"})]},o.key))})}function Fp(e,t,n){return e.type!=="boolean"?t??"":t==="yes"?n.confirmYes:t==="no"?n.confirmNo:t??""}function Hp(e,t){let n=e.flatMap(o=>{let a=t[o.key];if(a==null||a.trim()==="")return[];let i=o.type==="multi-select"?a.split(",").map(l=>l.trim()).filter(Boolean):a;return[{key:o.key,value:i}]});return JSON.stringify({answers:n})}function gc(e){if(!e)return{};let n=(()=>{try{return JSON.parse(e)}catch{return}})()?.answers;if(!Array.isArray(n))return{};let o={};for(let a of n)if(a&&typeof a=="object"&&"key"in a){let{key:i,value:l}=a;if(typeof i!="string")continue;typeof l=="string"?o[i]=l:Array.isArray(l)&&(o[i]=l.filter(s=>typeof s=="string"))}return o}function Bp(e){let t=gc(e),n={};for(let[o,a]of Object.entries(t))n[o]=Array.isArray(a)?a.join(", "):a;return n}function zp(e,t){let n=gc(t),o={};for(let a of e){let i=n[a.key];i!==void 0&&(a.type==="multi-select"?o[a.key]=Array.isArray(i)?i:[i]:o[a.key]=Array.isArray(i)?i[0]??"":i)}return o}function hc({part:e,strings:t}){let n=X(()=>e.inputSig.value),o=X(()=>e.outputSig.value),a=X(()=>e.errorSig.value);return X(()=>!!Xo(n.value)||!!a.value||!!Xo(ka(o.value))).value?r(jo,{part:e,strings:t,testid:k.toolCall}):null}var Ae=x.cssPrefix;function vc({message:e,strings:t,responseMode:n,showReasoning:o,showToolCalls:a,showSources:i,interactive:l=!1,superseded:s=!1,tool:c,onRetry:_,enableMessageFeedback:p=!1,onFeedback:h}){let f=X(()=>e.partsSig.value).value,m=X(()=>at(e)),y=X(()=>el(e)),v=X(()=>e.partsSig.value.some(V=>V.kind==="text"&&V.textSig.value.length>0)),P=X(()=>o&&e.partsSig.value.some(V=>V.kind==="reasoning")),C=X(()=>{let V=e.partsSig.value,w=-1;for(let $=0;$<V.length;$++){let Q=V[$]?.kind;(Q==="text"||Q==="file"||Q==="source")&&(w=$)}return w}),b=e.role==="assistant"&&e.status==="streaming",E=n==="buffered"&&b,z=b&&!v.value,te=b&&!E&&!(P.value&&z);if(y.value)return null;let ee=qp(e.createdAt),J=p&&!!h&&!!e.serverMessageId&&e.role==="assistant"&&!b&&e.status!=="error"&&!m.value,oe=f.filter(V=>V.kind==="text").map(V=>V.textSig.value).join(`
|
|
40
40
|
|
|
41
|
-
`).trim(),T=!b&&e.status!=="error"&&!m.value&&oe.length>0,N=J||T;return r("div",{class:`${Ae}-bubble-row`,"data-role":e.role,"data-mid":e.serverMessageId??e.id,"data-testid":Pe(k.messageBubble,e.id),children:r("div",{class:`${Ae}-bubble-col`,children:[r("div",{class:`${Ae}-bubble`,children:[E?r(Xp,{label:t.loading}):f.map((V,w)=>r(Wp,{part:V,active:z,strings:t,showReasoning:o,showToolCalls:a,showSources:i,interactive:l&&(V.kind!=="tool"||w>C.value),superseded:s,tool:c},Kp(V))),te&&r(jp,{}),e.status==="error"&&e.errorText||m.value?r("div",{class:`${Ae}-error`,role:"alert",children:[r("span",{children:e.errorText??t.errorGeneric}),_?r("button",{type:"button",class:`${Ae}-error-retry`,onClick:_,"data-testid":k.messageRetry,children:t.errorRetry}):null]}):null]}),ee||N?r("div",{class:`${Ae}-bubble-meta`,children:[ee?r("time",{class:`${Ae}-bubble-time`,dateTime:ee.iso,title:ee.full,children:ee.short}):null,N?r("div",{class:`${Ae}-bubble-actions`,children:[J&&e.serverMessageId?r(dc,{messageId:e.serverMessageId,initial:e.feedback??null,strings:t,onFeedback:h}):null,T?r(Up,{text:oe,strings:t}):null]}):null]}):null]})})}function Up({text:e,strings:t}){let[n,o]=A(!1),a=()=>{navigator.clipboard?.writeText(e).then(()=>{o(!0),setTimeout(()=>o(!1),1500)}).catch(()=>{})},i=n?t.copied:t.copy;return r("button",{type:"button",class:`${Ae}-msg-action`,"data-active":n?"true":void 0,"aria-label":i,title:i,onClick:a,"data-testid":k.messageCopy,children:n?r(wt,{}):r(Dl,{})})}function qp(e){if(typeof e!="number"||!Number.isFinite(e))return null;try{let t=new Date(e);return{short:t.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),full:t.toLocaleString(void 0,{dateStyle:"full",timeStyle:"short"}),iso:t.toISOString()}}catch{return null}}function Wp({part:e,active:t,strings:n,showReasoning:o,showToolCalls:a,showSources:i,interactive:l,superseded:s,tool:c}){switch(e.kind){case"step-start":return null;case"text":return r(Vo,{textSig:e.textSig,doneSig:e.doneSig});case"reasoning":return o?r(Gp,{part:e,active:t,strings:n}):null;case"tool":return r(Vp,{part:e,strings:n,showToolCalls:a,interactive:l,superseded:s,tool:c});case"file":return e.mediaType.startsWith("image/")?r("img",{src:e.url,alt:"",loading:"lazy"}):r("a",{href:e.url,target:"_blank",rel:"noreferrer noopener",children:e.url});case"source":return i?r(_c,{part:e,strings:n}):null}}function Vp({part:e,strings:t,showToolCalls:n,interactive:o,superseded:a,tool:i}){let l=X(()=>e.approvalSig.value!==void 0);if(i?.humanInLoop){if(tc(e.toolName))return r(fc,{part:e,strings:t,active:o,superseded:a,onDecision:i.onDecision,onEdit:i.onEdit});if(l.value)return r(uc,{part:e,strings:t,active:o,superseded:a,onDecision:i.onDecision,onEdit:i.onEdit})}return n?r(hc,{part:e,strings:t}):null}function Gp({part:e,active:t,strings:n}){return r("details",{class:`${Ae}-reasoning`,open:t,"data-active":t?"true":void 0,children:[r("summary",{class:`${Ae}-reasoning-summary`,children:r("span",{class:`${Ae}-reasoning-label`,children:t?n.thinking:n.thoughts})}),r("div",{class:`${Ae}-reasoning-body`,children:r(Vo,{textSig:e.textSig,doneSig:e.doneSig})})]})}function Kp(e){switch(e.kind){case"text":case"reasoning":case"step-start":return`${e.kind}:${e.id}`;case"tool":return`tool:${e.toolCallId}`;case"file":return`file:${e.url}`;case"source":return`source:${e.sourceId}`}}function jp(){return r("span",{class:`${Ae}-typing`,"aria-hidden":"true",children:[r("span",{}),r("span",{}),r("span",{})]})}function Xp({label:e}){return r("span",{class:`${Ae}-loading`,role:"status",children:[r("span",{class:`${Ae}-loading-spinner`,"aria-hidden":"true"}),r("span",{class:`${Ae}-loading-label`,children:e})]})}var At=x.cssPrefix,Ca=120,Yp=350;function bc({messagesSig:e,strings:t,responseMode:n,showReasoning:o,showToolCalls:a,showSources:i,enableMessageFeedback:l,onFeedback:s,loading:c,idle:_,tool:p,onRetry:h,form:d,formMarkers:f,onFillForm:m}){let y=D(null),v=X(()=>e.value),[P,C]=A(!1),b=D(!1),E=D(!1),z=D(!1),te=D(0),ee=()=>z.current||performance.now()-te.current<Yp,J=D(0),oe=S=>{let U=S.scrollHeight-S.clientHeight>1;S.dataset.fadeTop=U&&S.scrollTop>1?"true":"false",S.dataset.fadeBottom=U&&S.scrollHeight-S.scrollTop-S.clientHeight>1?"true":"false"},T=S=>C(S.scrollHeight-S.scrollTop-S.clientHeight>Ca*2),N=S=>{J.current=performance.now(),S.scrollTop=S.scrollHeight,oe(S)},V=(S,U)=>{N(S);let be=U,Ee=0,we=()=>{N(S),--be>0&&(Ee=requestAnimationFrame(we))};return U>0&&(Ee=requestAnimationFrame(we)),()=>cancelAnimationFrame(Ee)},w=(S,U)=>{let be,Ee,we,Xe=-1,he=()=>{be.disconnect(),Ee.disconnect(),clearTimeout(we)},ye=()=>{if(E.current||ee()||Xe>=0&&S.scrollTop<Xe-4)return he();N(S),Xe=S.scrollTop};return be=new ResizeObserver(ye),Ee=new MutationObserver(ye),ye(),be.observe(S),Ee.observe(S,{childList:!0,subtree:!0,characterData:!0}),we=setTimeout(he,U),he},$=v.value[0]?.id;xt(()=>{let S=y.current;if(S&&v.value.length!==0&&(b.current=!0,!!v.value.some(U=>U.role==="user")))return w(S,300)},[$]);let Q=D(0);R(()=>{let S=y.current,U=v.value,be=Q.current;if(Q.current=U.length,!S||!b.current)return;if(U.slice(be).some(we=>we.role==="user"))return E.current=!1,V(S,3);if(!U.some(we=>we.role==="user")||E.current||ee())return;S.scrollHeight-S.scrollTop-S.clientHeight<Ca&&N(S)},[v.value.length]);let Se=D(null);R(()=>{let S=y.current,U=v.value.at(-1),be=Se.current;if(Se.current=U?.id??null,!!S&&b.current&&!(!U||U.id!==be||U.status!=="streaming"))return E.current=!1,V(S,3)},[v.value]),R(()=>{let S=y.current;if(!S)return;let U=v.value.at(-1);if(!U||U.status!=="streaming"&&!v.value.some(we=>we.role==="user"))return;let be=()=>{if(E.current||ee())return;S.scrollHeight-S.scrollTop-S.clientHeight<Ca*2&&N(S)};if(U.status!=="streaming")return w(S,300);be();let Ee=new MutationObserver(be);return Ee.observe(S,{childList:!0,subtree:!0,characterData:!0}),()=>Ee.disconnect()},[v.value]);let ze=d?.form.id,_e=!!d&&(f??[]).some(S=>S.formId===d.form.id);xt(()=>{let S=y.current;!S||!ze||E.current||v.value.some(U=>U.role==="user")&&(_e?S.querySelector(`[data-testid="${k.formGate}"]`)?.scrollIntoView({block:"nearest"}):N(S))},[ze,_e]),R(()=>{let S=y.current;if(!S)return;let U=()=>{T(S),oe(S),performance.now()-J.current>150&&(E.current=S.scrollHeight-S.scrollTop-S.clientHeight>8)},be=()=>{E.current=!0},Ee=gt=>{gt.deltaY<0&&be()},we=0,Xe=gt=>{we=gt.touches[0]?.clientY??0,z.current=!0},he=gt=>{(gt.touches[0]?.clientY??0)>we+4&&be()},ye=()=>{z.current=!1,te.current=performance.now()},Qt=()=>{z.current=!0};return S.addEventListener("scroll",U,{passive:!0}),S.addEventListener("wheel",Ee,{passive:!0}),S.addEventListener("touchstart",Xe,{passive:!0}),S.addEventListener("touchmove",he,{passive:!0}),S.addEventListener("touchend",ye,{passive:!0}),S.addEventListener("touchcancel",ye,{passive:!0}),S.addEventListener("pointerdown",Qt,{passive:!0}),window.addEventListener("pointerup",ye,{passive:!0}),window.addEventListener("pointercancel",ye,{passive:!0}),T(S),()=>{S.removeEventListener("scroll",U),S.removeEventListener("wheel",Ee),S.removeEventListener("touchstart",Xe),S.removeEventListener("touchmove",he),S.removeEventListener("touchend",ye),S.removeEventListener("touchcancel",ye),S.removeEventListener("pointerdown",Qt),window.removeEventListener("pointerup",ye),window.removeEventListener("pointercancel",ye)}},[]);let Ue=()=>{let S=y.current;S&&(E.current=!1,N(S))},ae=[],ke="",qe=v.value.at(-1)?.id,je=[...f??[]].toSorted((S,U)=>(S.createdAt??1/0)-(U.createdAt??1/0)),Lt=S=>d&&S.formId===d.form.id?r(ma,{form:d.form,strings:t,onSubmit:d.onSubmit,onSkip:d.onSkip},`gate:${S.formId}`):r(ec,{marker:S,strings:t,onFill:!d&&m?()=>m(S.formId):void 0},S.key),Nn=S=>{for(let U=je[0];U?.createdAt!==void 0&&!(S!==void 0&&U.createdAt>S);U=je[0])je.shift(),ae.push(Lt(U))};for(let S of v.value){if(S.role==="assistant"&&S.id!==qe&&at(S))continue;Nn(S.createdAt);let U=Jp(S.createdAt);U&&U!==ke&&(ae.push(r("div",{class:`${At}-date-divider`,children:r("span",{class:`${At}-date-pill`,title:Qp(S.createdAt),children:Zp(S.createdAt,t)})},`day:${U}`)),ke=U),ae.push(r(vc,{message:S,strings:t,responseMode:n,showReasoning:o,showToolCalls:a,showSources:i,interactive:!!_&&S.id===qe,superseded:S.id!==qe,tool:p,onRetry:_&&S.id===qe?h:void 0,enableMessageFeedback:l,onFeedback:s},S.id))}for(let S of je)ae.push(Lt(S));return r("div",{class:`${At}-list-wrap`,children:[r("div",{ref:y,class:`${At}-list ${At}-list--fade`,role:"log","aria-live":"polite","aria-relevant":"additions text",children:[c&&v.value.length===0?r("div",{class:`${At}-list-loading`,role:"status",children:t.conversationLoading}):null,ae,d&&!_e?r(ma,{form:d.form,strings:t,onSubmit:d.onSubmit,onSkip:d.onSkip}):null]}),P?r("button",{type:"button",class:`${At}-jump`,onClick:Ue,"aria-label":t.scrollToBottom,title:t.scrollToBottom,"data-testid":k.scrollToBottom,children:r(Ct,{})}):null]})}function Jp(e){if(typeof e!="number"||!Number.isFinite(e))return"";let t=new Date(e);return`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`}function Qp(e){if(typeof e!="number"||!Number.isFinite(e))return"";try{return new Date(e).toLocaleDateString(void 0,{dateStyle:"full"})}catch{return""}}function Zp(e,t){let n=new Date(e),o=i=>new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime(),a=Math.round((o(new Date)-o(n))/864e5);return a<=0?t.dateToday:a===1?t.dateYesterday:a<7?n.toLocaleDateString(void 0,{weekday:"long"}):n.toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"})}var em=["today","yesterday","lastWeek","older"];function tm(e,t){let n=Date.parse(t);if(!Number.isFinite(n))return"older";let o=Math.floor((yc(e)-yc(n))/(1440*60*1e3));return o<=0?"today":o===1?"yesterday":o<7?"lastWeek":"older"}function xc(e,t){let n=new Map;for(let o of t){let a=tm(e,o.lastMessageAt),i=n.get(a);i?i.push(o):n.set(a,[o])}return em.filter(o=>n.has(o)).map(o=>({bucket:o,conversations:n.get(o)}))}function yc(e){let t=new Date(e);return t.setUTCHours(0,0,0,0),t.getTime()}var nm=W.scope("history"),om=3,rm=6,am={today:"dateToday",yesterday:"dateYesterday",lastWeek:"dateLastWeek",older:"dateOlder"};function im(e,t,n){let o=Date.parse(e);return Number.isFinite(o)?new Date(o).toDateString()===new Date(t).toDateString()?new Intl.DateTimeFormat(n,{hour:"numeric",minute:"2-digit"}).format(o):t-o<10080*60*1e3?new Intl.DateTimeFormat(n,{weekday:"short"}).format(o):new Intl.DateTimeFormat(n,{month:"short",day:"numeric"}).format(o):""}function Jo({transport:e,strings:t,locale:n,persistence:o,visitorId:a,onSelect:i,onNewConversation:l}){let s=x.cssPrefix,c=e.peekConversations({visitorId:a}),[_,p]=A(c?"loaded":"loading"),[h,d]=A(c?.conversations??[]);R(()=>{let v=!1;return e.listConversations({visitorId:a}).then(P=>{if(v)return;let C=P.conversations??[];d(C),p("loaded"),o.saveHistoryCount(C.length)}).catch(P=>{v||(nm.warn("listConversations failed",{err:P}),p("error"))}),()=>{v=!0}},[e,a,o]);let f=l?r("div",{class:`${s}-history-footer`,children:r("button",{type:"button",class:`${s}-history-new`,onClick:l,"data-testid":k.sidebarNewConversation,children:[r(ll,{}),t.newConversation]})}):null;if(_==="loading"){let v=Math.min(o.loadHistoryCount()??om,rm);return r(ie,{children:[r("div",{class:`${s}-history`,"aria-busy":"true","aria-label":t.historyLoading,children:r("div",{class:`${s}-history-group`,"aria-hidden":"true",children:[r("div",{class:`${s}-history-heading`,children:r("span",{class:`${s}-skeleton ${s}-skeleton-heading`})}),r("div",{class:`${s}-history-card`,children:Array.from({length:Math.max(1,v)},(P,C)=>r("div",{class:`${s}-history-item ${s}-history-item-skeleton`,children:[r("span",{class:`${s}-history-avatar ${s}-skeleton`}),r("span",{class:`${s}-history-body`,children:[r("span",{class:`${s}-history-row`,children:[r("span",{class:`${s}-history-title`,children:r("span",{class:`${s}-skeleton ${s}-skeleton-title`})}),r("span",{class:`${s}-history-time`,children:r("span",{class:`${s}-skeleton ${s}-skeleton-time`})})]}),r("span",{class:`${s}-history-row`,children:r("span",{class:`${s}-history-preview`,children:r("span",{class:`${s}-skeleton ${s}-skeleton-preview`})})})]})]},C))})]})}),f]})}if(_==="error"||h.length===0)return r(ie,{children:[r("div",{class:`${s}-history-empty`,children:t.historyEmpty}),f]});let m=Date.now(),y=xc(m,h);return r(ie,{children:[r("div",{class:`${s}-history`,role:"list",children:y.map(v=>r("div",{class:`${s}-history-group`,children:[r("div",{class:`${s}-history-heading`,children:t[am[v.bucket]]}),r("div",{class:`${s}-history-card`,children:v.conversations.map(P=>r("button",{type:"button",role:"listitem",class:`${s}-history-item`,onClick:()=>i(P),"data-closed":P.canContinue?void 0:"true","data-unread":P.hasUnread?"true":void 0,"data-testid":Pe(k.historyItem,P.conversationId),children:[r("span",{class:`${s}-history-avatar`,"aria-hidden":"true",children:r(sa,{})}),r("span",{class:`${s}-history-body`,children:[r("span",{class:`${s}-history-row`,children:[r("span",{class:`${s}-history-title`,children:P.title}),r("span",{class:`${s}-history-time`,children:im(P.lastMessageAt,m,n)})]}),r("span",{class:`${s}-history-row`,children:[r("span",{class:`${s}-history-preview`,children:P.preview??(P.canContinue?t.historyContinue:t.conversationClosed)}),P.hasUnread?r("span",{class:`${s}-history-dot`}):null]})]})]},P.conversationId))})]},v.bucket))}),f]})}var Pc=x.cssPrefix;function Sc({suggestions:e,onPick:t}){return e.length===0?null:r("div",{class:`${Pc}-suggestions`,role:"group","aria-label":"Suggested replies",children:e.map((n,o)=>r("button",{type:"button",class:`${Pc}-suggestion`,onClick:()=>t(n),"data-testid":Pe(k.suggestion,o),children:n.label},n.id))})}var Ne=x.cssPrefix;function kc(e){let{options:t,onClose:n}=e,o=t.strings,a=D(null);R(()=>{let c=a.current;if(!c)return;let _=Ho(c),p=h=>{h.key==="Escape"&&n?.()};return c.addEventListener("keydown",p),()=>{_(),c.removeEventListener("keydown",p)}},[n]);let i=e.composerApiRef,l=F(c=>{i.current?.attachFromDrop(c)},[i]),{visible:s}=Uo({containerRef:a,onDrop:l});return $o(a.current,t.mode==="modal"),r("div",{ref:a,class:`${Ne}-panel`,role:"dialog","aria-modal":"false","aria-label":o.panelTitle,style:{position:"relative"},"data-testid":k.panel,children:[r(Ta,{...e,containerEl:a.current,dragOver:s,composerAttachApiRef:i}),r(Ea,{poweredBy:e.options.poweredBy})]})}function Ta(e){let{options:t,transport:n,feedback:o,bus:a,persistence:i,panelSize:l,view:s,canSend:c,isStreaming:_,loadingMessages:p,messagesSig:h,agent:d,suggestions:f,initialWidgetSize:m,visitorId:y,onClose:v,onBack:P,onClear:C,onToggleHistory:b,onSelectHistoryConversation:E,onNewConversation:z,onWidgetSizeChange:te,onSend:ee,onStop:J,onSuggestion:oe,activeForm:T,formMarkers:N,onFormSubmit:V,onFormSkip:w,onFormFill:$,tool:Q,onRetry:Se,onMessageFeedback:ze,containerEl:_e,dragOver:Ue,composerAttachApiRef:ae}=e,ke=t.strings,qe;return T?qe=null:c?qe=r(ie,{children:[!_&&r(Sc,{suggestions:f,onPick:oe}),r(jl,{options:t,transport:n,feedback:o,bus:a,isStreaming:_,onSend:ee,onStop:J,attachApiRef:ae})]}):qe=r(lm,{label:ke.conversationClosed,ctaLabel:ke.startNewConversation,onNewConversation:C}),r(ie,{children:[s==="history"?r(sm,{strings:ke,onBack:b,onClose:v,showClose:Fo(t.mode,l,t.actions)}):r("header",{class:`${Ne}-header`,"data-testid":k.panelHeader,children:[P?r("button",{type:"button",class:`${Ne}-icon-btn`,onClick:P,"aria-label":ke.moduleBack,title:ke.moduleBack,children:r(kn,{})}):null,d?r(Vl,{agent:d,strings:ke}):r("h1",{children:ke.panelTitle}),r(Qe,{panelProps:e,variant:"chat"})]}),s==="history"?r(Jo,{transport:n,strings:ke,locale:t.locale,persistence:i,visitorId:y,onSelect:je=>E(je.conversationId),onNewConversation:z}):r(ie,{children:[r(Xl,{visible:Ue,strings:ke}),r(bc,{messagesSig:h,strings:ke,responseMode:t.responseMode,showReasoning:t.showReasoning,showToolCalls:t.showToolCalls,showSources:t.showSources,enableMessageFeedback:t.enableMessageFeedback,onFeedback:ze,loading:p,idle:!_,tool:Q,onRetry:Se,form:T?{form:T,onSubmit:V,onSkip:w}:null,formMarkers:N,onFillForm:$}),qe,r(cm,{disclaimer:t.composerDisclaimer})]}),t.size.resize?.enabled?r(Oo,{panelEl:_e,resize:t.size.resize,position:t.position,initialSize:m,onSizeChange:te,strings:ke}):null]})}function sm({strings:e,onBack:t,onClose:n,showClose:o}){return r("header",{class:`${Ne}-header`,children:[r("button",{type:"button",class:`${Ne}-icon-btn`,onClick:t,"aria-label":e.historyBack,title:e.historyBack,children:r(kn,{})}),r("h1",{children:e.historyTitle}),o?r("button",{type:"button",class:`${Ne}-icon-btn`,onClick:n,"aria-label":e.close,title:e.close,children:r(Je,{})}):null]})}function lm({label:e,ctaLabel:t,onNewConversation:n}){return r("div",{class:`${Ne}-readonly-banner`,role:"note",children:[r("span",{class:`${Ne}-readonly-label`,children:e}),r("button",{type:"button",class:`${Ne}-readonly-cta`,onClick:n,children:t})]})}function cm({disclaimer:e}){return e?r("div",{class:`${Ne}-composer-footer`,children:r("div",{class:`${Ne}-disclaimer`,children:e})}):null}function Ea({poweredBy:e}){return e?r("div",{class:`${Ne}-poweredby-bar`,children:r(dm,{logoUrl:e.logoUrl,text:e.text,href:e.href})}):null}function dm({logoUrl:e,text:t,href:n}){let o=r(ie,{children:[e?r("img",{class:`${Ne}-poweredby-logo`,src:e,alt:"",loading:"lazy"}):null,t?r("span",{children:t}):null]});return n?r("a",{class:`${Ne}-poweredby`,href:n,target:"_blank",rel:"noopener noreferrer",children:o}):r("span",{class:`${Ne}-poweredby`,children:o})}function wc(e){let t=D(e);t.current=e;let n=D(null);return n.current??(n.current=_m(t)),n.current}function _m(e){let t=B(null),n=new Set,o=c=>`${e.current.conversationId()??""}:${c}`,a=c=>c.frequency==="always"?!1:c.frequency==="conversation"?n.has(o(c.id)):c.id in e.current.persistence.loadFormsDone(),i=(c,_)=>{if(t.value)return;let p=e.current;if(c==="manual"){let h=p.forms.list.find(d=>d.id===_);h&&(t.value={form:h,trigger:"manual"});return}for(let h of p.forms.byTrigger[c]??[]){let d=h.triggers.find(f=>f.kind===c);if(!(!d||!um(d,p)||a(h)||!pm(h,p))){t.value={form:h,trigger:c};return}}},l=(c,_)=>{let p=t.value;if(!p)return;t.value=null;let{form:h,trigger:d}=p;h.frequency==="conversation"?n.add(o(h.id)):h.frequency!=="always"&&e.current.persistence.saveFormDone(h.id),e.current.onComplete(h,d,c,_)};return{activeForm:t,fire:i,refresh:()=>{let c=t.value;if(!c)return;let _=e.current.forms.list.find(p=>p.id===c.form.id);_&&_!==c.form&&(t.value={form:_,trigger:c.trigger})},complete:c=>l(c,!1),skip:()=>l({},!0)}}function um(e,t){return e.kind==="after-messages"?t.messageCount()>=Number(e.param??0):e.kind==="page-area"?t.pageArea()===e.param:!0}function pm(e,t){let n=e.when;if(!n)return!0;if(n.missingContext?.length){let a=t.userContext()??{};if(n.missingContext.some(i=>a[i]!==void 0&&a[i]!==""))return!1}if(n.pageArea&&!(Array.isArray(n.pageArea)?n.pageArea:[n.pageArea]).includes(t.pageArea()??""))return!1;let o=t.messageCount();return!(n.minMessages!=null&&o<n.minMessages||n.maxMessages!=null&&o>n.maxMessages)}function Cc(e){let t=x.cssPrefix,{site:n,blocks:o,strings:a,collapsed:i}=e,l=o?.navigation??[],s=o?.linkCards??[],c=i?a.expandSidebar:a.collapseSidebar;return r("aside",{class:`${t}-sidebar`,"data-collapsed":i?"true":"false","data-testid":k.sidebar,children:[r("div",{class:`${t}-sidebar-header`,children:[r(mm,{site:n}),r("button",{type:"button",class:`${t}-sidebar-toggle`,"aria-label":c,"aria-expanded":i?"false":"true",title:c,onClick:e.onToggleCollapsed,"data-testid":k.sidebarToggle,children:r(fm,{collapsed:i})})]}),i?null:r(ie,{children:[l.length>0?r("nav",{class:`${t}-sidebar-section`,"data-section":"navigation",children:r(gm,{items:l})}):null,s.length>0?r("div",{class:`${t}-sidebar-section`,"data-section":"link-cards",children:r(hm,{items:s})}):null,e.showConversations?r("div",{class:`${t}-sidebar-conversations`,children:r(Jo,{transport:e.transport,strings:e.strings,locale:e.locale,persistence:e.persistence,visitorId:e.visitorId,onSelect:e.onSelectConversation,onNewConversation:e.onNewConversation})}):null]})]})}function mm({site:e}){let t=x.cssPrefix;if(e?.logo?.url){let n=e.logo.alt??e.title??"Logo";return r("picture",{children:[e.logoDark?.url?r("source",{srcset:e.logoDark.url,media:"(prefers-color-scheme: dark)"}):null,r("img",{class:`${t}-sidebar-logo`,src:e.logo.url,alt:n})]})}return r("div",{class:`${t}-sidebar-title`,children:e?.title??x.name})}function fm({collapsed:e}){return r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",children:e?r("polyline",{points:"9 6 15 12 9 18"}):r("polyline",{points:"15 6 9 12 15 18"})})}function gm({items:e}){let t=x.cssPrefix;return r("ul",{class:`${t}-sidebar-nav`,children:e.map(n=>r("li",{children:r("a",{class:`${t}-sidebar-nav-item`,href:n.href,target:n.href?"_blank":void 0,rel:n.href?"noreferrer":void 0,children:[n.icon?r("span",{class:`${t}-sidebar-nav-icon`,"data-icon":n.icon}):null,r("span",{class:`${t}-sidebar-nav-label`,children:n.label})]})},n.id??n.label))})}function hm({items:e}){let t=x.cssPrefix;return r("div",{class:`${t}-sidebar-cards`,children:e.map(n=>r("a",{class:`${t}-sidebar-card`,href:n.href,target:n.href?"_blank":void 0,rel:n.href?"noreferrer":void 0,children:[r("div",{class:`${t}-sidebar-card-label`,children:n.label}),n.description?r("div",{class:`${t}-sidebar-card-desc`,children:n.description}):null]},n.id??n.label))})}var Tc=x.cssPrefix;function Ec(e){return r("main",{class:`${Tc}-page-shell`,"data-sidebar-collapsed":e.sidebarCollapsed?"true":"false",children:[r(Cc,{site:e.site,blocks:e.blocks,transport:e.transport,strings:e.strings,locale:e.locale,persistence:e.persistence,visitorId:e.visitorId,showConversations:e.showConversations,onSelectConversation:e.onSelectConversation,onNewConversation:e.onNewConversation,collapsed:e.sidebarCollapsed,onToggleCollapsed:e.onToggleSidebarCollapsed}),r("section",{class:`${Tc}-page-chat`,"aria-label":"Chat",children:e.children})]})}var Rc=e=>Object.fromEntries(e.map(t=>[t,[]]));function Ac(e,t,n){let o=B({activeTab:e,stacks:Rc(t)});return{sig:o,switchTab(a){o.value.activeTab!==a&&(o.value={...o.value,activeTab:a},n?.(a))},push(a){let i=o.value,l=i.stacks[i.activeTab]??[];o.value={...i,stacks:{...i.stacks,[i.activeTab]:[...l,a]}}},pop(){let a=o.value,i=a.stacks[a.activeTab]??[];i.length!==0&&(o.value={...a,stacks:{...a.stacks,[a.activeTab]:i.slice(0,-1)}})},reset(a){o.value={activeTab:a,stacks:Rc(t)}}}}var Ic=e=>e.stacks[e.activeTab]??[],Lc=e=>Ic(e).at(-1),Mc=e=>Ic(e).length===0;var Nc={Icon:Cn};var mt=x.cssPrefix;function Qo({title:e,actions:t}){return r("header",{class:`${mt}-back-header`,"data-variant":"title",children:[r("span",{class:`${mt}-back-spacer`,"aria-hidden":"true"}),r("h1",{class:`${mt}-back-title`,children:e}),t??r("span",{class:`${mt}-back-spacer`,"aria-hidden":"true"})]})}function Zo({title:e,backLabel:t,onBack:n,actions:o,testid:a}){return r("header",{class:`${mt}-back-header`,"data-testid":a,children:[r("button",{type:"button",class:`${mt}-icon-btn`,onClick:n,"aria-label":t,title:t,children:r(kn,{})}),r("h1",{class:`${mt}-back-title`,children:e}),o??r("span",{class:`${mt}-back-spacer`,"aria-hidden":"true"})]})}var Jt=x.cssPrefix;function Dc({placeholder:e,onActivate:t}){return r("button",{type:"button",class:`${Jt}-home-search`,onClick:t,"data-testid":k.homeSearch,children:[r("span",{class:`${Jt}-home-search-text`,children:e}),r("span",{class:`${Jt}-home-search-icon`,"aria-hidden":"true",children:r(la,{})})]})}function Oc({placeholder:e,value:t,onInput:n}){return r("div",{class:`${Jt}-home-search`,"data-input":"true",children:[r("input",{type:"search",class:`${Jt}-home-search-input`,placeholder:e,value:t,onInput:o=>n(o.currentTarget.value),"data-testid":k.helpSearch}),r("span",{class:`${Jt}-home-search-icon`,"aria-hidden":"true",children:r(la,{})})]})}var An=x.cssPrefix;function er({title:e,subtitle:t,onClick:n,testid:o}){return r("button",{type:"button",class:`${An}-list-row`,onClick:n,"data-testid":o,children:[r("span",{class:`${An}-list-row-body`,children:[r("span",{class:`${An}-list-row-title`,children:e}),t?r("span",{class:`${An}-list-row-sub`,children:t}):null]}),r("span",{class:`${An}-list-row-chevron`,"aria-hidden":"true",children:r(Kt,{})})]})}var $c=x.cssPrefix;function Ke({tone:e="info",message:t,onRetry:n,strings:o}){return r("div",{class:`${$c}-module-empty`,role:e==="error"?"alert":"status","aria-live":"polite",children:[r("span",{children:t}),n?r("button",{type:"button",class:`${$c}-module-retry`,onClick:n,children:o.errorRetry}):null]})}var It=x.cssPrefix,vm=W.scope("help"),bm=(e,t)=>t.url?e.push({kind:"iframe",url:t.url,title:t.title}):e.push({kind:"content",id:t.id,title:t.title});function ym(e){let t=new Map;for(let n of e){let o=n.categories?.[0]??"";(t.get(o)??t.set(o,[]).get(o)).push(n)}return[...t.entries()]}function Fc(e,t){let n=t.toLowerCase(),o=n.indexOf(e);if(o!==-1)return 100-Math.min(o,99);let a=0;for(let i of e){if(a=n.indexOf(i,a),a===-1)return 0;a+=1}return 1}function xm(e,t){let n=t.toLowerCase().trim();return n?e.map(o=>({item:o,score:Math.max(Fc(n,o.title)*2,Fc(n,o.description??""))})).filter(o=>o.score>0).toSorted((o,a)=>a.score-o.score).map(o=>o.item):[]}function Hc({article:e,nav:t}){return r(er,{title:e.title,subtitle:e.description,onClick:()=>bm(t,e),testid:Pe(k.helpArticle,e.id)})}function Pm({transport:e,strings:t,config:n,nav:o,bus:a,panelProps:i}){let l=n.contentTags,[s,c]=A("loading"),[_,p]=A(t.errorGeneric),[h,d]=A([]),[f,m]=A(""),[y,v]=A(0);R(()=>{let b=!1;return c("loading"),e.listContent({tags:l,sortBy:"order",limit:100}).then(E=>{if(b)return;let z=E.items??[];d(z),c("loaded"),a.emit("contentView",{section:"help",tags:l?.join(","),count:z.length})}).catch(E=>{b||(vm.warn("listContent (help) failed",{err:E}),p(kt(E,t)),c("error"))}),()=>{b=!0}},[e,l,y,a]);let P=Le(()=>xm(h,f),[h,f]);R(()=>{let b=f.trim();if(!b)return;let E=setTimeout(()=>a.emit("contentSearch",{queryLength:b.length,hitCount:P.length}),600);return()=>clearTimeout(E)},[f,P,a]);function C(){return f.trim().length>0?P.length===0?r(Ke,{message:t.helpSearchEmpty,strings:t}):r("div",{class:`${It}-help-card`,children:P.map(b=>r(Hc,{article:b,nav:o},b.id))}):s==="loading"?r(Ke,{message:t.helpLoading,strings:t}):s==="error"?r(Ke,{tone:"error",message:_,onRetry:()=>v(b=>b+1),strings:t}):h.length===0?r(Ke,{message:t.helpEmpty,strings:t}):ym(h).map(([b,E])=>r("section",{class:`${It}-help-group`,children:[b?r("h2",{class:`${It}-help-section-title`,children:b}):null,r("div",{class:`${It}-help-card`,children:E.map(z=>r(Hc,{article:z,nav:o},z.id))})]},b))}return r("div",{class:`${It}-module`,children:[r(Qo,{title:t.helpTitle,actions:r(Qe,{panelProps:i,variant:"plain"})}),r("div",{class:`${It}-module-pad`,children:r(Oc,{placeholder:t.helpSearchPlaceholder,value:f,onInput:m})}),r("div",{class:`${It}-help-list`,children:C()})]})}var Bc={Icon:wn,Root:e=>r(Pm,{...e})};var zc=x.cssPrefix;function Ra({onClick:e,children:t,testid:n}){return e?r("button",{type:"button",class:`${zc}-home-card`,"data-interactive":"true",onClick:e,"data-testid":n,children:t}):r("div",{class:`${zc}-home-card`,"data-testid":n,children:t})}var ce=x.cssPrefix,Uc=W.scope("home");function Sm(e){let t=e.options.userContext?.name,n=e.config.greetingText?Ie(e.strings,e.config.greetingText):void 0;return n?{title:t?n.replace("{name}",t):n.replace(/\s*\{name\}\s*/," ").trim(),subtitle:e.strings.homeGreetingLead}:t?{title:e.strings.homeGreetingNamed.replace("{name}",t),subtitle:e.strings.homeGreetingLead}:{title:e.strings.homeGreeting}}var km=(e,t)=>t.url?e.push({kind:"iframe",url:t.url,title:t.title}):e.push({kind:"content",id:t.id,title:t.title});function wm(e){let{transport:t,strings:n,config:o,nav:a,bus:i,panelProps:l}=e,[s,c]=A(null),[_,p]=A([]),h=o.contentTags?.join(",");R(()=>{if(o.showRecentConversations===!1)return;let P=!1;return t.listConversations({limit:1}).then(C=>!P&&c(C.conversations?.[0]??null)).catch(C=>!P&&Uc.warn("listConversations (home) failed",{err:C})),()=>{P=!0}},[t,o.showRecentConversations]),R(()=>{if(!o.contentTags?.length)return;let P=!1;return t.listContent({tags:o.contentTags,limit:6}).then(C=>{if(P)return;let b=C.items??[];p(b),i.emit("contentView",{section:"home",tags:h,count:b.length})}).catch(C=>!P&&Uc.warn("listContent (home) failed",{err:C})),()=>{P=!0}},[t,h,i]);let d=Sm(e),f=o.userAvatars??[],m=o.status,y=m?.text?Ie(n,m.text):n.homeStatus,v=o.contentBlockTitle?Ie(n,o.contentBlockTitle):n.homeContentTitle;return r("div",{class:`${ce}-module ${ce}-home`,"data-testid":k.homeView,children:r("div",{class:`${ce}-home-scroll`,children:[r("div",{class:`${ce}-home-hero`,children:[r("div",{class:`${ce}-home-hero-top`,children:[o.brandName?r("span",{class:`${ce}-home-brand`,"data-testid":k.homeBrand,children:o.brandName}):r("span",{class:`${ce}-home-brand-spacer`,"aria-hidden":"true"}),r("div",{class:`${ce}-home-hero-actions`,children:[f.length>0?r("div",{class:`${ce}-home-avatars`,children:f.map(P=>r("span",{class:`${ce}-home-avatar`,title:P.role?`${P.name} \xB7 ${P.role}`:P.name,children:P.avatar?r("img",{src:P.avatar,alt:"",loading:"lazy"}):r("span",{children:Bo(P.name)})},P.name))}):null,r(Qe,{panelProps:l,variant:"plain"})]})]}),o.showGreeting!==!1?r(ie,{children:[r("h1",{class:`${ce}-home-greeting`,"data-testid":k.homeGreeting,children:d.title}),d.subtitle?r("p",{class:`${ce}-home-lead`,children:d.subtitle}):null]}):null]}),r("div",{class:`${ce}-home-cards`,children:[o.showSearchBar!==!1?r(Dc,{placeholder:n.homeSearchPlaceholder,onActivate:()=>a.switchToLayout("help")}):null,s?r(Ra,{onClick:()=>a.selectConversation(s.conversationId),testid:k.homeRecent,children:r("div",{class:`${ce}-home-recent-row`,"data-unread":s.hasUnread?"true":void 0,children:[r("span",{class:`${ce}-home-recent-avatar`,"aria-hidden":"true",children:r(Cn,{})}),r("span",{class:`${ce}-home-recent-body`,children:[r("span",{class:`${ce}-home-recent-title`,children:s.title}),s.preview?r("span",{class:`${ce}-home-recent-preview`,children:s.preview}):null]}),s.hasUnread?r("span",{class:`${ce}-home-recent-dot`,"aria-label":"Unread"}):null]})}):null,m?r(Ra,{onClick:m.url?()=>a.push({kind:"iframe",url:m.url,title:y}):void 0,children:r("div",{class:`${ce}-home-status`,"data-level":m.level??"operational",children:[r("span",{class:`${ce}-home-status-icon`,"aria-hidden":"true",children:r(Rl,{})}),r("span",{class:`${ce}-home-status-text`,children:y})]})}):null,_.length>0?r("section",{class:`${ce}-home-content`,children:[r("div",{class:`${ce}-home-content-title`,children:v}),r("div",{class:`${ce}-home-content-list`,children:_.map(P=>r(er,{title:P.title,subtitle:P.description,onClick:()=>km(a,P),testid:Pe(k.homeContentRow,P.id)},P.id))})]}):null]})]})})}var qc={Icon:Al,Root:e=>r(wm,{...e})};var ft=x.cssPrefix,Cm=W.scope("news");function Tm({transport:e,strings:t,config:n,nav:o,bus:a,panelProps:i}){let l=n.contentTags,[s,c]=A("loading"),[_,p]=A(t.errorGeneric),[h,d]=A([]),[f,m]=A(0);R(()=>{let v=!1;return c("loading"),e.listContent({tags:l,sortBy:"publishedAt",sortOrder:"desc"}).then(P=>{if(v)return;let C=P.items??[];d(C),c("loaded"),a.emit("contentView",{section:"news",tags:l?.join(","),count:C.length})}).catch(P=>{v||(Cm.warn("listContent (news) failed",{err:P}),p(kt(P,t)),c("error"))}),()=>{v=!0}},[e,l,f,a]);function y(){return s==="loading"?r(Ke,{message:t.newsLoading,strings:t}):s==="error"?r(Ke,{tone:"error",message:_,onRetry:()=>m(v=>v+1),strings:t}):h.length===0?r(Ke,{message:t.newsEmpty,strings:t}):r("div",{class:`${ft}-news-list`,children:h.map(v=>r("button",{type:"button",class:`${ft}-news-card`,onClick:()=>o.push({kind:"content",id:v.id,title:v.title}),"data-testid":Pe(k.newsItem,v.id),children:[v.image?r("img",{class:`${ft}-news-hero`,src:v.image,alt:"",loading:"lazy"}):null,r("span",{class:`${ft}-news-body`,children:[r("span",{class:`${ft}-news-title`,children:v.title}),v.description?r("span",{class:`${ft}-news-summary`,children:v.description}):null]})]},v.id))})}return r("div",{class:`${ft}-module`,children:[r(Qo,{title:t.newsTitle,actions:r(Qe,{panelProps:i,variant:"plain"})}),r("div",{class:`${ft}-module-scroll`,children:y()})]})}var Wc={Icon:Il,Root:e=>r(Tm,{...e})};var tr={chat:Nc,home:qc,help:Bc,news:Wc};var In=x.cssPrefix;function Vc({modules:e,activeTab:t,strings:n,hasUnread:o,onSelect:a}){return r("nav",{class:`${In}-tabbar`,role:"tablist","aria-label":n.panelTitle,children:e.map(i=>{let l=tr[i.layout].Icon,s=i.id===t,c=i.layout==="chat"&&o;return r("button",{type:"button",role:"tab","aria-selected":s,class:`${In}-tab`,onClick:()=>a(i.id),"data-testid":Pe(k.tab,i.id),children:[r("span",{class:`${In}-tab-icon`,"aria-hidden":"true",children:[r(l,{}),c?r("span",{class:`${In}-tab-badge`,"data-testid":k.tabBadge,"aria-label":"Unread"}):null]}),r("span",{class:`${In}-tab-label`,children:Ie(n,i.label)})]},i.id)})})}var Gc=x.cssPrefix,Em="allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";function Kc({url:e,title:t,strings:n,onBack:o,actions:a}){return r("div",{class:`${Gc}-module`,children:[r(Zo,{title:t||n.moduleBack,backLabel:n.moduleBack,onBack:o,actions:a}),r("iframe",{class:`${Gc}-content-frame`,src:e,title:t||"content",sandbox:Em,referrerpolicy:"no-referrer",loading:"lazy",allow:"fullscreen"})]})}var Ln=x.cssPrefix,Rm=W.scope("content"),Am=5e3;function jc({id:e,title:t,transport:n,strings:o,bus:a,onBack:i,actions:l}){let[s,c]=A(null),[_,p]=A(!1),[h,d]=A(0),f=F(()=>{p(!1),c(null),d(v=>v+1)},[]);R(()=>{let v=!1;return n.listContent({ids:[e],limit:1}).then(P=>{if(v)return;let C=P.items[0];C?(c(C),a.emit("contentOpen",{contentId:e,tags:C.tags?.length?C.tags.join(","):void 0})):p(!0)}).catch(P=>{v||(Rm.warn("listContent (reader) failed",{err:P}),p(!0))}),()=>{v=!0}},[n,e,h,a]),R(()=>{if(!s)return;let v=setTimeout(()=>a.emit("contentRead",{contentId:e}),Am);return()=>clearTimeout(v)},[s,e,a]);let m=F(v=>{let C=v.target?.closest?.("a")?.getAttribute("href")??"";C&&!C.startsWith("#")&&a.emit("contentLinkClick",{contentId:e})},[a,e]);function y(){return _?r(Ke,{tone:"error",message:o.errorGeneric,onRetry:f,strings:o}):s===null?r(Ke,{message:o.contentLoading,strings:o}):r("article",{class:`${Ln}-content`,"data-testid":k.contentView,onClick:m,children:[s.image?r("img",{class:`${Ln}-content-hero`,src:s.image,alt:"",loading:"lazy"}):null,s.description?r("p",{class:`${Ln}-content-subtitle`,children:s.description}):null,r(cc,{text:s.content??""})]})}return r("div",{class:`${Ln}-module`,children:[r(Zo,{title:s?.title||t||o.moduleBack,backLabel:o.moduleBack,onBack:i,actions:l,testid:k.backHeader}),r("div",{class:`${Ln}-module-scroll`,"data-testid":k.contentScroll,children:y()})]})}var nr=x.cssPrefix;function Xc({panelProps:e,enabledModules:t,nav:n,bus:o,hasUnread:a,onSelectConversation:i,onStartNewConversation:l,onSetPanelSize:s}){let c=e.options,_=c.strings,p=D(null),h=D(new Set);R(()=>{let N=p.current;if(!N)return;let V=Ho(N),w=$=>{$.key==="Escape"&&e.onClose?.()};return N.addEventListener("keydown",w),()=>{V(),N.removeEventListener("keydown",w)}},[e.onClose]);let d=D(null),f=F(N=>{d.current?.attachFromDrop(N)},[]),{visible:m}=Uo({containerRef:p,onDrop:f});$o(p.current,c.mode==="modal");let y=X(()=>n.sig.value).value,v=Lc(y),P=c.modules.byId[y.activeTab],C=v?.kind==="iframe"||v?.kind==="content",b=t.length>1&&(Mc(y)||!C),E=D(null);R(()=>{if(C&&E.current===null)E.current=e.panelSize,e.panelSize==="normal"&&s("expanded");else if(!C&&E.current!==null){let N=E.current;E.current=null,s(N)}},[C]);let z={push:n.push,pop:n.pop,switchTab:n.switchTab,switchToLayout:N=>{let V=t.find(w=>w.layout===N);V&&n.switchTab(V.id)},selectConversation:i,startNewConversation:l},te=N=>({options:c,transport:e.transport,strings:_,config:N,visitorId:e.visitorId,nav:z,bus:o,panelProps:e}),ee=r(Qe,{panelProps:e,variant:"plain"});P&&h.current.add(P.id);let J=t.filter(N=>h.current.has(N.id)),oe=N=>{if(N.layout==="chat")return r(Ta,{...e,containerEl:p.current,dragOver:m,composerAttachApiRef:d});let V=tr[N.layout].Root;return V?r(V,{...te(N)}):null},T=()=>v?.kind==="iframe"?r(Kc,{url:v.url,title:v.title,strings:_,onBack:n.pop,actions:ee}):v?.kind==="content"?r(jc,{id:v.id,title:v.title,transport:e.transport,strings:_,bus:o,onBack:n.pop,actions:ee}):null;return r("div",{ref:p,class:`${nr}-panel ${nr}-messenger`,role:"dialog","aria-modal":"false","aria-label":_.panelTitle,style:{position:"relative"},"data-testid":k.messengerHome,children:[r("div",{class:`${nr}-messenger-body`,children:[J.map(N=>r("div",{class:`${nr}-messenger-pane`,hidden:C||N.id!==P?.id,children:oe(N)},N.id)),T()]}),b?r(Vc,{modules:t,activeTab:y.activeTab,strings:_,hasUnread:a,onSelect:n.switchTab}):null,r(Ea,{poweredBy:c.poweredBy}),c.size.resize?.enabled&&!(P?.layout==="chat"&&!v)?r(Oo,{panelEl:p.current,resize:c.size.resize,position:c.position,initialSize:e.initialWidgetSize,onSizeChange:e.onWidgetSizeChange,strings:_}):null]})}var Mn=x.cssPrefix;function Yc({strings:e,onClose:t}){return r("div",{class:`${Mn}-panel ${Mn}-modules-empty`,role:"dialog","aria-label":e.panelTitle,"data-testid":k.modulesEmpty,children:[t?r("button",{type:"button",class:`${Mn}-icon-btn ${Mn}-modules-empty-close`,onClick:t,"aria-label":e.close,title:e.close,children:r(Je,{})}):null,r("p",{class:`${Mn}-modules-empty-text`,children:e.modulesEmpty})]})}function Jc({callout:e,persistence:t}){let n=e?.text??"",o=e?.persistent??!0,[a,i]=A(()=>o?!1:t.loadCalloutDismissed(n));R(()=>{i(o?!1:t.loadCalloutDismissed(n))},[n,o,t]);let l=F(()=>{i(!0),o||t.saveCalloutDismissed(n)},[t,n,o]);return{dismissed:a,dismissCallout:l}}var K=W.scope("app"),or=x.cssPrefix;function Qc(e,t){return Qs({...e,text:Ie(t,e.text)})}function Im(e){let t=e.partsSig.value.filter(n=>n.kind==="tool");return t.length>0&&t.every(n=>{let o=n.stateSig.value;return o==="output-available"||o==="output-error"||o==="output-denied"||o==="approval-responded"})}function Zc(e){return e instanceof DOMException?e.name==="AbortError":e?.name==="AbortError"}function ed({options:e,hostElement:t,bus:n}){let[o]=A(()=>ut(e.widgetId,e.storage,e.aiAgentDeploymentId)),[a,i]=A(()=>o.getVisitorId()),l=o.loadUserPrefs(),[s,c]=A(()=>l.locale??e.locale),[_,p]=A(()=>l.themeMode??e.themeMode),[h,d]=A(()=>l.textSize??e.textSize),f=bn(o.loadConversationId()),m=bn([]),y=bn(!1),[v,P]=A(!1),[C,b]=A([]);function E(){let u=e.modules.list,g=new Set(u.map(O=>O.id)),I=o.loadActiveModule();return I&&g.has(I)?I:u[0]?.id??""}function z(){return e.modules.list.find(u=>u.layout==="chat")?.id}function te(){let u=z();return u?e.modules.list.length===1?!0:J.sig.value.activeTab===u:!1}let ee=D();if(!ee.current){let u=e.modules.list.map(g=>g.id);ee.current=Ac(E(),u,g=>o.saveActiveModule(g))}let J=ee.current,oe=D(void 0);oe.current=z();let[T,N]=A(!1),[V,w]=A(null),[$,Q]=A(!1),Se=e.mode==="standalone"||e.mode==="inline",ze=D(yn(e,Gt(),o.loadPanelOpen(),o.loadPanelSize())),[_e,Ue]=A(ze.current.panelOpen),[ae,ke]=A(ze.current.panelOpen),qe=D(ae);qe.current=ae;let je=D(!1),Lt=D(void 0);R(()=>{_e&&ke(!0)},[_e]);let Nn=D(!1),[S,U]=A(!1),{dismissed:be,dismissCallout:Ee}=Jc({callout:e.launcher.callout,persistence:o}),we=e.launcher.callout?.persistent??!0,Xe=F(()=>{K.info("calloutDismiss"),n.emit("calloutDismiss",void 0),Ee()},[n,Ee]),[he,ye]=A(ze.current.panelSize),Qt=D(!1),[gt,Dn]=A("chat"),[Zt,en]=A(!0),[Ce,On]=A(!1),[cd,za]=A(null),[lr,tn]=A([]),[Ua,$n]=A(null),[Fn,Hn]=A(null),Bn=D(e.strings),[dd,_d]=A(void 0),[ud,pd]=A(void 0),[md,fd]=A(()=>o.loadSidebarCollapsed()??!1),[cr,gd]=A({}),[G]=A(()=>new Co({agentApiBaseUrl:e.agentApiBaseUrl,dataApiBaseUrl:e.dataApiBaseUrl,auth:Fs({publicKey:e.publicKey,aiAgentDeploymentId:e.aiAgentDeploymentId,publicKeyHeader:"x-public-key"}),endpoints:e.endpoints})),[Me]=A(()=>new Ro(m)),[se]=A(()=>new Lo(e.sound,e.haptics)),Ye=F(u=>{o.patchUserPrefs(u),G.saveUserPrefs(o.loadUserPrefs()).catch(g=>{K.warn("saveUserPrefs failed",{err:g})})},[o,G]);R(()=>{l.soundMuted!==void 0&&se.setMuted(l.soundMuted)},[]),R(()=>{t.dataset.theme=_},[t,_,e]),R(()=>{t.dataset.textSize=h},[t,h,e]),R(()=>{se.update(e.sound,e.haptics)},[se,e.sound,e.haptics]),R(()=>()=>se.destroy(),[se]),R(()=>{let u=!0;return se.mutedSig.subscribe(g=>{if(u){u=!1;return}Ye({soundMuted:g})})},[se,Ye]),R(()=>{Qt.current||!e.size.initialSize||(Qt.current=!0,!o.loadPanelSize()&&ye(ta(e.mode,e.size,Gt())))},[e.mode,e.size,o]),R(()=>{if(!T||Nn.current)return;Nn.current=!0;let u=yn(e,Gt(),o.loadPanelOpen(),o.loadPanelSize());Ue(u.panelOpen),ye(u.panelSize)},[T,e,o]);let qa=D(!1),Wa=D(!1),nn=D(null),dr=D(null),_r=D(!1),Va=D(null),ur=D(null),pr=D();R(()=>()=>clearTimeout(pr.current),[]);let mr=D(new Set);R(()=>{if(!(!T||qa.current)){if(qa.current=!0,Wa.current){let u=oe.current;u&&J.switchTab(u);return}J.reset(E())}},[T]);let zn=F(u=>{!u||u.length===0||(m.value=u.map(g=>Qc(g,Bn.current)))},[m]),fr=D(null),Un=F(async u=>{try{let{formSubmissions:g}=await(u?G.bootstrap(u):fr.current??G.bootstrap()),I=new Map;return g.forEach((O,q)=>I.set(O.formId,q)),g.filter((O,q)=>!O.skipped||I.get(O.formId)===q).map((O,q)=>({key:`wire:${O.formId}:${O.createdAt??q}`,formId:O.formId,outcome:O.skipped?"skipped":"submitted",createdAt:ko(O.createdAt),values:O.values}))}catch(g){return K.debug("bootstrap failed \u2014 no form markers (non-fatal)",{err:g}),[]}},[G]),on=D(0),rn=F((u,g)=>{let I=[...u.map(L=>L.createdAt),...g.map(L=>L.createdAt)].filter(L=>L!==void 0),O=(I.length?Math.min(...I):Date.now())-1;return[...(Lt.current?.messages??[]).map(L=>{let Re=Qc(L,Bn.current);return Re.createdAt=O,Re}),...u]},[]),gr=F(async u=>{let g=on.current,I=()=>g!==on.current;P(!0);try{let[O,q]=await Promise.all([G.loadConversation(u),Un()]);if(I())return;let L=aa(O.messages??[]);b(q);let Re=nn.current?[nn.current]:[];if(L.length||Re.length){m.value=[...rn(L,q),...Re],en(O.canContinue??!0);let Oe=L.findLast(fe=>fe.role==="assistant"&&!fe.ephemeral);tn(Oe?.suggestions??O.suggestions??[])}else m.value=rn([],q);G.resumeStatus==="needs-generation"&&dr.current?.()}catch(O){if(I())return;K.warn("loadThread failed; resetting conversationId",{err:O,conversationId:u}),f.value=void 0,o.saveConversationId(void 0)}finally{I()||P(!1)}},[G,Un,m,f,o,rn]),an=F(async({newConversation:u})=>{let g=++on.current,I=()=>g!==on.current,O=f.value,q=u||!O?We():O;q!==O&&(f.value=q,o.saveConversationId(q));let L;try{L=await G.handshake({visitorId:a,conversationId:q,userPrefs:o.loadUserPrefs(),locale:s})}catch(Oe){if(I())return;n.emit("error",Oe),e.onError?.(Oe),u||N(!0);return}if(I())return;if(L.visitorId&&L.visitorId!==a&&(K.info("visitor rebound",{previous:a,current:L.visitorId,reason:L.rebind?.visitorId}),o.setVisitorId(L.visitorId),i(L.visitorId),n.emit("visitorRebound",{previous:a,current:L.visitorId,reason:L.rebind?.visitorId})),L.conversationId&&L.conversationId!==q&&(K.info("conversation rebound",{previous:q,current:L.conversationId,reason:L.rebind?.conversationId}),n.emit("conversationRebound",{previous:q,current:L.conversationId,reason:L.rebind?.conversationId})),L.agent&&za(L.agent),e.mode==="page"&&(L.site&&Os(L.site)?_d(L.site):L.site&&K.warn("invalid site config, using fallback",{site:L.site}),L.blocks&&$s(L.blocks)?pd(L.blocks):L.blocks&&K.warn("invalid blocks config, using fallback",{blocks:L.blocks})),L.userPrefs&&!u&&(o.saveUserPrefs(L.userPrefs),L.userPrefs.locale&&c(L.userPrefs.locale),L.userPrefs.soundMuted!==void 0&&se.setMuted(L.userPrefs.soundMuted),L.userPrefs.themeMode&&p(L.userPrefs.themeMode),L.userPrefs.textSize&&d(L.userPrefs.textSize)),Lt.current=L.welcome,u||n.emit("handshake",L),L.welcome?.suggestions){let Oe=Bn.current;tn(L.welcome.suggestions.map(fe=>({...fe,label:Ie(Oe,fe.label),...fe.text===void 0?{}:{text:Ie(Oe,fe.text)}})))}!u&&O&&L.conversationId===O?qe.current?gr(O):je.current=!0:(f.value=L.conversationId,o.saveConversationId(L.conversationId),zn(L.welcome?.messages)),u||N(!0)},[G,a,o,e,n,f,se,zn,gr,s]),sn=JSON.stringify(e.userContext??null),hd=JSON.stringify(e.pageContext??null),vd=JSON.stringify(cr);R(()=>{let u=Object.keys(cr).length?{...cr,...e.userContext}:e.userContext;G.setContext(u,Lm(e.pageContext))},[G,sn,hd,vd]);let $e=Ot(s,e.availableLocales,e.defaultLocale);R(()=>{G.setLocale($e)},[G,$e]),R(()=>{t.dir=_i($e)?"rtl":"ltr"},[t,$e]),R(()=>{$e!==s&&c($e)},[$e,s]);let Ga=F((u,g=[])=>tn(u.suggestions??g),[]),qn=F(u=>{if(u.type!=="data-conversation-rebind")return!1;let g=u.data?.conversationId;if(g&&g!==f.value){let I=f.value;f.value=g,o.saveConversationId(g),G.primeIdentity(void 0,g),K.info("conversation rebound (in-stream)",{previous:I,current:g}),I&&n.emit("conversationRebound",{previous:I,current:g,reason:g})}return!0},[f,o,G,n]),Ka=F(async u=>{let g=null;try{for await(let I of u.iter)if(!qn(I.chunk)){if(!g){g=xn(),nn.current=g,Me.attach(g),m.value=[...m.value,g],On(!0),$n(()=>u.cancel),Hn(()=>u.detach),Wa.current=!0;let O=oe.current;O&&J.switchTab(O),K.info("resumed in-flight reply on mount")}Me.apply(I.chunk),I.chunk.type==="finish"&&I.chunk.canContinue===!1&&en(!1)}g&&(g.status==="error"||at(g)?(g.status="error",g.errorText=e.strings.errorGeneric,se.play("error")):(g.status="complete",se.play("messageReceived"),Aa(n,e,"assistant",To(g)),Ga(g)))}catch(I){g&&(Zc(I)?Eo(g)?m.value=m.value.filter(O=>O!==g):g.status="complete":(g.status="error",g.errorText=kt(I,e.strings),se.play("error"))),K.debug("resume ended without completing",{err:I})}finally{nn.current=null,g&&(Me.detach(),On(!1),$n(null),Hn(null),m.value=[...m.value],ur.current?.())}},[Me,m,se,n,e,J,qn]),ja=D(null),hr=F(async()=>{let u=G.resumeStream();ja.current=u,await Ka(u),G.resumeStatus==="needs-generation"&&dr.current?.()},[G,Ka]);R(()=>{let u=f.value;return u&&G.primeIdentity(a,u),an({newConversation:!1}),()=>{on.current++,ja.current?.cancel()}},[]),R(()=>{ae&&(fr.current=G.bootstrap(),(async()=>{try{let u=await fr.current;w(un((u??{forms:[]}).forms,$e))}catch(u){K.debug("bootstrap failed \u2014 treating as no forms",{err:u})}finally{Q(!0)}})(),(async()=>{let u=[];if(je.current){je.current=!1;let g=f.value;g&&u.push(gr(g))}f.value&&u.push(hr()),u.length!==0&&await Promise.allSettled(u)})())},[ae]);let Wn=D(null);R(()=>{if(!ae)return;if(Wn.current===null){Wn.current=$e;return}if(Wn.current===$e)return;Wn.current=$e;let u=!1;return G.bootstrap().then(g=>{u||w(un((g??{forms:[]}).forms,$e))}).catch(g=>K.debug("forms re-localize failed \u2014 keeping current copy",{err:g})),()=>{u=!0}},[ae,$e,G]);let Xa=D(sn);R(()=>{!T||Xa.current===sn||(Xa.current=sn,an({newConversation:!1}))},[sn,T,an]),xt(()=>{po(t,So(e.mode,he,_e))},[t,_e,he,e.mode]),R(()=>{if(e.mode!=="modal"||!_e)return;let u=g=>{g.composedPath().some(q=>q instanceof HTMLElement&&q.classList.contains(`${x.cssPrefix}-panel`))||Ue(!1)};return t.addEventListener("click",u),()=>t.removeEventListener("click",u)},[t,_e,e.mode]),R(()=>{if(e.mode!=="drawer"||!_e)return;let u=g=>{g.key==="Escape"&&Ue(!1)};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[_e,e.mode]);let lt=F(async(u,{continueExisting:g})=>{let I=f.value??We();f.value||(f.value=I,o.saveConversationId(I));let O=(g?m.value:m.value.slice(0,-1)).filter(Re=>!Re.ephemeral),q=Vs({messages:O.map(Zs),conversationId:I,tools:e.features.tools,visitorId:a,userPrefs:o.loadUserPrefs()});On(!0);let L=G.sendMessage(q);$n(()=>L.cancel),Hn(()=>L.detach);try{for await(let fe of L.iter)qn(fe.chunk)||(Me.apply(fe.chunk),fe.chunk.type==="finish"&&fe.chunk.canContinue===!1&&en(!1));let Re=u.status==="error",Oe=at(u);if(Re||Oe){u.status="error",u.errorText=e.strings.errorGeneric,se.play("error");let fe=new Error(Re?"stream error chunk":"empty reply");n.emit("error",fe),e.onError?.(fe)}else u.status="complete",se.play("messageReceived"),Aa(n,e,"assistant",To(u)),Ga(u)}catch(Re){Zc(Re)?Eo(u)?m.value=m.value.filter(Oe=>Oe!==u):u.status="complete":(u.status="error",u.errorText=kt(Re,e.strings),se.play("error"),n.emit("error",Re),e.onError?.(Re))}finally{Me.detach(),On(!1),$n(null),Hn(null),m.value=[...m.value],ur.current?.()}},[G,Me,m,f,e,n,se,o,a,qn]),Ya=F(()=>{if(Ce||_r.current||nn.current||m.value.findLast(I=>!I.ephemeral)?.role!=="user")return;_r.current=!0,K.info("regenerating dangling user turn (needs-generation)");let g=xn();m.value=[...m.value,g],Me.attach(g),lt(g,{continueExisting:!1}).finally(()=>{_r.current=!1})},[Ce,m,Me,lt]);R(()=>{dr.current=Ya},[Ya]);let Vn=F((u,g)=>{if(Ce)return;let I=m.value.at(-1),O=I?.partsSig.value.find(q=>q.kind==="tool"&&q.toolCallId===u);if(!I||!O){K.warn("decideTool: tool part not found",{toolCallId:u});return}g(O),I.partsSig.value=[...I.partsSig.value],Im(I)&&(I.status="streaming",m.value=[...m.value],Me.attach(I),lt(I,{continueExisting:!0}))},[Ce,m,Me,lt]),Ja=F((u,g)=>{K.info("toolResult",{toolCallId:u}),n.emit("toolResult",{toolCallId:u}),Vn(u,I=>{I.outputSig.value=g,I.stateSig.value="output-available"})},[n,Vn]),Qa=F((u,g,I)=>{K.info("toolDecision",{toolCallId:u,approved:g}),n.emit("toolDecision",{toolCallId:u,approved:g}),Vn(u,O=>{let q=O.approvalSig.value?.id??u;O.approvalSig.value={id:q,approved:g,reason:I},O.stateSig.value="approval-responded"})},[n,Vn]),Za=F(u=>{if(Ce)return;let g=m.value.at(-1),I=g?.partsSig.value.find(q=>q.kind==="tool"&&q.toolCallId===u);if(!g||!I)return;let O=I.approvalSig.value?.id??u;I.approvalSig.value={id:O},I.stateSig.value="approval-requested",g.partsSig.value=[...g.partsSig.value]},[Ce,m]),bd=F((u,g)=>{K.info("messageFeedback",{messageId:u,value:g}),n.emit("messageFeedback",{messageId:u,value:g}),G.submitFeedback({messageId:u,value:g})},[n,G]),yd=Le(()=>({humanInLoop:e.features.humanInLoop,onResult:Ja,onDecision:Qa,onEdit:Za}),[e.features.humanInLoop,Ja,Qa,Za]),xd=()=>m.value.reduce((u,g)=>u+(g.role==="user"?1:0),0),Mt=e.forms.list.length>0?e.forms:V??e.forms,ue=wc({forms:Mt,persistence:o,userContext:()=>e.userContext,messageCount:xd,pageArea:()=>e.pageContext?.area?String(e.pageContext.area):void 0,conversationId:()=>f.value,onComplete:(u,g,I,O)=>{K.info("formSubmit",{formId:u.id,trigger:g,skipped:O}),n.emit("formSubmit",{formId:u.id,values:I,skipped:O}),b(L=>{let Oe=L.find(fe=>fe.formId===u.id&&fe.outcome==="skipped")?.createdAt??Date.now();return[...L.filter(fe=>!(fe.formId===u.id&&fe.outcome==="skipped")),{key:`local:${u.id}:${Oe}`,formId:u.id,outcome:O?"skipped":"submitted",createdAt:Oe,...O?{}:{values:I}}]});let q=f.value??We();f.value||(f.value=q,o.saveConversationId(q),G.primeIdentity(void 0,q)),!O&&u.mirrorToContext&&gd(L=>({...L,...I})),G.submitForm({formId:u.id,conversationId:q,trigger:g,values:I,skipped:O})}}),Pd=X(()=>ue.activeForm.value);R(()=>{ue.refresh()},[Mt,ue]);let ei=e.pageContext?.area?String(e.pageContext.area):void 0,Sd=X(()=>m.value.length);R(()=>{T&&$&&ue.fire("pre-chat")},[T,$,ue]),R(()=>{$&&!Zt&&ue.fire("conversation-closed")},[$,Zt,ue]),R(()=>{T&&$&&ei&&ue.fire("page-area")},[T,$,ei,ue]);let vr=Le(()=>{let u=Mt.list.flatMap(g=>g.triggers).filter(g=>g.kind==="idle").map(g=>Number(g.param));return u.length?Math.min(...u)*1e3:0},[Mt]);R(()=>{if(!vr||!_e)return;let u=setTimeout(()=>ue.fire("idle"),vr);return()=>clearTimeout(u)},[vr,_e,ue,Sd.value]);let ti=F(async(u,g)=>{if(K.info("send",{textLen:u.length,attachments:g.length,streaming:Ce}),Ce)return;n.emit("send",{text:u,attachmentCount:g.length}),lr.length>0&&tn([]);let I=await Dm(G,g,L=>{K.warn("upload failed",{err:L}),n.emit("error",L),e.onError?.(L)});se.unlock(),se.play("messageSent");let O=Js(u,I),q=xn();m.value=[...m.value,O,q],Me.attach(q),Aa(n,e,"user",u),await lt(q,{continueExisting:!1}),ue.fire("after-messages")},[Ce,G,n,e,lr.length,m,Me,lt,ue]),kd=F(()=>{K.info("stop"),n.emit("stop",void 0),Ua?.()},[Ua,n]),wd=F(()=>{if(Ce)return;let u=m.value,g=u.at(-1);if(!g||g.role!=="assistant"||g.status!=="error"&&!at(g))return;let I=xn();m.value=[...u.slice(0,-1),I],Me.attach(I),K.info("retry"),lt(I,{continueExisting:!1})},[Ce,m,Me,lt]),Cd=F(()=>{se.toggleMuted();let u=se.mutedSig.value;K.info("soundToggle",{muted:u}),n.emit("soundToggle",{muted:u})},[se,n]),ln=F(()=>{if(Wl(e.mode,he)==="exit-fullscreen"){K.info("close \u2192 exit-fullscreen",{mode:e.mode}),ye("normal"),n.emit("fullscreen",!1);return}K.info("close \u2192 panel closed",{mode:e.mode}),ue.fire("panel-close"),Ue(!1),o.savePanelOpen(!1),n.emit("close",void 0),e.onClose?.()},[n,e,o,he,ue]),Gn=F(()=>{let u=te()?f.value:void 0;y.value=[...mr.current].some(g=>g!==u)},[y,f]),Nt=F(()=>{e.modules.list.some(u=>u.layout==="chat")&&G.listConversations({limit:50}).then(u=>{mr.current=new Set(u.conversations.filter(g=>g.hasUnread).map(g=>g.conversationId)),Gn()}).catch(u=>K.debug("refreshUnread failed (non-fatal)",{err:u}))},[G,e.modules,Gn]),Kn=F(u=>{mr.current.delete(u),Gn()},[Gn]),ni=F(()=>{if(!te())return;let u=f.value;u&&(clearTimeout(pr.current),pr.current=setTimeout(()=>{Kn(u),G.markRead(u)},Nm))},[G,f,Kn]);R(()=>{ur.current=ni},[ni]);let oi=D(!1);R(()=>{!ae||!T||oi.current||(oi.current=!0,Nt())},[ae,T,Nt]),R(()=>{if(!ae)return;let u=()=>{document.visibilityState==="visible"&&Nt()};return document.addEventListener("visibilitychange",u),()=>document.removeEventListener("visibilitychange",u)},[ae,Nt]);let br=F(()=>{K.info("open",{mode:e.mode}),se.unlock(),U(!0),Ue(!0),o.savePanelOpen(!0),!be&&!we&&Xe(),setTimeout(()=>U(!1),Mm),Nt(),n.emit("open",void 0),e.onOpen?.()},[n,e,se,o,be,we,Xe,Nt]),yr=F(()=>{if(!m.value.some(g=>g.role==="user")&&Zt&&f.value){K.info("clear \u2192 reusing empty conversation",{conversationId:f.value}),m.value.length===0&&zn(Lt.current?.messages);return}K.info("clear \u2192 new conversation",{wasStreaming:Ce}),n.emit("clear",void 0),Ce&&Fn?.(),qt(()=>{m.value=[],f.value=void 0}),o.clearConversation(),en(!0),b([]),an({newConversation:!0})},[Ce,Fn,m,f,o,an,n,Zt,zn]),xr=F(()=>{yr(),Dn("chat");let u=e.modules.list.find(g=>g.layout==="chat")?.id;u&&J.switchTab(u)},[yr,J,e]),Pr=F(()=>{let u=he==="expanded"?"normal":"expanded";K.info("expand",{from:he,expanded:u==="expanded"}),ye(u),o.savePanelSize(u),n.emit("expand",u==="expanded")},[n,he,o]),Sr=F(()=>{let u=he==="fullscreen"?"normal":"fullscreen";K.info("fullscreen",{from:he,fullscreen:u==="fullscreen"}),ye(u),o.savePanelSize(u),n.emit("fullscreen",u==="fullscreen")},[n,he,o]),Td=F(()=>{Dn(u=>{let g=u==="history"?"chat":"history";return K.info("toggleHistory",{view:g}),n.emit("toggleHistory",{view:g}),g})},[n]),Ed=F(u=>{K.info("localeChange",{locale:u}),c(u),Ye({locale:u}),n.emit("localeChange",u)},[Ye,n]),Rd=F(u=>{K.info("themeChange",{mode:u}),p(u),t.dataset.theme=u,Ye({themeMode:u}),n.emit("themeChange",u)},[t,Ye,n]),Ad=F(u=>{K.info("textSizeChange",{size:u}),d(u),t.dataset.textSize=u,Ye({textSize:u}),n.emit("textSizeChange",u)},[t,Ye,n]),Id=F(()=>{fd(u=>{let g=!u;return K.info("sidebarToggle",{collapsed:g}),o.saveSidebarCollapsed(g),n.emit("sidebarToggle",{collapsed:g}),g})},[o,n]),Ld=F(u=>{K.info("resize",u),Ye({widgetSize:u}),n.emit("resize",u)},[Ye,n]),kr=F(async u=>{K.info("selectConversation",{conversationId:u,wasStreaming:Ce}),n.emit("selectConversation",{conversationId:u}),Ce&&Fn?.();try{let[g,I]=await Promise.all([G.loadConversation(u),Un(u)]),O=aa(g.messages);qt(()=>{m.value=rn(O,I),f.value=g.conversationId}),b(I),o.saveConversationId(g.conversationId),G.primeIdentity(a,g.conversationId),g.agent&&za(g.agent),en(g.canContinue);let q=O.findLast(L=>L.role==="assistant"&&!L.ephemeral);tn(q?.suggestions??g.suggestions??[]),Dn("chat"),hr(),await G.markRead(u),Kn(u)}catch(g){n.emit("error",g),e.onError?.(g)}},[G,m,f,n,e,o,Kn,Un,rn,Ce,Fn,a,hr]),jn=D(null),ri=F(u=>{typeof u=="string"&&($?ue.fire("manual",u):jn.current=u)},[$,ue]);R(()=>{!$||!jn.current||(ue.fire("manual",jn.current),jn.current=null)},[$,ue]),R(()=>Zi(t,{open:br,close:ln,expand:Pr,fullscreen:Sr,openForm:ri}),[t,br,ln,Pr,Sr,ri]);let De=Le(()=>$r(e,s,_,h),[e,s,_,h]);Bn.current=De.strings;let Md=Le(()=>C.map(u=>{let g=Mt.list.find(I=>I.id===u.formId);return{...u,title:g?.title,form:g}}),[C,Mt]),ai={options:De,transport:G,feedback:se,bus:n,persistence:o,composerApiRef:Va,view:gt,canSend:Zt,isStreaming:Ce,loadingMessages:v,messagesSig:m,agent:cd,suggestions:lr,initialWidgetSize:l.widgetSize??null,visitorId:a,onClose:ln,onClear:yr,onExpand:Pr,onFullscreen:Sr,onSoundToggle:Cd,onToggleHistory:Td,onSelectHistoryConversation:kr,onNewConversation:xr,onLocaleChange:Ed,onThemeChange:Rd,onTextSizeChange:Ad,onWidgetSizeChange:Ld,onSend:ti,onStop:kd,onSuggestion:u=>{let g=u.text??u.label;K.info("suggestion",{text:g,autoSend:e.autoSendSuggestions}),n.emit("suggestion",{text:g}),e.autoSendSuggestions?ti(g,[]):Va.current?.fill(g)},activeForm:Pd.value?.form??null,formMarkers:Md,onFormSubmit:ue.complete,onFormSkip:ue.skip,onFormFill:u=>ue.fire("manual",u),tool:yd,onRetry:wd,onMessageFeedback:bd},Nd=u=>{kr(u);let g=z();g&&J.switchTab(g)};if(!T)return null;let cn=De.modules.list,wr=u=>{let g=Tn("close",De.mode,u);return cn.length===0?r(Yc,{strings:De.strings,onClose:g?ln:void 0}):cn.length===1&&cn[0]?.layout==="chat"?r(kc,{...ai,panelSize:u}):r(Xc,{panelProps:{...ai,panelSize:u,onClose:g?ln:void 0},enabledModules:cn,nav:J,bus:n,hasUnread:y.value,onSelectConversation:Nd,onStartNewConversation:xr,onSetPanelSize:ye})};if(e.mode==="page"){let u=I=>{kr(I.conversationId)},g=cn.some(I=>I.layout==="chat");return r("div",{class:`${or}-anchor`,children:r(Ec,{site:dd,blocks:ud,transport:G,strings:De.strings,locale:De.locale,persistence:o,visitorId:a,showConversations:g,onSelectConversation:u,onNewConversation:xr,sidebarCollapsed:md,onToggleSidebarCollapsed:Id,children:wr("fullscreen")})})}if(Se){let u=e.mode==="standalone"?"fullscreen":he;return r("div",{class:`${or}-anchor`,children:wr(u)})}let ii=e.mode==="drawer",si=!(e.mode==="modal")&&!e.launcher.hidden&&(!_e||S),li=si&&!S&&!be&&!ii?De.launcher.callout:null;return r("div",{class:`${or}-anchor`,"data-launcher-size":De.launcher.size,children:[_e||ae?r("div",{class:`${or}-surface`,hidden:!_e,children:wr(he)}):null,si?r(zl,{onToggle:br,launcher:De.launcher,strings:De.strings,leaving:S,edgeTab:ii}):null,li?r(Ul,{callout:li,launcherPosition:De.position,strings:De.strings,closeLabel:De.strings.close,onDismiss:Xe}):null]})}function Lm(e){let t=e?.url??(typeof location<"u"?location.href:void 0);if(!(!e&&!t))return{...e,...t?{url:t}:{}}}var Mm=120,Nm=300;async function Dm(e,t,n){let o=[];for(let a of t)try{let{id:i,url:l}=await e.uploadFile(a.file);o.push({id:i,name:a.name,mediaType:a.mediaType,size:a.size,url:l})}catch(i){n(i)}return o}function Aa(e,t,n,o){let a={role:n,text:o};e.emit("message",a),t.onMessage?.(a)}var Om=W.scope("error-boundary"),rr=class extends _t{constructor(){super(...arguments);j(this,"state",{crashed:!1})}componentDidCatch(n,o){Om.error("widget render crashed",{error:n,componentStack:o?.componentStack}),this.setState({crashed:!0}),this.props.onError(n,o?.componentStack)}render(){return this.state.crashed?this.props.fallback:this.props.children}};var $m="1",Fm=60,Hm=2e3,td={open:()=>{},close:()=>{},expand:e=>({on:e}),fullscreen:e=>({on:e}),send:e=>({attachments:e.attachmentCount}),message:e=>({role:e.role}),stop:()=>{},clear:()=>{},suggestion:()=>{},toggleHistory:e=>({view:e.view}),handshake:()=>{},formSubmit:e=>({formId:e.formId,skipped:e.skipped}),toolResult:()=>{},toolDecision:e=>({approved:e.approved}),messageFeedback:e=>({value:e.value??"none"}),contentView:e=>({section:e.section,tags:e.tags,count:e.count}),contentOpen:e=>({contentId:e.contentId,tags:e.tags}),contentSearch:e=>({qlen:e.queryLength,hits:e.hitCount}),contentRead:e=>({contentId:e.contentId}),contentLinkClick:e=>({contentId:e.contentId}),attach:e=>({count:e.count,bytes:e.totalBytes}),voiceStart:()=>{},voiceStop:e=>({ms:e.durationMs}),voiceCancel:()=>{},localeChange:e=>({locale:e}),themeChange:e=>({theme:e}),textSizeChange:e=>({size:e}),soundToggle:e=>({muted:e.muted}),sidebarToggle:e=>({collapsed:e.collapsed}),calloutDismiss:()=>{},error:()=>{}};function Bm(){let e=navigator;return e.globalPrivacyControl===!0||e.doNotTrack==="1"}function zm(){return location.origin+location.pathname}function Um(){try{return document.referrer?new URL(document.referrer).origin:""}catch{return""}}function nd(e,t){let n=Math.random(),o=0,a=0,i=new Set,l=(c,_)=>{let{tracking:p,publicKey:h,aiAgentDeploymentId:d,mode:f,themeMode:m}=t.getOptions();if(!p.enabled||Bm()||n>=p.sampleRate)return;let y=performance.now();if(y-o>6e4&&(o=y,a=0),++a>Fm)return;let v=new URLSearchParams;v.set("v",$m),v.set("_ev",Ht),v.set("e",c),p.token&&v.set("tk",p.token),h&&v.set("pk",h),d&&v.set("dep",d),v.set("vid",t.getVisitorId());let P=t.getConversationId();P&&v.set("cid",P),v.set("url",zm());let C=Um();C&&v.set("ref",C),v.set("sw",String(screen.width)),v.set("sh",String(screen.height)),v.set("vw",String(innerWidth)),v.set("vh",String(innerHeight)),v.set("dpr",String(devicePixelRatio)),v.set("lang",navigator.language);try{v.set("tz",Intl.DateTimeFormat().resolvedOptions().timeZone)}catch{}if(v.set("m",f),v.set("th",m),_)for(let[te,ee]of Object.entries(_))ee!==void 0&&v.set(te,String(ee));v.set("ts",String(Date.now()));let b=`${p.endpoint}?${v}`;if(b.length>Hm)return;let E=new Image(1,1);i.add(E);let z=()=>i.delete(E);E.addEventListener("load",z,{once:!0}),E.addEventListener("error",z,{once:!0}),E.src=b},s=Object.keys(td).map(c=>e.on(c,_=>l(c,td[c]?.(_))));return()=>{for(let c of s)c();i.clear()}}function ar(e){let{bus:t,host:n,appRoot:o,persistence:a,reportError:i}=e,l=e.initialRaw,s,c=ct(l),_=!0,p=()=>{c=ct(s?Fr(l,s):l)},h=()=>{ls(n,yt(c.mode));let m=a.loadUserPrefs().themeMode;cs(n,m?{...c,themeMode:m}:c),_&&(po(n,Ia(c)),_=!1)},d=()=>{h(),Ft(uo(rr,{onError:i},uo(ed,{bus:t,hostElement:n,options:c})),o)};t.on("handshake",m=>{m.config&&(m.config.storageVersion&&a.rememberStorageVersion(m.config.storageVersion),s=m.config,p(),d())});let f=nd(t,{getOptions:()=>c,getVisitorId:()=>a.getVisitorId(),getConversationId:()=>a.loadConversationId()});return{getOptions:()=>c,getUserOptions:()=>l,render:d,setUserOptions:m=>{l=m,p(),d()},patchUserOptions:m=>{l={...l,...m},p(),d()},destroy:()=>f()}}function Ia(e){if(e.mode==="standalone")return"standalone";if(e.mode==="inline")return"inline";let t=ut(e.widgetId,e.storage,e.aiAgentDeploymentId),{panelOpen:n,panelSize:o}=yn(e,Gt(),t.loadPanelOpen(),t.loadPanelSize());return So(e.mode,o,n)}var qm=W.scope("hooks"),Ma="*",La=new Set;function Na(e,t,n){let o={widgetId:e,event:t,listener:n};return La.add(o),()=>{La.delete(o)}}function Wm(e,t,n){let o=[...La];for(let a of o)if(Vm(a.widgetId,e.widgetId)&&!(a.event!==Ma&&a.event!==t))try{a.listener(e,t,n)}catch(i){qm.warn("hook listener threw",{event:t,error:i})}}function od(e,t){let n=[];for(let o of Gm)n.push(t.on(o,a=>{Wm(e,o,a)}));return()=>{for(let o of n)o()}}function Da(e){if(Array.isArray(e))for(let t of e){let n=Km(t);n&&Na(n.widgetId,n.event,n.listener)}}function Vm(e,t){return e===Ma||e===t}var Gm=["open","close","expand","fullscreen","resize","message","send","stop","clear","selectConversation","suggestion","toggleHistory","formSubmit","toolResult","toolDecision","messageFeedback","contentView","contentOpen","contentSearch","contentRead","contentLinkClick","attach","removeAttachment","voiceStart","voiceStop","voiceCancel","localeChange","themeChange","textSizeChange","soundToggle","sidebarToggle","calloutDismiss","error","handshake","visitorRebound","conversationRebound"];function Km(e){let t,n,o;if(Array.isArray(e))[t,n,o]=e;else if(e&&typeof e=="object")({widgetId:t,event:n,listener:o}=e);else return null;return typeof t!="string"||typeof n!="string"||typeof o!="function"?null:{widgetId:t,event:n,listener:o}}var st=new Map;function ir(e){e.debug!==void 0&&Zn(e.debug);let t=W.scope("mount");t.info("mount",{widgetId:e.widgetId,publicKey:e.publicKey,mode:e.presentation?.mode});let n=ct(e),o=n.widgetId,a=st.get(o);a&&(t.debug("destroy existing instance at slot",{widgetId:o}),a.destroy());let i=Ia(n),l=n.iframe?us({position:yt(n.mode)},n.position,i,n.mode,e.target??null):Bt({position:yt(n.mode),target:e.target??null});l.hostElement.dataset.widgetId=o;let s=new zt,c=ut(o,n.storage,n.aiAgentDeploymentId),_=y=>{s.emit("error",y),p.getOptions().onError?.(y)},p=ar({bus:s,host:l.hostElement,appRoot:l.appRoot,persistence:c,initialRaw:e,reportError:_});p.render();let h=l.hostElement,d=null,f=y=>{y.debug!==void 0&&Zn(y.debug),p.patchUserOptions(y)},m={widgetId:o,open:()=>mn(h,"open"),close:()=>mn(h,"close"),expand:()=>mn(h,"expand"),openForm:y=>mn(h,"openForm",y),on:(y,v)=>s.on(y,v),update:y=>{t.debug("update",{patch:y}),f(y)},setUserContext:y=>{t.debug("setUserContext",{keys:Object.keys(y)}),f({userContext:{...p.getUserOptions().userContext,...y}})},clearUserContext:()=>{t.debug("clearUserContext"),f({userContext:void 0})},setPageContext:y=>{t.debug("setPageContext",{keys:Object.keys(y)}),f({pageContext:{...p.getUserOptions().pageContext,...y}})},clearPageContext:()=>{t.debug("clearPageContext"),f({pageContext:void 0})},setDebug:y=>{Zn(y),t.info("debug level set",{level:dn()})},debugLevel:()=>dn(),onLog:y=>_n(y),destroy:()=>{t.info("destroy",{widgetId:o}),d?.(),p.destroy(),s.clear(),Ft(null,l.appRoot),l.destroy(),st.get(o)===m&&st.delete(o)}};return d=od(m,s),st.set(o,m),m}function sr(e){let t=e.widgetId??"default",n=st.get(t);return n?(n.update(e),n):ir(e)}function Oa(e){if(e!==void 0){st.get(e)?.destroy();return}let t=[...st.values()];for(let n of t)n.destroy()}function et(e="default"){return st.get(e)??null}function rd(){return[...st.values()]}function $a(e,t,n){return Na(e,t,n)}var ad=Ht;var Fa=class extends HTMLElement{constructor(){super(...arguments);j(this,"bus",new zt);j(this,"mountResult",null);j(this,"runtime",null)}static get observedAttributes(){return Hr}connectedCallback(){this.boot()}disconnectedCallback(){this.mountResult&&(this.runtime?.destroy(),this.runtime=null,Ft(null,this.mountResult.appRoot),this.bus.clear())}attributeChangedCallback(){this.isConnected&&this.boot()}boot(){let n=no(i=>this.getAttribute(i));if(this.runtime){this.runtime.setUserOptions(n);return}let o=ct(n);this.mountResult||(this.mountResult=Bt({existingHost:this,position:yt(o.mode)}));let a=ut(o.widgetId,o.storage,o.aiAgentDeploymentId);this.runtime=ar({bus:this.bus,host:this.mountResult.hostElement,appRoot:this.mountResult.appRoot,persistence:a,initialRaw:n,reportError:i=>this.bus.emit("error",i)}),this.runtime.render()}},id=!1;function Ha(){if(id||typeof customElements>"u")return;let e=x.tagName;customElements.get(e)||customElements.define(e,Fa),id=!0}typeof customElements<"u"&&Ha();var sd=W.scope("iife"),Ba={close:()=>et()?.close(),destroy:()=>Oa(),expand:()=>et()?.expand(),hook:(e,t,n)=>typeof e=="string"&&typeof t=="string"&&typeof n=="function"?$a(e,t,n):void 0,init:e=>sr(e),mount:e=>ir(e),on:(e,t)=>et()?.on(e,t),onLog:e=>_n(e),open:()=>et()?.open(),setDebug:e=>et()?.setDebug(e),update:e=>et()?.update(e)};function ld(e,...t){let n=Ba[e];if(!n){sd.warn("unknown command",{command:e});return}return n(...t)}function jm(){let e=((n,...o)=>ld(n,...o));e.init=sr,e.mount=ir,e.destroy=Oa,e.getInstance=et,e.getAllInstances=rd,e.version=ad,e.hook=$a,e.debugLevel=()=>dn(),e.onLog=_n;let t=new Set(["init","mount","hook","onLog"]);for(let n of Object.keys(Ba)){if(t.has(n))continue;let o=Ba[n];Reflect.set(e,n,(...a)=>o(...a))}return e}function Xm(e){let t=e?.q;if(t)for(let n of t){let o=[...n],[a,...i]=o;if(typeof a=="string")try{ld(a,...i)}catch(l){sd.warn("queued command failed",{command:a,error:l})}}}function Ym(){let e=[],t=e.push.bind(e);return e.push=(...n)=>{for(let o of n)Da([o]);return t(...n)},e}function Jm(){let e=document.scripts;for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.src.includes("elements"))return n}return null}function Qm(){if(typeof window>"u"||typeof document>"u")return;let e=globalThis[x.global],t=jm();globalThis[x.global]=t,Ha();let n=`${x.global}Hooks`,o=globalThis[n];if(Da(o),globalThis[n]=Ym(),Xm(e),et())return;let a=document.currentScript??Jm(),i=Br(a?.dataset);if(!i.publicKey)return;let l=()=>{et()||sr(i)};if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",l,{once:!0});return}l()}Qm();return Bd(Zm);})();
|
|
41
|
+
`).trim(),T=!b&&e.status!=="error"&&!m.value&&oe.length>0,N=J||T;return r("div",{class:`${Ae}-bubble-row`,"data-role":e.role,"data-mid":e.serverMessageId??e.id,"data-testid":Pe(k.messageBubble,e.id),children:r("div",{class:`${Ae}-bubble-col`,children:[r("div",{class:`${Ae}-bubble`,children:[E?r(Xp,{label:t.loading}):f.map((V,w)=>r(Wp,{part:V,active:z,strings:t,showReasoning:o,showToolCalls:a,showSources:i,interactive:l&&(V.kind!=="tool"||w>C.value),superseded:s,tool:c},Kp(V))),te&&r(jp,{}),e.status==="error"&&e.errorText||m.value?r("div",{class:`${Ae}-error`,role:"alert",children:[r("span",{children:e.errorText??t.errorGeneric}),_?r("button",{type:"button",class:`${Ae}-error-retry`,onClick:_,"data-testid":k.messageRetry,children:t.errorRetry}):null]}):null]}),ee||N?r("div",{class:`${Ae}-bubble-meta`,children:[ee?r("time",{class:`${Ae}-bubble-time`,dateTime:ee.iso,title:ee.full,children:ee.short}):null,N?r("div",{class:`${Ae}-bubble-actions`,children:[J&&e.serverMessageId?r(dc,{messageId:e.serverMessageId,initial:e.feedback??null,strings:t,onFeedback:h}):null,T?r(Up,{text:oe,strings:t}):null]}):null]}):null]})})}function Up({text:e,strings:t}){let[n,o]=A(!1),a=()=>{navigator.clipboard?.writeText(e).then(()=>{o(!0),setTimeout(()=>o(!1),1500)}).catch(()=>{})},i=n?t.copied:t.copy;return r("button",{type:"button",class:`${Ae}-msg-action`,"data-active":n?"true":void 0,"aria-label":i,title:i,onClick:a,"data-testid":k.messageCopy,children:n?r(wt,{}):r(Dl,{})})}function qp(e){if(typeof e!="number"||!Number.isFinite(e))return null;try{let t=new Date(e);return{short:t.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),full:t.toLocaleString(void 0,{dateStyle:"full",timeStyle:"short"}),iso:t.toISOString()}}catch{return null}}function Wp({part:e,active:t,strings:n,showReasoning:o,showToolCalls:a,showSources:i,interactive:l,superseded:s,tool:c}){switch(e.kind){case"step-start":return null;case"text":return r(Vo,{textSig:e.textSig,doneSig:e.doneSig});case"reasoning":return o?r(Gp,{part:e,active:t,strings:n}):null;case"tool":return r(Vp,{part:e,strings:n,showToolCalls:a,interactive:l,superseded:s,tool:c});case"file":return e.mediaType.startsWith("image/")?r("img",{src:e.url,alt:"",loading:"lazy"}):r("a",{href:e.url,target:"_blank",rel:"noreferrer noopener",children:e.url});case"source":return i?r(_c,{part:e,strings:n}):null}}function Vp({part:e,strings:t,showToolCalls:n,interactive:o,superseded:a,tool:i}){let l=X(()=>e.approvalSig.value!==void 0);if(i?.humanInLoop){if(tc(e.toolName))return r(fc,{part:e,strings:t,active:o,superseded:a,onDecision:i.onDecision,onEdit:i.onEdit});if(l.value)return r(uc,{part:e,strings:t,active:o,superseded:a,onDecision:i.onDecision,onEdit:i.onEdit})}return n?r(hc,{part:e,strings:t}):null}function Gp({part:e,active:t,strings:n}){return r("details",{class:`${Ae}-reasoning`,open:t,"data-active":t?"true":void 0,children:[r("summary",{class:`${Ae}-reasoning-summary`,children:r("span",{class:`${Ae}-reasoning-label`,children:t?n.thinking:n.thoughts})}),r("div",{class:`${Ae}-reasoning-body`,children:r(Vo,{textSig:e.textSig,doneSig:e.doneSig})})]})}function Kp(e){switch(e.kind){case"text":case"reasoning":case"step-start":return`${e.kind}:${e.id}`;case"tool":return`tool:${e.toolCallId}`;case"file":return`file:${e.url}`;case"source":return`source:${e.sourceId}`}}function jp(){return r("span",{class:`${Ae}-typing`,"aria-hidden":"true",children:[r("span",{}),r("span",{}),r("span",{})]})}function Xp({label:e}){return r("span",{class:`${Ae}-loading`,role:"status",children:[r("span",{class:`${Ae}-loading-spinner`,"aria-hidden":"true"}),r("span",{class:`${Ae}-loading-label`,children:e})]})}var At=x.cssPrefix,Ca=120,Yp=350;function bc({messagesSig:e,strings:t,responseMode:n,showReasoning:o,showToolCalls:a,showSources:i,enableMessageFeedback:l,onFeedback:s,loading:c,idle:_,tool:p,onRetry:h,form:d,formMarkers:f,onFillForm:m}){let y=D(null),v=X(()=>e.value),[P,C]=A(!1),b=D(!1),E=D(!1),z=D(!1),te=D(0),ee=()=>z.current||performance.now()-te.current<Yp,J=D(0),oe=S=>{let U=S.scrollHeight-S.clientHeight>1;S.dataset.fadeTop=U&&S.scrollTop>1?"true":"false",S.dataset.fadeBottom=U&&S.scrollHeight-S.scrollTop-S.clientHeight>1?"true":"false"},T=S=>C(S.scrollHeight-S.scrollTop-S.clientHeight>Ca*2),N=S=>{J.current=performance.now(),S.scrollTop=S.scrollHeight,oe(S)},V=(S,U)=>{N(S);let be=U,Ee=0,we=()=>{N(S),--be>0&&(Ee=requestAnimationFrame(we))};return U>0&&(Ee=requestAnimationFrame(we)),()=>cancelAnimationFrame(Ee)},w=(S,U)=>{let be,Ee,we,Xe=-1,he=()=>{be.disconnect(),Ee.disconnect(),clearTimeout(we)},ye=()=>{if(E.current||ee()||Xe>=0&&S.scrollTop<Xe-4)return he();N(S),Xe=S.scrollTop};return be=new ResizeObserver(ye),Ee=new MutationObserver(ye),ye(),be.observe(S),Ee.observe(S,{childList:!0,subtree:!0,characterData:!0}),we=setTimeout(he,U),he},$=v.value[0]?.id;xt(()=>{let S=y.current;if(S&&v.value.length!==0&&(b.current=!0,!!v.value.some(U=>U.role==="user")))return w(S,300)},[$]);let Q=D(0);R(()=>{let S=y.current,U=v.value,be=Q.current;if(Q.current=U.length,!S||!b.current)return;if(U.slice(be).some(we=>we.role==="user"))return E.current=!1,V(S,3);if(!U.some(we=>we.role==="user")||E.current||ee())return;S.scrollHeight-S.scrollTop-S.clientHeight<Ca&&N(S)},[v.value.length]);let Se=D(null);R(()=>{let S=y.current,U=v.value.at(-1),be=Se.current;if(Se.current=U?.id??null,!!S&&b.current&&!(!U||U.id!==be||U.status!=="streaming"))return E.current=!1,V(S,3)},[v.value]),R(()=>{let S=y.current;if(!S)return;let U=v.value.at(-1);if(!U||U.status!=="streaming"&&!v.value.some(we=>we.role==="user"))return;let be=()=>{if(E.current||ee())return;S.scrollHeight-S.scrollTop-S.clientHeight<Ca*2&&N(S)};if(U.status!=="streaming")return w(S,300);be();let Ee=new MutationObserver(be);return Ee.observe(S,{childList:!0,subtree:!0,characterData:!0}),()=>Ee.disconnect()},[v.value]);let ze=d?.form.id,_e=!!d&&(f??[]).some(S=>S.formId===d.form.id);xt(()=>{let S=y.current;!S||!ze||E.current||v.value.some(U=>U.role==="user")&&(_e?S.querySelector(`[data-testid="${k.formGate}"]`)?.scrollIntoView({block:"nearest"}):N(S))},[ze,_e]),R(()=>{let S=y.current;if(!S)return;let U=()=>{T(S),oe(S),performance.now()-J.current>150&&(E.current=S.scrollHeight-S.scrollTop-S.clientHeight>8)},be=()=>{E.current=!0},Ee=gt=>{gt.deltaY<0&&be()},we=0,Xe=gt=>{we=gt.touches[0]?.clientY??0,z.current=!0},he=gt=>{(gt.touches[0]?.clientY??0)>we+4&&be()},ye=()=>{z.current=!1,te.current=performance.now()},Qt=()=>{z.current=!0};return S.addEventListener("scroll",U,{passive:!0}),S.addEventListener("wheel",Ee,{passive:!0}),S.addEventListener("touchstart",Xe,{passive:!0}),S.addEventListener("touchmove",he,{passive:!0}),S.addEventListener("touchend",ye,{passive:!0}),S.addEventListener("touchcancel",ye,{passive:!0}),S.addEventListener("pointerdown",Qt,{passive:!0}),window.addEventListener("pointerup",ye,{passive:!0}),window.addEventListener("pointercancel",ye,{passive:!0}),T(S),()=>{S.removeEventListener("scroll",U),S.removeEventListener("wheel",Ee),S.removeEventListener("touchstart",Xe),S.removeEventListener("touchmove",he),S.removeEventListener("touchend",ye),S.removeEventListener("touchcancel",ye),S.removeEventListener("pointerdown",Qt),window.removeEventListener("pointerup",ye),window.removeEventListener("pointercancel",ye)}},[]);let Ue=()=>{let S=y.current;S&&(E.current=!1,N(S))},ae=[],ke="",qe=v.value.at(-1)?.id,je=[...f??[]].toSorted((S,U)=>(S.createdAt??1/0)-(U.createdAt??1/0)),Lt=S=>d&&S.formId===d.form.id?r(ma,{form:d.form,strings:t,onSubmit:d.onSubmit,onSkip:d.onSkip},`gate:${S.formId}`):r(ec,{marker:S,strings:t,onFill:!d&&m?()=>m(S.formId):void 0},S.key),Nn=S=>{for(let U=je[0];U?.createdAt!==void 0&&!(S!==void 0&&U.createdAt>S);U=je[0])je.shift(),ae.push(Lt(U))};for(let S of v.value){if(S.role==="assistant"&&S.id!==qe&&at(S))continue;Nn(S.createdAt);let U=Jp(S.createdAt);U&&U!==ke&&(ae.push(r("div",{class:`${At}-date-divider`,children:r("span",{class:`${At}-date-pill`,title:Qp(S.createdAt),children:Zp(S.createdAt,t)})},`day:${U}`)),ke=U),ae.push(r(vc,{message:S,strings:t,responseMode:n,showReasoning:o,showToolCalls:a,showSources:i,interactive:!!_&&S.id===qe,superseded:S.id!==qe,tool:p,onRetry:_&&S.id===qe?h:void 0,enableMessageFeedback:l,onFeedback:s},S.id))}for(let S of je)ae.push(Lt(S));return r("div",{class:`${At}-list-wrap`,children:[r("div",{ref:y,class:`${At}-list ${At}-list--fade`,role:"log","aria-live":"polite","aria-relevant":"additions text",children:[c&&v.value.length===0?r("div",{class:`${At}-list-loading`,role:"status",children:t.conversationLoading}):null,ae,d&&!_e?r(ma,{form:d.form,strings:t,onSubmit:d.onSubmit,onSkip:d.onSkip}):null]}),P?r("button",{type:"button",class:`${At}-jump`,onClick:Ue,"aria-label":t.scrollToBottom,title:t.scrollToBottom,"data-testid":k.scrollToBottom,children:r(Ct,{})}):null]})}function Jp(e){if(typeof e!="number"||!Number.isFinite(e))return"";let t=new Date(e);return`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`}function Qp(e){if(typeof e!="number"||!Number.isFinite(e))return"";try{return new Date(e).toLocaleDateString(void 0,{dateStyle:"full"})}catch{return""}}function Zp(e,t){let n=new Date(e),o=i=>new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime(),a=Math.round((o(new Date)-o(n))/864e5);return a<=0?t.dateToday:a===1?t.dateYesterday:a<7?n.toLocaleDateString(void 0,{weekday:"long"}):n.toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"})}var em=["today","yesterday","lastWeek","older"];function tm(e,t){let n=Date.parse(t);if(!Number.isFinite(n))return"older";let o=Math.floor((yc(e)-yc(n))/(1440*60*1e3));return o<=0?"today":o===1?"yesterday":o<7?"lastWeek":"older"}function xc(e,t){let n=new Map;for(let o of t){let a=tm(e,o.lastMessageAt),i=n.get(a);i?i.push(o):n.set(a,[o])}return em.filter(o=>n.has(o)).map(o=>({bucket:o,conversations:n.get(o)}))}function yc(e){let t=new Date(e);return t.setUTCHours(0,0,0,0),t.getTime()}var nm=W.scope("history"),om=3,rm=6,am={today:"dateToday",yesterday:"dateYesterday",lastWeek:"dateLastWeek",older:"dateOlder"};function im(e,t,n){let o=Date.parse(e);return Number.isFinite(o)?new Date(o).toDateString()===new Date(t).toDateString()?new Intl.DateTimeFormat(n,{hour:"numeric",minute:"2-digit"}).format(o):t-o<10080*60*1e3?new Intl.DateTimeFormat(n,{weekday:"short"}).format(o):new Intl.DateTimeFormat(n,{month:"short",day:"numeric"}).format(o):""}function Jo({transport:e,strings:t,locale:n,persistence:o,visitorId:a,onSelect:i,onNewConversation:l}){let s=x.cssPrefix,c=e.peekConversations({visitorId:a}),[_,p]=A(c?"loaded":"loading"),[h,d]=A(c?.conversations??[]);R(()=>{let v=!1;return e.listConversations({visitorId:a}).then(P=>{if(v)return;let C=P.conversations??[];d(C),p("loaded"),o.saveHistoryCount(C.length)}).catch(P=>{v||(nm.warn("listConversations failed",{err:P}),p("error"))}),()=>{v=!0}},[e,a,o]);let f=l?r("div",{class:`${s}-history-footer`,children:r("button",{type:"button",class:`${s}-history-new`,onClick:l,"data-testid":k.sidebarNewConversation,children:[r(ll,{}),t.newConversation]})}):null;if(_==="loading"){let v=Math.min(o.loadHistoryCount()??om,rm);return r(ie,{children:[r("div",{class:`${s}-history`,"aria-busy":"true","aria-label":t.historyLoading,children:r("div",{class:`${s}-history-group`,"aria-hidden":"true",children:[r("div",{class:`${s}-history-heading`,children:r("span",{class:`${s}-skeleton ${s}-skeleton-heading`})}),r("div",{class:`${s}-history-card`,children:Array.from({length:Math.max(1,v)},(P,C)=>r("div",{class:`${s}-history-item ${s}-history-item-skeleton`,children:[r("span",{class:`${s}-history-avatar ${s}-skeleton`}),r("span",{class:`${s}-history-body`,children:[r("span",{class:`${s}-history-row`,children:[r("span",{class:`${s}-history-title`,children:r("span",{class:`${s}-skeleton ${s}-skeleton-title`})}),r("span",{class:`${s}-history-time`,children:r("span",{class:`${s}-skeleton ${s}-skeleton-time`})})]}),r("span",{class:`${s}-history-row`,children:r("span",{class:`${s}-history-preview`,children:r("span",{class:`${s}-skeleton ${s}-skeleton-preview`})})})]})]},C))})]})}),f]})}if(_==="error"||h.length===0)return r(ie,{children:[r("div",{class:`${s}-history-empty`,children:t.historyEmpty}),f]});let m=Date.now(),y=xc(m,h);return r(ie,{children:[r("div",{class:`${s}-history`,role:"list",children:y.map(v=>r("div",{class:`${s}-history-group`,children:[r("div",{class:`${s}-history-heading`,children:t[am[v.bucket]]}),r("div",{class:`${s}-history-card`,children:v.conversations.map(P=>r("button",{type:"button",role:"listitem",class:`${s}-history-item`,onClick:()=>i(P),"data-closed":P.canContinue?void 0:"true","data-unread":P.hasUnread?"true":void 0,"data-testid":Pe(k.historyItem,P.conversationId),children:[r("span",{class:`${s}-history-avatar`,"aria-hidden":"true",children:r(sa,{})}),r("span",{class:`${s}-history-body`,children:[r("span",{class:`${s}-history-row`,children:[r("span",{class:`${s}-history-title`,children:P.title}),r("span",{class:`${s}-history-time`,children:im(P.lastMessageAt,m,n)})]}),r("span",{class:`${s}-history-row`,children:[r("span",{class:`${s}-history-preview`,children:P.preview??(P.canContinue?t.historyContinue:t.conversationClosed)}),P.hasUnread?r("span",{class:`${s}-history-dot`}):null]})]})]},P.conversationId))})]},v.bucket))}),f]})}var Pc=x.cssPrefix;function Sc({suggestions:e,onPick:t}){return e.length===0?null:r("div",{class:`${Pc}-suggestions`,role:"group","aria-label":"Suggested replies",children:e.map((n,o)=>r("button",{type:"button",class:`${Pc}-suggestion`,onClick:()=>t(n),"data-testid":Pe(k.suggestion,o),children:n.label},n.id))})}var Ne=x.cssPrefix;function kc(e){let{options:t,onClose:n}=e,o=t.strings,a=D(null);R(()=>{let c=a.current;if(!c)return;let _=Ho(c),p=h=>{h.key==="Escape"&&n?.()};return c.addEventListener("keydown",p),()=>{_(),c.removeEventListener("keydown",p)}},[n]);let i=e.composerApiRef,l=F(c=>{i.current?.attachFromDrop(c)},[i]),{visible:s}=Uo({containerRef:a,onDrop:l});return $o(a.current,t.mode==="modal"),r("div",{ref:a,class:`${Ne}-panel`,role:"dialog","aria-modal":"false","aria-label":o.panelTitle,style:{position:"relative"},"data-testid":k.panel,children:[r(Ta,{...e,containerEl:a.current,dragOver:s,composerAttachApiRef:i}),r(Ea,{poweredBy:e.options.poweredBy})]})}function Ta(e){let{options:t,transport:n,feedback:o,bus:a,persistence:i,panelSize:l,view:s,canSend:c,isStreaming:_,loadingMessages:p,messagesSig:h,agent:d,suggestions:f,initialWidgetSize:m,visitorId:y,onClose:v,onBack:P,onClear:C,onToggleHistory:b,onSelectHistoryConversation:E,onNewConversation:z,onWidgetSizeChange:te,onSend:ee,onStop:J,onSuggestion:oe,activeForm:T,formMarkers:N,onFormSubmit:V,onFormSkip:w,onFormFill:$,tool:Q,onRetry:Se,onMessageFeedback:ze,containerEl:_e,dragOver:Ue,composerAttachApiRef:ae}=e,ke=t.strings,qe;return T?qe=null:c?qe=r(ie,{children:[!_&&r(Sc,{suggestions:f,onPick:oe}),r(jl,{options:t,transport:n,feedback:o,bus:a,isStreaming:_,onSend:ee,onStop:J,attachApiRef:ae})]}):qe=r(lm,{label:ke.conversationClosed,ctaLabel:ke.startNewConversation,onNewConversation:C}),r(ie,{children:[s==="history"?r(sm,{strings:ke,onBack:b,onClose:v,showClose:Fo(t.mode,l,t.actions)}):r("header",{class:`${Ne}-header`,"data-testid":k.panelHeader,children:[P?r("button",{type:"button",class:`${Ne}-icon-btn`,onClick:P,"aria-label":ke.moduleBack,title:ke.moduleBack,children:r(kn,{})}):null,d?r(Vl,{agent:d,strings:ke}):r("h1",{children:ke.panelTitle}),r(Qe,{panelProps:e,variant:"chat"})]}),s==="history"?r(Jo,{transport:n,strings:ke,locale:t.locale,persistence:i,visitorId:y,onSelect:je=>E(je.conversationId),onNewConversation:z}):r(ie,{children:[r(Xl,{visible:Ue,strings:ke}),r(bc,{messagesSig:h,strings:ke,responseMode:t.responseMode,showReasoning:t.showReasoning,showToolCalls:t.showToolCalls,showSources:t.showSources,enableMessageFeedback:t.enableMessageFeedback,onFeedback:ze,loading:p,idle:!_,tool:Q,onRetry:Se,form:T?{form:T,onSubmit:V,onSkip:w}:null,formMarkers:N,onFillForm:$}),qe,r(cm,{disclaimer:t.composerDisclaimer})]}),t.size.resize?.enabled?r(Oo,{panelEl:_e,resize:t.size.resize,position:t.position,initialSize:m,onSizeChange:te,strings:ke}):null]})}function sm({strings:e,onBack:t,onClose:n,showClose:o}){return r("header",{class:`${Ne}-header`,children:[r("button",{type:"button",class:`${Ne}-icon-btn`,onClick:t,"aria-label":e.historyBack,title:e.historyBack,children:r(kn,{})}),r("h1",{children:e.historyTitle}),o?r("button",{type:"button",class:`${Ne}-icon-btn`,onClick:n,"aria-label":e.close,title:e.close,children:r(Je,{})}):null]})}function lm({label:e,ctaLabel:t,onNewConversation:n}){return r("div",{class:`${Ne}-readonly-banner`,role:"note",children:[r("span",{class:`${Ne}-readonly-label`,children:e}),r("button",{type:"button",class:`${Ne}-readonly-cta`,onClick:n,children:t})]})}function cm({disclaimer:e}){return e?r("div",{class:`${Ne}-composer-footer`,children:r("div",{class:`${Ne}-disclaimer`,children:e})}):null}function Ea({poweredBy:e}){return e?r("div",{class:`${Ne}-poweredby-bar`,children:r(dm,{logoUrl:e.logoUrl,text:e.text,href:e.href})}):null}function dm({logoUrl:e,text:t,href:n}){let o=r(ie,{children:[e?r("img",{class:`${Ne}-poweredby-logo`,src:e,alt:"",loading:"lazy"}):null,t?r("span",{children:t}):null]});return n?r("a",{class:`${Ne}-poweredby`,href:n,target:"_blank",rel:"noopener noreferrer",children:o}):r("span",{class:`${Ne}-poweredby`,children:o})}function wc(e){let t=D(e);t.current=e;let n=D(null);return n.current??(n.current=_m(t)),n.current}function _m(e){let t=B(null),n=new Set,o=c=>`${e.current.conversationId()??""}:${c}`,a=c=>c.frequency==="always"?!1:c.frequency==="conversation"?n.has(o(c.id)):c.id in e.current.persistence.loadFormsDone(),i=(c,_)=>{if(t.value)return;let p=e.current;if(c==="manual"){let h=p.forms.list.find(d=>d.id===_);h&&(t.value={form:h,trigger:"manual"});return}for(let h of p.forms.byTrigger[c]??[]){let d=h.triggers.find(f=>f.kind===c);if(!(!d||!um(d,p)||a(h)||!pm(h,p))){t.value={form:h,trigger:c};return}}},l=(c,_)=>{let p=t.value;if(!p)return;t.value=null;let{form:h,trigger:d}=p;h.frequency==="conversation"?n.add(o(h.id)):h.frequency!=="always"&&e.current.persistence.saveFormDone(h.id),e.current.onComplete(h,d,c,_)};return{activeForm:t,fire:i,refresh:()=>{let c=t.value;if(!c)return;let _=e.current.forms.list.find(p=>p.id===c.form.id);_&&_!==c.form&&(t.value={form:_,trigger:c.trigger})},complete:c=>l(c,!1),skip:()=>l({},!0)}}function um(e,t){return e.kind==="after-messages"?t.messageCount()>=Number(e.param??0):e.kind==="page-area"?t.pageArea()===e.param:!0}function pm(e,t){let n=e.when;if(!n)return!0;if(n.missingContext?.length){let a=t.userContext()??{};if(n.missingContext.some(i=>a[i]!==void 0&&a[i]!==""))return!1}if(n.pageArea&&!(Array.isArray(n.pageArea)?n.pageArea:[n.pageArea]).includes(t.pageArea()??""))return!1;let o=t.messageCount();return!(n.minMessages!=null&&o<n.minMessages||n.maxMessages!=null&&o>n.maxMessages)}function Cc(e){let t=x.cssPrefix,{site:n,blocks:o,strings:a,collapsed:i}=e,l=o?.navigation??[],s=o?.linkCards??[],c=i?a.expandSidebar:a.collapseSidebar;return r("aside",{class:`${t}-sidebar`,"data-collapsed":i?"true":"false","data-testid":k.sidebar,children:[r("div",{class:`${t}-sidebar-header`,children:[r(mm,{site:n}),r("button",{type:"button",class:`${t}-sidebar-toggle`,"aria-label":c,"aria-expanded":i?"false":"true",title:c,onClick:e.onToggleCollapsed,"data-testid":k.sidebarToggle,children:r(fm,{collapsed:i})})]}),i?null:r(ie,{children:[l.length>0?r("nav",{class:`${t}-sidebar-section`,"data-section":"navigation",children:r(gm,{items:l})}):null,s.length>0?r("div",{class:`${t}-sidebar-section`,"data-section":"link-cards",children:r(hm,{items:s})}):null,e.showConversations?r("div",{class:`${t}-sidebar-conversations`,children:r(Jo,{transport:e.transport,strings:e.strings,locale:e.locale,persistence:e.persistence,visitorId:e.visitorId,onSelect:e.onSelectConversation,onNewConversation:e.onNewConversation})}):null]})]})}function mm({site:e}){let t=x.cssPrefix;if(e?.logo?.url){let n=e.logo.alt??e.title??"Logo";return r("picture",{children:[e.logoDark?.url?r("source",{srcset:e.logoDark.url,media:"(prefers-color-scheme: dark)"}):null,r("img",{class:`${t}-sidebar-logo`,src:e.logo.url,alt:n})]})}return r("div",{class:`${t}-sidebar-title`,children:e?.title??x.name})}function fm({collapsed:e}){return r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",children:e?r("polyline",{points:"9 6 15 12 9 18"}):r("polyline",{points:"15 6 9 12 15 18"})})}function gm({items:e}){let t=x.cssPrefix;return r("ul",{class:`${t}-sidebar-nav`,children:e.map(n=>r("li",{children:r("a",{class:`${t}-sidebar-nav-item`,href:n.href,target:n.href?"_blank":void 0,rel:n.href?"noreferrer":void 0,children:[n.icon?r("span",{class:`${t}-sidebar-nav-icon`,"data-icon":n.icon}):null,r("span",{class:`${t}-sidebar-nav-label`,children:n.label})]})},n.id??n.label))})}function hm({items:e}){let t=x.cssPrefix;return r("div",{class:`${t}-sidebar-cards`,children:e.map(n=>r("a",{class:`${t}-sidebar-card`,href:n.href,target:n.href?"_blank":void 0,rel:n.href?"noreferrer":void 0,children:[r("div",{class:`${t}-sidebar-card-label`,children:n.label}),n.description?r("div",{class:`${t}-sidebar-card-desc`,children:n.description}):null]},n.id??n.label))})}var Tc=x.cssPrefix;function Ec(e){return r("main",{class:`${Tc}-page-shell`,"data-sidebar-collapsed":e.sidebarCollapsed?"true":"false",children:[r(Cc,{site:e.site,blocks:e.blocks,transport:e.transport,strings:e.strings,locale:e.locale,persistence:e.persistence,visitorId:e.visitorId,showConversations:e.showConversations,onSelectConversation:e.onSelectConversation,onNewConversation:e.onNewConversation,collapsed:e.sidebarCollapsed,onToggleCollapsed:e.onToggleSidebarCollapsed}),r("section",{class:`${Tc}-page-chat`,"aria-label":"Chat",children:e.children})]})}var Rc=e=>Object.fromEntries(e.map(t=>[t,[]]));function Ac(e,t,n){let o=B({activeTab:e,stacks:Rc(t)});return{sig:o,switchTab(a){o.value.activeTab!==a&&(o.value={...o.value,activeTab:a},n?.(a))},push(a){let i=o.value,l=i.stacks[i.activeTab]??[];o.value={...i,stacks:{...i.stacks,[i.activeTab]:[...l,a]}}},pop(){let a=o.value,i=a.stacks[a.activeTab]??[];i.length!==0&&(o.value={...a,stacks:{...a.stacks,[a.activeTab]:i.slice(0,-1)}})},reset(a){o.value={activeTab:a,stacks:Rc(t)}}}}var Ic=e=>e.stacks[e.activeTab]??[],Lc=e=>Ic(e).at(-1),Mc=e=>Ic(e).length===0;var Nc={Icon:Cn};var mt=x.cssPrefix;function Qo({title:e,actions:t}){return r("header",{class:`${mt}-back-header`,"data-variant":"title",children:[r("span",{class:`${mt}-back-spacer`,"aria-hidden":"true"}),r("h1",{class:`${mt}-back-title`,children:e}),t??r("span",{class:`${mt}-back-spacer`,"aria-hidden":"true"})]})}function Zo({title:e,backLabel:t,onBack:n,actions:o,testid:a}){return r("header",{class:`${mt}-back-header`,"data-testid":a,children:[r("button",{type:"button",class:`${mt}-icon-btn`,onClick:n,"aria-label":t,title:t,children:r(kn,{})}),r("h1",{class:`${mt}-back-title`,children:e}),o??r("span",{class:`${mt}-back-spacer`,"aria-hidden":"true"})]})}var Jt=x.cssPrefix;function Dc({placeholder:e,onActivate:t}){return r("button",{type:"button",class:`${Jt}-home-search`,onClick:t,"data-testid":k.homeSearch,children:[r("span",{class:`${Jt}-home-search-text`,children:e}),r("span",{class:`${Jt}-home-search-icon`,"aria-hidden":"true",children:r(la,{})})]})}function Oc({placeholder:e,value:t,onInput:n}){return r("div",{class:`${Jt}-home-search`,"data-input":"true",children:[r("input",{type:"search",class:`${Jt}-home-search-input`,placeholder:e,value:t,onInput:o=>n(o.currentTarget.value),"data-testid":k.helpSearch}),r("span",{class:`${Jt}-home-search-icon`,"aria-hidden":"true",children:r(la,{})})]})}var An=x.cssPrefix;function er({title:e,subtitle:t,onClick:n,testid:o}){return r("button",{type:"button",class:`${An}-list-row`,onClick:n,"data-testid":o,children:[r("span",{class:`${An}-list-row-body`,children:[r("span",{class:`${An}-list-row-title`,children:e}),t?r("span",{class:`${An}-list-row-sub`,children:t}):null]}),r("span",{class:`${An}-list-row-chevron`,"aria-hidden":"true",children:r(Kt,{})})]})}var $c=x.cssPrefix;function Ke({tone:e="info",message:t,onRetry:n,strings:o}){return r("div",{class:`${$c}-module-empty`,role:e==="error"?"alert":"status","aria-live":"polite",children:[r("span",{children:t}),n?r("button",{type:"button",class:`${$c}-module-retry`,onClick:n,children:o.errorRetry}):null]})}var It=x.cssPrefix,vm=W.scope("help"),bm=(e,t)=>t.url?e.push({kind:"iframe",url:t.url,title:t.title}):e.push({kind:"content",id:t.id,title:t.title});function ym(e){let t=new Map;for(let n of e){let o=n.categories?.[0]??"";(t.get(o)??t.set(o,[]).get(o)).push(n)}return[...t.entries()]}function Fc(e,t){let n=t.toLowerCase(),o=n.indexOf(e);if(o!==-1)return 100-Math.min(o,99);let a=0;for(let i of e){if(a=n.indexOf(i,a),a===-1)return 0;a+=1}return 1}function xm(e,t){let n=t.toLowerCase().trim();return n?e.map(o=>({item:o,score:Math.max(Fc(n,o.title)*2,Fc(n,o.description??""))})).filter(o=>o.score>0).toSorted((o,a)=>a.score-o.score).map(o=>o.item):[]}function Hc({article:e,nav:t}){return r(er,{title:e.title,subtitle:e.description,onClick:()=>bm(t,e),testid:Pe(k.helpArticle,e.id)})}function Pm({transport:e,strings:t,config:n,nav:o,bus:a,panelProps:i}){let l=n.contentTags,[s,c]=A("loading"),[_,p]=A(t.errorGeneric),[h,d]=A([]),[f,m]=A(""),[y,v]=A(0);R(()=>{let b=!1;return c("loading"),e.listContent({tags:l,sortBy:"order",limit:100}).then(E=>{if(b)return;let z=E.items??[];d(z),c("loaded"),a.emit("contentView",{section:"help",tags:l?.join(","),count:z.length})}).catch(E=>{b||(vm.warn("listContent (help) failed",{err:E}),p(kt(E,t)),c("error"))}),()=>{b=!0}},[e,l,y,a]);let P=Le(()=>xm(h,f),[h,f]);R(()=>{let b=f.trim();if(!b)return;let E=setTimeout(()=>a.emit("contentSearch",{queryLength:b.length,hitCount:P.length}),600);return()=>clearTimeout(E)},[f,P,a]);function C(){return f.trim().length>0?P.length===0?r(Ke,{message:t.helpSearchEmpty,strings:t}):r("div",{class:`${It}-help-card`,children:P.map(b=>r(Hc,{article:b,nav:o},b.id))}):s==="loading"?r(Ke,{message:t.helpLoading,strings:t}):s==="error"?r(Ke,{tone:"error",message:_,onRetry:()=>v(b=>b+1),strings:t}):h.length===0?r(Ke,{message:t.helpEmpty,strings:t}):ym(h).map(([b,E])=>r("section",{class:`${It}-help-group`,children:[b?r("h2",{class:`${It}-help-section-title`,children:b}):null,r("div",{class:`${It}-help-card`,children:E.map(z=>r(Hc,{article:z,nav:o},z.id))})]},b))}return r("div",{class:`${It}-module`,children:[r(Qo,{title:t.helpTitle,actions:r(Qe,{panelProps:i,variant:"plain"})}),r("div",{class:`${It}-module-pad`,children:r(Oc,{placeholder:t.helpSearchPlaceholder,value:f,onInput:m})}),r("div",{class:`${It}-help-list`,children:C()})]})}var Bc={Icon:wn,Root:e=>r(Pm,{...e})};var zc=x.cssPrefix;function Ra({onClick:e,children:t,testid:n}){return e?r("button",{type:"button",class:`${zc}-home-card`,"data-interactive":"true",onClick:e,"data-testid":n,children:t}):r("div",{class:`${zc}-home-card`,"data-testid":n,children:t})}var ce=x.cssPrefix,Uc=W.scope("home");function Sm(e){let t=e.options.userContext?.name,n=e.config.greetingText?Ie(e.strings,e.config.greetingText):void 0;return n?{title:t?n.replace("{name}",t):n.replace(/\s*\{name\}\s*/," ").trim(),subtitle:e.strings.homeGreetingLead}:t?{title:e.strings.homeGreetingNamed.replace("{name}",t),subtitle:e.strings.homeGreetingLead}:{title:e.strings.homeGreeting}}var km=(e,t)=>t.url?e.push({kind:"iframe",url:t.url,title:t.title}):e.push({kind:"content",id:t.id,title:t.title});function wm(e){let{transport:t,strings:n,config:o,nav:a,bus:i,panelProps:l}=e,[s,c]=A(null),[_,p]=A([]),h=o.contentTags?.join(",");R(()=>{if(o.showRecentConversations===!1)return;let P=!1;return t.listConversations({limit:1}).then(C=>!P&&c(C.conversations?.[0]??null)).catch(C=>!P&&Uc.warn("listConversations (home) failed",{err:C})),()=>{P=!0}},[t,o.showRecentConversations]),R(()=>{if(!o.contentTags?.length)return;let P=!1;return t.listContent({tags:o.contentTags,limit:6}).then(C=>{if(P)return;let b=C.items??[];p(b),i.emit("contentView",{section:"home",tags:h,count:b.length})}).catch(C=>!P&&Uc.warn("listContent (home) failed",{err:C})),()=>{P=!0}},[t,h,i]);let d=Sm(e),f=o.userAvatars??[],m=o.status,y=m?.text?Ie(n,m.text):n.homeStatus,v=o.contentBlockTitle?Ie(n,o.contentBlockTitle):n.homeContentTitle;return r("div",{class:`${ce}-module ${ce}-home`,"data-testid":k.homeView,children:r("div",{class:`${ce}-home-scroll`,children:[r("div",{class:`${ce}-home-hero`,children:[r("div",{class:`${ce}-home-hero-top`,children:[o.brandName?r("span",{class:`${ce}-home-brand`,"data-testid":k.homeBrand,children:o.brandName}):r("span",{class:`${ce}-home-brand-spacer`,"aria-hidden":"true"}),r("div",{class:`${ce}-home-hero-actions`,children:[f.length>0?r("div",{class:`${ce}-home-avatars`,children:f.map(P=>r("span",{class:`${ce}-home-avatar`,title:P.role?`${P.name} \xB7 ${P.role}`:P.name,children:P.avatar?r("img",{src:P.avatar,alt:"",loading:"lazy"}):r("span",{children:Bo(P.name)})},P.name))}):null,r(Qe,{panelProps:l,variant:"plain"})]})]}),o.showGreeting!==!1?r(ie,{children:[r("h1",{class:`${ce}-home-greeting`,"data-testid":k.homeGreeting,children:d.title}),d.subtitle?r("p",{class:`${ce}-home-lead`,children:d.subtitle}):null]}):null]}),r("div",{class:`${ce}-home-cards`,children:[o.showSearchBar!==!1?r(Dc,{placeholder:n.homeSearchPlaceholder,onActivate:()=>a.switchToLayout("help")}):null,s?r(Ra,{onClick:()=>a.selectConversation(s.conversationId),testid:k.homeRecent,children:r("div",{class:`${ce}-home-recent-row`,"data-unread":s.hasUnread?"true":void 0,children:[r("span",{class:`${ce}-home-recent-avatar`,"aria-hidden":"true",children:r(Cn,{})}),r("span",{class:`${ce}-home-recent-body`,children:[r("span",{class:`${ce}-home-recent-title`,children:s.title}),s.preview?r("span",{class:`${ce}-home-recent-preview`,children:s.preview}):null]}),s.hasUnread?r("span",{class:`${ce}-home-recent-dot`,"aria-label":"Unread"}):null]})}):null,m?r(Ra,{onClick:m.url?()=>a.push({kind:"iframe",url:m.url,title:y}):void 0,children:r("div",{class:`${ce}-home-status`,"data-level":m.level??"operational",children:[r("span",{class:`${ce}-home-status-icon`,"aria-hidden":"true",children:r(Rl,{})}),r("span",{class:`${ce}-home-status-text`,children:y})]})}):null,_.length>0?r("section",{class:`${ce}-home-content`,children:[r("div",{class:`${ce}-home-content-title`,children:v}),r("div",{class:`${ce}-home-content-list`,children:_.map(P=>r(er,{title:P.title,subtitle:P.description,onClick:()=>km(a,P),testid:Pe(k.homeContentRow,P.id)},P.id))})]}):null]})]})})}var qc={Icon:Al,Root:e=>r(wm,{...e})};var ft=x.cssPrefix,Cm=W.scope("news");function Tm({transport:e,strings:t,config:n,nav:o,bus:a,panelProps:i}){let l=n.contentTags,[s,c]=A("loading"),[_,p]=A(t.errorGeneric),[h,d]=A([]),[f,m]=A(0);R(()=>{let v=!1;return c("loading"),e.listContent({tags:l,sortBy:"publishedAt",sortOrder:"desc"}).then(P=>{if(v)return;let C=P.items??[];d(C),c("loaded"),a.emit("contentView",{section:"news",tags:l?.join(","),count:C.length})}).catch(P=>{v||(Cm.warn("listContent (news) failed",{err:P}),p(kt(P,t)),c("error"))}),()=>{v=!0}},[e,l,f,a]);function y(){return s==="loading"?r(Ke,{message:t.newsLoading,strings:t}):s==="error"?r(Ke,{tone:"error",message:_,onRetry:()=>m(v=>v+1),strings:t}):h.length===0?r(Ke,{message:t.newsEmpty,strings:t}):r("div",{class:`${ft}-news-list`,children:h.map(v=>r("button",{type:"button",class:`${ft}-news-card`,onClick:()=>o.push({kind:"content",id:v.id,title:v.title}),"data-testid":Pe(k.newsItem,v.id),children:[v.image?r("img",{class:`${ft}-news-hero`,src:v.image,alt:"",loading:"lazy"}):null,r("span",{class:`${ft}-news-body`,children:[r("span",{class:`${ft}-news-title`,children:v.title}),v.description?r("span",{class:`${ft}-news-summary`,children:v.description}):null]})]},v.id))})}return r("div",{class:`${ft}-module`,children:[r(Qo,{title:t.newsTitle,actions:r(Qe,{panelProps:i,variant:"plain"})}),r("div",{class:`${ft}-module-scroll`,children:y()})]})}var Wc={Icon:Il,Root:e=>r(Tm,{...e})};var tr={chat:Nc,home:qc,help:Bc,news:Wc};var In=x.cssPrefix;function Vc({modules:e,activeTab:t,strings:n,hasUnread:o,onSelect:a}){return r("nav",{class:`${In}-tabbar`,role:"tablist","aria-label":n.panelTitle,children:e.map(i=>{let l=tr[i.layout].Icon,s=i.id===t,c=i.layout==="chat"&&o;return r("button",{type:"button",role:"tab","aria-selected":s,class:`${In}-tab`,onClick:()=>a(i.id),"data-testid":Pe(k.tab,i.id),children:[r("span",{class:`${In}-tab-icon`,"aria-hidden":"true",children:[r(l,{}),c?r("span",{class:`${In}-tab-badge`,"data-testid":k.tabBadge,"aria-label":"Unread"}):null]}),r("span",{class:`${In}-tab-label`,children:Ie(n,i.label)})]},i.id)})})}var Gc=x.cssPrefix,Em="allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";function Kc({url:e,title:t,strings:n,onBack:o,actions:a}){return r("div",{class:`${Gc}-module`,children:[r(Zo,{title:t||n.moduleBack,backLabel:n.moduleBack,onBack:o,actions:a}),r("iframe",{class:`${Gc}-content-frame`,src:e,title:t||"content",sandbox:Em,referrerpolicy:"no-referrer",loading:"lazy",allow:"fullscreen"})]})}var Ln=x.cssPrefix,Rm=W.scope("content"),Am=5e3;function jc({id:e,title:t,transport:n,strings:o,bus:a,onBack:i,actions:l}){let[s,c]=A(null),[_,p]=A(!1),[h,d]=A(0),f=F(()=>{p(!1),c(null),d(v=>v+1)},[]);R(()=>{let v=!1;return n.listContent({ids:[e],limit:1}).then(P=>{if(v)return;let C=P.items[0];C?(c(C),a.emit("contentOpen",{contentId:e,tags:C.tags?.length?C.tags.join(","):void 0})):p(!0)}).catch(P=>{v||(Rm.warn("listContent (reader) failed",{err:P}),p(!0))}),()=>{v=!0}},[n,e,h,a]),R(()=>{if(!s)return;let v=setTimeout(()=>a.emit("contentRead",{contentId:e}),Am);return()=>clearTimeout(v)},[s,e,a]);let m=F(v=>{let C=v.target?.closest?.("a")?.getAttribute("href")??"";C&&!C.startsWith("#")&&a.emit("contentLinkClick",{contentId:e})},[a,e]);function y(){return _?r(Ke,{tone:"error",message:o.errorGeneric,onRetry:f,strings:o}):s===null?r(Ke,{message:o.contentLoading,strings:o}):r("article",{class:`${Ln}-content`,"data-testid":k.contentView,onClick:m,children:[s.image?r("img",{class:`${Ln}-content-hero`,src:s.image,alt:"",loading:"lazy"}):null,s.description?r("p",{class:`${Ln}-content-subtitle`,children:s.description}):null,r(cc,{text:s.content??""})]})}return r("div",{class:`${Ln}-module`,children:[r(Zo,{title:s?.title||t||o.moduleBack,backLabel:o.moduleBack,onBack:i,actions:l,testid:k.backHeader}),r("div",{class:`${Ln}-module-scroll`,"data-testid":k.contentScroll,children:y()})]})}var nr=x.cssPrefix;function Xc({panelProps:e,enabledModules:t,nav:n,bus:o,hasUnread:a,onSelectConversation:i,onStartNewConversation:l,onSetPanelSize:s}){let c=e.options,_=c.strings,p=D(null),h=D(new Set);R(()=>{let N=p.current;if(!N)return;let V=Ho(N),w=$=>{$.key==="Escape"&&e.onClose?.()};return N.addEventListener("keydown",w),()=>{V(),N.removeEventListener("keydown",w)}},[e.onClose]);let d=e.composerApiRef,f=F(N=>{d.current?.attachFromDrop(N)},[d]),{visible:m}=Uo({containerRef:p,onDrop:f});$o(p.current,c.mode==="modal");let y=X(()=>n.sig.value).value,v=Lc(y),P=c.modules.byId[y.activeTab],C=v?.kind==="iframe"||v?.kind==="content",b=t.length>1&&(Mc(y)||!C),E=D(null);R(()=>{if(C&&E.current===null)E.current=e.panelSize,e.panelSize==="normal"&&s("expanded");else if(!C&&E.current!==null){let N=E.current;E.current=null,s(N)}},[C]);let z={push:n.push,pop:n.pop,switchTab:n.switchTab,switchToLayout:N=>{let V=t.find(w=>w.layout===N);V&&n.switchTab(V.id)},selectConversation:i,startNewConversation:l},te=N=>({options:c,transport:e.transport,strings:_,config:N,visitorId:e.visitorId,nav:z,bus:o,panelProps:e}),ee=r(Qe,{panelProps:e,variant:"plain"});P&&h.current.add(P.id);let J=t.filter(N=>h.current.has(N.id)),oe=N=>{if(N.layout==="chat")return r(Ta,{...e,containerEl:p.current,dragOver:m,composerAttachApiRef:d});let V=tr[N.layout].Root;return V?r(V,{...te(N)}):null},T=()=>v?.kind==="iframe"?r(Kc,{url:v.url,title:v.title,strings:_,onBack:n.pop,actions:ee}):v?.kind==="content"?r(jc,{id:v.id,title:v.title,transport:e.transport,strings:_,bus:o,onBack:n.pop,actions:ee}):null;return r("div",{ref:p,class:`${nr}-panel ${nr}-messenger`,role:"dialog","aria-modal":"false","aria-label":_.panelTitle,style:{position:"relative"},"data-testid":k.messengerHome,children:[r("div",{class:`${nr}-messenger-body`,children:[J.map(N=>r("div",{class:`${nr}-messenger-pane`,hidden:C||N.id!==P?.id,children:oe(N)},N.id)),T()]}),b?r(Vc,{modules:t,activeTab:y.activeTab,strings:_,hasUnread:a,onSelect:n.switchTab}):null,r(Ea,{poweredBy:c.poweredBy}),c.size.resize?.enabled&&!(P?.layout==="chat"&&!v)?r(Oo,{panelEl:p.current,resize:c.size.resize,position:c.position,initialSize:e.initialWidgetSize,onSizeChange:e.onWidgetSizeChange,strings:_}):null]})}var Mn=x.cssPrefix;function Yc({strings:e,onClose:t}){return r("div",{class:`${Mn}-panel ${Mn}-modules-empty`,role:"dialog","aria-label":e.panelTitle,"data-testid":k.modulesEmpty,children:[t?r("button",{type:"button",class:`${Mn}-icon-btn ${Mn}-modules-empty-close`,onClick:t,"aria-label":e.close,title:e.close,children:r(Je,{})}):null,r("p",{class:`${Mn}-modules-empty-text`,children:e.modulesEmpty})]})}function Jc({callout:e,persistence:t}){let n=e?.text??"",o=e?.persistent??!0,[a,i]=A(()=>o?!1:t.loadCalloutDismissed(n));R(()=>{i(o?!1:t.loadCalloutDismissed(n))},[n,o,t]);let l=F(()=>{i(!0),o||t.saveCalloutDismissed(n)},[t,n,o]);return{dismissed:a,dismissCallout:l}}var K=W.scope("app"),or=x.cssPrefix;function Qc(e,t){return Qs({...e,text:Ie(t,e.text)})}function Im(e){let t=e.partsSig.value.filter(n=>n.kind==="tool");return t.length>0&&t.every(n=>{let o=n.stateSig.value;return o==="output-available"||o==="output-error"||o==="output-denied"||o==="approval-responded"})}function Zc(e){return e instanceof DOMException?e.name==="AbortError":e?.name==="AbortError"}function ed({options:e,hostElement:t,bus:n}){let[o]=A(()=>ut(e.widgetId,e.storage,e.aiAgentDeploymentId)),[a,i]=A(()=>o.getVisitorId()),l=o.loadUserPrefs(),[s,c]=A(()=>l.locale??e.locale),[_,p]=A(()=>l.themeMode??e.themeMode),[h,d]=A(()=>l.textSize??e.textSize),f=bn(o.loadConversationId()),m=bn([]),y=bn(!1),[v,P]=A(!1),[C,b]=A([]);function E(){let u=e.modules.list,g=new Set(u.map(O=>O.id)),I=o.loadActiveModule();return I&&g.has(I)?I:u[0]?.id??""}function z(){return e.modules.list.find(u=>u.layout==="chat")?.id}function te(){let u=z();return u?e.modules.list.length===1?!0:J.sig.value.activeTab===u:!1}let ee=D();if(!ee.current){let u=e.modules.list.map(g=>g.id);ee.current=Ac(E(),u,g=>o.saveActiveModule(g))}let J=ee.current,oe=D(void 0);oe.current=z();let[T,N]=A(!1),[V,w]=A(null),[$,Q]=A(!1),Se=e.mode==="standalone"||e.mode==="inline",ze=D(yn(e,Gt(),o.loadPanelOpen(),o.loadPanelSize())),[_e,Ue]=A(ze.current.panelOpen),[ae,ke]=A(ze.current.panelOpen),qe=D(ae);qe.current=ae;let je=D(!1),Lt=D(void 0);R(()=>{_e&&ke(!0)},[_e]);let Nn=D(!1),[S,U]=A(!1),{dismissed:be,dismissCallout:Ee}=Jc({callout:e.launcher.callout,persistence:o}),we=e.launcher.callout?.persistent??!0,Xe=F(()=>{K.info("calloutDismiss"),n.emit("calloutDismiss",void 0),Ee()},[n,Ee]),[he,ye]=A(ze.current.panelSize),Qt=D(!1),[gt,Dn]=A("chat"),[Zt,en]=A(!0),[Ce,On]=A(!1),[cd,za]=A(null),[lr,tn]=A([]),[Ua,$n]=A(null),[Fn,Hn]=A(null),Bn=D(e.strings),[dd,_d]=A(void 0),[ud,pd]=A(void 0),[md,fd]=A(()=>o.loadSidebarCollapsed()??!1),[cr,gd]=A({}),[G]=A(()=>new Co({agentApiBaseUrl:e.agentApiBaseUrl,dataApiBaseUrl:e.dataApiBaseUrl,auth:Fs({publicKey:e.publicKey,aiAgentDeploymentId:e.aiAgentDeploymentId,publicKeyHeader:"x-public-key"}),endpoints:e.endpoints})),[Me]=A(()=>new Ro(m)),[se]=A(()=>new Lo(e.sound,e.haptics)),Ye=F(u=>{o.patchUserPrefs(u),G.saveUserPrefs(o.loadUserPrefs()).catch(g=>{K.warn("saveUserPrefs failed",{err:g})})},[o,G]);R(()=>{l.soundMuted!==void 0&&se.setMuted(l.soundMuted)},[]),R(()=>{t.dataset.theme=_},[t,_,e]),R(()=>{t.dataset.textSize=h},[t,h,e]),R(()=>{se.update(e.sound,e.haptics)},[se,e.sound,e.haptics]),R(()=>()=>se.destroy(),[se]),R(()=>{let u=!0;return se.mutedSig.subscribe(g=>{if(u){u=!1;return}Ye({soundMuted:g})})},[se,Ye]),R(()=>{Qt.current||!e.size.initialSize||(Qt.current=!0,!o.loadPanelSize()&&ye(ta(e.mode,e.size,Gt())))},[e.mode,e.size,o]),R(()=>{if(!T||Nn.current)return;Nn.current=!0;let u=yn(e,Gt(),o.loadPanelOpen(),o.loadPanelSize());Ue(u.panelOpen),ye(u.panelSize)},[T,e,o]);let qa=D(!1),Wa=D(!1),nn=D(null),dr=D(null),_r=D(!1),Va=D(null),ur=D(null),pr=D();R(()=>()=>clearTimeout(pr.current),[]);let mr=D(new Set);R(()=>{if(!(!T||qa.current)){if(qa.current=!0,Wa.current){let u=oe.current;u&&J.switchTab(u);return}J.reset(E())}},[T]);let zn=F(u=>{!u||u.length===0||(m.value=u.map(g=>Qc(g,Bn.current)))},[m]),fr=D(null),Un=F(async u=>{try{let{formSubmissions:g}=await(u?G.bootstrap(u):fr.current??G.bootstrap()),I=new Map;return g.forEach((O,q)=>I.set(O.formId,q)),g.filter((O,q)=>!O.skipped||I.get(O.formId)===q).map((O,q)=>({key:`wire:${O.formId}:${O.createdAt??q}`,formId:O.formId,outcome:O.skipped?"skipped":"submitted",createdAt:ko(O.createdAt),values:O.values}))}catch(g){return K.debug("bootstrap failed \u2014 no form markers (non-fatal)",{err:g}),[]}},[G]),on=D(0),rn=F((u,g)=>{let I=[...u.map(L=>L.createdAt),...g.map(L=>L.createdAt)].filter(L=>L!==void 0),O=(I.length?Math.min(...I):Date.now())-1;return[...(Lt.current?.messages??[]).map(L=>{let Re=Qc(L,Bn.current);return Re.createdAt=O,Re}),...u]},[]),gr=F(async u=>{let g=on.current,I=()=>g!==on.current;P(!0);try{let[O,q]=await Promise.all([G.loadConversation(u),Un()]);if(I())return;let L=aa(O.messages??[]);b(q);let Re=nn.current?[nn.current]:[];if(L.length||Re.length){m.value=[...rn(L,q),...Re],en(O.canContinue??!0);let Oe=L.findLast(fe=>fe.role==="assistant"&&!fe.ephemeral);tn(Oe?.suggestions??O.suggestions??[])}else m.value=rn([],q);G.resumeStatus==="needs-generation"&&dr.current?.()}catch(O){if(I())return;K.warn("loadThread failed; resetting conversationId",{err:O,conversationId:u}),f.value=void 0,o.saveConversationId(void 0)}finally{I()||P(!1)}},[G,Un,m,f,o,rn]),an=F(async({newConversation:u})=>{let g=++on.current,I=()=>g!==on.current,O=f.value,q=u||!O?We():O;q!==O&&(f.value=q,o.saveConversationId(q));let L;try{L=await G.handshake({visitorId:a,conversationId:q,userPrefs:o.loadUserPrefs(),locale:s})}catch(Oe){if(I())return;n.emit("error",Oe),e.onError?.(Oe),u||N(!0);return}if(I())return;if(L.visitorId&&L.visitorId!==a&&(K.info("visitor rebound",{previous:a,current:L.visitorId,reason:L.rebind?.visitorId}),o.setVisitorId(L.visitorId),i(L.visitorId),n.emit("visitorRebound",{previous:a,current:L.visitorId,reason:L.rebind?.visitorId})),L.conversationId&&L.conversationId!==q&&(K.info("conversation rebound",{previous:q,current:L.conversationId,reason:L.rebind?.conversationId}),n.emit("conversationRebound",{previous:q,current:L.conversationId,reason:L.rebind?.conversationId})),L.agent&&za(L.agent),e.mode==="page"&&(L.site&&Os(L.site)?_d(L.site):L.site&&K.warn("invalid site config, using fallback",{site:L.site}),L.blocks&&$s(L.blocks)?pd(L.blocks):L.blocks&&K.warn("invalid blocks config, using fallback",{blocks:L.blocks})),L.userPrefs&&!u&&(o.saveUserPrefs(L.userPrefs),L.userPrefs.locale&&c(L.userPrefs.locale),L.userPrefs.soundMuted!==void 0&&se.setMuted(L.userPrefs.soundMuted),L.userPrefs.themeMode&&p(L.userPrefs.themeMode),L.userPrefs.textSize&&d(L.userPrefs.textSize)),Lt.current=L.welcome,u||n.emit("handshake",L),L.welcome?.suggestions){let Oe=Bn.current;tn(L.welcome.suggestions.map(fe=>({...fe,label:Ie(Oe,fe.label),...fe.text===void 0?{}:{text:Ie(Oe,fe.text)}})))}!u&&O&&L.conversationId===O?qe.current?gr(O):je.current=!0:(f.value=L.conversationId,o.saveConversationId(L.conversationId),zn(L.welcome?.messages)),u||N(!0)},[G,a,o,e,n,f,se,zn,gr,s]),sn=JSON.stringify(e.userContext??null),hd=JSON.stringify(e.pageContext??null),vd=JSON.stringify(cr);R(()=>{let u=Object.keys(cr).length?{...cr,...e.userContext}:e.userContext;G.setContext(u,Lm(e.pageContext))},[G,sn,hd,vd]);let $e=Ot(s,e.availableLocales,e.defaultLocale);R(()=>{G.setLocale($e)},[G,$e]),R(()=>{t.dir=_i($e)?"rtl":"ltr"},[t,$e]),R(()=>{$e!==s&&c($e)},[$e,s]);let Ga=F((u,g=[])=>tn(u.suggestions??g),[]),qn=F(u=>{if(u.type!=="data-conversation-rebind")return!1;let g=u.data?.conversationId;if(g&&g!==f.value){let I=f.value;f.value=g,o.saveConversationId(g),G.primeIdentity(void 0,g),K.info("conversation rebound (in-stream)",{previous:I,current:g}),I&&n.emit("conversationRebound",{previous:I,current:g,reason:g})}return!0},[f,o,G,n]),Ka=F(async u=>{let g=null;try{for await(let I of u.iter)if(!qn(I.chunk)){if(!g){g=xn(),nn.current=g,Me.attach(g),m.value=[...m.value,g],On(!0),$n(()=>u.cancel),Hn(()=>u.detach),Wa.current=!0;let O=oe.current;O&&J.switchTab(O),K.info("resumed in-flight reply on mount")}Me.apply(I.chunk),I.chunk.type==="finish"&&I.chunk.canContinue===!1&&en(!1)}g&&(g.status==="error"||at(g)?(g.status="error",g.errorText=e.strings.errorGeneric,se.play("error")):(g.status="complete",se.play("messageReceived"),Aa(n,e,"assistant",To(g)),Ga(g)))}catch(I){g&&(Zc(I)?Eo(g)?m.value=m.value.filter(O=>O!==g):g.status="complete":(g.status="error",g.errorText=kt(I,e.strings),se.play("error"))),K.debug("resume ended without completing",{err:I})}finally{nn.current=null,g&&(Me.detach(),On(!1),$n(null),Hn(null),m.value=[...m.value],ur.current?.())}},[Me,m,se,n,e,J,qn]),ja=D(null),hr=F(async()=>{let u=G.resumeStream();ja.current=u,await Ka(u),G.resumeStatus==="needs-generation"&&dr.current?.()},[G,Ka]);R(()=>{let u=f.value;return u&&G.primeIdentity(a,u),an({newConversation:!1}),()=>{on.current++,ja.current?.cancel()}},[]),R(()=>{ae&&(fr.current=G.bootstrap(),(async()=>{try{let u=await fr.current;w(un((u??{forms:[]}).forms,$e))}catch(u){K.debug("bootstrap failed \u2014 treating as no forms",{err:u})}finally{Q(!0)}})(),(async()=>{let u=[];if(je.current){je.current=!1;let g=f.value;g&&u.push(gr(g))}f.value&&u.push(hr()),u.length!==0&&await Promise.allSettled(u)})())},[ae]);let Wn=D(null);R(()=>{if(!ae)return;if(Wn.current===null){Wn.current=$e;return}if(Wn.current===$e)return;Wn.current=$e;let u=!1;return G.bootstrap().then(g=>{u||w(un((g??{forms:[]}).forms,$e))}).catch(g=>K.debug("forms re-localize failed \u2014 keeping current copy",{err:g})),()=>{u=!0}},[ae,$e,G]);let Xa=D(sn);R(()=>{!T||Xa.current===sn||(Xa.current=sn,an({newConversation:!1}))},[sn,T,an]),xt(()=>{po(t,So(e.mode,he,_e))},[t,_e,he,e.mode]),R(()=>{if(e.mode!=="modal"||!_e)return;let u=g=>{g.composedPath().some(q=>q instanceof HTMLElement&&q.classList.contains(`${x.cssPrefix}-panel`))||Ue(!1)};return t.addEventListener("click",u),()=>t.removeEventListener("click",u)},[t,_e,e.mode]),R(()=>{if(e.mode!=="drawer"||!_e)return;let u=g=>{g.key==="Escape"&&Ue(!1)};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[_e,e.mode]);let lt=F(async(u,{continueExisting:g})=>{let I=f.value??We();f.value||(f.value=I,o.saveConversationId(I));let O=(g?m.value:m.value.slice(0,-1)).filter(Re=>!Re.ephemeral),q=Vs({messages:O.map(Zs),conversationId:I,tools:e.features.tools,visitorId:a,userPrefs:o.loadUserPrefs()});On(!0);let L=G.sendMessage(q);$n(()=>L.cancel),Hn(()=>L.detach);try{for await(let fe of L.iter)qn(fe.chunk)||(Me.apply(fe.chunk),fe.chunk.type==="finish"&&fe.chunk.canContinue===!1&&en(!1));let Re=u.status==="error",Oe=at(u);if(Re||Oe){u.status="error",u.errorText=e.strings.errorGeneric,se.play("error");let fe=new Error(Re?"stream error chunk":"empty reply");n.emit("error",fe),e.onError?.(fe)}else u.status="complete",se.play("messageReceived"),Aa(n,e,"assistant",To(u)),Ga(u)}catch(Re){Zc(Re)?Eo(u)?m.value=m.value.filter(Oe=>Oe!==u):u.status="complete":(u.status="error",u.errorText=kt(Re,e.strings),se.play("error"),n.emit("error",Re),e.onError?.(Re))}finally{Me.detach(),On(!1),$n(null),Hn(null),m.value=[...m.value],ur.current?.()}},[G,Me,m,f,e,n,se,o,a,qn]),Ya=F(()=>{if(Ce||_r.current||nn.current||m.value.findLast(I=>!I.ephemeral)?.role!=="user")return;_r.current=!0,K.info("regenerating dangling user turn (needs-generation)");let g=xn();m.value=[...m.value,g],Me.attach(g),lt(g,{continueExisting:!1}).finally(()=>{_r.current=!1})},[Ce,m,Me,lt]);R(()=>{dr.current=Ya},[Ya]);let Vn=F((u,g)=>{if(Ce)return;let I=m.value.at(-1),O=I?.partsSig.value.find(q=>q.kind==="tool"&&q.toolCallId===u);if(!I||!O){K.warn("decideTool: tool part not found",{toolCallId:u});return}g(O),I.partsSig.value=[...I.partsSig.value],Im(I)&&(I.status="streaming",m.value=[...m.value],Me.attach(I),lt(I,{continueExisting:!0}))},[Ce,m,Me,lt]),Ja=F((u,g)=>{K.info("toolResult",{toolCallId:u}),n.emit("toolResult",{toolCallId:u}),Vn(u,I=>{I.outputSig.value=g,I.stateSig.value="output-available"})},[n,Vn]),Qa=F((u,g,I)=>{K.info("toolDecision",{toolCallId:u,approved:g}),n.emit("toolDecision",{toolCallId:u,approved:g}),Vn(u,O=>{let q=O.approvalSig.value?.id??u;O.approvalSig.value={id:q,approved:g,reason:I},O.stateSig.value="approval-responded"})},[n,Vn]),Za=F(u=>{if(Ce)return;let g=m.value.at(-1),I=g?.partsSig.value.find(q=>q.kind==="tool"&&q.toolCallId===u);if(!g||!I)return;let O=I.approvalSig.value?.id??u;I.approvalSig.value={id:O},I.stateSig.value="approval-requested",g.partsSig.value=[...g.partsSig.value]},[Ce,m]),bd=F((u,g)=>{K.info("messageFeedback",{messageId:u,value:g}),n.emit("messageFeedback",{messageId:u,value:g}),G.submitFeedback({messageId:u,value:g})},[n,G]),yd=Le(()=>({humanInLoop:e.features.humanInLoop,onResult:Ja,onDecision:Qa,onEdit:Za}),[e.features.humanInLoop,Ja,Qa,Za]),xd=()=>m.value.reduce((u,g)=>u+(g.role==="user"?1:0),0),Mt=e.forms.list.length>0?e.forms:V??e.forms,ue=wc({forms:Mt,persistence:o,userContext:()=>e.userContext,messageCount:xd,pageArea:()=>e.pageContext?.area?String(e.pageContext.area):void 0,conversationId:()=>f.value,onComplete:(u,g,I,O)=>{K.info("formSubmit",{formId:u.id,trigger:g,skipped:O}),n.emit("formSubmit",{formId:u.id,values:I,skipped:O}),b(L=>{let Oe=L.find(fe=>fe.formId===u.id&&fe.outcome==="skipped")?.createdAt??Date.now();return[...L.filter(fe=>!(fe.formId===u.id&&fe.outcome==="skipped")),{key:`local:${u.id}:${Oe}`,formId:u.id,outcome:O?"skipped":"submitted",createdAt:Oe,...O?{}:{values:I}}]});let q=f.value??We();f.value||(f.value=q,o.saveConversationId(q),G.primeIdentity(void 0,q)),!O&&u.mirrorToContext&&gd(L=>({...L,...I})),G.submitForm({formId:u.id,conversationId:q,trigger:g,values:I,skipped:O})}}),Pd=X(()=>ue.activeForm.value);R(()=>{ue.refresh()},[Mt,ue]);let ei=e.pageContext?.area?String(e.pageContext.area):void 0,Sd=X(()=>m.value.length);R(()=>{T&&$&&ue.fire("pre-chat")},[T,$,ue]),R(()=>{$&&!Zt&&ue.fire("conversation-closed")},[$,Zt,ue]),R(()=>{T&&$&&ei&&ue.fire("page-area")},[T,$,ei,ue]);let vr=Le(()=>{let u=Mt.list.flatMap(g=>g.triggers).filter(g=>g.kind==="idle").map(g=>Number(g.param));return u.length?Math.min(...u)*1e3:0},[Mt]);R(()=>{if(!vr||!_e)return;let u=setTimeout(()=>ue.fire("idle"),vr);return()=>clearTimeout(u)},[vr,_e,ue,Sd.value]);let ti=F(async(u,g)=>{if(K.info("send",{textLen:u.length,attachments:g.length,streaming:Ce}),Ce)return;n.emit("send",{text:u,attachmentCount:g.length}),lr.length>0&&tn([]);let I=await Dm(G,g,L=>{K.warn("upload failed",{err:L}),n.emit("error",L),e.onError?.(L)});se.unlock(),se.play("messageSent");let O=Js(u,I),q=xn();m.value=[...m.value,O,q],Me.attach(q),Aa(n,e,"user",u),await lt(q,{continueExisting:!1}),ue.fire("after-messages")},[Ce,G,n,e,lr.length,m,Me,lt,ue]),kd=F(()=>{K.info("stop"),n.emit("stop",void 0),Ua?.()},[Ua,n]),wd=F(()=>{if(Ce)return;let u=m.value,g=u.at(-1);if(!g||g.role!=="assistant"||g.status!=="error"&&!at(g))return;let I=xn();m.value=[...u.slice(0,-1),I],Me.attach(I),K.info("retry"),lt(I,{continueExisting:!1})},[Ce,m,Me,lt]),Cd=F(()=>{se.toggleMuted();let u=se.mutedSig.value;K.info("soundToggle",{muted:u}),n.emit("soundToggle",{muted:u})},[se,n]),ln=F(()=>{if(Wl(e.mode,he)==="exit-fullscreen"){K.info("close \u2192 exit-fullscreen",{mode:e.mode}),ye("normal"),n.emit("fullscreen",!1);return}K.info("close \u2192 panel closed",{mode:e.mode}),ue.fire("panel-close"),Ue(!1),o.savePanelOpen(!1),n.emit("close",void 0),e.onClose?.()},[n,e,o,he,ue]),Gn=F(()=>{let u=te()?f.value:void 0;y.value=[...mr.current].some(g=>g!==u)},[y,f]),Nt=F(()=>{e.modules.list.some(u=>u.layout==="chat")&&G.listConversations({limit:50}).then(u=>{mr.current=new Set(u.conversations.filter(g=>g.hasUnread).map(g=>g.conversationId)),Gn()}).catch(u=>K.debug("refreshUnread failed (non-fatal)",{err:u}))},[G,e.modules,Gn]),Kn=F(u=>{mr.current.delete(u),Gn()},[Gn]),ni=F(()=>{if(!te())return;let u=f.value;u&&(clearTimeout(pr.current),pr.current=setTimeout(()=>{Kn(u),G.markRead(u)},Nm))},[G,f,Kn]);R(()=>{ur.current=ni},[ni]);let oi=D(!1);R(()=>{!ae||!T||oi.current||(oi.current=!0,Nt())},[ae,T,Nt]),R(()=>{if(!ae)return;let u=()=>{document.visibilityState==="visible"&&Nt()};return document.addEventListener("visibilitychange",u),()=>document.removeEventListener("visibilitychange",u)},[ae,Nt]);let br=F(()=>{K.info("open",{mode:e.mode}),se.unlock(),U(!0),Ue(!0),o.savePanelOpen(!0),!be&&!we&&Xe(),setTimeout(()=>U(!1),Mm),Nt(),n.emit("open",void 0),e.onOpen?.()},[n,e,se,o,be,we,Xe,Nt]),yr=F(()=>{if(!m.value.some(g=>g.role==="user")&&Zt&&f.value){K.info("clear \u2192 reusing empty conversation",{conversationId:f.value}),m.value.length===0&&zn(Lt.current?.messages);return}K.info("clear \u2192 new conversation",{wasStreaming:Ce}),n.emit("clear",void 0),Ce&&Fn?.(),qt(()=>{m.value=[],f.value=void 0}),o.clearConversation(),en(!0),b([]),an({newConversation:!0})},[Ce,Fn,m,f,o,an,n,Zt,zn]),xr=F(()=>{yr(),Dn("chat");let u=e.modules.list.find(g=>g.layout==="chat")?.id;u&&J.switchTab(u)},[yr,J,e]),Pr=F(()=>{let u=he==="expanded"?"normal":"expanded";K.info("expand",{from:he,expanded:u==="expanded"}),ye(u),o.savePanelSize(u),n.emit("expand",u==="expanded")},[n,he,o]),Sr=F(()=>{let u=he==="fullscreen"?"normal":"fullscreen";K.info("fullscreen",{from:he,fullscreen:u==="fullscreen"}),ye(u),o.savePanelSize(u),n.emit("fullscreen",u==="fullscreen")},[n,he,o]),Td=F(()=>{Dn(u=>{let g=u==="history"?"chat":"history";return K.info("toggleHistory",{view:g}),n.emit("toggleHistory",{view:g}),g})},[n]),Ed=F(u=>{K.info("localeChange",{locale:u}),c(u),Ye({locale:u}),n.emit("localeChange",u)},[Ye,n]),Rd=F(u=>{K.info("themeChange",{mode:u}),p(u),t.dataset.theme=u,Ye({themeMode:u}),n.emit("themeChange",u)},[t,Ye,n]),Ad=F(u=>{K.info("textSizeChange",{size:u}),d(u),t.dataset.textSize=u,Ye({textSize:u}),n.emit("textSizeChange",u)},[t,Ye,n]),Id=F(()=>{fd(u=>{let g=!u;return K.info("sidebarToggle",{collapsed:g}),o.saveSidebarCollapsed(g),n.emit("sidebarToggle",{collapsed:g}),g})},[o,n]),Ld=F(u=>{K.info("resize",u),Ye({widgetSize:u}),n.emit("resize",u)},[Ye,n]),kr=F(async u=>{K.info("selectConversation",{conversationId:u,wasStreaming:Ce}),n.emit("selectConversation",{conversationId:u}),Ce&&Fn?.();try{let[g,I]=await Promise.all([G.loadConversation(u),Un(u)]),O=aa(g.messages);qt(()=>{m.value=rn(O,I),f.value=g.conversationId}),b(I),o.saveConversationId(g.conversationId),G.primeIdentity(a,g.conversationId),g.agent&&za(g.agent),en(g.canContinue);let q=O.findLast(L=>L.role==="assistant"&&!L.ephemeral);tn(q?.suggestions??g.suggestions??[]),Dn("chat"),hr(),await G.markRead(u),Kn(u)}catch(g){n.emit("error",g),e.onError?.(g)}},[G,m,f,n,e,o,Kn,Un,rn,Ce,Fn,a,hr]),jn=D(null),ri=F(u=>{typeof u=="string"&&($?ue.fire("manual",u):jn.current=u)},[$,ue]);R(()=>{!$||!jn.current||(ue.fire("manual",jn.current),jn.current=null)},[$,ue]),R(()=>Zi(t,{open:br,close:ln,expand:Pr,fullscreen:Sr,openForm:ri}),[t,br,ln,Pr,Sr,ri]);let De=Le(()=>$r(e,s,_,h),[e,s,_,h]);Bn.current=De.strings;let Md=Le(()=>C.map(u=>{let g=Mt.list.find(I=>I.id===u.formId);return{...u,title:g?.title,form:g}}),[C,Mt]),ai={options:De,transport:G,feedback:se,bus:n,persistence:o,composerApiRef:Va,view:gt,canSend:Zt,isStreaming:Ce,loadingMessages:v,messagesSig:m,agent:cd,suggestions:lr,initialWidgetSize:l.widgetSize??null,visitorId:a,onClose:ln,onClear:yr,onExpand:Pr,onFullscreen:Sr,onSoundToggle:Cd,onToggleHistory:Td,onSelectHistoryConversation:kr,onNewConversation:xr,onLocaleChange:Ed,onThemeChange:Rd,onTextSizeChange:Ad,onWidgetSizeChange:Ld,onSend:ti,onStop:kd,onSuggestion:u=>{let g=u.text??u.label;K.info("suggestion",{text:g,autoSend:e.autoSendSuggestions}),n.emit("suggestion",{text:g}),e.autoSendSuggestions?ti(g,[]):Va.current?.fill(g)},activeForm:Pd.value?.form??null,formMarkers:Md,onFormSubmit:ue.complete,onFormSkip:ue.skip,onFormFill:u=>ue.fire("manual",u),tool:yd,onRetry:wd,onMessageFeedback:bd},Nd=u=>{kr(u);let g=z();g&&J.switchTab(g)};if(!T)return null;let cn=De.modules.list,wr=u=>{let g=Tn("close",De.mode,u);return cn.length===0?r(Yc,{strings:De.strings,onClose:g?ln:void 0}):cn.length===1&&cn[0]?.layout==="chat"?r(kc,{...ai,panelSize:u}):r(Xc,{panelProps:{...ai,panelSize:u,onClose:g?ln:void 0},enabledModules:cn,nav:J,bus:n,hasUnread:y.value,onSelectConversation:Nd,onStartNewConversation:xr,onSetPanelSize:ye})};if(e.mode==="page"){let u=I=>{kr(I.conversationId)},g=cn.some(I=>I.layout==="chat");return r("div",{class:`${or}-anchor`,children:r(Ec,{site:dd,blocks:ud,transport:G,strings:De.strings,locale:De.locale,persistence:o,visitorId:a,showConversations:g,onSelectConversation:u,onNewConversation:xr,sidebarCollapsed:md,onToggleSidebarCollapsed:Id,children:wr("fullscreen")})})}if(Se){let u=e.mode==="standalone"?"fullscreen":he;return r("div",{class:`${or}-anchor`,children:wr(u)})}let ii=e.mode==="drawer",si=!(e.mode==="modal")&&!e.launcher.hidden&&(!_e||S),li=si&&!S&&!be&&!ii?De.launcher.callout:null;return r("div",{class:`${or}-anchor`,"data-launcher-size":De.launcher.size,children:[_e||ae?r("div",{class:`${or}-surface`,hidden:!_e,children:wr(he)}):null,si?r(zl,{onToggle:br,launcher:De.launcher,strings:De.strings,leaving:S,edgeTab:ii}):null,li?r(Ul,{callout:li,launcherPosition:De.position,strings:De.strings,closeLabel:De.strings.close,onDismiss:Xe}):null]})}function Lm(e){let t=e?.url??(typeof location<"u"?location.href:void 0);if(!(!e&&!t))return{...e,...t?{url:t}:{}}}var Mm=120,Nm=300;async function Dm(e,t,n){let o=[];for(let a of t)try{let{id:i,url:l}=await e.uploadFile(a.file);o.push({id:i,name:a.name,mediaType:a.mediaType,size:a.size,url:l})}catch(i){n(i)}return o}function Aa(e,t,n,o){let a={role:n,text:o};e.emit("message",a),t.onMessage?.(a)}var Om=W.scope("error-boundary"),rr=class extends _t{constructor(){super(...arguments);j(this,"state",{crashed:!1})}componentDidCatch(n,o){Om.error("widget render crashed",{error:n,componentStack:o?.componentStack}),this.setState({crashed:!0}),this.props.onError(n,o?.componentStack)}render(){return this.state.crashed?this.props.fallback:this.props.children}};var $m="1",Fm=60,Hm=2e3,td={open:()=>{},close:()=>{},expand:e=>({on:e}),fullscreen:e=>({on:e}),send:e=>({attachments:e.attachmentCount}),message:e=>({role:e.role}),stop:()=>{},clear:()=>{},suggestion:()=>{},toggleHistory:e=>({view:e.view}),handshake:()=>{},formSubmit:e=>({formId:e.formId,skipped:e.skipped}),toolResult:()=>{},toolDecision:e=>({approved:e.approved}),messageFeedback:e=>({value:e.value??"none"}),contentView:e=>({section:e.section,tags:e.tags,count:e.count}),contentOpen:e=>({contentId:e.contentId,tags:e.tags}),contentSearch:e=>({qlen:e.queryLength,hits:e.hitCount}),contentRead:e=>({contentId:e.contentId}),contentLinkClick:e=>({contentId:e.contentId}),attach:e=>({count:e.count,bytes:e.totalBytes}),voiceStart:()=>{},voiceStop:e=>({ms:e.durationMs}),voiceCancel:()=>{},localeChange:e=>({locale:e}),themeChange:e=>({theme:e}),textSizeChange:e=>({size:e}),soundToggle:e=>({muted:e.muted}),sidebarToggle:e=>({collapsed:e.collapsed}),calloutDismiss:()=>{},error:()=>{}};function Bm(){let e=navigator;return e.globalPrivacyControl===!0||e.doNotTrack==="1"}function zm(){return location.origin+location.pathname}function Um(){try{return document.referrer?new URL(document.referrer).origin:""}catch{return""}}function nd(e,t){let n=Math.random(),o=0,a=0,i=new Set,l=(c,_)=>{let{tracking:p,publicKey:h,aiAgentDeploymentId:d,mode:f,themeMode:m}=t.getOptions();if(!p.enabled||Bm()||n>=p.sampleRate)return;let y=performance.now();if(y-o>6e4&&(o=y,a=0),++a>Fm)return;let v=new URLSearchParams;v.set("v",$m),v.set("_ev",Ht),v.set("e",c),p.token&&v.set("tk",p.token),h&&v.set("pk",h),d&&v.set("dep",d),v.set("vid",t.getVisitorId());let P=t.getConversationId();P&&v.set("cid",P),v.set("url",zm());let C=Um();C&&v.set("ref",C),v.set("sw",String(screen.width)),v.set("sh",String(screen.height)),v.set("vw",String(innerWidth)),v.set("vh",String(innerHeight)),v.set("dpr",String(devicePixelRatio)),v.set("lang",navigator.language);try{v.set("tz",Intl.DateTimeFormat().resolvedOptions().timeZone)}catch{}if(v.set("m",f),v.set("th",m),_)for(let[te,ee]of Object.entries(_))ee!==void 0&&v.set(te,String(ee));v.set("ts",String(Date.now()));let b=`${p.endpoint}?${v}`;if(b.length>Hm)return;let E=new Image(1,1);i.add(E);let z=()=>i.delete(E);E.addEventListener("load",z,{once:!0}),E.addEventListener("error",z,{once:!0}),E.src=b},s=Object.keys(td).map(c=>e.on(c,_=>l(c,td[c]?.(_))));return()=>{for(let c of s)c();i.clear()}}function ar(e){let{bus:t,host:n,appRoot:o,persistence:a,reportError:i}=e,l=e.initialRaw,s,c=ct(l),_=!0,p=()=>{c=ct(s?Fr(l,s):l)},h=()=>{ls(n,yt(c.mode));let m=a.loadUserPrefs().themeMode;cs(n,m?{...c,themeMode:m}:c),_&&(po(n,Ia(c)),_=!1)},d=()=>{h(),Ft(uo(rr,{onError:i},uo(ed,{bus:t,hostElement:n,options:c})),o)};t.on("handshake",m=>{m.config&&(m.config.storageVersion&&a.rememberStorageVersion(m.config.storageVersion),s=m.config,p(),d())});let f=nd(t,{getOptions:()=>c,getVisitorId:()=>a.getVisitorId(),getConversationId:()=>a.loadConversationId()});return{getOptions:()=>c,getUserOptions:()=>l,render:d,setUserOptions:m=>{l=m,p(),d()},patchUserOptions:m=>{l={...l,...m},p(),d()},destroy:()=>f()}}function Ia(e){if(e.mode==="standalone")return"standalone";if(e.mode==="inline")return"inline";let t=ut(e.widgetId,e.storage,e.aiAgentDeploymentId),{panelOpen:n,panelSize:o}=yn(e,Gt(),t.loadPanelOpen(),t.loadPanelSize());return So(e.mode,o,n)}var qm=W.scope("hooks"),Ma="*",La=new Set;function Na(e,t,n){let o={widgetId:e,event:t,listener:n};return La.add(o),()=>{La.delete(o)}}function Wm(e,t,n){let o=[...La];for(let a of o)if(Vm(a.widgetId,e.widgetId)&&!(a.event!==Ma&&a.event!==t))try{a.listener(e,t,n)}catch(i){qm.warn("hook listener threw",{event:t,error:i})}}function od(e,t){let n=[];for(let o of Gm)n.push(t.on(o,a=>{Wm(e,o,a)}));return()=>{for(let o of n)o()}}function Da(e){if(Array.isArray(e))for(let t of e){let n=Km(t);n&&Na(n.widgetId,n.event,n.listener)}}function Vm(e,t){return e===Ma||e===t}var Gm=["open","close","expand","fullscreen","resize","message","send","stop","clear","selectConversation","suggestion","toggleHistory","formSubmit","toolResult","toolDecision","messageFeedback","contentView","contentOpen","contentSearch","contentRead","contentLinkClick","attach","removeAttachment","voiceStart","voiceStop","voiceCancel","localeChange","themeChange","textSizeChange","soundToggle","sidebarToggle","calloutDismiss","error","handshake","visitorRebound","conversationRebound"];function Km(e){let t,n,o;if(Array.isArray(e))[t,n,o]=e;else if(e&&typeof e=="object")({widgetId:t,event:n,listener:o}=e);else return null;return typeof t!="string"||typeof n!="string"||typeof o!="function"?null:{widgetId:t,event:n,listener:o}}var st=new Map;function ir(e){e.debug!==void 0&&Zn(e.debug);let t=W.scope("mount");t.info("mount",{widgetId:e.widgetId,publicKey:e.publicKey,mode:e.presentation?.mode});let n=ct(e),o=n.widgetId,a=st.get(o);a&&(t.debug("destroy existing instance at slot",{widgetId:o}),a.destroy());let i=Ia(n),l=n.iframe?us({position:yt(n.mode)},n.position,i,n.mode,e.target??null):Bt({position:yt(n.mode),target:e.target??null});l.hostElement.dataset.widgetId=o;let s=new zt,c=ut(o,n.storage,n.aiAgentDeploymentId),_=y=>{s.emit("error",y),p.getOptions().onError?.(y)},p=ar({bus:s,host:l.hostElement,appRoot:l.appRoot,persistence:c,initialRaw:e,reportError:_});p.render();let h=l.hostElement,d=null,f=y=>{y.debug!==void 0&&Zn(y.debug),p.patchUserOptions(y)},m={widgetId:o,open:()=>mn(h,"open"),close:()=>mn(h,"close"),expand:()=>mn(h,"expand"),openForm:y=>mn(h,"openForm",y),on:(y,v)=>s.on(y,v),update:y=>{t.debug("update",{patch:y}),f(y)},setUserContext:y=>{t.debug("setUserContext",{keys:Object.keys(y)}),f({userContext:{...p.getUserOptions().userContext,...y}})},clearUserContext:()=>{t.debug("clearUserContext"),f({userContext:void 0})},setPageContext:y=>{t.debug("setPageContext",{keys:Object.keys(y)}),f({pageContext:{...p.getUserOptions().pageContext,...y}})},clearPageContext:()=>{t.debug("clearPageContext"),f({pageContext:void 0})},setDebug:y=>{Zn(y),t.info("debug level set",{level:dn()})},debugLevel:()=>dn(),onLog:y=>_n(y),destroy:()=>{t.info("destroy",{widgetId:o}),d?.(),p.destroy(),s.clear(),Ft(null,l.appRoot),l.destroy(),st.get(o)===m&&st.delete(o)}};return d=od(m,s),st.set(o,m),m}function sr(e){let t=e.widgetId??"default",n=st.get(t);return n?(n.update(e),n):ir(e)}function Oa(e){if(e!==void 0){st.get(e)?.destroy();return}let t=[...st.values()];for(let n of t)n.destroy()}function et(e="default"){return st.get(e)??null}function rd(){return[...st.values()]}function $a(e,t,n){return Na(e,t,n)}var ad=Ht;var Fa=class extends HTMLElement{constructor(){super(...arguments);j(this,"bus",new zt);j(this,"mountResult",null);j(this,"runtime",null)}static get observedAttributes(){return Hr}connectedCallback(){this.boot()}disconnectedCallback(){this.mountResult&&(this.runtime?.destroy(),this.runtime=null,Ft(null,this.mountResult.appRoot),this.bus.clear())}attributeChangedCallback(){this.isConnected&&this.boot()}boot(){let n=no(i=>this.getAttribute(i));if(this.runtime){this.runtime.setUserOptions(n);return}let o=ct(n);this.mountResult||(this.mountResult=Bt({existingHost:this,position:yt(o.mode)}));let a=ut(o.widgetId,o.storage,o.aiAgentDeploymentId);this.runtime=ar({bus:this.bus,host:this.mountResult.hostElement,appRoot:this.mountResult.appRoot,persistence:a,initialRaw:n,reportError:i=>this.bus.emit("error",i)}),this.runtime.render()}},id=!1;function Ha(){if(id||typeof customElements>"u")return;let e=x.tagName;customElements.get(e)||customElements.define(e,Fa),id=!0}typeof customElements<"u"&&Ha();var sd=W.scope("iife"),Ba={close:()=>et()?.close(),destroy:()=>Oa(),expand:()=>et()?.expand(),hook:(e,t,n)=>typeof e=="string"&&typeof t=="string"&&typeof n=="function"?$a(e,t,n):void 0,init:e=>sr(e),mount:e=>ir(e),on:(e,t)=>et()?.on(e,t),onLog:e=>_n(e),open:()=>et()?.open(),setDebug:e=>et()?.setDebug(e),update:e=>et()?.update(e)};function ld(e,...t){let n=Ba[e];if(!n){sd.warn("unknown command",{command:e});return}return n(...t)}function jm(){let e=((n,...o)=>ld(n,...o));e.init=sr,e.mount=ir,e.destroy=Oa,e.getInstance=et,e.getAllInstances=rd,e.version=ad,e.hook=$a,e.debugLevel=()=>dn(),e.onLog=_n;let t=new Set(["init","mount","hook","onLog"]);for(let n of Object.keys(Ba)){if(t.has(n))continue;let o=Ba[n];Reflect.set(e,n,(...a)=>o(...a))}return e}function Xm(e){let t=e?.q;if(t)for(let n of t){let o=[...n],[a,...i]=o;if(typeof a=="string")try{ld(a,...i)}catch(l){sd.warn("queued command failed",{command:a,error:l})}}}function Ym(){let e=[],t=e.push.bind(e);return e.push=(...n)=>{for(let o of n)Da([o]);return t(...n)},e}function Jm(){let e=document.scripts;for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.src.includes("elements"))return n}return null}function Qm(){if(typeof window>"u"||typeof document>"u")return;let e=globalThis[x.global],t=jm();globalThis[x.global]=t,Ha();let n=`${x.global}Hooks`,o=globalThis[n];if(Da(o),globalThis[n]=Ym(),Xm(e),et())return;let a=document.currentScript??Jm(),i=Br(a?.dataset);if(!i.publicKey)return;let l=()=>{et()||sr(i)};if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",l,{once:!0});return}l()}Qm();return Bd(Zm);})();
|
|
42
42
|
//# sourceMappingURL=elements.js.map
|