khoj 1.26.4.dev2__py3-none-any.whl → 1.26.5.dev16__py3-none-any.whl

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.
Files changed (72) hide show
  1. khoj/interface/compiled/404/index.html +1 -1
  2. khoj/interface/compiled/_next/static/chunks/1210.132a7e1910006bbb.js +1 -0
  3. khoj/interface/compiled/_next/static/chunks/1459.690bf20e7d7b7090.js +1 -0
  4. khoj/interface/compiled/_next/static/chunks/1603-bfc0b26e32ad88e3.js +1 -0
  5. khoj/interface/compiled/_next/static/chunks/2697-37579bcc7593dd5c.js +1 -0
  6. khoj/interface/compiled/_next/static/chunks/3423-aad88d6c1f029135.js +1 -0
  7. khoj/interface/compiled/_next/static/chunks/6327-18f0b45cc5a13afb.js +3 -0
  8. khoj/interface/compiled/_next/static/chunks/{4086-2c74808ba38a5a0f.js → 8840-b8d7b9f0923c6651.js} +1 -1
  9. khoj/interface/compiled/_next/static/chunks/9417-759984ad62caa3dc.js +1 -0
  10. khoj/interface/compiled/_next/static/chunks/9479-fcce773453e472c4.js +1 -0
  11. khoj/interface/compiled/_next/static/chunks/94ca1967.5584df65931cfe83.js +1 -0
  12. khoj/interface/compiled/_next/static/chunks/964ecbae.ea4eab2a3a835ffe.js +1 -0
  13. khoj/interface/compiled/_next/static/chunks/app/agents/{page-88aa3042711107b7.js → page-997bf85681256672.js} +1 -1
  14. khoj/interface/compiled/_next/static/chunks/app/automations/{page-5480731341f34450.js → page-1688dead2f21270d.js} +1 -1
  15. khoj/interface/compiled/_next/static/chunks/app/chat/page-027e61d082025c50.js +1 -0
  16. khoj/interface/compiled/_next/static/chunks/app/factchecker/{page-e7b34316ec6f44de.js → page-f544113d240423e9.js} +1 -1
  17. khoj/interface/compiled/_next/static/chunks/app/{page-10a5aad6e04f3cf8.js → page-88139ac728fe3533.js} +1 -1
  18. khoj/interface/compiled/_next/static/chunks/app/search/{page-d56541c746fded7d.js → page-3ada11cda5050eeb.js} +1 -1
  19. khoj/interface/compiled/_next/static/chunks/app/settings/{page-e044a999468a7c5d.js → page-fa11cafaec7ab39f.js} +1 -1
  20. khoj/interface/compiled/_next/static/chunks/app/share/chat/page-511186e77624eaec.js +1 -0
  21. khoj/interface/compiled/_next/static/chunks/webpack-c48e5093123a4a56.js +1 -0
  22. khoj/interface/compiled/_next/static/css/{c808691c459e3887.css → 3cf13271869a4aeb.css} +1 -1
  23. khoj/interface/compiled/_next/static/css/4cae6c0e5c72fb2d.css +1 -0
  24. khoj/interface/compiled/_next/static/css/825406e5ebee86d3.css +25 -0
  25. khoj/interface/compiled/_next/static/css/f84cf008d5ff4161.css +1 -0
  26. khoj/interface/compiled/agents/index.html +1 -1
  27. khoj/interface/compiled/agents/index.txt +2 -2
  28. khoj/interface/compiled/automations/index.html +1 -1
  29. khoj/interface/compiled/automations/index.txt +2 -2
  30. khoj/interface/compiled/chat/index.html +1 -1
  31. khoj/interface/compiled/chat/index.txt +2 -2
  32. khoj/interface/compiled/factchecker/index.html +1 -1
  33. khoj/interface/compiled/factchecker/index.txt +2 -2
  34. khoj/interface/compiled/index.html +1 -1
  35. khoj/interface/compiled/index.txt +2 -2
  36. khoj/interface/compiled/search/index.html +1 -1
  37. khoj/interface/compiled/search/index.txt +2 -2
  38. khoj/interface/compiled/settings/index.html +1 -1
  39. khoj/interface/compiled/settings/index.txt +2 -2
  40. khoj/interface/compiled/share/chat/index.html +1 -1
  41. khoj/interface/compiled/share/chat/index.txt +2 -2
  42. khoj/processor/conversation/google/gemini_chat.py +28 -13
  43. khoj/processor/conversation/google/utils.py +34 -12
  44. khoj/processor/conversation/openai/gpt.py +4 -4
  45. khoj/processor/conversation/prompts.py +144 -0
  46. khoj/processor/conversation/utils.py +22 -13
  47. khoj/processor/image/generate.py +5 -5
  48. khoj/processor/tools/online_search.py +4 -4
  49. khoj/routers/api.py +4 -2
  50. khoj/routers/api_chat.py +85 -46
  51. khoj/routers/helpers.py +225 -29
  52. khoj/routers/web_client.py +0 -11
  53. khoj/utils/helpers.py +7 -3
  54. {khoj-1.26.4.dev2.dist-info → khoj-1.26.5.dev16.dist-info}/METADATA +1 -1
  55. {khoj-1.26.4.dev2.dist-info → khoj-1.26.5.dev16.dist-info}/RECORD +60 -56
  56. khoj/interface/compiled/_next/static/chunks/1603-fa3ee48860b9dc5c.js +0 -1
  57. khoj/interface/compiled/_next/static/chunks/2697-a38d01981ad3bdf8.js +0 -1
  58. khoj/interface/compiled/_next/static/chunks/4051-2cf66369d6ca0f1d.js +0 -3
  59. khoj/interface/compiled/_next/static/chunks/9178-899fe9a6b754ecfe.js +0 -1
  60. khoj/interface/compiled/_next/static/chunks/9417-46ed3aaa639c85ef.js +0 -1
  61. khoj/interface/compiled/_next/static/chunks/9479-ea776e73f549090c.js +0 -1
  62. khoj/interface/compiled/_next/static/chunks/app/chat/page-702057ccbcf27881.js +0 -1
  63. khoj/interface/compiled/_next/static/chunks/app/share/chat/page-fbbd66a4d4633438.js +0 -1
  64. khoj/interface/compiled/_next/static/chunks/webpack-2651a68f46ac3cb7.js +0 -1
  65. khoj/interface/compiled/_next/static/css/2de69f0be774c768.css +0 -1
  66. khoj/interface/compiled/_next/static/css/3e1f1fdd70775091.css +0 -1
  67. khoj/interface/compiled/_next/static/css/b9a6bf04305d98d7.css +0 -25
  68. /khoj/interface/compiled/_next/static/{wyjqS7cuSX-u62BTNYqhU → 1dVlkdPTTw5b6saGVG4b3}/_buildManifest.js +0 -0
  69. /khoj/interface/compiled/_next/static/{wyjqS7cuSX-u62BTNYqhU → 1dVlkdPTTw5b6saGVG4b3}/_ssgManifest.js +0 -0
  70. {khoj-1.26.4.dev2.dist-info → khoj-1.26.5.dev16.dist-info}/WHEEL +0 -0
  71. {khoj-1.26.4.dev2.dist-info → khoj-1.26.5.dev16.dist-info}/entry_points.txt +0 -0
  72. {khoj-1.26.4.dev2.dist-info → khoj-1.26.5.dev16.dist-info}/licenses/LICENSE +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9178],{89178:function(e,t,a){"use strict";a.d(t,{H:function(){return et},Z:function(){return es}});var s=a(57437),n=a(34531),l=a.n(n),r=a(14944),o=a(39952),c=a.n(o),i=a(2265),d=a(34040);a(7395);var h=a(26100),u=a(36013),m=a(13304),g=a(12218),p=a(74697),f=a(37440);let x=m.fC,w=m.xz;m.x8;let j=m.h_,y=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(m.aV,{className:(0,f.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...n,ref:t})});y.displayName=m.aV.displayName;let b=(0,g.j)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),N=i.forwardRef((e,t)=>{let{side:a="right",className:n,children:l,...r}=e;return(0,s.jsxs)(j,{children:[(0,s.jsx)(y,{}),(0,s.jsxs)(m.VY,{ref:t,className:(0,f.cn)(b({side:a}),n),...r,children:[l,(0,s.jsxs)(m.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,s.jsx)(p.Z,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});N.displayName=m.VY.displayName;let k=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,f.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...a})};k.displayName="SheetHeader";let C=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(m.Dx,{ref:t,className:(0,f.cn)("text-lg font-semibold text-foreground",a),...n})});C.displayName=m.Dx.displayName;let M=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(m.dk,{ref:t,className:(0,f.cn)("text-sm text-muted-foreground",a),...n})});M.displayName=m.dk.displayName;var v=a(19573),_=a(11838),R=a.n(_),E=a(89417);let T=new r.Z({html:!0,linkify:!0,typographer:!0});function D(e){let t=(0,E.Le)(e.title||".txt","w-6 h-6 text-muted-foreground inline-flex mr-2"),a=function(e){let t=["org","md","markdown"].includes(e.title.split(".").pop()||"")?e.content.split("\n").slice(1).join("\n"):e.content;return e.showFullContent?R().sanitize(T.render(t)):R().sanitize(t)}(e),[n,l]=(0,i.useState)(!1);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(v.J2,{open:n&&!e.showFullContent,onOpenChange:l,children:[(0,s.jsx)(v.xo,{asChild:!0,children:(0,s.jsxs)(u.Zb,{onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:"".concat(e.showFullContent?"w-auto":"w-[200px]"," overflow-hidden break-words text-balance rounded-lg p-2 bg-muted border-none"),children:[(0,s.jsxs)("h3",{className:"".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground}"),children:[t,e.title]}),(0,s.jsx)("p",{className:"".concat(e.showFullContent?"block":"overflow-hidden line-clamp-2"),dangerouslySetInnerHTML:{__html:a}})]})}),(0,s.jsx)(v.yk,{className:"w-[400px] mx-2",children:(0,s.jsxs)(u.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg p-2 border-none",children:[(0,s.jsxs)("h3",{className:"line-clamp-2 text-muted-foreground}",children:[t,e.title]}),(0,s.jsx)("p",{className:"overflow-hidden line-clamp-3",dangerouslySetInnerHTML:{__html:a}})]})})]})})}function L(e){let[t,a]=(0,i.useState)(!1);if(!e.link||e.link.split(" ").length>1)return null;let n="https://www.google.com/s2/favicons?domain=globe",l="unknown";try{l=new URL(e.link).hostname,n="https://www.google.com/s2/favicons?domain=".concat(l)}catch(t){return console.warn("Error parsing domain from link: ".concat(e.link)),null}return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(v.J2,{open:t&&!e.showFullContent,onOpenChange:a,children:[(0,s.jsx)(v.xo,{asChild:!0,children:(0,s.jsx)(u.Zb,{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},className:"".concat(e.showFullContent?"w-auto":"w-[200px]"," overflow-hidden break-words rounded-lg text-balance p-2 bg-muted border-none"),children:(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"!no-underline p-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("img",{src:n,alt:"",className:"!w-4 h-4 mr-2 flex-shrink-0"}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:l})]}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," font-bold"),children:e.title}),(0,s.jsx)("p",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"),children:e.description})]})})})}),(0,s.jsx)(v.yk,{className:"w-[400px] mx-2",children:(0,s.jsx)(u.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg border-none",children:(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"!no-underline p-2",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("img",{src:n,alt:"",className:"!w-4 h-4 mr-2"}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," text-muted-foreground"),children:l})]}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," font-bold"),children:e.title}),(0,s.jsx)("p",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-3"),children:e.description})]})})})})]})})}function F(e){let[t,a]=(0,i.useState)(3);(0,i.useEffect)(()=>{a(e.isMobileWidth?1:3)},[e.isMobileWidth]);let n=e.notesReferenceCardData.slice(0,t),l=n.length<t?e.onlineReferenceCardData.slice(0,t-n.length):[],r=e.notesReferenceCardData.length>0||e.onlineReferenceCardData.length>0,o=e.notesReferenceCardData.length+e.onlineReferenceCardData.length;return 0===o?null:(0,s.jsxs)("div",{className:"pt-0 px-4 pb-4 md:px-6",children:[(0,s.jsxs)("h3",{className:"inline-flex items-center",children:["References",(0,s.jsxs)("p",{className:"text-gray-400 m-2",children:[o," sources"]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[n.map((e,t)=>(0,i.createElement)(D,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),l.map((e,t)=>(0,i.createElement)(L,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),r&&(0,s.jsx)(S,{notesReferenceCardData:e.notesReferenceCardData,onlineReferenceCardData:e.onlineReferenceCardData})]})]})}function S(e){return e.notesReferenceCardData||e.onlineReferenceCardData?(0,s.jsxs)(x,{children:[(0,s.jsxs)(w,{className:"text-balance w-auto md:w-[200px] justify-start overflow-hidden break-words p-0 bg-transparent border-none text-gray-400 align-middle items-center !m-2 inline-flex",children:["View references",(0,s.jsx)(h.o,{className:"m-1"})]}),(0,s.jsxs)(N,{className:"overflow-y-scroll",children:[(0,s.jsxs)(k,{children:[(0,s.jsx)(C,{children:"References"}),(0,s.jsx)(M,{children:"View all references for this response"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[e.notesReferenceCardData.map((e,t)=>(0,i.createElement)(D,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)})),e.onlineReferenceCardData.map((e,t)=>(0,i.createElement)(L,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)}))]})]})]}):null}var B=a(34149),H=a(29386),O=a(31784),q=a(60665),A=a(96006),Z=a(18444),z=a(35304),I=a(8589),P=a(63205),W=a(32970),G=a(84120),U=a(92880),V=a(48408),$=a(67722),J=a(58485),Y=a(58575),K=a(25800);let Q=new r.Z({html:!0,linkify:!0,typographer:!0});function X(e,t,a){fetch("/api/chat/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uquery:e,kquery:t,sentiment:a})})}function ee(e){let{uquery:t,kquery:a}=e,[n,r]=(0,i.useState)(null);return(0,i.useEffect)(()=>{null!==n&&setTimeout(()=>{r(null)},2e3)},[n]),(0,s.jsxs)("div",{className:"".concat(l().feedbackButtons," flex align-middle justify-center items-center"),children:[(0,s.jsx)("button",{title:"Like",className:l().thumbsUpButton,disabled:null!==n,onClick:()=>{X(t,a,"positive"),r(!0)},children:!0===n?(0,s.jsx)(B.V,{alt:"Liked Message",className:"text-green-500",weight:"fill"}):(0,s.jsx)(B.V,{alt:"Like Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),(0,s.jsx)("button",{title:"Dislike",className:l().thumbsDownButton,disabled:null!==n,onClick:()=>{X(t,a,"negative"),r(!1)},children:!1===n?(0,s.jsx)(H.L,{alt:"Disliked Message",className:"text-red-500",weight:"fill"}):(0,s.jsx)(H.L,{alt:"Dislike Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})})]})}function et(e){let t=e.message.match(/\*\*(.*)\*\*/),a=function(e,t){let a=e.toLowerCase(),n="inline mt-1 mr-2 ".concat(t," h-4 w-4");return a.includes("understanding")?(0,s.jsx)(O.a,{className:"".concat(n)}):a.includes("generating")?(0,s.jsx)(q.Z,{className:"".concat(n)}):a.includes("data sources")||a.includes("notes")?(0,s.jsx)(A.g,{className:"".concat(n)}):a.includes("read")?(0,s.jsx)(Z.f,{className:"".concat(n)}):a.includes("search")?(0,s.jsx)(z.Y,{className:"".concat(n)}):a.includes("summary")||a.includes("summarize")||a.includes("enhanc")?(0,s.jsx)(I.u,{className:"".concat(n)}):a.includes("paint")?(0,s.jsx)(P.Y,{className:"".concat(n)}):(0,s.jsx)(O.a,{className:"".concat(n)})}(t?t[1]:"",e.primary?(0,Y.oz)(e.agentColor):"text-gray-500"),n=R().sanitize(Q.render(e.message));return(0,s.jsxs)("div",{className:"".concat(l().trainOfThoughtElement," break-all items-center ").concat(e.primary?"text-gray-400":"text-gray-300"," ").concat(l().trainOfThought," ").concat(e.primary?l().primary:""),children:[a,(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:n}})]})}Q.use(c(),{inline:!0,code:!0});let ea=(0,i.forwardRef)((e,t)=>{var a,n;let r,o,c,h,u;let[m,g]=(0,i.useState)(!1),[p,f]=(0,i.useState)(!1),[x,w]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[b,N]=(0,i.useState)(!1),[k,C]=(0,i.useState)(!1),M=(0,i.useRef)(!1),v=(0,i.useRef)(null);async function _(){let t=e.chatMessage.message.match(/[^.!?]+[.!?]*/g)||[];if(!t||0===t.length||!t[0])return;N(!0);let a=E(t[0]);for(let e=0;e<t.length&&!M.current;e++){let s=a;e<t.length-1&&(a=E(t[e+1]));try{let e=await s,t=URL.createObjectURL(e);await function(e){return new Promise((t,a)=>{let s=new Audio(e);s.onended=t,s.onerror=a,s.play()})}(t)}catch(e){console.error("Error:",e);break}}N(!1),C(!1)}async function E(e){let t=await fetch("/api/chat/speech?text=".concat(encodeURIComponent(e)),{method:"POST",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("Network response was not ok");return await t.blob()}(0,i.useEffect)(()=>{M.current=k},[k]),(0,i.useEffect)(()=>{let e=new MutationObserver((e,t)=>{if(v.current)for(let t of e)"childList"===t.type&&t.addedNodes.length>0&&(0,K.Z)(v.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]})});return v.current&&e.observe(v.current,{childList:!0}),()=>e.disconnect()},[v.current]),(0,i.useEffect)(()=>{var t;let a=e.chatMessage.message;a=a.replace(/\\\(/g,"LEFTPAREN").replace(/\\\)/g,"RIGHTPAREN").replace(/\\\[/g,"LEFTBRACKET").replace(/\\\]/g,"RIGHTBRACKET"),e.chatMessage.uploadedImageData&&(a="![uploaded image](".concat(e.chatMessage.uploadedImageData,")\n\n").concat(a)),e.chatMessage.intent&&"text-to-image"==e.chatMessage.intent.type?a="![generated image](data:image/png;base64,".concat(a,")"):e.chatMessage.intent&&"text-to-image2"==e.chatMessage.intent.type?a="![generated image](".concat(a,")"):e.chatMessage.intent&&"text-to-image-v3"==e.chatMessage.intent.type&&(a="![generated image](data:image/webp;base64,".concat(a,")")),e.chatMessage.intent&&e.chatMessage.intent.type.includes("text-to-image")&&(null===(t=e.chatMessage.intent["inferred-queries"])||void 0===t?void 0:t.length)>0&&(a+="\n\n".concat(e.chatMessage.intent["inferred-queries"][0])),w(a);let s=Q.render(a);s=s.replace(/LEFTPAREN/g,"\\(").replace(/RIGHTPAREN/g,"\\)").replace(/LEFTBRACKET/g,"\\[").replace(/RIGHTBRACKET/g,"\\]"),y(R().sanitize(s))},[e.chatMessage.message,e.chatMessage.intent]),(0,i.useEffect)(()=>{m&&setTimeout(()=>{g(!1)},2e3)},[m]),(0,i.useEffect)(()=>{v.current&&(v.current.querySelectorAll("pre > .hljs").forEach(e=>{if(!e.querySelector("".concat(l().codeCopyButton))){let t=document.createElement("button"),a=(0,s.jsx)(W.w,{size:24});(0,d.createRoot)(t).render(a),t.className="hljs ".concat(l().codeCopyButton),t.addEventListener("click",()=>{let a=e.textContent||"";a=(a=(a=a.replace(/^\$+/,"")).replace(/^Copy/,"")).trim(),navigator.clipboard.writeText(a);let n=(0,s.jsx)(G.J,{size:24});(0,d.createRoot)(t).render(n)}),e.prepend(t)}}),(0,K.Z)(v.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]}))},[j,p,v]);let T=function(e,t){let a=[],s=[];if(t){let e=[];for(let[a,s]of Object.entries(t)){if(s.answerBox&&e.push({title:s.answerBox.title,description:s.answerBox.answer,link:s.answerBox.source}),s.knowledgeGraph&&e.push({title:s.knowledgeGraph.title,description:s.knowledgeGraph.description,link:s.knowledgeGraph.descriptionLink}),s.webpages){if(s.webpages instanceof Array){let t=s.webpages.map(e=>({title:e.query,description:e.snippet,link:e.link}));e.push(...t)}else{let t=s.webpages;e.push({title:t.query,description:t.snippet,link:t.link})}}if(s.organic){let t=s.organic.map(e=>({title:e.title,description:e.snippet,link:e.link}));e.push(...t)}}a.push(...e)}if(e){let t=e.map(e=>e.compiled?{title:e.file,content:e.compiled}:{title:e.split("\n")[0],content:e.split("\n").slice(1).join("\n")});s.push(...t)}return{notesReferenceCardData:s,onlineReferenceCardData:a}}(e.chatMessage.context,e.chatMessage.onlineContext);return(0,s.jsxs)("div",{ref:t,className:(a=e.chatMessage,(r=[l().chatMessageContainer,"shadow-md"]).push(l()[a.by]),a.message||r.push(l().emptyChatMessage),e.customClassName&&r.push(l()["".concat(a.by).concat(e.customClassName)]),r.join(" ")),onMouseLeave:e=>f(!1),onMouseEnter:e=>f(!0),children:[(0,s.jsx)("div",{className:(n=e.chatMessage,(o=[l().chatMessageWrapper]).push(l()[n.by]),"khoj"===n.by&&o.push("border-l-4 border-opacity-50 ".concat("border-l-"+e.borderLeftColor)),o.join(" ")),children:(0,s.jsx)("div",{ref:v,className:l().chatMessage,dangerouslySetInnerHTML:{__html:j}})}),(0,s.jsx)("div",{className:l().teaserReferencesContainer,children:(0,s.jsx)(F,{isMobileWidth:e.isMobileWidth,notesReferenceCardData:T.notesReferenceCardData,onlineReferenceCardData:T.onlineReferenceCardData})}),(0,s.jsx)("div",{className:l().chatFooter,children:(p||e.isMobileWidth||e.isLastMessage||b)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{title:(h=(c=new Date(e.chatMessage.created+"Z")).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).toUpperCase(),u=c.toLocaleString("en-US",{year:"numeric",month:"short",day:"2-digit"}).replaceAll("-"," "),"".concat(h," on ").concat(u)),className:"text-gray-400 relative top-0 left-4",children:function(e){e.endsWith("Z")||(e+="Z");let t=new Date(e),a=new Date().getTime()-t.getTime();return a<6e4?"Just now":a<36e5?"".concat(Math.round(a/6e4),"m ago"):a<864e5?"".concat(Math.round(a/36e5),"h ago"):"".concat(Math.round(a/864e5),"d ago")}(e.chatMessage.created)}),(0,s.jsxs)("div",{className:"".concat(l().chatButtons," shadow-sm"),children:["khoj"===e.chatMessage.by&&(b?k?(0,s.jsx)(J.l,{iconClassName:"p-0",className:"m-0"}):(0,s.jsx)("button",{title:"Pause Speech",onClick:e=>C(!0),children:(0,s.jsx)(U.d,{alt:"Pause Message",className:"hsl(var(--muted-foreground))"})}):(0,s.jsx)("button",{title:"Speak",onClick:e=>_(),children:(0,s.jsx)(V.j,{alt:"Speak Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})})),(0,s.jsx)("button",{title:"Copy",className:"".concat(l().copyButton),onClick:()=>{navigator.clipboard.writeText(x),g(!0)},children:m?(0,s.jsx)($.C,{alt:"Copied Message",weight:"fill",className:"text-green-500"}):(0,s.jsx)($.C,{alt:"Copy Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),"khoj"===e.chatMessage.by&&(e.chatMessage.intent?(0,s.jsx)(ee,{uquery:e.chatMessage.intent.query,kquery:e.chatMessage.message}):(0,s.jsx)(ee,{uquery:e.chatMessage.rawQuery||e.chatMessage.message,kquery:e.chatMessage.message}))]})]})})]})});ea.displayName="ChatMessage";var es=ea},34531:function(e){e.exports={chatMessageContainer:"chatMessage_chatMessageContainer__sAivf",chatMessageWrapper:"chatMessage_chatMessageWrapper__u5m8A",khojfullHistory:"chatMessage_khojfullHistory__NPu2l",youfullHistory:"chatMessage_youfullHistory__ioyfH",you:"chatMessage_you__6GUC4",khoj:"chatMessage_khoj__cjWON",khojChatMessage:"chatMessage_khojChatMessage__BabQz",emptyChatMessage:"chatMessage_emptyChatMessage__J9JRn",author:"chatMessage_author__muRtC",chatFooter:"chatMessage_chatFooter__0vR8s",chatButtons:"chatMessage_chatButtons__Lbk8T",codeCopyButton:"chatMessage_codeCopyButton__Y_Ujv",feedbackButtons:"chatMessage_feedbackButtons___Brdy",copyButton:"chatMessage_copyButton__jd7q7",trainOfThought:"chatMessage_trainOfThought__mR2Gg",primary:"chatMessage_primary__WYPEb",trainOfThoughtElement:"chatMessage_trainOfThoughtElement__le_bC"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9417],{58575:function(c,t,a){a.d(t,{Iu:function(){return r},Zc:function(){return o},oz:function(){return n},tp:function(){return e},xF:function(){return s}});let s=["red","yellow","green","blue","orange","purple","pink","teal","cyan","lime","indigo","fuchsia","rose","sky","amber","emerald"];function n(c){return s.includes(c)?"text-".concat(c,"-500"):"text-gray-500"}function e(c){return s.includes(c)?"bg-".concat(c,"-500 dark:bg-").concat(c,"-900 hover:bg-").concat(c,"-400 dark:hover:bg-").concat(c,"-800"):"bg-background"}function o(c){return"".concat(s.includes(c)?"bg-gradient-to-b from-[hsl(var(--background))] to-".concat(c,"-100/70 dark:from-[hsl(var(--background))] dark:to-").concat(c,"-950/30 "):"bg-gradient-to-b from-white to-orange-50"," dark:border dark:border-neutral-700")}function r(c){return s.includes(c)?"border-".concat(c,"-500"):"border-gray-500"}let l={};for(let c of s)l[c]=r(c)},89417:function(c,t,a){a.d(t,{BI:function(){return ce},vH:function(){return ca},Le:function(){return cn},TI:function(){return cs}});var s=a(57437);a(2265);var n=a(58575),e=a(16288),o=a(55631),r=a(8589),l=a(82059),i=a(58410),m=a(81980),h=a(46503),d=a(32145),x=a(57421),u=a(56698),j=a(47483),f=a(14850),v=a(5989),g=a(63205),p=a(18444),N=a(39557),k=a(86545),w=a(88420),z=a(70177),b=a(41959),M=a(67267),C=a(48687),y=a(96185),W=a(8606),H=a(48855),L=a(67247),B=a(43743),q=a(11925),E=a(20908),A=a(84835),F=a(77514),T=a(8658),V=a(58573),_=a(42520),G=a(98743),I=a(92648),O=a(77574),S=a(89475),D=a(5198),Y=a(2861),P=a(359),R=a(13493),X=a(88145),Z=a(58259),J=a(26100),K=a(12835);function U(c){let{className:t}=c;return(0,s.jsxs)("svg",{className:"".concat(null!=t?t:"w-6 h-6 text-muted-foreground inline-flex mr-1"),xmlns:"http://www.w3.org/2000/svg",width:"144.98",height:"160",viewBox:"-7.65 -13.389 144.98 160",children:[(0,s.jsx)("path",{fill:"#a04d32",stroke:"#000",strokeWidth:"3",d:"M133.399 46.067c-.205-3.15-2.842-4.366-5.993-2.125-7.22-1.297-14.305-.687-17.8-.981-7.662-1.073-14.041-5.128-14.041-5.128.932-1.239.486-3.917-5.498-4.101-1.646-.542-3.336-1.327-4.933-1.979.544-1.145-.133-2.836-.133-2.836 2.435-.672 2.808-3.842 1.848-5.709 3.106.084 2.612-4.718 2.183-6.381 2.435-.923 2.77-3.831 1.763-6.129 2.938-.671 3.022-4.114 2.77-6.548 3.023-.168 2.604-5.457 2.604-6.549 2.604-1.679 2.016-3.946 2.425-6.573 1.605-3.25-.577-4.173-2.116-.71-1.651 3.001-3.77 4.311-3.75 6.528.755 1.259-5.625 3.106-3.61 7.052-1.428 1.763-4.785 4.03-3.592 6.733-.606 1.326-4.888 4.433-3.041 7.371-4.03 2.687-3.79 3.335-2.938 5.793-1.147.736-2.318 1.862-2.995 3.094-1.32-1.568-2.603-4.429-2.584-8.294 0-3.275-6.1.318-6.1 6.784 0 .556-.056 1.061-.134 1.542-2.11.243-4.751.707-8.08 1.494-.106.073-.157.186-.182.316a8.704 8.704 0 01-.277-1.553c-.582-3.79-4.934-9.56-7.057-2.434-1.096 2.611-1.74 4.392-2.115 5.789v0s-.336.226-.957.61c-2.62 1.622-3.562 6.686-13.075 9.883-3.211 1.079-7.4 1.945-12.96 2.395-9.57.773-27.887 17.314-29.114 33.097-.283 3.964.31 13.737 3.596 22.31l.005.02c.015.042.032.081.048.122.052.134.103.267.156.398.28.718.579 1.405.895 2.062 1.885 4.028 4.46 7.59 7.934 9.882a25.252 25.252 0 004.372 2.762c5.907 9.749 18.442 22.252 42.075 14.859 36.255-10.284 56.263 13.809 58.568 15.5 3.399 3.433-8.786-29.835-34.587-44.788-15.253-8.322-5.678-22.656-4.585-27.718 0 0 12.227 8.557 21.087-4.52 8.004 2.062 13.367-1.462 20.25 1.03 4.184 1.833 21.77.726 15.235-9.104 4.11-2.683 4.544-1.815 6.6-5.9 1.104-4.952-1.403-6.012-2.167-7.366zM63.106 32.768c-.041.018-.086.04-.125.056.039-.034.075-.062.115-.102l.01.046zm-13.413 4.523c-.073.429-.143.829-.212 1.216.037-.832.085-1.714.143-2.646.024.435.05.904.069 1.43zm10.693-6.333c.746 1.124 1.662 2.179 1.662 2.179s-.875-.79-1.662-2.179z"}),(0,s.jsx)("path",{fill:"#7a9",stroke:"#000",strokeWidth:".5",d:"M6.448 104.253s10.02 36.105 46.549 24.68c36.255-10.284 56.263 13.809 58.568 15.5 3.399 3.433-8.786-29.835-34.587-44.788-15.253-8.322-5.678-22.656-4.585-27.718 0 0 12.227 8.557 21.087-4.52 8.004 2.062 13.367-1.462 20.25 1.03 4.184 1.833 21.77.726 15.235-9.104 4.11-2.683 4.544-1.815 6.6-5.9 1.105-4.952-1.402-6.011-2.166-7.366-.205-3.15-2.842-4.366-5.993-2.125-7.22-1.297-14.305-.687-17.8-.981-7.662-1.073-14.041-5.128-14.041-5.128.932-1.239.486-3.917-5.498-4.101-3.287-1.082-6.752-3.136-9.288-3.162-2.567 0-2.914-2.537-2.914-2.537-1.606-.87-3.924-4.252-3.9-9.438 0-3.275-6.098.318-6.098 6.784s-5.818 7.758-5.818 7.758-2.55-2.281-2.855-5.958c-.582-3.79-4.934-9.56-7.057-2.434-3.226 7.646-3.485 9.43-4.115 13.154-1.31 7.711-.345 8.012-.345 8.012l-32.824 23.43z"}),(0,s.jsx)("path",{fill:"#314b49",stroke:"#314b49",strokeWidth:".75",strokeLinecap:"round",strokeLinejoin:"round",d:"M84.11 42.833c1.549-.562.897-.415 1.153-.581-2.96.575-9.635.614-14.317-1.133.392.23 2.568.962 2.845 1.128.218.715.1 1.438 2.932 2.709 2.559.793 5.845.461 6.835-.529.109-1.684.126-1.065.553-1.594z"}),(0,s.jsx)("path",{fill:"#314b49",stroke:"#314b49",strokeWidth:".5",d:"M116.479 61.979c-2.83-2.085-4.881-.264-6.47-.413.99-.645 3.763-2.062 8.246-2.062 2.532 0 3.879 2.196 5.57 2.207 1.14.007 4.472-1.71 5.14-2.378-.97.838.454 1.755-.49 3.003-.281.359-.836 1.511-2.662 2.051-2.05.971-5.411 1.762-9.334-2.408z"}),(0,s.jsx)("path",{fill:"#314b49",d:"M54.932 24.033s-3.355 7.996.312 15.329.522-6.829 4.688-4.162c3.397.385-2.387-3.215-2.033-7.819-.176-2.892-1.77-5.194-2.967-3.348zM119.336 50.417c0 1.121-1.363 2.03-3.045 2.03 3.573-1.121-.201-4.653-3.045-2.03 0-1.121 1.363-2.03 3.045-2.03s3.045.909 3.045 2.03z"}),(0,s.jsx)("path",{fill:"#314b49",d:"M114.169 47.833c3.772-.231 6.336.323 5.536 3.138.548-1.126 1.292-2.83-1.046-3.507-1.746-.388-3.3-.378-4.49.369z"}),(0,s.jsx)("path",{fill:"#a04d32",stroke:"#000",strokeWidth:".5",d:"M59.929 69.234c0-3.521-1.51-7.166-7.04-14.583-1.635-2.192-2.62-4.336-3.211-6.275-1.401-3.295-3.426-8.019-.613-17.233 0 0 .62-.384 0 0-2.62 1.622-3.562 6.686-13.075 9.883-3.211 1.079-7.4 1.945-12.96 2.395-9.568.773-27.886 17.314-29.113 33.097-.283 3.964.31 13.737 3.596 22.31l.005.02c.015.042.032.081.048.122.052.134.103.267.156.398.28.718.579 1.405.895 2.062 1.885 4.028 4.46 7.59 7.934 9.882 3.084 2.404 5.606 3.306 5.606 3.306-2.588-3.578-3.77-7.562-2.263-12.32.65 2.637 1.903 4.162 3.646 4.777-.615-1.884-.827-3.549 0-4.651 2.567 6.734 5.353 9.031 8.17 10.686-2.63-4.914-4.031-10.005-3.77-15.337 2.569 6.028 6.596 9.945 10.56 13.954-3.78-5.966-6.911-12.104-6.977-19.046 1.693 2.778 3.935 4.932 6.6 6.601-1.683-2.709-2.505-5.51-2.263-8.423 4.424 4.945 9.36 6.607 14.332 8.046-5.197-3.625-9.843-7.537-12.32-12.572 2.972 1.464 5.948 1.693 8.926 1.383-3.706-1.872-5.07-5.252-5.783-9.052 5.177 5.279 10.587 8.827 16.09 11.692-5.455-5.26-9.478-10.65-11.565-16.218 2.1 1.18 4.157 1.736 6.16 1.509-2.766-3.124-3.465-6.182-4.211-9.241 2.637 3.916 4.959 6.022 7.103 7.103-2.19-4.482-2.034-8.432-.503-12.068 2.524 1.675 4.902 4.295 6.915 9.303.73-2.386-.447-6.364-1.886-10.56 2.175.622 4.779 3.351 8.17 9.932-.33-3.865-2.138-7.775-4.147-11.692 3.027 3.51 7.557 12.713 6.788 10.81z"}),(0,s.jsx)("path",{fill:"#796958",stroke:"#000",strokeWidth:".5",d:"M76.27 30.176s-.252 7.472 6.717 2.603c3.61.084 2.015-3.862 2.015-3.862 2.435-.672 2.808-3.842 1.848-5.709 3.106.084 2.612-4.718 2.183-6.381 2.435-.923 2.77-3.831 1.763-6.129 2.938-.671 3.022-4.114 2.77-6.548 3.023-.168 2.604-5.457 2.604-6.549 2.604-1.679 2.016-3.946 2.425-6.573 1.605-3.25-.577-4.173-2.116-.71-1.651 3.001-3.77 4.311-3.75 6.528.755 1.259-5.625 3.106-3.61 7.052-1.428 1.763-4.785 4.03-3.592 6.733-.606 1.326-4.888 4.433-3.041 7.371-4.03 2.687-3.79 3.335-2.938 5.793-2.155 1.38-4.41 4.131-3.278 6.381z"}),(0,s.jsx)("path",{fill:"#fff",d:"M94.094-5.087s-.735 1.324-.735 2.133c0 .809 2.185.568 2.927-.227-1.625.024-2.965.289-2.192-1.906zM89.833 1.183s-.812 1.068-.183 2.316c.392.98 2.807.962 3.549.167-1.625.024-4.14-.287-3.366-2.483zM86.698 7.638s-.998 1.346-.492 2.602c0 .809 2.838.956 3.58.161-1.625.022-3.645-.489-3.088-2.763zM83.62 14.8s-1.402 1.542-.148 2.945c1.438.809 3.744.049 4.486-.746-1.625.022-4.894.076-4.337-2.199zM80.616 20.521s-1.575 1.414-.02 3.312c1.438.809 4.57.198 5.312-.597-1.624.024-5.99-1.346-5.292-2.715zM77.469 27.262s-1.403 1.542-.15 2.945c1.439.809 6.037-.186 6.779-.981-1.625.023-7.185.311-6.63-1.964z"}),(0,s.jsx)("path",{fill:"#a04d32",stroke:"#000",strokeWidth:".5",d:"M76.352 30.29c-.45-.45-.534-.896-.367-1.718 0 0 .369-4.107-16.333-.158-1.072.74 2.396 4.722 2.396 4.722s.418.215 1.047-.415c.253 1.123.852 4.081.233 4.579 1.245-.771 1.868-1.946 1.676-4.125 2.122.461 3.742 1.64 4.692 3.779.304-1.4.603-2.799-.384-4.126 2.182.285 3.88 1.496 5.362 3.124.22-.933.354-1.883 0-2.931 1.39.473 2.587 1.607 3.71 2.988 0 0 .21-3.862-2.032-5.719z"}),(0,s.jsx)("path",{opacity:".26",d:"M60.33 57.936s6.76 13.59 17.595 13.991c10.834.401 10.834-2.73 10.834-2.73s-15.527 3.048-28.43-11.261zM63.485 65.63c2.279 3.104 4.856 5.221 7.722 6.382 0 0-7.365 11.108-3.611 20.023s13.125 11.053 23.32 21.249c7.943 7.942 17.159 24.961 17.159 24.961s-17.834-14.176-29.42-13.479c0 0-2.687-9.668-10.585-17.566-11.244-11.245-16.168-25.875-4.585-41.57z"}),(0,s.jsx)("path",{opacity:".18",fill:"#fff",d:"M44.717 38.245c-3.874 2.501-8.42 7.096-24.415 8.083C3.252 53.112-7.131 73.013-3.475 86.792c1.348 7.317 3.89 14.18 3.89 14.18C-.47 95.053-.966 89.575 1.45 87.373c1.435 2.384 2.969 2.468 4.507 2.479-1.59-2.404-1.788-4.808 0-7.212 1.489 1.525 2.992 1.881 4.507 1.353-2.128-2.449-1.867-4.848 0-7.211 1.388 5.022 4.462 7.453 7.662 9.689-2.208-4.333-4.166-8.672-2.93-13.07 1.323.729 2.595.644 3.83 0-1.256-1.576-.924-3.153 0-4.732 2.948 3.04 6.214 3.724 9.466 4.507-2.661-2.454-5.543-4.527-6.761-9.465 1.5-1.811 3.269-2.685 5.408-2.253-1.901-1.167-1.65-2.543 0-4.057 2.089 1.104 4.195 1.352 6.31 1.127-2.807-1.68-8.424-4.994 11.269-20.283z"}),(0,s.jsx)("path",{opacity:".27",fill:"#fff",d:"M71.278 19.389c.996-.963 1.146-.65.854.285-.982 2.36.353 4.647.797 6.206l-3.871.114c.108-2.271.247-4.794 2.22-6.605z"})]})}function $(c){let{className:t}=c;return(0,s.jsxs)("svg",{className:"".concat(null!=t?t:"w-6 h-6 text-muted-foreground inline-flex mr-1"),xmlns:"http://www.w3.org/2000/svg",width:"208",height:"128",viewBox:"0 0 208 128",children:[(0,s.jsx)("rect",{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"#000",strokeWidth:"10",fill:"none"}),(0,s.jsx)("path",{d:"M30 98V30h20l20 25 20-25h20v68H90V59L70 84 50 59v39zm125 0l-30-33h20V30h20v35h20z"})]})}function Q(c){let{className:t}=c;return(0,s.jsxs)("svg",{className:"".concat(null!=t?t:"w-6 h-6 text-muted-foreground inline-flex mr-1"),xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 334.371 380.563",version:"1.1",viewBox:"0 0 14 16",children:[(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 -.66877 -.73379)",children:[(0,s.jsx)("polygon",{points:"51.791 356.65 51.791 23.99 204.5 23.99 282.65 102.07 282.65 356.65",fill:"#fff",strokeWidth:"212.65"}),(0,s.jsx)("path",{d:"m201.19 31.99 73.46 73.393v243.26h-214.86v-316.66h141.4m6.623-16h-164.02v348.66h246.85v-265.9z",strokeWidth:"21.791"})]}),(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 -.66877 -.73379)",children:[(0,s.jsx)("polygon",{points:"282.65 356.65 51.791 356.65 51.791 23.99 204.5 23.99 206.31 25.8 206.31 100.33 280.9 100.33 282.65 102.07",fill:"#fff",strokeWidth:"212.65"}),(0,s.jsx)("path",{d:"m198.31 31.99v76.337h76.337v240.32h-214.86v-316.66h138.52m9.5-16h-164.02v348.66h246.85v-265.9l-6.43-6.424h-69.907v-69.842z",strokeWidth:"21.791"})]}),(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 -.66877 -.73379)",strokeWidth:"21.791",children:[(0,s.jsx)("polygon",{points:"258.31 87.75 219.64 87.75 219.64 48.667 258.31 86.38"}),(0,s.jsx)("path",{d:"m227.64 67.646 12.41 12.104h-12.41v-12.104m-5.002-27.229h-10.998v55.333h54.666v-12.742z"})]}),(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 -.66877 -.73379)",fill:"#ed1c24",strokeWidth:"212.65",children:[(0,s.jsx)("polygon",{points:"311.89 284.49 22.544 284.49 22.544 167.68 37.291 152.94 37.291 171.49 297.15 171.49 297.15 152.94 311.89 167.68"}),(0,s.jsx)("path",{d:"m303.65 168.63 1.747 1.747v107.62h-276.35v-107.62l1.747-1.747v9.362h272.85v-9.362m-12.999-31.385v27.747h-246.86v-27.747l-27.747 27.747v126h302.35v-126z"})]}),(0,s.jsx)("rect",{x:"1.7219",y:"7.9544",width:"10.684",height:"4.0307",fill:"none"}),(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 1.7219 11.733)",fill:"#fff",strokeWidth:"21.791",children:[(0,s.jsx)("path",{d:"m9.216 0v-83.2h30.464q6.784 0 12.928 1.408 6.144 1.28 10.752 4.608 4.608 3.2 7.296 8.576 2.816 5.248 2.816 13.056 0 7.68-2.816 13.184-2.688 5.504-7.296 9.088-4.608 3.456-10.624 5.248-6.016 1.664-12.544 1.664h-8.96v26.368zm22.016-43.776h7.936q6.528 0 9.6-3.072 3.2-3.072 3.2-8.704t-3.456-7.936-9.856-2.304h-7.424z"}),(0,s.jsx)("path",{d:"m87.04 0v-83.2h24.576q9.472 0 17.28 2.304 7.936 2.304 13.568 7.296t8.704 12.8q3.2 7.808 3.2 18.816t-3.072 18.944-8.704 13.056q-5.504 5.12-13.184 7.552-7.552 2.432-16.512 2.432zm22.016-17.664h1.28q4.48 0 8.448-1.024 3.968-1.152 6.784-3.84 2.944-2.688 4.608-7.424t1.664-12.032-1.664-11.904-4.608-7.168q-2.816-2.56-6.784-3.456-3.968-1.024-8.448-1.024h-1.28z"}),(0,s.jsx)("path",{d:"m169.22 0v-83.2h54.272v18.432h-32.256v15.872h27.648v18.432h-27.648v30.464z"})]})]})}function cc(c){let{className:t}=c;return(0,s.jsxs)("svg",{className:"".concat(null!=t?t:"w-6 h-6 text-muted-foreground inline-flex mr-1"),xmlns:"http://www.w3.org/2000/svg",fill:"#FFF","stroke-miterlimit":"10",strokeWidth:"2",viewBox:"0 0 96 96",children:[(0,s.jsx)("path",{stroke:"#979593",d:"M67.1716 7H27c-1.1046 0-2 .8954-2 2v78c0 1.1046.8954 2 2 2h58c1.1046 0 2-.8954 2-2V26.8284c0-.5304-.2107-1.0391-.5858-1.4142L68.5858 7.5858C68.2107 7.2107 67.702 7 67.1716 7z"}),(0,s.jsx)("path",{fill:"none",stroke:"#979593",d:"M67 7v18c0 1.1046.8954 2 2 2h18"}),(0,s.jsx)("path",{fill:"#C8C6C4",d:"M79 61H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1zm0-6H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1zm0-6H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1zm0-6H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1zm0 24H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1z"}),(0,s.jsx)("path",{fill:"#185ABD",d:"M12 74h32c2.2091 0 4-1.7909 4-4V38c0-2.2091-1.7909-4-4-4H12c-2.2091 0-4 1.7909-4 4v32c0 2.2091 1.7909 4 4 4z"}),(0,s.jsx)("path",{d:"M21.6245 60.6455c.0661.522.109.9769.1296 1.3657h.0762c.0306-.3685.0889-.8129.1751-1.3349.0862-.5211.1703-.961.2517-1.319L25.7911 44h4.5702l3.6562 15.1272c.183.7468.3353 1.6973.457 2.8532h.0608c.0508-.7979.1777-1.7184.3809-2.7615L37.8413 44H42l-5.1183 22h-4.86l-3.4885-14.5744c-.1016-.4197-.2158-.9663-.3428-1.6417-.127-.6745-.2057-1.1656-.236-1.4724h-.0608c-.0407.358-.1195.8896-.2364 1.595-.1169.7062-.211 1.2273-.2819 1.565L24.1 66h-4.9357L14 44h4.2349l3.1843 15.3882c.0709.3165.1392.7362.2053 1.2573z"})]})}let ct={Lightbulb:(c,t,a)=>(0,s.jsx)(e.v,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Robot:(c,t,a)=>(0,s.jsx)(o.H,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Aperture:(c,t,a)=>(0,s.jsx)(r.u,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),GraduationCap:(c,t,a)=>(0,s.jsx)(l.X,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Jeep:(c,t,a)=>(0,s.jsx)(i.s,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Island:(c,t,a)=>(0,s.jsx)(m.W,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),MathOperations:(c,t,a)=>(0,s.jsx)(h.M,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Asclepius:(c,t,a)=>(0,s.jsx)(d.N,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Couch:(c,t,a)=>(0,s.jsx)(x.v,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Code:(c,t,a)=>(0,s.jsx)(u.E,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Atom:(c,t,a)=>(0,s.jsx)(j.h,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),ClockCounterClockwise:(c,t,a)=>(0,s.jsx)(f.y,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Globe:(c,t,a)=>(0,s.jsx)(v.T,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Palette:(c,t,a)=>(0,s.jsx)(g.Y,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Book:(c,t,a)=>(0,s.jsx)(p.f,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Confetti:(c,t,a)=>(0,s.jsx)(N.D,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),House:(c,t,a)=>(0,s.jsx)(k.T,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Translate:(c,t,a)=>(0,s.jsx)(w.v,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),BowlFood:(c,t,a)=>(0,s.jsx)(z.a,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Lectern:(c,t,a)=>(0,s.jsx)(b.G,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Wallet:(c,t,a)=>(0,s.jsx)(M.w,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),PencilLine:(c,t,a)=>(0,s.jsx)(C.z,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Chalkboard:(c,t,a)=>(0,s.jsx)(y.a,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Cigarette:(c,t,a)=>(0,s.jsx)(W.m,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),CraneTower:(c,t,a)=>(0,s.jsx)(H.E,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Heart:(c,t,a)=>(0,s.jsx)(L.X,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Leaf:(c,t,a)=>(0,s.jsx)(B.B,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),NewspaperClipping:(c,t,a)=>(0,s.jsx)(q.g,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),OrangeSlice:(c,t,a)=>(0,s.jsx)(E.R,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),SmileyMelting:(c,t,a)=>(0,s.jsx)(A.N,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),YinYang:(c,t,a)=>(0,s.jsx)(F.x,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),SneakerMove:(c,t,a)=>(0,s.jsx)(T.D,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Student:(c,t,a)=>(0,s.jsx)(V.Z,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Oven:(c,t,a)=>(0,s.jsx)(_.o,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Gavel:(c,t,a)=>(0,s.jsx)(G._,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Broadcast:(c,t,a)=>(0,s.jsx)(I.z,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")})};function ca(c){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=null!=t?t:"h-4 w-4";return c.includes("summarize")?(0,s.jsx)(O.U,{className:a}):c.includes("help")?(0,s.jsx)(S.H,{className:a}):c.includes("automation")?(0,s.jsx)(o.H,{className:a}):c.includes("webpage")?(0,s.jsx)(D.A,{className:a}):c.includes("notes")?(0,s.jsx)(Y.a,{className:a}):c.includes("image")?(0,s.jsx)(P.E,{className:a}):c.includes("default")?(0,s.jsx)(R.j,{className:a}):c.includes("general")?(0,s.jsx)(X.K,{className:a}):c.includes("online")?(0,s.jsx)(Z.u,{className:a}):c.includes("text")?(0,s.jsx)(C.z,{className:a}):(0,s.jsx)(J.o,{className:a})}function cs(c){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"gray",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"w-6",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"h-6",e=ct[c],o=t.toLowerCase(),r=(0,n.oz)(o);return e?e(r,a,s):null}function cn(c){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"w-6 h-6 text-muted-foreground inline-flex mr-1";switch(c.split(".").pop()){case"org":return(0,s.jsx)(U,{className:t});case"markdown":case"md":return(0,s.jsx)($,{className:t});case"pdf":return(0,s.jsx)(Q,{className:t});case"doc":return(0,s.jsx)(cc,{className:t});case"jpg":case"jpeg":case"png":case"webp":return(0,s.jsx)(P.E,{className:t,weight:"fill"});default:return(0,s.jsx)(K.$,{className:t,weight:"fill"})}}function ce(){return Object.keys(ct)}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9479],{59479:function(e,t,a){"use strict";a.d(t,{Z:function(){return eL}});var r=a(57437),n=a(37649),l=a.n(n),o=a(2265),s=a(11838),i=a.n(s);a(7395);var c=a(52195);let d=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),o.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]);var u=Object.defineProperty,m=Object.defineProperties,h=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,b=(e,t,a)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,x=(e,t)=>{for(var a in t||(t={}))f.call(t,a)&&b(e,a,t[a]);if(p)for(var a of p(t))g.call(t,a)&&b(e,a,t[a]);return e},j=(e,t)=>m(e,h(t));let v=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,j(x({ref:t},e),{weights:d})));v.displayName="X";let y=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M212.48,136.49l-82.06,82a60,60,0,0,1-84.85-84.88l98.16-97.89a40,40,0,0,1,56.56,56.59l-.17.16-95.8,92.22a12,12,0,1,1-16.64-17.3l95.71-92.12a16,16,0,0,0-22.7-22.56L62.53,150.57a36,36,0,0,0,50.93,50.91l82.06-82a12,12,0,0,1,17,17Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M180.75,104.75,204,128l-82.06,81.94a48,48,0,0,1-67.88-67.88L153.37,41.37a32,32,0,0,1,45.26,45.26Z",opacity:"0.2"}),o.createElement("path",{d:"M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,50.34a8,8,0,0,0-11.32,0L87.09,143A24,24,0,1,0,121,177l49.32-50.32a8,8,0,1,1,11.42,11.2l-49.37,50.38a40,40,0,1,1-56.62-56.51L143,63.09A24,24,0,1,1,177,97L109.71,165.6a8,8,0,1,1-11.42-11.2L165.6,85.71a8,8,0,0,0,.06-11.37Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208.25,123.76a6,6,0,0,1,0,8.49l-82.06,82a54,54,0,0,1-76.36-76.39L149.1,37.14a38,38,0,1,1,53.77,53.72L103.59,191.54a22,22,0,1,1-31.15-31.09l83.28-84.67a6,6,0,0,1,8.56,8.42L81,168.91a10,10,0,1,0,14.11,14.18L194.35,82.4a26,26,0,1,0-36.74-36.8L58.33,146.28a42,42,0,1,0,59.37,59.44l82.06-82A6,6,0,0,1,208.25,123.76Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M206.83,125.17a4,4,0,0,1,0,5.66l-82.06,82a52,52,0,0,1-73.54-73.55L150.52,38.55a36,36,0,1,1,50.94,50.9l-99.3,100.69a20,20,0,1,1-28.3-28.27l83.29-84.68a4,4,0,1,1,5.7,5.61L79.54,167.5a12,12,0,1,0,16.95,17L195.78,83.81A28,28,0,1,0,156.2,44.18L56.91,144.87a44,44,0,1,0,62.21,62.26l82-82A4,4,0,0,1,206.83,125.17Z"}))]]);var w=Object.defineProperty,E=Object.defineProperties,L=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,M=(e,t,a)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,V=(e,t)=>{for(var a in t||(t={}))Z.call(t,a)&&M(e,a,t[a]);if(A)for(var a of A(t))O.call(t,a)&&M(e,a,t[a]);return e},N=(e,t)=>E(e,L(t));let F=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,N(V({ref:t},e),{weights:y})));F.displayName="Paperclip";let k=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),o.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z"}))]]);var H=Object.defineProperty,C=Object.defineProperties,P=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,T=(e,t,a)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,I=(e,t)=>{for(var a in t||(t={}))S.call(t,a)&&T(e,a,t[a]);if(D)for(var a of D(t))R.call(t,a)&&T(e,a,t[a]);return e},z=(e,t)=>C(e,P(t));let _=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,z(I({ref:t},e),{weights:k})));_.displayName="Stop";let U=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),o.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]);var Y=Object.defineProperty,W=Object.defineProperties,$=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,X=(e,t,a)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,q=(e,t)=>{for(var a in t||(t={}))K.call(t,a)&&X(e,a,t[a]);if(J)for(var a of J(t))B.call(t,a)&&X(e,a,t[a]);return e},G=(e,t)=>W(e,$(t));let Q=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,G(q({ref:t},e),{weights:U})));Q.displayName="Microphone";let ee=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),o.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]);var et=Object.defineProperty,ea=Object.defineProperties,er=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,el=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,es=(e,t,a)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ei=(e,t)=>{for(var a in t||(t={}))el.call(t,a)&&es(e,a,t[a]);if(en)for(var a of en(t))eo.call(t,a)&&es(e,a,t[a]);return e},ec=(e,t)=>ea(e,er(t));let ed=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,ec(ei({ref:t},e),{weights:ee})));ed.displayName="ArrowUp";var eu=a(42491),em=a(6780),eh=a(50495),ep=a(70571),ef=a(19573),eg=a(61485),eb=a(93146),ex=a(19666),ej=a(58575),ev=a(66820),ey=a(9557),ew=a(58485),eE=a(89417);function eL(e){let[t,a]=(0,o.useState)(""),n=(0,o.useRef)(null),[s,c]=(0,o.useState)(null),[d,u]=(0,o.useState)(null),[m,h]=(0,o.useState)(!1),[p,f]=(0,o.useState)(null),[g,b]=(0,o.useState)(!1),[x,j]=(0,o.useState)(!1),[y,w]=(0,o.useState)(!1),[E,L]=(0,o.useState)(""),[A,Z]=(0,o.useState)(null),[O,M]=(0,o.useState)(null),[V,N]=(0,o.useState)(0),[k,H]=(0,o.useState)(!1);function C(){if(y&&(w(!1),L(""),e.sendImage(A||"")),t.trim()){if(!e.isLoggedIn){f("Hey there, you need to be signed in to send messages to Khoj AI"),b(!0);return}e.sendMessage(t.trim()),a("")}}function P(t){if(!e.isLoggedIn){f("Please login to chat with your files"),b(!0);return}let a=["jpg","jpeg","png","webp"];for(let e=0;e<t.length;e++){let r=t[e],n=r.name.split(".").pop();if(a.includes(n||"")){w(!0),L(i().sanitize(URL.createObjectURL(r)));return}}(0,ey.ko)(t,c,h,u,e.setUploadedFiles,e.conversationId)}async function D(){try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e,{mimeType:"audio/webm"}),r=[];t.ondataavailable=async e=>{r.push(e.data);let t=new Blob(r,{type:"audio/webm"}),n=new FormData;n.append("file",t);try{let e=await fetch("/api/transcribe",{method:"POST",body:n});if(!e.ok)throw Error("Network response was not ok");let t=await e.json();a(t.text.trim())}catch(e){console.error("Error sending audio to server:",e)}},t.start(1500),t.onstop=async()=>{let e=new Blob(r,{type:"audio/webm"}),n=new FormData;n.append("file",e);try{let e=await fetch("/api/transcribe",{method:"POST",body:n});if(!e.ok)throw Error("Network response was not ok");let r=await e.json();t.stream.getTracks().forEach(e=>e.stop()),M(null),a(r.text.trim())}catch(e){console.error("Error sending audio to server:",e)}},M(t)}catch(e){console.error("Error getting microphone",e)}}(0,o.useEffect)(()=>{if(m||N(0),m){let e=setInterval(()=>{N(e=>{let t=e+(Math.floor(5*Math.random())+1);return t<100?t:100})},800);return()=>clearInterval(e)}},[m]),(0,o.useEffect)(()=>{async function e(){if(E){let e=await fetch(E),t=await e.blob(),a=new FileReader;a.onload=function(){Z(a.result)},a.readAsDataURL(t)}h(!1)}h(!0),e()},[E]),(0,o.useEffect)(()=>{!x&&O&&O.stop(),x&&!O&&D()},[x,O]);let S=(0,o.useRef)(null);return(0,o.useEffect)(()=>{S.current&&(S.current.style.height="auto",S.current.style.height=Math.max(S.current.scrollHeight-24,64)+"px")},[t]),(0,r.jsxs)(r.Fragment,{children:[g&&p&&(0,r.jsx)(ev.Z,{onOpenChange:b,loginRedirectMessage:p}),m&&(0,r.jsx)(em.aR,{open:m,children:(0,r.jsxs)(em._T,{children:[(0,r.jsx)(em.fY,{children:(0,r.jsx)(em.f$,{children:"Uploading data. Please wait."})}),(0,r.jsx)(em.yT,{children:(0,r.jsx)(ep.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:V})}),(0,r.jsx)(em.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>h(!1),children:"Dismiss"})]})}),s&&(0,r.jsx)(em.aR,{open:null!==s,children:(0,r.jsxs)(em._T,{children:[(0,r.jsx)(em.fY,{children:(0,r.jsx)(em.f$,{children:"Data Upload Warning"})}),(0,r.jsx)(em.yT,{children:s}),(0,r.jsx)(em.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>c(null),children:"Close"})]})}),d&&(0,r.jsx)(em.aR,{open:null!==d,children:(0,r.jsxs)(em._T,{children:[(0,r.jsxs)(em.fY,{children:[(0,r.jsx)(em.f$,{children:"Oh no!"}),(0,r.jsx)(em.yT,{children:"Something went wrong while uploading your data"})]}),(0,r.jsx)(em.yT,{children:d}),(0,r.jsx)(em.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>u(null),children:"Close"})]})}),t.startsWith("/")&&1===t.split(" ").length&&(0,r.jsx)("div",{className:"flex justify-center text-center",children:(0,r.jsxs)(ef.J2,{open:t.startsWith("/"),children:[(0,r.jsx)(eg.xo,{className:"flex justify-center text-center"}),(0,r.jsx)(ef.yk,{onOpenAutoFocus:e=>e.preventDefault(),className:"".concat(e.isMobileWidth?"w-[100vw]":"w-full"," rounded-md"),children:(0,r.jsxs)(eu.mY,{className:"max-w-full",children:[(0,r.jsx)(eu.sZ,{placeholder:"Type a command or search...",value:t,className:"hidden"}),(0,r.jsxs)(eu.e8,{children:[(0,r.jsx)(eu.rb,{children:"No matching commands."}),(0,r.jsx)(eu.fu,{heading:"Agent Tools",children:e.chatOptionsData&&Object.entries(e.chatOptionsData).map(e=>{let[t,n]=e;return(0,r.jsx)(eu.di,{className:"text-md",onSelect:()=>{a("/".concat(t," "))},children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-1",children:[(0,r.jsxs)("div",{className:"font-bold flex items-center",children:[(0,eE.vH)(t,"h-4 w-4 mr-2"),"/",t]}),(0,r.jsx)("div",{children:n})]})},t)})}),(0,r.jsx)(eu.zz,{})]})]})})]})}),(0,r.jsxs)("div",{className:"".concat(l().actualInputArea," items-center justify-between dark:bg-neutral-700 relative ").concat(k&&"animate-pulse"),onDragOver:function(e){e.preventDefault(),H(!0)},onDragLeave:function(e){e.preventDefault(),H(!1)},onDrop:function(e){e.preventDefault(),H(!1),e.dataTransfer.files&&P(e.dataTransfer.files)},children:[y&&(0,r.jsxs)("div",{className:"absolute bottom-[80px] left-0 right-0 dark:bg-neutral-700 bg-white pt-5 pb-5 w-full rounded-lg border dark:border-none grid grid-cols-2",children:[(0,r.jsx)("div",{className:"pl-4 pr-4",children:(0,r.jsx)("img",{src:E,alt:"img",className:"w-auto max-h-[100px]"})}),(0,r.jsx)("div",{className:"pl-4 pr-4",children:(0,r.jsx)(v,{className:"w-6 h-6 float-right dark:hover:bg-[hsl(var(--background))] hover:bg-neutral-100 rounded-sm",onClick:function(){w(!1),L("")}})})]}),(0,r.jsx)("input",{type:"file",multiple:!0,ref:n,onChange:function(e){e.target.files&&P(e.target.files)},style:{display:"none"}}),(0,r.jsx)(eh.z,{variant:"ghost",className:"!bg-none p-0 m-2 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500",disabled:e.sendDisabled,onClick:function(){n.current&&n.current.click()},children:(0,r.jsx)(F,{className:"w-8 h-8"})}),(0,r.jsx)("div",{className:"grid w-full gap-1.5 relative",children:(0,r.jsx)(eb.g,{ref:S,className:"border-none w-full h-16 min-h-16 max-h-[128px] md:py-4 rounded-lg resize-none dark:bg-neutral-700 ".concat(e.isMobileWidth?"text-md":"text-lg"),placeholder:"Type / to see a list of commands",id:"message",autoFocus:!0,value:t,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(w(!1),L(""),e.preventDefault(),C())},onChange:e=>a(e.target.value),disabled:e.sendDisabled||x})}),x?(0,r.jsx)(ex.pn,{children:(0,r.jsxs)(ex.u,{children:[(0,r.jsx)(ex.aJ,{asChild:!0,children:(0,r.jsx)(eh.z,{variant:"default",className:"".concat(!x&&"hidden"," ").concat(e.agentColor?(0,ej.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:()=>{j(!x)},disabled:e.sendDisabled,children:(0,r.jsx)(_,{weight:"fill",className:"w-6 h-6"})})}),(0,r.jsx)(ex._v,{children:"Click to stop recording and transcribe your voice."})]})}):O?(0,r.jsx)(ew.l,{}):(0,r.jsx)(ex.pn,{children:(0,r.jsxs)(ex.u,{children:[(0,r.jsx)(ex.aJ,{asChild:!0,children:(0,r.jsx)(eh.z,{variant:"default",className:"".concat(!t||x||"hidden"," ").concat(e.agentColor?(0,ej.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:()=>{a("Listening..."),j(!x)},disabled:e.sendDisabled,children:(0,r.jsx)(Q,{weight:"fill",className:"w-6 h-6"})})}),(0,r.jsx)(ex._v,{children:"Click to transcribe your message with voice."})]})}),(0,r.jsx)(eh.z,{className:"".concat((!t||x)&&"hidden"," ").concat(e.agentColor?(0,ej.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:C,disabled:e.sendDisabled,children:(0,r.jsx)(ed,{className:"w-6 h-6",weight:"bold"})})]})]})}},66820:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var r=a(57437),n=a(6780),l=a(87138);function o(e){return(0,r.jsx)(n.aR,{open:!0,onOpenChange:e.onOpenChange,children:(0,r.jsxs)(n._T,{children:[(0,r.jsx)(n.fY,{children:(0,r.jsx)(n.f$,{children:"Sign in to Khoj to continue"})}),(0,r.jsxs)(n.yT,{children:[e.loginRedirectMessage,". By logging in, you agree to our"," ",(0,r.jsx)(l.default,{href:"https://khoj.dev/terms-of-service",children:"Terms of Service."})]}),(0,r.jsxs)(n.xo,{children:[(0,r.jsx)(n.le,{children:"Dismiss"}),(0,r.jsx)(n.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{window.location.href="/login?next=".concat(encodeURIComponent(window.location.pathname))},children:(0,r.jsxs)(l.default,{href:"/login?next=".concat(encodeURIComponent(window.location.pathname)),children:[" ","Login"]})})]})]})})}},70571:function(e,t,a){"use strict";a.d(t,{E:function(){return s}});var r=a(57437),n=a(2265),l=a(52431),o=a(37440);let s=n.forwardRef((e,t)=>{let{className:a,value:n,indicatorColor:s,...i}=e;return(0,r.jsx)(l.fC,{ref:t,className:(0,o.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",a),...i,children:(0,r.jsx)(l.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(s),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});s.displayName=l.fC.displayName},93146:function(e,t,a){"use strict";a.d(t,{g:function(){return o}});var r=a(57437),n=a(2265),l=a(37440);let o=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("textarea",{className:(0,l.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...n})});o.displayName="Textarea"},19666:function(e,t,a){"use strict";a.d(t,{_v:function(){return d},aJ:function(){return c},pn:function(){return s},u:function(){return i}});var r=a(57437),n=a(2265),l=a(27071),o=a(37440);let s=l.zt,i=l.fC,c=l.xz,d=n.forwardRef((e,t)=>{let{className:a,sideOffset:n=4,...s}=e;return(0,r.jsx)(l.VY,{ref:t,sideOffset:n,className:(0,o.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...s})});d.displayName=l.VY.displayName},37649:function(e){e.exports={actualInputArea:"chatInputArea_actualInputArea__Ha6cN"}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,t,s){Promise.resolve().then(s.bind(s,38874))},38874:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return p}});var a=s(57437),o=s(65104),n=s.n(o),i=s(2265),r=s(48861),c=s(82697),l=s(16463),d=s(58485),u=s(9557);s(7395);var h=s(69591),m=s(59479),g=s(79306);function f(e){let t=(0,l.useSearchParams)().get("conversationId"),[s,o]=(0,i.useState)(""),[r,d]=(0,i.useState)(null),[u,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null),p=e.setQueryToProcess,x=e.onConversationIdChange;if((0,i.useEffect)(()=>{r&&e.setImage64(encodeURIComponent(r))},[r,e.setImage64]),(0,i.useEffect)(()=>{let t=localStorage.getItem("image");t&&(d(t),e.setImage64(encodeURIComponent(t)),localStorage.removeItem("image"));let s=localStorage.getItem("message");s&&(h(!0),p(s))},[p]),(0,i.useEffect)(()=>{s&&(h(!0),p(s))},[s,p]),(0,i.useEffect)(()=>{t&&(null==x||x(t))},[t,x]),(0,i.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?h(!1):o("")},[e.streamedMessages]),!t){window.location.href="/";return}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(c.Z,{conversationId:t,setTitle:e.setTitle,setAgent:f,pendingMessage:u?s:"",incomingMessages:e.streamedMessages})}),(0,a.jsx)("div",{className:"".concat(n().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-t-2xl rounded-b-none md:rounded-xl h-fit"),children:(0,a.jsx)(m.Z,{agentColor:null==g?void 0:g.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>o(e),sendImage:e=>d(e),sendDisabled:u,chatOptionsData:e.chatOptionsData,conversationId:t,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles})})]})}function p(){let e="Khoj AI - Chat",[t,s]=(0,i.useState)(null),[o,c]=(0,i.useState)(!0),[l,m]=(0,i.useState)(e),[p,x]=(0,i.useState)(null),[_,y]=(0,i.useState)([]),[w,I]=(0,i.useState)(""),[S,v]=(0,i.useState)(!1),[b,j]=(0,i.useState)([]),[B,C]=(0,i.useState)(""),E=(0,h.k6)()||{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},T=(0,g.GW)(),k=(0,h.IC)();async function M(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let t=e.body.getReader(),s=new TextDecoder,a="␃\uD83D\uDD1A␗",o="",n=[],i={};for(;;){let e;let{done:r,value:c}=await t.read();if(r){I(""),v(!1),C("");break}for(o+=s.decode(c,{stream:!0});-1!==(e=o.indexOf(a));){let t=o.slice(0,e);if(o=o.slice(e+a.length),t){let e=_.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:n,onlineContext:i}=(0,u.VK)(t,e,n,i)),y([..._])}}}}async function D(){if(localStorage.removeItem("message"),!w||!p)return;let e={q:w,conversation_id:p,stream:!0,...E&&{city:E.city,region:E.region,country:E.country,country_code:E.countryCode,timezone:E.timezone},...B&&{image:B}},t=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});try{await M(t)}catch(s){console.error(s);let e=_.find(e=>!e.completed);if(!e)return;let t=s.message;t.includes("Error in input stream")?e.rawResponse="Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?":e.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(t,". Could you try again or dislike this message if the issue persists?"),e.completed=!0,y([..._]),I(""),v(!1)}}return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{c(!1),e&&s(e)}).catch(e=>{console.error(e)}),(0,h.EK)()},[]),(0,i.useEffect)(()=>{if(w){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:w||"",uploadedImageData:decodeURIComponent(B)};y(t=>[...t,e]),v(!0)}},[w]),(0,i.useEffect)(()=>{S&&D()},[S]),o)?(0,a.jsx)(d.Z,{}):(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(l&&l!==e?": ".concat(l):"")}),(0,a.jsx)("div",{children:(0,a.jsx)(r.ZP,{conversationId:p,uploadedFiles:b,isMobileWidth:k})}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsxs)("div",{className:n().chatBoxBody,children:[!k&&p&&(0,a.jsxs)("div",{className:"".concat(n().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mr-8 pt-6 col-auto h-fit"),children:[l&&(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden",children:l}),(0,a.jsx)(r.En,{conversationId:p,setTitle:m,sizing:"md"})]}),(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(f,{isLoggedIn:null!==T,streamedMessages:_,chatOptionsData:t,setTitle:m,setQueryToProcess:I,setUploadedFiles:j,isMobileWidth:k,onConversationIdChange:e=>{x(e)},setImage64:C})})]})})]})}},16463:function(e,t,s){"use strict";var a=s(71169);s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},65104:function(e){e.exports={main:"chat_main__8xQu5",suggestions:"chat_suggestions__m8n2t",inputBox:"chat_inputBox__LOFws",chatBodyFull:"chat_chatBodyFull__FfKEK",chatBody:"chat_chatBody__sS1LX",chatLayout:"chat_chatLayout__pR203",chatBox:"chat_chatBox__FBct_",titleBar:"chat_titleBar__R5QlK",chatBoxBody:"chat_chatBoxBody__qT_SC",agentIndicator:"chat_agentIndicator__8V55w",chatTitleWrapper:"chat_chatTitleWrapper__6ChWq"}}},function(e){e.O(0,[7812,9427,929,3954,9001,3062,4086,121,3110,4051,1603,9417,9178,9479,2697,2971,7023,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3111],{91955:function(e,t,s){Promise.resolve().then(s.bind(s,5506))},5506:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return m}});var n=s(57437),o=s(11930),a=s.n(o),i=s(2265),r=s(48861),c=s(82697),d=s(58485);s(7395);var l=s(69591),u=s(79306),h=s(59479),g=s(9557);function p(e){let[t,s]=(0,i.useState)(""),[o,r]=(0,i.useState)(null),[d,l]=(0,i.useState)(!1),[u,g]=(0,i.useState)(null),p=e.setQueryToProcess,m=e.streamedMessages;return((0,i.useEffect)(()=>{o&&e.setImage64(encodeURIComponent(o))},[o,e.setImage64]),(0,i.useEffect)(()=>{t&&(l(!0),p(t))},[t,p]),(0,i.useEffect)(()=>{m&&m.length>0&&m[m.length-1].completed?l(!1):s("")},[m]),e.publicConversationSlug||e.conversationId)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:a().chatBodyFull,children:(0,n.jsx)(c.Z,{publicConversationSlug:e.publicConversationSlug,conversationId:e.conversationId||"",setAgent:g,setTitle:e.setTitle,pendingMessage:d?t:"",incomingMessages:e.streamedMessages})}),(0,n.jsx)("div",{className:"".concat(a().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-t-2xl rounded-b-none md:rounded-xl"),children:(0,n.jsx)(h.Z,{isLoggedIn:e.isLoggedIn,sendMessage:e=>s(e),sendImage:e=>r(e),sendDisabled:d,chatOptionsData:e.chatOptionsData,conversationId:e.conversationId,agentColor:null==u?void 0:u.color,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles})})]}):(0,n.jsx)("div",{className:a().suggestions,children:"Whoops, nothing to see here!"})}function m(){let[e,t]=(0,i.useState)(null),[s,o]=(0,i.useState)(!0),[c,h]=(0,i.useState)("Khoj AI - Chat"),[m,f]=(0,i.useState)(void 0),[_,x]=(0,i.useState)([]),[y,v]=(0,i.useState)(""),[C,b]=(0,i.useState)(!1),[S,j]=(0,i.useState)([]),[I,B]=(0,i.useState)(void 0),[w,O]=(0,i.useState)(""),N=(0,l.k6)()||{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},k=(0,u.GW)(),D=(0,l.IC)();async function T(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let t=e.body.getReader(),s=new TextDecoder,n="␃\uD83D\uDD1A␗",o="";for(;;){let e;let{done:a,value:i}=await t.read();if(a){v(""),b(!1),O("");break}for(o+=s.decode(i,{stream:!0});-1!==(e=o.indexOf(n));){let t=o.slice(0,e);if(o=o.slice(e+n.length),t){let e=_.find(e=>!e.completed);if(!e){console.error("No current message found");return}(0,g.VK)(t,e),x([..._])}}}}async function E(){if(!y||!m)return;let e={q:y,conversation_id:m,stream:!0,...N&&{region:N.region,country:N.country,city:N.city,country_code:N.countryCode,timezone:N.timezone},...w&&{image:w}},t=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});try{await T(t)}catch(e){console.error(e)}}return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,l.EK)(),B(window.location.pathname.split("/").pop()||"")},[]),(0,i.useEffect)(()=>{if(y&&!m){fetch("/api/chat/share/fork?public_conversation_slug=".concat(I),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{f(e.conversation_id)}).catch(e=>{console.error(e)});return}if(y){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:y||"",uploadedImageData:decodeURIComponent(w)};x(t=>[...t,e]),b(!0)}},[y,m,I]),(0,i.useEffect)(()=>{C&&E()},[C]),s)?(0,n.jsx)(d.Z,{}):I?(0,n.jsxs)("div",{className:"".concat(a().main," ").concat(a().chatLayout),children:[(0,n.jsx)("title",{children:c}),(0,n.jsx)("div",{className:a().sidePanel,children:(0,n.jsx)(r.ZP,{conversationId:null!=m?m:null,uploadedFiles:S,isMobileWidth:D})}),(0,n.jsx)("div",{className:a().chatBox,children:(0,n.jsx)("div",{className:a().chatBoxBody,children:(0,n.jsx)(i.Suspense,{fallback:(0,n.jsx)(d.Z,{}),children:(0,n.jsx)(p,{conversationId:m,streamedMessages:_,setQueryToProcess:v,isLoggedIn:null!==k,publicConversationSlug:I,chatOptionsData:e,setTitle:h,setUploadedFiles:j,isMobileWidth:D,setImage64:O})})})})]}):(0,n.jsx)("div",{className:a().suggestions,children:"Whoops, nothing to see here!"})}},11930:function(e){e.exports={main:"sharedChat_main__7Nayy",suggestions:"sharedChat_suggestions__V8kr_",inputBox:"sharedChat_inputBox__wRW5A",chatBodyFull:"sharedChat_chatBodyFull__O1MOv",chatBody:"sharedChat_chatBody__OnHDL",chatLayout:"sharedChat_chatLayout__gutlc",chatBox:"sharedChat_chatBox__PmAPg",titleBar:"sharedChat_titleBar__vOHp_",chatBoxBody:"sharedChat_chatBoxBody__ef2Nl",agentIndicator:"sharedChat_agentIndicator__ORCl4"}}},function(e){e.O(0,[7849,9427,929,3954,9001,3062,4086,121,3110,4051,1603,9417,9178,9479,2697,2971,7023,1744],function(){return e(e.s=91955)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- !function(){"use strict";var e,t,n,r,o,u,i,c,f,a={},l={};function d(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}},r=!0;try{a[e].call(n.exports,n,n.exports,d),r=!1}finally{r&&delete l[e]}return n.exports}d.m=a,e=[],d.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u<e.length;u++){for(var n=e[u][0],r=e[u][1],o=e[u][2],c=!0,f=0;f<n.length;f++)i>=o&&Object.keys(d.O).every(function(e){return d.O[e](n[f])})?n.splice(f--,1):(c=!1,o<i&&(i=o));if(c){e.splice(u--,1);var a=r();void 0!==a&&(t=a)}}return t},d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},d.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);d.r(o);var u={};t=t||[null,n({}),n([]),n(n)];for(var i=2&r&&e;"object"==typeof i&&!~t.indexOf(i);i=n(i))Object.getOwnPropertyNames(i).forEach(function(t){u[t]=function(){return e[t]}});return u.default=function(){return e},d.d(o,u),o},d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(t,n){return d.f[n](e,t),t},[]))},d.u=function(e){},d.miniCssF=function(e){},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",d.l=function(e,t,n,u){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var i,c,f=document.getElementsByTagName("script"),a=0;a<f.length;a++){var l=f[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){i=l;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,d.nc&&i.setAttribute("nonce",d.nc),i.setAttribute("data-webpack",o+n),i.src=d.tu(e)),r[e]=[t];var s=function(t,n){i.onerror=i.onload=null,clearTimeout(p);var o=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=s.bind(null,i.onerror),i.onload=s.bind(null,i.onload),c&&document.head.appendChild(i)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.tt=function(){return void 0===u&&(u={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(u=trustedTypes.createPolicy("nextjs#bundler",u))),u},d.tu=function(e){return d.tt().createScriptURL(e)},d.p="/_next/",i={2272:0,8942:0,404:0,929:0,9427:0,7812:0,4003:0,6129:0,9460:0,3729:0,4229:0,9092:0,7849:0,492:0},d.f.j=function(e,t){var n=d.o(i,e)?i[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(4(003|04|229|92)|78(12|49)|9(092|29|427|460)|(37|61)29|2272|8942)$/.test(e))i[e]=0;else{var r=new Promise(function(t,r){n=i[e]=[t,r]});t.push(n[2]=r);var o=d.p+d.u(e),u=Error();d.l(o,function(t){if(d.o(i,e)&&(0!==(n=i[e])&&(i[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",u.name="ChunkLoadError",u.type=r,u.request=o,n[1](u)}},"chunk-"+e,e)}}},d.O.j=function(e){return 0===i[e]},c=function(e,t){var n,r,o=t[0],u=t[1],c=t[2],f=0;if(o.some(function(e){return 0!==i[e]})){for(n in u)d.o(u,n)&&(d.m[n]=u[n]);if(c)var a=c(d)}for(e&&e(t);f<o.length;f++)r=o[f],d.o(i,r)&&i[r]&&i[r][0](),i[r]=0;return d.O(a)},(f=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(c.bind(null,0)),f.push=c.bind(null,f.push.bind(f)),d.nc=void 0}();
@@ -1 +0,0 @@
1
- div.automations_automationsLayout__Atoh_{display:grid;grid-template-columns:1fr 1fr;gap:1rem}div.automations_automationCard__BKidA{display:grid;grid-template-rows:auto 1fr auto}div.automations_pageLayout__OaoYA{max-width:60vw;margin:auto auto 2rem}div.automations_sidePanel__MPciO{position:fixed;height:100%;z-index:1}@media screen and (max-width:768px){div.automations_automationsLayout__Atoh_{grid-template-columns:1fr}div.automations_pageLayout__OaoYA{max-width:90vw}div.automations_sidePanel__MPciO{position:relative;height:100%}}div.sidePanel_session__R9wgH{padding:.5rem;margin-bottom:.25rem;border-radius:.5rem;cursor:pointer;max-width:14rem;font-size:medium;display:grid;grid-template-columns:minmax(auto,400px) 1fr;gap:0}div.sidePanel_compressed__YBPtM{grid-template-columns:minmax(12rem,100%) 1fr 1fr}div.sidePanel_sessionHover__iwfo8,div.sidePanel_session__R9wgH:hover{background-color:hsla(var(--popover))}div.sidePanel_session__R9wgH:hover{color:hsla(var(--popover-foreground))}div.sidePanel_session__R9wgH a{text-decoration:none}button.sidePanel_button__ihOfG{border:none;outline:none;background-color:transparent;cursor:pointer;color:var(--main-text-color);width:24px}button.sidePanel_showMoreButton__dt9Zw{border-radius:.5rem;padding:8px}div.sidePanel_panel__VZ8ye{display:flex;flex-direction:column;padding:1rem;overflow-y:auto;max-width:auto;transition:background-color .5s}div.sidePanel_expanded__ZjTHo{gap:1rem;background-color:hsla(var(--muted));height:100%}div.sidePanel_collapsed__OjVmG{display:grid;grid-template-columns:1fr;height:-moz-fit-content;height:fit-content;padding:1rem 0 0 1rem}p.sidePanel_session__R9wgH{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-align:left;font-size:small}div.sidePanel_header__d5cGA{display:grid;grid-template-columns:1fr auto}div.sidePanel_profile__x0w58{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:center;margin-top:auto}div.sidePanel_panelWrapper__k_lal{display:grid;grid-template-rows:1fr auto auto;height:100%}div.sidePanel_modalSessionsList__nKe2n{position:fixed;top:0;left:0;width:100%;height:100%;background-color:hsla(var(--frosted-background-color));z-index:1;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}div.sidePanel_modalSessionsList__nKe2n div.sidePanel_content__Wq20_{max-width:80%;max-height:80%;background-color:hsla(var(--frosted-background-color));overflow:auto;padding:20px;border-radius:10px}div.sidePanel_modalSessionsList__nKe2n div.sidePanel_session__R9wgH{max-width:100%;text-overflow:ellipsis}@media screen and (max-width:768px){div.sidePanel_panel__VZ8ye{padding:.25rem;width:100%}div.sidePanel_expanded__ZjTHo{z-index:1}div.sidePanel_singleReference__r9z1n{padding:4px}div.sidePanel_panelWrapper__k_lal{width:100%;padding:0 1rem}div.sidePanel_session__R9wgH.sidePanel_compressed__YBPtM{max-width:100%;display:grid;grid-template-columns:70vw auto;justify-content:space-between}div.sidePanel_session__R9wgH{max-width:100%;grid-template-columns:minmax(auto,70vw) 1fr}}menu.navMenu_menu__fqlFF a{text-decoration:none;font-size:medium;font-weight:400;padding:0 4px;border-radius:4px;display:flex;justify-self:center;margin:0;align-items:center;gap:4px}a.navMenu_selected__A__aP{background-color:hsl(var(--accent))}div.navMenu_titleBar__HJoio{display:flex;justify-content:space-between;align-content:space-evenly;align-items:start}div.navMenu_titleBar__HJoio menu{padding:0;margin:0;border-radius:.5rem;display:grid;grid-auto-flow:column;gap:32px}div.navMenu_settingsMenuProfile__3npiK img{border-radius:50%;width:32px;height:32px;margin:0}div.navMenu_settingsMenu__X2i2U{padding:0 4px;border-radius:4px;display:flex;justify-self:center;margin:0;align-items:center}div.navMenu_settingsMenuOptions__KWnLv{display:block;grid-auto-flow:row;position:absolute;background-color:var(--background-color);box-shadow:0 8px 16px 0 rgba(0,0,0,.2);top:64px;text-align:left;padding:8px;border-radius:8px}@media screen and (max-width:600px){menu.navMenu_menu__fqlFF span{display:none}div.navMenu_settingsMenuOptions__KWnLv{right:4px}div.navMenu_titleBar__HJoio{padding:8px}}div.chatHistory_chatHistory__CoaVT{display:flex;flex-direction:column;height:100%}div.chatHistory_chatLayout__ABli_{height:80vh;overflow-y:auto;margin:0 auto}div.chatHistory_agentIndicator__wOU1f a{display:flex;text-align:center;align-content:center;align-items:center}div.chatHistory_trainOfThought__mMWSR{border:1px solid var(--border-color);border-radius:16px;padding:8px 16px;margin:12px}div.chatMessage_chatMessageContainer__sAivf{display:flex;flex-direction:column;margin:12px;border-radius:16px;padding:8px 16px 0}div.chatMessage_chatMessageWrapper__u5m8A{padding-left:1rem;padding-bottom:1rem;max-width:80vw}div.chatMessage_chatMessageWrapper__u5m8A ol,div.chatMessage_chatMessageWrapper__u5m8A p:not(:last-child),div.chatMessage_chatMessageWrapper__u5m8A ul{margin-bottom:16px}div.chatMessage_chatMessageWrapper__u5m8A a span{display:revert!important}div.chatMessage_khojfullHistory__NPu2l{border-width:1px;padding-left:4px}div.chatMessage_youfullHistory__ioyfH{max-width:100%}div.chatMessage_chatMessageContainer__sAivf.chatMessage_youfullHistory__ioyfH{padding-left:0}div.chatMessage_you__6GUC4{background-color:hsla(var(--secondary));align-self:flex-end;border-radius:16px}div.chatMessage_khoj__cjWON{background-color:transparent;color:hsl(var(--accent-foreground));align-self:flex-start}div.chatMessage_khojChatMessage__BabQz{padding-top:8px;padding-left:16px}div.chatMessage_emptyChatMessage__J9JRn{display:none}div.chatMessage_chatMessageContainer__sAivf img{width:auto;height:auto;max-width:100%;max-height:80vh;-o-object-fit:contain;object-fit:contain;display:block;margin-top:.25rem;margin-right:auto}div.chatMessage_chatMessageContainer__sAivf h3 img{width:24px}div.chatMessage_you__6GUC4{color:hsla(var(--secondary-foreground))}div.chatMessage_author__muRtC{font-size:.75rem;color:grey;text-align:right}div.chatMessage_chatFooter__0vR8s{display:flex;justify-content:space-between;min-height:28px}div.chatMessage_chatButtons__Lbk8T{display:flex;justify-content:flex-end;width:-moz-min-content;width:min-content;border:1px solid var(--border-color);border-radius:16px;position:relative;bottom:-12px;background-color:hsla(var(--secondary))}div.chatMessage_chatFooter__0vR8s button{cursor:pointer;color:hsl(var(--muted-foreground));border:none;border-radius:16px;padding:4px;margin-left:4px;margin-right:4px}div.chatMessage_chatFooter__0vR8s button:hover{background-color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv{cursor:pointer;float:right;border-radius:8px}button.chatMessage_codeCopyButton__Y_Ujv:hover{color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv img,button.chatMessage_copyButton__jd7q7 img,div.chatMessage_feedbackButtons___Brdy img{width:24px}div.chatMessage_trainOfThought__mR2Gg strong{font-weight:500}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb strong{font-weight:500;color:hsla(var(--secondary-foreground))}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb p{color:inherit}div.chatMessage_trainOfThoughtElement__le_bC{display:grid;grid-template-columns:auto 1fr;align-items:start}div.chatMessage_trainOfThoughtElement__le_bC ol,div.chatMessage_trainOfThoughtElement__le_bC ul{margin:auto}@media screen and (max-width:768px){div.chatMessage_youfullHistory__ioyfH{max-width:90%}}div.chatInputArea_actualInputArea__Ha6cN{display:grid;grid-template-columns:auto 1fr auto auto}div.search_searchLayout__fP3m0{display:grid;grid-template-columns:1fr;gap:1rem;height:100vh}div.search_sidePanel__myfc9{position:fixed;height:100%;z-index:1}@media screen and (max-width:768px){div.search_searchLayout__fP3m0{gap:0}div.search_sidePanel__myfc9{position:relative;height:100%}}
@@ -1 +0,0 @@
1
- div.chat_main__8xQu5{height:100dvh;color:hsla(var(--foreground))}.chat_suggestions__m8n2t{display:flex;overflow-x:none;height:50%;padding:10px;white-space:nowrap;gap:1rem}div.chat_inputBox__LOFws{border:1px solid var(--border-color);margin-bottom:20px;gap:12px;align-content:center}input.chat_inputBox__LOFws{border:none}input.chat_inputBox__LOFws:focus{outline:none;background-color:transparent}div.chat_inputBox__LOFws:focus{box-shadow:0 8px 16px 0 rgba(0,0,0,.2)}div.chat_chatBodyFull__FfKEK{display:grid;grid-template-columns:1fr;height:100%}button.chat_inputBox__LOFws{border:none;outline:none;background-color:transparent;cursor:pointer;border-radius:.5rem;padding:.5rem;background:linear-gradient(var(--calm-green),var(--calm-blue))}div.chat_chatBody__sS1LX{display:grid;grid-template-columns:1fr 1fr;height:100%}.chat_inputBox__LOFws{color:hsla(var(--foreground))}div.chat_chatLayout__pR203{display:grid;grid-template-columns:auto 1fr;gap:1rem}div.chat_chatBox__FBct_{display:grid;height:100%}div.chat_titleBar__R5QlK{display:grid;grid-template-columns:1fr auto}div.chat_chatBoxBody__qT_SC{display:grid;height:100%;width:70%;margin:auto}div.chat_agentIndicator__8V55w a{display:flex;text-align:center;align-content:center;align-items:center}div.chat_agentIndicator__8V55w{padding:10px}div.chat_chatTitleWrapper__6ChWq{grid-template-columns:1fr auto}@media screen and (max-width:768px){div.chat_inputBox__LOFws{margin-bottom:0}div.chat_chatBoxBody__qT_SC{width:100%}div.chat_chatBody__sS1LX{grid-template-columns:0fr 1fr}div.chat_chatBox__FBct_{padding:0;height:100%}div.chat_chatLayout__pR203{gap:0;grid-template-columns:1fr}}