PageSourceSearch

https://planeta-avtodv.ru/_next/static/chunks/9795.d91b2f721448aa0e.js

js planeta-avtodv.ru collected 2026-10-08 10:01:19 UTC 6,210 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9795],{2296:function(e,s,a){var t=a(5893),l=a(7294),i=a(8100),r=a(4635),n=a(8575);let d=({cross:e})=>(0,t.jsxs)("div",{role:"status",className:"py-1",children:[(0,t.jsx)("span",{className:"sr-only",children:e?"Загружаем кросс-аналоги…":"Загружаем аналоги…"}),(0,t.jsx)("div",{"aria-hidden":"true",className:"space-y-2 motion-safe:animate-pulse",children:[0,1,2,3].map(e=>(0,t.jsxs)("div",{className:"flex min-h-[72px] items-center gap-3 py-2",children:[(0,t.jsx)("div",{className:"hidden h-12 w-12 shrink-0 bg-gray-100 md:block"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)("div",{className:`${e%2==0?"w-4/5":"w-2/3"} h-3 bg-gray-200`}),(0,t.jsx)("div",{className:"h-2.5 w-1/3 bg-gray-100"}),(0,t.jsx)("div",{className:"h-2.5 w-1/2 bg-gray-100 md:hidden"})]}),(0,t.jsxs)("div",{className:"hidden w-24 shrink-0 space-y-2 md:block",children:[(0,t.jsx)("div",{className:"h-3 w-20 bg-gray-200"}),(0,t.jsx)("div",{className:"h-2.5 w-14 bg-gray-100"})]})]},e))})]}),o=({item:e,modal:s=!1,cross:a=!1})=>{let o=(0,n.Kv)(),[c,m]=l.useState(1),{data:u,error:x,mutate:h}=(0,i.ZP)(`items/${e.searchId}/analogs?page=${c}${a?"&match_type=cross":""}`,{revalidateOnFocus:!1});return x?(0,t.jsxs)("div",{role:"alert",className:"py-4 text-sm",children:["Не удалось загрузить ",a?"кросс-аналоги":"аналоги",".",(0,t.jsx)("button",{type:"button",onClick:()=>h(),className:"ml-2 text-red-700 underline underline-offset-2",children:"Повторить"})]}):u?0===u.totalItems?(0,t.jsx)("p",{className:"py-4 text-sm text-slate-600",children:a?"Кросс-аналоги не найдены.":"Среди проиндексированных запчастей совпадений по OEM не найдено."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Z,{compact:s,items:u.items,sourceAttribution:{origin:o.origin,selection:a?"cross_analog":"direct_analog",sourceItemId:e.id}}),u.totalPages>1&&(0,t.jsxs)("nav",{"aria-label":a?"Страницы кросс-аналогов":"Страницы аналогов",className:"my-4 flex items-center gap-4 text-sm",children:[(0,t.jsx)("button",{type:"button",disabled:c<=1,onClick:()=>m(e=>e-1),className:"rounded border border-slate-300 px-3 py-2 disabled:opacity-40",children:"Назад"}),(0,t.jsxs)("span",{children:[c," из ",u.totalPages]}),(0,t.jsx)("button",{type:"button",disabled:c>=u.totalPages,onClick:()=>m(e=>e+1),className:"rounded border border-slate-300 px-3 py-2 disabled:opacity-40",children:"Далее"})]})]}):(0,t.jsx)(d,{cross:a})},c=({item:e,modal:s=!1})=>{let a=l.useId(),i=s?`${a}-analogs-title`:"analogs-title",r=`${a}-cross-analogs-title`,n=`${a}-cross-analogs`,[d,c]=l.useState(!1),m=l.useRef(null);return l.useEffect(()=>{if(s||"#analogs"!==window.location.hash)return;let e=window.requestAnimationFrame(()=>{var e;return null===(e=m.current)||void 0===e?void 0:e.scrollIntoView({block:"start"})});return()=>window.cancelAnimationFrame(e)},[e.id,s]),(0,t.jsxs)("section",{ref:m,id:s?void 0:"analogs","aria-labelledby":i,className:`${s?"":"mt-4"} scroll-mt-28 [&_.ProductTable-row]:!py-1 [&_.ProductTable-cell-image]:!p-1 md:[&_.ProductTable-cell-image]:!h-16 md:[&_.ProductTable-cell-image]:!w-16 md:[&_.ProductTable-head-image]:!w-16`,children:[(0,t.jsx)("h2",{id:i,className:s?"sr-only":"!mb-0 text-lg font-semibold",children:"Аналоги"}),(0,t.jsx)("p",{className:"mb-2 mt-1 text-sm text-slate-600",children:"Проверьте применяемость перед заказом."}),(0,t.jsx)(o,{item:e,modal:s}),(0,t.jsx)("button",{type:"button","aria-expanded":d,"aria-controls":n,onClick:()=>c(e=>!e),className:"my-3 text-sm text-gray-600 underline underline-offset-4 hover:text-gray-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-gray-500",children:d?"Скрыть кросс-аналоги":"Показать кросс-аналоги"}),(0,t.jsx)("section",{id:n,"aria-labelledby":r,hidden:!d,children:d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{id:r,className:"mb-1 text-sm font-medium",children:"Через общий аналог"}),(0,t.jsx)(o,{item:e,modal:s,cross:!0})]})})]})};s.Z=e=>(0,t.jsx)(c,{...e},e.item.id)},9795:function(e,s,a){a.r(s),a.d(s,{default:function(){return o}});var t=a(5893),l=a(4003),i=a(1664),r=a.n(i),n=a(1594),d=a(2296);function o({item:e,onClose:s}
1){let a=Array.from(new Set((e.oemString||"").split(/[;,\s]+/).filter(e=>e.length>5)));return(0,t.jsxs)(l.V,{as:"div",className:"ProductItemModal relative z-[1000]",open:!0,onClose:s,children:[(0,t.jsx)("div",{className:"ProductItemModal-backdrop fixed inset-0 bg-black/30","aria-hidden":"true"}),(0,t.jsx)("div",{className:"ProductItemModal-scroll fixed inset-0 overflow-y-auto",children:(0,t.jsx)("div",{className:"ProductItemModal-positioner",children:(0,t.jsxs)(l.V.Panel,{className:"ProductItemModal-panel text-sm",onKeyDown:e=>{"Escape"!==e.key||e.defaultPrevented||e.target.closest('[role="dialog"]')!==e.currentTarget.closest('[role="dialog"]')||(e.preventDefault(),e.stopPropagation(),s())},children:[(0,t.jsx)("button",{type:"button",className:"ProductItemModal-close",onClick:s,"aria-label":"Закрыть аналоги",children:(0,t.jsx)(n.Z,{"aria-hidden":"true"})}),(0,t.jsxs)("div",{className:"ProductItemModal-content",children:[(0,t.jsx)(l.V.Title,{as:"h2",className:"!m-0 pr-12 !text-lg !font-semibold",children:"Аналоги"}),(0,t.jsx)("p",{className:"mb-2 mt-1 pr-12 text-sm text-slate-600",children:e.title}),(0,t.jsxs)("div",{className:"mb-2 flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs",children:[(0,t.jsx)("span",{className:"text-slate-500",children:"OEM:"}),a.length?a.map(e=>(0,t.jsx)(r(),{prefetch:!1,href:{pathname:"/search",query:{query:e,query_index:"part_number"}},className:"break-all !text-slate-700 hover:!text-red-700 hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-700",children:e},e)):(0,t.jsx)("span",{className:"text-slate-500",children:"не указаны"})]}),(0,t.jsx)(d.Z,{item:e,modal:!0})]})]})})})]})}}}]);

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.