PageSourceSearch

https://www.javin.ai/_next/static/chunks/app/(chat)/layout-b48b44c…?dpl=dpl_4E4iEAL1FYNf5wdHYTFQFEXMeePa

js javin.ai collected 2026-10-05 12:35:19 UTC 8,855 bytes, 1 lines download raw bytes

1try{let e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="52aad63c-65b3-4ddd-81a5-9e537f7d7b07",e._sentryDebugIdIdentifier="sentry-dbid-52aad63c-65b3-4ddd-81a5-9e537f7d7b07")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7097],{129:(e,t,s)=>{"use strict";s.d(t,{AppSidebar:()=>T});var a=s(91027),l=s(95877),i=s(15625),r=s(99277),d=s(10469),n=s(41269),c=s(82248),o=s(36192),x=s.n(o),h=s(38291),m=s(71580),u=s(94702),p=s(58966),f=s(56221),j=s(24154);let y=p.bL;p.l9;let b=p.ZL,g=h.forwardRef(({className:e,...t},s)=>(0,a.jsx)(p.hJ,{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",e),...t,ref:s}));g.displayName=p.hJ.displayName;let v=h.forwardRef(({className:e,...t},s)=>(0,a.jsxs)(b,{children:[(0,a.jsx)(g,{}),(0,a.jsx)(p.UC,{ref:s,className:(0,f.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));v.displayName=p.UC.displayName;let N=({className:e,...t})=>(0,a.jsx)("div",{className:(0,f.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...t});N.displayName="AlertDialogHeader";let w=({className:e,...t})=>(0,a.jsx)("div",{className:(0,f.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});w.displayName="AlertDialogFooter";let k=h.forwardRef(({className:e,...t},s)=>(0,a.jsx)(p.hE,{ref:s,className:(0,f.cn)("text-lg font-semibold",e),...t}));k.displayName=p.hE.displayName;let C=h.forwardRef(({className:e,...t},s)=>(0,a.jsx)(p.VY,{ref:s,className:(0,f.cn)("text-sm text-muted-foreground",e),...t}));C.displayName=p.VY.displayName;let D=h.forwardRef(({className:e,...t},s)=>(0,a.jsx)(p.rc,{ref:s,className:(0,f.cn)((0,j.r)(),e),...t}));D.displayName=p.rc.displayName;let A=h.forwardRef(({className:e,...t},s)=>(0,a.jsx)(p.ZD,{ref:s,className:(0,f.cn)((0,j.r)({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));A.displayName=p.ZD.displayName;var M=s(12823),_=s(17204),O=s(67143);let E=(0,O.createServerReference)("406b6fd2e6123bb05a123fead3144bebd059a3b395",O.callServer,void 0,O.findSourceMapURL,"updateChatVisibility");var F=s(60434);let R=(0,h.memo)(({chat:e,isActive:t,onDelete:s,setOpenMobile:l})=>{let{visibilityType:r,setVisibilityType:d}=function({chatId:e,initialVisibility:t}){let{mutate:s,cache:a}=(0,F.iX)(),l=a.get("/api/history")?.data,{data:i,mutate:r}=(0,u.Ay)(`${e}-visibility`,null,{fallbackData:t});return{visibilityType:(0,h.useMemo)(()=>{if(!l)return i;let t=l.find(t=>t.id===e);return t?t.visibility:"private"},[l,e,i]),setVisibilityType:t=>{r(t),s("/api/history",s=>s?s.map(s=>s.id===e?{...s,visibility:t}:s):[],{revalidate:!1}),E({chatId:e,visibility:t})}}}({chatId:e.id,initialVisibility:e.visibility});return(0,a.jsxs)(_.FX,{children:[(0,a.jsx)(_.Uj,{asChild:!0,isActive:t,children:(0,a.jsx)(x(),{href:`/chat/${e.id}`,onClick:()=>l(!1),children:(0,a.jsx)("span",{children:e.title})})}),(0,a.jsxs)(M.rI,{modal:!0,children:[(0,a.jsx)(M.ty,{asChild:!0,children:(0,a.jsxs)(_.e7,{className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground mr-0.5",showOnHover:!t,children:[(0,a.jsx)(i.jN,{}),(0,a.jsx)("span",{className:"sr-only",children:"More"})]})}),(0,a.jsx)(M.SQ,{side:"bottom",align:"end",children:(0,a.jsxs)(M._2,{className:"cursor-pointer text-destructive focus:bg-destructive/15 focus:text-destructive dark:text-red-500",onSelect:()=>s(e.id),children:[(0,a.jsx)(i.uc,{}),(0,a.jsx)("span",{children:"Delete"})]})})]})]})},(e,t)=>e.isActive===t.isActive);function I({user:e}){let t,s,i,o,{setOpenMobile:x}=(0,_.cL)(),{id:p}=(0,l.useParams)(),j=(0,l.usePathname)(),{data:b,isLoading:g,mutate:M}=(0,u.Ay)(e?"/api/history":null,f.GO,{fallbackData:[]});(0,h.useEffect)(()=>{M()},[j,M]);let[O,E]=(0,h.useState)(null),[F,L]=(0,h.useState)(!1),T=(0,l.useRouter)(),S=async()=>{let e=fetch(`/api/chat?id=${O}`,{method:"DELETE"});m.o.promise(e,{loading:"Deleting chat...",success:()=>(M(e=>{if(e)return e.filter(e=>e.id!==p)}),"Chat deleted successfully"),error:"Failed to delete chat"}),L(!1),O===p&&T.push("/")};return e?g?(0,a.jsxs)(_.Cn,{children:[(0,a.jsx)("div",{className:"px-2 py-1 text-xs text-sidebar-foreground
1/50",children:"Today"}),(0,a.jsx)(_.rQ,{children:(0,a.jsx)("div",{className:"flex flex-col",children:[44,32,28,64,52].map(e=>(0,a.jsx)("div",{className:"rounded-md h-8 flex gap-2 px-2 items-center",children:(0,a.jsx)("div",{className:"h-4 rounded-md flex-1 max-w-[--skeleton-width] bg-sidebar-accent-foreground/10",style:{"--skeleton-width":`${e}%`}})},e))})})]}):b?.length===0?(0,a.jsx)(_.Cn,{children:(0,a.jsx)(_.rQ,{children:(0,a.jsx)("div",{className:"px-2 text-zinc-500 w-full flex flex-row justify-center items-center text-sm gap-2",children:"Your conversations will appear here once you start chatting!"})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_.Cn,{children:(0,a.jsx)(_.rQ,{children:(0,a.jsx)(_.wZ,{children:b&&(t=new Date,s=(0,r.k)(t,1),i=(0,d.a)(t,1),o=b.reduce((e,t)=>{let a=new Date(t.createdAt);return(0,n.c)(a)?e.today.push(t):(0,c.P)(a)?e.yesterday.push(t):a>s?e.lastWeek.push(t):a>i?e.lastMonth.push(t):e.older.push(t),e},{today:[],yesterday:[],lastWeek:[],lastMonth:[],older:[]}),(0,a.jsxs)(a.Fragment,{children:[o.today.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50",children:"Today"}),o.today.map(e=>(0,a.jsx)(R,{chat:e,isActive:e.id===p,onDelete:e=>{E(e),L(!0)},setOpenMobile:x},e.id))]}),o.yesterday.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50 mt-6",children:"Yesterday"}),o.yesterday.map(e=>(0,a.jsx)(R,{chat:e,isActive:e.id===p,onDelete:e=>{E(e),L(!0)},setOpenMobile:x},e.id))]}),o.lastWeek.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50 mt-6",children:"Last 7 days"}),o.lastWeek.map(e=>(0,a.jsx)(R,{chat:e,isActive:e.id===p,onDelete:e=>{E(e),L(!0)},setOpenMobile:x},e.id))]}),o.lastMonth.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50 mt-6",children:"Last 30 days"}),o.lastMonth.map(e=>(0,a.jsx)(R,{chat:e,isActive:e.id===p,onDelete:e=>{E(e),L(!0)},setOpenMobile:x},e.id))]}),o.older.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50 mt-6",children:"Older"}),o.older.map(e=>(0,a.jsx)(R,{chat:e,isActive:e.id===p,onDelete:e=>{E(e),L(!0)},setOpenMobile:x},e.id))]})]}))})})}),(0,a.jsx)(y,{open:F,onOpenChange:L,children:(0,a.jsxs)(v,{children:[(0,a.jsxs)(N,{children:[(0,a.jsx)(k,{children:"Are you absolutely sure?"}),(0,a.jsx)(C,{children:"This action cannot be undone. This will permanently delete your chat and remove it from our servers."})]}),(0,a.jsxs)(w,{children:[(0,a.jsx)(A,{children:"Cancel"}),(0,a.jsx)(D,{onClick:S,children:"Continue"})]})]})})]}):(0,a.jsx)(_.Cn,{children:(0,a.jsx)(_.rQ,{children:(0,a.jsx)("div",{className:"px-2 text-zinc-500 w-full flex flex-row justify-center items-center text-sm gap-2",children:"Login to save and revisit previous chats!"})})})}var L=s(62787);function T({user:e}){let t=(0,l.useRouter)(),{setOpenMobile:s}=(0,_.cL)();return(0,a.jsxs)(_.Bx,{className:"group-data-[side=left]:border-r-0 custom-scrollbar",children:[(0,a.jsx)(_.Gh,{children:(0,a.jsx)(_.wZ,{className:"custom-scrollbar",children:(0,a.jsxs)("div",{className:"flex flex-row justify-between items-center",children:[(0,a.jsx)(x(),{href:"/",onClick:()=>{s(!1)},className:"flex flex-row gap-3 items-center",children:(0,a.jsx)("span",{className:"text-lg font-semibold px-2 hover:bg-muted rounded-md cursor-pointer",children:"History"})}),(0,a.jsxs)(L.m_,{children:[(0,a.jsx)(L.k$,{asChild:!0,children:(0,a.jsx)(j.$,{variant:"ghost",type:"button",className:"p-2 h-fit",onClick:()=>{s(!1),t.push("/"),t.refresh()},children:(0,a.jsx)(i.c1,{})})}),(0,a.jsx)(L.ZI,{align:"end",children:"New Chat"})]})]})})}),(0,a.jsx)(_.Yv,{children:(0,a.jsx)(I,{user:e})})]})}},74355:(e,t,s)=>{Promise.resolve().then(s.bind(s,129)),Promise.resolve().then(s.bind(s,17204)),Promise.resolve().then(s.t.bind(s,27485,23))}},e=>{e.O(0,[1580,9094,6238,3204,5125,6035,1818,735,8708,7358],()=>e(e.s=74355)),_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.