@inkeep/agents-ui 0.14.9 → 0.14.11
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/atoms/dialog.cjs +1 -1
- package/dist/primitives/atoms/dialog.js +90 -87
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -2
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +55 -54
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +103 -64
- package/dist/primitives/components/embedded-chat.cjs +2 -2
- package/dist/primitives/components/embedded-chat.js +33 -33
- package/dist/primitives/hooks/use-streaming-events.cjs +1 -0
- package/dist/primitives/hooks/use-streaming-events.js +140 -0
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/package.json +1 -1
|
@@ -1,82 +1,121 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useState as f, useRef as p, useCallback as
|
|
3
|
-
import { CITATION_ARTIFACT_TYPE as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
c.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
l
|
|
2
|
+
import { useState as f, useRef as p, useCallback as D, useEffect as I, useMemo as z } from "react";
|
|
3
|
+
import { CITATION_ARTIFACT_TYPE as E } from "../../../types/message.js";
|
|
4
|
+
import { useStreamingEvents as M } from "../../hooks/use-streaming-events.js";
|
|
5
|
+
function $(r, i) {
|
|
6
|
+
const [c, P] = f([]), [d, L] = f(/* @__PURE__ */ new Map()), [g, R] = f(Date.now()), [b, h] = f(!1), y = p(0), w = p(0), x = p([]), u = p(d);
|
|
7
|
+
u.current = d;
|
|
8
|
+
const { emitArtifactSaved: k, emitCompletion: C, emitAgentInitializing: T, emitTextDelta: S } = M(), A = D(() => {
|
|
9
|
+
const n = [];
|
|
10
|
+
let e = "", s = [];
|
|
11
|
+
r.length > y.current && (R(Date.now()), y.current = r.length), w.current = 0;
|
|
12
|
+
const o = /* @__PURE__ */ new Map(), m = (t = !1) => {
|
|
13
|
+
if (s.length > 0) {
|
|
14
|
+
const a = `group-${w.current++}`, l = u.current.get(a);
|
|
15
|
+
l ? o.set(a, {
|
|
15
16
|
...l,
|
|
16
|
-
isCompleted:
|
|
17
|
-
}) :
|
|
18
|
-
isCompleted:
|
|
19
|
-
}),
|
|
17
|
+
isCompleted: t
|
|
18
|
+
}) : o.set(a, {
|
|
19
|
+
isCompleted: t
|
|
20
|
+
}), n.push({
|
|
20
21
|
type: "summary-group",
|
|
21
|
-
summaries: [...
|
|
22
|
-
groupKey:
|
|
23
|
-
}),
|
|
22
|
+
summaries: [...s],
|
|
23
|
+
groupKey: a
|
|
24
|
+
}), s = [];
|
|
24
25
|
}
|
|
25
26
|
};
|
|
26
|
-
for (const
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
else if (
|
|
30
|
-
|
|
31
|
-
else if (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
for (const t of r)
|
|
28
|
+
if (t.type === "text")
|
|
29
|
+
m(!0), t.text && i && S(t.text), e += t.text || "";
|
|
30
|
+
else if (t.type === "data-summary")
|
|
31
|
+
e.trim() && (n.push({ type: "text", text: e }), e = ""), s.push(t.data);
|
|
32
|
+
else if (t.type === "data-operation") {
|
|
33
|
+
const a = t.data;
|
|
34
|
+
if (a?.type)
|
|
35
|
+
switch (a.type) {
|
|
36
|
+
case "completion":
|
|
37
|
+
C(
|
|
38
|
+
"unknown",
|
|
39
|
+
// No agent ID available in current structure
|
|
40
|
+
1
|
|
41
|
+
// No iteration available in current structure
|
|
42
|
+
), m(!0);
|
|
43
|
+
break;
|
|
44
|
+
case "agent_initializing":
|
|
45
|
+
T(
|
|
46
|
+
"unknown",
|
|
47
|
+
// No session ID available in current structure
|
|
48
|
+
"unknown"
|
|
49
|
+
// No graph ID available in current structure
|
|
50
|
+
);
|
|
51
|
+
break;
|
|
52
|
+
case "error":
|
|
53
|
+
console.warn("Data operation error:", a.ctx);
|
|
54
|
+
break;
|
|
55
|
+
case "agent_thinking":
|
|
56
|
+
case "agent_ready":
|
|
57
|
+
console.log("Agent state:", a.type, a.ctx);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
} else if (t.type === "data-artifact")
|
|
61
|
+
if (t.data?.type?.toLowerCase() === E) {
|
|
62
|
+
const a = t.data, l = a.artifactSummary || {
|
|
63
|
+
title: a.name
|
|
37
64
|
};
|
|
38
|
-
|
|
65
|
+
e += ` ^${l?.title || a.name}^`;
|
|
39
66
|
} else
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
67
|
+
e.trim() && (n.push({ type: "text", text: e }), e = ""), n.push(t), t.data && k(
|
|
68
|
+
t.data.artifactId || "unknown",
|
|
69
|
+
t.data.taskId || "unknown",
|
|
70
|
+
"unknown",
|
|
71
|
+
// toolCallId not available in current structure
|
|
72
|
+
t.data.artifactType || "unknown",
|
|
73
|
+
t.data.artifactSummary || {},
|
|
74
|
+
// Use artifactSummary as summaryData
|
|
75
|
+
{},
|
|
76
|
+
// fullData not available in current structure
|
|
77
|
+
{ name: t.data.name, description: t.data.description }
|
|
78
|
+
// Use available fields as metadata
|
|
79
|
+
);
|
|
80
|
+
else t.type === "data-component" && (e.trim() && (n.push({ type: "text", text: e }), e = ""), n.push(t));
|
|
81
|
+
return m(!i), e.trim() && n.push({ type: "text", text: e }), { processed: n, newTimings: o };
|
|
82
|
+
}, [r, i, k, C, T, S]);
|
|
83
|
+
I(() => {
|
|
84
|
+
if (x.current === r)
|
|
46
85
|
return;
|
|
47
|
-
|
|
48
|
-
const { processed:
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
return !
|
|
52
|
-
})) &&
|
|
53
|
-
}, [
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
(
|
|
57
|
-
),
|
|
58
|
-
|
|
86
|
+
x.current = r;
|
|
87
|
+
const { processed: n, newTimings: e } = A();
|
|
88
|
+
P(n), (e.size !== u.current.size || Array.from(e.entries()).some(([o, m]) => {
|
|
89
|
+
const t = u.current.get(o);
|
|
90
|
+
return !t || t.isCompleted !== m.isCompleted;
|
|
91
|
+
})) && L(e);
|
|
92
|
+
}, [A, r]);
|
|
93
|
+
const v = D(() => {
|
|
94
|
+
const n = Date.now() - g, e = Array.from(u.current.values()).some(
|
|
95
|
+
(o) => !o.isCompleted
|
|
96
|
+
), s = n > 1e3 && !e;
|
|
97
|
+
h(s);
|
|
59
98
|
}, [g]);
|
|
60
|
-
|
|
61
|
-
if (!
|
|
62
|
-
|
|
99
|
+
I(() => {
|
|
100
|
+
if (!i) {
|
|
101
|
+
h(!1);
|
|
63
102
|
return;
|
|
64
103
|
}
|
|
65
|
-
if (!(
|
|
66
|
-
|
|
104
|
+
if (!(c.length > 0)) {
|
|
105
|
+
h(!1);
|
|
67
106
|
return;
|
|
68
107
|
}
|
|
69
|
-
const
|
|
70
|
-
return () => clearInterval(
|
|
71
|
-
}, [
|
|
72
|
-
const
|
|
108
|
+
const e = setInterval(v, 200);
|
|
109
|
+
return () => clearInterval(e);
|
|
110
|
+
}, [i, v, c.length]);
|
|
111
|
+
const _ = z(() => !(c.length > 0), [c.length]);
|
|
73
112
|
return {
|
|
74
|
-
processedParts:
|
|
75
|
-
summaryTimings:
|
|
76
|
-
shouldShowInitialLoading:
|
|
77
|
-
shouldShowStreamDelayLoading:
|
|
113
|
+
processedParts: c,
|
|
114
|
+
summaryTimings: d,
|
|
115
|
+
shouldShowInitialLoading: _,
|
|
116
|
+
shouldShowStreamDelayLoading: b
|
|
78
117
|
};
|
|
79
118
|
}
|
|
80
119
|
export {
|
|
81
|
-
|
|
120
|
+
$ as useStreamProcessor
|
|
82
121
|
};
|
|
@@ -2,10 +2,10 @@
|
|
|
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:wa,...e,role:"assistant"};return n.jsx(re,{message:v,...i})}),nn=a.ikp("div",{_id:"aiChatMessageHeader"}),We=t=>{const{message:e}=F.useMessage();return n.jsx(nn,{"data-role":e.role,...t})},rn=a.ikp("div",{_id:"aiChatMessageLoading",children:"Thinking..."}),Ne=t=>n.jsx(rn,{...t}),sn=a.ikp("div",{_id:"aiChatMessageAvatar"}),Qe=t=>{const{message:e}=F.useMessage();return n.jsx(sn,{"data-role":e.role,...t})},on=a.ikp(ne.Root,{_id:"aiChatMessageAvatarContent"}),Ve=t=>{const{message:e}=F.useMessage(),{baseSettings:i}=b.useInkeepConfig();return n.jsx(on,{"data-username":h.dataAttr(e.role==="user"&&!!i.userProperties.name),"data-role":e.role,...t})},dn=a.ikp(ne.Fallback,{_id:"aiChatMessageAvatarFallback"}),$e=C.memo(t=>{const{baseSettings:e}=b.useInkeepConfig(),{message:i}=F.useMessage();return e.userProperties.name?n.jsx(dn,{"data-role":i.role,children:h.getInitials(e.userProperties.name),...t}):null}),me=a.ikp(ne.Image,{_id:"aiChatMessageAvatarImage"}),Ue=C.memo(t=>{const{onLoadingStatusChange:e,...i}=t,{aiChatSettings:r,baseSettings:{userProperties:s}}=b.useInkeepConfig(),{message:o}=F.useMessage(),{aiAssistantAvatar:d}=r??{},c=typeof d=="string"?d:d?.light,m=(typeof d=="string"?d:d?.dark)??c,l=Sa.useColorModeValue(c,m),[v,g]=C.useState(l);C.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(Aa.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:u.composeEventHandlers(e,p),...i}):n.jsx(Pa.default,{"data-type":"icon","data-role":o.role,...t})}),cn=a.ikp("span",{_id:"aiChatMessageName"}),Ke=t=>{const{message:e}=F.useMessage();return n.jsx(cn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},mn=a.ikp("div",{_id:"aiChatMessageContentWrapper"}),ze=t=>{const{message:e}=F.useMessage(),{messageButtons:i}=P.useChat(),r=i[e.id]||[];return n.jsx(mn,{"data-role":e.role,"data-has-message-buttons":h.dataAttr(!!r.length),...t})},ln=a.ikp("div",{_id:"aiChatMessageContent"}),Ge=t=>{const{message:e}=F.useMessage();return n.jsx(ln,{"data-role":e.role,...t})},hn=a.ikp("div",{_id:"aiChatMessageAttachments"}),Ye=t=>{const{message:e}=F.useMessage(),i=[];return e.role!=="user"||!i?.length?null:n.jsx(R.MessageAttachmentsProvider,{children:n.jsx(hn,{...t})})},un=a.ikp("div",{_id:"aiChatMessageAttachments__List"}),Je=t=>{const{children:e,...i}=t,r=[];return r?n.jsx(un,{children:h.maybeRender(e,r),...i}):null},Cn=a.ikp("div",{_id:"aiChatMessageAttachments__Item"}),Xe=t=>{const{attachment:e,onClick:i,...r}=t,{selectItem:s,onOpen:o}=R.useMessageAttachments(),d=()=>{s(e),o()};return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(Cn,{onClick:u.composeEventHandlers(i,d),...r})})},pn=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),Ze=t=>{const{attachment:e}=L.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(pn,{iconSettings:i,...t}):null},vn=a.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),et=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(vn,{children:e.title,...t})},bn=a.ikp(E.Root,{_id:"aiChatMessageAttachmentsPreview"}),tt=t=>{const{onOpenChange:e,...i}=t,{selectItem:r,isOpen:s,onClose:o,selectedItem:d}=R.useMessageAttachments(),c=m=>{m||(o(),r(null))};return n.jsx(bn,{open:s&&d!==null,onOpenChange:u.composeEventHandlers(e,c),...i})},it=a.ikp(E.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),at=a.ikp(E.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),gn=a.ikp(E.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),nt=t=>{const{selectedItem:e}=R.useMessageAttachments();return n.jsx(gn,{children:e?.title||"Attachment",...t})},rt=a.ikp(E.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Pn=a.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),st=t=>{const{selectedItem:e}=R.useMessageAttachments();return n.jsx(Pn,{children:e?.content,...t})},ot=t=>{const{text:e,componentStyles:i,...r}=t,{aiChatSettings:s}=b.useInkeepConfig(),{shouldOpenLinksInNewTab:o}=s;return n.jsx(W.Markdown,{children:e,componentStyles:i,shouldOpenLinksInNewTab:o,...r})},dt=({name:t,props:e,componentDef:i})=>{const s=ya.useShadow()?.shadowHost,o=C.useRef(void 0),d=C.useRef(null),c=C.useRef(null),m=C.useRef(!1),[l,v]=C.useState(!1),[g,p]=C.useState(!1);return C.useEffect(()=>{o.current||(o.current=`dyn:${t}:${crypto.randomUUID()}`,v(!0))},[t]),C.useLayoutEffect(()=>{if(!i||!s||!l||!o.current)return;const A=o.current,M=document.createElement("div");return M.setAttribute("data-component",t),M.setAttribute("slot",A),d.current=M,m.current=!1,s.appendChild(M),p(!0),()=>{m.current=!0,p(!1),queueMicrotask(()=>{try{c.current&&(c.current.unmount(),c.current=null)}catch(_){console.debug("Ignoring unmount error:",_)}M.parentNode===s&&M.remove(),d.current=null})}},[i,s,l,t]),C.useEffect(()=>{const A=d.current;if(!A||m.current)return;const M=I=>{if(typeof I!="function"||I.length>1)return!1;try{if(typeof I=="function"&&I.constructor===Function){const w=I({});return C.isValidElement(w)}return!1}catch{return!0}};let _;if(M(i))try{const I=i;_=C.createElement(I,e||{})}catch(I){console.error("Error creating React element from component:",I);return}else if(typeof i=="function")_=i(e||{},A,null);else{console.error("Invalid component definition");return}if(C.isValidElement(_)||typeof _=="string"){if(m.current)return;c.current||(c.current=Ha.createRoot(A)),!m.current&&c.current&&c.current.render(_);return}c.current&&!m.current&&c.current.render(null)},[i,e,g]),n.jsx("slot",{name:o.current})},An=a.ikp("div",{_id:"aiChatMessagePart"}),_n=a.ikp("div",{_id:"aiChatMessageToolbar"}),ct=t=>{const{isLoading:e,messages:i}=P.useChat(),{message:r}=F.useMessage();return i.at(-1)?.id===r?.id&&e||r.role==="user"?null:n.jsx(_n,{...t})},En=a.ikp("div",{_id:"aiChatMessageAnnotationActions"}),mt=t=>{const{children:e,...i}=t,{message:r}=F.useMessage(),{messageButtons:s}=P.useChat(),o=s[r.id]||[];return n.jsx(En,{children:h.maybeRender(e,o),...i})},Fn=a.ikp("a",{_id:"aiChatMessageAnnotationAction"}),kn=a.ikp("button",{_id:"aiChatMessageAnnotationAction"}),lt=t=>{const{onClick:e,action:i,...r}=t,{handleAction:s}=ee.useChatAction(i),{logEvent:o}=ae.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(B.BuiltInIconRenderer,{iconSettings:i.icon}),m]});return i.action.type==="open_link"?n.jsx(Fn,{href:i.action.url,target:"_blank",rel:"noopener","data-type":i.action.type,onClick:u.composeEventHandlers(e,c),children:l,...r}):n.jsx(kn,{"data-type":i.action.type,onClick:u.composeEventHandlers(e,c),children:l,...r})},In=a.ikp("button",{_id:"aiChatMessageAction"}),ht=t=>{const{action:e,onClick:i,className:r,...s}=t,{conversationId:o}=P.useChat(),{baseSettings:{onFeedback:d}}=b.useInkeepConfig(),{message:c}=F.useMessage(),{isStreaming:m,messages:l}=P.useChat(),[v,g]=Y.useCopyToClipboard(),{feedback:p,submitPositiveFeedback:A,setCurrentFeedback:M,currentFeedback:_}=Z.useMessageFeedback(),{logEvent:I}=ae.useBaseEvents(),[w,de]=Fa.useSettleAction(),U=l.at(-1)?.id===c?.id,K=c.role==="assistant";if(U&&m||!K)return null;const q={copy(){g(h.getMessageContent(c)),I({eventName:"assistant_message_copied",properties:{conversationId:o}})},upvote(){A(c.id).then(()=>{de()})},downvote(){M(c.id)}},z={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},G={copy:n.jsx(f.CustomIcon,{iconKey:v?"messageCopied":"messageCopy"}),upvote:n.jsx(f.CustomIcon,{iconKey:w?"messageCopied":"thumbsUp"}),downvote:n.jsx(f.CustomIcon,{iconKey:"thumbsDown"})},ha={copy:{"data-copied":h.dataAttr(v)},upvote:{"data-upvoted":h.dataAttr(p[c.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(p[c.id]?.type==="negative"),"data-state":_===null?"closed":"open"}};return{copy:!1,upvote:!d,downvote:!d}[e]?null:n.jsx(In,{"data-action":e,...ha[e],children:G[e],"aria-label":z[e],className:`${r} ${e}`,onClick:u.composeEventHandlers(i,q[e]),...s})},Mn=a.ikp("div",{_id:"aiChatMessageSources"}),ut=t=>{const{message:e}=F.useMessage();return e.role!=="assistant"||!e.parts.filter(r=>r.type==="data-artifact"&&r.data?.type?.toLowerCase()===he.CITATION_ARTIFACT_TYPE)?.length?null:n.jsx(Mn,{...t})},fn=a.ikp("div",{_id:"aiChatMessageSources__Header"}),Ct=t=>n.jsx(fn,{children:"Sources",...t}),Sn=a.ikp("div",{_id:"aiChatMessageSources__List"}),pt=t=>{const{message:e}=F.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()===he.CITATION_ARTIFACT_TYPE);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},_=(s??(w=>({...w,shouldOpenInNewTab:d,icon:ja.getIcon(w)})))(A,"chatSourceItem",{organizationDisplayName:o,tabs:c}),I=_.shouldOpenInNewTab!==void 0?_.shouldOpenInNewTab:d;return{..._,isExternal:I}});return n.jsx(Sn,{children:h.maybeRender(i,v),...r})},xn=a.ikp(_a.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),vt=t=>{const{source:e,onClick:i,...r}=t,{logEvent:s}=ae.useBaseEvents(),{conversationId:o}=P.useChat(),d=()=>{s({eventName:"assistant_source_item_clicked",properties:{conversationId:o,link:e}})};return n.jsx(T.SourceItemProvider,{source:e,children:n.jsx(xn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:u.composeEventHandlers(i,d),...r})})},Bn=a.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),bt=t=>{const{source:e}=T.useSourceItem();return e.breadcrumbs?.length?n.jsx(Bn,{"data-type":e.type,...t}):null},Tn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),yn=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),gt=t=>{const{source:e}=T.useSourceItem();return n.jsx(yn,{iconSettings:e.icon,"data-type":e.type,...t})},jn=a.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),Pt=t=>{const{source:e}=T.useSourceItem();return n.jsx(jn,{"data-type":e.type,children:e.title,...t})},Hn=a.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),At=t=>{const{source:e}=T.useSourceItem();return n.jsx(Hn,{"data-type":e.type,...t})},wn=a.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),_t=t=>{const{source:e}=T.useSourceItem(),{children:i,...r}=t,s=C.useMemo(()=>e.description?Ma.highlightEmphasis(e.description):[],[e.description]);return s.length?n.jsx(wn,{"data-type":e.type,children:h.maybeRender(i,s),...r}):null},Ln=a.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),Et=t=>{const{part:e,...i}=t,{source:r}=T.useSourceItem();return typeof e=="string"?e:n.jsx(Ln,{"data-type":r.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...i})},Dn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),Ft=t=>{const{source:e}=T.useSourceItem();return n.jsx(Dn,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},kt=a.ikp("div",{_id:"aiChatFooter"}),It=a.ikp("div",{_id:"aiChatInput__Fieldset"}),Mt=a.ikp("div",{_id:"aiChatInput__Group"}),Rn=a.ikp("textarea",{_id:"aiChatInput"}),ft=C.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=te.useComposedRefs(r,l);return Ta.useWidgetAutoFocus("chat",l,m),n.jsx(Rn,{asChild:!0,ref:g,maxLength:99999,placeholder:v.placeholder,value:d,onChange:u.composeEventHandlers(t,s),onKeyDown:u.composeEventHandlers(e,o),disabled:!!c||v.isViewOnly,...i,children:n.jsx(X,{})})}),On=a.ikp("button",{_id:"aiChatInput__SendButton"}),St=t=>{const{handleSubmit:e,isSubmitDisabled:i,error:r}=P.useChat(),{aiChatSettings:s}=b.useInkeepConfig(),{onClick:o,...d}=t;return n.jsx(On,{onClick:u.composeEventHandlers(o,()=>e()),"aria-label":"Send message",disabled:i||!!r||s.isViewOnly,...d})},xt=a.ikp(f.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),qn=a.ikp("div",{_id:"aiChatAttachmentsBar"}),Bt=t=>{const e={supportedInputs:[]};return!e||!e.supportedInputs?.length?null:n.jsx(S.AttachmentsBarProvider,{children:n.jsx(qn,{...t})})},Wn=a.ikp("div",{_id:"aiChatAttachmentsBar__List"}),Tt=t=>{const{children:e,...i}=t,r=[];return n.jsx(Wn,{children:h.maybeRender(e,r),...i})},Nn=a.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),yt=t=>{const{attachment:e,...i}=t;return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(Nn,{...i})})},Qn=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),jt=t=>{const{attachment:e}=L.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(Qn,{iconSettings:i,...t}):null},Vn=a.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),Ht=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(Vn,{children:e.title,...t})},$n=a.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),wt=t=>{const{onClick:e,...i}=t,r=()=>{};return n.jsx($n,{"aria-label":"Remove attachment",children:n.jsx(f.CustomIcon,{iconKey:"close"}),onClick:u.composeEventHandlers(e,r),...i})},Lt=a.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Dt=a.ikp(H.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Rt=a.ikp(H.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(f.CustomIcon,{iconKey:"info"})}),se=a.ikp(H.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Ot=a.ikp(H.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(se,{}),"Attachments will be kept in context for the entire conversation."]})}),Un=a.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),qt=t=>{const{children:e,...i}=t,r={supportedInputs:[]};return r?.supportedInputs?n.jsx(Un,{children:h.maybeRender(e,r.supportedInputs),...i}):null},Kn=a.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),Wt=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(Kn,{children:e.displayName,onClick:u.composeEventHandlers(i,l),...r})},zn=a.ikp(E.Root,{_id:"aiChatAttachmentsBar__Modal"}),Nt=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(zn,{open:s&&d!==null,onOpenChange:u.composeEventHandlers(e,c),...i})},Qt=a.ikp(E.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Vt=a.ikp(E.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),$t=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),Gn=a.ikp(E.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),Ut=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=`Add ${e?.displayName}`;return n.jsx(Gn,{children:i,...t})},Yn=a.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),Kt=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=e?.workflowModalProps?.modalHelpText;return i?n.jsx(Yn,{children:i,...t}):null},Jn=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),zt=t=>{const{children:e,...i}=t,{selectedInput:r}=S.useAttachmentsBar(),s=r?.workflowModalProps?.modalHelpElement;return s?n.jsx(Jn,{asChild:!e,children:e||s,...i}):null},Gt=a.ikp(E.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Yt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),Xn=a.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),Jt=t=>{const{onSubmit:e,...i}=t,{form:r}=S.useAttachmentsBar();return n.jsx(Xn,{onSubmit:u.composeEventHandlers(e,r.onSubmit),...i})},Xt=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Zn=a.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),Zt=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(Zn,{htmlFor:`${i?.id}-title`,children:e.labels.title,...t})},er=a.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ei=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(er,{name:"title",value:r.data.title,id:`${s?.id}-title`,"data-invalid":h.dataAttr(!!r.errors.title),"aria-invalid":!!r.errors.title,onChange:u.composeEventHandlers(e,r.onChange),...i})},tr=a.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ti=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.title?n.jsx(tr,{"aria-live":"polite",children:e.errors.title,...t}):null},ii=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),ir=a.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),ai=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(ir,{htmlFor:`${i?.id}-content`,children:e.labels.content,...t})},ar=a.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ni=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(ar,{asChild:!0,rows:4,name:"content",value:r.data.content,id:`${s?.id}-content`,"data-invalid":h.dataAttr(!!r.errors.content),"aria-invalid":!!r.errors.content,onChange:u.composeEventHandlers(e,r.onChange),...i,children:n.jsx(X,{maxRows:10})})},nr=a.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ri=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.content?n.jsx(nr,{"aria-live":"polite",children:e.errors.content,...t}):null},si=a.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),oi=a.ikp("div",{_id:"aiChatActionBar"}),di=a.ikp("div",{_id:"aiChat__ChatActions"}),ci=a.ikp("div",{_id:"aiChatTagline__Container"}),mi=a.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),li=a.ikp(Ea.default,{_id:"aiChatTagline__Logo"}),hi=a.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),rr=a.ikp(H.Trigger,{_id:"aiChat__ChatAction"}),V=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,M]=Y.useCopyToClipboard(),[_]=Y.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 U={help:()=>{},copy:()=>{const ce=v.map(q=>{const z=`**${q.role==="assistant"?"AI Assistant":"User"}**`,G=h.getMessageContent(q);return`${z}
|
|
5
|
+
How can I help?`,v={parts:[{type:"text",text:r.introMessage??`${d}${m}`}],id:wa,...e,role:"assistant"};return n.jsx(re,{message:v,...i})}),nn=a.ikp("div",{_id:"aiChatMessageHeader"}),We=t=>{const{message:e}=F.useMessage();return n.jsx(nn,{"data-role":e.role,...t})},rn=a.ikp("div",{_id:"aiChatMessageLoading",children:"Thinking..."}),Ne=t=>n.jsx(rn,{...t}),sn=a.ikp("div",{_id:"aiChatMessageAvatar"}),Qe=t=>{const{message:e}=F.useMessage();return n.jsx(sn,{"data-role":e.role,...t})},on=a.ikp(ne.Root,{_id:"aiChatMessageAvatarContent"}),Ve=t=>{const{message:e}=F.useMessage(),{baseSettings:i}=b.useInkeepConfig();return n.jsx(on,{"data-username":h.dataAttr(e.role==="user"&&!!i.userProperties.name),"data-role":e.role,...t})},dn=a.ikp(ne.Fallback,{_id:"aiChatMessageAvatarFallback"}),$e=C.memo(t=>{const{baseSettings:e}=b.useInkeepConfig(),{message:i}=F.useMessage();return e.userProperties.name?n.jsx(dn,{"data-role":i.role,children:h.getInitials(e.userProperties.name),...t}):null}),me=a.ikp(ne.Image,{_id:"aiChatMessageAvatarImage"}),Ue=C.memo(t=>{const{onLoadingStatusChange:e,...i}=t,{aiChatSettings:r,baseSettings:{userProperties:s}}=b.useInkeepConfig(),{message:o}=F.useMessage(),{aiAssistantAvatar:d}=r??{},c=typeof d=="string"?d:d?.light,m=(typeof d=="string"?d:d?.dark)??c,l=Sa.useColorModeValue(c,m),[v,g]=C.useState(l);C.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(Aa.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:u.composeEventHandlers(e,p),...i}):n.jsx(Pa.default,{"data-type":"icon","data-role":o.role,...t})}),cn=a.ikp("span",{_id:"aiChatMessageName"}),Ke=t=>{const{message:e}=F.useMessage();return n.jsx(cn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},mn=a.ikp("div",{_id:"aiChatMessageContentWrapper"}),ze=t=>{const{message:e}=F.useMessage(),{messageButtons:i}=P.useChat(),r=i[e.id]||[];return n.jsx(mn,{"data-role":e.role,"data-has-message-buttons":h.dataAttr(!!r.length),...t})},ln=a.ikp("div",{_id:"aiChatMessageContent"}),Ge=t=>{const{message:e}=F.useMessage();return n.jsx(ln,{"data-role":e.role,...t})},hn=a.ikp("div",{_id:"aiChatMessageAttachments"}),Ye=t=>{const{message:e}=F.useMessage(),i=[];return e.role!=="user"||!i?.length?null:n.jsx(R.MessageAttachmentsProvider,{children:n.jsx(hn,{...t})})},un=a.ikp("div",{_id:"aiChatMessageAttachments__List"}),Je=t=>{const{children:e,...i}=t,r=[];return r?n.jsx(un,{children:h.maybeRender(e,r),...i}):null},Cn=a.ikp("div",{_id:"aiChatMessageAttachments__Item"}),Xe=t=>{const{attachment:e,onClick:i,...r}=t,{selectItem:s,onOpen:o}=R.useMessageAttachments(),d=()=>{s(e),o()};return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(Cn,{onClick:u.composeEventHandlers(i,d),...r})})},pn=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),Ze=t=>{const{attachment:e}=L.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(pn,{iconSettings:i,...t}):null},vn=a.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),et=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(vn,{children:e.title,...t})},bn=a.ikp(E.Root,{_id:"aiChatMessageAttachmentsPreview"}),tt=t=>{const{onOpenChange:e,...i}=t,{selectItem:r,isOpen:s,onClose:o,selectedItem:d}=R.useMessageAttachments(),c=m=>{m||(o(),r(null))};return n.jsx(bn,{open:s&&d!==null,onOpenChange:u.composeEventHandlers(e,c),...i})},it=a.ikp(E.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),at=a.ikp(E.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),gn=a.ikp(E.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),nt=t=>{const{selectedItem:e}=R.useMessageAttachments();return n.jsx(gn,{children:e?.title||"Attachment",...t})},rt=a.ikp(E.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Pn=a.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),st=t=>{const{selectedItem:e}=R.useMessageAttachments();return n.jsx(Pn,{children:e?.content,...t})},ot=t=>{const{text:e,componentStyles:i,...r}=t,{aiChatSettings:s}=b.useInkeepConfig(),{shouldOpenLinksInNewTab:o}=s;return n.jsx(W.Markdown,{children:e,componentStyles:i,shouldOpenLinksInNewTab:o,...r})},dt=({name:t,props:e,componentDef:i})=>{const s=ya.useShadow()?.shadowHost,o=C.useRef(void 0),d=C.useRef(null),c=C.useRef(null),m=C.useRef(!1),[l,v]=C.useState(!1),[g,p]=C.useState(!1);return C.useEffect(()=>{o.current||(o.current=`dyn:${t}:${crypto.randomUUID()}`,v(!0))},[t]),C.useLayoutEffect(()=>{if(!i||!s||!l||!o.current)return;const A=o.current,I=document.createElement("div");return I.setAttribute("data-ikp-component",""),I.setAttribute("data-component",t),I.setAttribute("slot",A),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(_){console.debug("Ignoring unmount error:",_)}I.parentNode===s&&I.remove(),d.current=null})}},[i,s,l,t]),C.useEffect(()=>{const A=d.current;if(!A||m.current)return;const I=M=>{if(typeof M!="function"||M.length>1)return!1;try{if(typeof M=="function"&&M.constructor===Function){const w=M({});return C.isValidElement(w)}return!1}catch{return!0}};let _;if(I(i))try{const M=i;_=C.createElement(M,e||{})}catch(M){console.error("Error creating React element from component:",M);return}else if(typeof i=="function")_=i(e||{},A,null);else{console.error("Invalid component definition");return}if(C.isValidElement(_)||typeof _=="string"){if(m.current)return;c.current||(c.current=Ha.createRoot(A)),!m.current&&c.current&&c.current.render(_);return}c.current&&!m.current&&c.current.render(null)},[i,e,g]),n.jsx("slot",{name:o.current})},An=a.ikp("div",{_id:"aiChatMessagePart"}),_n=a.ikp("div",{_id:"aiChatMessageToolbar"}),ct=t=>{const{isLoading:e,messages:i}=P.useChat(),{message:r}=F.useMessage();return i.at(-1)?.id===r?.id&&e||r.role==="user"?null:n.jsx(_n,{...t})},En=a.ikp("div",{_id:"aiChatMessageAnnotationActions"}),mt=t=>{const{children:e,...i}=t,{message:r}=F.useMessage(),{messageButtons:s}=P.useChat(),o=s[r.id]||[];return n.jsx(En,{children:h.maybeRender(e,o),...i})},Fn=a.ikp("a",{_id:"aiChatMessageAnnotationAction"}),kn=a.ikp("button",{_id:"aiChatMessageAnnotationAction"}),lt=t=>{const{onClick:e,action:i,...r}=t,{handleAction:s}=ee.useChatAction(i),{logEvent:o}=ae.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(B.BuiltInIconRenderer,{iconSettings:i.icon}),m]});return i.action.type==="open_link"?n.jsx(Fn,{href:i.action.url,target:"_blank",rel:"noopener","data-type":i.action.type,onClick:u.composeEventHandlers(e,c),children:l,...r}):n.jsx(kn,{"data-type":i.action.type,onClick:u.composeEventHandlers(e,c),children:l,...r})},In=a.ikp("button",{_id:"aiChatMessageAction"}),ht=t=>{const{action:e,onClick:i,className:r,...s}=t,{conversationId:o}=P.useChat(),{baseSettings:{onFeedback:d}}=b.useInkeepConfig(),{message:c}=F.useMessage(),{isStreaming:m,messages:l}=P.useChat(),[v,g]=Y.useCopyToClipboard(),{feedback:p,submitPositiveFeedback:A,setCurrentFeedback:I,currentFeedback:_}=Z.useMessageFeedback(),{logEvent:M}=ae.useBaseEvents(),[w,de]=Fa.useSettleAction(),U=l.at(-1)?.id===c?.id,K=c.role==="assistant";if(U&&m||!K)return null;const q={copy(){g(h.getMessageContent(c)),M({eventName:"assistant_message_copied",properties:{conversationId:o}})},upvote(){A(c.id).then(()=>{de()})},downvote(){I(c.id)}},z={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},G={copy:n.jsx(f.CustomIcon,{iconKey:v?"messageCopied":"messageCopy"}),upvote:n.jsx(f.CustomIcon,{iconKey:w?"messageCopied":"thumbsUp"}),downvote:n.jsx(f.CustomIcon,{iconKey:"thumbsDown"})},ha={copy:{"data-copied":h.dataAttr(v)},upvote:{"data-upvoted":h.dataAttr(p[c.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(p[c.id]?.type==="negative"),"data-state":_===null?"closed":"open"}};return{copy:!1,upvote:!d,downvote:!d}[e]?null:n.jsx(In,{"data-action":e,...ha[e],children:G[e],"aria-label":z[e],className:`${r} ${e}`,onClick:u.composeEventHandlers(i,q[e]),...s})},Mn=a.ikp("div",{_id:"aiChatMessageSources"}),ut=t=>{const{message:e}=F.useMessage();return e.role!=="assistant"||!e.parts.filter(r=>r.type==="data-artifact"&&r.data?.type?.toLowerCase()===he.CITATION_ARTIFACT_TYPE)?.length?null:n.jsx(Mn,{...t})},fn=a.ikp("div",{_id:"aiChatMessageSources__Header"}),Ct=t=>n.jsx(fn,{children:"Sources",...t}),Sn=a.ikp("div",{_id:"aiChatMessageSources__List"}),pt=t=>{const{message:e}=F.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()===he.CITATION_ARTIFACT_TYPE);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},_=(s??(w=>({...w,shouldOpenInNewTab:d,icon:ja.getIcon(w)})))(A,"chatSourceItem",{organizationDisplayName:o,tabs:c}),M=_.shouldOpenInNewTab!==void 0?_.shouldOpenInNewTab:d;return{..._,isExternal:M}});return n.jsx(Sn,{children:h.maybeRender(i,v),...r})},xn=a.ikp(_a.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),vt=t=>{const{source:e,onClick:i,...r}=t,{logEvent:s}=ae.useBaseEvents(),{conversationId:o}=P.useChat(),d=()=>{s({eventName:"assistant_source_item_clicked",properties:{conversationId:o,link:e}})};return n.jsx(T.SourceItemProvider,{source:e,children:n.jsx(xn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:u.composeEventHandlers(i,d),...r})})},Bn=a.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),bt=t=>{const{source:e}=T.useSourceItem();return e.breadcrumbs?.length?n.jsx(Bn,{"data-type":e.type,...t}):null},Tn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),yn=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),gt=t=>{const{source:e}=T.useSourceItem();return n.jsx(yn,{iconSettings:e.icon,"data-type":e.type,...t})},jn=a.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),Pt=t=>{const{source:e}=T.useSourceItem();return n.jsx(jn,{"data-type":e.type,children:e.title,...t})},Hn=a.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),At=t=>{const{source:e}=T.useSourceItem();return n.jsx(Hn,{"data-type":e.type,...t})},wn=a.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),_t=t=>{const{source:e}=T.useSourceItem(),{children:i,...r}=t,s=C.useMemo(()=>e.description?Ma.highlightEmphasis(e.description):[],[e.description]);return s.length?n.jsx(wn,{"data-type":e.type,children:h.maybeRender(i,s),...r}):null},Ln=a.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),Et=t=>{const{part:e,...i}=t,{source:r}=T.useSourceItem();return typeof e=="string"?e:n.jsx(Ln,{"data-type":r.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...i})},Dn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),Ft=t=>{const{source:e}=T.useSourceItem();return n.jsx(Dn,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},kt=a.ikp("div",{_id:"aiChatFooter"}),It=a.ikp("div",{_id:"aiChatInput__Fieldset"}),Mt=a.ikp("div",{_id:"aiChatInput__Group"}),Rn=a.ikp("textarea",{_id:"aiChatInput"}),ft=C.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=te.useComposedRefs(r,l);return Ta.useWidgetAutoFocus("chat",l,m),n.jsx(Rn,{asChild:!0,ref:g,maxLength:99999,placeholder:v.placeholder,value:d,onChange:u.composeEventHandlers(t,s),onKeyDown:u.composeEventHandlers(e,o),disabled:!!c||v.isViewOnly,...i,children:n.jsx(X,{})})}),On=a.ikp("button",{_id:"aiChatInput__SendButton"}),St=t=>{const{handleSubmit:e,isSubmitDisabled:i,error:r}=P.useChat(),{aiChatSettings:s}=b.useInkeepConfig(),{onClick:o,...d}=t;return n.jsx(On,{onClick:u.composeEventHandlers(o,()=>e()),"aria-label":"Send message",disabled:i||!!r||s.isViewOnly,...d})},xt=a.ikp(f.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),qn=a.ikp("div",{_id:"aiChatAttachmentsBar"}),Bt=t=>{const e={supportedInputs:[]};return!e||!e.supportedInputs?.length?null:n.jsx(S.AttachmentsBarProvider,{children:n.jsx(qn,{...t})})},Wn=a.ikp("div",{_id:"aiChatAttachmentsBar__List"}),Tt=t=>{const{children:e,...i}=t,r=[];return n.jsx(Wn,{children:h.maybeRender(e,r),...i})},Nn=a.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),yt=t=>{const{attachment:e,...i}=t;return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(Nn,{...i})})},Qn=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),jt=t=>{const{attachment:e}=L.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(Qn,{iconSettings:i,...t}):null},Vn=a.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),Ht=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(Vn,{children:e.title,...t})},$n=a.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),wt=t=>{const{onClick:e,...i}=t,r=()=>{};return n.jsx($n,{"aria-label":"Remove attachment",children:n.jsx(f.CustomIcon,{iconKey:"close"}),onClick:u.composeEventHandlers(e,r),...i})},Lt=a.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Dt=a.ikp(H.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Rt=a.ikp(H.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(f.CustomIcon,{iconKey:"info"})}),se=a.ikp(H.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Ot=a.ikp(H.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(se,{}),"Attachments will be kept in context for the entire conversation."]})}),Un=a.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),qt=t=>{const{children:e,...i}=t,r={supportedInputs:[]};return r?.supportedInputs?n.jsx(Un,{children:h.maybeRender(e,r.supportedInputs),...i}):null},Kn=a.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),Wt=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(Kn,{children:e.displayName,onClick:u.composeEventHandlers(i,l),...r})},zn=a.ikp(E.Root,{_id:"aiChatAttachmentsBar__Modal"}),Nt=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(zn,{open:s&&d!==null,onOpenChange:u.composeEventHandlers(e,c),...i})},Qt=a.ikp(E.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Vt=a.ikp(E.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),$t=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),Gn=a.ikp(E.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),Ut=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=`Add ${e?.displayName}`;return n.jsx(Gn,{children:i,...t})},Yn=a.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),Kt=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=e?.workflowModalProps?.modalHelpText;return i?n.jsx(Yn,{children:i,...t}):null},Jn=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),zt=t=>{const{children:e,...i}=t,{selectedInput:r}=S.useAttachmentsBar(),s=r?.workflowModalProps?.modalHelpElement;return s?n.jsx(Jn,{asChild:!e,children:e||s,...i}):null},Gt=a.ikp(E.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Yt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),Xn=a.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),Jt=t=>{const{onSubmit:e,...i}=t,{form:r}=S.useAttachmentsBar();return n.jsx(Xn,{onSubmit:u.composeEventHandlers(e,r.onSubmit),...i})},Xt=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Zn=a.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),Zt=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(Zn,{htmlFor:`${i?.id}-title`,children:e.labels.title,...t})},er=a.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ei=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(er,{name:"title",value:r.data.title,id:`${s?.id}-title`,"data-invalid":h.dataAttr(!!r.errors.title),"aria-invalid":!!r.errors.title,onChange:u.composeEventHandlers(e,r.onChange),...i})},tr=a.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ti=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.title?n.jsx(tr,{"aria-live":"polite",children:e.errors.title,...t}):null},ii=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),ir=a.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),ai=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(ir,{htmlFor:`${i?.id}-content`,children:e.labels.content,...t})},ar=a.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ni=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(ar,{asChild:!0,rows:4,name:"content",value:r.data.content,id:`${s?.id}-content`,"data-invalid":h.dataAttr(!!r.errors.content),"aria-invalid":!!r.errors.content,onChange:u.composeEventHandlers(e,r.onChange),...i,children:n.jsx(X,{maxRows:10})})},nr=a.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ri=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.content?n.jsx(nr,{"aria-live":"polite",children:e.errors.content,...t}):null},si=a.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),oi=a.ikp("div",{_id:"aiChatActionBar"}),di=a.ikp("div",{_id:"aiChat__ChatActions"}),ci=a.ikp("div",{_id:"aiChatTagline__Container"}),mi=a.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),li=a.ikp(Ea.default,{_id:"aiChatTagline__Logo"}),hi=a.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),rr=a.ikp(H.Trigger,{_id:"aiChat__ChatAction"}),V=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,I]=Y.useCopyToClipboard(),[_]=Y.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 U={help:()=>{},copy:()=>{const ce=v.map(q=>{const z=`**${q.role==="assistant"?"AI Assistant":"User"}**`,G=h.getMessageContent(q);return`${z}
|
|
6
6
|
|
|
7
7
|
${G}`}).join(`
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
`);M(ce)},share:async()=>{},clear:d,stop:c},K={copy:A,share:_};return n.jsx(H.Tooltip,{delayDuration:0,open:K[e],children:n.jsx(rr,{"data-type":e,"data-copied":h.dataAttr(A||_),className:`${r} ${e}`,children:n.jsx(oe,{action:e}),onClick:u.composeEventHandlers(i,U[e]),...s})})},sr=a.ikp("span",{_id:"aiChat__ChatActionLabel"}),oe=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(sr,{children:o[e],...i})},or=a.ikp(H.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),ui=t=>{const{action:e,children:i,...r}=t,s={copy:"Copied!",share:"Link copied!"};return n.jsxs(or,{sideOffset:5,...r,children:[n.jsx(H.Arrow,{}),i||s[e]]})},dr=a.ikp(j.Root,{_id:"aiChatHelpActions"}),Ci=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=J.useHelpMenuState();return n.jsx(J.HelpMenuProvider,{value:l,children:n.jsx(dr,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:c,unpinned:m}),...i})})},cr=a.ikp(V,{_id:"aiChatHelpAction",action:"help"}),mr=a.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),pi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=ee.useChatAction(e),d=e.action.type,c={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:u.composeEventHandlers(i,()=>{s(),o()}),...r};return d==="open_link"?n.jsx(mr,{href:e.action.url,...c}):n.jsx(cr,{...c})},lr=a.ikp(j.Trigger,{_id:"aiChatHelpActions__Trigger"}),vi=C.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(V,{action:"help",...t,asChild:!0,children:n.jsx(lr,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),hr=a.ikp(j.Content,{_id:"aiChatHelpActions__Menu"}),bi=t=>n.jsx(hr,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),gi=a.ikp(j.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Pi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=ee.useChatAction(e),{setOpen:d}=J.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:u.composeEventHandlers(i,c)});return n.jsx(l,{...r})},ur=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Ai=t=>{const{action:e,...i}=t;return e.icon?n.jsx(ur,{iconSettings:e.icon,...i}):null},Cr=a.ikp(E.Root,{_id:"aiChatFeedbackModal"}),_i=t=>{const{onOpenChange:e,...i}=t,{currentFeedback:r,setCurrentFeedback:s}=Z.useMessageFeedback();return n.jsx(Cr,{open:r!==null,onOpenChange:u.composeEventHandlers(e,()=>s(null)),...i})},Ei=a.ikp(E.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),Fi=a.ikp(E.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),ki=a.ikp(E.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),Ii=a.ikp(E.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Mi=a.ikp("div",{_id:"aiChatFeedbackModal__Body"}),pr=a.ikp("form",{_id:"aiChatFeedbackForm"}),fi=t=>{const{onSubmit:e,...i}=t,{submitNegativeFeedback:r,currentFeedback:s,setCurrentFeedback:o}=Z.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(pr,{onSubmit:u.composeEventHandlers(e,d),...i})},vr=a.ikp("div",{_id:"aiChatFeedbackItem"}),Si=t=>{const{name:e,...i}=t;return n.jsx(N.FeedbackItemProvider,{name:e,children:n.jsx(vr,{...i})})},br=a.ikp(Q.Root,{_id:"aiChatFeedbackItem__Checkbox"}),xi=t=>{const{name:e,focusItem:i}=N.useFeedbackItem(),{onCheckedChange:r,...s}=t,o=d=>{d&&i?.current?.focus()};return n.jsx(br,{id:`feedback-${e}`,name:e,onCheckedChange:u.composeEventHandlers(r,o),...s})},Bi=a.ikp(Q.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),gr=a.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Ti=t=>{const{name:e}=N.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(gr,{htmlFor:`feedback-${e}`,children:i[e],...t})},Pr=a.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),yi=t=>{const{name:e,focusItem:i}=N.useFeedbackItem();return n.jsx(Pr,{ref:i,name:`${e}:description`,...t})},ji=a.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Ar=a.ikp("div",{_id:"aiChatForm__Wrapper"}),Hi=t=>{const{form:e}=k.useChatForm();return e?n.jsx(Ar,{...t}):null},_r=a.ikp("form",{_id:"aiChatForm"}),wi=t=>{const{onSubmit:e,...i}=t,{conversationId:r,messages:s}=P.useChat(),{handleSubmit:o,isSuccess:d}=k.useChatForm();return d?null:n.jsx(_r,{onSubmit:u.composeEventHandlers(e,c=>o(c,{id:r,messages:s})),...i})},Er=a.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Li=t=>{const{onClick:e,...i}=t,{closeForm:r}=k.useChatForm();return n.jsx(Er,{onClick:u.composeEventHandlers(e,r),...i})},Di=a.ikp("div",{_id:"aiChatForm__Header"}),Fr=a.ikp("h2",{_id:"aiChatForm__Heading"}),Ri=t=>{const{form:e}=k.useChatForm();return e?.heading?n.jsx(Fr,{children:e.heading,...t}):null},kr=a.ikp(W.Markdown,{_id:"aiChatForm__Description"}),Oi=t=>{const{form:e}=k.useChatForm();return e?.description?n.jsx(kr,{children:e.description,...t}):null},Ir=a.ikp("div",{_id:"aiChatForm__Content"}),qi=t=>{const{children:e,...i}=t,{getFields:r}=k.useChatForm(),{conversationId:s}=P.useChat(),o=r(s)||[];return n.jsx(Ir,{children:h.maybeRender(e,o),...i})},Mr=a.ikp("div",{_id:"aiChatForm__Field"}),Wi=t=>{const{field:e,autoFocus:i,...r}=t,{control:s,errors:o}=k.useChatForm();return n.jsx(Ia.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(y.FormFieldProvider,{"data-invalid":h.dataAttr(!!o[e.name]),field:e,fieldProps:d,autoFocus:i,children:c&&n.jsx(Mr,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...r})})}})},fr=a.ikp("label",{_id:"aiChatForm__FieldLabel"}),Ni=t=>{const{field:e}=y.useFormField();return n.jsx(fr,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},Sr=a.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),$=t=>{const{field:e,error:i,fieldProps:{onChange:r,onBlur:s,...o},autoFocus:d}=y.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(Sr,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!i),onChange:u.composeEventHandlers(c,r),onBlur:u.composeEventHandlers(m,s),...o,...l})},Qi=a.ikp($,{_id:"aiChatForm__FieldEmail",type:"email"}),xr=a.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Vi=t=>{const{field:e,error:i,fieldProps:{value:r,onChange:s,onBlur:o,...d},autoFocus:c}=y.useFormField(),{onChange:m,onBlur:l,...v}=t,g=p=>{const A=p.target.files;s(A)};return n.jsx(xr,{id:e.name,autoFocus:c,"data-value":r,"data-invalid":h.dataAttr(!!i),...v,...d,onChange:u.composeEventHandlers(m,g),onBlur:u.composeEventHandlers(l,o)})},$i=a.ikp($,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(X,{maxRows:8})}),Br=a.ikp(Q.Root,{_id:"aiChatForm__FieldCheckbox"}),Ui=t=>{const{field:e,error:i,fieldProps:r,autoFocus:s}=y.useFormField(),{onCheckedChange:o,...d}=t;return n.jsx(Br,{id:e.name,name:e.name,autoFocus:s,"data-invalid":h.dataAttr(!!i),checked:r.value,onCheckedChange:u.composeEventHandlers(o,r.onChange),...d})},Ki=a.ikp(Q.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),Tr=a.ikp(x.Root,{_id:"aiChatForm__FieldSelect"}),zi=t=>{const{field:e,error:i,fieldProps:r}=y.useFormField(),{onValueChange:s,...o}=t;return n.jsx(Tr,{name:e.name,"data-invalid":h.dataAttr(!!i),value:r.value,onValueChange:u.composeEventHandlers(s,r.onChange),...o})},Gi=a.ikp(x.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),yr=a.ikp(x.Value,{_id:"aiChatForm__FieldSelect__Value"}),Yi=t=>{const{field:e}=y.useFormField();return n.jsx(yr,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},Ji=a.ikp(x.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(B.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),Xi=a.ikp(x.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),Zi=a.ikp(x.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),ea=a.ikp(x.Item,{_id:"aiChatForm__FieldSelect__Item"}),ta=a.ikp(x.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ia=a.ikp(x.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(B.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),jr=a.ikp("span",{_id:"aiChatForm__FieldError"}),aa=t=>{const{error:e}=y.useFormField();return e?n.jsx(jr,{children:e.message?.toString(),...t}):null},Hr=a.ikp("span",{_id:"aiChatForm__Error"}),na=t=>{const{formError:e}=k.useChatForm();return e?n.jsx(Hr,{children:e.message,...t}):null},ra=a.ikp("div",{_id:"aiChatForm__Footer"}),wr=a.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),sa=t=>{const{onClick:e,...i}=t,{closeForm:r}=k.useChatForm();return n.jsx(wr,{onClick:u.composeEventHandlers(e,r),...i})},Lr=a.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),oa=t=>{const{onClick:e,...i}=t,{isSubmitting:r,form:s}=k.useChatForm(),o=s?.buttons.submit.label||"Submit";return n.jsx(Lr,{disabled:r,...i,children:o})},Dr=a.ikp("div",{_id:"aiChatForm__Success"}),da=t=>{const{isSuccess:e}=k.useChatForm();return e?n.jsx(Dr,{...t}):null},Rr=a.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),ca=t=>{const{form:e}=k.useChatForm();return n.jsx(Rr,{children:e?.successView?.heading,...t})},Or=a.ikp(W.Markdown,{_id:"aiChatForm__SuccessMessage"}),ma=t=>{const{form:e}=k.useChatForm();return n.jsx(Or,{children:e?.successView?.message,...t})},qr=a.ikp("button",{_id:"aiChatForm__SuccessButton"}),la=t=>{const{onClick:e,...i}=t,{form:r,closeForm:s}=k.useChatForm(),o=r?.successView?.doneButton;if(!o)return null;const d=o.icon&&n.jsx(B.BuiltInIconRenderer,{iconSettings:o.icon}),c=o.label;return n.jsx(qr,{onClick:u.composeEventHandlers(e,s),children:n.jsxs(n.Fragment,{children:[d,c]}),...i})};exports.Provider=P.ChatProvider;exports.ActionBar=oi;exports.Actions=di;exports.AttachmentsBar=Bt;exports.AttachmentsBarActions=Lt;exports.AttachmentsBarAttachment=yt;exports.AttachmentsBarAttachmentDelete=wt;exports.AttachmentsBarAttachmentIcon=jt;exports.AttachmentsBarAttachmentTitle=Ht;exports.AttachmentsBarForm=Jt;exports.AttachmentsBarFormContent=ii;exports.AttachmentsBarFormContentError=ri;exports.AttachmentsBarFormContentInput=ni;exports.AttachmentsBarFormContentLabel=ai;exports.AttachmentsBarFormSubmitButton=si;exports.AttachmentsBarFormTitle=Xt;exports.AttachmentsBarFormTitleError=ti;exports.AttachmentsBarFormTitleInput=ei;exports.AttachmentsBarFormTitleLabel=Zt;exports.AttachmentsBarInfoTip=Dt;exports.AttachmentsBarInfoTipArrow=se;exports.AttachmentsBarInfoTipIcon=Rt;exports.AttachmentsBarInfoTipText=Ot;exports.AttachmentsBarInput=Wt;exports.AttachmentsBarInputs=qt;exports.AttachmentsBarList=Tt;exports.AttachmentsBarModal=Nt;exports.AttachmentsBarModalBody=Yt;exports.AttachmentsBarModalClose=Gt;exports.AttachmentsBarModalContent=Vt;exports.AttachmentsBarModalDescription=Kt;exports.AttachmentsBarModalHeader=$t;exports.AttachmentsBarModalHeading=Ut;exports.AttachmentsBarModalHelp=zt;exports.AttachmentsBarModalOverlay=Qt;exports.ChatAction=V;exports.ChatActionFeedback=ui;exports.ChatActionLabel=oe;exports.ChatHelpAction=pi;exports.Content=ge;exports.ContentScrollArea=Pe;exports.ContentScrollAreaCorner=Fe;exports.ContentScrollAreaScrollbar=_e;exports.ContentScrollAreaThumb=Ee;exports.ContentScrollAreaViewport=Ae;exports.Disclaimer=Ie;exports.DisclaimerArrow=Be;exports.DisclaimerContent=Se;exports.DisclaimerLabel=Me;exports.DisclaimerText=xe;exports.DisclaimerTrigger=fe;exports.DynamicComponent=dt;exports.EmbeddedChatPrimitiveActionBar=oi;exports.EmbeddedChatPrimitiveActions=di;exports.EmbeddedChatPrimitiveAttachmentsBar=Bt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=yt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=jt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=Ht;exports.EmbeddedChatPrimitiveAttachmentsBarForm=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=ii;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=ai;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ti;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=ei;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=se;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarInput=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=qt;exports.EmbeddedChatPrimitiveAttachmentsBarList=Tt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=$t;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Qt;exports.EmbeddedChatPrimitiveChatAction=V;exports.EmbeddedChatPrimitiveChatActionFeedback=ui;exports.EmbeddedChatPrimitiveChatActionLabel=oe;exports.EmbeddedChatPrimitiveChatHelpAction=pi;exports.EmbeddedChatPrimitiveContent=ge;exports.EmbeddedChatPrimitiveContentScrollArea=Pe;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=Fe;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=_e;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=Ee;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Ae;exports.EmbeddedChatPrimitiveDisclaimer=Ie;exports.EmbeddedChatPrimitiveDisclaimerArrow=Be;exports.EmbeddedChatPrimitiveDisclaimerContent=Se;exports.EmbeddedChatPrimitiveDisclaimerLabel=Me;exports.EmbeddedChatPrimitiveDisclaimerText=xe;exports.EmbeddedChatPrimitiveDisclaimerTrigger=fe;exports.EmbeddedChatPrimitiveDynamicComponent=dt;exports.EmbeddedChatPrimitiveExampleQuestion=He;exports.EmbeddedChatPrimitiveExampleQuestionButton=we;exports.EmbeddedChatPrimitiveExampleQuestions=Te;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=ye;exports.EmbeddedChatPrimitiveExampleQuestionsList=je;exports.EmbeddedChatPrimitiveFeedbackForm=fi;exports.EmbeddedChatPrimitiveFeedbackItem=Si;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=xi;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=Bi;exports.EmbeddedChatPrimitiveFeedbackItemDescription=yi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Ti;exports.EmbeddedChatPrimitiveFeedbackModal=_i;exports.EmbeddedChatPrimitiveFeedbackModalBody=Mi;exports.EmbeddedChatPrimitiveFeedbackModalClose=Ii;exports.EmbeddedChatPrimitiveFeedbackModalContent=Fi;exports.EmbeddedChatPrimitiveFeedbackModalHeader=ki;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=Ei;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=ji;exports.EmbeddedChatPrimitiveFooter=kt;exports.EmbeddedChatPrimitiveForm=wi;exports.EmbeddedChatPrimitiveFormCancel=sa;exports.EmbeddedChatPrimitiveFormClose=Li;exports.EmbeddedChatPrimitiveFormContent=qi;exports.EmbeddedChatPrimitiveFormDescription=Oi;exports.EmbeddedChatPrimitiveFormError=na;exports.EmbeddedChatPrimitiveFormField=Wi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=Ui;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=Ki;exports.EmbeddedChatPrimitiveFormFieldEmail=Qi;exports.EmbeddedChatPrimitiveFormFieldError=aa;exports.EmbeddedChatPrimitiveFormFieldFile=Vi;exports.EmbeddedChatPrimitiveFormFieldLabel=Ni;exports.EmbeddedChatPrimitiveFormFieldSelect=zi;exports.EmbeddedChatPrimitiveFormFieldSelectContent=Xi;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=Ji;exports.EmbeddedChatPrimitiveFormFieldSelectItem=ea;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ia;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ta;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=Gi;exports.EmbeddedChatPrimitiveFormFieldSelectValue=Yi;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=Zi;exports.EmbeddedChatPrimitiveFormFieldText=$;exports.EmbeddedChatPrimitiveFormFieldTextArea=$i;exports.EmbeddedChatPrimitiveFormFooter=ra;exports.EmbeddedChatPrimitiveFormHeader=Di;exports.EmbeddedChatPrimitiveFormHeading=Ri;exports.EmbeddedChatPrimitiveFormSubmit=oa;exports.EmbeddedChatPrimitiveFormSuccess=da;exports.EmbeddedChatPrimitiveFormSuccessButton=la;exports.EmbeddedChatPrimitiveFormSuccessHeading=ca;exports.EmbeddedChatPrimitiveFormSuccessMessage=ma;exports.EmbeddedChatPrimitiveFormWrapper=Hi;exports.EmbeddedChatPrimitiveHeaderToolbar=pe;exports.EmbeddedChatPrimitiveHelpActions=Ci;exports.EmbeddedChatPrimitiveHelpActionsMenu=bi;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=gi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Pi;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Ai;exports.EmbeddedChatPrimitiveHelpActionsTrigger=vi;exports.EmbeddedChatPrimitiveInput=ft;exports.EmbeddedChatPrimitiveInputFieldset=It;exports.EmbeddedChatPrimitiveInputGroup=Mt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=qe;exports.EmbeddedChatPrimitiveMarkdown=ot;exports.EmbeddedChatPrimitiveMessageAction=ht;exports.EmbeddedChatPrimitiveMessageAnnotationAction=lt;exports.EmbeddedChatPrimitiveMessageAnnotationActions=mt;exports.EmbeddedChatPrimitiveMessageAttachments=Ye;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=Xe;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=Ze;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=et;exports.EmbeddedChatPrimitiveMessageAttachmentsList=Je;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=tt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=st;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=at;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=it;exports.EmbeddedChatPrimitiveMessageAvatar=Qe;exports.EmbeddedChatPrimitiveMessageAvatarContent=Ve;exports.EmbeddedChatPrimitiveMessageAvatarFallback=$e;exports.EmbeddedChatPrimitiveMessageAvatarImage=Ue;exports.EmbeddedChatPrimitiveMessageContent=Ge;exports.EmbeddedChatPrimitiveMessageContentWrapper=ze;exports.EmbeddedChatPrimitiveMessageHeader=We;exports.EmbeddedChatPrimitiveMessageLoading=Ne;exports.EmbeddedChatPrimitiveMessageName=Ke;exports.EmbeddedChatPrimitiveMessageSourceItem=vt;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=bt;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=_t;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=Et;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=gt;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=Ft;exports.EmbeddedChatPrimitiveMessageSourceItemTag=At;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=Pt;exports.EmbeddedChatPrimitiveMessageSources=ut;exports.EmbeddedChatPrimitiveMessageSourcesHeader=Ct;exports.EmbeddedChatPrimitiveMessageSourcesList=pt;exports.EmbeddedChatPrimitiveMessageToolbar=ct;exports.EmbeddedChatPrimitiveMessageWrapper=re;exports.EmbeddedChatPrimitiveMessages=ke;exports.EmbeddedChatPrimitiveRoot=Ce;exports.EmbeddedChatPrimitiveSendButton=St;exports.EmbeddedChatPrimitiveSendButtonIcon=xt;exports.EmbeddedChatPrimitiveTaglineBrandName=hi;exports.EmbeddedChatPrimitiveTaglineContainer=ci;exports.EmbeddedChatPrimitiveTaglineLogo=li;exports.EmbeddedChatPrimitiveTaglineText=mi;exports.EmbeddedChatPrimitiveToolbarHeader=be;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=ve;exports.EmbeddedChatPrimitiveWorkflow=Oe;exports.EmbeddedChatPrimitiveWorkflows=Le;exports.EmbeddedChatPrimitiveWorkflowsLabel=De;exports.EmbeddedChatPrimitiveWorkflowsList=Re;exports.EmbeddedChatPrimitiveWrapper=ue;exports.ExampleQuestion=He;exports.ExampleQuestionButton=we;exports.ExampleQuestions=Te;exports.ExampleQuestionsLabel=ye;exports.ExampleQuestionsList=je;exports.FeedbackForm=fi;exports.FeedbackItem=Si;exports.FeedbackItemCheckbox=xi;exports.FeedbackItemCheckboxIndicator=Bi;exports.FeedbackItemDescription=yi;exports.FeedbackItemLabel=Ti;exports.FeedbackModal=_i;exports.FeedbackModalBody=Mi;exports.FeedbackModalClose=Ii;exports.FeedbackModalContent=Fi;exports.FeedbackModalHeader=ki;exports.FeedbackModalOverlay=Ei;exports.FeedbackSubmitButton=ji;exports.Footer=kt;exports.Form=wi;exports.FormCancel=sa;exports.FormClose=Li;exports.FormContent=qi;exports.FormDescription=Oi;exports.FormError=na;exports.FormField=Wi;exports.FormFieldCheckbox=Ui;exports.FormFieldCheckboxIndicator=Ki;exports.FormFieldEmail=Qi;exports.FormFieldError=aa;exports.FormFieldFile=Vi;exports.FormFieldLabel=Ni;exports.FormFieldSelect=zi;exports.FormFieldSelectContent=Xi;exports.FormFieldSelectIcon=Ji;exports.FormFieldSelectItem=ea;exports.FormFieldSelectItemIndicator=ia;exports.FormFieldSelectItemText=ta;exports.FormFieldSelectTrigger=Gi;exports.FormFieldSelectValue=Yi;exports.FormFieldSelectViewport=Zi;exports.FormFieldText=$;exports.FormFieldTextArea=$i;exports.FormFooter=ra;exports.FormHeader=Di;exports.FormHeading=Ri;exports.FormSubmit=oa;exports.FormSuccess=da;exports.FormSuccessButton=la;exports.FormSuccessHeading=ca;exports.FormSuccessMessage=ma;exports.FormWrapper=Hi;exports.Header=Ra;exports.HeaderToolbar=pe;exports.HeaderToolbarWrapper=ve;exports.HelpActions=Ci;exports.HelpActionsMenu=bi;exports.HelpActionsMenuArrow=gi;exports.HelpActionsMenuItem=Pi;exports.HelpActionsMenuItemIcon=Ai;exports.HelpActionsTrigger=vi;exports.Input=ft;exports.InputFieldset=It;exports.InputGroup=Mt;exports.IntroMessageWrapper=qe;exports.Markdown=ot;exports.MessageAction=ht;exports.MessageAnnotationAction=lt;exports.MessageAnnotationActions=mt;exports.MessageAttachments=Ye;exports.MessageAttachmentsItem=Xe;exports.MessageAttachmentsItemIcon=Ze;exports.MessageAttachmentsItemTitle=et;exports.MessageAttachmentsList=Je;exports.MessageAttachmentsPreview=tt;exports.MessageAttachmentsPreviewBody=st;exports.MessageAttachmentsPreviewClose=rt;exports.MessageAttachmentsPreviewContent=at;exports.MessageAttachmentsPreviewHeader=nt;exports.MessageAttachmentsPreviewOverlay=it;exports.MessageAvatar=Qe;exports.MessageAvatarContent=Ve;exports.MessageAvatarFallback=$e;exports.MessageAvatarImage=Ue;exports.MessageContent=Ge;exports.MessageContentWrapper=ze;exports.MessageHeader=We;exports.MessageLoading=Ne;exports.MessageName=Ke;exports.MessageSourceItem=vt;exports.MessageSourceItemBreadcrumbIcon=Tn;exports.MessageSourceItemBreadcrumbs=bt;exports.MessageSourceItemDescription=_t;exports.MessageSourceItemDescriptionPart=Et;exports.MessageSourceItemIcon=gt;exports.MessageSourceItemIndicator=Ft;exports.MessageSourceItemTag=At;exports.MessageSourceItemTitle=Pt;exports.MessageSources=ut;exports.MessageSourcesHeader=Ct;exports.MessageSourcesList=pt;exports.MessageToolbar=ct;exports.MessageWrapper=re;exports.Messages=ke;exports.PrimitiveMessagePart=An;exports.Root=Ce;exports.SendButton=St;exports.SendButtonIcon=xt;exports.TaglineBrandName=hi;exports.TaglineContainer=ci;exports.TaglineLogo=li;exports.TaglineText=mi;exports.ToolbarHeader=be;exports.Workflow=Oe;exports.Workflows=Le;exports.WorkflowsLabel=De;exports.WorkflowsList=Re;exports.Wrapper=ue;
|
|
11
|
+
`);I(ce)},share:async()=>{},clear:d,stop:c},K={copy:A,share:_};return n.jsx(H.Tooltip,{delayDuration:0,open:K[e],children:n.jsx(rr,{"data-type":e,"data-copied":h.dataAttr(A||_),className:`${r} ${e}`,children:n.jsx(oe,{action:e}),onClick:u.composeEventHandlers(i,U[e]),...s})})},sr=a.ikp("span",{_id:"aiChat__ChatActionLabel"}),oe=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(sr,{children:o[e],...i})},or=a.ikp(H.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),ui=t=>{const{action:e,children:i,...r}=t,s={copy:"Copied!",share:"Link copied!"};return n.jsxs(or,{sideOffset:5,...r,children:[n.jsx(H.Arrow,{}),i||s[e]]})},dr=a.ikp(j.Root,{_id:"aiChatHelpActions"}),Ci=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=J.useHelpMenuState();return n.jsx(J.HelpMenuProvider,{value:l,children:n.jsx(dr,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:c,unpinned:m}),...i})})},cr=a.ikp(V,{_id:"aiChatHelpAction",action:"help"}),mr=a.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),pi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=ee.useChatAction(e),d=e.action.type,c={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:u.composeEventHandlers(i,()=>{s(),o()}),...r};return d==="open_link"?n.jsx(mr,{href:e.action.url,...c}):n.jsx(cr,{...c})},lr=a.ikp(j.Trigger,{_id:"aiChatHelpActions__Trigger"}),vi=C.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(V,{action:"help",...t,asChild:!0,children:n.jsx(lr,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),hr=a.ikp(j.Content,{_id:"aiChatHelpActions__Menu"}),bi=t=>n.jsx(hr,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),gi=a.ikp(j.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Pi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=ee.useChatAction(e),{setOpen:d}=J.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:u.composeEventHandlers(i,c)});return n.jsx(l,{...r})},ur=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Ai=t=>{const{action:e,...i}=t;return e.icon?n.jsx(ur,{iconSettings:e.icon,...i}):null},Cr=a.ikp(E.Root,{_id:"aiChatFeedbackModal"}),_i=t=>{const{onOpenChange:e,...i}=t,{currentFeedback:r,setCurrentFeedback:s}=Z.useMessageFeedback();return n.jsx(Cr,{open:r!==null,onOpenChange:u.composeEventHandlers(e,()=>s(null)),...i})},Ei=a.ikp(E.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),Fi=a.ikp(E.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),ki=a.ikp(E.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),Ii=a.ikp(E.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Mi=a.ikp("div",{_id:"aiChatFeedbackModal__Body"}),pr=a.ikp("form",{_id:"aiChatFeedbackForm"}),fi=t=>{const{onSubmit:e,...i}=t,{submitNegativeFeedback:r,currentFeedback:s,setCurrentFeedback:o}=Z.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(pr,{onSubmit:u.composeEventHandlers(e,d),...i})},vr=a.ikp("div",{_id:"aiChatFeedbackItem"}),Si=t=>{const{name:e,...i}=t;return n.jsx(N.FeedbackItemProvider,{name:e,children:n.jsx(vr,{...i})})},br=a.ikp(Q.Root,{_id:"aiChatFeedbackItem__Checkbox"}),xi=t=>{const{name:e,focusItem:i}=N.useFeedbackItem(),{onCheckedChange:r,...s}=t,o=d=>{d&&i?.current?.focus()};return n.jsx(br,{id:`feedback-${e}`,name:e,onCheckedChange:u.composeEventHandlers(r,o),...s})},Bi=a.ikp(Q.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),gr=a.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Ti=t=>{const{name:e}=N.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(gr,{htmlFor:`feedback-${e}`,children:i[e],...t})},Pr=a.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),yi=t=>{const{name:e,focusItem:i}=N.useFeedbackItem();return n.jsx(Pr,{ref:i,name:`${e}:description`,...t})},ji=a.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Ar=a.ikp("div",{_id:"aiChatForm__Wrapper"}),Hi=t=>{const{form:e}=k.useChatForm();return e?n.jsx(Ar,{...t}):null},_r=a.ikp("form",{_id:"aiChatForm"}),wi=t=>{const{onSubmit:e,...i}=t,{conversationId:r,messages:s}=P.useChat(),{handleSubmit:o,isSuccess:d}=k.useChatForm();return d?null:n.jsx(_r,{onSubmit:u.composeEventHandlers(e,c=>o(c,{id:r,messages:s})),...i})},Er=a.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Li=t=>{const{onClick:e,...i}=t,{closeForm:r}=k.useChatForm();return n.jsx(Er,{onClick:u.composeEventHandlers(e,r),...i})},Di=a.ikp("div",{_id:"aiChatForm__Header"}),Fr=a.ikp("h2",{_id:"aiChatForm__Heading"}),Ri=t=>{const{form:e}=k.useChatForm();return e?.heading?n.jsx(Fr,{children:e.heading,...t}):null},kr=a.ikp(W.Markdown,{_id:"aiChatForm__Description"}),Oi=t=>{const{form:e}=k.useChatForm();return e?.description?n.jsx(kr,{children:e.description,...t}):null},Ir=a.ikp("div",{_id:"aiChatForm__Content"}),qi=t=>{const{children:e,...i}=t,{getFields:r}=k.useChatForm(),{conversationId:s}=P.useChat(),o=r(s)||[];return n.jsx(Ir,{children:h.maybeRender(e,o),...i})},Mr=a.ikp("div",{_id:"aiChatForm__Field"}),Wi=t=>{const{field:e,autoFocus:i,...r}=t,{control:s,errors:o}=k.useChatForm();return n.jsx(Ia.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(y.FormFieldProvider,{"data-invalid":h.dataAttr(!!o[e.name]),field:e,fieldProps:d,autoFocus:i,children:c&&n.jsx(Mr,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...r})})}})},fr=a.ikp("label",{_id:"aiChatForm__FieldLabel"}),Ni=t=>{const{field:e}=y.useFormField();return n.jsx(fr,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},Sr=a.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),$=t=>{const{field:e,error:i,fieldProps:{onChange:r,onBlur:s,...o},autoFocus:d}=y.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(Sr,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!i),onChange:u.composeEventHandlers(c,r),onBlur:u.composeEventHandlers(m,s),...o,...l})},Qi=a.ikp($,{_id:"aiChatForm__FieldEmail",type:"email"}),xr=a.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Vi=t=>{const{field:e,error:i,fieldProps:{value:r,onChange:s,onBlur:o,...d},autoFocus:c}=y.useFormField(),{onChange:m,onBlur:l,...v}=t,g=p=>{const A=p.target.files;s(A)};return n.jsx(xr,{id:e.name,autoFocus:c,"data-value":r,"data-invalid":h.dataAttr(!!i),...v,...d,onChange:u.composeEventHandlers(m,g),onBlur:u.composeEventHandlers(l,o)})},$i=a.ikp($,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(X,{maxRows:8})}),Br=a.ikp(Q.Root,{_id:"aiChatForm__FieldCheckbox"}),Ui=t=>{const{field:e,error:i,fieldProps:r,autoFocus:s}=y.useFormField(),{onCheckedChange:o,...d}=t;return n.jsx(Br,{id:e.name,name:e.name,autoFocus:s,"data-invalid":h.dataAttr(!!i),checked:r.value,onCheckedChange:u.composeEventHandlers(o,r.onChange),...d})},Ki=a.ikp(Q.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),Tr=a.ikp(x.Root,{_id:"aiChatForm__FieldSelect"}),zi=t=>{const{field:e,error:i,fieldProps:r}=y.useFormField(),{onValueChange:s,...o}=t;return n.jsx(Tr,{name:e.name,"data-invalid":h.dataAttr(!!i),value:r.value,onValueChange:u.composeEventHandlers(s,r.onChange),...o})},Gi=a.ikp(x.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),yr=a.ikp(x.Value,{_id:"aiChatForm__FieldSelect__Value"}),Yi=t=>{const{field:e}=y.useFormField();return n.jsx(yr,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},Ji=a.ikp(x.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(B.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),Xi=a.ikp(x.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),Zi=a.ikp(x.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),ea=a.ikp(x.Item,{_id:"aiChatForm__FieldSelect__Item"}),ta=a.ikp(x.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ia=a.ikp(x.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(B.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),jr=a.ikp("span",{_id:"aiChatForm__FieldError"}),aa=t=>{const{error:e}=y.useFormField();return e?n.jsx(jr,{children:e.message?.toString(),...t}):null},Hr=a.ikp("span",{_id:"aiChatForm__Error"}),na=t=>{const{formError:e}=k.useChatForm();return e?n.jsx(Hr,{children:e.message,...t}):null},ra=a.ikp("div",{_id:"aiChatForm__Footer"}),wr=a.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),sa=t=>{const{onClick:e,...i}=t,{closeForm:r}=k.useChatForm();return n.jsx(wr,{onClick:u.composeEventHandlers(e,r),...i})},Lr=a.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),oa=t=>{const{onClick:e,...i}=t,{isSubmitting:r,form:s}=k.useChatForm(),o=s?.buttons.submit.label||"Submit";return n.jsx(Lr,{disabled:r,...i,children:o})},Dr=a.ikp("div",{_id:"aiChatForm__Success"}),da=t=>{const{isSuccess:e}=k.useChatForm();return e?n.jsx(Dr,{...t}):null},Rr=a.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),ca=t=>{const{form:e}=k.useChatForm();return n.jsx(Rr,{children:e?.successView?.heading,...t})},Or=a.ikp(W.Markdown,{_id:"aiChatForm__SuccessMessage"}),ma=t=>{const{form:e}=k.useChatForm();return n.jsx(Or,{children:e?.successView?.message,...t})},qr=a.ikp("button",{_id:"aiChatForm__SuccessButton"}),la=t=>{const{onClick:e,...i}=t,{form:r,closeForm:s}=k.useChatForm(),o=r?.successView?.doneButton;if(!o)return null;const d=o.icon&&n.jsx(B.BuiltInIconRenderer,{iconSettings:o.icon}),c=o.label;return n.jsx(qr,{onClick:u.composeEventHandlers(e,s),children:n.jsxs(n.Fragment,{children:[d,c]}),...i})};exports.Provider=P.ChatProvider;exports.ActionBar=oi;exports.Actions=di;exports.AttachmentsBar=Bt;exports.AttachmentsBarActions=Lt;exports.AttachmentsBarAttachment=yt;exports.AttachmentsBarAttachmentDelete=wt;exports.AttachmentsBarAttachmentIcon=jt;exports.AttachmentsBarAttachmentTitle=Ht;exports.AttachmentsBarForm=Jt;exports.AttachmentsBarFormContent=ii;exports.AttachmentsBarFormContentError=ri;exports.AttachmentsBarFormContentInput=ni;exports.AttachmentsBarFormContentLabel=ai;exports.AttachmentsBarFormSubmitButton=si;exports.AttachmentsBarFormTitle=Xt;exports.AttachmentsBarFormTitleError=ti;exports.AttachmentsBarFormTitleInput=ei;exports.AttachmentsBarFormTitleLabel=Zt;exports.AttachmentsBarInfoTip=Dt;exports.AttachmentsBarInfoTipArrow=se;exports.AttachmentsBarInfoTipIcon=Rt;exports.AttachmentsBarInfoTipText=Ot;exports.AttachmentsBarInput=Wt;exports.AttachmentsBarInputs=qt;exports.AttachmentsBarList=Tt;exports.AttachmentsBarModal=Nt;exports.AttachmentsBarModalBody=Yt;exports.AttachmentsBarModalClose=Gt;exports.AttachmentsBarModalContent=Vt;exports.AttachmentsBarModalDescription=Kt;exports.AttachmentsBarModalHeader=$t;exports.AttachmentsBarModalHeading=Ut;exports.AttachmentsBarModalHelp=zt;exports.AttachmentsBarModalOverlay=Qt;exports.ChatAction=V;exports.ChatActionFeedback=ui;exports.ChatActionLabel=oe;exports.ChatHelpAction=pi;exports.Content=ge;exports.ContentScrollArea=Pe;exports.ContentScrollAreaCorner=Fe;exports.ContentScrollAreaScrollbar=_e;exports.ContentScrollAreaThumb=Ee;exports.ContentScrollAreaViewport=Ae;exports.Disclaimer=Ie;exports.DisclaimerArrow=Be;exports.DisclaimerContent=Se;exports.DisclaimerLabel=Me;exports.DisclaimerText=xe;exports.DisclaimerTrigger=fe;exports.DynamicComponent=dt;exports.EmbeddedChatPrimitiveActionBar=oi;exports.EmbeddedChatPrimitiveActions=di;exports.EmbeddedChatPrimitiveAttachmentsBar=Bt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=yt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=jt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=Ht;exports.EmbeddedChatPrimitiveAttachmentsBarForm=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=ii;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=ai;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ti;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=ei;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=se;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarInput=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=qt;exports.EmbeddedChatPrimitiveAttachmentsBarList=Tt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=$t;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Qt;exports.EmbeddedChatPrimitiveChatAction=V;exports.EmbeddedChatPrimitiveChatActionFeedback=ui;exports.EmbeddedChatPrimitiveChatActionLabel=oe;exports.EmbeddedChatPrimitiveChatHelpAction=pi;exports.EmbeddedChatPrimitiveContent=ge;exports.EmbeddedChatPrimitiveContentScrollArea=Pe;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=Fe;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=_e;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=Ee;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Ae;exports.EmbeddedChatPrimitiveDisclaimer=Ie;exports.EmbeddedChatPrimitiveDisclaimerArrow=Be;exports.EmbeddedChatPrimitiveDisclaimerContent=Se;exports.EmbeddedChatPrimitiveDisclaimerLabel=Me;exports.EmbeddedChatPrimitiveDisclaimerText=xe;exports.EmbeddedChatPrimitiveDisclaimerTrigger=fe;exports.EmbeddedChatPrimitiveDynamicComponent=dt;exports.EmbeddedChatPrimitiveExampleQuestion=He;exports.EmbeddedChatPrimitiveExampleQuestionButton=we;exports.EmbeddedChatPrimitiveExampleQuestions=Te;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=ye;exports.EmbeddedChatPrimitiveExampleQuestionsList=je;exports.EmbeddedChatPrimitiveFeedbackForm=fi;exports.EmbeddedChatPrimitiveFeedbackItem=Si;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=xi;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=Bi;exports.EmbeddedChatPrimitiveFeedbackItemDescription=yi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Ti;exports.EmbeddedChatPrimitiveFeedbackModal=_i;exports.EmbeddedChatPrimitiveFeedbackModalBody=Mi;exports.EmbeddedChatPrimitiveFeedbackModalClose=Ii;exports.EmbeddedChatPrimitiveFeedbackModalContent=Fi;exports.EmbeddedChatPrimitiveFeedbackModalHeader=ki;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=Ei;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=ji;exports.EmbeddedChatPrimitiveFooter=kt;exports.EmbeddedChatPrimitiveForm=wi;exports.EmbeddedChatPrimitiveFormCancel=sa;exports.EmbeddedChatPrimitiveFormClose=Li;exports.EmbeddedChatPrimitiveFormContent=qi;exports.EmbeddedChatPrimitiveFormDescription=Oi;exports.EmbeddedChatPrimitiveFormError=na;exports.EmbeddedChatPrimitiveFormField=Wi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=Ui;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=Ki;exports.EmbeddedChatPrimitiveFormFieldEmail=Qi;exports.EmbeddedChatPrimitiveFormFieldError=aa;exports.EmbeddedChatPrimitiveFormFieldFile=Vi;exports.EmbeddedChatPrimitiveFormFieldLabel=Ni;exports.EmbeddedChatPrimitiveFormFieldSelect=zi;exports.EmbeddedChatPrimitiveFormFieldSelectContent=Xi;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=Ji;exports.EmbeddedChatPrimitiveFormFieldSelectItem=ea;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ia;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ta;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=Gi;exports.EmbeddedChatPrimitiveFormFieldSelectValue=Yi;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=Zi;exports.EmbeddedChatPrimitiveFormFieldText=$;exports.EmbeddedChatPrimitiveFormFieldTextArea=$i;exports.EmbeddedChatPrimitiveFormFooter=ra;exports.EmbeddedChatPrimitiveFormHeader=Di;exports.EmbeddedChatPrimitiveFormHeading=Ri;exports.EmbeddedChatPrimitiveFormSubmit=oa;exports.EmbeddedChatPrimitiveFormSuccess=da;exports.EmbeddedChatPrimitiveFormSuccessButton=la;exports.EmbeddedChatPrimitiveFormSuccessHeading=ca;exports.EmbeddedChatPrimitiveFormSuccessMessage=ma;exports.EmbeddedChatPrimitiveFormWrapper=Hi;exports.EmbeddedChatPrimitiveHeaderToolbar=pe;exports.EmbeddedChatPrimitiveHelpActions=Ci;exports.EmbeddedChatPrimitiveHelpActionsMenu=bi;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=gi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Pi;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Ai;exports.EmbeddedChatPrimitiveHelpActionsTrigger=vi;exports.EmbeddedChatPrimitiveInput=ft;exports.EmbeddedChatPrimitiveInputFieldset=It;exports.EmbeddedChatPrimitiveInputGroup=Mt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=qe;exports.EmbeddedChatPrimitiveMarkdown=ot;exports.EmbeddedChatPrimitiveMessageAction=ht;exports.EmbeddedChatPrimitiveMessageAnnotationAction=lt;exports.EmbeddedChatPrimitiveMessageAnnotationActions=mt;exports.EmbeddedChatPrimitiveMessageAttachments=Ye;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=Xe;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=Ze;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=et;exports.EmbeddedChatPrimitiveMessageAttachmentsList=Je;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=tt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=st;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=at;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=it;exports.EmbeddedChatPrimitiveMessageAvatar=Qe;exports.EmbeddedChatPrimitiveMessageAvatarContent=Ve;exports.EmbeddedChatPrimitiveMessageAvatarFallback=$e;exports.EmbeddedChatPrimitiveMessageAvatarImage=Ue;exports.EmbeddedChatPrimitiveMessageContent=Ge;exports.EmbeddedChatPrimitiveMessageContentWrapper=ze;exports.EmbeddedChatPrimitiveMessageHeader=We;exports.EmbeddedChatPrimitiveMessageLoading=Ne;exports.EmbeddedChatPrimitiveMessageName=Ke;exports.EmbeddedChatPrimitiveMessageSourceItem=vt;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=bt;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=_t;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=Et;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=gt;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=Ft;exports.EmbeddedChatPrimitiveMessageSourceItemTag=At;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=Pt;exports.EmbeddedChatPrimitiveMessageSources=ut;exports.EmbeddedChatPrimitiveMessageSourcesHeader=Ct;exports.EmbeddedChatPrimitiveMessageSourcesList=pt;exports.EmbeddedChatPrimitiveMessageToolbar=ct;exports.EmbeddedChatPrimitiveMessageWrapper=re;exports.EmbeddedChatPrimitiveMessages=ke;exports.EmbeddedChatPrimitiveRoot=Ce;exports.EmbeddedChatPrimitiveSendButton=St;exports.EmbeddedChatPrimitiveSendButtonIcon=xt;exports.EmbeddedChatPrimitiveTaglineBrandName=hi;exports.EmbeddedChatPrimitiveTaglineContainer=ci;exports.EmbeddedChatPrimitiveTaglineLogo=li;exports.EmbeddedChatPrimitiveTaglineText=mi;exports.EmbeddedChatPrimitiveToolbarHeader=be;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=ve;exports.EmbeddedChatPrimitiveWorkflow=Oe;exports.EmbeddedChatPrimitiveWorkflows=Le;exports.EmbeddedChatPrimitiveWorkflowsLabel=De;exports.EmbeddedChatPrimitiveWorkflowsList=Re;exports.EmbeddedChatPrimitiveWrapper=ue;exports.ExampleQuestion=He;exports.ExampleQuestionButton=we;exports.ExampleQuestions=Te;exports.ExampleQuestionsLabel=ye;exports.ExampleQuestionsList=je;exports.FeedbackForm=fi;exports.FeedbackItem=Si;exports.FeedbackItemCheckbox=xi;exports.FeedbackItemCheckboxIndicator=Bi;exports.FeedbackItemDescription=yi;exports.FeedbackItemLabel=Ti;exports.FeedbackModal=_i;exports.FeedbackModalBody=Mi;exports.FeedbackModalClose=Ii;exports.FeedbackModalContent=Fi;exports.FeedbackModalHeader=ki;exports.FeedbackModalOverlay=Ei;exports.FeedbackSubmitButton=ji;exports.Footer=kt;exports.Form=wi;exports.FormCancel=sa;exports.FormClose=Li;exports.FormContent=qi;exports.FormDescription=Oi;exports.FormError=na;exports.FormField=Wi;exports.FormFieldCheckbox=Ui;exports.FormFieldCheckboxIndicator=Ki;exports.FormFieldEmail=Qi;exports.FormFieldError=aa;exports.FormFieldFile=Vi;exports.FormFieldLabel=Ni;exports.FormFieldSelect=zi;exports.FormFieldSelectContent=Xi;exports.FormFieldSelectIcon=Ji;exports.FormFieldSelectItem=ea;exports.FormFieldSelectItemIndicator=ia;exports.FormFieldSelectItemText=ta;exports.FormFieldSelectTrigger=Gi;exports.FormFieldSelectValue=Yi;exports.FormFieldSelectViewport=Zi;exports.FormFieldText=$;exports.FormFieldTextArea=$i;exports.FormFooter=ra;exports.FormHeader=Di;exports.FormHeading=Ri;exports.FormSubmit=oa;exports.FormSuccess=da;exports.FormSuccessButton=la;exports.FormSuccessHeading=ca;exports.FormSuccessMessage=ma;exports.FormWrapper=Hi;exports.Header=Ra;exports.HeaderToolbar=pe;exports.HeaderToolbarWrapper=ve;exports.HelpActions=Ci;exports.HelpActionsMenu=bi;exports.HelpActionsMenuArrow=gi;exports.HelpActionsMenuItem=Pi;exports.HelpActionsMenuItemIcon=Ai;exports.HelpActionsTrigger=vi;exports.Input=ft;exports.InputFieldset=It;exports.InputGroup=Mt;exports.IntroMessageWrapper=qe;exports.Markdown=ot;exports.MessageAction=ht;exports.MessageAnnotationAction=lt;exports.MessageAnnotationActions=mt;exports.MessageAttachments=Ye;exports.MessageAttachmentsItem=Xe;exports.MessageAttachmentsItemIcon=Ze;exports.MessageAttachmentsItemTitle=et;exports.MessageAttachmentsList=Je;exports.MessageAttachmentsPreview=tt;exports.MessageAttachmentsPreviewBody=st;exports.MessageAttachmentsPreviewClose=rt;exports.MessageAttachmentsPreviewContent=at;exports.MessageAttachmentsPreviewHeader=nt;exports.MessageAttachmentsPreviewOverlay=it;exports.MessageAvatar=Qe;exports.MessageAvatarContent=Ve;exports.MessageAvatarFallback=$e;exports.MessageAvatarImage=Ue;exports.MessageContent=Ge;exports.MessageContentWrapper=ze;exports.MessageHeader=We;exports.MessageLoading=Ne;exports.MessageName=Ke;exports.MessageSourceItem=vt;exports.MessageSourceItemBreadcrumbIcon=Tn;exports.MessageSourceItemBreadcrumbs=bt;exports.MessageSourceItemDescription=_t;exports.MessageSourceItemDescriptionPart=Et;exports.MessageSourceItemIcon=gt;exports.MessageSourceItemIndicator=Ft;exports.MessageSourceItemTag=At;exports.MessageSourceItemTitle=Pt;exports.MessageSources=ut;exports.MessageSourcesHeader=Ct;exports.MessageSourcesList=pt;exports.MessageToolbar=ct;exports.MessageWrapper=re;exports.Messages=ke;exports.PrimitiveMessagePart=An;exports.Root=Ce;exports.SendButton=St;exports.SendButtonIcon=xt;exports.TaglineBrandName=hi;exports.TaglineContainer=ci;exports.TaglineLogo=li;exports.TaglineText=mi;exports.ToolbarHeader=be;exports.Workflow=Oe;exports.Workflows=Le;exports.WorkflowsLabel=De;exports.WorkflowsList=Re;exports.Wrapper=ue;
|