1import{u as j,a as q}from"./e5S6oooK.js";import{v as f,a as B,e as C,w as N,y as R,j as l,o as i,i as e,A as r,z as p,F as g,r as h,t as z,B as V}from"./v8YPAMLd.js";const A={class:"border-y border-[#e9e7df] bg-mist/50"},E={class:"mx-auto max-w-7xl w-11/12 px-1 sm:px-5 py-14"},F={class:"mb-8 flex flex-col items-center gap-3 text-center"},G={class:"mt-1 flex flex-wrap items-center justify-center gap-x-3 gap-y-1"},I={class:"text-3xl font-extrabold text-[#15140f]"},H={class:"text-sm text-[#565243]"},P={class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},Q={class:"flex items-center gap-2 flex-wrap"},S={class:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-[#f4f3ee] text-sm font-bold text-[#343225]"},U={class:"min-w-0 flex-1"},J={class:"flex items-center gap-1.5"},K={class:"min-w-0 truncate font-bold text-[#15140f]"},O={key:0,class:"text-xs text-[#6b6757]"},W={class:"mt-3 text-base leading-none","aria-hidden":"true"},X={class:"mt-2 text-sm text-[#343225]"},Y=` 2 query { 3 contentTypeListings(filter: {type: "trustpilot_rating"}) { 4 trustpilot_ratings: results { 5 ... on NodeTrustpilotRating { 6 title 7 description { processed } 8 dateAndTime { time } 9 name 10 rating 11 } 12 } 13 } 14 } 15`,_=12,st={__name:"TrustpilotReview",async setup(Z){let c,d;const u=f(!1);B(()=>{u.value=!0});const m={rating:"4.4",count:"+12.000"},x=f([]),w=C(()=>x.value.slice(0,6)),y=j(Y),{data:v,error:b}=([c,d]=N(()=>q("trustpilotReviews",y)),c=await c,d(),c);R(v,s=>{!(s!=null&&s.data)||b.value||(x.value=s.data.contentTypeListings.trustpilot_ratings.map(({title:t,description:a,name:o,dateAndTime:n,rating:T})=>({title:t||"",comment:(a==null?void 0:a.processed)||"",name:o||"Anónimo",date:(n==null?void 0:n.time)||"",rating:T||5})).sort((t,a)=>new Date(a.date)-new Date(t.date)).slice(0,15))},{immediate:!0});const k=s=>(s||"?").trim().split(/\s+/).map(t=>t[0]).slice(0,2).join("").toUpperCase(),M=s=>{if(!s)return"";const t=Math.floor((Date.now()-new Date(s))/864e5);if(t<1)return"hoy";if(t<7)return`hace ${t} dÃa${t>1?"s":""}`;if(t<30){const o=Math.floor(t/7);return`hace ${o} semana${o>1?"s":""}`}if(t<365){const o=Math.floor(t/30);return`hace ${o} mes${o>1?"es":""}`}const a=Math.floor(t/365);return`hace ${a} año${a>1?"s":""}`},L=s=>(s||"").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/"/g,'"').replace(/'|'/g,"'").replace(/“|”/g,'"').replace(/\s+/g," ").trim(),$=s=>(s==null?void 0:s.length)>150?s.slice(0,160)+"...":s||"",D=s=>{const t=s||"Anónimo";return t.length>_?t.slice(0,_).trim()+"â¦":t};return(s,t)=>(i(),l("section",A,[e("div",E,[e("div",F,[t[3]||(t[3]=e("p",{class:"font-poppins text-xs uppercase tracking-[0.18em] text-tdv-Secondary"}," Lo que dicen los viajeros ",-1)),t[4]||(t[4]=e("h2",{class:"text-2xl font-poppins font-extrabold text-[#15140f] sm:text-3xl"}," +2 millones de colombianos confÃan en nosotros ",-1)),e("div",G,[e("span",I,r(m.rating),1),t[2]||(t[2]=e("span",{class:"text-lg leading-none text-[#f5b400]","aria-hidden":"true"},"â â â â â ",-1)),e("span",H,[t[0]||(t[0]=p(" promedio en ")),t[1]||(t[1]=e("b",{class:"text-[#15140f]"},"Trustpilot y Google",-1)),p(" · "+r(m.count)+" reseñas ",1)])])]),e("div",P,[(i(!0),l(g,null,h(w.value,(a,o)=>(i(),l("article",{key:o,class:"flex flex-col rounded-2xl border border-[#e9e7df] bg-white p-5 shadow-[0_2px_10px_rgba(21,20,15,.05)]"},[e("div",Q,[e("span",S,r(k(a.name)),1),e("div",U,[e("div",J,[e("p",K,r(D(a.name)),1),t[5]||(t[5]=e("span",{class:"inline-flex shrink-0 items-center gap-0.5 whitespace-nowrap rounded-full bg-[#16a34a]/10 px-1.5 py-0.5 text-[0.6rem] font-semibold text-[#16a34a]"},[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round",class:"h-3 w-3","aria-hidden":"true"},[e("path",{d:"M5 12l5 5 9-11"})]),p(" Verificado ")],-1))]),u.value?(i(),l("p",O,r(M(a.date)),1)):z("",!0)]),t[6]||(t[6]=e("span",{class:"flex shrink-0 items-center gap-1 whitespace-nowrap text-sm font-semibold text-[#00b67a]"},[e("svg",{viewBox:"0 0 24 24",class:"h-4 w-4 shrink-0","aria-hidden":"true"},[e("path",{fill:"currentColor",d:"M12 2l2.9 6.3 6.9.6-5.2 4.5 1.6 6.7L12 16.9 5.8 20.6l1.6-6.7L2.2 8.9l6.9-.6z"})]),e("span",{class:"sm:inline text-[#343225]"},"Trustpilot")],-1))]),e("span",W,[(i(),l(g,null,h(5,n=>e("span",{key:n,class:V(n<=Math.round(a.rating)?"text-[#f5b400]":"text-gray-300")},"â ",2)),64))]),e("p",X," â"+r($(L(a.comment)||a.title))+"â ",1)]))),128))])])]))}};export{st 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.