1import{d as O,u as U,w as j,c as Y,a as q,b as J,e as r,f as l,g as f,j as B,h as y,i as K,l as D,m as t,_ as Q,n as W,r as X,o as i,F as Z,k as ee,s as te}from"./DOfMt3Vg.js";import{B as ae}from"./B6-UirhY.js";import{B as le}from"./DFUM3AWI.js";import{u as se}from"./3ocB_t93.js";import{u as re}from"./lNLHxb1T.js";import{s as A,a as ie}from"./q3qVDzjT.js";import{b as oe,p as ne}from"./DWUti-mF.js";import{r as M}from"./Cs4gTFZx.js";import"./fB9FXac_.js";const ce={class:"section tourism-detail-page"},ue={class:"wrap"},de={class:"section-head"},me=["innerHTML"],ve={class:"tourism-detail-layout"},pe={key:0,class:"map-box tourism-detail-map"},_e=["src","title"],ge=["src","alt"],fe=["innerHTML"],ye={key:0,class:"tourism-detail-gallery"},he=["onClick"],be=["src","alt"],h="/turizm/turprogrammi",we="ТÑÑпÑогÑаммÑ",$e=O({__name:"[code]",async setup(ke){let u,b;function I(e){const a=Array.isArray(e)?e[0]:e;return String(a??"").trim()}const $=U(),d=W(),o=re(),w=se(),m=D(null),k=D(null),n=t(()=>I($.params.code)),s=t(()=>o.detail),v=t(()=>s.value?.name?.trim()||n.value||"ТÑÑпÑогÑамма"),c=t(()=>A(v.value)),S=t(()=>M(s.value?.detailPicture?.src??s.value?.previewPicture?.src,d.public.backendPath)),p=t(()=>ne(s.value?.coordinates)),C=t(()=>p.value?oe(p.value.latitude,p.value.longitude):""),T=t(()=>{const e=s.value?.detailText?.trim()||s.value?.previewText?.trim()||"";return e?ie(e,d.public.backendPath):""}),P=t(()=>s.value?.galleryAlbums?.[0]?.code?.trim()||""),E=t(()=>P.value?w.getSection(P.value):null),_=t(()=>(E.value?.elements.items??[]).map(e=>{const a=M(e.detailPicture?.src??e.previewPicture?.src,d.public.backendPath);return a?{id:e.id,title:A(e.name?.trim()||v.value),imageSrc:a}:null}).filter(e=>e!==null)),L=t(()=>[{label:"ÐлавнаÑ",href:"/"},{label:we,href:`${h}/`},{label:c.value}]),N=t(()=>n.value?`${h}/${encodeURIComponent(n.value)}/`:`${h}/`),V=()=>{m.value?.goPrev()},z=()=>{m.value?.goNext()},G=e=>{k.value?.$viewer?.view(e)};async function x(e){if(!e)return null;try{await o.fetchDetail(e,{force:!0})}catch{return null}const a=o.detail?.galleryAlbums?.[0]?.code?.trim();if(a)try{await w.fetchSection(a,{force:!0})}catch{return o.detail}return o.detail}if(!([u,b]=j(()=>x(n.value)),u=await u,b(),u))throw Y({statusCode:404,statusMessage:"СÑÑаниÑа не найдена"});return q(()=>n.value,async(e,a)=>{if(!e||e===a)return;await x(e)||te({statusCode:404,statusMessage:"СÑÑаниÑа не найдена"})}),J({title:s.value?.seo?.title||c.value,description:s.value?.seo?.description||c.value,path:N.value,type:"article"}),(e,a)=>{const H=Q,R=X("viewer");return i(),r("section",ce,[l("div",ue,[f(ae,{items:L.value},null,8,["items"]),l("div",de,[l("div",null,[l("h1",{class:"h2",innerHTML:v.value},null,8,me)])]),l("div",ve,[C.value?(i(),r("div",pe,[f(H,null,{default:B(()=>[l("iframe",{src:C.value,title:`ÐаÑÑа: ${c.value}`,loading:"lazy"},null,8,_e)]),_:1})])):S.value?(i(),r("img",{key:1,class:"tourism-detail-hero",src:S.value,alt:c.value},null,8,ge)):y("",!0),T.value?(i(),r("div",{key:2,class:"tourism-detail-content",innerHTML:T.value},null,8,fe)):y("",!0)]),_.value.length?(i(),r("section",ye,[l("div",{class:"tourism-detail-gallery-head"},[a[0]||(a[0]=l("h2",{class:"tourism-detail-gallery-title"},"ФоÑогалеÑеÑ",-1)),l("div",{class:"slider-nav"},[l("button",{"aria-label":"ÐÑедÑдÑÑее ÑоÑо",onClick:V},"â"),l("button",{"aria-label":"СледÑÑÑее ÑоÑо",onClick:z},"â")])]),K((i(),r("div",{ref_key:"galleryViewerHost",ref:k,class:"tourism-detail-gallery-slider"},[f(le,{ref_key:"gallerySlider",ref:m,"track-id":"tourProgramsDetailGalleryTrack","wrap-class":"tourism-detail-gallery-slider-wrap","track-class":"tourism-detail-gallery-track","items-count":_.value.length,"visible-desktop":4,"visible-tablet":3,"visible-mobile":2,gap:18},{default:B(()=>[(i(!0),r(Z,null,ee(_.value,(g,F)=>(i(),r("button",{key:g.id,class:"tourism-detail-gallery-slide",type:"button",onClick:Ce=>G(F)},[l("img",{src:g.imageSrc,alt:g.title},null,8,be)],8,he))),128))]),_:1},8,["items-count"])])),[[R]])])):y("",!0)])])}}});
1export{$e 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.