(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"warnOnce",{enumerable:!0,get:function(){return o}});let o=e=>{}},60755,e=>{e.v("/_next/static/media/text-logo.356bbadc.webp")},73636,e=>{e.v("/_next/static/media/text-logo.bdf18a5e.webp")},87855,e=>{e.v("/_next/static/media/google-sheets.ed822920.png")},35801,e=>{e.v("/_next/static/media/carable-icon.99ff9239.webp")},4618,e=>{e.v("/_next/static/media/google-sheets.ed822920.png")},95508,e=>{e.v("/_next/static/media/carable-icon.78cfe2c4.webp")},52683,e=>{"use strict";var t=e.i(43476),i=e.i(19083),o=e.i(35503),n=e.i(91104),r=e.i(28294),s=e.i(14049),l=e.i(97773),a=e.i(71645);e.i(81174);var c=e.i(87074),d=e.i(19684);e.i(83922);var u=e.i(41857),p=e.i(6548),m=e.i(91222),h=e.i(93073),x=e.i(38648),g=e.i(83773),f=e.i(25227);function w({messages:e,isTyping:i,onSendMessage:o,onQuickMessage:n}){let{t:r}=(0,g.useLanguage)(),[s,l]=(0,a.useState)(!1),w=(0,a.useMemo)(()=>(0,f.mapCapabilities)(r.capabilities),[r]);return(0,t.jsx)("div",{className:"hidden lg:block relative z-10 flex-1 min-h-0 p-4 h-full",children:(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,3fr)] gap-6 h-full",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 h-full min-h-0",children:[(0,t.jsx)(p.AgentProfile,{}),(0,t.jsx)(m.QuickActionsPanel,{onSendMessage:n,items:w}),(0,t.jsxs)("div",{className:"flex gap-3 mt-auto shrink-0",children:[(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(x.ExamplesButton,{onClick:()=>l(!s),isOpen:s})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(h.ContactButton,{})})]})]}),(0,t.jsxs)("div",{"data-chat-container":!0,className:"bg-black/40 backdrop-blur-xl border border-white/5 ring-1 ring-white/5 rounded-2xl overflow-hidden flex flex-col shadow-2xl h-full relative",children:[(0,t.jsx)(u.ChatHeader,{}),(0,t.jsx)(c.MessageList,{messages:e,isTyping:i}),(0,t.jsx)("div",{className:"p-3 sm:p-4 bg-transparent shrink-0 relative",children:(0,t.jsx)(d.ChatInput,{onSend:o,tourId:"tour-chat-input-desktop"})})]})]})})}var v=e.i(91038),b=e.i(24048),j=e.i(24480);function k({messages:e,isTyping:i,onSendMessage:o,onQuickMessage:n}){let[r,s]=(0,a.useState)(!1),{t:l}=(0,g.useLanguage)();return(0,t.jsxs)("div",{className:"lg:hidden flex flex-col flex-1 h-full overflow-hidden relative",children:[(0,t.jsx)("header",{className:"flex-none h-16 z-50 bg-black/40 backdrop-blur-xl border-b border-white/5",style:{paddingTop:"env(safe-area-inset-top)"},children:(0,t.jsx)(u.ChatHeader,{})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain touch-pan-y scrollable-content relative pb-32",children:(0,t.jsx)(c.MessageList,{messages:e,isTyping:i})}),(0,t.jsx)("footer",{className:"flex-none z-50 backdrop-blur-xl pb-[env(safe-area-inset-bottom)]",style:{transform:"translateY(-12px)"},children:(0,t.jsxs)("div",{className:"px-2 pt-0 pb-0 relative",children:[(0,t.jsx)(d.ChatInput,{onSend:o,onToggleMenu:()=>s(e=>!e),tourId:"tour-chat-input-mobile"}),(0,t.jsx)(v.MobileQuickActions,{isOpen:r,onClose:()=>s(!1),onSelect:n})]})}),(0,t.jsx)(b.MobileContactButton,{}),(0,t.jsx)(j.MobileExamplesButton,{})]})}var y=e.i(9130);let _={welcome:{title:"Добро пожаловать в Ketly",description:"Это демо-интерфейс умного бизнес-ассистента. Здесь вы можете протестировать работу чат-бота, задать любые вопросы и понять, как это поможет вашему бизнесу."},input:{title:"Живое общение",description:"Кэтли настроена понимать человеческое общение. Пишите ей как живому человеку — она всё поймёт."},quickActions:{title:"Быстрые команды",description:"Не знаете, с чего начать? Используйте это меню, чтобы задать популярные вопросы о возможностях, условиях и преимуществах одним кликом.",descriptionMobile:"Нажмите на эту кнопку, чтобы открыть меню быстрых команд."},showcase:{title:"Примеры внедрений",description:"Хотите протестировать реальные примеры? Нажмите сюда, чтобы перейти к готовым демо-кейсам. В них вы можете увидеть, как бот управляет реальной базой данных."},contact:{title:"Связаться с нами",description:"Готовы к внедрению или остались вопросы? Скажите об этом Кэтли, либо нажмите здесь, чтобы связаться с нами напрямую."}},S={next:"Далее →",prev:"← Назад",done:"Готово"};function T({onComplete:e}){let{isLanguageReady:t,isLanguageConfirmed:i}=(0,g.useLanguage)(),o=(0,a.useRef)(null),[n,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=()=>{r(window.innerWidth<1024)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,a.useEffect)(()=>{if(!t||!i)return;if(localStorage.getItem("tour_seen_main_page")){window.dispatchEvent(new Event("tour-completed-tour_seen_main_page")),e();return}let n=(0,y.driver)({showProgress:!0,allowClose:!0,overlayOpacity:.75,nextBtnText:S.next,prevBtnText:S.prev,doneBtnText:S.done,steps:[{popover:{title:_.welcome.title,description:_.welcome.description,side:"bottom",align:"center"}},{element:()=>{let e=window.innerWidth<1024?"#tour-chat-input-mobile":"#tour-chat-input-desktop",t=document.querySelector(e);if(!t)throw Error(`Tour chat input element not found: ${e}`);return t},popover:{title:_.input.title,description:_.input.description,side:"top",align:"center",popoverClass:"driver-popover-arrow-right"}},{element:()=>{if(window.innerWidth<1024){let e=document.querySelector("#tour-mobile-quick-actions");if(!e)throw Error("Tour mobile quick actions element not found");return e}let e=document.querySelector("#tour-desktop-quick-actions");if(!e)throw Error("Tour desktop quick actions element not found");return e},popover:{title:_.quickActions.title,description:window.innerWidth<1024&&_.quickActions.descriptionMobile||_.quickActions.description,side:window.innerWidth<1024?"top":"left",align:"start"}},{element:()=>{if(window.innerWidth<1024){let e=document.querySelector("#tour-showcase-mobile");if(!e)throw Error("Tour showcase mobile element not found");return e}let e=document.querySelector("#tour-showcase-desktop");if(!e)throw Error("Tour showcase desktop element not found");return e},popover:{title:_.showcase.title,description:_.showcase.description,side:window.innerWidth<1024?"top":"right",align:"end"}},{element:()=>{let e=window.innerWidth<1024?"#tour-contact-mobile":"#tour-contact-desktop",t=document.querySelector(e);if(!t)throw Error(`Tour contact element not found: ${e}`);return t},popover:{title:_.contact.title,description:_.contact.description,side:window.innerWidth<1024?"top":"right",align:"end"}}],onDestroyed:()=>{localStorage.setItem("tour_seen_main_page","true"),window.dispatchEvent(new Event("tour-completed-tour_seen_main_page")),e()}});o.current=n;let r=setTimeout(()=>{n.drive()},500);return()=>{clearTimeout(r),o.current&&o.current.destroy()}},[n,e,t,i]),null}function M(){let{messages:e,isTyping:n,handleSendMessage:a}=(0,i.useChat)({tourStorageKey:"tour_seen_main_page"}),{t:c}=(0,g.useLanguage)(),d=(0,o.useQuickMessage)(a);return(0,t.jsxs)("main",{className:"fixed inset-0 flex flex-col bg-[#050505] text-white h-[100dvh]",children:[(0,t.jsx)(r.AmbientMeshGradients,{}),(0,t.jsx)(w,{messages:e,isTyping:n,onSendMessage:a,onQuickMessage:d}),(0,t.jsx)(k,{messages:e,isTyping:n,onSendMessage:a,onQuickMessage:d}),(0,t.jsx)(s.StopDemoButton,{onStop:()=>a(c.chat.stopKeyword),position:"desktop",className:"hidden lg:block"}),(0,t.jsx)(s.StopDemoButton,{onStop:()=>a(c.chat.stopKeyword),position:"mobile",className:"lg:hidden"}),(0,t.jsx)(T,{onComplete:()=>{}}),(0,t.jsx)(l.ManagerNotification,{})]})}function N(){return(0,t.jsx)(n.DemoProvider,{available:!0,children:(0,t.jsx)(M,{})})}e.s(["default",()=>N],52683)}]);