PageSourceSearch

https://reservandonos.com/_nuxt/DNywGjgk.js

js reservandonos.com collected 2026-10-01 16:31:03 UTC 7,131 bytes, 1 lines download raw bytes

1import Y from"./B44xjRPs.js";import{_ as j}from"./BQlWkqZF.js";import{l as G,m as f,r as J,b as E,E as Q,L as r,M as i,u as s,Z as c,O as e,_ as g,I as y,$ as S,a0 as V,Q as z,J as B,a8 as D,aa as F,y as M,ab as P,a2 as Z}from"./D0-hQYVk.js";import{b as H,g as k,c as W,d as X}from"./DQkVOdlu.js";import{I as ee}from"./B2h8GqJQ.js";import{u as se}from"./D7TC4me7.js";import{u as te}from"./A3OK8YKt.js";const ae={key:0,class:"rv2-page general-config"},oe={key:0,class:"rv2-msg"},re={key:1,class:"rv2-msg"},ie={key:2,class:"rv2-wrap"},ne=["value"],le={class:"rv2-header"},ce={class:"rv2-logo"},de=["src"],ue={class:"rv2-title"},me={class:"rv2-sub"},ve={class:"rv2-place"},pe={class:"rv2-section-title"},_e={class:"rv2-section-sub"},fe={class:"rv2-stars"},ge=["aria-label","onClick"],ye={class:"rv2-star-label"},he=["placeholder"],be=["disabled"],we={key:1,class:"survey-main-container general-config"},Se={key:0,class:"survey-header-container"},ke={class:"title"},Ce={key:1},Ie={key:0,class:"survey-header-container"},Ne={key:1},$e=["value"],xe={class:"survey-header-container"},Re=["src"],qe={class:"subtitle"},Le={class:"place-name"},Ee={class:"survey-review-header"},Ve={class:"stars-container"},ze=["onClick"],Be={class:"qualification-button-send"},De=["disabled"],Fe=G({__name:"encuesta-satisfaccion",setup(Me){const C=se(),{toastAlert:h}=te(),{query:_}=H(),{reserva:p}=_,T=f(()=>W("profile_v2")),I=f(()=>_.preview==="1"||_.demo==="1"),A=f(()=>_.place||"BRASS Cancún"),t=J({error:!1,message:"",reviewed:!1,place:"",reservationId:"",stars:{5:"Excelente",4:"Bueno",3:"Regular",2:"Malo",1:"Pésimo"},loading:!0}),U={Excelente:5,Bueno:4,Regular:3,Malo:2,Pésimo:1},d=E(0),m=E(""),N=`${k.imageKeyCDN}/assets/images/loaders/loader.gif`,b=f(()=>m.value.trim()!==""&&d.value!==null),$=o=>{d.value=o},x=async()=>{const o=t.reservationId;if(b.value){if(I.value){h(`Preview: rating ${d.value}/5 enviado (simulado)`),q();return}R("#submit-comment","#loader-submit-comment");try{await C.createSatisfactionReview({score:d.value,comment:m.value,reservationId:o}),q(),h("Se envió el comentario"),setTimeout(()=>{window.location.href="/"},2e3)}catch{h("No se pudo enviar tu comentario, vuelve a intentarlo en un rato.","Error","error"),R("#submit-comment","#loader-submit-comment")}}},R=(o,a)=>{const v=document.querySelector(o),u=document.querySelector(a);if(!(!u||!v)){if(u.classList.contains("img-loader-show")){u.classList.remove("img-loader-show"),v.disabled=!1;return}u.classList.add("img-loader-show"),v.disabled=!0}},q=()=>{m.value="",d.value=0},O=async()=>{if(I.value){t.reservationId="preview",t.reviewed=!1,t.place=A.value,t.loading=!1;return}try{const o=await C.decryptReservation((p==null?void 0:p.toString())||"");t.reservationId=o.reservationId,t.reviewed=o.reviewed}catch{t.error=!0,t.message="No se pudo encontrar la reserva"}finally{t.loading=!1}},K=()=>{const o=document.querySelector(".profile-form-comment");document.querySelectorAll(".father-div-stars").forEach(a=>{a.addEventListener("click",v=>{var n;if(!v.target)return;const u=v.target.closest(".father-div-stars");if(u){const l=document.querySelector(".father-div-stars.star-active");l&&l.classList.remove("star-active"),u.classList.add("star-active");const w=(n=u.querySelector("span"))==null?void 0:n.innerText;d.value=U[w];const L=document.querySelector("#submit-comment");if(!L)return;L.disabled=!(o!=null&&o.checkValidity()&&d.value!==0)}})})};return Q(()=>{O(),K()}),(o,a)=>{const v=Y,u=j;return r(),i(y,null,[!s(t).loading&&s(T)?(r(),i("div",ae,[s(t).error?(r(),i("div",oe,c(s(t).message),1)):s(t).reviewed?(r(),i("div",re," La reseña de esta reserva ya fue realizada, gracias por dar tu opinión. ")):(r(),i("div",ie,[e("input",{id:"reservationId",type:"text",value:s(p),hidden:""},null,8,ne),e("div",le,[e("div",ce,[e("img",{loading:"lazy",src:`${s(k).imageKeyCDN}/assets/images/logos/isotipo-reservandonos.svg`,alt:"Reservándonos",width:"44",height:"44"},null,8,de)]),e("h1",ue,c(o.$t("satisfactionSurvey.thankYouForUsing")),1),e("p",me,[g(c(o.$t("satisfactionSurvey.feedbackForServiceImprovement"))+" ",1),s(t).place?(r(),i(y,{key:0},[a[2]||(a[2]=g(" ")),e("span",ve,c(s(t).place),1)],64)):S("",!0),a[3]||(a[3]=g(". "))])]),e("form",{class:"rv2-card",onSubmit:P(x,["prevent"])},[e("h2",pe,c(o.$t("satisfactionSurvey.giveUsYourOpinion")),1),e("p",_e,c(o.$t("satisfactionSurvey.rateThePlace")),1),e("div",fe,[(r(!0),i(y,null,V(s(t).stars,(n,l)=>(r(),i("button",{key:l,type:"button",class:z(["rv2-star-cell",{"rv2-star-cell--active":Number(l)<=s(d)}]),"aria-label":n,onClick:w=>$(Number(l))},[B(v,{name:Number(l)<=s(d)?"material-symbols:star":"material-symbols:star-outline",class:"rv2-star-icon"},null,8,["name"]),e("span",ye,c(n),1)],10,ge))),128))]),D(e("textarea",{rows:"4",class:"rv2-textarea",placeholder:s(t).place?o.$t("satisfactionSurvey.tellUsExperience",{place:s(t).place}):o.$t("satisfactionSurvey.writeYourOpinion"),"onUpdate:modelValue":a[0]||(a[0]=n=>M(m)?m.value=n:null),required:""},null,8,he),[[F,s(m)]]),e("button",{type:"submit",id:"submit-comment",class:"rv2-submit",disabled:!s(b)},[e("img",{loading:"lazy",class:"img-loader",id:"loader-submit-comment",src:N,alt:"loader"}),e("span",null,c(o.$t("satisfactionSurvey.postReview")),1)],8,be)],32)]))])):s(t).loading?S("",!0):(r(),i("div",we,[s(t).error?(r(),i("div",Se,[e("p",ke,c(s(t).message),1)])):(r(),i("div",Ce,[s(t).reviewed?(r(),i("div",Ie,a[4]||(a[4]=[e("p",{class:"title"}," La reseña de esta reserva ya fue realizada, gracias por dar tu opinión. ",-1)]))):(r(),i("div",Ne,[e("input",{id:"reservationId",type:"text",value:s(p),hidden:""},null,8,$e),e("div",xe,[e("img",{loading:"lazy",src:`${s(k).imageKeyCDN}/assets/images/logos/isotipo-reservandonos.svg`,alt:"img-logo",width:"100",height:"100",class:"isotipo"},null,8,Re),a[6]||(a[6]=e("p",{class:"title"},"Gracias por haber usado Reservandonos.com",-1)),e("p",qe,[a[5]||(a[5]=g(" Para mejorar la calidad de nuestro servicio es importante para nosotros saber su opinión acerca del lugar ")),e("span",Le,c(s(t).place),1)])]),e("div",Ee,[a[8]||(a[8]=e("p",{class:"title"},"Danos tu opinión del lugar",-1)),a[9]||(a[9]=e("p",{class:"subtitle"},"Califica el lugar",-1)),e("form",{onSubmit:P(x,["prevent"]),class:"profile-form-comment profile-form-comment-show"},[e("div",Ve,[(r(!0),i(y,null,V(s(t).stars,(n,l)=>(r(),i("div",{key:l,class:"father-div-stars",onClick:w=>$(Number(l))},[B(v,{name:s(ee).star,class:z(["tw-text-score",{"color-disabled-start":Number(l)!==s(d)}])},null,8,["name","class"]),e("span",null,c(n),1)],8,ze))),128))]),D(e("textarea",{rows:"3",class:"py-3 px-4 my-2",placeholder:"Escribe tu opinión","onUpdate:modelValue":a[1]||(a[1]=n=>M(m)?m.value=n:null),required:""},null,512),[[F,s(m)]]),e("div",Be,[e("button",{disabled:!s(b),class:"py-2 px-4",id:"submit-comment"},[e("img",{loading:"lazy",class:"img-loader",id:"loader-submit-comment",src:N,alt:"loader"}),a[7]||(a[7]=e("span",{class:"text-white font-bold disabled:text-gray-200"},"Publicar opinión",-1))],8,De)])],32)])]))]))])),s(t).loading?(r(),Z(u,{key:2})):S("",!0)],64)}}}),je=X(Fe,[["__scopeId","data-v-6c6438e0"]]);export{je 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.