PageSourceSearch

https://askyourpdf.com/_next/static/chunks/pages/conversations-93cedb8c0b8f971e.js

js askyourpdf.com collected 2026-09-24 09:49:50 UTC 40,175 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4960,2711],{75118:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/conversations",function(){return s(46087)}])},91169:function(e,t){"use strict";t.Z={src:"/_next/static/media/cancel.e5ad3d91.svg",height:20,width:20,blurWidth:0,blurHeight:0}},94288:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var r=s(85893);s(67294);var a=s(50549);function l(){return(0,r.jsxs)("div",{className:"flex w-full flex-col gap-20 px-24 pt-32",children:[(0,r.jsx)("div",{className:"overflow-hidden overflow-ellipsis font-geist text-captionL font-regular not-italic text-text-base-secondary",children:(0,r.jsx)(a.Z,{width:120})}),(0,r.jsx)("div",{className:"flex flex-col items-start gap-8",children:[,,,,].fill(0).map((e,t)=>(0,r.jsx)("div",{className:"flex w-full flex-col items-start gap-8 rounded-xl px-16 py-14",children:(0,r.jsx)("div",{className:"flex items-center justify-between self-stretch",children:(0,r.jsx)("div",{className:"flex w-full items-start gap-12",children:(0,r.jsx)("div",{className:"flex w-full flex-row justify-between pb-[15px]",children:(0,r.jsxs)("div",{className:"flex w-full flex-col items-start gap-2",children:[(0,r.jsx)("p",{className:"overflow-hidden overflow-ellipsis font-geist text-bodyS font-medium not-italic text-text-base-primary",children:(0,r.jsx)(a.Z,{width:200})}),(0,r.jsx)("p",{className:"overflow-hidden truncate overflow-ellipsis font-geist text-captionL font-regular not-italic text-text-base-tertiary",children:(0,r.jsx)(a.Z,{width:100})})]})})})})},t))})]})}},44774:function(e,t,s){"use strict";s.d(t,{Z:function(){return n}});var r=s(85893),a=s(90360),l=s(46166);function n(e){let{open:t,setOpen:s,handleDelete:n,isLoading:i}=e;return(0,r.jsx)(l.IX,{open:t,onOpenChange:s,children:(0,r.jsxs)(l.v$,{children:[(0,r.jsx)(l.Vw,{children:"Delete Document"}),(0,r.jsx)(l.o,{children:"Are you sure you want to delete this document? This action cannot be undone."}),(0,r.jsxs)("div",{className:"mt-24 flex flex-col gap-8",children:[(0,r.jsx)(a.Z,{size:"sm",variant:"primary",target:"destructive",className:"pb-spacing-10 flex items-center justify-center gap-2 self-stretch rounded-lg pl-10 pr-6 pt-6 text-center font-geist text-captionL font-medium text-text-base-primary-dark shadow-[0px_1px_2px_0px_var(--Shadow-xs,rgba(20,21,26,0.05))]",onClick:n,isLoading:i,children:"Delete Document"}),(0,r.jsx)(a.Z,{size:"sm",variant:"secondary",className:"pb-spacing-10 flex items-center justify-center gap-2 self-stretch rounded-lg pl-10 pr-6 pt-6 text-center font-geist text-captionL font-medium text-text-base-primary shadow-[0px_1px_2px_0px_var(--Shadow-xs,rgba(20,21,26,0.05))]",onClick:()=>s(!1),children:"Go back"})]})]})})}s(67294)},49363:function(e,t,s){"use strict";s.d(t,{X:function(){return g}});var r=s(85893);s(67294);var a=s(93133),l=s(4202),n=s(90512),i=s(90360),o=s(58765),c=s(3403),d=s(48666),x=s(27740),u=s(48583),m=s(44079),p=s(37251),f=s(29349),h=s(34651);let g=e=>{let{userRole:t,userAnalytics:s,children:g,activeModels:b,isSummary:j}=e,[v,y]=(0,u.KO)(f.S$),_=Object.keys(x.eC).map((e,t)=>{let s=(0,d.wR)(x.eC[e]);return{id:t,icon:(0,r.jsx)(c.Z,{locale:e,className:"w-16"}),label:(0,r.jsx)("p",{children:s}),onClick:()=>y(e)}}),w=(0,u.b9)(p.Nx),N="var-a"===h.ZP.getFeatureFlag("one-dollar-trial");return(0,r.jsxs)(a.fC,{children:[(0,r.jsx)(a.xz,{asChild:!0,children:(0,r.jsx)("div",{className:(0,d.cn)("customise-output-mobile flex flex-1 justify-end xl:hidden",j&&"hidden mobile:flex"),children:(0,r.jsx)(i.Z,{buttonType:"icon",size:"md",variant:"ghost",children:(0,r.jsx)(l.job,{size:20})})})}),(0,r.jsx)(a.Uv,{children:(0,r.jsxs)(a.VY,{className:(0,n.Z)("min-w-[190px] rounded-xl border-1 border-border-action-normal bg-background-modal-default py-4 shadow-lg xs:min-w-[275px]"),align:"end",children:[(0,r.jsx)(a.__,{className:"px-16 py-8 text-captionL text-text-base-tertiary",children:(0,r.jsx)(m.cC,{id:"vXIe7J"})}),(0,r.jsxs)(a.Tr,{children:[(0,r.jsx)(a.fF,{className:"px-6 py-2 font-geist text-captionL text-text-base-primary outline-none",children:(0,r.jsxs)("div",{className:"hover:bg-bacgkround-overlay-hover flex items-center gap-4 roun
1ded-sm p-6",children:[(0,r.jsx)(c.Z,{locale:v,className:"w-20"}),(0,r.jsx)("span",{className:"px-4",children:(0,d.wR)(x.eC[v])}),(0,r.jsx)(l.jfD,{size:16,className:"ml-auto text-icon-base-quaternary"})]})}),(0,r.jsx)(a.Uv,{children:(0,r.jsx)(a.tu,{className:"rounded-xl border-1 border-border-action-normal bg-background-modal-default py-4 shadow-lg xs:min-w-[169px]",children:_.map(e=>(0,r.jsx)(a.ck,{className:"cursor-pointer px-6 py-2 font-geist text-captionL text-text-base-primary outline-none",onSelect:e.onClick,children:(0,r.jsxs)("div",{className:"flex items-center gap-4 rounded-sm p-6 hover:bg-background-overlay-hover",children:[e.icon,(0,r.jsx)("span",{className:"px-4",children:e.label})]})},e.id))})})]}),(0,r.jsx)(a.Z0,{className:"my-4 h-1 bg-border-base-divider"}),g,b&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Z0,{className:"my-4 h-1 bg-border-base-divider"}),(0,r.jsx)(a.ck,{className:"cursor-pointer px-6 py-2 font-geist text-captionL text-text-base-primary outline-none",children:(0,r.jsxs)("div",{className:"flex items-center gap-4 roun
1ded-sm p-6 hover:bg-background-overlay-hover",children:[(0,r.jsx)(l.VU_,{size:20,className:"text-icon-base-secondary"}),(0,r.jsx)("span",{className:"px-4",children:(0,r.jsx)(m.cC,{id:"x0ICwo"})}),(0,r.jsx)("span",{className:"ml-auto rounded-xs border-1 border-border-base-alpha bg-background-badge-surface px-4 py-2 text-captionM font-medium",children:s?s.number_units:"-"}),(0,r.jsx)(l.jfD,{size:16,className:"text-icon-base-quaternary"})]})})]}),(0,r.jsx)(a.Z0,{className:"my-4 h-1 bg-border-base-divider"}),(0,r.jsx)(a.__,{className:"px-16 py-8 text-captionL text-text-base-tertiary",children:(0,r.jsx)(m.cC,{id:"D+NlUC"})}),(0,r.jsx)(a.ck,{className:"cursor-pointer px-6 py-2 font-geist text-captionL text-text-base-primary outline-none",children:(0,r.jsxs)("div",{className:"flex items-center gap-4 rounded-sm p-6 hover:bg-background-overlay-hover",children:[(0,r.jsx)(l.BUV,{size:20,className:"text-icon-base-secondary"}),(0,r.jsx)("span",{className:"px-4",children:"Dark mode"}),(0,r.jsx)("div",{className:"ml-auto",children:(0,r.jsx)(o.Z,{})})]})}),"free"===t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Z0,{className:"my-4 h-1 bg-border-base-divider"}),(0,r.jsxs)(a.ck,{className:"flex items-center gap-4 px-12 py-10 ",children:[(0,r.jsx)(l.zXH,{size:20,className:"text-icon-base-secondary"}),(0,r.jsx)("p",{className:"font-normal font-geist text-captionL text-text-base-primary",children:"Getting Started"})]}),(0,r.jsx)(a.ck,{className:"px-16 py-8",children:(0,r.jsx)(i.Z,{size:"sm",onClick:()=>{w(!0)},children:N?(0,r.jsx)(m.cC,{id:"bl5Uoo"}):(0,r.jsx)(m.cC,{id:"5ytG9G"})})})]})]})})]})};t.Z=g},22711:function(e,t,s){"use strict";s.r(t);var r=s(85893);s(67294);var a=s(90360),l=s(91169),n=s(25675),i=s.n(n),o=s(4202),c=s(48666);t.default=e=>{let{isOpen:t,onClose:s,handleAction:n,title:d,subTitle:x,actionText:u="Save",content:m,disabled:p=!1,showButtons:f=!0,isLoading:h=!1,roundedBackButton:g=!1}=e;return(0,r.jsxs)(r.Fragment,{children:[t&&(0,r.jsx)("div",{className:"bg-black duration-[0.5s] fixed inset-0 z-40 flex h-full w-full items-center justify-center bg-opacity-50 backdrop-blur-[10px] transition-all [background:#504C4C1C] mobile:hidden",onClick:s}),(0,r.jsx)("div",{className:"bg-white duration-[0.5s] fixed inset-y-0 right-0 z-50 flex w-[400px] transform flex-col items-center justify-center shadow-lg transition-transform mobile:mt-64 mobile:w-full ".concat(t?"translate-x-0":"translate-x-full"),children:(0,r.jsxs)("div",{className:"flex h-full w-full flex-col items-start justify-between overflow-y-auto rounded-l-xl bg-background-surface-neutral p-4 shadow-[0px_100px_105px_0px_rgba(0,0,0,0.07),0px_41.778px_43.866px_0px_rgba(0,0,0,0.05),0px_22.336px_23.453px_0px_rgba(0,0,0,0.04),0px_12.522px_13.148px_0px_rgba(0,0,0,0.04),0px_6.65px_6.983px_0px_rgba(0,0,0,0.03),0px_2.767px_2.906px_0px_rgba(0,0,0,0.02)] mobile:justify-start",children:[(0,r.jsxs)("div",{className:"flex w-full items-start justify-between  border-b-1 border-solid border-[#0000001A] px-16 py-20 mobile:flex-col mobile:border-none mobile:px-20 mobile:py-12",children:[(0,r.jsx)("div",{className:"hidden pb-24 mobile:block",children:(0,r.jsx)("div",{className:(0,c.cn)("flex h-32 w-32 cursor-pointer items-center justify-center border border-solid border-border-action-normal bg-background-button-secondary shadow-xs",g?"rounded-lg":"rounded-full"),onClick:s,children:(0,r.jsx)(o.jW7,{size:16,color:"#80828C"})})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-bodyS font-semiBold text-text-base-primary",children:d}),x&&(0,r.jsx)("p",{className:"pt-4 text-captionL font-regular text-text-base-tertiary",children:x})]}),(0,r.jsx)("div",{children:(0,r.jsx)(i(),{onClick:s,src:l.Z,className:"cursor-pointer mobile:hidden",alt:"new-element"})})]}),(0,r.jsx)("div",{className:"h-full w-full overflow-x-hidden px-20 py-12 mobile:h-auto mobile:px-20",children:m}),f&&(0,r.jsx)("div",{className:"hidden w-full px-24 pt-24 mobile:block mobile:px-20",children:(0,r.jsx)(a.Z,{size:"lg",className:"flex w-full items-center justify-center gap-2 px-10 py-6 text-center font-geist text-captionL font-medium text-text-base-inverted disabled:text-text-base-primary",onClick:n,isLoading:h,disabled:p,children:u})}),f&&(0,r.jsx)("div",{className:"flex w-full items-center gap-12 border-t border-solid border-t-border-base-divider [padding:12px_32px_24px_32px] mobile:hidden",children:(0,r.jsxs)("div",{className:"flex flex-[1_0_0] items-center justify-end gap-8 px-0 pb-0 pt-0",children:[(0,r.jsx)(a.Z,{size:"sm",variant:"secondary",className:"flex items-center justify-center gap-2 px-10 py-6 text-center font-geist text-captionL font-medium text-text-base-primary",onClick:s,children:"Cancel"}),(0,r.jsx)(a.Z,{size:"sm",className:"flex items-center justify-center gap-2 px-10 py-6 text-center font-geist text-captionL font-medium text-text-base-inverted disabled:text-text-base-primary",onClick:n,isLoading:h,disabled:p,children:u})]})})]})})]})}},16792:function(e,t,s){"use strict";var r=s(85893);s(67294);var a=s(4202),l=s(48666),n=s(44079),i=s(48410);t.Z=e=>{let{searchTerm:t,onSearchChange:s,placeholder:o,className:c="",inputClassName:d="",showResults:x=!1,resultsContent:u,resultsClassName:m="",isLoading:p=!1,minSearchLength:f=0,disabled:h=!1,resultPosition:g="bottom",resultZIndex:b=10,width:j="lg:w-[303px]"}=e,{_:v}=(0,n.mV)(),y=v({id:"4vtt+N"}),_=x&&t.length>=f&&u;return(0,r.jsxs)("div",{className:"relative flex flex-col items-start",children:[(0,r.jsx)("div",{className:(0,l.cn)("flex w-full flex-col items-start rounded-lg border border-solid bg-background-input-normal px-6 py-6",j,t.length>0?"rounded-sm border-1 border-border-action-focus-light p-2 shadow-[0px_0px_0px_2px_var(--background-input-effect,rgba(30,31,36,0.15))]":"border-border-action-normal",h&&"cursor-not-allowed opacity-50",c),children:(0,r.jsxs)("div",{className:"flex w-full flex-[1_0_0] items-center gap-4 pl-8",children:[(0,r.jsx)(a.Qcu,{className:"text-icon-base-tertiary"}),(0,r.jsx)("input",{placeholder:o||y,name:"search",type:"text",value:t,onChange:e=>s(e.target.value),disabled:h,className:(0,l.cn)("flex w-full flex-[1_0_0] items-center border-0 bg-inherit text-captionL font-regular text-text-base-primary outline-0 placeholder:text-text-base-tertiary hover:border-0 focus:border-0",h&&"cursor-not-allowed",d)})]})}),_&&(0,r.jsx)("div",{className:(0,l.cn)("absolute max-h-[300px] overflow-y-auto rounded-xl border border-solid border-border-action-normal bg-background-modal-default p-6 shadow-lg",j,"top"===g?"bottom-full mb-2":"top-full mt-2","z-[".concat(b,"]"),m),children:p?(0,r.jsx)(i.Z,{rows:8}):u})]})}},48410:function(e,t,s){"use strict";var r=s(85893);s(67294);var a=s(50549);t.Z=e=>{let{rows:t,width:s,height:l}=e;return(0,r.jsx)("div",{className:"block leading-none",children:(0,r.jsx)(a.Z,{count:t>1?t-.5:t,height:l,width:s,containerClassName:"block leading-none",className:"block leading-none"})})}},28834:function(e,t,s){"use strict";s.d(t,{Z:function(){return h}});var r=s(85893),a=s(67294),l={src:"/_next/static/media/Signs.d443488b.svg",height:24,width:23,blurWidth:0,blurHeight:0},n=s(25675),i=s.n(n),o=s(90360),c=s(4202),d=s(82242),x=s(36227),u=s(88767),m=s(51756),p=s(44079),f=s(89555),h=e=>{let{subscriptionFailed:t}=e,{userToken:s}=(0,m.aC)(),[n,h]=(0,a.useState)(t),[g,b]=(0,a.useState)(!1),j=d.ir.WEB;(0,a.useEffect)(()=>{h(t)},[t]);let v=(0,u.useMutation)(d.pu,{onSuccess:e=>{window.location.href=e.url},onError:e=>
1{x.$.error(f.ag._({id:"SlfejT"}),f.ag._({id:"Neo4h9"}))},onSettled:()=>{b(!1)}}),y=async(e,t)=>{b(!0),v.mutate({token:s,subType:e,action:t})};return n?(0,r.jsxs)("div",{className:"mobile:flex-col mobile:items-start mobile:mx-24 relative mx-32 my-8 flex items-center justify-center gap-12 rounded-xl bg-icon-status-destructive-tertiary px-16 py-8 font-geist",children:[(0,r.jsxs)("div",{className:"mobile:mr-24 mobile:items-start flex items-center gap-12",children:[(0,r.jsx)("div",{className:"mobile:w-36 h-24 w-24",children:(0,r.jsx)(i(),{src:l,className:"h-full w-full",alt:"error"})}),(0,r.jsx)("div",{children:(0,r.jsx)("p",{className:" text-captionL font-regular text-text-base-primary",children:(0,r.jsx)(p.cC,{id:"0m37yZ"})})})]}),(0,r.jsx)("div",{className:"mobile:ml-36",children:(0,r.jsx)(o.Z,{size:"xs",onClick:()=>{y(j,d.Us.MANAGE_SUBSCRIPTION)},isLoading:g,children:(0,r.jsx)(p.cC,{id:"XHag4R"})})}),(0,r.jsx)("div",{className:"mobile:top-8 absolute  right-12 cursor-pointer",onClick:()=>{h(!1)},children:(0,r.jsx)(c.tgW,{color:"#80828C"})})]}):null}},46087:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return ep},default:function(){return ef}});var r,a,l,n,i,o,c,d,x,u,m,p=s(85893),f=s(67294),h=s(4202),g=s(90360),b=s(44079),j=s(37463),v=s(88767),y=s(51756),_=s(88703),w=s(48410),N=s(11163),E=s(11799),C=s(16792),S=e=>{let{newChatClick:t,disabled:s,conversationListCheck:r,conversationsData:a}=e;b.cC,h.uaR,()=>{};let{_:l}=(0,b.mV)(),{userToken:n}=(0,y.aC)(),i=(0,N.useRouter)(),[o,c]=(0,f.useState)([]),[d,x]=(0,f.useState)(""),u=(0,j.Z)(d.trim()),{data:m,status:S}=(0,v.useQuery)(["conversationSearchResults",u],async()=>await (0,_.lS)(n,u),{onSuccess:async e=>{c(e)},enabled:u.length>=3,refetchOnWindowFocus:!1}),k=a?Object.values(a).flat():[],Z=e=>(0,p.jsx)("div",{children:e.map(e=>(0,p.jsx)("div",{onClick:()=>i.push("/conversations/c/".concat(e.chat_id)),children:(0,p.jsx)("p",{className:"cursor-pointer truncate px-10 py-6 font-geist text-captionL font-regular text-text-base-primary",children:e.name})},e.chat_id))});return(0,p.jsxs)("header",{className:"items-left flex flex-col justify-between gap-16 px-[32px] pb-[12px] pt-[24px] lg:flex-row lg:items-center ",children:[(0,p.jsxs)("div",{className:"flex flex-[1_0_0] flex-col items-start justify-center gap-[4px]",children:[(0,p.jsx)("h6",{className:"font-geist text-h6 font-semiBold not-italic text-text-base-primary",children:(0,p.jsx)(b.cC,{id:"EnJuK0"})}),(0,p.jsx)("p",{className:"font-geist text-captionL not-italic text-text-base-tertiary",children:(0,p.jsx)(b.cC,{id:"2rWAAg"})})]}),(0,p.jsxs)("div",{className:"items-left flex-col gap-16 lg:flex-row lg:items-start ".concat(r?"hidden":"flex"),children:[(0,p.jsx)(C.Z,{searchTerm:d,onSearchChange:x,placeholder:l({id:"4vtt+N"}),showResults:d.length>0,resultsContent:((e,t,s,r)=>{if(t.length>=3)switch(r){case"loading":return(0,p.jsx)(w.Z,{rows:10});case"success":return s.length>0?Z(s):(0,E.lm)({style:"min-h-fit",debouncedSearchTerm:u});case"error":return(0,E.Op)({style:"min-h-fit",debouncedSearchTerm:u})}return Z(e)})(k,d,o,S),minSearchLength:0,isLoading:"loading"===S,resultsClassName:"lg:top-72 top-[200px]",resultZIndex:10}),(0,p.jsx)(g.Z,{onClick:t,disabled:s,size:"md",leadIcon:(0,p.jsx)(h.N9Z,{className:"text-icon-base-inverted",size:20}),className:"order-first w-fit text-center font-geist text-captionL font-medium not-italic lg:order-last",children:(0,p.jsx)(b.cC,{id:"q2+WzE"})})]})]})};function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e}).apply(this,arguments)}var Z=function(e){return f.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",width:140,height:102,fill:"none"},e),r||(r=f.createElement("path",{fill:"#EAEEF9",d:"M71.76 101.41c27.627 0 50.022-22.415 50.022-50.066S99.387 1.277 71.761 1.277 21.739 23.693 21.739 51.344c0 27.65 22.396 50.066 50.022 50.066M131.06 62.715a3.827 3.827 0 0 0 3.825-3.828 3.827 3.827 0 0 0-3.825-3.828 3.827 3.827 0 0 0-3.825 3.828 3.827 3.827 0 0 0 3.825 3.828M26.169 16.93a2.517 2.517 0 0 0 2.516-2.519 2.517 2.517 0 1 0-2.516 2.518"})),a||(a=f.createElement("path",{fill:"#CED6E2",d:"M0 63.85a5.844 5.844 0 0 0 5.838 5.843H57.57c.503 0 1.007.201 1.309.504l7.246 7.253c.201.302.604.403 1.007.201.301-.1.603-.504.603-.806V43.3a5.844 5.844 0 0 0-5.837-5.843H5.838A5.844 5.844 0 0 0 0 43.3z"})),l||(l=f.createElement("path",{fill:"url(#NoMessagesIcon_svg__a)",d:"M55.054 50.553H10.568c-.403 0-.805-.403-.805-.806v-2.619c0-.403.402-.806.805-.806h44.486c.402 0 .805.403.805.806v2.62c0 .503-.302.805-.805.805",opacity:.7})),n||(n=f.createElement("path",{fill:"url(#NoMessagesIcon_svg__b)",d:"M37.944 61.534H10.568c-.403 0-.805-.403-.805-.806v-2.62c0-.402.402-.805.805-.805h27.376c.402 0 .805.403.805.806v2.619c0 .503-.302.806-.805.806",opacity:.7})),i||(i=f.createElement("path",{fill:"#CED6E2",d:"M140 24.261a5.2 5.2 0 0 1-5.234 5.238H88.267c-.402 0-.905.202-1.207.504l-6.543 6.548c-.2.201-.603.302-.905.201a.76.76 0 0 1-.504-.705V5.827a5.2 5.2 0 0 1 5.234-5.24h50.324a5.2 5.2 0 0 1 5.233 5.24V24.26z"})),o||(o=f.createElement("path",{fill:"url(#NoMessagesIcon_svg__c)",d:"M129.633 12.375H89.676a.69.69 0 0 1-.704-.705V9.252c0-.403.302-.705.704-.705h39.957c.403 0 .705.302.705.705v2.418a.69.69 0 0 1-.705.705",opacity:.7})),c||(c=f.createElement("path",{fill:"url(#NoMessagesIcon_svg__d)",d:"M114.335 22.246H89.676a.69.69 0 0 1-.704-.705v-2.418c0-.403.302-.705.704-.705h24.659c.402 0 .704.302.704.705v2.418c0 .302-.402.705-.704.705",opacity:.7})),d||(d=f.createElement("defs",null,f.createElement("linearGradient",{id:"NoMessagesIcon_svg__a",x1:57.091,x2:10.088,y1:48.426,y2:48.426,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{offset:.007,stopColor:"#A6AEBE",stopOpacity:0}),f.createElement("stop",{offset:1,stopColor:"#A6AAB5"})),f.createElement("linearGradient",{id:"NoMessagesIcon_svg__b",x1:39.524,x2:9.967,y1:59.406,y2:59.406,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{offset:.007,stopColor:"#A6AEBE",stopOpacity:0}),f.createElement("stop",{offset:1,stopColor:"#A6AAB5"})),f.createElement("linearGradient",{id:"NoMessagesIcon_svg__c",x1:131.443,x2:89.263,y1:10.45,y2:10.45,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{offset:.007,stopColor:"#A6AEBE",stopOpacity:0}),f.createElement("stop",{offset:1,stopColor:"#A6AAB5"})),f.createElement("linearGradient",{id:"NoMessagesIcon_svg__d",x1:115.736,x2:89.156,y1:20.321,y2:20.321,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{offset:.007,stopColor:"#A6AEBE",stopOpacity:0}),f.createElement("stop",{offset:1,stopColor:"#A6AAB5"})))))},O=e=>{let{newChatClick:t}=e;return(0,p.jsxs)("div",{className:"flex flex-col justify-center items-center gap-[24px] self-stretch h-full",children:[(0,p.jsxs)("div",{className:"flex flex-col justify-center items-center gap-[8px] self-stretch",children:[(0,p.jsx)(Z,{}),(0,p.jsx)("p",{className:"self-stretch text-text-base-secondary text-center text-bodyS font-geist not-italic font-regular",children:"No recent conversations yet."})]}),(0,p.jsx)("div",{children:(0,p.jsx)(g.Z,{onClick:t,size:"md",leadIcon:(0,p.jsx)(h.N9Z,{className:"text-icon-base-inverted",size:20}),className:"text-center text-captionL font-medium font-geist not-italic ",children:(0,p.jsx)(b.cC,{id:"q2+WzE"})})})]})},z=s(48666),D=s(44774),A=s(89388),I=s(36227),L=s(77620),M=s(30198),U=s(88568),B=s(49193),F=s(89555),T=s(22711),G=s(94584),R=e=>{let{conversationsData:t,fetchNextConversations:s,isFetchingNextConversations:r}=e,{_:a}=(0,b.mV)(),[l,n]=(0,f.useState)(!1),[i,o]=(0,f.useState)(!1),[c,d]=(0,f.useState)(""),[x,u]=(0,f.useState)(null),[m,j]=(0,f.useState)(""),[w,E]=(0,f.useState)(!1),C=(0,N.useRouter)(),S=(0,v.useQueryClient)(),{userToken:k}=(0,y.aC)(),[Z,O]=(0,f.useState)(),[R,V]=(0,f.useState)(""),[P,H]=(0,f.useState)(!1),W=Object.keys(t||{}).reduce((e,s)=>(e[s]=t[s].map(e=>({...e,formattedDate:(0,z.B3)(e.date_time)})),e),{}),[q,$]=(0,f.useState)(null),Q=(0,f.useCallback)(e=>{$(e)},[]);(0,f.useEffect)(()=>{x&&j(x.name)},[x]),(0,f.useEffect)(()=>{let e=new IntersectionObserver(e=>{let[t]=e;t.isIntersecting&&s()},{root:null,threshold:.5});return q&&e.observe(q),()=>{q&&e.unobserve(q)}},[q]);let X=(0,v.useMutation)(_.SJ,{onMutate:()=>{E(!0)},onSuccess:e=>{E(!1),I.$.success("Conversation Deleted!","".concat(e.message||"Delete Successful"),!0),(0,A.kO)(A.xI.CONVERSATION_DELET
1E_SUCCESS),S.invalidateQueries("conversations"),S.invalidateQueries(["conversationSearchResults"]),S.invalidateQueries("knowledgeBases"),n(!1),d("")},onError:e=>{E(!1),I.$.error("Delete Failed","Failed to delete conversation. Please try again"),(0,A.kO)(A.xI.CONVERSATION_DELETE_FAILED)},onSettled:()=>{E(!1)}}),J=e=>{void 0!==e&&""!==e&&X.mutate({token:k,chat_id:e})},K=e=>{let t=[];return t.push({id:1,label:(0,p.jsx)("p",{className:"text-base-primary font-geist text-captionL font-regular",children:(0,p.jsx)(b.cC,{id:"Z8lGw6"})}),icon:(0,p.jsx)(h.wdf,{size:20,className:"text-icon-base-secondary"}),onClick:t=>{t.stopPropagation(),O(e)}}),t.push({id:2,label:(0,p.jsx)("p",{className:"text-base-primary font-geist text-captionL font-regular",children:(0,p.jsx)(b.cC,{id:"91IbTN"})}),icon:(0,p.jsx)(h.ISo,{size:20,className:"text-icon-base-secondary"}),onClick:t=>{t.stopPropagation(),u(e),o(!0)}}),t.push({id:2,label:(0,p.jsx)("p",{className:"m-0 flex w-full items-center justify-center gap-2 self-stretch rounded-lg border-0 p-5 font-geist text-captionL font-regular text-text-status-destructive shadow-[0px_1px_2px_0px_var(--Shadow-xs,rgba(20,21,26,0.05))]",children:(0,p.jsx)(b.cC,{id:"cnGeoo"})}),icon:(0,p.jsx)(h.uaR,{size:20,className:"text-background-accent-red-accent"}),onClick:t=>{t.stopPropagation(),d(e.chat_id),n(!0)}}),t};(0,f.useEffect)(()=>{P||(O(void 0),V(""))},[P]);let Y=e=>{if(!e){I.$.error(F.ag._({id:"SlfejT"}),F.ag._({id:"my5HVG"}));return}ee.mutate({token:k,chat_id:e.chat_id,chatName:m})},ee=(0,v.useMutation)(_.FI,{onSuccess:()=>{S.invalidateQueries("conversations"),I.$.success(F.ag._({id:"hZwB8e"}),F.ag._({id:"wNZOZP"})),o(!1),j("")},onError:()=>{I.$.error(F.ag._({id:"SlfejT"}),F.ag._({id:"Gc12Dd"}))}});return(0,f.useEffect)(()=>{Z&&(Z.is_knowledge_base||V("".concat(window.location.origin,"/conversations/d/").concat(Z.doc_id)),H(!0))},[Z]),(0,p.jsxs)("div",{className:"flex h-full w-full flex-col items-start gap-16 overflow-y-auto px-24 py-10 pb-40 lg:gap-16 lg:self-stretch lg:pb-0",children:[(0,p.jsxs)("div",{className:"flex w-full flex-col items-start gap-20",children:[Object.keys(W).map((e,t)=>(0,p.jsxs)("div",{className:"flex w-full flex-col gap-20",children:[(0,p.jsx)("div",{className:"overflow-hidden overflow-ellipsis font-geist text-captionL font-regular not-italic text-text-base-secondary",children:e}),(0,p.jsx)("div",{className:"flex flex-col items-start gap-8",children:W[e].map((e,t)=>{let s=function(e){let t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toLocaleString("en-US",{weekday:"long",month:"long",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0})}(e.date_time);return(0,p.jsx)("div",{className:"flex w-full cursor-pointer flex-col items-start gap-8 rounded-xl py-12 lg:px-16 lg:py-14",children:(0,p.jsx)("div",{className:"flex w-full items-center justify-between self-stretch",children:(0,p.jsxs)("div",{className:"flex w-full items-start gap-12",children:[(0,p.jsx)(h.pLq,{className:"text-icon-base-quaternary",size:24}),(0,p.jsxs)("div",{className:"flex w-full flex-row justify-between border-b border-border-base-neutral-subtle pb-[15px]",children:[(0,p.jsxs)("div",{className:"flex w-full flex-col items-start gap-2",onClick:()=>C.push("/conversations/c/".concat(e.chat_id)),children:[(0,p.jsx)("p",{className:"w-full break-words font-geist text-bodyS font-medium not-italic text-text-base-primary",children:null==e?void 0:e.name}),(0,p.jsx)("p",{className:"font-geist text-captionL font-regular not-italic text-text-base-tertiary",children:s})]}),(0,p.jsx)("div",{className:"flex items-center justify-end gap-8 p-8 ",children:(0,p.jsx)(L.Z,{items:K(e),align:"end",triggerAsChild:!0,children:(0,p.jsx)(g.Z,{buttonType:"icon",variant:"ghost",size:"sm",children:(0,p.jsx)(h.job,{size:16})})})})]})]})})},t)})})]},t)),(0,p.jsx)("div",{className:"flex w-full items-center justify-center overflow-hidden",ref:Q,children:r&&(0,p.jsx)(M.Z,{})})]}),(0,p.jsx)(D.Z,{open:l,setOpen:()=>n(!1),handleDelete:()=>J(c),isLoading:w}),i&&(0,p.jsx)(T.default,{isOpen:i,onClose:()=>o(!1),handleAction:()=>Y(x),actionText:a({id:"EkH9pt"}),isLoading:ee.isLoading,title:a({id:"91IbTN"}),subTitle:a({id:"g7GI+i"}),content:(0,p.jsx)(G.Z,{title:m,setTitle:j}),disabled:(null==m?void 0:m.length)<1}),P&&Z&&(Z.is_knowledge_base?(0,p.jsx)(U.Z,{open:P,setOpen:H,knowledge_base_id:Z.doc_id}):(0,p.jsx)(B.Z,{open:P,setOpen:H,shareURL:R}))]})},V=s(72167);function P(){return(P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e}).apply(this,arguments)}var H=function(e){return f.createElement("svg",P({xmlns:"http://www.w3.org/2000/svg",width:50,height:48,fill:"none"},e),x||(x=f.createElement("path",{fill:"#0B0C11",fillRule:"evenodd",d:"M40.856 1.305c-1.279 1.699-3.873 4.618-5.663 6.374-2.031 1.991-4.298 3.908-6.348 5.368l-1.15.819.305.438c2.674 3.833 3.558 7.56 2.908 12.262a35 35 0 0 1-.537 2.8
16c-.178.732-.308 1.347-.288 1.367.073.07.687-.868 1.006-1.536.966-2.024 1.471-4.528 1.464-7.245l-.005-1.745 3.383-3.338c3.672-3.622 5.296-5.34 6.127-6.483l.534-.733-.06-1.782c-.033-.98-.137-2.347-.23-3.04-.184-1.347-.64-3.49-.841-3.946l-.123-.279zm-33.01 2.14c-1.809.254-3.66 1.19-5.091 2.574C1.192 7.529.306 9.377.078 11.599c-.068.66-.093 4.828-.069 11.163.034 8.78.062 10.2.209 10.795.818 3.297 3.056 5.81 5.809 6.522.353.092.906.196 1.23.232s.72.09.881.12l.293.056.028 3.423.029 3.423 3.453-3.366 3.454-3.366 1.094-.018c1.744-.029 3.14-.424 4.821-1.367 2.171-1.216 4.35-3.301 5.867-5.614.373-.57 1.29-2.464 1.57-3.244.587-1.639 1.11-4.7.794-4.651-.045.006-5.413.006-11.931 0l-11.851-.013v-10.06h10.486c5.768 0 10.487-.029 10.487-.063s-.277-.47-.615-.97c-.339-.498-.63-.938-.649-.978-.018-.039.993-.93 2.247-1.978l4.732-3.957 2.451-2.05-.418-.355c-.608-.516-2.106-1.287-3.094-1.593l-.856-.265-11.181-.012c-6.15-.007-11.327.008-11.503.033m37.411 5.072c-2.093 3.228-4.375 5.877-8.536 9.91l-2.613 2.532-.104 1.188c-.173 1.974-.407 3.559-.683 4.627-.63 2.43-1.904 4.766-3.979 7.29-1.242 1.512-1.295 1.682-.248.789 1.495-1.274 3.172-3.22 4.27-4.954 1.207-1.906 2.244-4.447 2.49-6.103l.128-.855.591-.429c.527-.381 3.404-2.667 3.706-2.945.066-.06.475-.414.91-.788 2.486-2.139 4.79-4.516 4.809-4.964.038-.904.034-6.355-.005-6.353-.03.002-.36.477-.736 1.055m4.16 3.68c-.748.995-2.921 3.597-3.877 4.642-2.107 2.302-5.493 5.365-7.802 7.059-.585.428-.608.464-.737 1.145-.773 4.077-4.358 8.432-9.91 12.035-.831.54-1.543.982-1.58.982s-.247.114-.467.254-1 .563-1.736.941c-1.487.765-1.46.82.267.528 4.959-.84 9.631-2.88 13.75-6.007 1.861-1.412 4.6-4.23 5.855-6.022.249-.355.499-.699.555-.764.347-.4 2.222-3.61 2.963-5.069 1.535-3.024 2.335-5.266 2.915-8.174.402-2.014.432-2.202.35-2.196-.035.002-.282.293-.546.645m-40.29 5.867c-.032.084-.045 1.564-.028 3.289l.03 3.136.776.03.776.032v-2.4l.937-.036c1.218-.049 1.833-.324 2.24-1.002a2.034 2.034 0 0 0-.358-2.564c-.484-.449-.842-.529-2.63-.585-1.408-.044-1.692-.027-1.743.1m6.476 3.19v3.315l1.705-.048c1.652-.047 1.725-.058 2.396-.382 1.252-.604 1.785-1.484 1.785-2.951 0-.872-.224-1.528-.714-2.088-.744-.852-1.793-1.159-3.968-1.16h-1.204zm7.455-3.245c-.04.038-.071 1.526-.071 3.306v3.236l.775-.031.776-.031.03-1.336.03-1.336h2.027v-1.153h-2.033v-1.467h2.675v-1.258h-2.069c-1.138 0-2.1.032-2.14.07m-12.377 2.067v.902h.52c.285 0 .663-.05.84-.11.546-.186.74-.914.365-1.367-.168-.204-.325-.25-.963-.286l-.762-.042zm6.42 1.164v1.939h.616c1.488 0 2.202-.63 2.205-1.942.003-1.275-.715-1.935-2.105-1.935H17.1z",clipRule:"evenodd"})))},W=s(52886),q=s(82946),$=s(2886),Q=e=>{let{documentClick:t,zoteroDrawer:s,handleFileUpload:r}=e,a=(0,f.useRef)(null),{isStepCompleted:l}=(0,q.r)();return(0,p.jsxs)("div",{className:"document-source flex flex-col items-center justify-center gap-12 self-stretch md:flex-row",children:[(0,p.jsx)("div",{className:"flex flex-col items-start gap-2 rounded-md px-5 py-3",children:(0,p.jsx)($.default,{ref:a,openModal:()=>{t()},children:(0,p.jsx)(g.Z,{onClick:t,size:"md",variant:"primary",leadIcon:(0,p.jsx)(h.pmu,{className:"text-icon-base-primary-dark",size:20}),className:"flex w-[152px] flex-[1_0_0] items-center justify-center gap-4 roun
1ded-xl bg-background-button-primary px-12 py-10 shadow-[0px_1px_2px_0px_var(--Shadow-xs,rgba(20,21,26,0.05))] md:w-[151px]",children:(0,p.jsx)(b.cC,{id:"E/muDO"})})})}),(0,p.jsx)("div",{className:"flex flex-col items-start gap-2 rounded-md px-5 py-3",children:(0,p.jsx)(W.Z,{onChange:r})}),(0,p.jsx)("div",{className:"flex flex-col items-start gap-2 rounded-md px-5 py-3",children:(0,p.jsx)(g.Z,{onClick:s,size:"md",variant:"primary",leadIcon:(0,p.jsx)(h.lvZ,{className:"text-icon-base-primary-dark",size:20}),className:"flex w-[152px] flex-[1_0_0] items-center justify-center gap-4 rounded-xl bg-background-button-primary px-12 py-10 shadow-[0px_1px_2px_0px_var(--Shadow-xs,rgba(20,21,26,0.05))] md:w-[151px] ",children:"Zotero"})})]})},X=e=>{let{documentClick:t,zoteroDrawer:s,handleFileUpload:r}=e;return(0,p.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center px-24",children:(0,p.jsxs)("div",{className:"flex w-full flex-col items-center gap-40 md:w-[478px]",children:[(0,p.jsxs)("div",{className:"flex flex-col items-center justify-center gap-12 self-stretch",children:[(0,p.jsx)(H,{}),(0,p.jsxs)("div",{className:"flex flex-col items-start justify-center gap-8 self-stretch",children:[(0,p.jsx)("h6",{className:"self-stretch text-center font-geist text-bodyL font-semiBold text-text-base-primary",children:(0,p.jsx)(b.cC,{id:"c6FrMu"})}),(0,p.jsx)("p",{className:"self-stretch text-center font-geist text-bodyS font-regular tracking-[-0.16px] text-text-base-secondary",children:(0,p.jsx)(b.cC,{id:"5ZLbI/"})})]})]}),(0,p.jsx)("div",{className:"flex items-center justify-center gap-12 self-stretch",children:(0,p.jsx)(Q,{documentClick:t,zoteroDrawer:s,handleFileUpload:r})})]})})},J=s(6223),K=s(58977),Y=s(23197),ee=s(66249),et=s(24613),es=s(61589),er=s(94288),ea=s(90512),el=s(86918),en=s(28834),ei=s(98913);function eo(){return(eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e}).apply(this,arguments)}var ec=function(e){return f.createElement("svg",eo({xmlns:"http://www.w3.org/2000/svg",width:24,height:23,fill:"none"},e),u||(u=f.createElement("g",{filter:"url(#ErrorSign_svg__a)"},f.createElement("rect",{width:22.857,height:22.857,x:.572,y:.143,fill:"url(#ErrorSign_svg__b)",rx:6.857}),f.createElement("g",{filter:"url(#ErrorSign_svg__c)"},f.createElement("path",{fill:"url(#ErrorSign_svg__d)",d:"M12.002 4.715a6.856 6.856 0 0 1 4.89 11.665 6.858 6.858 0 0 1-11.744-4.589l-.003-.222.002-.192a6.856 6.856 0 0 1 6.855-6.662m.006 8.91-.087.005a.686.686 0 0 0 0 1.362l.08.004.088-.004a.686.686 0 0 0 0-1.362zm-.006-5.483a.686.686 0 0 0-.681.605l-.005.08v2.742l.005.08a.685.685 0 0 0 1.362 0l.004-.08V8.827l-.004-.08a.685.685 0 0 0-.681-.605"}),f.createElement("path",{stroke:"url(#ErrorSign_svg__e)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:.571,d:"M18.573 11.57za6.567 6.567 0 0 1-6.465 6.573 6.573 6.573 0 0 1-6.674-6.358l-.004-.216.003-.186a6.57 6.57 0 0 1 6.569-6.382 6.57 6.57 0 0 1 6.571 6.568m-6.547 1.77h-.033l-.087.005-.018.002a.972.972 0 0 0 .016 1.93l.08.005h.033l.088-.005q.008 0 .018-.002a.972.972 0 0 0-.017-1.93zm-.024-5.484a.97.97 0 0 0-.966.874l-.005.08v2.776l.005.08.001.017a.971.971 0 0 0 1.93-.017l.006-.08V8.81l-.005-.08-.002-.016a.97.97 0 0 0-.964-.858"})))),m||(m=f.createElement("defs",null,f.createElement("linearGradient",{id:"ErrorSign_svg__b",x1:12.001,x2:12.001,y1:.143,y2:23,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#E77975"}),f.createElement("stop",{offset:1,stopColor:"#AA2E26"})),f.createElement("linearGradient",{id:"ErrorSign_svg__d",x1:12.002,x2:12.002,y1:4.715,y2:18.429,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#fff"}),f.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:.4})),f.createElement("linearGradient",{id:"ErrorSign_svg__e",x1:12.002,x2:12.002,y1:4.715,y2:18.429,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#fff",stopOpacity:0}),f.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:.6})),f.createElement("filter",{id:"ErrorSign_svg__a",width:22.857,height:24,x:.572,y:-1,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse"}
1,f.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),f.createElement("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),f.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),f.createElement("feOffset",{dy:-1.143}),f.createElement("feGaussianBlur",{stdDeviation:1.143}),f.createElement("feComposite",{in2:"hardAlpha",k2:-1,k3:1,operator:"arithmetic"}),f.createElement("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"}),f.createElement("feBlend",{in2:"shape",result:"effect1_innerShadow_3603_25449"}),f.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),f.createElement("feMorphology",{in:"SourceAlpha",radius:.571,result:"effect2_innerShadow_3603_25449"}),f.createElement("feOffset",null),f.createElement("feComposite",{in2:"hardAlpha",k2:-1,k3:1,operator:"arithmetic"}),f.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),f.createElement("feBlend",{in2:"effect1_innerShadow_3603_25449",result:"effect2_innerShadow_3603_25449"})),f.createElement("filter",{id:"ErrorSign_svg__c",width:18.286,height:18.286,x:2.859,y:3.572,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse"},f.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),f.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),f.createElement("feOffset",{dy:1.143}),f.createElement("feGaussianBlur",{stdDeviation:1.143}),f.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),f.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),f.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_3603_25449"}),f.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),f.createElement("feOffset",{dy:.571}),f.createElement("feGaussianBlur",{stdDeviation:.286}),f.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),f.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),f.createElement("feBlend",{in2:"effect1_dropShadow_3603_25449",result:"effect2_dropShadow_3603_25449"}),f.createElement("feBlend",{in:"SourceGraphic",in2:"effect2_dropShadow_3603_25449",result:"shape"})))))};function ed(e){let{message:t,action:s,handleClose:r}=e;return(0,p.jsxs)("div",{className:"relative flex gap-12 rounded-xl bg-icon-accent-red-tertiary px-16 py-12 lg:items-center  lg:py-8",children:[(0,p.jsx)("div",{className:"shrink-0",children:(0,p.jsx)(ec,{})}),(0,p.jsxs)("div",{className:"mr-20 flex flex-col items-start gap-12 lg:mr-0 lg:flex-row lg:items-center",children:[(0,p.jsx)("p",{className:"font-geist text-captionL",children:t}),s]})]})}var ex=s(7973),eu=s(48583),em=s(37251),ep=!0,ef=()=>{let{_:e}=(0,b.mV)(),[t,s]=(0,f.useState)(!1),[r,a]=(0,f.useState)(!1),[l,n]=(0,f.useState)("documents"),[i,o]=(0,f.useState)(!1),[c,d]=(0,f.useState)({documentID:[]}),{userSubscriptionInfo:x}=(0,ei.mU)(),u=(0,N.useRouter)(),{userToken:m}=(0,y.aC)(),{startChat:h}=u.query,{startStepTourIfNotCompleted:j,setTourStep:v,tourStep:_,setOpenTour:w}=(0,q.r)(),{errors:E,setErrors:C}=function(){let[e,t]=(0,f.useState)([]),s=(0,ex.f)();return(0,f.useEffect)(()=>{Object.keys(s).forEach(r=>{let a=s[r];!1!==a.permitted||a.notBanner||t([...e,a.error])})},[s]),{errors:e,setErrors:t}}();(0,f.useEffect)(()=>{"true"===h?(a(!0),v("conversation"),j("conversation",0)):a(!1)},[h]);let{handleFileChange:k,selectedFiles:Z,progress:z,uploading:D,errors:A,retryUpload:I,docIds:L}=(0,ee.Z)(),{conversations:M,isLoadingConversations:U,fetchNextConversations:B,isFetchingNextConversations:F}=(0,es.Z5)(),{zoteroDocID:T,setZoteroDocID:G,zoteroAccountConnected:P,selectedZoteroDocument:H,setSelectedZoteroDocument:W,uploadingZoteroDoc:$}=(0,et.Z)(),Q=()=>{a(!0),v("conversation"),j("conversation",0)},eo=e=>{s(!0),"zotero"===e?n("zotero"):n("documents")},ec=(0,ex.f)();async function ep(){(0,el.Z5)({userToken:m,documents:c.documentID.map(e=>({id:e})),setUploadingDocs:o,router:u,conversationPermission:ec.number_of_conversations})}(0,f.useEffect)(()=>{Z.length>0&&(n("documents"),s(!0))},[Z]),(0,f.useEffect)(()=>{null!==T&&(d(e=>{let t=e.documentID.includes(T)?e.documentID:[...e.documentID,T];return{...e,documentID:t}}),n("documents"),G(null))},[T]),(0,f.useEffect)(()=>{L.length>0&&d(e=>{let t=L.filter(t=>!e.documentID.includes(t));return{...e,documentID:[...e.documentID,...t]}})},[L]);let ef=(0,eu.b9)(em.Nx);return(0,p.jsxs)("div",{className:"flex h-dvh w-full items-start overflow-hidden mobile:flex-col",children:[!r&&(0,p.jsx)("aside",{className:"h-full mobile:h-auto mobile:w-full",children:(0,p.jsx)(Y.Z,{})}),(0,p.jsx)("div",{className:(0,ea.Z)("relative flex h-full w-full flex-col gap-16"),children:r?(0,p.jsxs)(f.Fragment,{children:[(0,p.jsx)(V.Z,{isNewChat:r,setNewChat:a}),(0,p.jsx)(X,{documentClick:()=>eo("documents"),zoteroDrawer:()=>eo("zotero"),handleFileUpload:k})]}):(0,p.jsxs)(f.Fragment,{children:[(0,p.jsx)(S,{newChatClick:Q,disabled:U||!ec.number_of_conversations.permitted,conversationListCheck:M&&0===Object.keys(M).length,conversationsData:M}),E.length>0?(0,p.jsx)("div",{className:"px-24 py-8 sm:px-32",children:(0,p.jsx)(ed,{message:E.at(-1),handleClose:()=>{C(E.slice(0,-1))},action:(0,p.jsx)(g.Z,{size:"xs",onClick:()=>{ef(!0)},children:"Upgrade to PRO"})})}):null,(0,p.jsx)(en.Z,{subscriptionFailed:x&&"past_due"===x.subscription_status}),U?(0,p.jsx)(er.Z,{}):(0,p.jsx)(p.Fragment,{children:M&&0!==Object.keys(M).length?(0,p.jsx)(R,{conversationsData:M,fetchNextConversations:B,isFetchingNextConversations:F}):(0,p.jsx)(O,{newChatClick:Q})})]})}),t&&(0,p.jsx)(J.default,{isOpen:t,onClose:()=>{s(!1),"conversation"===_&&w(!1)},handleAction:ep,actionText:e({id:"L3cp3D"}),disable:D||0===c.documentID.length||"zotero"===l,isLoading:D||i,content:(0,p.jsx)(K.default,{activeDrawer:l,uploadedFiles:Z,progress:z,loadingDocsError:A,retryUpload:I,setCurrentID:d,currentIDs:c,uploadingsMultipleDocs:i,handleFileUpload:k,handleDoubleClickAction:function(e){d({documentID:[e]}),(0,el.Z5)({userToken:m,documents:[{id:e}],setUploadingDocs:o,router:u,conversationPermission:ec.number_of_conversations})},zoteroAccountConnected:P,setSelectedZoteroDocument:W,selectedZoteroDocument:H,uploadingZoteroDoc:$})})]})}}},function(e){e.O(0,[1664,2201,4123,5102,9227,9529,5199,5495,6249,2886,3197,3524,8977,6965,1799,3291,2888,9774,179],function(){return e(e.s=75118)}),_N_E=e.O()}]);

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.