1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1172],{25376:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(48040);s(76196);var r=s(88049),l=s(59222),n=s(94075);let i=e=>{let{markdownContent:t}=e;return(0,a.jsx)(r.oz,{skipHtml:!1,components:{code:n.default},rehypePlugins:[l.A],children:t})}},60559:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(48040),r=s(76196);let l=e=>{let{children:t,id:s,onClick:l,className:n="",variant:i="primary",brand:o="default",size:c="medium"}=e;(0,r.useEffect)(()=>{if(s){let e=document.querySelector("#".concat(s));e&&(e=>{for(let t of e.querySelectorAll("svg, div"))t.id=s})(e)}},[s]);let d="".concat("flex justify-center items-center gap-2 rounded-lg uppercase font-medium geist-mono-font-family transition-all duration-300 hover:scale-105"," ").concat("small"===c?"min-w-8 min-h-6 px-4 py-1.5 text-xs":"large"===c?"min-w-12 min-h-10 px-8 py-4 text-base":"min-w-10 min-h-8 px-6 py-2 text-sm"," ").concat((()=>{if("primary"===i)switch(o){case"asi1":return"bg-ds-brand-asi1-primary text-black hover:bg-ds-brand-asi1-primary/90";case"flockx":return"bg-ds-brand-flockx-primary text-white hover:bg-ds-brand-flockx-light";case"agentverse":return"bg-ds-primary-dark text-white hover:bg-ds-primary-dark/90";default:return"bg-[#000D3D] text-white hover:bg-[#3918BE]"}switch(o){case"asi1":return"border-2 border-ds-brand-asi1-primary text-ds-brand-asi1-primary hover:bg-ds-brand-asi1-primary hover:text-black";case"flockx":return"border-2 border-ds-brand-flockx-primary text-ds-brand-flockx-primary hover:bg-ds-brand-flockx-primary hover:text-white";case"agentverse":return"border-2 border-ds-primary-dark text-ds-primary-dark hover:bg-ds-primary-dark hover:text-white";default:return"bg-[#F2F3F5] text-[#000D3D] hover:bg-[#EFEBFF]"}})()," ").concat(n);return(0,a.jsx)("button",{id:s,onClick:l,className:d,children:t})}},91172:(e,t,s)=>{s.d(t,{A:()=>c});var a=s(48040),r=s(76196),l=s(34566),n=s(25376);let i=e=>{let{onClose:t}=e,[s]=(0,r.useState)(crypto.randomUUID()),[i,o]=(0,r.useState)([{type:"ai",text:"Hi there! \uD83D\uDC4B Welcome to our chat."},{type:"ai",text:"How can I assist you today?"}]),[c,d]=(0,r.useState)(""),[x,m]=(0,r.useState)(!1),u=(0,r.useRef)(null),h=e=>{var t;if(!e.trim())return;o(t=>[...t,{type:"user",text:e}]),d(""),m(!0);let a={id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g,e=>{let t=Math.trunc(16*Math.random());return("x"===e?t:3&t|8).toString(16)}),source:"websocket",type:"message",role_type:"human",text:e,twin_id:"f1bff65d-c15a-44e5-bc79-84ccaf74a246",session_id:s,created_at:new Date().toISOString(),metadata:{}};(null==(t=u.current)?void 0:t.readyState)===WebSocket.OPEN&&u.current.send(JSON.stringify(a))};return(0,r.useEffect)(()=>{let e=new WebSocket("".concat("wss://staging-api.flockx.io/v2/websockets/").concat(s));u.current=e;let t=()=>console.log("WebSocket connected"),a=e=>{let t=JSON.parse(e.data);t.text&&"platform"===t.source&&"ai"===t.role_type&&"message"===t.type&&(o(e=>{var s;let a=e.at(-1);return(null==(s=t.metadata.follow_up_questions)?void 0:s.length)>0?[...e.slice(0,-1),{type:"ai",text:t.text,followUps:t.metadata.follow_up_questions}]:1===t.metadata.chunk_index||(null==a?void 0:a.type)!=="ai"?[...e,{type:"ai",text:t.text}]:[...e.slice(0,-1),{...a,text:t.text}]}),m(!1))},r=e=>console.error("WebSocket error:",e),l=()=>console.log("WebSocket disconnected");return e.addEventListener("open",t),e.addEventListener("message",a),e.addEventListener("error",r),e.addEventListener("close",l),()=>{e.removeEventListener("open",t),e.removeEventListener("message",a),e.removeEventListener("error",r),e.removeEventListener("close",l),e.close()}},[]),(0,a.jsxs)("div",{className:"fixed bottom-0 md:bottom-3 right-0 md:right-3 w-full max-w-md bg-[#F3F5F8] shadow-xl rounded-xl z-[100] pb-6",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center bg-gradient-to-b from-[rgba(95,56,251,
10.1)] to-[rgba(208,234,255,0.1)] rounded-xl px-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold"}),(0,a.jsx)("button",{onClick:t,className:"text-[#000D3D] mt-6",children:"â"})]}),(0,a.jsxs)("div",{className:"px-6",children:[(0,a.jsxs)("div",{className:"p-4 space-y-2 h-[calc(100vh-128px)] md:!h-[464px] overflow-y-auto",children:[i.map((e,t)=>(0,a.jsxs)("div",{className:"flex ".concat("user"===e.type?"justify-end":"justify-start"),children:["ai"===e.type&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-white mt-2 mr-2 flex justify-center items-center",children:(0,a.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#0B1742] flex justify-center items-center",children:(0,a.jsx)(l.default,{src:"/Images/logo/fetch_logo_only_white.svg",alt:"agentverse-img",width:6,height:6,className:"w-[6px] h-[6px]"})})}),(0,a.jsxs)("div",{className:"px-4 py-3 rounded-lg text-[#000D3D] ".concat("user"===e.type?"bg-[#FCFCFD]":"bg-white"),children:["ai"===e.type?(0,a.jsx)(n.A,{markdownContent:e.text}):e.text,e.followUps&&e.followUps.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:e.followUps.map((e,t)=>(0,a.jsx)("button",{onClick:()=>h(e),className:"px-3 py-2 bg-ds-gray-800 text-ds-text-onDark rounded-2xl text-sm hover:bg-ds-gray-900 transition",children:e},t))})]})]},t)),x&&(0,a.jsxs)("div",{className:"flex justify-start",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-white mt-2 mr-2 flex justify-center items-center",children:(0,a.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#0B1742] flex justify-center items-center",children:(0,a.jsx)(l.default,{src:"/Images/logo/fetch_logo_only_white.svg",alt:"agentverse-img",width:6,height:6,className:"w-[6px] h-[6px]"})})}),(0,a.jsxs)("div",{className:"bg-white text-[#000D3D] px-4 py-3 rounded-lg flex items-center space-x-1",children:[(0,a.jsx)("span",{className:"dot-animation"}),(0,a.jsx)("span",{className:"dot-animation"}),(0,a.jsx)("span",{className:"dot-animation"})]})]})]}),(0,a.jsx)("div",{className:"p-4 h-[56px] w-full bg-white rounded-lg",children:(0,a.jsxs)("div",{className:"flex justify-between space-x-2 w-full",children:[(0,a.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"Type your message...",className:"focus:outline-none w-11/12",onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),h(c))}}),(0,a.jsx)("div",{onClick:()=>h(c),className:"cursor-pointer w-[14px] h-[14px] ml-3 my-auto",children:(0,a.jsx)(l.default,{src:"/Images/icons/send-icon.svg",alt:"agentverse-img",width:14,height:14})})]})})]})]})};var o=s(60559);let c=()=>{let[e,t]=(0,r.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o.A,{onClick:()=>t(!e),className:"fixed bottom-12 right-12 !px-6 !py-4 z-[99] flex !bg-ds-gray-800 !text-ds-text-onDark hover:!bg-ds-primary",children:[(0,a.jsx)(l.default,{src:"/Images/logo/fetch_logo_only_white.svg",alt:"agentverse-img",width:16,height:16,className:"w-4 h-4 mr-1 my-auto"}),"Chat with us"]}),e&&(0,a.jsx)(i,{onClose:()=>t(!1)})]})}},94075:(e,t,s)=>{s.d(t,{default:()=>c});var a=s(48040),r=s(34566),l=s(76196),n=s(17198),i=s(85876);let o={'code[class*="language-"]':{background:"transparent"}},c=e=>{let{children:t}=e,[s,c]=(0,l.useState)(!1),[d,x]=(0,l.useState)(0);return((0,l.useEffect)(()=>{let e="string"==typeof t?t:null==t?void 0:t.toString(),s=null==e?void 0:e.split("\n").filter(Boolean).length;x(null!=s?s:0)},[t]),1===d)?(0,a.jsx)("div",{className:"inline-flex",children:(0,a.jsx)(i.A,{id:"code",language:"python",style:o,wrapLines:!0,wrapLongLines:!0,children:t})}):(0,a.jsx)("div",{className:"my-[64px] flex flex-col items-center",children:(0,a.jsx)("div",{className:"flex w-[360px] flex-col justify-center md:w-[800px]",children:(0,a.jsxs)("div",{className:"bg-[#F3F5F8] flex flex-col gap-[20px] p-6 rounded-2xl",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("div",{children:(0,a.jsx)(r.default,{src:"/Images/shapes/code-icon.svg",alt:"code-icon",width:40,height:8})}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.LW,{className:"text-[#8A9FB8]"}),(0,a.jsx)("div",{className:"text-[14px] font-normal text-[#8A9FB8]",children:"copied"})]}
1),(0,a.jsx)(r.default,{src:"/Images/shapes/copy-icon.svg",alt:"code-icon",className:"cursor-pointer !rounded-none",width:15,height:15,onClick:()=>{let e="string"==typeof t?t:null==t?void 0:t.toString();navigator.clipboard.writeText(null!=e?e:""),c(!0),setTimeout(()=>c(!1),1e4)},id:"custom_code_copy_icon","data-testid":"custom_code_copy_icon"})]})]}),(0,a.jsx)(i.A,{id:"code",language:"python",wrapLines:!0,wrapLongLines:!0,customStyle:{backgroundColor:"#F3F5F8"},children:t})]})})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.