1import A from"./DQ4MK80y.js";import{a as F,cA as B,k,r as C,ad as x,h as R,l as n,o as r,af as t,am as S,V as g,bl as h,a$ as G,bA as c,i as f}from"./D4DBs9ZT.js";const $=()=>{const _=F().public;return{getGoogleReviews:async a=>{try{const d=a?`?place_id=${encodeURIComponent(a)}`:"",p=await fetch(`${_.DIRECTUS_API_URL}${B.GOOGLE_REVIEWS}${d}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!p.ok)return console.error("Failed to fetch google reviews:",p.status),null;const i=await p.json();return!(i!=null&&i.success)||!(i!=null&&i.data)?null:i.data}catch(d){return console.error("Error fetching google reviews:",d),null}}}},D={id:"google-review",class:"bg-[linear-gradient(180deg,rgba(0,0,0,0.1)_0%,rgba(0,0,0,0)_100%)] flex overflow-hidden flex-col items-center mx-auto w-full pb-6 md:pb-12 md:px-[80px] md-lg:px-[191px]"},L={class:"mt-7 md:mt-10 flex flex-col items-center px-4 md:px-0 w-full"},M={class:"flex items-center gap-2 md:gap-3"},I={class:"mt-4 md:mt-6 text-[#1C54E3] text-[28px] md:text-[32px] leading-[1.2] text-center"},j={class:"font-bold"},z={class:"font-medium"},P={class:"hidden md:grid mt-8 grid-cols-3 gap-4 lg:gap-5 w-full px-4 md:px-0"},N={class:"w-[88px] h-[88px] rounded-full bg-white border border-[#E8E8E8] overflow-hidden flex-shrink-0 flex items-center justify-center text-[#5F5F5F] text-[30px] font-semibold"},T=["src","alt"],U={key:1},V={class:"min-w-0 flex-1"},O={class:"mt-3 text-[26px] leading-[1.35] font-medium text-[#242322] line-clamp-3"},Q={class:"mt-4 text-[30px] leading-none tracking-[6px] text-[#F9BE00]"},q={class:"md:hidden mt-6 w-full px-4 space-y-4"},K={class:"w-[72px] h-[72px] rounded-full bg-white border border-[#E8E8E8] overflow-hidden flex-shrink-0 flex items-center justify-center text-[#5F5F5F] text-[24px] font-semibold"},W=["src","alt"],X={key:1},H={class:"min-w-0 w-full"},J={class:"mt-2 text-[21px] leading-[1.35] font-medium text-[#242322] line-clamp-2"},Y={class:"mt-3 text-[24px] leading-none tracking-[4px] text-[#F9BE00]"},te=k({__name:"GoogleReviewSection",setup(_){const u=C(null),a=x(()=>{var e;const o=(e=u.value)==null?void 0:e.reviews;return!o||!o.length?[]:o.slice(0,6).map((s,l)=>({author:s.author||`Reviewer ${l+1}`,avatar:s.profile_photo_url||null,text:s.text||"",rating:typeof s.rating=="number"?s.rating:0}))}),d=x(()=>{var e,s;if(typeof((s=(e=u.value)==null?void 0:e.place)==null?void 0:s.rating)=="number")return u.value.place.rating;if(!a.value.length)return 0;const o=a.value.reduce((l,m)=>l+m.rating,0);return Number((o/a.value.length).toFixed(1))}),p=x(()=>{var e,s;const o=((s=(e=u.value)==null?void 0:e.reviews)==null?void 0:s.length)||a.value.length||0;return o?`/5 - from ${o} reviews`:"/5 - from 0 reviews"}),i=x(()=>d.value.toFixed(1)),b=x(()=>a.value.slice(0,3)),E=o=>{const e=Math.floor(d.value),s=d.value-e;return o<=e?"100%":o===e+1?`${Math.round(s*100)}%`:"0%"},y=o=>{const e=E(o);return e==="100%"?"inset(0 0 0 0)":e==="0%"?"inset(0 100% 0 0)":`inset(0 calc(100% - ${e}) 0 0)`},v=o=>{const e=Math.max(0,Math.min(5,Math.round(o)));return"â
".repeat(e)+"â".repeat(5-e)},w=o=>{const e=o.trim();return e?e.charAt(0).toUpperCase():"A"};return R(async()=>{try{const e=await $().getGoogleReviews();e&&(u.value=e)}catch(o){console.error("Failed to load google reviews:",o)}}),(o,e)=>{const s=A;return r(),n("section",D,[e[2]||(e[2]=t("div",{class:"flex flex-col self-stretch px-4 pt-8 font-bold md:px-0"},[t("div",{class:"text-[24px] text-[#E23800] font-bold"}," Google Review "),t("div",{class:"mt-2 text-3xl text-[#242322] md:text-[32px]"}," Google ã®ã¯ãã³ã ")],-1)),t("div",L,[t("div",M,[(r(),n(g,null,h(5,l=>t("div",{key:`summary-star-${l}`,class:"relative w-12 h-12 md:w-[66px] md:h-[66px]"},[e[1]||(e[1]=t("svg",{viewBox:"0 0 24 24",class:"w-full h-full text-[#D2D2D2]",fill:"currentColor","aria-hidden":"true"},[t("path",{d:"M12 1.8l3.08 6.24 6.9 1-4.99 4.86 1.18 6.88L12 17.54l-6.17 3.24 1.18-6.88L2.02 9.04l6.9-1L12 1.8z"})],-1)),t("div",{class:"absolute inset-0 overflow-hidden",style:G({clipPath:y(l)})},e[0]||(e[0]=[t("svg",{viewBox:"0 0 24 24",class:"w-full h-full text-[#F9BE00]",fill:"currentColor","aria-hidden":"true"},[t("path",{d:"M12 1.8l3.08 6.24 6.9 1-4.99 4.86 1.18 6.88L12 17.54l-6.17 3.24 1.18-6.88L2.02 9.04l6.9-1L12 1.8z"})],-1)]),4)])),64))]),t("div",I,[t("span",j,c(f(i)),1),t("span",z,c(f(p)),1)]),S(s,{name:"logos:google",class:"mt-6 h-10 w-32 object-contain"})]),t("div",P,[(r(!0),n(g,null,h(f(a),(l,m)=>(r(),n("article",{key:`desktop-review-${m}
1`,class:"bg-white rounded-[20px] p-5 min-h-[190px] flex gap-4 items-center shadow-[0_6px_18px_rgba(36,35,34,0.08)]"},[t("div",N,[l.avatar?(r(),n("img",{key:0,src:l.avatar,alt:l.author,class:"block w-full h-full rounded-full object-contain",loading:"lazy"},null,8,T)):(r(),n("span",U,c(w(l.author)),1))]),t("div",V,[t("p",O,c(l.text),1),t("p",Q,c(v(l.rating)),1)])]))),128))]),t("div",q,[(r(!0),n(g,null,h(f(b),(l,m)=>(r(),n("article",{key:`mobile-review-${m}`,class:"bg-white rounded-[20px] p-4 flex gap-4 items-center shadow-[0_6px_16px_rgba(36,35,34,0.08)]"},[t("div",K,[l.avatar?(r(),n("img",{key:0,src:l.avatar,alt:l.author,class:"block w-full h-full rounded-full object-contain",loading:"lazy"},null,8,W)):(r(),n("span",X,c(w(l.author)),1))]),t("div",H,[t("p",J,c(l.text),1),t("p",Y,c(v(l.rating)),1)])]))),128))]),e[3]||(e[3]=t("a",{href:"https://www.google.com/maps/place/%E3%83%9C%E3%82%B9%E3%83%88%E3%83%AA%E3%83%BC%E3%83%BB%E3%83%9F%E3%83%A5%E3%83%BC%E3%82%B8%E3%83%83%E3%82%AF%E3%83%BB%E3%82%A2%E3%82%AB%E3%83%87%E3%83%9F%E3%83%BC+%2F+Glocal+Consulting+%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE/@35.674297,139.7699218,18.21z/data=!3m1!5s0x60188c011138b22b:0x10743f2deb97d92e!4m8!3m7!1s0x60188baac3b595bb:0x81e5575c538f3c4b!8m2!3d35.6742109!4d139.7700701!9m1!1b1!16s%2Fg%2F11sk86852x?entry=ttu&g_ep=EgoyMDI2MDQxNS4wIKXMDSoASAFQAw%3D%3D",target:"_blank",rel:"noopener noreferrer",class:"mt-7 md:mt-8 text-[#2C61D8] text-[20px] md:text-[24px] font-medium underline-offset-2 hover:underline px-4 md:px-0"}," ãã¹ã¦ã® Google ã®ã¯ãã³ããè¦ã ",-1))])}}});export{te 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.