@inkeep/agents-ui 0.15.1 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/primitives/components/embedded-chat/use-chat-action.cjs +1 -1
- package/dist/primitives/components/embedded-chat/use-chat-action.d.ts +1 -1
- package/dist/primitives/components/embedded-chat/use-chat-action.js +20 -17
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -2
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +0 -1
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +73 -66
- package/dist/primitives/components/embedded-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat.d.ts +16 -10
- package/dist/primitives/components/embedded-chat.js +419 -426
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/utils/component-ids.cjs +1 -1
- package/dist/primitives/utils/component-ids.d.ts +4 -4
- package/dist/primitives/utils/component-ids.js +2 -2
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.js +19 -13
- package/dist/styled/components/data-summary-group.cjs +1 -1
- package/dist/styled/components/data-summary-group.js +13 -13
- package/dist/styled/components/embedded-chat.cjs +1 -1
- package/dist/styled/components/embedded-chat.d.ts +3 -3
- package/dist/styled/components/embedded-chat.js +29 -29
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.js +33 -33
- package/dist/types/config/ai.d.ts +10 -3
- package/dist/types/config/settings/actions.d.ts +13 -4
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),ha=require("react-dom/client"),Z=require("react-textarea-autosize"),ua=require("@radix-ui/react-avatar"),Ca=require("@radix-ui/react-checkbox"),pa=require("@radix-ui/react-popover"),va=require("@radix-ui/react-tooltip"),ba=require("@radix-ui/react-scroll-area"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),ha=require("react-dom/client"),Z=require("react-textarea-autosize"),ua=require("@radix-ui/react-avatar"),Ca=require("@radix-ui/react-checkbox"),pa=require("@radix-ui/react-popover"),va=require("@radix-ui/react-tooltip"),ba=require("@radix-ui/react-scroll-area"),y=require("../atoms/select.cjs"),E=require("../atoms/dialog.cjs"),ga=require("../atoms/avatars/ai.cjs"),Pa=require("../atoms/avatars/user.cjs"),f=require("../atoms/icons/custom-icon.cjs"),T=require("../atoms/icons/built-in-icon-renderer.cjs"),Aa=require("../atoms/link.cjs"),Q=require("../atoms/markdown/index.cjs"),D=require("../providers/attachment-item-provider.cjs"),S=require("../providers/attachments-bar-provider.cjs"),j=require("../providers/source-item-provider.cjs"),b=require("../providers/config-provider.cjs"),ee=require("../providers/feedback-provider.cjs"),q=require("../providers/message-attachments-provider.cjs"),_=require("../providers/message-provider.cjs"),le=require("../atoms/icons/checkbox-icon.cjs"),J=require("../hooks/use-copy-to-clipboard.cjs"),V=require("../providers/feedback-item-provider.cjs"),u=require("../utils/misc.cjs"),a=require("./factory.cjs"),P=require("./embedded-chat/chat-provider.cjs"),_a=require("./tagline-logo-icon.cjs"),Ea=require("../hooks/use-settle-action.cjs"),Fa=require("../hooks/use-container-size.cjs"),te=require("./embedded-chat/use-chat-action.cjs"),X=require("../providers/help-menu-provider.cjs"),F=require("../providers/chat-form-provider.cjs"),H=require("../providers/form-field-provider.cjs"),ka=require("react-hook-form"),Ia=require("../utils/highlight-emphasis.cjs"),Ma=require("./modal/modal-provider.cjs"),fa=require("../../color-mode/index.cjs"),ie=require("../utils/compose-refs.cjs"),C=require("../utils/compose-event-handlers.cjs"),Sa=require("../hooks/use-simple-scroll.cjs"),xa=require("../hooks/use-debounce.cjs"),ae=require("../providers/hover-popover-provider.cjs"),Ba=require("./modal/widget-auto-focus.cjs"),ne=require("../providers/base-events-provider.cjs"),ya=require("../atoms/shadow/context.cjs"),Ta=require("../utils/get-source-icon.cjs");function R(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const ja=R(ha),re=R(ua),$=R(Ca),w=R(pa),L=R(va),W=R(ba),Ha="__intro__",wa=a.ikp("div",{_id:"aiChatWrapper"}),he=h.forwardRef((t,e)=>{const{...i}=t,{isHidden:r,isMobile:s}=P.useChat(),[o,d]=Fa.useContainerSize(),c=ie.useComposedRefs(e,o),m=d?.width?d.width>580:!0,l=Ma.useModal();return n.jsx(wa,{ref:c,"data-widget-md":u.dataAttr(m),"data-hidden":u.dataAttr(r),"data-in-modal":u.dataAttr(!!l),"data-mobile":u.dataAttr(s),...i})}),La=a.ikp("div",{_id:"aiChatRoot"}),ue=t=>{const{isHidden:e}=P.useChat(),{form:i}=F.useChatForm();return i?null:n.jsx(La,{"data-hidden":u.dataAttr(e),...t})},Da=a.ikp("div",{_id:"aiChatHeader"}),Ce=a.ikp("div",{_id:"aiChatHeader__Toolbar"}),pe=a.ikp("div",{_id:"aiChatHeader__ToolbarHeaderWrapper"}),Ra=a.ikp("div",{_id:"aiChatHeader__ToolbarHeader"}),ve=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=`Ask ${e.aiAssistantName||"AI"}`;return n.jsx(Ra,{...t,children:i})}),be=a.ikp("div",{_id:"aiChatContent"}),ge=a.ikp(W.Root,{_id:"aiChatContentScrollArea"}),Oa=a.ikp(W.Viewport,{_id:"aiChatContentScrollArea__Viewport"}),Pe=h.forwardRef(({children:t,...e},i)=>{const{containerRef:r,scrollToBottom:s}=Sa.useSimpleScroll(),o=ie.useComposedRefs(i,r),{messages:d}=P.useChat();return h.useEffect(()=>{d.length>0&&s()},[d.length,s]),n.jsx(Oa,{ref:o,children:n.jsx("div",{"data-part":"grid",style:{display:"grid"},children:t}),...e})}),Ae=a.ikp(W.ScrollAreaScrollbar,{_id:"aiChatContentScrollArea__Scrollbar"}),_e=a.ikp(W.ScrollAreaThumb,{_id:"aiChatContentScrollArea__Thumb"}),Ee=a.ikp(W.Corner,{_id:"aiChatContentScrollArea__Corner"}),qa=a.ikp("div",{_id:"aiChatMessages"}),Fe=t=>{const e=P.useChat(),{children:i,...r}=t;return n.jsx(qa,{children:u.maybeRender(i,e),...r})},Wa=a.ikp("div",{_id:"aiChatDisclaimer"}),ke=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),[i,r]=h.useState(!1),s=xa.useDebounce(i,100);return e.disclaimerSettings?.isEnabled?n.jsx(ae.HoverPopoverProvider,{open:i,setOpen:r,children:n.jsx(w.Root,{open:s,onOpenChange:r,children:n.jsx(Wa,{...t})})}):null}),Na=a.ikp("span",{_id:"aiChatDisclaimerLabel"}),Ie=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=e.disclaimerSettings;return n.jsx(Na,{children:i?.label,...t})}),Qa=a.ikp(w.Trigger,{_id:"aiChatDisclaimerTrigger",children:n.jsx(f.CustomIcon,{iconKey:"info"})}),Me=h.memo(t=>{const{setOpen:e}=ae.useHoverPopover(),i=()=>e(!0),r=()=>e(!1);return n.jsx(Qa,{onMouseEnter:i,onMouseLeave:r,...t})}),Va=a.ikp(w.Content,{_id:"aiChatDisclaimerContent"}),fe=t=>{const{setOpen:e}=ae.useHoverPopover(),i=()=>e(!0),r=()=>e(!1);return n.jsx(Va,{onMouseEnter:i,onMouseLeave:r,side:"top",sideOffset:8,align:"end",alignOffset:-10,...t})},$a=a.ikp(Q.Markdown,{_id:"aiChatDisclaimerText"}),Se=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=e.aiAssistantName,s=e.disclaimerSettings?.tooltip||`Information provided by ${i||"this AI assistant"} is not guaranteed to be accurate or comprehensive.`;return n.jsx($a,{shouldOpenLinksInNewTab:!0,children:s,...t})}),xe=a.ikp(w.Arrow,{_id:"aiChatDisclaimerArrow"}),Ua=a.ikp("div",{_id:"aiChatExampleQuestions"}),Be=t=>{const{aiChatSettings:e}=b.useInkeepConfig(),{messages:i}=P.useChat();return!e.exampleQuestions?.length||i.length?null:n.jsx(Ua,{...t})},Ka=a.ikp("h3",{_id:"aiChatExampleQuestionsLabel"}),ye=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(Ka,{children:e.exampleQuestionsLabel,...t})}),za=a.ikp("div",{_id:"aiChatExampleQuestionsList"}),Te=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=e.exampleQuestions,{children:r,...s}=t;return n.jsx(za,{children:u.maybeRender(r,i),...s})}),Ga=a.ikp("div",{_id:"aiChatExampleQuestion"}),je=h.forwardRef((t,e)=>{const{aiChatSettings:i}=b.useInkeepConfig(),r=i.isFirstExampleQuestionHighlighted;return n.jsx(Ga,{ref:e,"data-highlight":u.dataAttr(r),...t})}),Ya=a.ikp("button",{_id:"aiChatExampleQuestionButton"}),He=t=>{const{question:e,onClick:i,...r}=t,s=typeof e=="object"?e.value:e,o=typeof e=="object"?e.label:e,{handleSubmit:d}=P.useChat();return n.jsx(Ya,{onClick:C.composeEventHandlers(i,()=>d(s)),children:o,...r})},Ja=a.ikp("div",{_id:"aiChatWorkflows"}),we=t=>{const{aiChatSettings:e}=b.useInkeepConfig(),{messages:i}=P.useChat();return!e.workflows?.length||i.length?null:n.jsx(Ja,{...t})},Xa=a.ikp("h3",{_id:"aiChatWorkflowsLabel"}),Le=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(Xa,{children:e.workflowsHeader,...t})}),Za=a.ikp("div",{_id:"aiChatWorkflowsList"}),De=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=e.workflows,{children:r,...s}=t;return n.jsx(Za,{children:u.maybeRender(r,i),...s})}),en=a.ikp("button",{_id:"aiChatWorkflow"}),Re=t=>{const{workflow:e,onClick:i,...r}=t,s=o=>{};return n.jsx(en,{onClick:C.composeEventHandlers(i,()=>s()),children:e.displayName,...r})},tn=a.ikp("div",{_id:"aiChatMessageWrapper"}),se=t=>{const{message:e,...i}=t;return e.role==="system"?null:n.jsx(_.MessageProvider,{message:e,children:n.jsx(tn,{"data-role":e.role,...i})})},Oe=h.memo(t=>{const{message:e,...i}=t,{aiChatSettings:r,baseSettings:s}=b.useInkeepConfig(),o=r.aiAssistantName,d=o?`Hi, I'm ${o}!`:"Hi!",c=r.chatSubjectName??s.organizationDisplayName,m=c?`
|
|
2
2
|
|
|
3
3
|
Ask me anything about \`${c}\`.`:`
|
|
4
4
|
|
|
5
|
-
How can I help?`,v={parts:[{type:"text",text:r.introMessage??`${d}${m}`}],id:Ha,...e,role:"assistant"};return n.jsx(se,{message:v,...i})}),an=a.ikp("div",{_id:"aiChatMessageHeader"}),qe=t=>{const{message:e}=E.useMessage();return n.jsx(an,{"data-role":e.role,...t})},nn=a.ikp("div",{_id:"aiChatMessageLoading",children:"Thinking..."}),We=t=>n.jsx(nn,{...t}),rn=a.ikp("div",{_id:"aiChatMessageAvatar"}),Ne=t=>{const{message:e}=E.useMessage();return n.jsx(rn,{"data-role":e.role,...t})},sn=a.ikp(re.Root,{_id:"aiChatMessageAvatarContent"}),Qe=t=>{const{message:e}=E.useMessage(),{baseSettings:i}=b.useInkeepConfig();return n.jsx(sn,{"data-username":u.dataAttr(e.role==="user"&&!!i.userProperties.name),"data-role":e.role,...t})},on=a.ikp(re.Fallback,{_id:"aiChatMessageAvatarFallback"}),Ve=h.memo(t=>{const{baseSettings:e}=b.useInkeepConfig(),{message:i}=E.useMessage();return e.userProperties.name?n.jsx(on,{"data-role":i.role,children:u.getInitials(e.userProperties.name),...t}):null}),me=a.ikp(re.Image,{_id:"aiChatMessageAvatarImage"}),$e=h.memo(t=>{const{onLoadingStatusChange:e,...i}=t,{aiChatSettings:r,baseSettings:{userProperties:s}}=b.useInkeepConfig(),{message:o}=E.useMessage(),{aiAssistantAvatar:d}=r??{},c=typeof d=="string"?d:d?.light,m=(typeof d=="string"?d:d?.dark)??c,l=fa.useColorModeValue(c,m),[v,g]=h.useState(l);h.useEffect(()=>{g(l)},[l]);const p=A=>{A==="error"&&g(null)};return o.role==="user"?s.name?null:r.userAvatar?n.jsx(me,{"data-type":"image",alt:"User avatar","data-role":o.role,src:r.userAvatar,...t}):n.jsx(Pa.default,{"data-type":"icon","data-role":o.role,...t}):v?n.jsx(me,{src:v,alt:"AI assistant avatar","data-type":"image","data-role":o.role,onLoadingStatusChange:C.composeEventHandlers(e,p),...i}):n.jsx(ga.default,{"data-type":"icon","data-role":o.role,...t})}),dn=a.ikp("span",{_id:"aiChatMessageName"}),Ue=t=>{const{message:e}=E.useMessage();return n.jsx(dn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},cn=a.ikp("div",{_id:"aiChatMessageContentWrapper"}),Ke=t=>{const{message:e}=E.useMessage(),{messageButtons:i}=P.useChat(),r=i[e.id]||[];return n.jsx(cn,{"data-role":e.role,"data-has-message-buttons":u.dataAttr(!!r.length),...t})},mn=a.ikp("div",{_id:"aiChatMessageContent"}),ze=t=>{const{message:e}=E.useMessage();return n.jsx(mn,{"data-role":e.role,...t})},ln=a.ikp("div",{_id:"aiChatMessageAttachments"}),Ge=t=>{const{message:e}=E.useMessage(),i=[];return e.role!=="user"||!i?.length?null:n.jsx(q.MessageAttachmentsProvider,{children:n.jsx(ln,{...t})})},hn=a.ikp("div",{_id:"aiChatMessageAttachments__List"}),Ye=t=>{const{children:e,...i}=t,r=[];return r?n.jsx(hn,{children:u.maybeRender(e,r),...i}):null},un=a.ikp("div",{_id:"aiChatMessageAttachments__Item"}),Je=t=>{const{attachment:e,onClick:i,...r}=t,{selectItem:s,onOpen:o}=q.useMessageAttachments(),d=()=>{s(e),o()};return n.jsx(D.AttachmentItemProvider,{attachment:e,children:n.jsx(un,{onClick:C.composeEventHandlers(i,d),...r})})},Cn=a.ikp(y.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),Xe=t=>{const{attachment:e}=D.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(Cn,{iconSettings:i,...t}):null},pn=a.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),Ze=t=>{const{attachment:e}=D.useAttachmentItem();return n.jsx(pn,{children:e.title,...t})},vn=a.ikp(_.Root,{_id:"aiChatMessageAttachmentsPreview"}),et=t=>{const{onOpenChange:e,...i}=t,{selectItem:r,isOpen:s,onClose:o,selectedItem:d}=q.useMessageAttachments(),c=m=>{m||(o(),r(null))};return n.jsx(vn,{open:s&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},tt=a.ikp(_.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),it=a.ikp(_.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),bn=a.ikp(_.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),at=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(bn,{children:e?.title||"Attachment",...t})},nt=a.ikp(_.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),gn=a.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),rt=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(gn,{children:e?.content,...t})},st=t=>{const{text:e,componentStyles:i,...r}=t,{aiChatSettings:s}=b.useInkeepConfig(),{shouldOpenLinksInNewTab:o}=s;return n.jsx(Q.Markdown,{children:e,componentStyles:i,shouldOpenLinksInNewTab:o,...r})},ot=({name:t,props:e,componentDef:i})=>{const s=Ta.useShadow()?.shadowHost,o=h.useRef(void 0),d=h.useRef(null),c=h.useRef(null),m=h.useRef(!1),[l,v]=h.useState(!1),[g,p]=h.useState(!1),A=h.useRef(i);h.useMemo(()=>{i!==A.current&&(typeof i=="function"&&typeof A.current=="function"?i.toString()!==A.current.toString()&&(A.current=i):A.current=i)},[i]);const B=A.current;return h.useEffect(()=>{o.current||(o.current=`dyn:${t}:${crypto.randomUUID()}`,v(!0))},[t]),h.useLayoutEffect(()=>{if(!B||!s||!l||!o.current)return;const k=o.current,I=document.createElement("div");return I.setAttribute("data-ikp-component",""),I.setAttribute("data-component",t),I.setAttribute("slot",k),d.current=I,m.current=!1,s.appendChild(I),p(!0),()=>{m.current=!0,p(!1),queueMicrotask(()=>{try{c.current&&(c.current.unmount(),c.current=null)}catch(M){console.debug("Ignoring unmount error:",M)}I.parentNode===s&&I.remove(),d.current=null})}},[B,s,l,t]),h.useEffect(()=>{const k=d.current;if(!k||m.current)return;const I=x=>{if(typeof x!="function"||x.length>1)return!1;try{if(typeof x=="function"&&x.constructor===Function){const O=x({});return h.isValidElement(O)}return!1}catch{return!0}};let M;if(I(B))try{const x=B;M=h.createElement(x,e||{})}catch(x){console.error("Error creating React element from component:",x);return}else if(typeof B=="function")M=B(e||{},k,null);else{console.error("Invalid component definition");return}if(h.isValidElement(M)||typeof M=="string"){if(m.current)return;c.current||(c.current=ja.createRoot(k)),!m.current&&c.current&&c.current.render(M);return}c.current&&!m.current&&c.current.render(null)},[i,e,g]),n.jsx("slot",{name:o.current})},Pn=a.ikp("div",{_id:"aiChatMessagePart"}),An=a.ikp("div",{_id:"aiChatMessageToolbar"}),dt=t=>{const{isLoading:e,messages:i}=P.useChat(),{message:r}=E.useMessage();return i.at(-1)?.id===r?.id&&e||r.role==="user"?null:n.jsx(An,{...t})},_n=a.ikp("div",{_id:"aiChatMessageAnnotationActions"}),ct=t=>{const{children:e,...i}=t,{message:r}=E.useMessage(),{messageButtons:s}=P.useChat(),o=s[r.id]||[];return n.jsx(_n,{children:u.maybeRender(e,o),...i})},En=a.ikp("a",{_id:"aiChatMessageAnnotationAction"}),Fn=a.ikp("button",{_id:"aiChatMessageAnnotationAction"}),mt=t=>{const{onClick:e,action:i,...r}=t,{handleAction:s}=te.useChatAction(i),{logEvent:o}=ne.useBaseEvents(),{conversationId:d}=P.useChat(),c=()=>{s(),o({eventName:"user_escalation_indicated",properties:{escalationType:"contact_us",conversationId:d}})},m=i.label||"Contact Support",l=n.jsxs(n.Fragment,{children:[i.icon&&n.jsx(y.BuiltInIconRenderer,{iconSettings:i.icon}),m]});return i.action.type==="open_link"?n.jsx(En,{href:i.action.url,target:"_blank",rel:"noopener","data-type":i.action.type,onClick:C.composeEventHandlers(e,c),children:l,...r}):n.jsx(Fn,{"data-type":i.action.type,onClick:C.composeEventHandlers(e,c),children:l,...r})},kn=a.ikp("button",{_id:"aiChatMessageAction"}),lt=t=>{const{action:e,onClick:i,className:r,...s}=t,{conversationId:o}=P.useChat(),{baseSettings:{onFeedback:d}}=b.useInkeepConfig(),{message:c}=E.useMessage(),{isStreaming:m,messages:l}=P.useChat(),[v,g]=J.useCopyToClipboard(),{feedback:p,submitPositiveFeedback:A,setCurrentFeedback:B,currentFeedback:k}=ee.useMessageFeedback(),{logEvent:I}=ne.useBaseEvents(),[M,x]=Ea.useSettleAction(),O=l.at(-1)?.id===c?.id,z=c.role==="assistant";if(O&&m||!z)return null;const N={copy(){g(u.getMessageContent(c)),I({eventName:"assistant_message_copied",properties:{conversationId:o}})},upvote(){A(c.id).then(()=>{x()})},downvote(){B(c.id)}},G={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},Y={copy:n.jsx(f.CustomIcon,{iconKey:v?"messageCopied":"messageCopy"}),upvote:n.jsx(f.CustomIcon,{iconKey:M?"messageCopied":"thumbsUp"}),downvote:n.jsx(f.CustomIcon,{iconKey:"thumbsDown"})},la={copy:{"data-copied":u.dataAttr(v)},upvote:{"data-upvoted":u.dataAttr(p[c.id]?.type==="positive")},downvote:{"data-downvoted":u.dataAttr(p[c.id]?.type==="negative"),"data-state":k===null?"closed":"open"}};return{copy:!1,upvote:!d,downvote:!d}[e]?null:n.jsx(kn,{"data-action":e,...la[e],children:Y[e],"aria-label":G[e],className:`${r} ${e}`,onClick:C.composeEventHandlers(i,N[e]),...s})},In=a.ikp("div",{_id:"aiChatMessageSources"}),ht=t=>{const{message:e}=E.useMessage();return e.role!=="assistant"||!e.parts.filter(r=>r.type==="data-artifact"&&r.data?.type?.toLowerCase()==="citation")?.length?null:n.jsx(In,{...t})},Mn=a.ikp("div",{_id:"aiChatMessageSources__Header"}),ut=t=>n.jsx(Mn,{children:"Sources",...t}),fn=a.ikp("div",{_id:"aiChatMessageSources__List"}),Ct=t=>{const{message:e}=E.useMessage(),{children:i,...r}=t,{baseSettings:{transformSource:s,organizationDisplayName:o},aiChatSettings:{shouldOpenLinksInNewTab:d},searchSettings:{tabs:c}}=b.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.parts.filter(g=>g.type==="data-artifact"&&g.data?.type?.toLowerCase()==="citation");if(!m?.length)return null;const l=new Map,v=m.filter(g=>{const p=g.data.artifactSummary.url;return!p||l.has(p)?!1:(l.set(p,!0),!0)}).map(g=>{const p=g.data,A={id:p?.artifactId,title:p?.artifactSummary?.title||p?.name,url:p?.artifactSummary?.url||"",description:"",breadcrumbs:[],type:p?.artifactSummary?.record_type,contentType:p?.artifactType,tag:p?.artifactType},k=(s??(M=>({...M,shouldOpenInNewTab:d,icon:ya.getIcon(M)})))(A,"chatSourceItem",{organizationDisplayName:o,tabs:c}),I=k.shouldOpenInNewTab!==void 0?k.shouldOpenInNewTab:d;return{...k,isExternal:I}});return n.jsx(fn,{children:u.maybeRender(i,v),...r})},Sn=a.ikp(Aa.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),pt=t=>{const{source:e,onClick:i,...r}=t,{logEvent:s}=ne.useBaseEvents(),{conversationId:o}=P.useChat(),d=()=>{s({eventName:"assistant_source_item_clicked",properties:{conversationId:o,link:e}})};return n.jsx(j.SourceItemProvider,{source:e,children:n.jsx(Sn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:C.composeEventHandlers(i,d),...r})})},xn=a.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),vt=t=>{const{source:e}=j.useSourceItem();return e.breadcrumbs?.length?n.jsx(xn,{"data-type":e.type,...t}):null},Bn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),Tn=a.ikp(y.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),bt=t=>{const{source:e}=j.useSourceItem();return n.jsx(Tn,{iconSettings:e.icon,"data-type":e.type,...t})},yn=a.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),gt=t=>{const{source:e}=j.useSourceItem();return n.jsx(yn,{"data-type":e.type,children:e.title,...t})},jn=a.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),Pt=t=>{const{source:e}=j.useSourceItem();return n.jsx(jn,{"data-type":e.type,...t})},Hn=a.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),At=t=>{const{source:e}=j.useSourceItem(),{children:i,...r}=t,s=h.useMemo(()=>e.description?Ia.highlightEmphasis(e.description):[],[e.description]);return s.length?n.jsx(Hn,{"data-type":e.type,children:u.maybeRender(i,s),...r}):null},wn=a.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),_t=t=>{const{part:e,...i}=t,{source:r}=j.useSourceItem();return typeof e=="string"?e:n.jsx(wn,{"data-type":r.type,children:e.content,"data-highlighted":u.dataAttr(e.highlighted),...i})},Ln=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),Et=t=>{const{source:e}=j.useSourceItem();return n.jsx(Ln,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},Ft=a.ikp("div",{_id:"aiChatFooter"}),kt=a.ikp("div",{_id:"aiChatInput__Fieldset"}),It=a.ikp("div",{_id:"aiChatInput__Group"}),Dn=a.ikp("textarea",{_id:"aiChatInput"}),Mt=h.forwardRef(({onChange:t,onKeyDown:e,...i},r)=>{const{handleInputChange:s,handleInputKeyDown:o,input:d,error:c,shouldAutoFocusInput:m,inputRef:l}=P.useChat(),{aiChatSettings:v}=b.useInkeepConfig(),g=ie.useComposedRefs(r,l);return Ba.useWidgetAutoFocus("chat",l,m),n.jsx(Dn,{asChild:!0,ref:g,maxLength:99999,placeholder:v.placeholder,value:d,onChange:C.composeEventHandlers(t,s),onKeyDown:C.composeEventHandlers(e,o),disabled:!!c||v.isViewOnly,...i,children:n.jsx(Z,{})})}),Rn=a.ikp("button",{_id:"aiChatInput__SendButton"}),ft=t=>{const{handleSubmit:e,isSubmitDisabled:i,error:r}=P.useChat(),{aiChatSettings:s}=b.useInkeepConfig(),{onClick:o,...d}=t;return n.jsx(Rn,{onClick:C.composeEventHandlers(o,()=>e()),"aria-label":"Send message",disabled:i||!!r||s.isViewOnly,...d})},St=a.ikp(f.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),On=a.ikp("div",{_id:"aiChatAttachmentsBar"}),xt=t=>{const e={supportedInputs:[]};return!e||!e.supportedInputs?.length?null:n.jsx(S.AttachmentsBarProvider,{children:n.jsx(On,{...t})})},qn=a.ikp("div",{_id:"aiChatAttachmentsBar__List"}),Bt=t=>{const{children:e,...i}=t,r=[];return n.jsx(qn,{children:u.maybeRender(e,r),...i})},Wn=a.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),Tt=t=>{const{attachment:e,...i}=t;return n.jsx(D.AttachmentItemProvider,{attachment:e,children:n.jsx(Wn,{...i})})},Nn=a.ikp(y.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),yt=t=>{const{attachment:e}=D.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(Nn,{iconSettings:i,...t}):null},Qn=a.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),jt=t=>{const{attachment:e}=D.useAttachmentItem();return n.jsx(Qn,{children:e.title,...t})},Vn=a.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Ht=t=>{const{onClick:e,...i}=t,r=()=>{};return n.jsx(Vn,{"aria-label":"Remove attachment",children:n.jsx(f.CustomIcon,{iconKey:"close"}),onClick:C.composeEventHandlers(e,r),...i})},wt=a.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Lt=a.ikp(L.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Dt=a.ikp(L.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(f.CustomIcon,{iconKey:"info"})}),oe=a.ikp(L.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Rt=a.ikp(L.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(oe,{}),"Attachments will be kept in context for the entire conversation."]})}),$n=a.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Ot=t=>{const{children:e,...i}=t,r={supportedInputs:[]};return r?.supportedInputs?n.jsx($n,{children:u.maybeRender(e,r.supportedInputs),...i}):null},Un=a.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),qt=t=>{const{input:e,onClick:i,...r}=t,s={supportedInputs:[]},o=[],d=()=>{},{selectInput:c,onOpen:m}=S.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return s?e.onInvoke(s,e,d,[...o]):void 0;c(e),m()};return n.jsx(Un,{children:e.displayName,onClick:C.composeEventHandlers(i,l),...r})},Kn=a.ikp(_.Root,{_id:"aiChatAttachmentsBar__Modal"}),Wt=t=>{const{onOpenChange:e,...i}=t,{selectInput:r,isOpen:s,onClose:o,selectedInput:d}=S.useAttachmentsBar(),c=m=>{m||(o(),r(null))};return n.jsx(Kn,{open:s&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},Nt=a.ikp(_.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Qt=a.ikp(_.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Vt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),zn=a.ikp(_.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),$t=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=`Add ${e?.displayName}`;return n.jsx(zn,{children:i,...t})},Gn=a.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),Ut=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=e?.workflowModalProps?.modalHelpText;return i?n.jsx(Gn,{children:i,...t}):null},Yn=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),Kt=t=>{const{children:e,...i}=t,{selectedInput:r}=S.useAttachmentsBar(),s=r?.workflowModalProps?.modalHelpElement;return s?n.jsx(Yn,{asChild:!e,children:e||s,...i}):null},zt=a.ikp(_.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Gt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),Jn=a.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),Yt=t=>{const{onSubmit:e,...i}=t,{form:r}=S.useAttachmentsBar();return n.jsx(Jn,{onSubmit:C.composeEventHandlers(e,r.onSubmit),...i})},Jt=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Xn=a.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),Xt=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(Xn,{htmlFor:`${i?.id}-title`,children:e.labels.title,...t})},Zn=a.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),Zt=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(Zn,{name:"title",value:r.data.title,id:`${s?.id}-title`,"data-invalid":u.dataAttr(!!r.errors.title),"aria-invalid":!!r.errors.title,onChange:C.composeEventHandlers(e,r.onChange),...i})},er=a.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ei=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.title?n.jsx(er,{"aria-live":"polite",children:e.errors.title,...t}):null},ti=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),tr=a.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),ii=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(tr,{htmlFor:`${i?.id}-content`,children:e.labels.content,...t})},ir=a.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ai=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(ir,{asChild:!0,rows:4,name:"content",value:r.data.content,id:`${s?.id}-content`,"data-invalid":u.dataAttr(!!r.errors.content),"aria-invalid":!!r.errors.content,onChange:C.composeEventHandlers(e,r.onChange),...i,children:n.jsx(Z,{maxRows:10})})},ar=a.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ni=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.content?n.jsx(ar,{"aria-live":"polite",children:e.errors.content,...t}):null},ri=a.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),si=a.ikp("div",{_id:"aiChatActionBar"}),oi=a.ikp("div",{_id:"aiChat__ChatActions"}),di=a.ikp("div",{_id:"aiChatTagline__Container"}),ci=a.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),mi=a.ikp(_a.default,{_id:"aiChatTagline__Logo"}),li=a.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),nr=a.ikp(L.Trigger,{_id:"aiChat__ChatAction"}),U=t=>{const{action:e,onClick:i,className:r,...s}=t,o={},{clear:d,stop:c,isLoading:m,isStreaming:l,messages:v}=P.useChat(),{conversationId:g}=P.useChat(),{aiChatSettings:p}=b.useInkeepConfig(),[A,B]=J.useCopyToClipboard(),[k]=J.useCopyToClipboard();if({help:!1,copy:v.length===0||!p.isCopyChatButtonVisible||m||l,share:v.length===0||!p.isShareButtonVisible||!g||!!o||m||l,clear:v.length===0||p.isViewOnly||m||l,stop:!m&&!l}[e])return null;const O={help:()=>{},copy:()=>{const ce=v.map(N=>{const G=`**${N.role==="assistant"?"AI Assistant":"User"}**`,Y=u.getMessageContent(N);return`${G}
|
|
5
|
+
How can I help?`,p={parts:[{type:"text",text:r.introMessage??`${d}${m}`}],id:Ha,...e,role:"assistant"};return n.jsx(se,{message:p,...i})}),an=a.ikp("div",{_id:"aiChatMessageHeader"}),qe=t=>{const{message:e}=_.useMessage();return n.jsx(an,{"data-role":e.role,...t})},nn=a.ikp("div",{_id:"aiChatMessageLoading",children:"Thinking..."}),We=t=>n.jsx(nn,{...t}),rn=a.ikp("div",{_id:"aiChatMessageAvatar"}),Ne=t=>{const{message:e}=_.useMessage();return n.jsx(rn,{"data-role":e.role,...t})},sn=a.ikp(re.Root,{_id:"aiChatMessageAvatarContent"}),Qe=t=>{const{message:e}=_.useMessage(),{baseSettings:i}=b.useInkeepConfig();return n.jsx(sn,{"data-username":u.dataAttr(e.role==="user"&&!!i.userProperties.name),"data-role":e.role,...t})},on=a.ikp(re.Fallback,{_id:"aiChatMessageAvatarFallback"}),Ve=h.memo(t=>{const{baseSettings:e}=b.useInkeepConfig(),{message:i}=_.useMessage();return e.userProperties.name?n.jsx(on,{"data-role":i.role,children:u.getInitials(e.userProperties.name),...t}):null}),me=a.ikp(re.Image,{_id:"aiChatMessageAvatarImage"}),$e=h.memo(t=>{const{onLoadingStatusChange:e,...i}=t,{aiChatSettings:r,baseSettings:{userProperties:s}}=b.useInkeepConfig(),{message:o}=_.useMessage(),{aiAssistantAvatar:d}=r??{},c=typeof d=="string"?d:d?.light,m=(typeof d=="string"?d:d?.dark)??c,l=fa.useColorModeValue(c,m),[p,g]=h.useState(l);h.useEffect(()=>{g(l)},[l]);const v=A=>{A==="error"&&g(null)};return o.role==="user"?s.name?null:r.userAvatar?n.jsx(me,{"data-type":"image",alt:"User avatar","data-role":o.role,src:r.userAvatar,...t}):n.jsx(Pa.default,{"data-type":"icon","data-role":o.role,...t}):p?n.jsx(me,{src:p,alt:"AI assistant avatar","data-type":"image","data-role":o.role,onLoadingStatusChange:C.composeEventHandlers(e,v),...i}):n.jsx(ga.default,{"data-type":"icon","data-role":o.role,...t})}),dn=a.ikp("span",{_id:"aiChatMessageName"}),Ue=t=>{const{message:e}=_.useMessage();return n.jsx(dn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},cn=a.ikp("div",{_id:"aiChatMessageContentWrapper"}),Ke=t=>{const{message:e}=_.useMessage();return n.jsx(cn,{"data-role":e.role,...t})},mn=a.ikp("div",{_id:"aiChatMessageContent"}),ze=t=>{const{message:e}=_.useMessage();return n.jsx(mn,{"data-role":e.role,...t})},ln=a.ikp("div",{_id:"aiChatMessageAttachments"}),Ge=t=>{const{message:e}=_.useMessage(),i=[];return e.role!=="user"||!i?.length?null:n.jsx(q.MessageAttachmentsProvider,{children:n.jsx(ln,{...t})})},hn=a.ikp("div",{_id:"aiChatMessageAttachments__List"}),Ye=t=>{const{children:e,...i}=t,r=[];return r?n.jsx(hn,{children:u.maybeRender(e,r),...i}):null},un=a.ikp("div",{_id:"aiChatMessageAttachments__Item"}),Je=t=>{const{attachment:e,onClick:i,...r}=t,{selectItem:s,onOpen:o}=q.useMessageAttachments(),d=()=>{s(e),o()};return n.jsx(D.AttachmentItemProvider,{attachment:e,children:n.jsx(un,{onClick:C.composeEventHandlers(i,d),...r})})},Cn=a.ikp(T.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),Xe=t=>{const{attachment:e}=D.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(Cn,{iconSettings:i,...t}):null},pn=a.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),Ze=t=>{const{attachment:e}=D.useAttachmentItem();return n.jsx(pn,{children:e.title,...t})},vn=a.ikp(E.Root,{_id:"aiChatMessageAttachmentsPreview"}),et=t=>{const{onOpenChange:e,...i}=t,{selectItem:r,isOpen:s,onClose:o,selectedItem:d}=q.useMessageAttachments(),c=m=>{m||(o(),r(null))};return n.jsx(vn,{open:s&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},tt=a.ikp(E.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),it=a.ikp(E.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),bn=a.ikp(E.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),at=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(bn,{children:e?.title||"Attachment",...t})},nt=a.ikp(E.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),gn=a.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),rt=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(gn,{children:e?.content,...t})},st=t=>{const{text:e,componentStyles:i,...r}=t,{aiChatSettings:s}=b.useInkeepConfig(),{shouldOpenLinksInNewTab:o}=s;return n.jsx(Q.Markdown,{children:e,componentStyles:i,shouldOpenLinksInNewTab:o,...r})},ot=({name:t,props:e,componentDef:i})=>{const s=ya.useShadow()?.shadowHost,o=h.useRef(void 0),d=h.useRef(null),c=h.useRef(null),m=h.useRef(!1),[l,p]=h.useState(!1),[g,v]=h.useState(!1),A=h.useRef(i);h.useMemo(()=>{i!==A.current&&(typeof i=="function"&&typeof A.current=="function"?i.toString()!==A.current.toString()&&(A.current=i):A.current=i)},[i]);const B=A.current;return h.useEffect(()=>{o.current||(o.current=`dyn:${t}:${crypto.randomUUID()}`,p(!0))},[t]),h.useLayoutEffect(()=>{if(!B||!s||!l||!o.current)return;const k=o.current,I=document.createElement("div");return I.setAttribute("data-ikp-component",""),I.setAttribute("data-component",t),I.setAttribute("slot",k),d.current=I,m.current=!1,s.appendChild(I),v(!0),()=>{m.current=!0,v(!1),queueMicrotask(()=>{try{c.current&&(c.current.unmount(),c.current=null)}catch(M){console.debug("Ignoring unmount error:",M)}I.parentNode===s&&I.remove(),d.current=null})}},[B,s,l,t]),h.useEffect(()=>{const k=d.current;if(!k||m.current)return;const I=x=>{if(typeof x!="function"||x.length>1)return!1;try{if(typeof x=="function"&&x.constructor===Function){const O=x({});return h.isValidElement(O)}return!1}catch{return!0}};let M;if(I(B))try{const x=B;M=h.createElement(x,e||{})}catch(x){console.error("Error creating React element from component:",x);return}else if(typeof B=="function")M=B(e||{},k,null);else{console.error("Invalid component definition");return}if(h.isValidElement(M)||typeof M=="string"){if(m.current)return;c.current||(c.current=ja.createRoot(k)),!m.current&&c.current&&c.current.render(M);return}c.current&&!m.current&&c.current.render(null)},[i,e,g]),n.jsx("slot",{name:o.current})},Pn=a.ikp("div",{_id:"aiChatMessagePart"}),An=a.ikp("div",{_id:"aiChatMessageToolbar"}),dt=t=>{const{isLoading:e,messages:i}=P.useChat(),{message:r}=_.useMessage();return i.at(-1)?.id===r?.id&&e||r.role==="user"?null:n.jsx(An,{...t})},_n=a.ikp("div",{_id:"aiChatMessageCustomActions"}),ct=t=>{const{children:e,...i}=t,{aiChatSettings:r}=b.useInkeepConfig(),{message:s}=_.useMessage(),{isStreaming:o,messages:d}=P.useChat(),c=d.at(-1)?.id===s?.id,m=s.role==="assistant",l=r.messageActions||[];return c&&o||!m?null:n.jsx(_n,{children:u.maybeRender(e,l),...i})},En=a.ikp("a",{_id:"aiChatMessageCustomAction"}),Fn=a.ikp("button",{_id:"aiChatMessageCustomAction"}),mt=t=>{const{onClick:e,action:i,...r}=t,{message:s}=_.useMessage(),{handleAction:o}=te.useChatAction(i,s.id),{logEvent:d}=ne.useBaseEvents(),{conversationId:c}=P.useChat(),m=()=>{o(),d({eventName:"user_escalation_indicated",properties:{escalationType:"contact_us",conversationId:c}})},l=i.label,p=n.jsxs(n.Fragment,{children:[i.icon&&n.jsx(T.BuiltInIconRenderer,{iconSettings:i.icon}),l]});return i.action.type==="open_link"?n.jsx(En,{href:i.action.url,target:"_blank",rel:"noopener","data-type":i.action.type,onClick:C.composeEventHandlers(e,m),children:p,...r}):n.jsx(Fn,{"data-type":i.action.type,onClick:C.composeEventHandlers(e,m),children:p,...r})},kn=a.ikp("button",{_id:"aiChatMessageAction"}),lt=t=>{const{action:e,onClick:i,className:r,...s}=t,{conversationId:o}=P.useChat(),{baseSettings:{onFeedback:d}}=b.useInkeepConfig(),{message:c}=_.useMessage(),{isStreaming:m,messages:l}=P.useChat(),[p,g]=J.useCopyToClipboard(),{feedback:v,submitPositiveFeedback:A,setCurrentFeedback:B,currentFeedback:k}=ee.useMessageFeedback(),{logEvent:I}=ne.useBaseEvents(),[M,x]=Ea.useSettleAction(),O=l.at(-1)?.id===c?.id,z=c.role==="assistant";if(O&&m||!z)return null;const N={copy(){g(u.getMessageContent(c)),I({eventName:"assistant_message_copied",properties:{conversationId:o}})},upvote(){A(c.id).then(()=>{x()})},downvote(){B(c.id)}},G={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},Y={copy:n.jsx(f.CustomIcon,{iconKey:p?"messageCopied":"messageCopy"}),upvote:n.jsx(f.CustomIcon,{iconKey:M?"messageCopied":"thumbsUp"}),downvote:n.jsx(f.CustomIcon,{iconKey:"thumbsDown"})},la={copy:{"data-copied":u.dataAttr(p)},upvote:{"data-upvoted":u.dataAttr(v[c.id]?.type==="positive")},downvote:{"data-downvoted":u.dataAttr(v[c.id]?.type==="negative"),"data-state":k===null?"closed":"open"}};return{copy:!1,upvote:!d,downvote:!d}[e]?null:n.jsx(kn,{"data-action":e,...la[e],children:Y[e],"aria-label":G[e],className:`${r} ${e}`,onClick:C.composeEventHandlers(i,N[e]),...s})},In=a.ikp("div",{_id:"aiChatMessageSources"}),ht=t=>{const{message:e}=_.useMessage();return e.role!=="assistant"||!e.parts.filter(r=>r.type==="data-artifact"&&r.data?.type?.toLowerCase()==="citation")?.length?null:n.jsx(In,{...t})},Mn=a.ikp("div",{_id:"aiChatMessageSources__Header"}),ut=t=>n.jsx(Mn,{children:"Sources",...t}),fn=a.ikp("div",{_id:"aiChatMessageSources__List"}),Ct=t=>{const{message:e}=_.useMessage(),{children:i,...r}=t,{baseSettings:{transformSource:s,organizationDisplayName:o},aiChatSettings:{shouldOpenLinksInNewTab:d},searchSettings:{tabs:c}}=b.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.parts.filter(g=>g.type==="data-artifact"&&g.data?.type?.toLowerCase()==="citation");if(!m?.length)return null;const l=new Map,p=m.filter(g=>{const v=g.data.artifactSummary.url;return!v||l.has(v)?!1:(l.set(v,!0),!0)}).map(g=>{const v=g.data,A={id:v?.artifactId,title:v?.artifactSummary?.title||v?.name,url:v?.artifactSummary?.url||"",description:"",breadcrumbs:[],type:v?.artifactSummary?.record_type,contentType:v?.artifactType,tag:v?.artifactType},k=(s??(M=>({...M,shouldOpenInNewTab:d,icon:Ta.getIcon(M)})))(A,"chatSourceItem",{organizationDisplayName:o,tabs:c}),I=k.shouldOpenInNewTab!==void 0?k.shouldOpenInNewTab:d;return{...k,isExternal:I}});return n.jsx(fn,{children:u.maybeRender(i,p),...r})},Sn=a.ikp(Aa.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),pt=t=>{const{source:e,onClick:i,...r}=t,{logEvent:s}=ne.useBaseEvents(),{conversationId:o}=P.useChat(),d=()=>{s({eventName:"assistant_source_item_clicked",properties:{conversationId:o,link:e}})};return n.jsx(j.SourceItemProvider,{source:e,children:n.jsx(Sn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:C.composeEventHandlers(i,d),...r})})},xn=a.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),vt=t=>{const{source:e}=j.useSourceItem();return e.breadcrumbs?.length?n.jsx(xn,{"data-type":e.type,...t}):null},Bn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),yn=a.ikp(T.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),bt=t=>{const{source:e}=j.useSourceItem();return n.jsx(yn,{iconSettings:e.icon,"data-type":e.type,...t})},Tn=a.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),gt=t=>{const{source:e}=j.useSourceItem();return n.jsx(Tn,{"data-type":e.type,children:e.title,...t})},jn=a.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),Pt=t=>{const{source:e}=j.useSourceItem();return n.jsx(jn,{"data-type":e.type,...t})},Hn=a.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),At=t=>{const{source:e}=j.useSourceItem(),{children:i,...r}=t,s=h.useMemo(()=>e.description?Ia.highlightEmphasis(e.description):[],[e.description]);return s.length?n.jsx(Hn,{"data-type":e.type,children:u.maybeRender(i,s),...r}):null},wn=a.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),_t=t=>{const{part:e,...i}=t,{source:r}=j.useSourceItem();return typeof e=="string"?e:n.jsx(wn,{"data-type":r.type,children:e.content,"data-highlighted":u.dataAttr(e.highlighted),...i})},Ln=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),Et=t=>{const{source:e}=j.useSourceItem();return n.jsx(Ln,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},Ft=a.ikp("div",{_id:"aiChatFooter"}),kt=a.ikp("div",{_id:"aiChatInput__Fieldset"}),It=a.ikp("div",{_id:"aiChatInput__Group"}),Dn=a.ikp("textarea",{_id:"aiChatInput"}),Mt=h.forwardRef(({onChange:t,onKeyDown:e,...i},r)=>{const{handleInputChange:s,handleInputKeyDown:o,input:d,error:c,shouldAutoFocusInput:m,inputRef:l}=P.useChat(),{aiChatSettings:p}=b.useInkeepConfig(),g=ie.useComposedRefs(r,l);return Ba.useWidgetAutoFocus("chat",l,m),n.jsx(Dn,{asChild:!0,ref:g,maxLength:99999,placeholder:p.placeholder,value:d,onChange:C.composeEventHandlers(t,s),onKeyDown:C.composeEventHandlers(e,o),disabled:!!c||p.isViewOnly,...i,children:n.jsx(Z,{})})}),Rn=a.ikp("button",{_id:"aiChatInput__SendButton"}),ft=t=>{const{handleSubmit:e,isSubmitDisabled:i,error:r}=P.useChat(),{aiChatSettings:s}=b.useInkeepConfig(),{onClick:o,...d}=t;return n.jsx(Rn,{onClick:C.composeEventHandlers(o,()=>e()),"aria-label":"Send message",disabled:i||!!r||s.isViewOnly,...d})},St=a.ikp(f.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),On=a.ikp("div",{_id:"aiChatAttachmentsBar"}),xt=t=>{const e={supportedInputs:[]};return!e||!e.supportedInputs?.length?null:n.jsx(S.AttachmentsBarProvider,{children:n.jsx(On,{...t})})},qn=a.ikp("div",{_id:"aiChatAttachmentsBar__List"}),Bt=t=>{const{children:e,...i}=t,r=[];return n.jsx(qn,{children:u.maybeRender(e,r),...i})},Wn=a.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),yt=t=>{const{attachment:e,...i}=t;return n.jsx(D.AttachmentItemProvider,{attachment:e,children:n.jsx(Wn,{...i})})},Nn=a.ikp(T.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),Tt=t=>{const{attachment:e}=D.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(Nn,{iconSettings:i,...t}):null},Qn=a.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),jt=t=>{const{attachment:e}=D.useAttachmentItem();return n.jsx(Qn,{children:e.title,...t})},Vn=a.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Ht=t=>{const{onClick:e,...i}=t,r=()=>{};return n.jsx(Vn,{"aria-label":"Remove attachment",children:n.jsx(f.CustomIcon,{iconKey:"close"}),onClick:C.composeEventHandlers(e,r),...i})},wt=a.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Lt=a.ikp(L.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Dt=a.ikp(L.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(f.CustomIcon,{iconKey:"info"})}),oe=a.ikp(L.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Rt=a.ikp(L.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(oe,{}),"Attachments will be kept in context for the entire conversation."]})}),$n=a.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Ot=t=>{const{children:e,...i}=t,r={supportedInputs:[]};return r?.supportedInputs?n.jsx($n,{children:u.maybeRender(e,r.supportedInputs),...i}):null},Un=a.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),qt=t=>{const{input:e,onClick:i,...r}=t,s={supportedInputs:[]},o=[],d=()=>{},{selectInput:c,onOpen:m}=S.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return s?e.onInvoke(s,e,d,[...o]):void 0;c(e),m()};return n.jsx(Un,{children:e.displayName,onClick:C.composeEventHandlers(i,l),...r})},Kn=a.ikp(E.Root,{_id:"aiChatAttachmentsBar__Modal"}),Wt=t=>{const{onOpenChange:e,...i}=t,{selectInput:r,isOpen:s,onClose:o,selectedInput:d}=S.useAttachmentsBar(),c=m=>{m||(o(),r(null))};return n.jsx(Kn,{open:s&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},Nt=a.ikp(E.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Qt=a.ikp(E.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Vt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),zn=a.ikp(E.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),$t=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=`Add ${e?.displayName}`;return n.jsx(zn,{children:i,...t})},Gn=a.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),Ut=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=e?.workflowModalProps?.modalHelpText;return i?n.jsx(Gn,{children:i,...t}):null},Yn=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),Kt=t=>{const{children:e,...i}=t,{selectedInput:r}=S.useAttachmentsBar(),s=r?.workflowModalProps?.modalHelpElement;return s?n.jsx(Yn,{asChild:!e,children:e||s,...i}):null},zt=a.ikp(E.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Gt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),Jn=a.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),Yt=t=>{const{onSubmit:e,...i}=t,{form:r}=S.useAttachmentsBar();return n.jsx(Jn,{onSubmit:C.composeEventHandlers(e,r.onSubmit),...i})},Jt=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Xn=a.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),Xt=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(Xn,{htmlFor:`${i?.id}-title`,children:e.labels.title,...t})},Zn=a.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),Zt=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(Zn,{name:"title",value:r.data.title,id:`${s?.id}-title`,"data-invalid":u.dataAttr(!!r.errors.title),"aria-invalid":!!r.errors.title,onChange:C.composeEventHandlers(e,r.onChange),...i})},er=a.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ei=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.title?n.jsx(er,{"aria-live":"polite",children:e.errors.title,...t}):null},ti=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),tr=a.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),ii=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(tr,{htmlFor:`${i?.id}-content`,children:e.labels.content,...t})},ir=a.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ai=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(ir,{asChild:!0,rows:4,name:"content",value:r.data.content,id:`${s?.id}-content`,"data-invalid":u.dataAttr(!!r.errors.content),"aria-invalid":!!r.errors.content,onChange:C.composeEventHandlers(e,r.onChange),...i,children:n.jsx(Z,{maxRows:10})})},ar=a.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ni=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.content?n.jsx(ar,{"aria-live":"polite",children:e.errors.content,...t}):null},ri=a.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),si=a.ikp("div",{_id:"aiChatActionBar"}),oi=a.ikp("div",{_id:"aiChat__ChatActions"}),di=a.ikp("div",{_id:"aiChatTagline__Container"}),ci=a.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),mi=a.ikp(_a.default,{_id:"aiChatTagline__Logo"}),li=a.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),nr=a.ikp(L.Trigger,{_id:"aiChat__ChatAction"}),U=t=>{const{action:e,onClick:i,className:r,...s}=t,o={},{clear:d,stop:c,isLoading:m,isStreaming:l,messages:p}=P.useChat(),{conversationId:g}=P.useChat(),{aiChatSettings:v}=b.useInkeepConfig(),[A,B]=J.useCopyToClipboard(),[k]=J.useCopyToClipboard();if({help:!1,copy:p.length===0||!v.isCopyChatButtonVisible||m||l,share:p.length===0||!v.isShareButtonVisible||!g||!!o||m||l,clear:p.length===0||v.isViewOnly||m||l,stop:!m&&!l}[e])return null;const O={help:()=>{},copy:()=>{const ce=p.map(N=>{const G=`**${N.role==="assistant"?"AI Assistant":"User"}**`,Y=u.getMessageContent(N);return`${G}
|
|
6
6
|
|
|
7
7
|
${Y}`}).join(`
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
`);B(ce)},share:async()=>{},clear:d,stop:c},z={copy:A,share:k};return n.jsx(L.Tooltip,{delayDuration:0,open:z[e],children:n.jsx(nr,{"data-type":e,"data-copied":u.dataAttr(A||k),className:`${r} ${e}`,children:n.jsx(de,{action:e}),onClick:C.composeEventHandlers(i,O[e]),...s})})},rr=a.ikp("span",{_id:"aiChat__ChatActionLabel"}),de=t=>{const{action:e,...i}=t,{aiChatSettings:r}=b.useInkeepConfig(),s=r.toolbarButtonLabels??{},o={help:s.getHelp??"Get Help",copy:s.copyChat??"Copy",share:s.share??"Share",clear:s.clear??"Clear",stop:s.stop??"Stop"};return n.jsx(rr,{children:o[e],...i})},sr=a.ikp(L.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),hi=t=>{const{action:e,children:i,...r}=t,s={copy:"Copied!",share:"Link copied!"};return n.jsxs(sr,{sideOffset:5,...r,children:[n.jsx(L.Arrow,{}),i||s[e]]})},or=a.ikp(w.Root,{_id:"aiChatHelpActions"}),ui=t=>{const{children:e,...i}=t,{aiChatSettings:r}=b.useInkeepConfig(),{getHelpOptions:s}=r;if(!s||(s??[]).length===0)return null;const{_pinned:o,_unpinned:d}=s.reduce((v,g)=>{const p=g.isPinnedToToolbar?"_pinned":"_unpinned";return{...v,[p]:[...v[p],g]}},{_pinned:[],_unpinned:[]}),c=d.length===1?[...o,d[0]]:o,m=d.length===1?[]:d,l=X.useHelpMenuState();return n.jsx(X.HelpMenuProvider,{value:l,children:n.jsx(or,{open:l.open,onOpenChange:l.setOpen,children:u.maybeRender(e,{pinned:c,unpinned:m}),...i})})},dr=a.ikp(U,{_id:"aiChatHelpAction",action:"help"}),cr=a.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),Ci=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=te.useChatAction(e),d=e.action.type,c={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:C.composeEventHandlers(i,()=>{s(),o()}),...r};return d==="open_link"?n.jsx(cr,{href:e.action.url,...c}):n.jsx(dr,{...c})},mr=a.ikp(w.Trigger,{_id:"aiChatHelpActions__Trigger"}),pi=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(U,{action:"help",...t,asChild:!0,children:n.jsx(mr,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),lr=a.ikp(w.Content,{_id:"aiChatHelpActions__Menu"}),vi=t=>n.jsx(lr,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),bi=a.ikp(w.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),gi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=te.useChatAction(e),{setOpen:d}=X.useHelpMenu(),c=()=>{s({onOpenForm:()=>d(!1)}),o()},m=e.action.type,l=a.ikp(m==="open_link"?"a":"button",{_id:"aiChatHelpActions__MenuItem",children:e.name,"aria-label":e.name,"data-name":e.name,"data-type":e.action.type,...m==="open_link"&&{href:e.action.url,target:"_blank",rel:"noopener"},onClick:C.composeEventHandlers(i,c)});return n.jsx(l,{...r})},hr=a.ikp(y.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Pi=t=>{const{action:e,...i}=t;return e.icon?n.jsx(hr,{iconSettings:e.icon,...i}):null},ur=a.ikp(_.Root,{_id:"aiChatFeedbackModal"}),Ai=t=>{const{onOpenChange:e,...i}=t,{currentFeedback:r,setCurrentFeedback:s}=ee.useMessageFeedback();return n.jsx(ur,{open:r!==null,onOpenChange:C.composeEventHandlers(e,()=>s(null)),...i})},_i=a.ikp(_.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),Ei=a.ikp(_.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),Fi=a.ikp(_.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),ki=a.ikp(_.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Ii=a.ikp("div",{_id:"aiChatFeedbackModal__Body"}),Cr=a.ikp("form",{_id:"aiChatFeedbackForm"}),Mi=t=>{const{onSubmit:e,...i}=t,{submitNegativeFeedback:r,currentFeedback:s,setCurrentFeedback:o}=ee.useMessageFeedback(),d=c=>{c.preventDefault();const m=c.target,l=new FormData(m),v=Object.fromEntries(l.entries());s&&(r(s,v),o(null))};return n.jsx(Cr,{onSubmit:C.composeEventHandlers(e,d),...i})},pr=a.ikp("div",{_id:"aiChatFeedbackItem"}),fi=t=>{const{name:e,...i}=t;return n.jsx(V.FeedbackItemProvider,{name:e,children:n.jsx(pr,{...i})})},vr=a.ikp($.Root,{_id:"aiChatFeedbackItem__Checkbox"}),Si=t=>{const{name:e,focusItem:i}=V.useFeedbackItem(),{onCheckedChange:r,...s}=t,o=d=>{d&&i?.current?.focus()};return n.jsx(vr,{id:`feedback-${e}`,name:e,onCheckedChange:C.composeEventHandlers(r,o),...s})},xi=a.ikp($.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),br=a.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Bi=t=>{const{name:e}=V.useFeedbackItem(),i={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return n.jsx(br,{htmlFor:`feedback-${e}`,children:i[e],...t})},gr=a.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),Ti=t=>{const{name:e,focusItem:i}=V.useFeedbackItem();return n.jsx(gr,{ref:i,name:`${e}:description`,...t})},yi=a.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Pr=a.ikp("div",{_id:"aiChatForm__Wrapper"}),ji=t=>{const{form:e}=F.useChatForm();return e?n.jsx(Pr,{...t}):null},Ar=a.ikp("form",{_id:"aiChatForm"}),Hi=t=>{const{onSubmit:e,...i}=t,{conversationId:r,messages:s}=P.useChat(),{handleSubmit:o,isSuccess:d}=F.useChatForm();return d?null:n.jsx(Ar,{onSubmit:C.composeEventHandlers(e,c=>o(c,{id:r,messages:s})),...i})},_r=a.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),wi=t=>{const{onClick:e,...i}=t,{closeForm:r}=F.useChatForm();return n.jsx(_r,{onClick:C.composeEventHandlers(e,r),...i})},Li=a.ikp("div",{_id:"aiChatForm__Header"}),Er=a.ikp("h2",{_id:"aiChatForm__Heading"}),Di=t=>{const{form:e}=F.useChatForm();return e?.heading?n.jsx(Er,{children:e.heading,...t}):null},Fr=a.ikp(Q.Markdown,{_id:"aiChatForm__Description"}),Ri=t=>{const{form:e}=F.useChatForm();return e?.description?n.jsx(Fr,{children:e.description,...t}):null},kr=a.ikp("div",{_id:"aiChatForm__Content"}),Oi=t=>{const{children:e,...i}=t,{getFields:r}=F.useChatForm(),{conversationId:s}=P.useChat(),o=r(s)||[];return n.jsx(kr,{children:u.maybeRender(e,o),...i})},Ir=a.ikp("div",{_id:"aiChatForm__Field"}),qi=t=>{const{field:e,autoFocus:i,...r}=t,{control:s,errors:o}=F.useChatForm();return n.jsx(ka.Controller,{name:e.name,control:s,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const c=d.value!==void 0||e.inputType==="file";return n.jsx(H.FormFieldProvider,{"data-invalid":u.dataAttr(!!o[e.name]),field:e,fieldProps:d,autoFocus:i,children:c&&n.jsx(Ir,{"data-input-type":e.inputType,"data-hidden":u.dataAttr(e.isHidden),...r})})}})},Mr=a.ikp("label",{_id:"aiChatForm__FieldLabel"}),Wi=t=>{const{field:e}=H.useFormField();return n.jsx(Mr,{"data-required":u.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},fr=a.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),K=t=>{const{field:e,error:i,fieldProps:{onChange:r,onBlur:s,...o},autoFocus:d}=H.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(fr,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":u.dataAttr(!!i),onChange:C.composeEventHandlers(c,r),onBlur:C.composeEventHandlers(m,s),...o,...l})},Ni=a.ikp(K,{_id:"aiChatForm__FieldEmail",type:"email"}),Sr=a.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Qi=t=>{const{field:e,error:i,fieldProps:{value:r,onChange:s,onBlur:o,...d},autoFocus:c}=H.useFormField(),{onChange:m,onBlur:l,...v}=t,g=p=>{const A=p.target.files;s(A)};return n.jsx(Sr,{id:e.name,autoFocus:c,"data-value":r,"data-invalid":u.dataAttr(!!i),...v,...d,onChange:C.composeEventHandlers(m,g),onBlur:C.composeEventHandlers(l,o)})},Vi=a.ikp(K,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(Z,{maxRows:8})}),xr=a.ikp($.Root,{_id:"aiChatForm__FieldCheckbox"}),$i=t=>{const{field:e,error:i,fieldProps:r,autoFocus:s}=H.useFormField(),{onCheckedChange:o,...d}=t;return n.jsx(xr,{id:e.name,name:e.name,autoFocus:s,"data-invalid":u.dataAttr(!!i),checked:r.value,onCheckedChange:C.composeEventHandlers(o,r.onChange),...d})},Ui=a.ikp($.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),Br=a.ikp(T.Root,{_id:"aiChatForm__FieldSelect"}),Ki=t=>{const{field:e,error:i,fieldProps:r}=H.useFormField(),{onValueChange:s,...o}=t;return n.jsx(Br,{name:e.name,"data-invalid":u.dataAttr(!!i),value:r.value,onValueChange:C.composeEventHandlers(s,r.onChange),...o})},zi=a.ikp(T.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),Tr=a.ikp(T.Value,{_id:"aiChatForm__FieldSelect__Value"}),Gi=t=>{const{field:e}=H.useFormField();return n.jsx(Tr,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},Yi=a.ikp(T.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(y.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),Ji=a.ikp(T.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),Xi=a.ikp(T.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),Zi=a.ikp(T.Item,{_id:"aiChatForm__FieldSelect__Item"}),ea=a.ikp(T.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ta=a.ikp(T.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(y.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),yr=a.ikp("span",{_id:"aiChatForm__FieldError"}),ia=t=>{const{error:e}=H.useFormField();return e?n.jsx(yr,{children:e.message?.toString(),...t}):null},jr=a.ikp("span",{_id:"aiChatForm__Error"}),aa=t=>{const{formError:e}=F.useChatForm();return e?n.jsx(jr,{children:e.message,...t}):null},na=a.ikp("div",{_id:"aiChatForm__Footer"}),Hr=a.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),ra=t=>{const{onClick:e,...i}=t,{closeForm:r}=F.useChatForm();return n.jsx(Hr,{onClick:C.composeEventHandlers(e,r),...i})},wr=a.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),sa=t=>{const{onClick:e,...i}=t,{isSubmitting:r,form:s}=F.useChatForm(),o=s?.buttons.submit.label||"Submit";return n.jsx(wr,{disabled:r,...i,children:o})},Lr=a.ikp("div",{_id:"aiChatForm__Success"}),oa=t=>{const{isSuccess:e}=F.useChatForm();return e?n.jsx(Lr,{...t}):null},Dr=a.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),da=t=>{const{form:e}=F.useChatForm();return n.jsx(Dr,{children:e?.successView?.heading,...t})},Rr=a.ikp(Q.Markdown,{_id:"aiChatForm__SuccessMessage"}),ca=t=>{const{form:e}=F.useChatForm();return n.jsx(Rr,{children:e?.successView?.message,...t})},Or=a.ikp("button",{_id:"aiChatForm__SuccessButton"}),ma=t=>{const{onClick:e,...i}=t,{form:r,closeForm:s}=F.useChatForm(),o=r?.successView?.doneButton;if(!o)return null;const d=o.icon&&n.jsx(y.BuiltInIconRenderer,{iconSettings:o.icon}),c=o.label;return n.jsx(Or,{onClick:C.composeEventHandlers(e,s),children:n.jsxs(n.Fragment,{children:[d,c]}),...i})};exports.Provider=P.ChatProvider;exports.ActionBar=si;exports.Actions=oi;exports.AttachmentsBar=xt;exports.AttachmentsBarActions=wt;exports.AttachmentsBarAttachment=Tt;exports.AttachmentsBarAttachmentDelete=Ht;exports.AttachmentsBarAttachmentIcon=yt;exports.AttachmentsBarAttachmentTitle=jt;exports.AttachmentsBarForm=Yt;exports.AttachmentsBarFormContent=ti;exports.AttachmentsBarFormContentError=ni;exports.AttachmentsBarFormContentInput=ai;exports.AttachmentsBarFormContentLabel=ii;exports.AttachmentsBarFormSubmitButton=ri;exports.AttachmentsBarFormTitle=Jt;exports.AttachmentsBarFormTitleError=ei;exports.AttachmentsBarFormTitleInput=Zt;exports.AttachmentsBarFormTitleLabel=Xt;exports.AttachmentsBarInfoTip=Lt;exports.AttachmentsBarInfoTipArrow=oe;exports.AttachmentsBarInfoTipIcon=Dt;exports.AttachmentsBarInfoTipText=Rt;exports.AttachmentsBarInput=qt;exports.AttachmentsBarInputs=Ot;exports.AttachmentsBarList=Bt;exports.AttachmentsBarModal=Wt;exports.AttachmentsBarModalBody=Gt;exports.AttachmentsBarModalClose=zt;exports.AttachmentsBarModalContent=Qt;exports.AttachmentsBarModalDescription=Ut;exports.AttachmentsBarModalHeader=Vt;exports.AttachmentsBarModalHeading=$t;exports.AttachmentsBarModalHelp=Kt;exports.AttachmentsBarModalOverlay=Nt;exports.ChatAction=U;exports.ChatActionFeedback=hi;exports.ChatActionLabel=de;exports.ChatHelpAction=Ci;exports.Content=be;exports.ContentScrollArea=ge;exports.ContentScrollAreaCorner=Ee;exports.ContentScrollAreaScrollbar=Ae;exports.ContentScrollAreaThumb=_e;exports.ContentScrollAreaViewport=Pe;exports.Disclaimer=ke;exports.DisclaimerArrow=xe;exports.DisclaimerContent=fe;exports.DisclaimerLabel=Ie;exports.DisclaimerText=Se;exports.DisclaimerTrigger=Me;exports.DynamicComponent=ot;exports.EmbeddedChatPrimitiveActionBar=si;exports.EmbeddedChatPrimitiveActions=oi;exports.EmbeddedChatPrimitiveAttachmentsBar=xt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=Tt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Ht;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=yt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=jt;exports.EmbeddedChatPrimitiveAttachmentsBarForm=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=ti;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=ai;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=ii;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ei;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=oe;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarInput=qt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarList=Bt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Qt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=$t;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Nt;exports.EmbeddedChatPrimitiveChatAction=U;exports.EmbeddedChatPrimitiveChatActionFeedback=hi;exports.EmbeddedChatPrimitiveChatActionLabel=de;exports.EmbeddedChatPrimitiveChatHelpAction=Ci;exports.EmbeddedChatPrimitiveContent=be;exports.EmbeddedChatPrimitiveContentScrollArea=ge;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=Ee;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=Ae;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=_e;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Pe;exports.EmbeddedChatPrimitiveDisclaimer=ke;exports.EmbeddedChatPrimitiveDisclaimerArrow=xe;exports.EmbeddedChatPrimitiveDisclaimerContent=fe;exports.EmbeddedChatPrimitiveDisclaimerLabel=Ie;exports.EmbeddedChatPrimitiveDisclaimerText=Se;exports.EmbeddedChatPrimitiveDisclaimerTrigger=Me;exports.EmbeddedChatPrimitiveDynamicComponent=ot;exports.EmbeddedChatPrimitiveExampleQuestion=je;exports.EmbeddedChatPrimitiveExampleQuestionButton=He;exports.EmbeddedChatPrimitiveExampleQuestions=Be;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=Te;exports.EmbeddedChatPrimitiveExampleQuestionsList=ye;exports.EmbeddedChatPrimitiveFeedbackForm=Mi;exports.EmbeddedChatPrimitiveFeedbackItem=fi;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=Si;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=xi;exports.EmbeddedChatPrimitiveFeedbackItemDescription=Ti;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Bi;exports.EmbeddedChatPrimitiveFeedbackModal=Ai;exports.EmbeddedChatPrimitiveFeedbackModalBody=Ii;exports.EmbeddedChatPrimitiveFeedbackModalClose=ki;exports.EmbeddedChatPrimitiveFeedbackModalContent=Ei;exports.EmbeddedChatPrimitiveFeedbackModalHeader=Fi;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=_i;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=yi;exports.EmbeddedChatPrimitiveFooter=Ft;exports.EmbeddedChatPrimitiveForm=Hi;exports.EmbeddedChatPrimitiveFormCancel=ra;exports.EmbeddedChatPrimitiveFormClose=wi;exports.EmbeddedChatPrimitiveFormContent=Oi;exports.EmbeddedChatPrimitiveFormDescription=Ri;exports.EmbeddedChatPrimitiveFormError=aa;exports.EmbeddedChatPrimitiveFormField=qi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=$i;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=Ui;exports.EmbeddedChatPrimitiveFormFieldEmail=Ni;exports.EmbeddedChatPrimitiveFormFieldError=ia;exports.EmbeddedChatPrimitiveFormFieldFile=Qi;exports.EmbeddedChatPrimitiveFormFieldLabel=Wi;exports.EmbeddedChatPrimitiveFormFieldSelect=Ki;exports.EmbeddedChatPrimitiveFormFieldSelectContent=Ji;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=Yi;exports.EmbeddedChatPrimitiveFormFieldSelectItem=Zi;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ta;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ea;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=zi;exports.EmbeddedChatPrimitiveFormFieldSelectValue=Gi;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=Xi;exports.EmbeddedChatPrimitiveFormFieldText=K;exports.EmbeddedChatPrimitiveFormFieldTextArea=Vi;exports.EmbeddedChatPrimitiveFormFooter=na;exports.EmbeddedChatPrimitiveFormHeader=Li;exports.EmbeddedChatPrimitiveFormHeading=Di;exports.EmbeddedChatPrimitiveFormSubmit=sa;exports.EmbeddedChatPrimitiveFormSuccess=oa;exports.EmbeddedChatPrimitiveFormSuccessButton=ma;exports.EmbeddedChatPrimitiveFormSuccessHeading=da;exports.EmbeddedChatPrimitiveFormSuccessMessage=ca;exports.EmbeddedChatPrimitiveFormWrapper=ji;exports.EmbeddedChatPrimitiveHeaderToolbar=Ce;exports.EmbeddedChatPrimitiveHelpActions=ui;exports.EmbeddedChatPrimitiveHelpActionsMenu=vi;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=bi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=gi;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Pi;exports.EmbeddedChatPrimitiveHelpActionsTrigger=pi;exports.EmbeddedChatPrimitiveInput=Mt;exports.EmbeddedChatPrimitiveInputFieldset=kt;exports.EmbeddedChatPrimitiveInputGroup=It;exports.EmbeddedChatPrimitiveIntroMessageWrapper=Oe;exports.EmbeddedChatPrimitiveMarkdown=st;exports.EmbeddedChatPrimitiveMessageAction=lt;exports.EmbeddedChatPrimitiveMessageAnnotationAction=mt;exports.EmbeddedChatPrimitiveMessageAnnotationActions=ct;exports.EmbeddedChatPrimitiveMessageAttachments=Ge;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=Je;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=Xe;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=Ze;exports.EmbeddedChatPrimitiveMessageAttachmentsList=Ye;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=et;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=it;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=at;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=tt;exports.EmbeddedChatPrimitiveMessageAvatar=Ne;exports.EmbeddedChatPrimitiveMessageAvatarContent=Qe;exports.EmbeddedChatPrimitiveMessageAvatarFallback=Ve;exports.EmbeddedChatPrimitiveMessageAvatarImage=$e;exports.EmbeddedChatPrimitiveMessageContent=ze;exports.EmbeddedChatPrimitiveMessageContentWrapper=Ke;exports.EmbeddedChatPrimitiveMessageHeader=qe;exports.EmbeddedChatPrimitiveMessageLoading=We;exports.EmbeddedChatPrimitiveMessageName=Ue;exports.EmbeddedChatPrimitiveMessageSourceItem=pt;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=vt;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=At;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=_t;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=bt;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=Et;exports.EmbeddedChatPrimitiveMessageSourceItemTag=Pt;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=gt;exports.EmbeddedChatPrimitiveMessageSources=ht;exports.EmbeddedChatPrimitiveMessageSourcesHeader=ut;exports.EmbeddedChatPrimitiveMessageSourcesList=Ct;exports.EmbeddedChatPrimitiveMessageToolbar=dt;exports.EmbeddedChatPrimitiveMessageWrapper=se;exports.EmbeddedChatPrimitiveMessages=Fe;exports.EmbeddedChatPrimitiveRoot=ue;exports.EmbeddedChatPrimitiveSendButton=ft;exports.EmbeddedChatPrimitiveSendButtonIcon=St;exports.EmbeddedChatPrimitiveTaglineBrandName=li;exports.EmbeddedChatPrimitiveTaglineContainer=di;exports.EmbeddedChatPrimitiveTaglineLogo=mi;exports.EmbeddedChatPrimitiveTaglineText=ci;exports.EmbeddedChatPrimitiveToolbarHeader=ve;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=pe;exports.EmbeddedChatPrimitiveWorkflow=Re;exports.EmbeddedChatPrimitiveWorkflows=we;exports.EmbeddedChatPrimitiveWorkflowsLabel=Le;exports.EmbeddedChatPrimitiveWorkflowsList=De;exports.EmbeddedChatPrimitiveWrapper=he;exports.ExampleQuestion=je;exports.ExampleQuestionButton=He;exports.ExampleQuestions=Be;exports.ExampleQuestionsLabel=Te;exports.ExampleQuestionsList=ye;exports.FeedbackForm=Mi;exports.FeedbackItem=fi;exports.FeedbackItemCheckbox=Si;exports.FeedbackItemCheckboxIndicator=xi;exports.FeedbackItemDescription=Ti;exports.FeedbackItemLabel=Bi;exports.FeedbackModal=Ai;exports.FeedbackModalBody=Ii;exports.FeedbackModalClose=ki;exports.FeedbackModalContent=Ei;exports.FeedbackModalHeader=Fi;exports.FeedbackModalOverlay=_i;exports.FeedbackSubmitButton=yi;exports.Footer=Ft;exports.Form=Hi;exports.FormCancel=ra;exports.FormClose=wi;exports.FormContent=Oi;exports.FormDescription=Ri;exports.FormError=aa;exports.FormField=qi;exports.FormFieldCheckbox=$i;exports.FormFieldCheckboxIndicator=Ui;exports.FormFieldEmail=Ni;exports.FormFieldError=ia;exports.FormFieldFile=Qi;exports.FormFieldLabel=Wi;exports.FormFieldSelect=Ki;exports.FormFieldSelectContent=Ji;exports.FormFieldSelectIcon=Yi;exports.FormFieldSelectItem=Zi;exports.FormFieldSelectItemIndicator=ta;exports.FormFieldSelectItemText=ea;exports.FormFieldSelectTrigger=zi;exports.FormFieldSelectValue=Gi;exports.FormFieldSelectViewport=Xi;exports.FormFieldText=K;exports.FormFieldTextArea=Vi;exports.FormFooter=na;exports.FormHeader=Li;exports.FormHeading=Di;exports.FormSubmit=sa;exports.FormSuccess=oa;exports.FormSuccessButton=ma;exports.FormSuccessHeading=da;exports.FormSuccessMessage=ca;exports.FormWrapper=ji;exports.Header=Da;exports.HeaderToolbar=Ce;exports.HeaderToolbarWrapper=pe;exports.HelpActions=ui;exports.HelpActionsMenu=vi;exports.HelpActionsMenuArrow=bi;exports.HelpActionsMenuItem=gi;exports.HelpActionsMenuItemIcon=Pi;exports.HelpActionsTrigger=pi;exports.Input=Mt;exports.InputFieldset=kt;exports.InputGroup=It;exports.IntroMessageWrapper=Oe;exports.Markdown=st;exports.MessageAction=lt;exports.MessageAnnotationAction=mt;exports.MessageAnnotationActions=ct;exports.MessageAttachments=Ge;exports.MessageAttachmentsItem=Je;exports.MessageAttachmentsItemIcon=Xe;exports.MessageAttachmentsItemTitle=Ze;exports.MessageAttachmentsList=Ye;exports.MessageAttachmentsPreview=et;exports.MessageAttachmentsPreviewBody=rt;exports.MessageAttachmentsPreviewClose=nt;exports.MessageAttachmentsPreviewContent=it;exports.MessageAttachmentsPreviewHeader=at;exports.MessageAttachmentsPreviewOverlay=tt;exports.MessageAvatar=Ne;exports.MessageAvatarContent=Qe;exports.MessageAvatarFallback=Ve;exports.MessageAvatarImage=$e;exports.MessageContent=ze;exports.MessageContentWrapper=Ke;exports.MessageHeader=qe;exports.MessageLoading=We;exports.MessageName=Ue;exports.MessageSourceItem=pt;exports.MessageSourceItemBreadcrumbIcon=Bn;exports.MessageSourceItemBreadcrumbs=vt;exports.MessageSourceItemDescription=At;exports.MessageSourceItemDescriptionPart=_t;exports.MessageSourceItemIcon=bt;exports.MessageSourceItemIndicator=Et;exports.MessageSourceItemTag=Pt;exports.MessageSourceItemTitle=gt;exports.MessageSources=ht;exports.MessageSourcesHeader=ut;exports.MessageSourcesList=Ct;exports.MessageToolbar=dt;exports.MessageWrapper=se;exports.Messages=Fe;exports.PrimitiveMessagePart=Pn;exports.Root=ue;exports.SendButton=ft;exports.SendButtonIcon=St;exports.TaglineBrandName=li;exports.TaglineContainer=di;exports.TaglineLogo=mi;exports.TaglineText=ci;exports.ToolbarHeader=ve;exports.Workflow=Re;exports.Workflows=we;exports.WorkflowsLabel=Le;exports.WorkflowsList=De;exports.Wrapper=he;
|
|
11
|
+
`);B(ce)},share:async()=>{},clear:d,stop:c},z={copy:A,share:k};return n.jsx(L.Tooltip,{delayDuration:0,open:z[e],children:n.jsx(nr,{"data-type":e,"data-copied":u.dataAttr(A||k),className:`${r} ${e}`,children:n.jsx(de,{action:e}),onClick:C.composeEventHandlers(i,O[e]),...s})})},rr=a.ikp("span",{_id:"aiChat__ChatActionLabel"}),de=t=>{const{action:e,...i}=t,{aiChatSettings:r}=b.useInkeepConfig(),s=r.toolbarButtonLabels??{},o={help:s.getHelp??"Get Help",copy:s.copyChat??"Copy",share:s.share??"Share",clear:s.clear??"Clear",stop:s.stop??"Stop"};return n.jsx(rr,{children:o[e],...i})},sr=a.ikp(L.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),hi=t=>{const{action:e,children:i,...r}=t,s={copy:"Copied!",share:"Link copied!"};return n.jsxs(sr,{sideOffset:5,...r,children:[n.jsx(L.Arrow,{}),i||s[e]]})},or=a.ikp(w.Root,{_id:"aiChatHelpActions"}),ui=t=>{const{children:e,...i}=t,{aiChatSettings:r}=b.useInkeepConfig(),{getHelpOptions:s}=r;if(!s||(s??[]).length===0)return null;const{_pinned:o,_unpinned:d}=s.reduce((p,g)=>{const v=g.isPinnedToToolbar?"_pinned":"_unpinned";return{...p,[v]:[...p[v],g]}},{_pinned:[],_unpinned:[]}),c=d.length===1?[...o,d[0]]:o,m=d.length===1?[]:d,l=X.useHelpMenuState();return n.jsx(X.HelpMenuProvider,{value:l,children:n.jsx(or,{open:l.open,onOpenChange:l.setOpen,children:u.maybeRender(e,{pinned:c,unpinned:m}),...i})})},dr=a.ikp(U,{_id:"aiChatHelpAction",action:"help"}),cr=a.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),Ci=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=te.useChatAction(e),d=e.action.type,c={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:C.composeEventHandlers(i,()=>{s(),o()}),...r};return d==="open_link"?n.jsx(cr,{href:e.action.url,...c}):n.jsx(dr,{...c})},mr=a.ikp(w.Trigger,{_id:"aiChatHelpActions__Trigger"}),pi=h.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(U,{action:"help",...t,asChild:!0,children:n.jsx(mr,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),lr=a.ikp(w.Content,{_id:"aiChatHelpActions__Menu"}),vi=t=>n.jsx(lr,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),bi=a.ikp(w.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),gi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=te.useChatAction(e),{setOpen:d}=X.useHelpMenu(),c=()=>{s({onOpenForm:()=>d(!1)}),o()},m=e.action.type,l=a.ikp(m==="open_link"?"a":"button",{_id:"aiChatHelpActions__MenuItem",children:e.name,"aria-label":e.name,"data-name":e.name,"data-type":e.action.type,...m==="open_link"&&{href:e.action.url,target:"_blank",rel:"noopener"},onClick:C.composeEventHandlers(i,c)});return n.jsx(l,{...r})},hr=a.ikp(T.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Pi=t=>{const{action:e,...i}=t;return e.icon?n.jsx(hr,{iconSettings:e.icon,...i}):null},ur=a.ikp(E.Root,{_id:"aiChatFeedbackModal"}),Ai=t=>{const{onOpenChange:e,...i}=t,{currentFeedback:r,setCurrentFeedback:s}=ee.useMessageFeedback();return n.jsx(ur,{open:r!==null,onOpenChange:C.composeEventHandlers(e,()=>s(null)),...i})},_i=a.ikp(E.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),Ei=a.ikp(E.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),Fi=a.ikp(E.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),ki=a.ikp(E.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Ii=a.ikp("div",{_id:"aiChatFeedbackModal__Body"}),Cr=a.ikp("form",{_id:"aiChatFeedbackForm"}),Mi=t=>{const{onSubmit:e,...i}=t,{submitNegativeFeedback:r,currentFeedback:s,setCurrentFeedback:o}=ee.useMessageFeedback(),d=c=>{c.preventDefault();const m=c.target,l=new FormData(m),p=Object.fromEntries(l.entries());s&&(r(s,p),o(null))};return n.jsx(Cr,{onSubmit:C.composeEventHandlers(e,d),...i})},pr=a.ikp("div",{_id:"aiChatFeedbackItem"}),fi=t=>{const{name:e,...i}=t;return n.jsx(V.FeedbackItemProvider,{name:e,children:n.jsx(pr,{...i})})},vr=a.ikp($.Root,{_id:"aiChatFeedbackItem__Checkbox"}),Si=t=>{const{name:e,focusItem:i}=V.useFeedbackItem(),{onCheckedChange:r,...s}=t,o=d=>{d&&i?.current?.focus()};return n.jsx(vr,{id:`feedback-${e}`,name:e,onCheckedChange:C.composeEventHandlers(r,o),...s})},xi=a.ikp($.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),br=a.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Bi=t=>{const{name:e}=V.useFeedbackItem(),i={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return n.jsx(br,{htmlFor:`feedback-${e}`,children:i[e],...t})},gr=a.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),yi=t=>{const{name:e,focusItem:i}=V.useFeedbackItem();return n.jsx(gr,{ref:i,name:`${e}:description`,...t})},Ti=a.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Pr=a.ikp("div",{_id:"aiChatForm__Wrapper"}),ji=t=>{const{form:e}=F.useChatForm();return e?n.jsx(Pr,{...t}):null},Ar=a.ikp("form",{_id:"aiChatForm"}),Hi=t=>{const{onSubmit:e,...i}=t,{conversationId:r,messages:s}=P.useChat(),{handleSubmit:o,isSuccess:d}=F.useChatForm();return d?null:n.jsx(Ar,{onSubmit:C.composeEventHandlers(e,c=>o(c,{id:r,messages:s})),...i})},_r=a.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),wi=t=>{const{onClick:e,...i}=t,{closeForm:r}=F.useChatForm();return n.jsx(_r,{onClick:C.composeEventHandlers(e,r),...i})},Li=a.ikp("div",{_id:"aiChatForm__Header"}),Er=a.ikp("h2",{_id:"aiChatForm__Heading"}),Di=t=>{const{form:e}=F.useChatForm();return e?.heading?n.jsx(Er,{children:e.heading,...t}):null},Fr=a.ikp(Q.Markdown,{_id:"aiChatForm__Description"}),Ri=t=>{const{form:e}=F.useChatForm();return e?.description?n.jsx(Fr,{children:e.description,...t}):null},kr=a.ikp("div",{_id:"aiChatForm__Content"}),Oi=t=>{const{children:e,...i}=t,{getFields:r}=F.useChatForm(),{conversationId:s}=P.useChat(),o=r(s)||[];return n.jsx(kr,{children:u.maybeRender(e,o),...i})},Ir=a.ikp("div",{_id:"aiChatForm__Field"}),qi=t=>{const{field:e,autoFocus:i,...r}=t,{control:s,errors:o}=F.useChatForm();return n.jsx(ka.Controller,{name:e.name,control:s,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const c=d.value!==void 0||e.inputType==="file";return n.jsx(H.FormFieldProvider,{"data-invalid":u.dataAttr(!!o[e.name]),field:e,fieldProps:d,autoFocus:i,children:c&&n.jsx(Ir,{"data-input-type":e.inputType,"data-hidden":u.dataAttr(e.isHidden),...r})})}})},Mr=a.ikp("label",{_id:"aiChatForm__FieldLabel"}),Wi=t=>{const{field:e}=H.useFormField();return n.jsx(Mr,{"data-required":u.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},fr=a.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),K=t=>{const{field:e,error:i,fieldProps:{onChange:r,onBlur:s,...o},autoFocus:d}=H.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(fr,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":u.dataAttr(!!i),onChange:C.composeEventHandlers(c,r),onBlur:C.composeEventHandlers(m,s),...o,...l})},Ni=a.ikp(K,{_id:"aiChatForm__FieldEmail",type:"email"}),Sr=a.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Qi=t=>{const{field:e,error:i,fieldProps:{value:r,onChange:s,onBlur:o,...d},autoFocus:c}=H.useFormField(),{onChange:m,onBlur:l,...p}=t,g=v=>{const A=v.target.files;s(A)};return n.jsx(Sr,{id:e.name,autoFocus:c,"data-value":r,"data-invalid":u.dataAttr(!!i),...p,...d,onChange:C.composeEventHandlers(m,g),onBlur:C.composeEventHandlers(l,o)})},Vi=a.ikp(K,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(Z,{maxRows:8})}),xr=a.ikp($.Root,{_id:"aiChatForm__FieldCheckbox"}),$i=t=>{const{field:e,error:i,fieldProps:r,autoFocus:s}=H.useFormField(),{onCheckedChange:o,...d}=t;return n.jsx(xr,{id:e.name,name:e.name,autoFocus:s,"data-invalid":u.dataAttr(!!i),checked:r.value,onCheckedChange:C.composeEventHandlers(o,r.onChange),...d})},Ui=a.ikp($.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),Br=a.ikp(y.Root,{_id:"aiChatForm__FieldSelect"}),Ki=t=>{const{field:e,error:i,fieldProps:r}=H.useFormField(),{onValueChange:s,...o}=t;return n.jsx(Br,{name:e.name,"data-invalid":u.dataAttr(!!i),value:r.value,onValueChange:C.composeEventHandlers(s,r.onChange),...o})},zi=a.ikp(y.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),yr=a.ikp(y.Value,{_id:"aiChatForm__FieldSelect__Value"}),Gi=t=>{const{field:e}=H.useFormField();return n.jsx(yr,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},Yi=a.ikp(y.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(T.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),Ji=a.ikp(y.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),Xi=a.ikp(y.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),Zi=a.ikp(y.Item,{_id:"aiChatForm__FieldSelect__Item"}),ea=a.ikp(y.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ta=a.ikp(y.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(T.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),Tr=a.ikp("span",{_id:"aiChatForm__FieldError"}),ia=t=>{const{error:e}=H.useFormField();return e?n.jsx(Tr,{children:e.message?.toString(),...t}):null},jr=a.ikp("span",{_id:"aiChatForm__Error"}),aa=t=>{const{formError:e}=F.useChatForm();return e?n.jsx(jr,{children:e.message,...t}):null},na=a.ikp("div",{_id:"aiChatForm__Footer"}),Hr=a.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),ra=t=>{const{onClick:e,...i}=t,{closeForm:r}=F.useChatForm();return n.jsx(Hr,{onClick:C.composeEventHandlers(e,r),...i})},wr=a.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),sa=t=>{const{onClick:e,...i}=t,{isSubmitting:r,form:s}=F.useChatForm(),o=s?.buttons.submit.label||"Submit";return n.jsx(wr,{disabled:r,...i,children:o})},Lr=a.ikp("div",{_id:"aiChatForm__Success"}),oa=t=>{const{isSuccess:e}=F.useChatForm();return e?n.jsx(Lr,{...t}):null},Dr=a.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),da=t=>{const{form:e}=F.useChatForm();return n.jsx(Dr,{children:e?.successView?.heading,...t})},Rr=a.ikp(Q.Markdown,{_id:"aiChatForm__SuccessMessage"}),ca=t=>{const{form:e}=F.useChatForm();return n.jsx(Rr,{children:e?.successView?.message,...t})},Or=a.ikp("button",{_id:"aiChatForm__SuccessButton"}),ma=t=>{const{onClick:e,...i}=t,{form:r,closeForm:s}=F.useChatForm(),o=r?.successView?.doneButton;if(!o)return null;const d=o.icon&&n.jsx(T.BuiltInIconRenderer,{iconSettings:o.icon}),c=o.label;return n.jsx(Or,{onClick:C.composeEventHandlers(e,s),children:n.jsxs(n.Fragment,{children:[d,c]}),...i})};exports.Provider=P.ChatProvider;exports.ActionBar=si;exports.Actions=oi;exports.AttachmentsBar=xt;exports.AttachmentsBarActions=wt;exports.AttachmentsBarAttachment=yt;exports.AttachmentsBarAttachmentDelete=Ht;exports.AttachmentsBarAttachmentIcon=Tt;exports.AttachmentsBarAttachmentTitle=jt;exports.AttachmentsBarForm=Yt;exports.AttachmentsBarFormContent=ti;exports.AttachmentsBarFormContentError=ni;exports.AttachmentsBarFormContentInput=ai;exports.AttachmentsBarFormContentLabel=ii;exports.AttachmentsBarFormSubmitButton=ri;exports.AttachmentsBarFormTitle=Jt;exports.AttachmentsBarFormTitleError=ei;exports.AttachmentsBarFormTitleInput=Zt;exports.AttachmentsBarFormTitleLabel=Xt;exports.AttachmentsBarInfoTip=Lt;exports.AttachmentsBarInfoTipArrow=oe;exports.AttachmentsBarInfoTipIcon=Dt;exports.AttachmentsBarInfoTipText=Rt;exports.AttachmentsBarInput=qt;exports.AttachmentsBarInputs=Ot;exports.AttachmentsBarList=Bt;exports.AttachmentsBarModal=Wt;exports.AttachmentsBarModalBody=Gt;exports.AttachmentsBarModalClose=zt;exports.AttachmentsBarModalContent=Qt;exports.AttachmentsBarModalDescription=Ut;exports.AttachmentsBarModalHeader=Vt;exports.AttachmentsBarModalHeading=$t;exports.AttachmentsBarModalHelp=Kt;exports.AttachmentsBarModalOverlay=Nt;exports.ChatAction=U;exports.ChatActionFeedback=hi;exports.ChatActionLabel=de;exports.ChatHelpAction=Ci;exports.Content=be;exports.ContentScrollArea=ge;exports.ContentScrollAreaCorner=Ee;exports.ContentScrollAreaScrollbar=Ae;exports.ContentScrollAreaThumb=_e;exports.ContentScrollAreaViewport=Pe;exports.Disclaimer=ke;exports.DisclaimerArrow=xe;exports.DisclaimerContent=fe;exports.DisclaimerLabel=Ie;exports.DisclaimerText=Se;exports.DisclaimerTrigger=Me;exports.DynamicComponent=ot;exports.EmbeddedChatPrimitiveActionBar=si;exports.EmbeddedChatPrimitiveActions=oi;exports.EmbeddedChatPrimitiveAttachmentsBar=xt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=yt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Ht;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=Tt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=jt;exports.EmbeddedChatPrimitiveAttachmentsBarForm=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=ti;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=ai;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=ii;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ei;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=oe;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarInput=qt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarList=Bt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Qt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=$t;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Nt;exports.EmbeddedChatPrimitiveChatAction=U;exports.EmbeddedChatPrimitiveChatActionFeedback=hi;exports.EmbeddedChatPrimitiveChatActionLabel=de;exports.EmbeddedChatPrimitiveChatHelpAction=Ci;exports.EmbeddedChatPrimitiveContent=be;exports.EmbeddedChatPrimitiveContentScrollArea=ge;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=Ee;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=Ae;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=_e;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Pe;exports.EmbeddedChatPrimitiveDisclaimer=ke;exports.EmbeddedChatPrimitiveDisclaimerArrow=xe;exports.EmbeddedChatPrimitiveDisclaimerContent=fe;exports.EmbeddedChatPrimitiveDisclaimerLabel=Ie;exports.EmbeddedChatPrimitiveDisclaimerText=Se;exports.EmbeddedChatPrimitiveDisclaimerTrigger=Me;exports.EmbeddedChatPrimitiveDynamicComponent=ot;exports.EmbeddedChatPrimitiveExampleQuestion=je;exports.EmbeddedChatPrimitiveExampleQuestionButton=He;exports.EmbeddedChatPrimitiveExampleQuestions=Be;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=ye;exports.EmbeddedChatPrimitiveExampleQuestionsList=Te;exports.EmbeddedChatPrimitiveFeedbackForm=Mi;exports.EmbeddedChatPrimitiveFeedbackItem=fi;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=Si;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=xi;exports.EmbeddedChatPrimitiveFeedbackItemDescription=yi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Bi;exports.EmbeddedChatPrimitiveFeedbackModal=Ai;exports.EmbeddedChatPrimitiveFeedbackModalBody=Ii;exports.EmbeddedChatPrimitiveFeedbackModalClose=ki;exports.EmbeddedChatPrimitiveFeedbackModalContent=Ei;exports.EmbeddedChatPrimitiveFeedbackModalHeader=Fi;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=_i;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=Ti;exports.EmbeddedChatPrimitiveFooter=Ft;exports.EmbeddedChatPrimitiveForm=Hi;exports.EmbeddedChatPrimitiveFormCancel=ra;exports.EmbeddedChatPrimitiveFormClose=wi;exports.EmbeddedChatPrimitiveFormContent=Oi;exports.EmbeddedChatPrimitiveFormDescription=Ri;exports.EmbeddedChatPrimitiveFormError=aa;exports.EmbeddedChatPrimitiveFormField=qi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=$i;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=Ui;exports.EmbeddedChatPrimitiveFormFieldEmail=Ni;exports.EmbeddedChatPrimitiveFormFieldError=ia;exports.EmbeddedChatPrimitiveFormFieldFile=Qi;exports.EmbeddedChatPrimitiveFormFieldLabel=Wi;exports.EmbeddedChatPrimitiveFormFieldSelect=Ki;exports.EmbeddedChatPrimitiveFormFieldSelectContent=Ji;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=Yi;exports.EmbeddedChatPrimitiveFormFieldSelectItem=Zi;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ta;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ea;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=zi;exports.EmbeddedChatPrimitiveFormFieldSelectValue=Gi;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=Xi;exports.EmbeddedChatPrimitiveFormFieldText=K;exports.EmbeddedChatPrimitiveFormFieldTextArea=Vi;exports.EmbeddedChatPrimitiveFormFooter=na;exports.EmbeddedChatPrimitiveFormHeader=Li;exports.EmbeddedChatPrimitiveFormHeading=Di;exports.EmbeddedChatPrimitiveFormSubmit=sa;exports.EmbeddedChatPrimitiveFormSuccess=oa;exports.EmbeddedChatPrimitiveFormSuccessButton=ma;exports.EmbeddedChatPrimitiveFormSuccessHeading=da;exports.EmbeddedChatPrimitiveFormSuccessMessage=ca;exports.EmbeddedChatPrimitiveFormWrapper=ji;exports.EmbeddedChatPrimitiveHeaderToolbar=Ce;exports.EmbeddedChatPrimitiveHelpActions=ui;exports.EmbeddedChatPrimitiveHelpActionsMenu=vi;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=bi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=gi;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Pi;exports.EmbeddedChatPrimitiveHelpActionsTrigger=pi;exports.EmbeddedChatPrimitiveInput=Mt;exports.EmbeddedChatPrimitiveInputFieldset=kt;exports.EmbeddedChatPrimitiveInputGroup=It;exports.EmbeddedChatPrimitiveIntroMessageWrapper=Oe;exports.EmbeddedChatPrimitiveMarkdown=st;exports.EmbeddedChatPrimitiveMessageAction=lt;exports.EmbeddedChatPrimitiveMessageAttachments=Ge;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=Je;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=Xe;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=Ze;exports.EmbeddedChatPrimitiveMessageAttachmentsList=Ye;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=et;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=it;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=at;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=tt;exports.EmbeddedChatPrimitiveMessageAvatar=Ne;exports.EmbeddedChatPrimitiveMessageAvatarContent=Qe;exports.EmbeddedChatPrimitiveMessageAvatarFallback=Ve;exports.EmbeddedChatPrimitiveMessageAvatarImage=$e;exports.EmbeddedChatPrimitiveMessageContent=ze;exports.EmbeddedChatPrimitiveMessageContentWrapper=Ke;exports.EmbeddedChatPrimitiveMessageCustomAction=mt;exports.EmbeddedChatPrimitiveMessageCustomActions=ct;exports.EmbeddedChatPrimitiveMessageHeader=qe;exports.EmbeddedChatPrimitiveMessageLoading=We;exports.EmbeddedChatPrimitiveMessageName=Ue;exports.EmbeddedChatPrimitiveMessageSourceItem=pt;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=vt;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=At;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=_t;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=bt;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=Et;exports.EmbeddedChatPrimitiveMessageSourceItemTag=Pt;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=gt;exports.EmbeddedChatPrimitiveMessageSources=ht;exports.EmbeddedChatPrimitiveMessageSourcesHeader=ut;exports.EmbeddedChatPrimitiveMessageSourcesList=Ct;exports.EmbeddedChatPrimitiveMessageToolbar=dt;exports.EmbeddedChatPrimitiveMessageWrapper=se;exports.EmbeddedChatPrimitiveMessages=Fe;exports.EmbeddedChatPrimitiveRoot=ue;exports.EmbeddedChatPrimitiveSendButton=ft;exports.EmbeddedChatPrimitiveSendButtonIcon=St;exports.EmbeddedChatPrimitiveTaglineBrandName=li;exports.EmbeddedChatPrimitiveTaglineContainer=di;exports.EmbeddedChatPrimitiveTaglineLogo=mi;exports.EmbeddedChatPrimitiveTaglineText=ci;exports.EmbeddedChatPrimitiveToolbarHeader=ve;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=pe;exports.EmbeddedChatPrimitiveWorkflow=Re;exports.EmbeddedChatPrimitiveWorkflows=we;exports.EmbeddedChatPrimitiveWorkflowsLabel=Le;exports.EmbeddedChatPrimitiveWorkflowsList=De;exports.EmbeddedChatPrimitiveWrapper=he;exports.ExampleQuestion=je;exports.ExampleQuestionButton=He;exports.ExampleQuestions=Be;exports.ExampleQuestionsLabel=ye;exports.ExampleQuestionsList=Te;exports.FeedbackForm=Mi;exports.FeedbackItem=fi;exports.FeedbackItemCheckbox=Si;exports.FeedbackItemCheckboxIndicator=xi;exports.FeedbackItemDescription=yi;exports.FeedbackItemLabel=Bi;exports.FeedbackModal=Ai;exports.FeedbackModalBody=Ii;exports.FeedbackModalClose=ki;exports.FeedbackModalContent=Ei;exports.FeedbackModalHeader=Fi;exports.FeedbackModalOverlay=_i;exports.FeedbackSubmitButton=Ti;exports.Footer=Ft;exports.Form=Hi;exports.FormCancel=ra;exports.FormClose=wi;exports.FormContent=Oi;exports.FormDescription=Ri;exports.FormError=aa;exports.FormField=qi;exports.FormFieldCheckbox=$i;exports.FormFieldCheckboxIndicator=Ui;exports.FormFieldEmail=Ni;exports.FormFieldError=ia;exports.FormFieldFile=Qi;exports.FormFieldLabel=Wi;exports.FormFieldSelect=Ki;exports.FormFieldSelectContent=Ji;exports.FormFieldSelectIcon=Yi;exports.FormFieldSelectItem=Zi;exports.FormFieldSelectItemIndicator=ta;exports.FormFieldSelectItemText=ea;exports.FormFieldSelectTrigger=zi;exports.FormFieldSelectValue=Gi;exports.FormFieldSelectViewport=Xi;exports.FormFieldText=K;exports.FormFieldTextArea=Vi;exports.FormFooter=na;exports.FormHeader=Li;exports.FormHeading=Di;exports.FormSubmit=sa;exports.FormSuccess=oa;exports.FormSuccessButton=ma;exports.FormSuccessHeading=da;exports.FormSuccessMessage=ca;exports.FormWrapper=ji;exports.Header=Da;exports.HeaderToolbar=Ce;exports.HeaderToolbarWrapper=pe;exports.HelpActions=ui;exports.HelpActionsMenu=vi;exports.HelpActionsMenuArrow=bi;exports.HelpActionsMenuItem=gi;exports.HelpActionsMenuItemIcon=Pi;exports.HelpActionsTrigger=pi;exports.Input=Mt;exports.InputFieldset=kt;exports.InputGroup=It;exports.IntroMessageWrapper=Oe;exports.Markdown=st;exports.MessageAction=lt;exports.MessageAttachments=Ge;exports.MessageAttachmentsItem=Je;exports.MessageAttachmentsItemIcon=Xe;exports.MessageAttachmentsItemTitle=Ze;exports.MessageAttachmentsList=Ye;exports.MessageAttachmentsPreview=et;exports.MessageAttachmentsPreviewBody=rt;exports.MessageAttachmentsPreviewClose=nt;exports.MessageAttachmentsPreviewContent=it;exports.MessageAttachmentsPreviewHeader=at;exports.MessageAttachmentsPreviewOverlay=tt;exports.MessageAvatar=Ne;exports.MessageAvatarContent=Qe;exports.MessageAvatarFallback=Ve;exports.MessageAvatarImage=$e;exports.MessageContent=ze;exports.MessageContentWrapper=Ke;exports.MessageCustomAction=mt;exports.MessageCustomActions=ct;exports.MessageHeader=qe;exports.MessageLoading=We;exports.MessageName=Ue;exports.MessageSourceItem=pt;exports.MessageSourceItemBreadcrumbIcon=Bn;exports.MessageSourceItemBreadcrumbs=vt;exports.MessageSourceItemDescription=At;exports.MessageSourceItemDescriptionPart=_t;exports.MessageSourceItemIcon=bt;exports.MessageSourceItemIndicator=Et;exports.MessageSourceItemTag=Pt;exports.MessageSourceItemTitle=gt;exports.MessageSources=ht;exports.MessageSourcesHeader=ut;exports.MessageSourcesList=Ct;exports.MessageToolbar=dt;exports.MessageWrapper=se;exports.Messages=Fe;exports.PrimitiveMessagePart=Pn;exports.Root=ue;exports.SendButton=ft;exports.SendButtonIcon=St;exports.TaglineBrandName=li;exports.TaglineContainer=di;exports.TaglineLogo=mi;exports.TaglineText=ci;exports.ToolbarHeader=ve;exports.Workflow=Re;exports.Workflows=we;exports.WorkflowsLabel=Le;exports.WorkflowsList=De;exports.Wrapper=he;
|
|
@@ -2,7 +2,7 @@ import { default as React, ComponentPropsWithRef, ComponentPropsWithoutRef } fro
|
|
|
2
2
|
import { TextareaAutosizeProps } from 'react-textarea-autosize';
|
|
3
3
|
import { Markdown, MarkdownProps } from '../atoms/markdown';
|
|
4
4
|
import { TransformedSourceItem } from '../providers/source-item-provider';
|
|
5
|
-
import { GetHelpOption, MessageAttachment,
|
|
5
|
+
import { GetHelpOption, MessageAttachment, Workflow, WorkflowInputTypes, CustomMessageAction, FormField, FeedbackItemType, Message, MessageAction, ComponentsConfig, InkeepCustomIcon, UrlQueryParam } from '../../types/index.ts';
|
|
6
6
|
import { ChatContextValue, ChatProvider } from './embedded-chat/chat-provider';
|
|
7
7
|
import { MarkdownComponentID } from '../utils/component-ids';
|
|
8
8
|
import { PolymorphicProps } from './factory';
|
|
@@ -48,12 +48,18 @@ export declare const EmbeddedChatPrimitiveDisclaimerArrow: React.ForwardRefExoti
|
|
|
48
48
|
export declare const EmbeddedChatPrimitiveExampleQuestions: (props: ComponentPropsWithRef<"div">) => import("react/jsx-runtime").JSX.Element | null;
|
|
49
49
|
export declare const EmbeddedChatPrimitiveExampleQuestionsLabel: React.MemoExoticComponent<(props: ComponentPropsWithRef<"h3">) => import("react/jsx-runtime").JSX.Element>;
|
|
50
50
|
export interface EmbeddedChatPrimitiveExampleQuestionsListProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
51
|
-
children: React.ReactNode | ((questions: string
|
|
51
|
+
children: React.ReactNode | ((questions: (string | {
|
|
52
|
+
value: string;
|
|
53
|
+
label: string;
|
|
54
|
+
})[]) => React.ReactNode);
|
|
52
55
|
}
|
|
53
56
|
export declare const EmbeddedChatPrimitiveExampleQuestionsList: React.MemoExoticComponent<(props: EmbeddedChatPrimitiveExampleQuestionsListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
54
57
|
export declare const EmbeddedChatPrimitiveExampleQuestion: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
55
58
|
export interface EmbeddedChatPrimitiveExampleQuestionButtonProps extends ComponentPropsWithRef<'button'> {
|
|
56
|
-
question: string
|
|
59
|
+
question: string | {
|
|
60
|
+
value: string;
|
|
61
|
+
label: string;
|
|
62
|
+
};
|
|
57
63
|
}
|
|
58
64
|
export declare const EmbeddedChatPrimitiveExampleQuestionButton: (props: EmbeddedChatPrimitiveExampleQuestionButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
59
65
|
export declare const EmbeddedChatPrimitiveWorkflows: (props: ComponentPropsWithRef<"div">) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -143,14 +149,14 @@ export interface EmbeddedChatPrimitiveMessagePartProps extends ComponentPropsWit
|
|
|
143
149
|
}
|
|
144
150
|
declare const PrimitiveMessageToolbar: React.ForwardRefExoticComponent< PolymorphicProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
145
151
|
export declare const EmbeddedChatPrimitiveMessageToolbar: (props: ComponentPropsWithRef<typeof PrimitiveMessageToolbar>) => import("react/jsx-runtime").JSX.Element | null;
|
|
146
|
-
export interface
|
|
147
|
-
children: React.ReactNode | ((actions:
|
|
152
|
+
export interface EmbeddedChatPrimitiveMessageCustomActionsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
153
|
+
children: React.ReactNode | ((actions: CustomMessageAction[]) => React.ReactNode);
|
|
148
154
|
}
|
|
149
|
-
export declare const
|
|
150
|
-
export interface
|
|
151
|
-
action:
|
|
155
|
+
export declare const EmbeddedChatPrimitiveMessageCustomActions: (props: EmbeddedChatPrimitiveMessageCustomActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
156
|
+
export interface EmbeddedChatPrimitiveMessageCustomActionProps extends ComponentPropsWithRef<'button'> {
|
|
157
|
+
action: CustomMessageAction;
|
|
152
158
|
}
|
|
153
|
-
export declare const
|
|
159
|
+
export declare const EmbeddedChatPrimitiveMessageCustomAction: (props: EmbeddedChatPrimitiveMessageCustomActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
154
160
|
declare const PrimitiveMessageAction: React.ForwardRefExoticComponent< PolymorphicProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id"> & Partial<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id">>>;
|
|
155
161
|
export interface EmbeddedChatPrimitiveMessageActionProps extends ComponentPropsWithRef<typeof PrimitiveMessageAction> {
|
|
156
162
|
action: MessageAction;
|
|
@@ -428,4 +434,4 @@ declare const PrimitiveFormSuccessMessage: React.ForwardRefExoticComponent< Poly
|
|
|
428
434
|
export declare const EmbeddedChatPrimitiveFormSuccessMessage: (props: ComponentPropsWithRef<typeof PrimitiveFormSuccessMessage>) => import("react/jsx-runtime").JSX.Element;
|
|
429
435
|
declare const PrimitiveFormSuccessButton: React.ForwardRefExoticComponent< PolymorphicProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id"> & Partial<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id">>>;
|
|
430
436
|
export declare const EmbeddedChatPrimitiveFormSuccessButton: (props: ComponentPropsWithRef<typeof PrimitiveFormSuccessButton>) => import("react/jsx-runtime").JSX.Element | null;
|
|
431
|
-
export { ChatProvider as Provider, EmbeddedChatPrimitiveWrapper as Wrapper, EmbeddedChatPrimitiveRoot as Root, EmbeddedChatPrimitiveHeader as Header, EmbeddedChatPrimitiveHeaderToolbar as HeaderToolbar, EmbeddedChatPrimitiveToolbarHeaderWrapper as HeaderToolbarWrapper, EmbeddedChatPrimitiveToolbarHeader as ToolbarHeader, EmbeddedChatPrimitiveContent as Content, EmbeddedChatPrimitiveContentScrollArea as ContentScrollArea, EmbeddedChatPrimitiveContentScrollAreaViewport as ContentScrollAreaViewport, EmbeddedChatPrimitiveContentScrollAreaScrollbar as ContentScrollAreaScrollbar, EmbeddedChatPrimitiveContentScrollAreaThumb as ContentScrollAreaThumb, EmbeddedChatPrimitiveContentScrollAreaCorner as ContentScrollAreaCorner, EmbeddedChatPrimitiveMessages as Messages, EmbeddedChatPrimitiveMessageWrapper as MessageWrapper, EmbeddedChatPrimitiveIntroMessageWrapper as IntroMessageWrapper, EmbeddedChatPrimitiveDisclaimer as Disclaimer, EmbeddedChatPrimitiveDisclaimerLabel as DisclaimerLabel, EmbeddedChatPrimitiveDisclaimerTrigger as DisclaimerTrigger, EmbeddedChatPrimitiveDisclaimerContent as DisclaimerContent, EmbeddedChatPrimitiveDisclaimerText as DisclaimerText, EmbeddedChatPrimitiveDisclaimerArrow as DisclaimerArrow, EmbeddedChatPrimitiveExampleQuestions as ExampleQuestions, EmbeddedChatPrimitiveExampleQuestionsLabel as ExampleQuestionsLabel, EmbeddedChatPrimitiveExampleQuestionsList as ExampleQuestionsList, EmbeddedChatPrimitiveExampleQuestion as ExampleQuestion, EmbeddedChatPrimitiveExampleQuestionButton as ExampleQuestionButton, EmbeddedChatPrimitiveWorkflows as Workflows, EmbeddedChatPrimitiveWorkflowsLabel as WorkflowsLabel, EmbeddedChatPrimitiveWorkflowsList as WorkflowsList, EmbeddedChatPrimitiveWorkflow as Workflow, EmbeddedChatPrimitiveMessageHeader as MessageHeader, EmbeddedChatPrimitiveMessageLoading as MessageLoading, EmbeddedChatPrimitiveMessageAvatar as MessageAvatar, EmbeddedChatPrimitiveMessageAvatarContent as MessageAvatarContent, EmbeddedChatPrimitiveMessageAvatarFallback as MessageAvatarFallback, EmbeddedChatPrimitiveMessageAvatarImage as MessageAvatarImage, EmbeddedChatPrimitiveMessageName as MessageName, EmbeddedChatPrimitiveMessageContentWrapper as MessageContentWrapper, EmbeddedChatPrimitiveMessageContent as MessageContent, EmbeddedChatPrimitiveMessageAttachments as MessageAttachments, EmbeddedChatPrimitiveMessageAttachmentsList as MessageAttachmentsList, EmbeddedChatPrimitiveMessageAttachmentsItem as MessageAttachmentsItem, EmbeddedChatPrimitiveMessageAttachmentsItemIcon as MessageAttachmentsItemIcon, EmbeddedChatPrimitiveMessageAttachmentsItemTitle as MessageAttachmentsItemTitle, EmbeddedChatPrimitiveMessageAttachmentsPreview as MessageAttachmentsPreview, EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay as MessageAttachmentsPreviewOverlay, EmbeddedChatPrimitiveMessageAttachmentsPreviewContent as MessageAttachmentsPreviewContent, EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader as MessageAttachmentsPreviewHeader, EmbeddedChatPrimitiveMessageAttachmentsPreviewClose as MessageAttachmentsPreviewClose, EmbeddedChatPrimitiveMessageAttachmentsPreviewBody as MessageAttachmentsPreviewBody, EmbeddedChatPrimitiveMarkdown as Markdown, EmbeddedChatPrimitiveDynamicComponent as DynamicComponent, EmbeddedChatPrimitiveMessageToolbar as MessageToolbar, EmbeddedChatPrimitiveMessageAnnotationActions as MessageAnnotationActions, EmbeddedChatPrimitiveMessageAnnotationAction as MessageAnnotationAction, EmbeddedChatPrimitiveMessageAction as MessageAction, EmbeddedChatPrimitiveMessageSources as MessageSources, EmbeddedChatPrimitiveMessageSourcesHeader as MessageSourcesHeader, EmbeddedChatPrimitiveMessageSourcesList as MessageSourcesList, EmbeddedChatPrimitiveMessageSourceItem as MessageSourceItem, EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs as MessageSourceItemBreadcrumbs, EmbeddedChatPrimitiveMessageSourceItemBreadcrumbIcon as MessageSourceItemBreadcrumbIcon, EmbeddedChatPrimitiveMessageSourceItemIcon as MessageSourceItemIcon, EmbeddedChatPrimitiveMessageSourceItemTitle as MessageSourceItemTitle, EmbeddedChatPrimitiveMessageSourceItemTag as MessageSourceItemTag, EmbeddedChatPrimitiveMessageSourceItemDescription as MessageSourceItemDescription, EmbeddedChatPrimitiveMessageSourceItemDescriptionPart as MessageSourceItemDescriptionPart, EmbeddedChatPrimitiveMessageSourceItemIndicator as MessageSourceItemIndicator, EmbeddedChatPrimitiveFooter as Footer, EmbeddedChatPrimitiveInputFieldset as InputFieldset, EmbeddedChatPrimitiveInputGroup as InputGroup, EmbeddedChatPrimitiveInput as Input, EmbeddedChatPrimitiveSendButton as SendButton, EmbeddedChatPrimitiveSendButtonIcon as SendButtonIcon, EmbeddedChatPrimitiveAttachmentsBar as AttachmentsBar, EmbeddedChatPrimitiveAttachmentsBarList as AttachmentsBarList, EmbeddedChatPrimitiveAttachmentsBarAttachment as AttachmentsBarAttachment, EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon as AttachmentsBarAttachmentIcon, EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle as AttachmentsBarAttachmentTitle, EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete as AttachmentsBarAttachmentDelete, EmbeddedChatPrimitiveAttachmentsBarActions as AttachmentsBarActions, EmbeddedChatPrimitiveAttachmentsBarInfoTip as AttachmentsBarInfoTip, EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon as AttachmentsBarInfoTipIcon, EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow as AttachmentsBarInfoTipArrow, EmbeddedChatPrimitiveAttachmentsBarInfoTipText as AttachmentsBarInfoTipText, EmbeddedChatPrimitiveAttachmentsBarInputs as AttachmentsBarInputs, EmbeddedChatPrimitiveAttachmentsBarInput as AttachmentsBarInput, EmbeddedChatPrimitiveAttachmentsBarModal as AttachmentsBarModal, EmbeddedChatPrimitiveAttachmentsBarModalOverlay as AttachmentsBarModalOverlay, EmbeddedChatPrimitiveAttachmentsBarModalContent as AttachmentsBarModalContent, EmbeddedChatPrimitiveAttachmentsBarModalHeader as AttachmentsBarModalHeader, EmbeddedChatPrimitiveAttachmentsBarModalHeading as AttachmentsBarModalHeading, EmbeddedChatPrimitiveAttachmentsBarModalDescription as AttachmentsBarModalDescription, EmbeddedChatPrimitiveAttachmentsBarModalHelp as AttachmentsBarModalHelp, EmbeddedChatPrimitiveAttachmentsBarModalClose as AttachmentsBarModalClose, EmbeddedChatPrimitiveAttachmentsBarModalBody as AttachmentsBarModalBody, EmbeddedChatPrimitiveAttachmentsBarForm as AttachmentsBarForm, EmbeddedChatPrimitiveAttachmentsBarFormTitle as AttachmentsBarFormTitle, EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel as AttachmentsBarFormTitleLabel, EmbeddedChatPrimitiveAttachmentsBarFormTitleInput as AttachmentsBarFormTitleInput, EmbeddedChatPrimitiveAttachmentsBarFormTitleError as AttachmentsBarFormTitleError, EmbeddedChatPrimitiveAttachmentsBarFormContent as AttachmentsBarFormContent, EmbeddedChatPrimitiveAttachmentsBarFormContentLabel as AttachmentsBarFormContentLabel, EmbeddedChatPrimitiveAttachmentsBarFormContentInput as AttachmentsBarFormContentInput, EmbeddedChatPrimitiveAttachmentsBarFormContentError as AttachmentsBarFormContentError, EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton as AttachmentsBarFormSubmitButton, EmbeddedChatPrimitiveActionBar as ActionBar, EmbeddedChatPrimitiveActions as Actions, EmbeddedChatPrimitiveTaglineContainer as TaglineContainer, EmbeddedChatPrimitiveTaglineText as TaglineText, EmbeddedChatPrimitiveTaglineLogo as TaglineLogo, EmbeddedChatPrimitiveTaglineBrandName as TaglineBrandName, EmbeddedChatPrimitiveChatAction as ChatAction, EmbeddedChatPrimitiveChatActionLabel as ChatActionLabel, EmbeddedChatPrimitiveChatActionFeedback as ChatActionFeedback, EmbeddedChatPrimitiveHelpActions as HelpActions, EmbeddedChatPrimitiveChatHelpAction as ChatHelpAction, EmbeddedChatPrimitiveHelpActionsTrigger as HelpActionsTrigger, EmbeddedChatPrimitiveHelpActionsMenu as HelpActionsMenu, EmbeddedChatPrimitiveHelpActionsMenuArrow as HelpActionsMenuArrow, EmbeddedChatPrimitiveHelpActionsMenuItem as HelpActionsMenuItem, EmbeddedChatPrimitiveHelpActionsMenuItemIcon as HelpActionsMenuItemIcon, EmbeddedChatPrimitiveFeedbackModal as FeedbackModal, EmbeddedChatPrimitiveFeedbackModalOverlay as FeedbackModalOverlay, EmbeddedChatPrimitiveFeedbackModalContent as FeedbackModalContent, EmbeddedChatPrimitiveFeedbackModalHeader as FeedbackModalHeader, EmbeddedChatPrimitiveFeedbackModalClose as FeedbackModalClose, EmbeddedChatPrimitiveFeedbackModalBody as FeedbackModalBody, EmbeddedChatPrimitiveFeedbackForm as FeedbackForm, EmbeddedChatPrimitiveFeedbackItem as FeedbackItem, EmbeddedChatPrimitiveFeedbackItemCheckbox as FeedbackItemCheckbox, EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator as FeedbackItemCheckboxIndicator, EmbeddedChatPrimitiveFeedbackItemLabel as FeedbackItemLabel, EmbeddedChatPrimitiveFeedbackItemDescription as FeedbackItemDescription, EmbeddedChatPrimitiveFeedbackSubmitButton as FeedbackSubmitButton, EmbeddedChatPrimitiveFormWrapper as FormWrapper, EmbeddedChatPrimitiveForm as Form, EmbeddedChatPrimitiveFormClose as FormClose, EmbeddedChatPrimitiveFormHeader as FormHeader, EmbeddedChatPrimitiveFormHeading as FormHeading, EmbeddedChatPrimitiveFormDescription as FormDescription, EmbeddedChatPrimitiveFormContent as FormContent, EmbeddedChatPrimitiveFormField as FormField, EmbeddedChatPrimitiveFormFieldLabel as FormFieldLabel, EmbeddedChatPrimitiveFormFieldText as FormFieldText, EmbeddedChatPrimitiveFormFieldEmail as FormFieldEmail, EmbeddedChatPrimitiveFormFieldFile as FormFieldFile, EmbeddedChatPrimitiveFormFieldTextArea as FormFieldTextArea, EmbeddedChatPrimitiveFormFieldCheckbox as FormFieldCheckbox, EmbeddedChatPrimitiveFormFieldCheckboxIndicator as FormFieldCheckboxIndicator, EmbeddedChatPrimitiveFormFieldSelect as FormFieldSelect, EmbeddedChatPrimitiveFormFieldSelectTrigger as FormFieldSelectTrigger, EmbeddedChatPrimitiveFormFieldSelectValue as FormFieldSelectValue, EmbeddedChatPrimitiveFormFieldSelectIcon as FormFieldSelectIcon, EmbeddedChatPrimitiveFormFieldSelectContent as FormFieldSelectContent, EmbeddedChatPrimitiveFormFieldSelectViewport as FormFieldSelectViewport, EmbeddedChatPrimitiveFormFieldSelectItem as FormFieldSelectItem, EmbeddedChatPrimitiveFormFieldSelectItemText as FormFieldSelectItemText, EmbeddedChatPrimitiveFormFieldSelectItemIndicator as FormFieldSelectItemIndicator, EmbeddedChatPrimitiveFormFieldError as FormFieldError, EmbeddedChatPrimitiveFormFooter as FormFooter, EmbeddedChatPrimitiveFormError as FormError, EmbeddedChatPrimitiveFormCancel as FormCancel, EmbeddedChatPrimitiveFormSubmit as FormSubmit, EmbeddedChatPrimitiveFormSuccess as FormSuccess, EmbeddedChatPrimitiveFormSuccessHeading as FormSuccessHeading, EmbeddedChatPrimitiveFormSuccessMessage as FormSuccessMessage, EmbeddedChatPrimitiveFormSuccessButton as FormSuccessButton, };
|
|
437
|
+
export { ChatProvider as Provider, EmbeddedChatPrimitiveWrapper as Wrapper, EmbeddedChatPrimitiveRoot as Root, EmbeddedChatPrimitiveHeader as Header, EmbeddedChatPrimitiveHeaderToolbar as HeaderToolbar, EmbeddedChatPrimitiveToolbarHeaderWrapper as HeaderToolbarWrapper, EmbeddedChatPrimitiveToolbarHeader as ToolbarHeader, EmbeddedChatPrimitiveContent as Content, EmbeddedChatPrimitiveContentScrollArea as ContentScrollArea, EmbeddedChatPrimitiveContentScrollAreaViewport as ContentScrollAreaViewport, EmbeddedChatPrimitiveContentScrollAreaScrollbar as ContentScrollAreaScrollbar, EmbeddedChatPrimitiveContentScrollAreaThumb as ContentScrollAreaThumb, EmbeddedChatPrimitiveContentScrollAreaCorner as ContentScrollAreaCorner, EmbeddedChatPrimitiveMessages as Messages, EmbeddedChatPrimitiveMessageWrapper as MessageWrapper, EmbeddedChatPrimitiveIntroMessageWrapper as IntroMessageWrapper, EmbeddedChatPrimitiveDisclaimer as Disclaimer, EmbeddedChatPrimitiveDisclaimerLabel as DisclaimerLabel, EmbeddedChatPrimitiveDisclaimerTrigger as DisclaimerTrigger, EmbeddedChatPrimitiveDisclaimerContent as DisclaimerContent, EmbeddedChatPrimitiveDisclaimerText as DisclaimerText, EmbeddedChatPrimitiveDisclaimerArrow as DisclaimerArrow, EmbeddedChatPrimitiveExampleQuestions as ExampleQuestions, EmbeddedChatPrimitiveExampleQuestionsLabel as ExampleQuestionsLabel, EmbeddedChatPrimitiveExampleQuestionsList as ExampleQuestionsList, EmbeddedChatPrimitiveExampleQuestion as ExampleQuestion, EmbeddedChatPrimitiveExampleQuestionButton as ExampleQuestionButton, EmbeddedChatPrimitiveWorkflows as Workflows, EmbeddedChatPrimitiveWorkflowsLabel as WorkflowsLabel, EmbeddedChatPrimitiveWorkflowsList as WorkflowsList, EmbeddedChatPrimitiveWorkflow as Workflow, EmbeddedChatPrimitiveMessageHeader as MessageHeader, EmbeddedChatPrimitiveMessageLoading as MessageLoading, EmbeddedChatPrimitiveMessageAvatar as MessageAvatar, EmbeddedChatPrimitiveMessageAvatarContent as MessageAvatarContent, EmbeddedChatPrimitiveMessageAvatarFallback as MessageAvatarFallback, EmbeddedChatPrimitiveMessageAvatarImage as MessageAvatarImage, EmbeddedChatPrimitiveMessageName as MessageName, EmbeddedChatPrimitiveMessageContentWrapper as MessageContentWrapper, EmbeddedChatPrimitiveMessageContent as MessageContent, EmbeddedChatPrimitiveMessageAttachments as MessageAttachments, EmbeddedChatPrimitiveMessageAttachmentsList as MessageAttachmentsList, EmbeddedChatPrimitiveMessageAttachmentsItem as MessageAttachmentsItem, EmbeddedChatPrimitiveMessageAttachmentsItemIcon as MessageAttachmentsItemIcon, EmbeddedChatPrimitiveMessageAttachmentsItemTitle as MessageAttachmentsItemTitle, EmbeddedChatPrimitiveMessageAttachmentsPreview as MessageAttachmentsPreview, EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay as MessageAttachmentsPreviewOverlay, EmbeddedChatPrimitiveMessageAttachmentsPreviewContent as MessageAttachmentsPreviewContent, EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader as MessageAttachmentsPreviewHeader, EmbeddedChatPrimitiveMessageAttachmentsPreviewClose as MessageAttachmentsPreviewClose, EmbeddedChatPrimitiveMessageAttachmentsPreviewBody as MessageAttachmentsPreviewBody, EmbeddedChatPrimitiveMarkdown as Markdown, EmbeddedChatPrimitiveDynamicComponent as DynamicComponent, EmbeddedChatPrimitiveMessageToolbar as MessageToolbar, EmbeddedChatPrimitiveMessageCustomActions as MessageCustomActions, EmbeddedChatPrimitiveMessageCustomAction as MessageCustomAction, EmbeddedChatPrimitiveMessageAction as MessageAction, EmbeddedChatPrimitiveMessageSources as MessageSources, EmbeddedChatPrimitiveMessageSourcesHeader as MessageSourcesHeader, EmbeddedChatPrimitiveMessageSourcesList as MessageSourcesList, EmbeddedChatPrimitiveMessageSourceItem as MessageSourceItem, EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs as MessageSourceItemBreadcrumbs, EmbeddedChatPrimitiveMessageSourceItemBreadcrumbIcon as MessageSourceItemBreadcrumbIcon, EmbeddedChatPrimitiveMessageSourceItemIcon as MessageSourceItemIcon, EmbeddedChatPrimitiveMessageSourceItemTitle as MessageSourceItemTitle, EmbeddedChatPrimitiveMessageSourceItemTag as MessageSourceItemTag, EmbeddedChatPrimitiveMessageSourceItemDescription as MessageSourceItemDescription, EmbeddedChatPrimitiveMessageSourceItemDescriptionPart as MessageSourceItemDescriptionPart, EmbeddedChatPrimitiveMessageSourceItemIndicator as MessageSourceItemIndicator, EmbeddedChatPrimitiveFooter as Footer, EmbeddedChatPrimitiveInputFieldset as InputFieldset, EmbeddedChatPrimitiveInputGroup as InputGroup, EmbeddedChatPrimitiveInput as Input, EmbeddedChatPrimitiveSendButton as SendButton, EmbeddedChatPrimitiveSendButtonIcon as SendButtonIcon, EmbeddedChatPrimitiveAttachmentsBar as AttachmentsBar, EmbeddedChatPrimitiveAttachmentsBarList as AttachmentsBarList, EmbeddedChatPrimitiveAttachmentsBarAttachment as AttachmentsBarAttachment, EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon as AttachmentsBarAttachmentIcon, EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle as AttachmentsBarAttachmentTitle, EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete as AttachmentsBarAttachmentDelete, EmbeddedChatPrimitiveAttachmentsBarActions as AttachmentsBarActions, EmbeddedChatPrimitiveAttachmentsBarInfoTip as AttachmentsBarInfoTip, EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon as AttachmentsBarInfoTipIcon, EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow as AttachmentsBarInfoTipArrow, EmbeddedChatPrimitiveAttachmentsBarInfoTipText as AttachmentsBarInfoTipText, EmbeddedChatPrimitiveAttachmentsBarInputs as AttachmentsBarInputs, EmbeddedChatPrimitiveAttachmentsBarInput as AttachmentsBarInput, EmbeddedChatPrimitiveAttachmentsBarModal as AttachmentsBarModal, EmbeddedChatPrimitiveAttachmentsBarModalOverlay as AttachmentsBarModalOverlay, EmbeddedChatPrimitiveAttachmentsBarModalContent as AttachmentsBarModalContent, EmbeddedChatPrimitiveAttachmentsBarModalHeader as AttachmentsBarModalHeader, EmbeddedChatPrimitiveAttachmentsBarModalHeading as AttachmentsBarModalHeading, EmbeddedChatPrimitiveAttachmentsBarModalDescription as AttachmentsBarModalDescription, EmbeddedChatPrimitiveAttachmentsBarModalHelp as AttachmentsBarModalHelp, EmbeddedChatPrimitiveAttachmentsBarModalClose as AttachmentsBarModalClose, EmbeddedChatPrimitiveAttachmentsBarModalBody as AttachmentsBarModalBody, EmbeddedChatPrimitiveAttachmentsBarForm as AttachmentsBarForm, EmbeddedChatPrimitiveAttachmentsBarFormTitle as AttachmentsBarFormTitle, EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel as AttachmentsBarFormTitleLabel, EmbeddedChatPrimitiveAttachmentsBarFormTitleInput as AttachmentsBarFormTitleInput, EmbeddedChatPrimitiveAttachmentsBarFormTitleError as AttachmentsBarFormTitleError, EmbeddedChatPrimitiveAttachmentsBarFormContent as AttachmentsBarFormContent, EmbeddedChatPrimitiveAttachmentsBarFormContentLabel as AttachmentsBarFormContentLabel, EmbeddedChatPrimitiveAttachmentsBarFormContentInput as AttachmentsBarFormContentInput, EmbeddedChatPrimitiveAttachmentsBarFormContentError as AttachmentsBarFormContentError, EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton as AttachmentsBarFormSubmitButton, EmbeddedChatPrimitiveActionBar as ActionBar, EmbeddedChatPrimitiveActions as Actions, EmbeddedChatPrimitiveTaglineContainer as TaglineContainer, EmbeddedChatPrimitiveTaglineText as TaglineText, EmbeddedChatPrimitiveTaglineLogo as TaglineLogo, EmbeddedChatPrimitiveTaglineBrandName as TaglineBrandName, EmbeddedChatPrimitiveChatAction as ChatAction, EmbeddedChatPrimitiveChatActionLabel as ChatActionLabel, EmbeddedChatPrimitiveChatActionFeedback as ChatActionFeedback, EmbeddedChatPrimitiveHelpActions as HelpActions, EmbeddedChatPrimitiveChatHelpAction as ChatHelpAction, EmbeddedChatPrimitiveHelpActionsTrigger as HelpActionsTrigger, EmbeddedChatPrimitiveHelpActionsMenu as HelpActionsMenu, EmbeddedChatPrimitiveHelpActionsMenuArrow as HelpActionsMenuArrow, EmbeddedChatPrimitiveHelpActionsMenuItem as HelpActionsMenuItem, EmbeddedChatPrimitiveHelpActionsMenuItemIcon as HelpActionsMenuItemIcon, EmbeddedChatPrimitiveFeedbackModal as FeedbackModal, EmbeddedChatPrimitiveFeedbackModalOverlay as FeedbackModalOverlay, EmbeddedChatPrimitiveFeedbackModalContent as FeedbackModalContent, EmbeddedChatPrimitiveFeedbackModalHeader as FeedbackModalHeader, EmbeddedChatPrimitiveFeedbackModalClose as FeedbackModalClose, EmbeddedChatPrimitiveFeedbackModalBody as FeedbackModalBody, EmbeddedChatPrimitiveFeedbackForm as FeedbackForm, EmbeddedChatPrimitiveFeedbackItem as FeedbackItem, EmbeddedChatPrimitiveFeedbackItemCheckbox as FeedbackItemCheckbox, EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator as FeedbackItemCheckboxIndicator, EmbeddedChatPrimitiveFeedbackItemLabel as FeedbackItemLabel, EmbeddedChatPrimitiveFeedbackItemDescription as FeedbackItemDescription, EmbeddedChatPrimitiveFeedbackSubmitButton as FeedbackSubmitButton, EmbeddedChatPrimitiveFormWrapper as FormWrapper, EmbeddedChatPrimitiveForm as Form, EmbeddedChatPrimitiveFormClose as FormClose, EmbeddedChatPrimitiveFormHeader as FormHeader, EmbeddedChatPrimitiveFormHeading as FormHeading, EmbeddedChatPrimitiveFormDescription as FormDescription, EmbeddedChatPrimitiveFormContent as FormContent, EmbeddedChatPrimitiveFormField as FormField, EmbeddedChatPrimitiveFormFieldLabel as FormFieldLabel, EmbeddedChatPrimitiveFormFieldText as FormFieldText, EmbeddedChatPrimitiveFormFieldEmail as FormFieldEmail, EmbeddedChatPrimitiveFormFieldFile as FormFieldFile, EmbeddedChatPrimitiveFormFieldTextArea as FormFieldTextArea, EmbeddedChatPrimitiveFormFieldCheckbox as FormFieldCheckbox, EmbeddedChatPrimitiveFormFieldCheckboxIndicator as FormFieldCheckboxIndicator, EmbeddedChatPrimitiveFormFieldSelect as FormFieldSelect, EmbeddedChatPrimitiveFormFieldSelectTrigger as FormFieldSelectTrigger, EmbeddedChatPrimitiveFormFieldSelectValue as FormFieldSelectValue, EmbeddedChatPrimitiveFormFieldSelectIcon as FormFieldSelectIcon, EmbeddedChatPrimitiveFormFieldSelectContent as FormFieldSelectContent, EmbeddedChatPrimitiveFormFieldSelectViewport as FormFieldSelectViewport, EmbeddedChatPrimitiveFormFieldSelectItem as FormFieldSelectItem, EmbeddedChatPrimitiveFormFieldSelectItemText as FormFieldSelectItemText, EmbeddedChatPrimitiveFormFieldSelectItemIndicator as FormFieldSelectItemIndicator, EmbeddedChatPrimitiveFormFieldError as FormFieldError, EmbeddedChatPrimitiveFormFooter as FormFooter, EmbeddedChatPrimitiveFormError as FormError, EmbeddedChatPrimitiveFormCancel as FormCancel, EmbeddedChatPrimitiveFormSubmit as FormSubmit, EmbeddedChatPrimitiveFormSuccess as FormSuccess, EmbeddedChatPrimitiveFormSuccessHeading as FormSuccessHeading, EmbeddedChatPrimitiveFormSuccessMessage as FormSuccessMessage, EmbeddedChatPrimitiveFormSuccessButton as FormSuccessButton, };
|