import{q as d,n as e,w as de,v as $,L as h,N as D}from"./vendor-react-Br0ZiotI.js";import{b_ as u,t as M,B as U,c0 as he,cs as ue,b4 as _,z as L,aH as K,bK as me,bN as p,az as xe,bn as F,S as pe,bZ as q,a2 as G,U as w,bB as H,aN as ge,D as b,ad as V,aj as Y,O as be,af as Z,ah as W,ai as Q,ag as J,br as j,by as g,bf as ye,bm as fe,bh as je,bk as ke,bl as ve,bi as we,bg as y,b5 as Ne,s as Ce}from"./index-BdS0v754.js";import"./vendor-dayjs-8pzXSYYG.js";import{e as Se}from"./vendor-query-9i1Av1pr.js";import{u as m}from"./vendor-i18n-C54Hc0CQ.js";import{Z as C}from"./zap-Ci_2NnzB.js";import{G as S}from"./globe-CUbRGoiW.js";import{S as I}from"./shield-check-DdgDJQI3.js";import{L as X,S as ee,a as T,C as B,P as ae,R as Ae,U as A,F as Me,T as _e}from"./users-zdM8JIUR.js";import{F as te}from"./file-text-DlfYEdpc.js";import{B as se,P as ne,a as Le}from"./SiteFooter-DgGiilEt.js";import{B as Ke}from"./building-2-CRzOPVjz.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 Ee=[["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",Ee);/**
 * @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:"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"}]],Te=u("bookmark",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 Be=[["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"}]],k=u("calculator",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 Oe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Pe=u("calendar-days",Oe);/**
 * @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:"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"}]],$e=u("gift",ze);/**
 * @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 De=[["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"}]],Ue=u("house",De);/**
 * @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:"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",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 Ge=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],He=u("menu",Ge);/**
 * @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=[["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"}]],Ye=u("panels-top-left",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 Ze=[["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",Ze);/**
 * @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 We=[["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"}]],Qe=u("users-round",We);/**
 * @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 Je=[["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"}]],Xe=u("warehouse",Je),ea=6e4;function aa(){const t=d.useContext(M);return t!=null&&t.isAuthenticated?e.jsx(ta,{}):null}function ta(){const{t}=m(),r=Se({queryKey:["exchange","chat","unread-counts"],queryFn:()=>he.unreadCounts(),refetchInterval:ea,staleTime:3e4}).data??{},a=Object.values(r).reduce((n,l)=>n+(l??0),0);return a<=0?null:e.jsx(U,{variant:"error",className:"ml-1.5 h-5 min-w-[1.25rem] justify-center px-1 text-[10px] leading-none","aria-label":t("exchangeUnread.aria","Непрочитанных сообщений на бирже: {{count}}",{count:a}),children:a>99?"99+":a})}const O=[{id:"home",label:"Главная",icon:Ue,href:"/",group:"navigation"},{id:"calc",label:"Калькулятор",description:"Рассчитать стоимость перевозки",icon:k,href:"/calculator",group:"navigation",keywords:["расчёт","calculate","calc"]},{id:"results",label:"Результаты поиска",icon:_,href:"/search",group:"navigation"},{id:"exchange",label:"Биржа",description:"Тендеры на перевозку",icon:C,href:"/exchange",group:"navigation",keywords:["tender","тендер","auction"]},{id:"exchange-about",label:"О бирже",icon:S,href:"/exchange/about",group:"navigation"},{id:"plans",label:"Тарифные планы",description:"Pricing & plans",icon:I,href:"/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:T,href:"/dashboard/orders",group:"navigation",keywords:["заявки","orders"]},{id:"saved",label:"Сохранённые расчёты",icon:Te,href:"/dashboard/saved",group:"navigation"},{id:"notifications",label:"Уведомления",icon:L,href:"/notifications",group:"navigation"},{id:"auth",label:"Войти / Зарегистрироваться",icon:K,href:"/login",group:"navigation"},{id:"supplier",label:"Портал поставщика",icon:me,href:"/exchange/supplier",group:"navigation",keywords:["supplier","поставщик"]},{id:"supplier-auctions",label:"Аукционы для поставщика",icon:C,href:"/exchange/supplier/auctions",group:"navigation"},{id:"supplier-bids",label:"Мои ставки",icon:T,href:"/exchange/supplier/bids",group:"navigation"},{id:"admin-overview",label:"Admin — Обзор (KPI)",description:"Recharts dashboard — поиски, заявки, статистика",icon:B,href:"/m/admin",group:"admin",adminOnly:!0,keywords:["kpi","overview","обзор","dashboard"]},{id:"admin-exchange-stats",label:"Admin — Статистика биржи",icon:B,href:"/m/admin/exchange/stats",group:"admin",adminOnly:!0},{id:"admin-chat-mod",label:"Admin — Модерация чата",icon:I,href:"/m/admin/exchange/chat-moderation",group:"admin",adminOnly:!0},{id:"admin-orders",label:"Admin — Заявки",icon:ae,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:Ae,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:Ye,href:"/admin/amocrm",group:"admin",adminOnly:!0},{id:"admin-preview",label:"Design preview tour",description:"Полный список /m/* страниц",icon:S,href:"/preview",group:"admin",adminOnly:!0}],le=d.createContext({open:!1,setOpen:()=>{}});function sa(){return d.useContext(le)}function na({children:t}){const[s,r]=d.useState(!1);return d.useEffect(()=>{function a(n){(n.metaKey||n.ctrlKey)&&n.key==="k"&&(n.preventDefault(),r(l=>!l)),n.key==="Escape"&&r(!1)}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]),e.jsxs(le.Provider,{value:{open:s,setOpen:r},children:[t,e.jsx(ra,{open:s,setOpen:r})]})}function ra({open:t,setOpen:s}){var v,E,R;const r=de(),{user:a}=ue()??{},n=((v=a==null?void 0:a.roles)==null?void 0:v.includes("ADMIN"))||((E=a==null?void 0:a.roles)==null?void 0:E.includes("SUPER_ADMIN"))||((R=a==null?void 0:a.roles)==null?void 0:R.includes("MANAGER")),l=n?O:O.filter(c=>!c.adminOnly),i=l.filter(c=>c.group==="navigation"),o=l.filter(c=>c.group==="admin"),x=d.useCallback(c=>{s(!1),r(c.href)},[r,s]);return e.jsxs(p.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(_,{className:"h-4 w-4 text-text-muted flex-shrink-0"}),e.jsx(p.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(p.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(p.Empty,{className:"py-8 text-center text-sm text-text-muted",children:"Ничего не найдено"}),i.length>0&&e.jsx(p.Group,{heading:"Навигация",className:"px-2",children:i.map(c=>e.jsx(P,{item:c,onSelect:()=>x(c)},c.id))}),n&&o.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(p.Separator,{className:"my-1 h-px bg-border"}),e.jsx(p.Group,{heading:"Администрирование",className:"px-2",children:o.map(c=>e.jsx(P,{item:c,onSelect:()=>x(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 P({item:t,onSelect:s}){const r=t.icon;return e.jsxs(p.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(r,{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 la(t=24){const[s,r]=d.useState(!1);return d.useEffect(()=>{if(typeof window>"u")return;let a=0;const n=()=>{a||(a=window.requestAnimationFrame(()=>{a=0,r(window.scrollY>t)}))};return n(),window.addEventListener("scroll",n,{passive:!0}),()=>{window.removeEventListener("scroll",n),a&&window.cancelAnimationFrame(a)}},[t]),s}const oa=["/","/calculator","/search"];function ia(){const{t}=m(),{pathname:s}=$(),[r,a]=d.useState(!0);return d.useEffect(()=>{if(typeof window>"u")return;let n=window.scrollY,l=0;const i=()=>{l||(l=window.requestAnimationFrame(()=>{l=0;const o=window.scrollY,x=o-n;Math.abs(x)>=4&&(x>0&&o>200?a(!1):x<0&&a(!0),n=o)}))};return window.addEventListener("scroll",i,{passive:!0}),()=>{window.removeEventListener("scroll",i),l&&window.cancelAnimationFrame(l)}},[]),oa.includes(s)?null:e.jsxs(h,{to:"/calculator","aria-label":t("ui.mobileCalcFab.openAria","Открыть калькулятор"),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",r?"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(k,{className:"h-4 w-4"}),t("ui.mobileCalcFab.cta","Рассчитать")]})}const f="https://avalog.ru";function ca(){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 da=[{id:"client",tier:"client",items:[{to:"/lk",labelKey:"lkSidebar.overview",label:"Обзор",icon:X,end:!0},{to:"/lk/shipments",labelKey:"lkSidebar.shipments",label:"Мои грузы",icon:F},{to:"/lk/calendar",labelKey:"lkSidebar.calendar",label:"Календарь",icon:Pe},{to:"/lk/applications",labelKey:"lkSidebar.applications",label:"Заявки",icon:ae},{to:"/lk/documents",labelKey:"lkSidebar.documents",label:"Документы",icon:te},{to:"/lk/saved-calcs",labelKey:"lkSidebar.savedCalcs",label:"Сохранённые расчёты",icon:k},{to:"/lk/contracts",labelKey:"lkSidebar.contracts",label:"Договоры",icon:Me},{to:"/lk/team",labelKey:"lkSidebar.team",label:"Команда",icon:A},{to:"/lk/notifications",labelKey:"lkSidebar.notifications",label:"Уведомления",icon:L},{to:"/lk/referral",labelKey:"lkSidebar.referral",label:"Реферальная программа",icon:$e},{to:"/lk/help",labelKey:"lkSidebar.help",label:"Помощь",icon:pe},{to:"/lk/settings",labelKey:"lkSidebar.settings",label:"Настройки",icon:ee}]},{id:"sales",labelKey:"lkSidebar.groupSales",label:"Продажи",tier:"sales",items:[{to:"/lk/sales/fast-quote",labelKey:"lkSidebar.fastQuote",label:"Быстрый расчёт",icon:C},{to:"/lk/sales/leads",labelKey:"lkSidebar.leads",label:"Лиды",icon:_e}]},{id:"admin",labelKey:"lkSidebar.groupAdmin",label:"Администрирование",tier:"admin",items:[{to:"/lk/admin/customers",labelKey:"lkSidebar.customers",label:"Клиенты",icon:A}]}];function z(t,...s){return t!=null&&t.length?t.some(r=>s.some(a=>r.toUpperCase().includes(a))):!1}function ha({isActive:t}){return q("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 ua({groups:t}){const{t:s}=m();return e.jsx(e.Fragment,{children:t.map(r=>e.jsxs("div",{className:"space-y-1",children:[r.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:r.labelKey?s(r.labelKey,r.label):r.label}),r.items.map(a=>{const n=a.icon;return e.jsxs(D,{to:a.to,end:a.end,className:ha,children:[e.jsx(n,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s(a.labelKey,a.label)})]},a.to)})]},r.id))})}function ma(){var i;const{t}=m(),s=d.useContext(M),r=(i=s==null?void 0:s.user)==null?void 0:i.roles,a=z(r,"SALES"),n=z(r,"ADMIN","MANAGER"),l=da.filter(o=>o.tier==="sales"?a||n:o.tier==="admin"?n:!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(ua,{groups:l})})}),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:l.flatMap(o=>o.items).map(o=>{const x=o.icon;return e.jsxs(D,{to:o.to,end:o.end,className:({isActive:v})=>q("flex items-center gap-1.5 whitespace-nowrap rounded-full px-3 py-1.5 text-sm font-medium transition-colors",v?"bg-emerald-600 text-white":"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"),children:[e.jsx(x,{className:"h-3.5 w-3.5 shrink-0"}),t(o.labelKey,o.label)]},o.to)})})]})}function oe(){return d.useContext(M)}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"}],xa=new Set(["calculator","exchange"]),ce=[{slug:"importer",label:"Импортёрам",desc:"Регулярный B2B-импорт",icon:Xe},{slug:"exporter",label:"Экспортёрам",desc:"СНГ · Азия · ЕС",icon:F},{slug:"forwarder",label:"Форвардерам",desc:"Партнёрский API",icon:Ke},{slug:"carrier",label:"Перевозчикам",desc:"Биржа Avalog",icon:Qe}],N=[{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 pa(){var n;const{i18n:t,t:s}=m(),r=((n=t.language)==null?void 0:n.split("-")[0])??"ru",a=N.find(l=>l.code===r)??N[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(S,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.short})]})}),e.jsxs(Z,{align:"end",children:[e.jsx(W,{children:s("shell.lang.menuLabel","Язык интерфейса")}),e.jsx(Q,{}),N.map(l=>e.jsxs(J,{onSelect:()=>{t.changeLanguage(l.code)},className:l.code===r?"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 ga(){var a;const{i18n:t,t:s}=m(),r=((a=t.language)==null?void 0:a.split("-")[0])??"ru";return e.jsxs("div",{className:"py-1",children:[e.jsx("span",{className:"text-sm text-text-muted",children:s("shell.mobile.language","Язык интерфейса")}),e.jsx("div",{className:"mt-2 grid grid-cols-5 gap-1.5",children:N.map(n=>{const l=n.code===r;return e.jsx("button",{type:"button",onClick:()=>void t.changeLanguage(n.code),"aria-pressed":l,"aria-label":n.label,className:`h-10 rounded-md text-sm font-medium transition-colors flex items-center justify-center ${l?"bg-primary text-white":"bg-bg-surface text-text-muted hover:text-text"}`,children:n.short},n.code)})})]})}function ba({active:t}){const{t:s}=m(),r=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 ${r?"text-primary font-semibold":"text-text-muted hover:text-text"}`,children:[s("shell.nav.solutions","Решения"),e.jsx(be,{className:"h-3.5 w-3.5"})]})}),e.jsxs(Z,{align:"start",className:"w-72",children:[e.jsx(W,{children:s("shell.solutions.menuLabel","Решения для бизнеса")}),e.jsx(Q,{}),ce.map(a=>{const n=a.icon;return e.jsx(J,{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(n,{className:"h-4 w-4 text-primary"})}),e.jsxs(j,{gap:0,children:[e.jsx(g,{weight:"semibold",className:"text-sm",children:s(`shell.personas.${a.slug}.label`,a.label)}),e.jsx(g,{variant:"muted",className:"text-xs",children:s(`shell.personas.${a.slug}.desc`,a.desc)})]})]})},a.slug)})]})]})}function ya(){const{t}=m(),s=oe(),r=(s==null?void 0:s.isAuthenticated)??!1,a=r?"/lk":"/login",n=r?t("shell.auth.account","Личный кабинет"):t("shell.auth.login","Войти"),l=r?re:K;return e.jsx(b,{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:n})]})})}function fa({active:t}){const{t:s}=m(),[r,a]=d.useState(!1),n=oe(),l=(n==null?void 0:n.isAuthenticated)??!1;return e.jsxs(ye,{open:r,onOpenChange:a,children:[e.jsx(fe,{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(He,{className:"h-5 w-5"})})}),e.jsxs(je,{side:"right",className:"w-full sm:max-w-sm flex flex-col",children:[e.jsxs(ke,{children:[e.jsx(ve,{children:e.jsx(se,{variant:"full",height:26})}),e.jsx(we,{className:"sr-only",children:s("shell.mobile.menuDesc","Главное меню Avalog — навигация по сайту")})]}),e.jsx("nav",{className:"flex-1 overflow-y-auto py-6",children:e.jsxs(j,{gap:1,children:[ie.map(i=>e.jsx(y,{asChild:!0,children:e.jsx(h,{to:i.to,className:`block px-2 py-3 rounded-md text-base ${t===i.key?"text-primary font-semibold bg-primary-light/40":"text-text hover:bg-bg-surface"}`,children:s(`shell.nav.${i.key}`,i.label)})},i.key)),e.jsx("div",{className:"pt-2 pb-1 px-2",children:e.jsx(g,{variant:"caption",children:s("shell.solutions.menuLabel","Решения для бизнеса")})}),ce.map(i=>{const o=i.icon;return e.jsx(y,{asChild:!0,children:e.jsxs(h,{to:`/solutions/${i.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(o,{className:"h-4 w-4 text-primary"})}),e.jsxs(j,{gap:0,children:[e.jsx(g,{className:"text-sm font-medium",children:s(`shell.personas.${i.slug}.label`,i.label)}),e.jsx(g,{variant:"muted",className:"text-xs",children:s(`shell.personas.${i.slug}.desc`,i.desc)})]})]})},i.slug)})]})}),e.jsx("div",{className:"pt-4 border-t border-border",children:e.jsxs(j,{gap:3,children:[e.jsx(y,{asChild:!0,children:e.jsx(b,{asChild:!0,children:e.jsxs(h,{to:"/calculator",children:[e.jsx(k,{className:"h-4 w-4"}),s("shell.cta.calculate","Рассчитать")]})})}),e.jsx(y,{asChild:!0,children:e.jsx(b,{variant:"outline",asChild:!0,children:e.jsxs(h,{to:l?"/lk":"/login",children:[l?e.jsx(re,{className:"h-4 w-4"}):e.jsx(K,{className:"h-4 w-4"}),l?s("shell.auth.account","Личный кабинет"):s("shell.auth.login","Войти")]})})}),l&&e.jsx(y,{asChild:!0,children:e.jsx(b,{variant:"ghost",asChild:!0,children:e.jsxs(h,{to:"/notifications",children:[e.jsx(L,{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.jsx(ga,{}),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 ja(){const{t}=m(),{setOpen:s}=sa();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(_,{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 Ra({children:t,active:s=null,containerSize:r="base"}){const{t:a}=m(),n=la(24),{pathname:l}=$(),i=l==="/lk"||l.startsWith("/lk/");return e.jsxs(na,{children:[e.jsx(ca,{}),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",n?"border-border shadow-sm":"border-transparent"].join(" "),children:e.jsx(G,{size:r,className:"2xl:max-w-[1600px]",children:e.jsxs(w,{justify:"between",align:"center",wrap:!1,className:["transition-[height] duration-200 gap-3",n?"h-12":"h-16"].join(" "),children:[e.jsxs(w,{gap:4,align:"center",wrap:!1,children:[e.jsxs(h,{to:"/",className:"flex items-center gap-2 group","aria-label":"Avalog",children:[e.jsx(se,{variant:"full",height:n?26:32,priority:!0,className:"transition-[height] duration-200"}),e.jsx(U,{variant:"success",className:n?"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(o=>xa.has(o.key)).map(o=>e.jsxs(h,{to:o.to,className:s===o.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.${o.key}`,o.label),o.key==="exchange"&&e.jsx(aa,{})]},o.key)),e.jsx(ba,{active:s})]})]}),e.jsxs(w,{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(pa,{})}),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(ya,{})}),e.jsx(ja,{}),e.jsx(b,{asChild:!0,size:"sm",children:e.jsxs(h,{to:"/calculator",children:[e.jsx(k,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:a("shell.cta.calculate","Рассчитать")})]})}),e.jsx(fa,{active:s})]})]})})}),i?e.jsxs("div",{className:"flex-1 flex flex-col lg:flex-row",children:[e.jsx(ma,{}),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:r}),e.jsx(ia,{})]})]})}function Ia({title:t,description:s,ctaLabel:r,ctaTo:a="/calculator"}){const{t:n}=m(),l=t??n("shell.ctaBar.title","Рассчитайте свой маршрут за 5 секунд"),i=s??n("shell.ctaBar.description","2490 городов · 60 000 контейнеров · 100 000 маршрутов · от перевозчика напрямую"),o=r??n("shell.cta.calculate","Рассчитать");return e.jsx(Ne,{bg:"primary-light",py:"md",children:e.jsx(G,{size:"base",children:e.jsxs(w,{justify:"between",align:"center",wrap:!0,gap:6,children:[e.jsxs(j,{gap:1,children:[e.jsx(g,{weight:"bold",className:"text-xl text-text",children:l}),e.jsx(g,{className:"text-text-muted",children:i})]}),e.jsx(b,{size:"lg",asChild:!0,children:e.jsxs(h,{to:a,children:[o,e.jsx(Ce,{className:"h-4 w-4"})]})})]})})})}export{Re as B,k as C,$e as G,Ue as H,qe as M,Qe as U,Xe as W,Te as a,Pe as b,Ia as c,Ra as d};