PageSourceSearch

https://imperial-mf.ru/_nuxt/DF5DiKAu.js

js imperial-mf.ru collected 2026-10-07 13:20:24 UTC 3,969 bytes, 6 lines download raw bytes

1import{d as V,u as $,s as G,Q as H,c as P,b as E,r as v,X as T,o,e as L,f as e,h as a,F as y,v as M,g as f,t as c,B as Z,C as O,j,W as A,_ as Q}from"./CWoPGWPY.js";import{_ as W}from"./CZqCHNJ9.js";import{_ as X}from"./NoeOmWcP.js";const Y={class:"flex flex-col md:flex-row gap-4"},q={class:"flex-1 md:flex-[0_0_300px] xl:flex-[0_0_460px] flex flex-col gap-2 md:max-h-[690px] overflow-auto"},J=["onClick"],K=["textContent"],I={class:"pt-2 px-4 pb-4"},ee={class:"flex flex-col gap-4"},te=["onClick"],ne={class:"flex-1 flex flex-col gap-2"},oe=["textContent"],le=["textContent"],se={class:"text-grey-2"},ae=["textContent","href"],re=["textContent"],ie=["textContent"],ce={class:"relative w-full h-[690px] overflow-hidden flex-1"},de={ref:"mapEl",class:"w-full h-full"},ue={key:0,role:"status",class:"absolute inset-0 flex flex-col items-center justify-center gap-4 bg-grey-1 p-6 text-center"},fe={key:0},ve=V({__name:"address",setup(pe){const{$api:S}=$(),{$loadYMaps:z}=$();let p=null,d=!1;const u=v(!1),_=v(!1),b=T("mapEl");let n=null,i=null;const m=v([]),x=v(new Set);function g(t){return x.value.has(t)}function F(t){g(t)?x.value.delete(t):x.value.add(t)}function N(){if(!n)return;i||(i=new p.GeoObjectCollection({},{})),i.removeAll(),m.value.forEach(r=>{r.salons.forEach(l=>{const C=`<address>
2        <strong>${l.name}</strong><br/>
3        Адрес: ${l.address}<br/><br/>
4        ${l.workingHours}<br/>
5        ${l.daysOff}
6      </address>`,w=new p.Placemark([l.lat,l.lng],{hintContent:l.name,balloonContentBody:C},{preset:"islands#darkGreenIcon",iconColor:"#E3000F"});i.add(w)})}),n.geoObjects.removeAll(),n.geoObjects.add(i);const t=i.getBounds?.();t&&n.setBounds(t,{checkZoomRange:!0,zoomMargin:24})}function U(t){n?.setCenter([t.lat,t.lng],16,{duration:300})}async function D(){m.value=await S.shop.getAll(),m.value.length&&x.value.add(0)}async function k(){if(!(u.value||d)){u.value=!0,_.value=!1;try{if(p=await z(),d||!b.value)return;n=new p.Map(b.value,{center:[55.751244,37.618423],zoom:4,controls:["zoomControl","typeSelector"]}),N()}catch{if(d)return;n?.destroy(),n=null,i=null,_.value=!0}finally{u.value=!1}}}return G(async()=>{await D(),d||await k()}),H(()=>{d=!0,n&&n.destroy()}),(t,r)=>{const l=Q,C=W,w=X;return o(),P(w,{title:"Салоны",breadcrumbs:[{name:"Салоны"}]},{default:E(()=>[L(C,null,{default:E(()=>[e("div",Y,[e("div",q,[(o(!0),a(y,null,M(f(m),(B,h)=>(o(),a("div",{key:h,class:"bg-grey-1 rounded-1"},[e("div",{class:"flex items-center h-14 px-4 cursor-pointer",onClick:s=>F(h)},[e("p",{class:"flex-1 font-bold text-h5",textContent:c(B.name)}
6,null,8,K),e("div",null,[(o(),a("svg",{class:Z([g(h)&&"rotate-180"]),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[...r[0]||(r[0]=[e("path",{d:"M6.18333 7.15845L10 10.9751L13.825 7.15845L15 8.33345L10 13.3334L5 8.33345L6.18333 7.15845Z",fill:"#E3000F"},null,-1)])],2))])],8,J),O(e("div",I,[e("div",ee,[(o(!0),a(y,null,M(B.salons,(s,R)=>(o(),a("div",{key:R,class:"flex gap-2 cursor-pointer",onClick:_e=>U(s)},[r[1]||(r[1]=e("div",{class:"w-2 h-2 rounded-full mt-1.5 bg-main-red"},null,-1)),e("div",ne,[e("p",{textContent:c(s.name),class:"font-bold"},null,8,oe),e("p",{textContent:c(s.address)},null,8,le),e("div",se,[s.phone?(o(),a("a",{key:0,textContent:c(`Телефон: ${s.phone}`),href:`tel:${s.phone}`},null,8,ae)):j("",!0),e("p",{textContent:c(`Время работы: ${s.workingHours}`)},null,8,re),e("p",{textContent:c(s.daysOff)},null,8,ie)])])],8,te))),128))])],512),[[A,g(h)]])]))),128))]),e("div",ce,[O(e("div",de,null,512),[[A,!f(_)]]),f(u)||f(_)?(o(),a("div",ue,[f(u)?(o(),a("p",fe,"Загрузка карты…")):(o(),a(y,{key:1},[r[2]||(r[2]=e("p",null,"Не удалось загрузить карту. Адреса и контакты салонов доступны в списке.",-1)),L(l,{label:"Попробовать снова",onClick:k})],64))])):j("",!0)])])]),_:1})]),_:1})}}});
6export{ve as default};

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.