PageSourceSearch

https://travelpal.ai/_next/static/chunks/0moi0zy0t60~v.js?dpl=dpl_2XmuBcuLVsN7H7zxMC7MxroQPy8Q

js travelpal.ai collected 2026-10-02 13:16:23 UTC 35,955 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="3e1d07c5-e289-70e3-e2d4-2afdfbf10d65")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,836414,e=>{"use strict";var a=e.i(271645);let t=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z",opacity:"0.2"}),a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z"}))]]);e.s(["default",0,t])},74310,e=>{"use strict";var a=e.i(843476),t=e.i(618566),l=e.i(271645),r=e.i(279615),n=e.i(575108),s=e.i(836414);let i=l.forwardRef((e,a)=>l.createElement(n.default,{ref:a,...e,weights:s.default}));i.displayName="SidebarSimpleIcon";var o=e.i(343794),c=e.i(522016),d=e.i(149666),u=e.i(404112);function h({isOpen:e,onClose:t,onConfirm:l,isLoading:r=!1,chatTitle:n}){return(0,a.jsx)(u.default,{onClose:t,isOpen:e,children:(0,a.jsxs)("div",{className:"flex flex-col gap-y-2 h-full mb-6",children:[(0,a.jsx)("h4",{children:"Delete chat?"}),(0,a.jsx)("p",{children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"font-semibold",children:n})," has messages. Deleting it will permanently remove this conversation."]}):"This chat has messages. Deleting it will permanently remove this conversation."}),(0,a.jsxs)("div",{className:"flex gap-x-2 mt-2",children:[(0,a.jsx)(d.Button,{type:"button",variant:"solid",color:"primary",full:!0,onClick:t,disabled:r,children:"Cancel"}),(0,a.jsx)(d.Button,{type:"button",variant:"solid",color:"danger",full:!0,onClick:l,disabled:r,className:"font-semibold",children:"Delete"})]})]})})}var m=e.i(522042),f=e.i(178815),g=e.i(833845),p=e.i(466497);let x=l.forwardRef((e,a)=>l.createElement(n.default,{ref:a,...e,weights:p.default}));x.displayName="DotsThreeIcon";var y=e.i(895262);let b=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07L60,71A76,76,0,0,0,35.46,84.51a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.9,228c.47,0,.94,0,1.41-.05A20,20,0,0,0,171.87,220a97.47,97.47,0,0,0,9.54-15.46l17.72,19.49a12,12,0,1,0,17.76-16.14Zm98.49,169.88L54.08,100.52C62,95,70.31,92.12,78.91,91.83l84.51,93A62,62,0,0,1,155.37,201.81Zm82.78-95-39,39.11a12,12,0,1,1-17-16.95l36.19-36.3-55-55L130.59,70.5a12,12,0,0,1-17-16.94l35.57-35.69a20,20,0,0,1,28.3,0l60.69,60.68A20,20,0,0,1,238.15,106.83Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M229.66,98.34,172.39,155.8c11.46,22.93-1.72,45.86-10.11,57a8,8,0,0,1-12,.83L42.34,105.76A8,8,0,0,1,43,93.85c29.65-23.92,57.4-10,57.4-10l57.27-57.46a8,8,0,0,1,11.31,0L229.66,87A8,8,0,0,1,229.66,98.34Z",opacity:"0.2"}),l.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L67.37,73.2A69.82,69.82,0,0,0,38,87.63a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33,89.75,89.75,0,0,0,11.58-20.27l21.84,24a8,8,0,1,0,11.84-10.76ZM155.9,208,48,100.08C58.23,91.83,69.2,87.72,80.66,87.81l87.16,95.88C165.59,193.56,160.24,202.23,155.9,208Zm79.42-104-44.64,44.79a8,8,0,1,1-11.33-11.3L224,92.7,
2163.32,32,122.1,73.35a8,8,0,0,1-11.33-11.29L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.32,104Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M235.33,104l-47.62,47.78a4,4,0,0,1-5.79-.14L108,70.27a4,4,0,0,1,.13-5.51L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.33,104ZM53.92,34.62a8,8,0,0,0-12,.21,8.18,8.18,0,0,0,.37,10.75L67.32,73.15C58.26,75.09,48.2,79.37,38,87.63a16,16,0,0,0-1.29,23.78L85,159.71,42.55,202.14a8.17,8.17,0,0,0-.6,11.09,8,8,0,0,0,11.71.43L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33,88.62,88.62,0,0,0,11.64-20.2l21.77,23.95a8,8,0,1,0,11.84-10.76Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L71.27,74.51C61.78,76,50.6,80,39.22,89.18A14,14,0,0,0,38.1,110l49.71,49.71-44.05,44a6,6,0,1,0,8.48,8.48l44.05-44.05L146,217.89a14,14,0,0,0,9.9,4.11q.49,0,1,0a14,14,0,0,0,10.19-5.54,85.51,85.51,0,0,0,12.44-22.84l24,26.45a6,6,0,1,0,8.87-8.08ZM157.49,209.21a2,2,0,0,1-3,.2L46.58,101.51a2,2,0,0,1,.18-3c13.18-10.64,25.84-12.9,34.79-12.7L170,183.11C167.83,193.74,162.11,203.07,157.49,209.21Zm76.42-106.62-44.65,44.78a6,6,0,1,1-8.5-8.47l44.65-44.79a2,2,0,0,0,0-2.84L164.73,30.59a2,2,0,0,0-2.83,0L120.68,71.94a6,6,0,0,1-8.5-8.47l41.23-41.36a14,14,0,0,1,19.81,0l60.69,60.69A14,14,0,0,1,233.91,102.59Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L67.37,73.2A69.82,69.82,0,0,0,38,87.63a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33,89.75,89.75,0,0,0,11.58-20.27l21.84,24a8,8,0,1,0,11.84-10.76ZM155.9,208,48,100.08C58.23,91.83,69.2,87.72,80.66,87.81l87.16,95.88C165.59,193.56,160.24,202.23,155.9,208Zm79.42-104-44.64,44.79a8,8,0,1,1-11.33-11.3L224,92.7,163.32,32,122.1,73.35a8,8,0,0,1-11.33-11.29L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.32,104Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L75.35,76c-9.93.88-22.26,4.54-34.87,14.71a12,12,0,0,0-1,17.84l51.13,51.13L45.17,205.17a4,4,0,0,0,5.66,5.66l45.46-45.47,51.12,51.12A12,12,0,0,0,155.9,220c.28,0,.57,0,.85,0a12,12,0,0,0,8.73-4.74,81.06,81.06,0,0,0,13.19-25.55l26.37,29a4,4,0,1,0,5.92-5.38ZM159.08,210.42a4,4,0,0,1-6,.4L45.17,102.93a4,4,0,0,1,.33-6c14.08-11.36,27.62-13.5,37-13.12l89.69,98.65C170.07,193.92,164,203.92,159.08,210.42Zm73.41-109.25L187.85,146a4,4,0,0,1-5.67-5.64l44.65-44.8a4,4,0,0,0,0-5.66L166.15,29.17a4,4,0,0,0-5.66,0L119.27,70.53a4,4,0,0,1-5.67-5.65l41.23-41.36a12,12,0,0,1,17,0L232.49,84.2A12,12,0,0,1,232.49,101.17Z"}))]]),v=l.forwardRef((e,a)=>l.createElement(n.default,{ref:a,...e,weights:b}));v.displayName="PushPinSlashIcon";let H=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM188,204H68V72H188ZM76,20A12,12,0,0,1,88,8h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,20Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),l.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,56a8,8,0,0,1-8,8h-8V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,56ZM88,32h80a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM82,24a6,6,0,0,1,6-6h80a6,6,0,0,1,0,12H88A6,6,0,0,1,82,24Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM84,24a4,4,0,0,1,4-4h80a4,4,0,0,1,0,8H88A4,4,0,0,1,84,24Z"}))]]),N=l.forwardRef((e,a)=>l.createElement(n.default,{ref:a,...e,weights:H}));N.displayName="TrashSimpleIcon";var w=e.i(55559),Z=e.i(806344),A=e.i(579473),j=e.i(491618);let M=(0,Z.create)()((0,A.persist)((e,a)=>({pinnedIds:[],isPinned:e=>a().pinnedIds.includes(String(e)),togglePin:a=>{let t=String(a);e(e=>({pinnedIds:e.pinnedIds.includes(t)?e.pinnedIds.filter(e=>e!==t):[t,...e.pinnedIds]}))}}),{name:"pinned-chats-store",storage:(0,A.createJSONStorage)(()=>(0,j.persistedStorage)("local"))}));function E({id:e,title:t,handleSwitch:r,handleDeleteChat:n,isActive:s,isDeleting:i=!1}){let c=String(e),d=`chat-item-menu-${c}`,[h,m]=(0,l.useState)(!1),f=M(e=>e.isPinned(c)),g=M(e=>e.togglePin),p=()=>m(!1);return(0,a.jsxs)("div",{className:(0,o.default)("group relative flex w-full items-center gap-x-1 rounded-16 px-1 py-1 transition-all duration-100",s?"text-primary":"text-gray-400 hover:translate-x-1"),children:[(0,a.jsx)("button",{type:"button",onClick:()=>r(c),className:"flex min-w-0 flex-1 items-center gap-x-2 rounded-12 px-1 py-1 text-left",children:(0,a.jsx)("span",{className:(0,o.default)("min-w-0 flex-1 line-clamp-1",s&&"font-medium"),children:t||"Untitled chat"})}),(0,a.jsx)("button",{id:d,type:"button",onClick:e=>{e.stopPropagation(),m(e=>!e)},className:(0,o.default)("rounded-8 p-1 text-gray-400 transition hover:text-gray-500","opacity-100 lg:opacity-0 group-hover:opacity-100",(s||i||h)&&"opacity-100"),"aria-label":"Chat options","aria-haspopup":"menu","aria-expanded":h,disabled:i,"aria-busy":i||void 0,children:(0,a.jsx)(x,{className:"h-5 w-5",weight:"bold"})}),(0,a.jsxs)(u.default,{isOpen:h,onClose:p,variant:w.PopupVariants.MENU,largeVariant:w.PopupLgVariants.MENU,callerId:d,overrideZIndex:!0,className:"!min-w-[10rem]",children:[(0,a.jsx)(u.default.Item,{label:f?"Unpin":"Pin",icon:f?(0,a.jsx)(v,{className:"h-5 w-5"}):(0,a.jsx)(y.PushPinIcon,{className:"h-5 w-5"}),onClick:()=>{p(),g(c)},className:"!font-normal"}),(0,a.jsx)(u.default.Item,{label:"Delete",icon:(0,a.jsx)(N,{className:"h-5 w-5"}),isHighlighted:!0,onClick:()=>{p(),n()},className:"!font-normal"})]})]})}function C({activeChat:e,isChatsLoading:t,isFetchingNextPage:l,hasNextPage:r,listRef:n,endRef:s,isDeletingChat:i,deletingChatId:o,filteredChats:c,handleSwitch:d,handleDeleteChat:u}){return(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-y-2 px-4 pb-4",children:[(0,a.jsx)("div",{className:"text-[0.8125rem] font-normal tracking-wide text-gray-400",children:"Recents"}),(0,a.jsxs)("div",{ref:n,className:"flex min-h-0 flex-col gap-y-1 overflow-y-auto overflow-x-hidden text-[0.875rem] font-normal",children:[t&&(0,a.jsx)("span",{className:"text-sm text-gray-400",children:"Loading chats..."}),!t&&0===c.length&&(0,a.jsx)("span",{className:"text-sm text-gray-400",children:"No chats yet."}),c.map(t=>{let l=e===String(t.id);return(0,a.jsx)(E,{...t,isActive:l,handleSwitch:d,handleDeleteChat:()=>u(t),isDeleting:i&&o===String(t.id)},t.id)}),(0,a.jsx)("span",{ref:s}),r&&l&&(0,a.jsx)("span",{className:"text-sm text-gray-400",children:"Loading more…"})]})]})}var V=e.i(211543),I=e.i(18436),L=e.i(839865);function S({isExpanded:e,userLabel:t,userInitials:r,handleProfileClick:n,direction:s="right"}){let i="right"===s,u=(0,L.useUserStore)(e=>e.user),h=(0,l.useMemo)(()=>
2[(u?.firstName??"").trim(),(u?.lastName??"").trim()].filter(Boolean).join(" ")||u?.username||t,[u,t]),p=u?.email??"";return e?(0,a.jsx)("div",{className:"mt-auto border-t border-gray-200 px-3 pb-3 pt-2",children:(0,a.jsxs)("button",{type:"button",onClick:n,className:"flex w-full items-center gap-x-3 rounded-12 px-2 py-2 text-left transition-colors hover:bg-gray-100 active:bg-gray-200/60","aria-label":"Account",children:[(0,a.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-semibold leading-none text-white",children:r??(0,a.jsx)(I.UserIcon,{size:18})}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[(0,a.jsx)("span",{className:"truncate text-[0.9375rem] font-medium text-gray-500",children:h}),p?(0,a.jsx)("span",{className:"mt-0.5 truncate text-[0.8125rem] font-normal text-gray-400",children:p}):null]})]})}):(0,a.jsxs)("div",{className:"mt-auto mb-4 flex flex-col items-center justify-center gap-y-2 px-0",children:[(0,a.jsx)("div",{className:"mb-3 flex h-28 items-center justify-center",children:(0,a.jsx)(m.default,{iconName:f.MiscIcons.LOGO_MOBILE,className:"h-4 w-28 -rotate-90 fill-gray-500"})}),(0,a.jsx)(d.Button,{onClick:n,variant:"ghost",color:"gray",size:"md",leftIcon:r?(0,a.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary text-[0.6875rem] font-medium leading-none text-white",children:r}):(0,a.jsx)(I.UserIcon,{size:22}),label:{value:t,visible:!0,direction:i?"left":"right"},className:"rounded-full","aria-label":"Account"}),(0,a.jsxs)("div",{className:"group relative z-[60]",children:[(0,a.jsx)("button",{type:"button","aria-label":"Open quick links",className:"flex h-7 w-7 items-center justify-center rounded-full text-gray-300 hover:text-gray-400 focus:outline-none",children:(0,a.jsx)(V.InfoIcon,{size:18})}),(0,a.jsx)("div",{className:(0,o.default)("invisible absolute top-1/2 z-[60] -translate-y-1/2 opacity-0 transition-opacity duration-150",i?"right-full mr-2":"left-full ml-2","pointer-events-none group-hover:pointer-events-auto group-hover:visible group-hover:opacity-100","group-focus-within:pointer-events-auto group-focus-within:visible group-focus-within:opacity-100"),children:(0,a.jsxs)("div",{className:"flex flex-col gap-y-1.5 whitespace-nowrap rounded-2xl bg-black px-4 py-3 text-[0.8125rem] text-gray-200 shadow-xl shadow-black/30",children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)(c.default,{href:g.routes.destinations.root,className:"hover:text-gray-0",children:"Get Inspired"}),(0,a.jsx)("span",{className:"h-1 w-1 rounded-full bg-gray-300"}),(0,a.jsx)(c.default,{href:g.routes.blog.index,className:"hover:text-gray-0",children:"Blog"}),(0,a.jsx)("span",{className:"h-1 w-1 rounded-full bg-gray-300"}),(0,a.jsx)(c.default,{href:g.routes.footer.terms,className:"hover:text-gray-0",children:"Terms and Conditions"}),(0,a.jsx)("span",{className:"h-1 w-1 rounded-full bg-gray-300"}),(0,a.jsx)(c.default,{href:g.routes.footer.privacy,className:"hover:text-gray-0",children:"Privacy Policy"})]}),(0,a.jsxs)("span",{className:"text-gray-300",children:["© ",new Date().getFullYear()," TravelPal, Inc."]})]})})]})]})}let P=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60ZM164,96h32a12,12,0,0,1,0,24H164a12,12,0,0,1,0-24Zm44,52a12,12,0,0,1-12,12H164a12,12,0,0,1,0-24h32A12,12,0,0,1,208,148Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,56V200H160a32,32,0,0,0-32,32V88a32,32,0,0,1,32-32Z",opacity:"0.2"}),l.createElement("path",{d:"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64ZM160,88h40a8,8,0,0,1,0,16H160a8,8,0,0,1,0-16Zm48,40a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,128Zm0,32a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,160Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,48H168a32,32,0,0,0-32,32v87.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V80A32,32,0,0,0,88,48H24a8,8,0,0,0-8,8V2
200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,23.94,7.9,7.9,0,0,0,5.12,7.55A8,8,0,0,0,136,232a24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM208,168H168.27a8.17,8.17,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h39.73a8.17,8.17,0,0,1,8.25,7.47A8,8,0,0,1,208,168Zm0-32H168.27a8.17,8.17,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h39.73a8.17,8.17,0,0,1,8.25,7.47A8,8,0,0,1,208,136Zm0-32H168.27A8.17,8.17,0,0,1,160,96.53,8,8,0,0,1,168,88h39.73A8.17,8.17,0,0,1,216,95.47,8,8,0,0,1,208,104Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66ZM160,90h40a6,6,0,0,1,0,12H160a6,6,0,0,1,0-12Zm46,38a6,6,0,0,1-6,6H160a6,6,0,0,1,0-12h40A6,6,0,0,1,206,128Zm0,32a6,6,0,0,1-6,6H160a6,6,0,0,1,0-12h40A6,6,0,0,1,206,160Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64ZM160,88h40a8,8,0,0,1,0,16H160a8,8,0,0,1,0-16Zm48,40a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,128Zm0,32a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,160Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.94,35.94,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68ZM160,92h40a4,4,0,0,1,0,8H160a4,4,0,0,1,0-8Zm44,36a4,4,0,0,1-4,4H160a4,4,0,0,1,0-8h40A4,4,0,0,1,204,128Zm0,32a4,4,0,0,1-4,4H160a4,4,0,0,1,0-8h40A4,4,0,0,1,204,160Z"}))]]),F=l.forwardRef((e,a)=>l.createElement(n.default,{ref:a,...e,weights:P}));F.displayName="BookOpenTextIcon";var k=e.i(777541),R=e.i(789365);let O=l.forwardRef((e,a)=>l.createElement(n.default,{ref:a,...e,weights:R.default}));O.displayName="HouseSimpleIcon";var _=e.i(25048);let z=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M144,180a16,16,0,1,1-16-16A16,16,0,0,1,144,180Zm92-52A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128ZM128,64c-24.26,0-44,17.94-44,40v4a12,12,0,0,0,24,0v-4c0-8.82,9-16,20-16s20,7.18,20,16-9,16-20,16a12,12,0,0,0-12,12v8a12,12,0,0,0,23.73,2.56C158.31,137.88,172,122.37,172,104,172,81.94,152.26,64,128,64Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,168a12,12,0,1,1,12-12A12,12,0,0,1,128,192Zm8-48.72V144a8,8,0,0,1-16,0v-8a8,8,0,0,1,8-8c13.23,0,24-9,24-20s-10.77-20-24-20-24,9-24,20v4a8,8,0,0,1-16,0v-4c0-19.85,17.94-36,40-36s40,16.15,40,36C168,125.38,154.24,139.93,136,143.28Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M138,180a10,10,0,1,1-10-10A10,10,0,0,1,138,180ZM128,74c-21,0-38,15.25-38,34v4a6,6,0,0,0,12,0v-4c0-12.13,11.66-22,26-22s26,9.87,26,22-11.66,22-26,22a6,6,0,0,0-6,6v8a6,6,0,0,0,12,0v-2.42c18.11-2.58,32-16.66,32-33.58C166,89.25,149,74,128,74Zm102,54A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M136,180a8,8,0,1,1-8-8A8,8,0,0,1,136,180ZM128,76c-19.85,0-36,14.36-36,32v4a4,4,0,0,0,8,0v-4c0-13.23,12.56-24,28-24s28,10.77,28,24-12.56,24-28,24a4,4,0,0,0-4,4v8a4,4,0,0,0,8,0v-4.2c18-1.77,32-15.36,32-31.8C164,90.36,147.85,76,128,76Zm100,52A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),D=l.forwardRef((e,a)=>l.createElement(n.default,{ref:a,...e,weights:z}));D.displayName="QuestionIcon";var T=e.i(247748),B=e.i(228231),U=e.i(6705);function G({isExpanded:e,showCollapsedTooltip:t=!1,label:l,className:r,leftIcon:n,...s}){return(0,a.jsx)(d.Button,{...s,leftIcon:n,leftIconGap:e&&!!l?.value,label:t?{value:l?.tooltip??l?.value,direction:l?.direction}:void 0,className:r,children:e?l?.value??null:null})}let q=[{label:"Get Inspired",href:g.routes.destinations.root,icon:(0,a.jsx)(T.SparkleIcon,{size:16})},{label:"Blog",href:g.routes.blog.index,icon:(0,a.jsx)(F,{size:16})},{label:"How It Works",href:`${g.routes.home}#how-it-works`,icon:(0,a.jsx)(D,{size:16})},...U.TOKEN_BILLING_ENABLED?[{label:"Pricing",href:`${g.routes.home}#pricing`,icon:(0,a.jsx)(k.CurrencyDollarIcon,{size:16})}]:[]];function K({isExpanded:e,showSearchShortcut:r,searchInputRef:n,searchValue:s,setSearchValue:i,handleOpenSearch:u,createChat:h,isCreatingChat:p,direction:x="right",showHomeLinks:y=!1}){let b=(0,t.useRouter)(),v=(0,l.useRef)(null),H="right"===x?"left":"right";return(0,B.useCloseKeyboardOnScroll)({ignoreRefs:[v]}),(0,a.jsxs)("div",{ref:v,className:(0,o.default)("flex flex-col items-center gap-y-2 py-4",{"px-4":e}),children:[(0,a.jsx)(d.Button,{variant:"ghost",color:"gray",size:e?"tiny":"icon",full:e,className:(0,o.default)("!justify-start",{"!bg-transparent !pl-0 hover:text-primary !text-[0.875rem] !font-normal":e}),leftIcon:(0,a.jsx)(O,{className:(0,o.default)("h-5 w-5",{"translate-x-1":!e})}),label:{value:"Return Home",visible:!e,direction:H},"aria-label":"Return Home",onClick:()=>b.push(g.routes.home),disabled:p,"aria-busy":p,children:e&&"Home"}),(0,a.jsx)(d.Button,{variant:"ghost",color:"gray",size:e?"tiny":"icon",full:e,className:(0,o.default)("!justify-start",{"!bg-transparent !pl-0 hover:text-primary !text-[0.875rem] !font-normal":e}),leftIcon:(0,a.jsx)(_.NotePencilIcon,{className:(0,o.default)("h-5 w-5",{"translate-x-1":!e})}),label:{value:"New chat",visible:!e,direction:H},"aria-label":"New chat",onClick:()=>h(),disabled:p,"aria-busy":p,children:e&&"New Chat"}),y&&e&&(0,a.jsx)("div",{className:"flex flex-col w-full gap-y-0.5 border-t border-gray-100 pt-2 mt-1 lg:hidden",children:q.map(({label:e,href:t,icon:l})=>(0,a.jsxs)(c.default,{href:t,className:"flex items-center gap-x-2 px-1 py-1.5 text-[0.875rem] text-gray-600 hover:text-primary transition-colors",children:[l,(0,a.jsx)("span",{children:e})]},t))}),r?(0,a.jsx)(G,{variant:"ghost",color:"gray",size:"icon",isExpanded:!1,showCollapsedTooltip:!0,leftIcon:(0,a.jsx)(m.default,{iconName:f.UIIcons.MAGNIFYING_GLASS,className:"h-5 w-5"}),label:{direction:H,tooltip:"Search chats"},"aria-label":"Search chats",onClick:u}):(0,a.jsxs)("div",{className:"relative w-full",children:[(0,a.jsx)(m.default,{iconName:f.UIIcons.MAGNIFYING_GLASS,className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),(0,a.jsx)("input",{ref:n,value:s,onChange:e=>i(e.target.value),placeholder:"Search...",className:(0,o.default)("text-body-lg text-gray-500 placeholder:text-sm placeholder:text-gray-400","pl-9 pr-9 h-9 w-full rounded-full","border border-transparent bg-gray-100","outline-none transition-colors focus:border-gray-300 focus:bg-gray-0"),"aria-label":"Search chats"}),s?(0,a.jsx)("button",{type:"button",onClick:()=>i(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 roun
2ded-full p-1 text-gray-400 hover:text-gray-600","aria-label":"Clear search",children:(0,a.jsx)(m.default,{iconName:f.UIIcons.CROSS,className:"h-4 w-4"})}):null]})]})}function $({railRef:e,searchInputRef:t,activeChat:l,userLabel:r,userInitials:n,headerHeight:s,isRailExpanded:u,isMobileOpen:p,searchValue:x,setSearchValue:y,handleBrandClick:b,handleOpenSearch:v,handleProfileClick:H,handleSwitch:N,handleDeleteChat:w,createChat:Z,setMobileSideRailOpen:A,isCreatingChat:j,isChatsLoading:M,isFetchingNextPage:E,hasNextPage:V,listRef:I,endRef:L,isDeletingChat:P,deletingChatId:F,filteredChats:k,closeDeleteConfirm:R,confirmDeleteChat:O,deleteConfirmChat:_,direction:z="right",compactTop:D=!1,showHomeLinks:T=!1}){let B="right"===z,U=!u;return(0,a.jsxs)(a.Fragment,{children:[p&&(0,a.jsx)("div",{className:"fixed inset-0 z-[104] bg-black/20 lg:hidden",onClick:()=>A(!1),"aria-hidden":!0}),(0,a.jsx)("aside",{ref:e,className:(0,o.default)("flex fixed z-[105] bg-white inset-y-0 h-full","transition-[transform,width,box-shadow] duration-200 ease-out",B?"right-0 border-l":"left-0 border-r","border-gray-200 overflow-visible",p?(0,o.default)("w-72",{"shadow-[-12px_0_28px_rgba(15,23,42,0.16)]":B,"shadow-[12px_0_28px_rgba(15,23,42,0.16)]":!B}):(0,o.default)(B?"translate-x-full":"-translate-x-full","lg:translate-x-0"),u?(0,o.default)("lg:w-64",{"lg:rounded-l-16 lg:shadow-[-12px_0_28px_rgba(15,23,42,0.16)]":B,"lg:rounded-r-16 lg:shadow-[12px_0_28px_rgba(15,23,42,0.16)]":!B}):"lg:w-12"),children:(0,a.jsxs)("div",{className:"flex h-full w-full flex-col",children:[(0,a.jsx)("div",{className:(0,o.default)("flex items-center",u?D?"justify-end px-2 py-2":"justify-between px-3":D?"justify-center py-2":"justify-center"),style:D?void 0:{height:Math.max(s-1,0)},children:u?(0,a.jsxs)(a.Fragment,{children:[!D&&(0,a.jsx)(c.default,{href:g.routes.home,"aria-label":"Go to homepage",className:"group inline-flex items-center",children:(0,a.jsx)(m.default,{iconName:f.MiscIcons.LOGO_MOBILE,className:"h-4 w-[7rem] fill-gray-500 group-hover:fill-primary"})}),(0,a.jsx)(d.Button,{onClick:b,"aria-label":"Close sidebar",variant:"ghost",color:"gray",size:"icon",leftIcon:(0,a.jsx)(i,{size:20}),className:"!p-1 text-gray-500 hover:text-primary"})]}):(0,a.jsx)(d.Button,{onClick:b,"aria-label":"Open sidebar",variant:"ghost",color:"gray",size:"tiny",leftIcon:(0,a.jsx)(i,{size:20}),label:{value:"Open sidebar",visible:!0,direction:B?"left":"right"},className:"group rounded-full text-gray-500 justify-center !p-0 !w-8 !h-8 shrink-0"})}),(0,a.jsx)(K,{isExpanded:u,showSearchShortcut:U,searchInputRef:t,searchValue:x,setSearchValue:y,handleOpenSearch:v,createChat:Z,isCreatingChat:j,direction:z,showHomeLinks:T}),u&&(0,a.jsx)(C,{activeChat:l,isChatsLoading:M,isFetchingNextPage:E,hasNextPage:V,listRef:I,endRef:L,isDeletingChat:P,deletingChatId:F,filteredChats:k,handleSwitch:N,handleDeleteChat:w}),(0,a.jsx)(S,{isExpanded:u,userLabel:r,userInitials:n,handleProfileClick:H,direction:z})]})}),(0,a.jsx)(h,{isOpen:!!_,onClose:R,onConfirm:O,isLoading:P,chatTitle:_?.title})]})}var Q=e.i(11347),Y=e.i(263002),J=e.i(689504),W=e.i(850274),X=e.i(51952),ee=e.i(482999),ea=e.i(621482),et=e.i(303071),el=e.i(954616),er=e.i(912598),en=e.i(975006);let es=new(e.i(994336)).default("chat.delete");var ei=e.i(997845);e.s(["default",0,function({direction:e="right",compactTop:n=!1,showHomeLinks:s=!1}){let i=(0,t.usePathname)(),{windowType:o}=(0,r.default)(),c=(0,Q.useMobileSideRailStore)(e=>e.isOpen),d=(0,Q.useMobileSideRailStore)(e=>e.setOpen),{railRef:u,searchInputRef:h,activeChat:m,userLabel:f,userInitials:p,headerHeight:x,isExpanded:y,searchValue:b,setSearchValue:v,handleBrandClick:H,handleOpenSearch:N,handleProfileClick:w,handleSwitch:Z,handleDeleteChat:A,createChat:j,isCreatingChat:M,isChatsLoading:E,isFetchingNextPage:C,hasNextPage:V,listRef:I,endRef:S,isDeletingChat:P,deletingChatId:F,deleteConfirmChat:k,filteredChats:R,closeDeleteConfirm:O,confirmDeleteChat:_}=function(){let e=(0,t.useRouter)(),a=(0,L.useUserStore)(e=>e.user),r=(0,Q.useMobileSideRailStore)(e=>e.isOpen),[n,s]=(0,l.useState)(!1),[i,o]=(0,l.useState)(50),c=(0,l.useRef)(null),d=n||r,u="collapsed"==(d?"expanded":"collapsed"),h=(0,l.useMemo)(()=>
2{if(!a)return"Sign in";let e=(a.firstName??"").trim(),t=(a.lastName??"").trim(),l=(()=>{if(!t)return"";let e=t.slice(0,Math.min(2,t.length));return`${e}.`})();return e&&l?`${e} ${l}`:e||l||a.username||a.email||"Sign in"},[a]),m=(0,l.useMemo)(()=>a?(0,J.getUserInitials)({firstName:a.firstName,lastName:a.lastName,fallback:a.username??a.email}):null,[a]);(0,l.useEffect)(()=>{let e=()=>{let e=document.querySelector("header");e&&o(Math.round(e.getBoundingClientRect().height)||50)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,l.useEffect)(()=>{if(!d)return;let e=e=>{let a=e.target;!a||c.current?.contains(a)||s(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[d]);let f=(0,X.useLayoutStore)(e=>e.reset),p=(0,ee.useChatPageStore)(e=>e.reset),x=(0,W.useItineraryStore)(e=>e.clearStore),y=(0,W.useItineraryStore)(e=>e.setItineraryDays),b=(0,l.useCallback)(()=>{f(),p(),x(),y(()=>[])},[f,p,x,y]),{createChat:v,loading:H}=(0,Y.default)({onSuccess:a=>{a?.id&&(b(),e.push(g.routes.chat(a.id)))}}),N=(0,l.useCallback)(()=>{d?s(!1):s(!0)},[d]),w=(0,l.useCallback)(()=>{s(!0)},[]),Z=(0,l.useCallback)(()=>{a?e.push(g.routes.profile):e.push(g.routes.auth.login(""))},[e,a]),{activeChat:A,searchInputRef:j,searchValue:M,setSearchValue:E,isChatsLoading:C,isFetchingNextPage:V,hasNextPage:I,listRef:S,endRef:P,isDeletingChat:F,deletingChatId:k,deleteConfirmChat:R,filteredChats:O,handleSwitch:_,handleDeleteChat:z,closeDeleteConfirm:D,confirmDeleteChat:T,handleOpenSearch:B}=function({isExpanded:e,user:a,onExpand:r,resetBeforeNavigate:n}){let s=(0,t.useRouter)(),{chat:i}=(0,et.useApi)(),o=(0,ei.useAiChatStore)(e=>e.chatUUID),[c,d]=(0,l.useState)(null),{deleteChatAsync:u,isLoading:h}=function(e){let{chat:a}=(0,et.useApi)(),t=(0,er.useQueryClient)(),l=(0,el.useMutation)({mutationFn:async e=>{let t=Number(e);if(!Number.isFinite(t)||t<=0)throw Error("Chat ID is required");return await a.deleteChat(t),t},onSuccess:a=>{es.info("Chat deleted successfully",a),t.invalidateQueries({queryKey:["chats"]}),t.invalidateQueries({queryKey:["my-chats"]}),e?.disableToast||(0,en.default)({message:"Chat deleted successfully",type:"success"}),e?.onSuccess?.(a)},onError:a=>{es.error("Failed to delete chat",a),e?.disableToast||(0,en.default)({message:"Failed to delete chat. Please try again.",type:"error"}),e?.onError?.(a)}});return{deleteChat:l.mutate,deleteChatAsync:l.mutateAsync,isLoading:l.isPending,error:l.error}}({disableToast:!1}),[m,f]=(0,l.useState)(""),[p,x]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null),v=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!e||!p)return;let a=window.setTimeout(()=>{v.current?.focus(),v.current?.select(),x(!1)},0);return()=>window.clearTimeout(a)},[e,p]);let H=(0,l.useCallback)(()=>{r(),x(!0)},[r]),N=(0,l.useRef)(null),w=(0,l.useRef)(null),Z=U.CHAT_LIST_PAGE_SIZE,A=(0,ea.useInfiniteQuery)({queryKey:["chats","rail",a?.id??"anon",Z,o],queryFn:({pageParam:e=1})=>i.getChatList({page_size:Z,page:e,require_user_msg:!0,include_chat_id:o?Number(o):void 0}),getNextPageParam:(e,a,t)=>{if(e?.next){let a=new URL(e.next).searchParams.get("page");return a?Number(a):Number(t)+1}},initialPageParam:1,placeholderData:e=>e,enabled:e}),j=(0,l.useMemo)(()=>A.data?A.data.pages.flatMap(e=>e.results??[]):[],[A.data]),M=A.isLoading&&!A.data;(0,l.useEffect)(()=>{if(!e||!w.current)return;let a=w.current,t=new IntersectionObserver(e=>{e[0].isIntersecting&&A.hasNextPage&&!A.isFetchingNextPage&&!M&&A.fetchNextPage()},{root:N.current??null,rootMargin:"200px",threshold:0});return t.observe(a),()=>t.disconnect()},[e,A.hasNextPage,A.isFetchingNextPage,A.fetchNextPage,M]);let E=(0,l.useCallback)(e=>{n(),s.push(g.routes.chat(e))},[n,s]),C=(0,l.useCallback)(async e=>{if(e&&!h)try{d(e),await u(e),o===e&&(n(),s.push(g.routes.home))}finally{d(a=>a===e?null:a)}},[o,u,h,n,s]),V=(0,l.useCallback)(e=>{if(!(Object.prototype.hasOwnProperty.call(e??{},"lastMessageId")||Object.prototype.hasOwnProperty.call(e??{},"last_message_id")||Object.prototype.hasOwnProperty.call(e??{},"latestMessage")||Object.prototype.hasOwnProperty.call(e??{},"latest_message")))return!0;let a=e?.lastMessageId??e?.last_message_id??null,t=e?.latestMessage??e?.latest_message??"";return!!a||"string"==typeof t&&t.trim().length>0},[]),I=(0,l.useCallback)(async e=>{let a=String(e?.id??"");if(a){if(V(e))return void b({id:a,title:e?.title??null});await C(a)}},[V,C]),L=(0,l.useCallback)(()=>b(null),[]),S=(0,l.useCallback)(async()=>
2{if(!y?.id)return;let e=y.id;b(null),await C(e)},[y,C]),P=(0,l.useMemo)(()=>{let e=m.trim().toLowerCase();return e?j.filter(a=>(a.title||"").toLowerCase().includes(e)):j},[j,m]);return{activeChat:o,searchInputRef:v,searchValue:m,setSearchValue:f,isChatsLoading:M,isFetchingNextPage:A.isFetchingNextPage,hasNextPage:A.hasNextPage,listRef:N,endRef:w,isDeletingChat:h,deletingChatId:c,deleteConfirmChat:y,filteredChats:P,handleSwitch:E,handleDeleteChat:I,closeDeleteConfirm:L,confirmDeleteChat:S,handleOpenSearch:H}}({isExpanded:d,user:a,onExpand:w,resetBeforeNavigate:b});return{railRef:c,searchInputRef:j,activeChat:A,user:a,userLabel:h,userInitials:m,headerHeight:i,isExpanded:d,isCollapsed:u,showSearchShortcut:u,showChatsList:d,searchValue:M,setSearchValue:E,handleBrandClick:N,handleOpenSearch:B,handleProfileClick:Z,handleSwitch:_,handleDeleteChat:z,createChat:v,isCreatingChat:H,isChatsLoading:C,isFetchingNextPage:V,hasNextPage:I,listRef:S,endRef:P,isDeletingChat:F,deletingChatId:k,deleteConfirmChat:R,filteredChats:O,closeDeleteConfirm:D,confirmDeleteChat:T}}(),z="lg"===o,D=!z&&c,T=y||D;return(0,l.useEffect)(()=>{d(!1)},[i,d]),(0,l.useEffect)(()=>{z&&c&&d(!1)},[z,c,d]),(0,l.useEffect)(()=>{if(!D)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[D]),(0,a.jsx)($,{railRef:u,searchInputRef:h,activeChat:m,userLabel:f,userInitials:p,headerHeight:x,isRailExpanded:T,isMobileOpen:D,searchValue:b,setSearchValue:v,handleBrandClick:H,handleOpenSearch:N,handleProfileClick:w,handleSwitch:Z,handleDeleteChat:A,createChat:j,setMobileSideRailOpen:d,isCreatingChat:M,isChatsLoading:E,isFetchingNextPage:C,hasNextPage:V,listRef:I,endRef:S,isDeletingChat:P,deletingChatId:F,filteredChats:R,closeDeleteConfirm:O,confirmDeleteChat:_,deleteConfirmChat:k,direction:e,compactTop:n,showHomeLinks:s})}],74310)}]);
3
4//# debugId=3e1d07c5-e289-70e3-e2d4-2afdfbf10d65

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.