1import{_ as z,l as K,o as G,s as dt,a as w,c as y,b as t,B as ut,C as _t,t as n,r as H,p as Z,q as F,y as M,D as gt,u as e,n as I,f as v,g as T,F as V,d as D,j,k as mt,E as O,m as ht,x as ft,A as pt,e as bt}from"./B0eYydTV.js";import{g as Q,S as U}from"./B2uKOqL4.js";import{V as L}from"./DOLO1TKq.js";import{S as vt}from"./DXbUalm5.js";import{F as wt}from"./CD6gAdLF.js";import{S as X,a as J}from"./CGG_I9SK.js";import{N as kt}from"./Bd0CZTew.js";import{n as c}from"./B8wn7_6v.js";import"./BBCT6HOI.js";import"./BjDz_dsu.js";import"./DD43T435.js";const St=""+new URL("crete.COUuQIBh.svg",import.meta.url).href,xt={class:"first__title"},Ct={class:"first__title-h3 h2"},Tt={class:"first__basement"},yt={class:"caption"},Bt={class:"first__background"},$t=["src","alt","width","height"],It={class:"first__background-title"},Lt={class:"first__background-title-h2 h2"},At={class:"first__background-basement caption"},Ht={__name:"PagesIndexFirstSection",props:{subtitle:{type:String,required:!0},bottomTextBefore:{type:String,required:!0},slogan:{type:String,required:!0},bottomTextAfter:{type:String,required:!0},firstBackground:{type:String,required:!0},firstBackgroundAlt:{type:String,default:"Olive grove in Crete"},firstBackgroundWidth:{type:Number,default:void 0},firstBackgroundHeight:{type:Number,default:void 0}},setup(_){Q.registerPlugin(U);const o=K(),d=H(null);G(()=>{k(),setTimeout(()=>{U.refresh()},1e3),window.addEventListener("scroll",x)});let s;function k(){s=Q.timeline({scrollTrigger:{trigger:".first",scrub:!0,pin:!0,onUpdate:u}}),U.matchMedia({"(min-width: 768px)":function(){s.fromTo(".first__background-img",{width:"26.04vw",height:"18.22vw"},{width:"100%",height:"100%",duration:2.5,ease:"power1.inOut"}).fromTo(".first__background-img",{borderRadius:L(.94)},{borderRadius:0}),s.fromTo(".first__background-title-h2",{y:L(2.2)},{y:0,ease:"power3.out",duration:2})},"(max-width: 767px)":function(){s.fromTo(".first__background-img",{scaleY:.34,scaleX:.35},{scale:1,duration:2.5,ease:"power1.inOut"}).fromTo(".first__background-img",{borderRadius:L(2.67)},{borderRadius:0}),s.fromTo(".first__background-title-h2",{y:L(9.07)},{y:0,ease:"power3.out",duration:2})},all:function(){s.fromTo(".first__background-basement",{opacity:0},{opacity:1,duration:2}).to(".first__background-basement",{duration:5})}})}function x(){window.pageYOffset>d.value.offsetHeight*2?(o.changeCanHeaderChange(!0),o.changeColorToWhite(!1),o.changeLogoShow(!0)):window.pageYOffset>d.value.offsetHeight&&(o.changeCanHeaderChange(!1),o.changeColorToWhite(!0),o.changeLogoShow(!0))}function u(h){h.progress!==1&&(h.progress>.15?(o.changeCanHeaderChange(!1),o.changeColorToWhite(!0),o.changeLogoShow(!0)):(o.changeCanHeaderChange(!1),o.changeColorToWhite(!1),o.changeLogoShow(!1)))}return dt(()=>{window.removeEventListener("scroll",x),s.kill()}),(h,f)=>(w(),y("section",{class:"section first",ref_key:"firstSection",ref:d},[t("div",xt,[f[0]||(f[0]=t("h1",{class:"first__title-h1"},[t("img",{class:"first__title-h1-img desktop",src:ut,alt:"Greek Legend"}),t("img",{class:"first__title-h1-img mobile",src:_t,alt:"Greek Legend"})],-1)),t("h3",Ct,n(_.subtitle),1)]),t("div",Tt,[t("p",yt,n(_.bottomTextBefore),1)]),t("div",Bt,[t("img",{class:"first__background-img",src:_.firstBackground,alt:_.firstBackgroundAlt,width:_.firstBackgroundWidth,height:_.firstBackgroundHeight,loading:"eager",fetchpriority:"high"},null,8,$t),t("div",It,[t("h2",Lt,n(_.slogan),1)]),t("p",At,n(_.bottomTextAfter),1)])],512))}},Et=z(Ht,[["__scopeId","data-v-3fb5120b"]]),A="data:image/svg+xml,%3csvg%20width='25'%20height='26'%20viewBox='0%200%2025%2026'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M25%2013L1%2013M1%2013L13%2025M1%2013L13%200.999998'%20stroke='%232C2C2C'/%3e%3c/svg%3e",qt={key:0,class:"section section-margin media"},Pt={class:"media__title title h2-smallcaps"},Wt={class:"media__container desktop"},Nt={class:"media__container-navigation"},Rt={class:"media__container-navigation-counter"},Ot={class:"media__container-navigation-counter-wrap"},Ut={class:"media__container-navigation-counter-span antique"},Ft={class:"media__container-navigation-counter-wrap"},Mt=["href"],Vt={class:"media__container-slider-item-wrap"},Dt=["src"],zt={class:"media__container-slider-item-content grotesk pre-line"},Gt={class:"media__container-slider-item-date antique"},Yt={class:"media-mobile"},jt=["href"],Qt={class:"media-mobile__slider-item-wrap"},Xt=["src"],Jt={class:"media-mobile__slider-item-content grotesk pre-line"},Kt={class:"media-mobile__slider-item-date antique"},Zt={class:"media-mobile__counter"},te={class:"media-mobile__counter-wrap"},ee={class:"media-mobile__counter-span antique"},oe={class:"media-mobile__counter-wrap"},ae="4",ie=300*1e3,se={__name:"PagesIndexMedia",async setup(_){let o,d;const s=[kt],{locale:k}=Z(),{data:x,refresh:u,status:h}=([o,d]=F(async()=>M("instagram-posts",async()=>{try{return await $fetch("/api/instagram-posts",{query:{language:k.value}})}catch{return[]}}
1,{watch:[k],default:()=>[]})),o=await o,d(),o);let f;const S=()=>{document.visibilityState==="visible"&&h.value!=="pending"&&u()};G(()=>{f=window.setInterval(S,ie),window.addEventListener("focus",S),document.addEventListener("visibilitychange",S)}),gt(()=>{window.clearInterval(f),window.removeEventListener("focus",S),document.removeEventListener("visibilitychange",S)});const E=i=>`${i?.url||""} ${i?.media?.src||""}`.match(/\/(?:p|reel|tv|i)\/([^/?#\s]+)/)?.[1]||"",a=O(()=>(Array.isArray(x.value)?x.value:[]).map(i=>{const b=E(i);return{img:b?`/api/instagram-image/${encodeURIComponent(b)}?v=${ae}`:i?.media?.src,content:i?.content?.split(` 2 3`)[0]||"",date:i?.date||"",link:i?.url||"https://www.instagram.com/greeklegend.gr/"}}).filter(i=>i.img)),m=H(3),q=O(()=>m.value.toString().length<2&&a.length>9?"0"+m.value.toString():m.value),p=H(1);function P(i){m.value=i.activeIndex+3}function W(i){p.value=i.activeIndex+1}const N=O(()=>p.value.toString().length<2&&a.length>9?"0"+p.value.toString():p.value);return(i,b)=>e(a).length?(w(),y("div",qt,[t("h2",Pt,n(i.$t("main-page.media")),1),b[0]||(b[0]=t("hr",{class:"desktop media__hr"},null,-1)),t("div",Wt,[t("div",Nt,[t("div",Rt,[t("div",Ot,[t("img",{class:I(["media__container-navigation-counter-wrap-arrow prev",{"media__container-navigation-counter-wrap-arrow-disable":e(m)===3}]),src:A,alt:"Arrow"},null,2)]),t("span",Ut,n(e(q))+" / "+n(e(a).length),1),t("div",Ft,[t("img",{class:I(["media__container-navigation-counter-wrap-arrow next",{"media__container-navigation-counter-wrap-arrow-disable":e(m)===e(a).length}]),src:A,alt:"Arrow"},null,2)])])]),v(e(J),{class:"media__container-slider",modules:s,slidesPerView:3,slidesPerGroup:3,spaceBetween:1,navigation:{nextEl:".next",prevEl:".prev"},onSlideChange:P},{default:T(()=>[(w(!0),y(V,null,D(e(a),l=>(w(),j(e(X),{key:l.content},{default:T(()=>[t("a",{href:l.link,target:"_blank",class:"media__container-slider-item"},[t("div",Vt,[t("img",{class:"media__container-slider-item-wrap-img",src:l.img,alt:"Instagram post",width:"1080",height:"1440",loading:"lazy",decoding:"async"},null,8,Dt)]),t("p",zt,n(l.content),1),t("p",Gt,n(l.date),1)],8,Mt)]),_:2},1024))),128))]),_:1})]),t("div",Yt,[v(e(J),{onSlideChange:W,class:"media-mobile__slider",modules:s,navigation:{nextEl:".next",prevEl:".prev"}},{default:T(()=>[(w(!0),y(V,null,D(e(a),l=>(w(),j(e(X),{key:l.content},{default:T(()=>[t("a",{href:l.link,target:"_blank",class:"media-mobile__slider-item"},[t("div",Qt,[t("img",{class:"media-mobile__slider-item-wrap-img",src:l.img,alt:"Instagram post",width:"1080",height:"1440",loading:"lazy",decoding:"async"},null,8,Xt)]),t("p",Jt,n(l.content),1),t("p",Kt,n(l.date),1)],8,jt)]),_:2},1024))),128))]),_:1}),t("div",Zt,[t("div",te,[t("img",{class:I(["media-mobile__counter-wrap-arrow prev",{"media-mobile__counter-wrap-arrow-disable":e(p)===1}]),src:A,alt:"Arrow"},null,2)]),t("span",ee,n(e(N))+" / "+n(e(a).length),1),t("div",oe,[t("img",{class:I(["media-mobile__counter-wrap-arrow next",{"media-mobile__counter-wrap-arrow-disable":e(p)===e(a).length}]),src:A,alt:"Arrow"},null,2)])])])])):mt("",!0)}},ne=z(se,[["__scopeId","data-v-b06e62a1"]]),re={class:"about__right"},ce={class:"about__block"},le={class:"about__right-text grotesk"},de={class:"about__block about__block-bottom"},ue={class:"about__right-title antique"},_e={class:"about__right-text antique"},ge={class:"section section-margin products"},me={class:"title h2-smallcaps"},he={class:"products__cards desktop"},fe={class:"products__card-title antique pre-line"},pe=["src"],be={class:"mobile"},ve={class:"section video"},we={class:"video-text antique"},ke={__name:"index",async setup(_){let o,d;const s=K(),k=H();G(()=>{s.changeLogoShow(!1),s.changeCanHeaderChange(!1),s.changeColorToWhite(!1),window.addEventListener("scroll",()=>{const r=k.value.getBoundingClientRect();r.top<=0?(s.changeLogoShow(!0),s.changeCanHeaderChange(!0),s.changeColorToWhite(!1)):r.top>0&&r.top<200&&(s.changeLogoShow(!0),s.changeCanHeaderChange(!1),s.changeColorToWhite(!0))})});const u=ft().public.api_route,{locale:h}=Z(),f=ht(),{data:S}=([o,d]=F(()=>M("main-page",()=>$fetch(u+`/api/main-page?populate=deep&locale=${h.value}`),{watch:[h]})),o=await o,d(),o),{data:E}=([o,d]=F(()=>M("main-page-products-images",()=>$fetch(u+"/api/main-page?populate=deep&locale=en"))),o=await o,d(),o),a=S.value.data.attributes,m=E.value?.data?.attributes?.products||[];function q(r,g){const C=String(r?.title||"").trim().toLowerCase(),$=(m.find(lt=>String(lt?.title||"").trim().toLowerCase()===C)||m[g]||r)?.bottleImg?.data?.attributes?.url||r?.bottleImg?.data?.attributes?.url;return $?u+$:""}const p=c(a.firstSection.subtitle),P=c(a.firstSection.bottomTextBefore),W=c(a.firstSection.slogan),N=c(a.firstSection.bottomTextAfter),i=a.firstSection.background.data.attributes,b=u+i.url,l=i.alternativeText||"Olive grove in Crete",tt=i.width,et=i.height,ot=u+a.secondSection.img.data.attributes.url,at=c(a.secondSection.topText),it=c(a.secondSection.linkText),st=c(a.secondSection.bottomTitle),nt=c(a.secondSection.bottomText),R=[];
3a.products.forEach((r,g)=>{const C={name:c(r.title),capacity:c(r.capacity),img:q(r,g)};R.push(C)});const Y=[];a.families.forEach(r=>{const g={name:`Family 4`+c(r.name),greekName:c(r.greekName),text:c(r.description),link:"/"+r.name.toLowerCase(),img:u+r.photo.data.attributes.url};Y.push(g)});const rt=c(a.videoSection.text),ct=u+a.videoSection.background.data.attributes.url;return(r,g)=>{const C=pt;return w(),y("main",null,[v(Et,{subtitle:e(p),bottomTextBefore:e(P),slogan:e(W),bottomTextAfter:e(N),firstBackground:b,firstBackgroundAlt:e(l),firstBackgroundWidth:e(tt),firstBackgroundHeight:e(et)},null,8,["subtitle","bottomTextBefore","slogan","bottomTextAfter","firstBackgroundAlt","firstBackgroundWidth","firstBackgroundHeight"]),t("section",{class:"section about",ref_key:"aboutSection",ref:k},[t("div",{class:"about__left"},[t("img",{class:"about__left-img",src:ot,alt:"olive farmer"})]),t("div",re,[t("div",ce,[t("p",le,n(e(at)),1),v(C,{title:"About",to:e(f)("/about"),class:"about__right-link link underline"},{default:T(()=>[bt(n(e(it)),1)]),_:1},8,["to"])]),g[0]||(g[0]=t("div",{class:"about__right-wrapper"},[t("p",{class:"about__right-caption h1"},"Greece"),t("img",{class:"about__right-img",src:St,alt:"Crete"}
4)],-1)),t("div",de,[t("h6",ue,n(e(st)),1),t("p",_e,n(e(nt)),1)])])],512),t("section",ge,[t("h2",me,n(r.$t("main-page.products")),1),g[1]||(g[1]=t("hr",null,null,-1)),t("div",he,[(w(),y(V,null,D(R,(B,$)=>t("div",{class:"products__card",key:$},[t("h6",fe,n(B.name+` 5`+B.capacity),1),t("img",{class:"products__card-img",src:B.img,alt:"Olive oil bottle"},null,8,pe)])),64))]),t("div",be,[v(vt,{list:R})])]),v(wt,{families:Y}),t("div",ve,[v(C,{to:e(f)("/harvest")},{default:T(()=>[t("h6",we,n(e(rt)),1)]),_:1},8,["to"]),t("img",{class:"video-img",src:ct,alt:"How we produce olive oil"})]),v(ne)])}}},Ee=z(ke,[["__scopeId","data-v-9d34087e"]]);export{Ee 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.