import{q as d,n as e,w as de,v as D,L as h,N as U}from"./vendor-react-Br0ZiotI.js";import{b$ as u,t as S,B as q,c1 as he,cs as ue,b5 as M,z as _,aI as L,bL as me,bO as m,aA as xe,bo as F,T as pe,b_ as G,a3 as K,V as v,bC as H,aO as ge,E as g,b6 as be,bs as y,bz as x,s as fe,ae as V,ak as Y,P as ye,ag as W,ai as Z,aj as J,ah as Q,bg as je,bn as ke,bi as ve,bl as we,bm as Ne,bj as Ce,bh as b}from"./index-B-EDPu3R.js";import"./vendor-dayjs-BcsA502E.js";import{e as Ae}from"./vendor-query-9i1Av1pr.js";import{Z as N}from"./zap-Ca_NrEyM.js";import{G as C}from"./globe-SYiMVozm.js";import{S as T}from"./shield-check-BRHQZ8CY.js";import{L as X,S as ee,a as O,C as P,P as se,R as Se,U as A,F as Me,T as _e}from"./users-sM9inbI_.js";import{F as te}from"./file-text-s7xBL7vU.js";import{B as ae,P as ne,a as Le}from"./SiteFooter-CJ3BLn-3.js";import{u as p}from"./vendor-i18n-C54Hc0CQ.js";import{B as Ee}from"./building-2-pC_rkZnQ.js";/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ie=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Re=u("book-open",Ie);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Te=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],Oe=u("bookmark",Te);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pe=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],j=u("calculator",Pe);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Be=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8",key:"1sqzm4"}],["path",{d:"M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5",key:"kc0143"}],["rect",{x:"3",y:"7",width:"18",height:"4",rx:"1",key:"1hberx"}]],ze=u("gift",Be);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $e=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],De=u("house",$e);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ue=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],qe=u("map-pin",Ue);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Ge=u("menu",Fe);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ke=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],He=u("panels-top-left",Ke);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ve=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],re=u("user-round",Ve);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ye=[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]],We=u("users-round",Ye);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ze=[["path",{d:"M18 21V10a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v11",key:"pb2vm6"}],["path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 1.132-1.803l7.95-3.974a2 2 0 0 1 1.837 0l7.948 3.974A2 2 0 0 1 22 8z",key:"doq5xv"}],["path",{d:"M6 13h12",key:"yf64js"}],["path",{d:"M6 17h12",key:"1jwigz"}]],Je=u("warehouse",Ze),Qe=6e4;function Xe(){const t=d.useContext(S);return t!=null&&t.isAuthenticated?e.jsx(es,{}):null}function es(){const s=Ae({queryKey:["exchange","chat","unread-counts"],queryFn:()=>he.unreadCounts(),refetchInterval:Qe,staleTime:3e4}).data??{},n=Object.values(s).reduce((a,r)=>a+(r??0),0);return n<=0?null:e.jsx(q,{variant:"error",className:"ml-1.5 h-5 min-w-[1.25rem] justify-center px-1 text-[10px] leading-none","aria-label":`Непрочитанных сообщений РЅР° Р±РёСЂР¶Рµ: ${n}`,children:n>99?"99+":n})}const B=[{id:"home",label:"Главная",icon:De,href:"/m",group:"navigation"},{id:"calc",label:"Калькулятор",description:"Рассчитать стоимость перевозки",icon:j,href:"/calculator",group:"navigation",keywords:["расчёт","calculate","calc"]},{id:"results",label:"Результаты РїРѕРёСЃРєР°",icon:M,href:"/search",group:"navigation"},{id:"exchange",label:"Биржа",description:"Тендеры РЅР° перевозку",icon:N,href:"/exchange",group:"navigation",keywords:["tender","тендер","auction"]},{id:"exchange-about",label:"Рћ Р±РёСЂР¶Рµ",icon:C,href:"/exchange/about",group:"navigation"},{id:"plans",label:"Тарифные планы",description:"Pricing & plans",icon:T,href:"/m/plans",group:"navigation",keywords:["pricing","price","цены","план"]},{id:"resources",label:"Ресурсы",description:"Глоссарий, гайды, инструменты",icon:Re,href:"/resources",group:"navigation"},{id:"dashboard",label:"Личный кабинет",icon:X,href:"/lk",group:"navigation",keywords:["лк","кабинет"]},{id:"settings",label:"Настройки профиля",icon:ee,href:"/dashboard/settings",group:"navigation",keywords:["профиль","profile","company","компания"]},{id:"orders",label:"РњРѕРё заявки",icon:O,href:"/dashboard/orders",group:"navigation",keywords:["заявки","orders"]},{id:"saved",label:"Сохранённые расчёты",icon:Oe,href:"/dashboard/saved",group:"navigation"},{id:"notifications",label:"Уведомления",icon:_,href:"/notifications",group:"navigation"},{id:"auth",label:"Войти / Зарегистрироваться",icon:L,href:"/login",group:"navigation"},{id:"supplier",label:"Портал поставщика",icon:me,href:"/m/supplier",group:"navigation",keywords:["supplier","поставщик"]},{id:"supplier-auctions",label:"Аукционы для поставщика",icon:N,href:"/m/supplier/auctions",group:"navigation"},{id:"supplier-bids",label:"РњРѕРё ставки",icon:O,href:"/m/supplier/bids",group:"navigation"},{id:"admin-overview",label:"Admin — РћР±Р·РѕСЂ (KPI)",description:"Recharts dashboard — РїРѕРёСЃРєРё, заявки, статистика",icon:P,href:"/m/admin",group:"admin",adminOnly:!0,keywords:["kpi","overview","РѕР±Р·РѕСЂ","dashboard"]},{id:"admin-exchange-stats",label:"Admin — Статистика Р±РёСЂР¶Рё",icon:P,href:"/m/admin/exchange/stats",group:"admin",adminOnly:!0},{id:"admin-chat-mod",label:"Admin — Модерация чата",icon:T,href:"/m/admin/exchange/chat-moderation",group:"admin",adminOnly:!0},{id:"admin-orders",label:"Admin — Заявки",icon:se,href:"/admin/orders",group:"admin",adminOnly:!0,keywords:["orders","applications"]},{id:"admin-contracts",label:"Admin — Договоры",icon:te,href:"/admin/contracts",group:"admin",adminOnly:!0},{id:"admin-invoices",label:"Admin — Счета",icon:Se,href:"/admin/invoices",group:"admin",adminOnly:!0},{id:"admin-users",label:"Admin — Пользователи",icon:A,href:"/admin/users",group:"admin",adminOnly:!0},{id:"admin-routes",label:"Admin — Маршруты",icon:qe,href:"/admin/routes",group:"admin",adminOnly:!0,keywords:["routes","cities"]},{id:"admin-amocrm",label:"Admin — AmoCRM",icon:He,href:"/admin/amocrm",group:"admin",adminOnly:!0},{id:"admin-preview",label:"Design preview tour",description:"Полный СЃРїРёСЃРѕРє /m/* страниц",icon:C,href:"/m/preview",group:"admin",adminOnly:!0}],oe=d.createContext({open:!1,setOpen:()=>{}});function ss(){return d.useContext(oe)}function ts({children:t}){const[s,n]=d.useState(!1);return d.useEffect(()=>{function a(r){(r.metaKey||r.ctrlKey)&&r.key==="k"&&(r.preventDefault(),n(l=>!l)),r.key==="Escape"&&n(!1)}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]),e.jsxs(oe.Provider,{value:{open:s,setOpen:n},children:[t,e.jsx(as,{open:s,setOpen:n})]})}function as({open:t,setOpen:s}){var E,I,R;const n=de(),{user:a}=ue()??{},r=((E=a==null?void 0:a.roles)==null?void 0:E.includes("ADMIN"))||((I=a==null?void 0:a.roles)==null?void 0:I.includes("SUPER_ADMIN"))||((R=a==null?void 0:a.roles)==null?void 0:R.includes("MANAGER")),l=r?B:B.filter(c=>!c.adminOnly),o=l.filter(c=>c.group==="navigation"),i=l.filter(c=>c.group==="admin"),k=d.useCallback(c=>{s(!1),n(c.href)},[n,s]);return e.jsxs(m.Dialog,{open:t,onOpenChange:s,label:"РџРѕРёСЃРє РїРѕ сайту",overlayClassName:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm",className:"fixed left-1/2 top-[20vh] z-50 w-full max-w-xl -translate-x-1/2 rounded-xl border border-border bg-bg-base text-text shadow-2xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center border-b border-border px-4 py-3 gap-3",children:[e.jsx(M,{className:"h-4 w-4 text-text-muted flex-shrink-0"}),e.jsx(m.Input,{placeholder:"РџРѕРёСЃРє страниц Рё действий...",className:"flex-1 bg-transparent outline-none text-sm text-text placeholder:text-text-muted"}),e.jsx("kbd",{className:"text-[10px] font-mono text-text-muted border border-border rounded px-1.5 py-0.5",children:"ESC"})]}),e.jsxs(m.List,{className:"max-h-[360px] overflow-y-auto py-2 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pt-2 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group-heading]]:text-text-muted",children:[e.jsx(m.Empty,{className:"py-8 text-center text-sm text-text-muted",children:"Ничего РЅРµ найдено"}),o.length>0&&e.jsx(m.Group,{heading:"Навигация",className:"px-2",children:o.map(c=>e.jsx(z,{item:c,onSelect:()=>k(c)},c.id))}),r&&i.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(m.Separator,{className:"my-1 h-px bg-border"}),e.jsx(m.Group,{heading:"Администрирование",className:"px-2",children:i.map(c=>e.jsx(z,{item:c,onSelect:()=>k(c)},c.id))})]})]}),e.jsxs("div",{className:"border-t border-border px-4 py-2 flex items-center gap-4 text-[11px] text-text-muted",children:[e.jsxs("span",{children:[e.jsx("kbd",{className:"font-mono border border-border rounded px-1 py-0.5 mr-1",children:"↑↓"}),"выбрать"]}),e.jsxs("span",{children:[e.jsx("kbd",{className:"font-mono border border-border rounded px-1 py-0.5 mr-1",children:"↵"}),"перейти"]}),e.jsxs("span",{children:[e.jsx("kbd",{className:"font-mono border border-border rounded px-1 py-0.5 mr-1",children:"Ctrl K"}),"закрыть"]})]})]})}function z({item:t,onSelect:s}){const n=t.icon;return e.jsxs(m.Item,{value:[t.label,t.description,...t.keywords??[]].filter(Boolean).join(" "),onSelect:s,className:"flex items-center gap-3 px-2 py-2 rounded-md cursor-pointer text-sm text-text aria-selected:bg-bg-surface group",children:[e.jsx("span",{className:"flex h-8 w-8 items-center justify-center rounded-md border border-border bg-bg-surface text-text group-aria-selected:border-primary/30 group-aria-selected:bg-primary/5 flex-shrink-0",children:e.jsx(n,{className:"h-4 w-4"})}),e.jsxs("span",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"block text-text font-medium truncate",children:t.label}),t.description&&e.jsx("span",{className:"block text-text-muted text-xs truncate",children:t.description})]}),e.jsx("span",{className:"text-xs text-text-muted font-mono opacity-0 group-aria-selected:opacity-100 transition-opacity truncate max-w-[120px]",children:t.href})]},t.id)}function ns(t=24){const[s,n]=d.useState(!1);return d.useEffect(()=>{if(typeof window>"u")return;let a=0;const r=()=>{a||(a=window.requestAnimationFrame(()=>{a=0,n(window.scrollY>t)}))};return r(),window.addEventListener("scroll",r,{passive:!0}),()=>{window.removeEventListener("scroll",r),a&&window.cancelAnimationFrame(a)}},[t]),s}const rs=["/","/calculator","/search"];function os(){const{pathname:t}=D(),[s,n]=d.useState(!0);return d.useEffect(()=>{if(typeof window>"u")return;let a=window.scrollY,r=0;const l=()=>{r||(r=window.requestAnimationFrame(()=>{r=0;const o=window.scrollY,i=o-a;Math.abs(i)>=4&&(i>0&&o>200?n(!1):i<0&&n(!0),a=o)}))};return window.addEventListener("scroll",l,{passive:!0}),()=>{window.removeEventListener("scroll",l),r&&window.cancelAnimationFrame(r)}},[]),rs.includes(t)?null:e.jsxs(h,{to:"/calculator","aria-label":"Открыть калькулятор",className:["md:hidden fixed right-4 z-40 inline-flex items-center gap-2","h-12 px-5 rounded-full bg-primary text-primary-foreground font-semibold text-sm","shadow-primary-strong active:scale-95 transition-all duration-200",s?"translate-y-0 opacity-100":"translate-y-24 opacity-0 pointer-events-none"].join(" "),style:{bottom:"calc(env(safe-area-inset-bottom, 0px) + 16px)"},children:[e.jsx(j,{className:"h-4 w-4"}),"Рассчитать"]})}const f="https://avalog.ru";function ls(){const t={"@context":"https://schema.org","@type":["Organization","LocalBusiness"],name:"Avalog",url:f,logo:`${f}/brand/avalog-logo.png`,image:`${f}/og-image.jpg`,description:"Avalog — B2B-платформа доступной международной логистики. Онлайн-калькулятор доставки РёР· Китая, РРЅРґРёРё, Турции Р·Р° 5 секунд. 60+ перевозчиков-партнёров, 200+ бесплатных инструментов Р’РР”.",priceRange:"в‚Ѕв‚Ѕ",currenciesAccepted:"RUB",paymentAccepted:"Invoice, Bank transfer, Card",openingHours:"Mo-Fr 09:00-18:00",areaServed:[{"@type":"Country",name:"Russia"},{"@type":"Country",name:"Belarus"},{"@type":"Country",name:"Kazakhstan"},{"@type":"Country",name:"China"},{"@type":"Country",name:"India"},{"@type":"Country",name:"Turkey"}],aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"124",bestRating:"5",worstRating:"1"},sameAs:["https://t.me/avalog_news","https://t.me/avalog_support","https://dzen.ru/avalog"],contactPoint:[{"@type":"ContactPoint",telephone:"+7-499-948-88-01",contactType:"customer service",areaServed:["RU","BY","KZ","AM","UZ","CN","TR"],availableLanguage:["Russian","English","Chinese"]},{"@type":"ContactPoint",email:"support@avalog.ru",contactType:"customer support"},{"@type":"ContactPoint",email:"partners@avalog.ru",contactType:"partnership"}],address:{"@type":"PostalAddress",streetAddress:"С€. Варшавское, Рґ. 1Рђ, РїРѕРј. Р—Рљ/ІП",addressLocality:"РњРѕСЃРєРІР°",postalCode:"117105",addressCountry:"RU"},geo:{"@type":"GeoCoordinates",latitude:"55.6785",longitude:"37.6180"}},s={"@context":"https://schema.org","@type":"WebSite",name:"Avalog В· Доступная логистика",url:f,potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:`${f}/calculator?q={search_term_string}`},"query-input":"required name=search_term_string"},inLanguage:["ru-RU","en-US"]};return e.jsxs(xe,{children:[e.jsx("script",{type:"application/ld+json",children:JSON.stringify(t)}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(s)})]})}const is=[{id:"client",tier:"client",items:[{to:"/lk",label:"РћР±Р·РѕСЂ",icon:X,end:!0},{to:"/lk/shipments",label:"РњРѕРё РіСЂСѓР·С‹",icon:F},{to:"/lk/applications",label:"Заявки",icon:se},{to:"/lk/documents",label:"Документы",icon:te},{to:"/lk/saved-calcs",label:"Сохранённые расчёты",icon:j},{to:"/lk/contracts",label:"Договоры",icon:Me},{to:"/lk/team",label:"Команда",icon:A},{to:"/lk/notifications",label:"Уведомления",icon:_},{to:"/lk/referral",label:"Реферальная программа",icon:ze},{to:"/lk/help",label:"Помощь",icon:pe},{to:"/lk/settings",label:"Настройки",icon:ee}]},{id:"sales",label:"Продажи",tier:"sales",items:[{to:"/lk/sales/fast-quote",label:"Быстрый расчёт",icon:N},{to:"/lk/sales/leads",label:"Лиды",icon:_e}]},{id:"admin",label:"Администрирование",tier:"admin",items:[{to:"/lk/admin/customers",label:"Клиенты",icon:A}]}];function $(t,...s){return t!=null&&t.length?t.some(n=>s.some(a=>n.toUpperCase().includes(a))):!1}function cs({isActive:t}){return G("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",t?"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-white")}function ds({groups:t}){return e.jsx(e.Fragment,{children:t.map(s=>e.jsxs("div",{className:"space-y-1",children:[s.label&&e.jsx("p",{className:"px-3 pt-4 pb-1 text-xs font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500",children:s.label}),s.items.map(n=>{const a=n.icon;return e.jsxs(U,{to:n.to,end:n.end,className:cs,children:[e.jsx(a,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:n.label})]},n.to)})]},s.id))})}function hs(){var l;const t=d.useContext(S),s=(l=t==null?void 0:t.user)==null?void 0:l.roles,n=$(s,"SALES"),a=$(s,"ADMIN","MANAGER"),r=is.filter(o=>o.tier==="sales"?n||a:o.tier==="admin"?a:!0);return e.jsxs(e.Fragment,{children:[e.jsx("aside",{className:"hidden lg:block w-60 shrink-0 border-r border-gray-200 dark:border-gray-800",children:e.jsx("nav",{className:"sticky top-16 max-h-[calc(100vh-4rem)] overflow-y-auto p-3 space-y-1",children:e.jsx(ds,{groups:r})})}),e.jsx("nav",{className:"lg:hidden flex gap-2 overflow-x-auto border-b border-gray-200 dark:border-gray-800 px-3 py-2",children:r.flatMap(o=>o.items).map(o=>{const i=o.icon;return e.jsxs(U,{to:o.to,end:o.end,className:({isActive:k})=>G("flex items-center gap-1.5 whitespace-nowrap rounded-full px-3 py-1.5 text-sm font-medium transition-colors",k?"bg-emerald-600 text-white":"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"),children:[e.jsx(i,{className:"h-3.5 w-3.5 shrink-0"}),o.label]},o.to)})})]})}function le(){return d.useContext(S)}const ie=[{key:"calculator",label:"Калькулятор",to:"/"},{key:"services",label:"Услуги",to:"/services"},{key:"pricing",label:"Тарифы",to:"/plans"},{key:"blog",label:"База знаний",to:"/resources"},{key:"exchange",label:"Биржа",to:"/exchange"}],us=new Set(["calculator","exchange"]),ce=[{slug:"importer",label:"Рмпортёрам",desc:"Регулярный B2B-РёРјРїРѕСЂС‚",icon:Je},{slug:"exporter",label:"Ркспортёрам",desc:"РЎРќР“ В· РђР·РёСЏ В· ЕС",icon:F},{slug:"forwarder",label:"Форвардерам",desc:"Партнёрский API",icon:Ee},{slug:"carrier",label:"Перевозчикам",desc:"Биржа Avalog",icon:We}],w=[{code:"ru",label:"Р СѓСЃСЃРєРёР№",short:"RU"},{code:"en",label:"English",short:"EN"},{code:"zho",label:"дёж–‡",short:"дёж–‡"},{code:"tr",label:"TГјrkГ§e",short:"TR"},{code:"hi",label:"हिन्दी",short:"HI"}];function ms(){var r;const{i18n:t,t:s}=p(),n=((r=t.language)==null?void 0:r.split("-")[0])??"ru",a=w.find(l=>l.code===n)??w[0];return e.jsxs(V,{children:[e.jsx(Y,{asChild:!0,children:e.jsxs("button",{type:"button","aria-label":s("shell.lang.switch","Сменить язык"),className:"h-9 px-2.5 rounded-md hover:bg-bg-surface flex items-center gap-1.5 text-sm text-text-muted hover:text-text transition-colors",children:[e.jsx(C,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.short})]})}),e.jsxs(W,{align:"end",children:[e.jsx(Z,{children:s("shell.lang.menuLabel","Язык интерфейса")}),e.jsx(J,{}),w.map(l=>e.jsxs(Q,{onSelect:()=>{t.changeLanguage(l.code)},className:l.code===n?"font-semibold text-primary":"",children:[e.jsx("span",{className:"w-10 font-mono text-xs text-text-muted",children:l.short}),e.jsx("span",{children:l.label})]},l.code))]})]})}function xs({active:t}){const{t:s}=p(),n=t==="solutions";return e.jsxs(V,{children:[e.jsx(Y,{asChild:!0,children:e.jsxs("button",{type:"button",className:`flex items-center gap-1 transition-colors ${n?"text-primary font-semibold":"text-text-muted hover:text-text"}`,children:[s("shell.nav.solutions","Решения"),e.jsx(ye,{className:"h-3.5 w-3.5"})]})}),e.jsxs(W,{align:"start",className:"w-72",children:[e.jsx(Z,{children:s("shell.solutions.menuLabel","Решения для бизнеса")}),e.jsx(J,{}),ce.map(a=>{const r=a.icon;return e.jsx(Q,{asChild:!0,children:e.jsxs(h,{to:`/solutions/${a.slug}`,className:"flex items-start gap-3 py-2",children:[e.jsx("div",{className:"h-8 w-8 rounded-md bg-primary-light flex items-center justify-center shrink-0 mt-0.5",children:e.jsx(r,{className:"h-4 w-4 text-primary"})}),e.jsxs(y,{gap:0,children:[e.jsx(x,{weight:"semibold",className:"text-sm",children:s(`shell.personas.${a.slug}.label`,a.label)}),e.jsx(x,{variant:"muted",className:"text-xs",children:s(`shell.personas.${a.slug}.desc`,a.desc)})]})]})},a.slug)})]})]})}function ps(){const{t}=p(),s=le(),n=(s==null?void 0:s.isAuthenticated)??!1,a=n?"/lk":"/login",r=n?t("shell.auth.account","Личный кабинет"):t("shell.auth.login","Войти"),l=n?re:L;return e.jsx(g,{variant:"outline",size:"sm",asChild:!0,children:e.jsxs(h,{to:a,children:[e.jsx(l,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden xl:inline",children:r})]})})}function gs({active:t}){const{t:s}=p(),[n,a]=d.useState(!1),r=le(),l=(r==null?void 0:r.isAuthenticated)??!1;return e.jsxs(je,{open:n,onOpenChange:a,children:[e.jsx(ke,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":s("shell.mobile.openMenu","Открыть меню"),className:"lg:hidden h-9 w-9 rounded-md hover:bg-bg-surface flex items-center justify-center text-text",children:e.jsx(Ge,{className:"h-5 w-5"})})}),e.jsxs(ve,{side:"right",className:"w-full sm:max-w-sm flex flex-col",children:[e.jsxs(we,{children:[e.jsx(Ne,{children:e.jsx(ae,{variant:"full",height:26})}),e.jsx(Ce,{className:"sr-only",children:s("shell.mobile.menuDesc","Главное меню Avalog — навигация РїРѕ сайту")})]}),e.jsx("nav",{className:"flex-1 overflow-y-auto py-6",children:e.jsxs(y,{gap:1,children:[ie.map(o=>e.jsx(b,{asChild:!0,children:e.jsx(h,{to:o.to,className:`block px-2 py-3 rounded-md text-base ${t===o.key?"text-primary font-semibold bg-primary-light/40":"text-text hover:bg-bg-surface"}`,children:s(`shell.nav.${o.key}`,o.label)})},o.key)),e.jsx("div",{className:"pt-2 pb-1 px-2",children:e.jsx(x,{variant:"caption",children:s("shell.solutions.menuLabel","Решения для бизнеса")})}),ce.map(o=>{const i=o.icon;return e.jsx(b,{asChild:!0,children:e.jsxs(h,{to:`/solutions/${o.slug}`,className:"flex items-center gap-3 px-2 py-2.5 rounded-md hover:bg-bg-surface",children:[e.jsx("div",{className:"h-8 w-8 rounded-md bg-primary-light flex items-center justify-center shrink-0",children:e.jsx(i,{className:"h-4 w-4 text-primary"})}),e.jsxs(y,{gap:0,children:[e.jsx(x,{className:"text-sm font-medium",children:s(`shell.personas.${o.slug}.label`,o.label)}),e.jsx(x,{variant:"muted",className:"text-xs",children:s(`shell.personas.${o.slug}.desc`,o.desc)})]})]})},o.slug)})]})}),e.jsx("div",{className:"pt-4 border-t border-border",children:e.jsxs(y,{gap:3,children:[e.jsx(b,{asChild:!0,children:e.jsx(g,{asChild:!0,children:e.jsxs(h,{to:"/calculator",children:[e.jsx(j,{className:"h-4 w-4"}),s("shell.cta.calculate","Рассчитать")]})})}),e.jsx(b,{asChild:!0,children:e.jsx(g,{variant:"outline",asChild:!0,children:e.jsxs(h,{to:l?"/lk":"/login",children:[l?e.jsx(re,{className:"h-4 w-4"}):e.jsx(L,{className:"h-4 w-4"}),l?s("shell.auth.account","Личный кабинет"):s("shell.auth.login","Войти")]})})}),l&&e.jsx(b,{asChild:!0,children:e.jsx(g,{variant:"ghost",asChild:!0,children:e.jsxs(h,{to:"/notifications",children:[e.jsx(_,{className:"h-4 w-4"}),s("shell.mobile.notifications","Уведомления")]})})}),e.jsxs("div",{className:"flex items-center justify-between gap-2 py-1",children:[e.jsx("span",{className:"text-sm text-text-muted",children:s("shell.mobile.theme","Тема оформления")}),e.jsx(H,{className:"marketing-theme-toggle"})]}),e.jsxs("a",{href:"tel:+74999488801",className:"flex items-center justify-center gap-2 text-sm text-text-muted py-2",children:[e.jsx(ne,{className:"h-3.5 w-3.5"}),"+7 499 948-88-01"]})]})})]})]})}function bs(){const{t}=p(),{setOpen:s}=ss();return e.jsxs("button",{onClick:()=>s(!0),"aria-label":t("shell.search.open","Открыть РїРѕРёСЃРє (Ctrl+K)"),className:"hidden md:flex items-center gap-2 px-3 py-1.5 rounded-md border border-border bg-surface text-text-muted hover:bg-bg-base hover:border-primary/40 hover:text-text transition-colors text-sm",children:[e.jsx(M,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs",children:t("shell.search.label","РџРѕРёСЃРє")}),e.jsx("kbd",{className:"text-[10px] font-mono border border-border rounded px-1 py-0.5 bg-bg-base",children:"вЊK"})]})}function Ls({children:t,active:s=null,containerSize:n="base"}){const{t:a}=p(),r=ns(24),{pathname:l}=D(),o=l==="/lk"||l.startsWith("/lk/");return e.jsxs(ts,{children:[e.jsx(ls,{}),e.jsxs("div",{className:"min-h-screen bg-bg-base text-text font-body flex flex-col",children:[e.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-primary focus:text-primary-foreground focus:rounded-md focus:shadow-lg focus:outline-none",children:a("shell.skipToContent","Перейти Рє содержимому")}),e.jsx("header",{className:["sticky top-0 z-50 border-b bg-bg-base/95 backdrop-blur supports-[backdrop-filter]:bg-bg-base/85 transition-shadow duration-200",r?"border-border shadow-sm":"border-transparent"].join(" "),children:e.jsx(K,{size:n,className:"2xl:max-w-[1600px]",children:e.jsxs(v,{justify:"between",align:"center",wrap:!1,className:["transition-[height] duration-200 gap-3",r?"h-12":"h-16"].join(" "),children:[e.jsxs(v,{gap:4,align:"center",wrap:!1,children:[e.jsxs(h,{to:"/",className:"flex items-center gap-2 group","aria-label":"Avalog",children:[e.jsx(ae,{variant:"full",height:r?26:32,priority:!0,className:"transition-[height] duration-200"}),e.jsx(q,{variant:"success",className:r?"hidden":"hidden 2xl:inline-flex whitespace-nowrap",children:a("shell.badge.tagline","Доступная логистика")})]}),e.jsxs("nav",{className:"hidden lg:flex items-center gap-5 whitespace-nowrap text-sm",children:[ie.filter(i=>us.has(i.key)).map(i=>e.jsxs(h,{to:i.to,className:s===i.key?"text-primary font-semibold inline-flex items-center":"text-text-muted hover:text-text transition-colors inline-flex items-center",children:[a(`shell.nav.${i.key}`,i.label),i.key==="exchange"&&e.jsx(Xe,{})]},i.key)),e.jsx(xs,{active:s})]})]}),e.jsxs(v,{gap:2,align:"center",wrap:!1,className:"shrink-0",children:[e.jsxs("a",{href:"tel:+74999488801",className:"hidden 2xl:flex items-center gap-1.5 text-sm text-text-muted hover:text-text whitespace-nowrap",children:[e.jsx(ne,{className:"h-3.5 w-3.5"}),"+7 499 948-88-01"]}),e.jsx("span",{className:"hidden md:inline-flex",children:e.jsx(ms,{})}),e.jsx("span",{className:"hidden md:inline-flex",children:e.jsx(H,{className:"marketing-theme-toggle"})}),e.jsx("span",{className:"hidden md:inline-flex",children:e.jsx(ge,{})}),e.jsx("span",{className:"hidden md:inline-flex",children:e.jsx(ps,{})}),e.jsx(bs,{}),e.jsx(g,{asChild:!0,size:"sm",children:e.jsxs(h,{to:"/calculator",children:[e.jsx(j,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:a("shell.cta.calculate","Рассчитать")})]})}),e.jsx(gs,{active:s})]})]})})}),o?e.jsxs("div",{className:"flex-1 flex flex-col lg:flex-row",children:[e.jsx(hs,{}),e.jsx("main",{id:"main-content",className:"flex-1 min-w-0",children:t})]}):e.jsx("main",{id:"main-content",className:"flex-1",children:t}),e.jsx(Le,{containerSize:n}),e.jsx(os,{})]})]})}function Es({title:t,description:s,ctaLabel:n,ctaTo:a="/calculator"}){const{t:r}=p(),l=t??r("shell.ctaBar.title","Рассчитайте СЃРІРѕР№ маршрут Р·Р° 5 секунд"),o=s??r("shell.ctaBar.description","2490 РіРѕСЂРѕРґРѕРІ В· 60 000 контейнеров В· 100 000 маршрутов В· РѕС‚ перевозчика напрямую"),i=n??r("shell.cta.calculate","Рассчитать");return e.jsx(be,{bg:"primary-light",py:"md",children:e.jsx(K,{size:"base",children:e.jsxs(v,{justify:"between",align:"center",wrap:!0,gap:6,children:[e.jsxs(y,{gap:1,children:[e.jsx(x,{weight:"bold",className:"text-xl text-text",children:l}),e.jsx(x,{className:"text-text-muted",children:o})]}),e.jsx(g,{size:"lg",asChild:!0,children:e.jsxs(h,{to:a,children:[i,e.jsx(fe,{className:"h-4 w-4"})]})})]})})})}export{Re as B,j as C,ze as G,De as H,qe as M,We as U,Je as W,Oe as a,Es as b,Ls as c};