vue-hotel-search-widget 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14596,6 +14596,8 @@ ACZNf4AbnM7OUNj5TEYs6t/tUYouvTB7gH452I3EH6KWBl+ZTgCg0RFkOMazNOjn
|
|
|
14596
14596
|
Q(Tt(nu), {
|
|
14597
14597
|
modelValue: x.childAges[me] ?? 0,
|
|
14598
14598
|
options: a,
|
|
14599
|
+
optionLabel: "label",
|
|
14600
|
+
optionValue: "value",
|
|
14599
14601
|
"onUpdate:modelValue": (Ie) => So(R, me, Ie),
|
|
14600
14602
|
placeholder: "Age",
|
|
14601
14603
|
class: "child-age-dropdown"
|
|
@@ -2709,4 +2709,4 @@ ToU0Pocrg6CFHImqq2z+cOeWnURrV0f0I1UWWGCb79OZxZ5oDjM9uCLRsoe8+Npg
|
|
|
2709
2709
|
ACZNf4AbnM7OUNj5TEYs6t/tUYouvTB7gH452I3EH6KWBl+ZTgCg0RFkOMazNOjn
|
|
2710
2710
|
4J0yfbaPvpVgKzF2WRyn63mTO2tdLRl5s9uqMFhXmCs6IzEqBpxMKL1aS6ONZLDG
|
|
2711
2711
|
5qPtpCPJnUFQEBTVlSO15QIDAQAB
|
|
2712
|
-
-----END PUBLIC KEY-----`,Pu="https://hotelapihub.dev.futuretravelplatform.com",Iu="/api/v1/hotels/search-form",Ou="https://adminapi.dev.futuretravelplatform.com",xu="/api/MasterSearch/GetAllCountry/EN",Ni={__name:"HotelSearchWidget",props:{config:{type:Object,default:()=>({})},minWidth:{type:[Number,String],default:void 0}},setup(t){const e=t,n=[{geoId:"618704",geoTitle:"Dubai",geoName:"United Arab Emirates",displayName:"Dubai, United Arab Emirates",type:"city",countryCode:"AE",lattitude:25.27063,longitude:55.30037},{geoId:"804926",geoTitle:"Dubai Hills",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Hills, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.103307,longitude:55.247966},{geoId:"618818",geoTitle:"Dubai Media City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Media City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.094279,longitude:55.154095},{geoId:"618493",geoTitle:"Dubai Internet City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Internet City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.097792,longitude:55.163026},{geoId:"618494",geoTitle:"Dubai Studio City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Studio City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.041623,longitude:55.251897},{geoId:"618670",geoTitle:"Dubai Sports City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Sports City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.036236,longitude:55.217676},{geoId:"618631",geoTitle:"Dubai Production City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Production City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.032507,longitude:55.189725},{geoId:"618733",geoTitle:"Ski Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Ski Dubai, Dubai, United Arab Emirates",type:"point_of_interest",countryCode:"AE",lattitude:25.117395,longitude:55.198021},{geoId:"2442684",geoTitle:"Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Dubai, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.273935,longitude:55.32799},{geoId:"1487637",geoTitle:"Dubai Luxury Stay - Downtown Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Luxury Stay - Downtown Dubai, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.076485,longitude:55.144405},{geoId:"1910103",geoTitle:"Dubai Arch",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Arch, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.071701,longitude:55.143578},{geoId:"737327",geoTitle:"Angsana Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Angsana Dubai, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.215,longitude:55.279},{geoId:"2231257",geoTitle:"Dubai Backpackers",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Backpackers, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.09714,longitude:55.17065},{geoId:"2322561",geoTitle:"Dubai Hostel",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Hostel, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.09696,longitude:55.1776},{geoId:"2323808",geoTitle:"Hostel Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Hostel Dubai, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.19179,longitude:55.26195},{geoId:"2442649",geoTitle:"Dubai 360",geoName:"Dubai, United Arab Emirates",displayName:"Dubai 360, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.088923,longitude:55.146818}],r=`${Pu}${Iu}`,i=[{country_code:"KW",country_name:"Kuwait",country_id:"2108231234183749619"},{country_code:"BH",country_name:"Bahrain",country_id:"2108231234168861036"},{country_code:"QA",country_name:"Qatar",country_id:"2108231234193188713"},{country_code:"OM",country_name:"Oman",country_id:"2108231234191323057"}],o=[{label:"Breakfast Only",value:2},{label:"Breakfast or Lunch or Dinner",value:3},{label:"Breakfast or Lunch and Dinner",value:4},{label:"All Inclusive",value:5},{label:"Room Only",value:1}],s=[{label:"Under 1",value:0},...Array.from({length:17},(y,g)=>({label:`${g+1}`,value:g+1}))],l=a.computed(()=>{var y;return((y=e.config)==null?void 0:y.theme)||{}}),d=a.computed(()=>l.value.primary??"#2c0a82"),u=a.computed(()=>l.value.secondary??"#2c0a82"),p=a.computed(()=>l.value.primaryLight??"#f3e2ff"),c=a.computed(()=>{var y;return(y=e.config)==null?void 0:y.fontName}),h=a.computed(()=>{var y;return(y=e.config)==null?void 0:y.redirectionDomain}),f=()=>{const y=new Date;y.setHours(0,0,0,0);const g=new Date(y);return g.setDate(y.getDate()+1),{today:y,tomorrow:g}},{today:m,tomorrow:b}=f(),w=a.ref({destination:"Destination",nationality:"Select Nationality",checkIn:m,checkOut:b,roomsGuests:"1 Room, 2 Adult"}),S=a.ref(""),T=a.ref(""),D=a.ref(!1),v=a.ref(!1),P=a.ref(!1),C=a.ref(!1),I=y=>{D.value=y},O=y=>{v.value=y},L=y=>{P.value=y},R=a.ref(null),x=a.ref(null),j=a.ref(null),Y=a.ref(null),V=a.ref([{adults:2,children:0,childAges:[]}]),K=a.ref([]),q=a.ref(!1),U=a.ref([]),W=a.ref(!1),ae=a.ref(null),re=a.ref(null),Z=a.ref(!1),se=a.ref(null),te=a.ref({destination:!1,nationality:!1,checkIn:!1,checkOut:!1}),le=a.ref([]),we=a.ref([]),nt=a.ref([m,b]),jn=a.computed(()=>T.value.trim().length===0?i:U.value),Hn=a.computed(()=>{const y={"--primary":d.value,"--secondary":u.value,"--primary-light":p.value};return c.value&&(y["--font-family"]=c.value),e.minWidth!==void 0&&(y.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),y}),Kn=()=>{if(typeof document>"u"||document.getElementById($i))return;const y=document.createElement("style");y.id=$i,y.textContent=bc,document.head.appendChild(y)},Un=()=>{if(typeof document>"u"||document.getElementById(Mi))return;const y=document.createElement("link");y.id=Mi,y.rel="stylesheet",y.href="https://unpkg.com/primeicons@7.0.0/primeicons.css",document.head.appendChild(y)},Zt=()=>{if(!h.value)return"";const y=`${h.value}~${Date.now()}`,g=new gc;return g.setPublicKey(Du),g.encrypt(y)||""},ze=(y,g)=>{w.value[y]=g},_n=y=>{const g=y.target.value;S.value=g,ae.value=null,Z.value=!1,se.value=null,g.trim().length>0&&(te.value.destination=!1)},Yn=y=>{const g=y.target.value;T.value=g,re.value=null,g.trim().length>0&&(te.value.nationality=!1)},Qt=y=>{ze("destination",y.displayName),S.value=y.displayName,ae.value=y,Z.value=!1,se.value=null,D.value=!1,te.value.destination=!1},Jt=y=>{ze("nationality",y.country_name),T.value=y.country_name,re.value=y,v.value=!1,te.value.nationality=!1},qn=()=>{const y="Around Current Location";if(ze("destination",y),S.value=y,ae.value=null,Z.value=!0,D.value=!1,te.value.destination=!1,!navigator.geolocation){se.value=null;return}navigator.geolocation.getCurrentPosition(g=>{se.value={lat:g.coords.latitude,lng:g.coords.longitude}},()=>{se.value=null})},Wn=y=>{le.value.includes(y)?le.value=le.value.filter(g=>g!==y):le.value=[...le.value,y].sort((g,E)=>g-E)},Gn=y=>{we.value.includes(y)?we.value=we.value.filter(g=>g!==y):we.value=[...we.value,y]},Zn=y=>{V.value.length<=1||(V.value=V.value.filter((g,E)=>E!==y))},Qn=()=>{V.value.length>=6||(V.value=[...V.value,{adults:1,children:0,childAges:[]}])},Jn=()=>{V.value=[{adults:2,children:0,childAges:[]}]},Xn=y=>{if(V.value[y].adults>=Rn)return;const g=[...V.value];g[y].adults+=1,V.value=g},er=y=>{const g=[...V.value];g[y].adults=Math.max(1,g[y].adults-1),V.value=g},Vu=y=>{if(V.value[y].children>=4)return;const g=[...V.value];g[y].children+=1,g[y].childAges=[...g[y].childAges,0],V.value=g},Bu=y=>{const g=[...V.value];g[y].children=Math.max(0,g[y].children-1),g[y].childAges=g[y].childAges.slice(0,-1),V.value=g},Au=(y,g,E)=>{const $=[...V.value];$[y].childAges[g]=E,V.value=$},Li=y=>y?y.toLocaleDateString("en-GB",{weekday:"short",day:"2-digit",month:"short"}):"",Fi=y=>y?y.toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}):"",$u=y=>{nt.value=y;const g=(y==null?void 0:y[0])??null,E=(y==null?void 0:y[1])??null;ze("checkIn",g),ze("checkOut",E),g&&E&&(C.value=!1,te.value.checkIn=!1,te.value.checkOut=!1)},zi=()=>{C.value=!0},Mu=()=>{const y=S.value.trim().length>0,g=T.value.trim().length>0,E=!!w.value.checkIn,$=!!w.value.checkOut;return te.value={destination:!y,nationality:!g,checkIn:!E,checkOut:!$},y&&g&&E&&$},Nu=()=>{var ji,Hi,Ki,Ui,_i,Yi;const y=ae.value,g=re.value,E=V.value.map((rt,Xt)=>{const tr=[rt.adults,rt.children,...rt.childAges];return`room${Xt+1}=${tr.join("-")}`}),$=Z.value?((Hi=(ji=se.value)==null?void 0:ji.lat)==null?void 0:Hi.toString())??"0":((Ki=y==null?void 0:y.lattitude)==null?void 0:Ki.toString())??"0",Q=Z.value?((_i=(Ui=se.value)==null?void 0:Ui.lng)==null?void 0:_i.toString())??"0":((Yi=y==null?void 0:y.longitude)==null?void 0:Yi.toString())??"0",ee={curr:"INR",geoId:Z.value?"":(y==null?void 0:y.geoId)??"",Country:Z.value?"":(y==null?void 0:y.countryCode)??"",nationality:(g==null?void 0:g.country_code)??"",checkinDate:w.value.checkIn?Fi(w.value.checkIn):"",checkoutDate:w.value.checkOut?Fi(w.value.checkOut):"",lc:"EN",StarRatings:le.value.length>0?le.value.join(","):"",MealTypes:we.value.length>0?we.value.join(","):"",FreeCancellation:"false",geoName:Z.value?"Around Current Location":(y==null?void 0:y.displayName)??"",Lat:$,Long:Q,is_around_current_location:Z.value?"true":"false",currtime:Date.now().toString(),mgcc:"",type:Z.value?"":(y==null?void 0:y.type)??""},Ve=`/hotel/result?${[...Object.entries(ee).map(([rt,Xt])=>`${encodeURIComponent(rt)}=${encodeURIComponent(Xt)}`),...E].join("&")}`;if(console.log("Query string:",Ve),h.value){const tr=`${`https://${h.value.replace(/^https?:\/\//i,"").split("/")[0]}`}${Ve}`;window.open(tr,"_blank","noopener,noreferrer")}},Lu=y=>{y.preventDefault(),Mu()&&Nu()};let Pt=null;a.watch(S,y=>{const g=y.trim();if(g.length<Ye){K.value=[];return}Pt&&clearTimeout(Pt),Pt=setTimeout(async()=>{var $;const E=new AbortController;try{q.value=!0;const Q={"Content-Type":"application/json"},ee=Zt();ee&&(Q.token=ee);const pe=await fetch(r,{method:"POST",headers:Q,body:JSON.stringify({searchTerm:g,languageCode:"EN",lattitude:"",longitude:""}),signal:E.signal});if(!pe.ok)throw new Error("Destination search failed");const Ve=await pe.json();K.value=(($=Ve.data)==null?void 0:$.locations)??Ve.locations??[]}catch(Q){Q instanceof DOMException&&Q.name==="AbortError"||(K.value=[])}finally{q.value=!1}},300)});let It=null;a.watch(T,y=>{const g=y.trim();if(g.length<Ye){U.value=[];return}It&&clearTimeout(It),It=setTimeout(async()=>{const E=new AbortController;try{W.value=!0;const $={"Content-Type":"application/json"},Q=Zt();Q&&($.token=Q);const ee=await fetch(`${Ou}${xu}/${encodeURIComponent(g)}`,{method:"GET",headers:$,signal:E.signal});if(!ee.ok)throw new Error("Nationality search failed");const pe=await ee.json();U.value=pe??[]}catch($){$ instanceof DOMException&&$.name==="AbortError"||(U.value=[])}finally{W.value=!1}},300)}),a.watch(V,()=>{const y=V.value.reduce((pe,Ve)=>pe+Ve.adults,0),g=V.value.reduce((pe,Ve)=>pe+Ve.children,0),E=V.value.length===1?"Room":"Rooms",$=y===1?"Adult":"Adults",Q=g===0?"":g===1?`, ${g} Child`:`, ${g} Children`,ee=`${V.value.length} ${E}, ${y} ${$}${Q}`;ze("roomsGuests",ee)},{deep:!0});const Ri=y=>{var pe;const g=y.target,E=g.closest(".p-dropdown-panel")!==null||g.closest(".p-dropdown-items-wrapper")!==null||g.closest(".p-dropdown-item")!==null||((pe=g.closest(".p-component"))==null?void 0:pe.classList.contains("p-dropdown"))!==!1||g.closest('[data-pc-section="panel"]')!==null||g.closest('[data-pc-name="dropdown"]')!==null;R.value&&!R.value.contains(g)&&(D.value=!1),x.value&&!x.value.contains(g)&&(v.value=!1),!E&&j.value&&!j.value.contains(g)&&(P.value=!1);const $=g.closest(".sw-com-cal"),Q=g.closest("#checkIn")||g.closest("#checkOut"),ee=g.closest(".p-calendar")||g.closest(".p-datepicker");C.value&&!Q&&!ee&&(!$||!$.querySelector(".p-calendar"))&&(C.value=!1)};return a.onMounted(()=>{Kn(),Un(),document.addEventListener("mousedown",Ri)}),a.onUnmounted(()=>{document.removeEventListener("mousedown",Ri),Pt&&clearTimeout(Pt),It&&clearTimeout(It)}),(y,g)=>(a.openBlock(),a.createElementBlock("div",{class:"thsw-root sw-container",style:a.normalizeStyle(Hn.value)},[a.createElementVNode("div",yc,[a.createElementVNode("form",{class:"sw-srh-h-grid",onSubmit:a.withModifiers(Lu,["prevent"])},[a.createElementVNode("div",{class:a.normalizeClass(["sw-form-field","sw-pos-rel","br-left",{"thsw-field-error":te.value.destination}])},[g[10]||(g[10]=a.createElementVNode("label",{for:"destination"},"Destination",-1)),a.createElementVNode("div",{class:"sw-custom-dropdown",ref_key:"destinationDropdownRef",ref:R},[a.createElementVNode("div",vc,[a.createElementVNode("input",{class:"hotel-destination-input",value:S.value,onInput:_n,onFocus:g[0]||(g[0]=E=>I(!0)),placeholder:"Where are you going?"},null,40,wc)]),D.value?(a.openBlock(),a.createElementBlock("div",kc,[a.createElementVNode("ul",Sc,[a.createElementVNode("li",{class:"sw-srh-loc",onClick:qn},[...g[5]||(g[5]=[a.createElementVNode("div",{class:"sw-flex sw-align-center sw-gap-5 sw-justify-between"},[a.createElementVNode("div",{class:"sw-flex sw-align-center sw-gap-15"},[a.createElementVNode("span",{class:"sw-hotel-search-form-icon sw-fill"},[a.createElementVNode("svg",{width:"26px",height:"26px",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-testid":"MyLocationIcon",class:"sw-bg-color-loc"},[a.createElementVNode("path",{fillRule:"evenodd",d:"M12.0283 3a.7614.7614 0 0 1 .7614.7614v1.1544c3.328.3533 5.9726 2.9958 6.329 6.3228h1.1482a.7614.7614 0 0 1 0 1.5228h-1.1467c-.3505 3.3337-2.9978 5.9831-6.3305 6.3368v1.1404a.7614.7614 0 0 1-1.5228 0v-1.1404c-3.3327-.3537-5.98-3.0031-6.3306-6.3368H3.7897a.7614.7614 0 0 1 0-1.5228h1.1481c.3565-3.327 3.001-5.9696 6.3291-6.3228V3.7614A.7614.7614 0 0 1 12.0283 3m5.6086 9.007c0 3.0976-2.5111 5.6086-5.6086 5.6086s-5.6086-2.511-5.6086-5.6086 2.511-5.6085 5.6086-5.6085 5.6086 2.511 5.6086 5.6085m-3.5479-.0001c0 1.1381-.9226 2.0607-2.0607 2.0607-1.138 0-2.0606-.9226-2.0606-2.0607 0-1.138.9226-2.0606 2.0606-2.0606s2.0607.9226 2.0607 2.0606m1.5228 0c0 1.9791-1.6044 3.5835-3.5835 3.5835s-3.5834-1.6044-3.5834-3.5835 1.6044-3.5834 3.5834-3.5834 3.5835 1.6044 3.5835 3.5834",clipRule:"evenodd"})])]),a.createElementVNode("h5",{class:"sw-fw500"},"Around Current Location")])],-1)])]),q.value?(a.openBlock(),a.createElementBlock("li",Cc,[...g[6]||(g[6]=[a.createElementVNode("div",{class:"sw-dropdown-list-card"},[a.createElementVNode("h6",{class:"sw-text-label"},"Searching...")],-1)])])):a.createCommentVNode("",!0),!q.value&&S.value.trim().length<Ye?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},a.renderList(n,E=>a.createElementVNode("li",{key:E.geoId,class:"sw-dropdown-list-item",onClick:$=>Qt(E)},[a.createElementVNode("div",Ec,[g[7]||(g[7]=a.createElementVNode("span",{class:"sw-hotel-search-form-icon"},[a.createElementVNode("svg",{width:"30px",height:"30px",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-testid":"LocationIcon"},[a.createElementVNode("path",{d:"M13.5 8.0056c0 .8294-.6716 1.5017-1.5 1.5017s-1.5-.6723-1.5-1.5017.6716-1.5017 1.5-1.5017 1.5.6723 1.5 1.5017"}),a.createElementVNode("path",{fillRule:"evenodd",d:"M12 17.0359c2.7614 0 5-6.2457 5-9.0102C17 5.261 14.7614 3.02 12 3.02S7 5.2611 7 8.0257c0 2.7645 2.2386 9.0102 5 9.0102m2.1803-4.1114C15.0205 11.1538 15.5 9.1236 15.5 8.0257 15.5 6.088 13.9314 4.52 12 4.52S8.5 6.088 8.5 8.0257c0 1.098.4795 3.1281 1.3197 4.8988.414.8726.8717 1.5863 1.3208 2.0583.4658.4896.7566.5531.8595.5531s.3937-.0635.8595-.5531c.4491-.472.9068-1.1857 1.3208-2.0583",clipRule:"evenodd"}),a.createElementVNode("path",{d:"M16.8904 14.2118c-.1965.4142.0122.9154.4396 1.0813q.2178.0845.4184.175c1.5348.6914 1.7516 1.3369 1.7516 1.4976 0 .1606-.2168.8061-1.7516 1.4975-1.394.628-3.425 1.0553-5.7484 1.0553s-4.3544-.4273-5.7484-1.0553C4.7168 17.7718 4.5 17.1263 4.5 16.9657s.2168-.8062 1.7516-1.4976a8.5 8.5 0 0 1 .4184-.175c.4274-.1659.6361-.6671.4396-1.0813-.1528-.322-.5183-.493-.8522-.3682C4.2674 14.5873 3 15.7098 3 16.9657c0 2.2392 4.0294 4.0545 9 4.0545s9-1.8153 9-4.0545c0-1.2559-1.2674-2.3784-3.2574-3.1221-.3339-.1248-.6994.0462-.8522.3682"})])],-1)),a.createElementVNode("div",null,[a.createElementVNode("h5",Dc,a.toDisplayString(E.geoTitle),1),a.createElementVNode("h6",Pc,a.toDisplayString(E.displayName),1)])])],8,Tc)),64)):a.createCommentVNode("",!0),!q.value&&S.value.trim().length>=Ye&&K.value.length===0?(a.openBlock(),a.createElementBlock("li",Ic,[...g[8]||(g[8]=[a.createElementVNode("div",{class:"sw-dropdown-list-card"},[a.createElementVNode("h6",{class:"sw-text-label"},"No results found")],-1)])])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(K.value,E=>(a.openBlock(),a.createElementBlock("li",{key:E.geoId,class:"sw-dropdown-list-item",onClick:$=>Qt(E)},[a.createElementVNode("div",xc,[g[9]||(g[9]=a.createElementVNode("span",{class:"sw-hotel-search-form-icon"},[a.createElementVNode("svg",{width:"30px",height:"30px",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-testid":"LocationIcon"},[a.createElementVNode("path",{d:"M13.5 8.0056c0 .8294-.6716 1.5017-1.5 1.5017s-1.5-.6723-1.5-1.5017.6716-1.5017 1.5-1.5017 1.5.6723 1.5 1.5017"}),a.createElementVNode("path",{fillRule:"evenodd",d:"M12 17.0359c2.7614 0 5-6.2457 5-9.0102C17 5.261 14.7614 3.02 12 3.02S7 5.2611 7 8.0257c0 2.7645 2.2386 9.0102 5 9.0102m2.1803-4.1114C15.0205 11.1538 15.5 9.1236 15.5 8.0257 15.5 6.088 13.9314 4.52 12 4.52S8.5 6.088 8.5 8.0257c0 1.098.4795 3.1281 1.3197 4.8988.414.8726.8717 1.5863 1.3208 2.0583.4658.4896.7566.5531.8595.5531s.3937-.0635.8595-.5531c.4491-.472.9068-1.1857 1.3208-2.0583",clipRule:"evenodd"}),a.createElementVNode("path",{d:"M16.8904 14.2118c-.1965.4142.0122.9154.4396 1.0813q.2178.0845.4184.175c1.5348.6914 1.7516 1.3369 1.7516 1.4976 0 .1606-.2168.8061-1.7516 1.4975-1.394.628-3.425 1.0553-5.7484 1.0553s-4.3544-.4273-5.7484-1.0553C4.7168 17.7718 4.5 17.1263 4.5 16.9657s.2168-.8062 1.7516-1.4976a8.5 8.5 0 0 1 .4184-.175c.4274-.1659.6361-.6671.4396-1.0813-.1528-.322-.5183-.493-.8522-.3682C4.2674 14.5873 3 15.7098 3 16.9657c0 2.2392 4.0294 4.0545 9 4.0545s9-1.8153 9-4.0545c0-1.2559-1.2674-2.3784-3.2574-3.1221-.3339-.1248-.6994.0462-.8522.3682"})])],-1)),a.createElementVNode("div",null,[a.createElementVNode("h5",Vc,a.toDisplayString(E.geoTitle),1),a.createElementVNode("h6",Bc,a.toDisplayString(E.displayName),1)])])],8,Oc))),128))])])):a.createCommentVNode("",!0)],512)],2),a.createElementVNode("div",{class:a.normalizeClass(["sw-form-field","sw-pos-rel",{"thsw-field-error":te.value.nationality}])},[g[13]||(g[13]=a.createElementVNode("label",{for:"nationality"},"Nationality",-1)),a.createElementVNode("div",{class:"sw-custom-dropdown",ref_key:"nationalityDropdownRef",ref:x},[a.createElementVNode("div",Ac,[a.createElementVNode("input",{class:"hotel-destination-input",value:T.value,onInput:Yn,onFocus:g[1]||(g[1]=E=>O(!0)),placeholder:w.value.nationality},null,40,$c)]),v.value?(a.openBlock(),a.createElementBlock("div",Mc,[a.createElementVNode("ul",Nc,[W.value?(a.openBlock(),a.createElementBlock("li",Lc,[...g[11]||(g[11]=[a.createElementVNode("div",{class:"sw-dropdown-list-box"},[a.createElementVNode("div",null,[a.createElementVNode("h5",{class:"sw-fw500 sw-text-ellipsis"},"Searching...")])],-1)])])):a.createCommentVNode("",!0),!W.value&&T.value.trim().length<Ye?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},a.renderList(i,E=>a.createElementVNode("li",{key:E.country_id,class:"sw-dropdown-list-item",onClick:$=>Jt(E)},[a.createElementVNode("div",zc,[a.createElementVNode("div",null,[a.createElementVNode("h5",Rc,a.toDisplayString(E.country_name),1)]),a.createElementVNode("h6",jc,a.toDisplayString(E.country_code),1)])],8,Fc)),64)):a.createCommentVNode("",!0),!W.value&&T.value.trim().length>=Ye&&U.value.length===0?(a.openBlock(),a.createElementBlock("li",Hc,[...g[12]||(g[12]=[a.createElementVNode("div",{class:"sw-dropdown-list-box"},[a.createElementVNode("div",null,[a.createElementVNode("h5",{class:"sw-fw500 sw-text-ellipsis"},"No results found")])],-1)])])):a.createCommentVNode("",!0),!W.value&&T.value.trim().length>=Ye?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:3},a.renderList(jn.value,E=>(a.openBlock(),a.createElementBlock("li",{key:E.country_id,class:"sw-dropdown-list-item",onClick:$=>Jt(E)},[a.createElementVNode("div",Uc,[a.createElementVNode("div",null,[a.createElementVNode("h5",_c,a.toDisplayString(E.country_name),1)]),a.createElementVNode("h6",Yc,a.toDisplayString(E.country_code),1)])],8,Kc))),128)):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0)],512)],2),a.createElementVNode("div",qc,[a.createElementVNode("div",{class:a.normalizeClass(["sw-form-field","sw-pos-rel","sw-com-cal",{"thsw-field-error":te.value.checkIn}])},[g[14]||(g[14]=a.createElementVNode("label",{for:"checkIn"},"Check-in",-1)),a.createElementVNode("input",{id:"checkIn",class:"hotel-destination-input",readonly:"",value:Li(w.value.checkIn),placeholder:"Select date",onClick:zi},null,8,Wc),C.value?(a.openBlock(),a.createBlock(a.unref(fd),{key:0,ref_key:"calendarRef",ref:Y,modelValue:nt.value,"onUpdate:modelValue":[g[2]||(g[2]=E=>nt.value=E),$u],inline:"",selectionMode:"range",numberOfMonths:2,minDate:new Date,dateFormat:"dd M yy",class:"thsw-range-calendar"},null,8,["modelValue","minDate"])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{class:a.normalizeClass(["sw-form-field","sw-pos-rel","sw-com-cal",{"thsw-field-error":te.value.checkOut}])},[g[15]||(g[15]=a.createElementVNode("label",{for:"checkOut"},"Check-out",-1)),a.createElementVNode("input",{id:"checkOut",class:"hotel-destination-input",readonly:"",value:Li(w.value.checkOut),placeholder:"Select date",onClick:zi},null,8,Gc)],2)]),a.createElementVNode("div",Zc,[g[25]||(g[25]=a.createElementVNode("label",{for:"rooms"},"Rooms & Guests",-1)),a.createElementVNode("div",{class:"sw-custom-dropdown",ref_key:"roomsGuestsMenuRef",ref:j},[a.createElementVNode("div",{class:"sw-custom-dropdown-trigger",onClick:g[3]||(g[3]=E=>L(!P.value))},[a.createElementVNode("span",null,a.toDisplayString(w.value.roomsGuests),1)]),P.value?(a.openBlock(),a.createElementBlock("div",Qc,[g[24]||(g[24]=a.createElementVNode("h3",{class:"sw-rooms-guests-title"},"Number of Travellers",-1)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(V.value,(E,$)=>(a.openBlock(),a.createElementBlock("div",{key:$,class:"sw-room-section"},[a.createElementVNode("div",Jc,[g[16]||(g[16]=a.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},[a.createElementVNode("g",{transform:"translate(-4092.000000, -824.000000)"},[a.createElementVNode("g",{transform:"translate(4092.000000, 824.000000)"},[a.createElementVNode("rect",{fill:"#FFFFFF",opacity:"0",x:"0",y:"0",width:"24",height:"24"}),a.createElementVNode("g",{transform:"translate(3.000000, 6.000000)",fill:"var(--primary)",fillRule:"nonzero"},[a.createElementVNode("path",{d:"M18.011072,5.62815523 L18.011072,1.13048375 C18.011072,0.514180505 17.4892314,0.012765343 16.8478226,0.012765343 L2.14333676,0.012765343 C1.50192802,0.012765343 0.980087404,0.514180505 0.980087404,1.13048375 L0.980087404,5.62820217 C0.42596144,5.70920578 0,6.17002527 0,6.72475451 L0,9.50863177 C0,9.70302166 0.164015424,9.86061733 0.366323907,9.86061733 L0.75877892,9.86061733 L0.75877892,11.5970794 C0.75877892,11.7914693 0.922794344,11.949065 1.12510283,11.949065 L1.78639075,11.949065 L1.78639075,12.6268014 C1.78639075,12.8211913 1.95040617,12.978787 2.15271465,12.978787 C2.35502314,12.978787 2.51903856,12.8211913 2.51903856,12.6268014 L2.51903856,11.949065 L16.4721697,11.949065 L16.4721697,12.6268014 C16.4721697,12.8211913 16.6361362,12.978787 16.8384936,12.978787 C17.0408509,12.978787 17.2048175,12.8211913 17.2048175,12.6268014 L17.2048175,11.949065 L17.8661054,11.949065 C18.0684627,11.949065 18.2324293,11.7914693 18.2324293,11.5970794 L18.2324293,9.86061733 L18.6248355,9.86061733 C18.8271928,9.86061733 18.9911594,9.70302166 18.9911594,9.50863177 L18.9911594,6.72475451 C18.9911594,6.17002527 18.5651979,5.70915884 18.011072,5.62815523 Z M1.71268638,1.13048375 C1.71268638,0.902350181 1.90586118,0.716736462 2.14328792,0.716736462 L16.8477738,0.716736462 C17.0852005,0.716736462 17.2783753,0.902350181 17.2783753,1.13048375 L17.2783753,5.61553069 L15.99209,5.61553069 C16.2480283,5.35079061 16.5083625,5.0723935 16.7779769,4.77451986 C16.8978869,4.64203249 16.897838,4.44492058 16.777928,4.31248014 C15.7181285,3.14210469 14.8307943,2.28950181 13.6130848,1.27151264 C13.4752494,1.1562491 13.2700591,1.1562491 13.1321748,1.27151264 C11.9144165,2.28954874 11.0271311,3.14215162 9.96738046,4.31248014 C9.84747044,4.44492058 9.84742159,4.64203249 9.96733162,4.77451986 C10.2369949,5.07244043 10.4972802,5.35083755 10.7532185,5.61553069 L8.23764781,5.61553069 C8.49358612,5.35079061 8.75396915,5.0723935 9.02358355,4.77451986 C9.14349357,4.64203249 9.14349357,4.44492058 9.0235347,4.31248014 C7.96388175,3.14229242 7.07654756,2.28968953 5.85869152,1.27151264 C5.72085604,1.1562491 5.51566581,1.1562491 5.37778149,1.27151264 C4.15992545,2.28968953 3.27259126,3.14229242 2.2129383,4.31248014 C2.09297943,4.44492058 2.09297943,4.64203249 2.21288946,4.77451986 C2.4825527,5.0723935 2.74288689,5.35079061 2.99882519,5.61553069 L1.71268638,5.61553069 L1.71268638,1.13048375 Z M11.7640283,5.61553069 C11.4269614,5.28306859 11.0864756,4.92981588 10.7309949,4.54352347 C11.6067044,3.59142599 12.3820411,2.84643682 13.3726787,2.00519134 C14.3633162,2.84638989 15.138653,3.59142599 16.0144113,4.54352347 C15.6589794,4.92981588 15.3184447,5.28306859 14.9813779,5.61553069 L11.7640283,5.61553069 Z M4.0096838,5.61553069 C3.67261697,5.28302166 3.33208226,4.92981588 2.97660154,4.54352347 C3.85216452,3.59161372 4.62764781,2.84648375 5.61833419,2.00519134 C6.60902057,2.84648375 7.38450386,3.59161372 8.26006684,4.54352347 C7.90463496,4.92981588 7.56410026,5.28302166 7.22698458,5.61553069 L4.0096838,5.61553069 Z M17.4997815,11.2450939 L1.49142674,11.2450939 L1.49142674,9.86061733 L17.4997815,9.86061733 L17.4997815,11.2450939 Z M18.2585116,9.15664621 L0.732647815,9.15664621 L0.732647815,6.72475451 C0.732647815,6.50131408 0.921866324,6.31950181 1.15445758,6.31950181 L17.8367018,6.31950181 C18.0692931,6.31950181 18.2585116,6.50131408 18.2585116,6.72475451 L18.2585116,9.15664621 Z"})])])])])],-1)),a.createTextVNode(" Room "+a.toDisplayString($+1),1)]),a.createElementVNode("div",Xc,[a.createElementVNode("div",eu,[g[19]||(g[19]=a.createElementVNode("div",{class:"sw-room-control-label"},[a.createElementVNode("span",null,"Adult (18+ years)")],-1)),a.createElementVNode("div",tu,[a.createElementVNode("button",{type:"button",class:a.normalizeClass(["sw-count-button",E.adults===1?"sw-disabled":"sw-active"]),onClick:Q=>er($),disabled:E.adults===1},[...g[17]||(g[17]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",fill:"var(--sw-white)",viewBox:"0 -960 960 960"},[a.createElementVNode("path",{d:"M200-440v-80h560v80H200Z"})],-1)])],10,nu),a.createElementVNode("span",ru,a.toDisplayString(E.adults),1),a.createElementVNode("button",{type:"button",class:a.normalizeClass(["sw-count-button",E.adults>=Rn?"sw-disabled":"sw-active"]),onClick:Q=>Xn($),disabled:E.adults>=Rn},[...g[18]||(g[18]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",fill:"var(--sw-white)",viewBox:"0 -960 960 960"},[a.createElementVNode("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})],-1)])],10,iu)])]),a.createElementVNode("div",ou,[g[22]||(g[22]=a.createElementVNode("div",{class:"sw-room-control-label"},[a.createElementVNode("span",null,"Child (0-17 years)")],-1)),a.createElementVNode("div",au,[a.createElementVNode("button",{type:"button",class:a.normalizeClass(["sw-count-button",E.children===0?"sw-disabled":"sw-active"]),onClick:Q=>Bu($),disabled:E.children===0},[...g[20]||(g[20]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",fill:"var(--sw-white)",viewBox:"0 -960 960 960"},[a.createElementVNode("path",{d:"M200-440v-80h560v80H200Z"})],-1)])],10,su),a.createElementVNode("span",lu,a.toDisplayString(E.children),1),a.createElementVNode("button",{type:"button",class:a.normalizeClass(["sw-count-button",E.children>=4?"sw-disabled":""]),onClick:Q=>Vu($),disabled:E.children>=4},[...g[21]||(g[21]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",fill:"var(--sw-white)",viewBox:"0 -960 960 960"},[a.createElementVNode("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})],-1)])],10,du)])])]),a.createElementVNode("div",cu,[E.children>0?(a.openBlock(),a.createElementBlock("div",uu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Array.from({length:E.children}),(Q,ee)=>(a.openBlock(),a.createElementBlock("span",{key:ee,class:"sw-room-control-label"}," Child "+a.toDisplayString(ee+1),1))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",pu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Array.from({length:E.children}),(Q,ee)=>(a.openBlock(),a.createElementBlock("div",{key:ee,class:"sw-child-age-item"},[a.createVNode(a.unref(gl),{modelValue:E.childAges[ee]??0,options:s,"onUpdate:modelValue":pe=>Au($,ee,pe),placeholder:"Age",class:"child-age-dropdown"},null,8,["modelValue","onUpdate:modelValue"])]))),128))])]),V.value.length>1&&$>0?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"sw-remove-room-button",onClick:Q=>Zn($),"aria-label":`Remove Room ${$+1}`}," × ",8,hu)):a.createCommentVNode("",!0)]))),128)),a.createElementVNode("div",fu,[V.value.length<6?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"sw-add-room-button",onClick:Qn},[...g[23]||(g[23]=[a.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{fill:"none",d:"M0 0h16v16H0z"}),a.createElementVNode("path",{d:"M15 7H9V1H7v6H1v2h6v6h2V9h6z"})],-1),a.createTextVNode(" Add another room ",-1)])])):a.createCommentVNode("",!0),a.createElementVNode("div",mu,[a.createElementVNode("button",{type:"button",class:"sw-reset-button",onClick:Jn}," Reset "),a.createElementVNode("button",{type:"button",class:"sw-apply-button",onClick:g[4]||(g[4]=E=>L(!1))}," Apply ")])])])):a.createCommentVNode("",!0)],512)]),a.createVNode(a.unref(mn),{type:"submit",label:"Search",icon:"pi pi-search",class:"sw-search-button br-right"})],32),a.createElementVNode("div",gu,[a.createVNode(a.unref(gi),null,{default:a.withCtx(()=>[a.createVNode(a.unref(bi),{header:"Advanced Search options"},{default:a.withCtx(()=>[a.createElementVNode("div",bu,[g[27]||(g[27]=a.createElementVNode("h5",null,"Star Rating:",-1)),a.createElementVNode("div",yu,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList([5,4,3,2,1],E=>a.createElementVNode("label",{key:E,class:"sw-star-checkbox-wrap sw-checkbox-wrap"},[a.createElementVNode("input",{type:"checkbox",checked:le.value.includes(E),onChange:$=>Wn(E)},null,40,vu),a.createElementVNode("div",wu,[a.createElementVNode("span",ku,a.toDisplayString(E),1),g[26]||(g[26]=a.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 18 17",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M3.35375 16.6825L4.7865 10.5133L0 6.36525L6.31525 5.81725L8.77875 0L11.2422 5.81725L17.5575 6.36525L12.771 10.5133L14.2038 16.6825L8.77875 13.4095L3.35375 16.6825Z",fill:"#ffae43"})],-1))])])),64))])]),a.createElementVNode("div",Su,[g[28]||(g[28]=a.createElementVNode("h5",null,"Meal Type:",-1)),a.createElementVNode("div",Cu,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(o,E=>a.createElementVNode("label",{key:E.value,class:"sw-checkbox-wrap"},[a.createElementVNode("input",{type:"checkbox",checked:we.value.includes(E.value),onChange:$=>Gn(E.value)},null,40,Tu),a.createElementVNode("div",Eu,a.toDisplayString(E.label),1)])),64))])])]),_:1})]),_:1})])])],4))}};Be.HotelSearchWidget=Ni,Be.default=Ni,Object.defineProperties(Be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
2712
|
+
-----END PUBLIC KEY-----`,Pu="https://hotelapihub.dev.futuretravelplatform.com",Iu="/api/v1/hotels/search-form",Ou="https://adminapi.dev.futuretravelplatform.com",xu="/api/MasterSearch/GetAllCountry/EN",Ni={__name:"HotelSearchWidget",props:{config:{type:Object,default:()=>({})},minWidth:{type:[Number,String],default:void 0}},setup(t){const e=t,n=[{geoId:"618704",geoTitle:"Dubai",geoName:"United Arab Emirates",displayName:"Dubai, United Arab Emirates",type:"city",countryCode:"AE",lattitude:25.27063,longitude:55.30037},{geoId:"804926",geoTitle:"Dubai Hills",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Hills, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.103307,longitude:55.247966},{geoId:"618818",geoTitle:"Dubai Media City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Media City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.094279,longitude:55.154095},{geoId:"618493",geoTitle:"Dubai Internet City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Internet City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.097792,longitude:55.163026},{geoId:"618494",geoTitle:"Dubai Studio City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Studio City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.041623,longitude:55.251897},{geoId:"618670",geoTitle:"Dubai Sports City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Sports City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.036236,longitude:55.217676},{geoId:"618631",geoTitle:"Dubai Production City",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Production City, Dubai, United Arab Emirates",type:"neighborhood",countryCode:"AE",lattitude:25.032507,longitude:55.189725},{geoId:"618733",geoTitle:"Ski Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Ski Dubai, Dubai, United Arab Emirates",type:"point_of_interest",countryCode:"AE",lattitude:25.117395,longitude:55.198021},{geoId:"2442684",geoTitle:"Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Dubai, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.273935,longitude:55.32799},{geoId:"1487637",geoTitle:"Dubai Luxury Stay - Downtown Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Luxury Stay - Downtown Dubai, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.076485,longitude:55.144405},{geoId:"1910103",geoTitle:"Dubai Arch",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Arch, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.071701,longitude:55.143578},{geoId:"737327",geoTitle:"Angsana Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Angsana Dubai, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.215,longitude:55.279},{geoId:"2231257",geoTitle:"Dubai Backpackers",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Backpackers, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.09714,longitude:55.17065},{geoId:"2322561",geoTitle:"Dubai Hostel",geoName:"Dubai, United Arab Emirates",displayName:"Dubai Hostel, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.09696,longitude:55.1776},{geoId:"2323808",geoTitle:"Hostel Dubai",geoName:"Dubai, United Arab Emirates",displayName:"Hostel Dubai, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.19179,longitude:55.26195},{geoId:"2442649",geoTitle:"Dubai 360",geoName:"Dubai, United Arab Emirates",displayName:"Dubai 360, Dubai, United Arab Emirates",type:"hotel",countryCode:"",lattitude:25.088923,longitude:55.146818}],r=`${Pu}${Iu}`,i=[{country_code:"KW",country_name:"Kuwait",country_id:"2108231234183749619"},{country_code:"BH",country_name:"Bahrain",country_id:"2108231234168861036"},{country_code:"QA",country_name:"Qatar",country_id:"2108231234193188713"},{country_code:"OM",country_name:"Oman",country_id:"2108231234191323057"}],o=[{label:"Breakfast Only",value:2},{label:"Breakfast or Lunch or Dinner",value:3},{label:"Breakfast or Lunch and Dinner",value:4},{label:"All Inclusive",value:5},{label:"Room Only",value:1}],s=[{label:"Under 1",value:0},...Array.from({length:17},(y,g)=>({label:`${g+1}`,value:g+1}))],l=a.computed(()=>{var y;return((y=e.config)==null?void 0:y.theme)||{}}),d=a.computed(()=>l.value.primary??"#2c0a82"),u=a.computed(()=>l.value.secondary??"#2c0a82"),p=a.computed(()=>l.value.primaryLight??"#f3e2ff"),c=a.computed(()=>{var y;return(y=e.config)==null?void 0:y.fontName}),h=a.computed(()=>{var y;return(y=e.config)==null?void 0:y.redirectionDomain}),f=()=>{const y=new Date;y.setHours(0,0,0,0);const g=new Date(y);return g.setDate(y.getDate()+1),{today:y,tomorrow:g}},{today:m,tomorrow:b}=f(),w=a.ref({destination:"Destination",nationality:"Select Nationality",checkIn:m,checkOut:b,roomsGuests:"1 Room, 2 Adult"}),S=a.ref(""),T=a.ref(""),D=a.ref(!1),v=a.ref(!1),P=a.ref(!1),C=a.ref(!1),I=y=>{D.value=y},O=y=>{v.value=y},L=y=>{P.value=y},R=a.ref(null),x=a.ref(null),j=a.ref(null),Y=a.ref(null),V=a.ref([{adults:2,children:0,childAges:[]}]),K=a.ref([]),q=a.ref(!1),U=a.ref([]),W=a.ref(!1),ae=a.ref(null),re=a.ref(null),Z=a.ref(!1),se=a.ref(null),te=a.ref({destination:!1,nationality:!1,checkIn:!1,checkOut:!1}),le=a.ref([]),we=a.ref([]),nt=a.ref([m,b]),jn=a.computed(()=>T.value.trim().length===0?i:U.value),Hn=a.computed(()=>{const y={"--primary":d.value,"--secondary":u.value,"--primary-light":p.value};return c.value&&(y["--font-family"]=c.value),e.minWidth!==void 0&&(y.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),y}),Kn=()=>{if(typeof document>"u"||document.getElementById($i))return;const y=document.createElement("style");y.id=$i,y.textContent=bc,document.head.appendChild(y)},Un=()=>{if(typeof document>"u"||document.getElementById(Mi))return;const y=document.createElement("link");y.id=Mi,y.rel="stylesheet",y.href="https://unpkg.com/primeicons@7.0.0/primeicons.css",document.head.appendChild(y)},Zt=()=>{if(!h.value)return"";const y=`${h.value}~${Date.now()}`,g=new gc;return g.setPublicKey(Du),g.encrypt(y)||""},ze=(y,g)=>{w.value[y]=g},_n=y=>{const g=y.target.value;S.value=g,ae.value=null,Z.value=!1,se.value=null,g.trim().length>0&&(te.value.destination=!1)},Yn=y=>{const g=y.target.value;T.value=g,re.value=null,g.trim().length>0&&(te.value.nationality=!1)},Qt=y=>{ze("destination",y.displayName),S.value=y.displayName,ae.value=y,Z.value=!1,se.value=null,D.value=!1,te.value.destination=!1},Jt=y=>{ze("nationality",y.country_name),T.value=y.country_name,re.value=y,v.value=!1,te.value.nationality=!1},qn=()=>{const y="Around Current Location";if(ze("destination",y),S.value=y,ae.value=null,Z.value=!0,D.value=!1,te.value.destination=!1,!navigator.geolocation){se.value=null;return}navigator.geolocation.getCurrentPosition(g=>{se.value={lat:g.coords.latitude,lng:g.coords.longitude}},()=>{se.value=null})},Wn=y=>{le.value.includes(y)?le.value=le.value.filter(g=>g!==y):le.value=[...le.value,y].sort((g,E)=>g-E)},Gn=y=>{we.value.includes(y)?we.value=we.value.filter(g=>g!==y):we.value=[...we.value,y]},Zn=y=>{V.value.length<=1||(V.value=V.value.filter((g,E)=>E!==y))},Qn=()=>{V.value.length>=6||(V.value=[...V.value,{adults:1,children:0,childAges:[]}])},Jn=()=>{V.value=[{adults:2,children:0,childAges:[]}]},Xn=y=>{if(V.value[y].adults>=Rn)return;const g=[...V.value];g[y].adults+=1,V.value=g},er=y=>{const g=[...V.value];g[y].adults=Math.max(1,g[y].adults-1),V.value=g},Vu=y=>{if(V.value[y].children>=4)return;const g=[...V.value];g[y].children+=1,g[y].childAges=[...g[y].childAges,0],V.value=g},Bu=y=>{const g=[...V.value];g[y].children=Math.max(0,g[y].children-1),g[y].childAges=g[y].childAges.slice(0,-1),V.value=g},Au=(y,g,E)=>{const $=[...V.value];$[y].childAges[g]=E,V.value=$},Li=y=>y?y.toLocaleDateString("en-GB",{weekday:"short",day:"2-digit",month:"short"}):"",Fi=y=>y?y.toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}):"",$u=y=>{nt.value=y;const g=(y==null?void 0:y[0])??null,E=(y==null?void 0:y[1])??null;ze("checkIn",g),ze("checkOut",E),g&&E&&(C.value=!1,te.value.checkIn=!1,te.value.checkOut=!1)},zi=()=>{C.value=!0},Mu=()=>{const y=S.value.trim().length>0,g=T.value.trim().length>0,E=!!w.value.checkIn,$=!!w.value.checkOut;return te.value={destination:!y,nationality:!g,checkIn:!E,checkOut:!$},y&&g&&E&&$},Nu=()=>{var ji,Hi,Ki,Ui,_i,Yi;const y=ae.value,g=re.value,E=V.value.map((rt,Xt)=>{const tr=[rt.adults,rt.children,...rt.childAges];return`room${Xt+1}=${tr.join("-")}`}),$=Z.value?((Hi=(ji=se.value)==null?void 0:ji.lat)==null?void 0:Hi.toString())??"0":((Ki=y==null?void 0:y.lattitude)==null?void 0:Ki.toString())??"0",Q=Z.value?((_i=(Ui=se.value)==null?void 0:Ui.lng)==null?void 0:_i.toString())??"0":((Yi=y==null?void 0:y.longitude)==null?void 0:Yi.toString())??"0",ee={curr:"INR",geoId:Z.value?"":(y==null?void 0:y.geoId)??"",Country:Z.value?"":(y==null?void 0:y.countryCode)??"",nationality:(g==null?void 0:g.country_code)??"",checkinDate:w.value.checkIn?Fi(w.value.checkIn):"",checkoutDate:w.value.checkOut?Fi(w.value.checkOut):"",lc:"EN",StarRatings:le.value.length>0?le.value.join(","):"",MealTypes:we.value.length>0?we.value.join(","):"",FreeCancellation:"false",geoName:Z.value?"Around Current Location":(y==null?void 0:y.displayName)??"",Lat:$,Long:Q,is_around_current_location:Z.value?"true":"false",currtime:Date.now().toString(),mgcc:"",type:Z.value?"":(y==null?void 0:y.type)??""},Ve=`/hotel/result?${[...Object.entries(ee).map(([rt,Xt])=>`${encodeURIComponent(rt)}=${encodeURIComponent(Xt)}`),...E].join("&")}`;if(console.log("Query string:",Ve),h.value){const tr=`${`https://${h.value.replace(/^https?:\/\//i,"").split("/")[0]}`}${Ve}`;window.open(tr,"_blank","noopener,noreferrer")}},Lu=y=>{y.preventDefault(),Mu()&&Nu()};let Pt=null;a.watch(S,y=>{const g=y.trim();if(g.length<Ye){K.value=[];return}Pt&&clearTimeout(Pt),Pt=setTimeout(async()=>{var $;const E=new AbortController;try{q.value=!0;const Q={"Content-Type":"application/json"},ee=Zt();ee&&(Q.token=ee);const pe=await fetch(r,{method:"POST",headers:Q,body:JSON.stringify({searchTerm:g,languageCode:"EN",lattitude:"",longitude:""}),signal:E.signal});if(!pe.ok)throw new Error("Destination search failed");const Ve=await pe.json();K.value=(($=Ve.data)==null?void 0:$.locations)??Ve.locations??[]}catch(Q){Q instanceof DOMException&&Q.name==="AbortError"||(K.value=[])}finally{q.value=!1}},300)});let It=null;a.watch(T,y=>{const g=y.trim();if(g.length<Ye){U.value=[];return}It&&clearTimeout(It),It=setTimeout(async()=>{const E=new AbortController;try{W.value=!0;const $={"Content-Type":"application/json"},Q=Zt();Q&&($.token=Q);const ee=await fetch(`${Ou}${xu}/${encodeURIComponent(g)}`,{method:"GET",headers:$,signal:E.signal});if(!ee.ok)throw new Error("Nationality search failed");const pe=await ee.json();U.value=pe??[]}catch($){$ instanceof DOMException&&$.name==="AbortError"||(U.value=[])}finally{W.value=!1}},300)}),a.watch(V,()=>{const y=V.value.reduce((pe,Ve)=>pe+Ve.adults,0),g=V.value.reduce((pe,Ve)=>pe+Ve.children,0),E=V.value.length===1?"Room":"Rooms",$=y===1?"Adult":"Adults",Q=g===0?"":g===1?`, ${g} Child`:`, ${g} Children`,ee=`${V.value.length} ${E}, ${y} ${$}${Q}`;ze("roomsGuests",ee)},{deep:!0});const Ri=y=>{var pe;const g=y.target,E=g.closest(".p-dropdown-panel")!==null||g.closest(".p-dropdown-items-wrapper")!==null||g.closest(".p-dropdown-item")!==null||((pe=g.closest(".p-component"))==null?void 0:pe.classList.contains("p-dropdown"))!==!1||g.closest('[data-pc-section="panel"]')!==null||g.closest('[data-pc-name="dropdown"]')!==null;R.value&&!R.value.contains(g)&&(D.value=!1),x.value&&!x.value.contains(g)&&(v.value=!1),!E&&j.value&&!j.value.contains(g)&&(P.value=!1);const $=g.closest(".sw-com-cal"),Q=g.closest("#checkIn")||g.closest("#checkOut"),ee=g.closest(".p-calendar")||g.closest(".p-datepicker");C.value&&!Q&&!ee&&(!$||!$.querySelector(".p-calendar"))&&(C.value=!1)};return a.onMounted(()=>{Kn(),Un(),document.addEventListener("mousedown",Ri)}),a.onUnmounted(()=>{document.removeEventListener("mousedown",Ri),Pt&&clearTimeout(Pt),It&&clearTimeout(It)}),(y,g)=>(a.openBlock(),a.createElementBlock("div",{class:"thsw-root sw-container",style:a.normalizeStyle(Hn.value)},[a.createElementVNode("div",yc,[a.createElementVNode("form",{class:"sw-srh-h-grid",onSubmit:a.withModifiers(Lu,["prevent"])},[a.createElementVNode("div",{class:a.normalizeClass(["sw-form-field","sw-pos-rel","br-left",{"thsw-field-error":te.value.destination}])},[g[10]||(g[10]=a.createElementVNode("label",{for:"destination"},"Destination",-1)),a.createElementVNode("div",{class:"sw-custom-dropdown",ref_key:"destinationDropdownRef",ref:R},[a.createElementVNode("div",vc,[a.createElementVNode("input",{class:"hotel-destination-input",value:S.value,onInput:_n,onFocus:g[0]||(g[0]=E=>I(!0)),placeholder:"Where are you going?"},null,40,wc)]),D.value?(a.openBlock(),a.createElementBlock("div",kc,[a.createElementVNode("ul",Sc,[a.createElementVNode("li",{class:"sw-srh-loc",onClick:qn},[...g[5]||(g[5]=[a.createElementVNode("div",{class:"sw-flex sw-align-center sw-gap-5 sw-justify-between"},[a.createElementVNode("div",{class:"sw-flex sw-align-center sw-gap-15"},[a.createElementVNode("span",{class:"sw-hotel-search-form-icon sw-fill"},[a.createElementVNode("svg",{width:"26px",height:"26px",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-testid":"MyLocationIcon",class:"sw-bg-color-loc"},[a.createElementVNode("path",{fillRule:"evenodd",d:"M12.0283 3a.7614.7614 0 0 1 .7614.7614v1.1544c3.328.3533 5.9726 2.9958 6.329 6.3228h1.1482a.7614.7614 0 0 1 0 1.5228h-1.1467c-.3505 3.3337-2.9978 5.9831-6.3305 6.3368v1.1404a.7614.7614 0 0 1-1.5228 0v-1.1404c-3.3327-.3537-5.98-3.0031-6.3306-6.3368H3.7897a.7614.7614 0 0 1 0-1.5228h1.1481c.3565-3.327 3.001-5.9696 6.3291-6.3228V3.7614A.7614.7614 0 0 1 12.0283 3m5.6086 9.007c0 3.0976-2.5111 5.6086-5.6086 5.6086s-5.6086-2.511-5.6086-5.6086 2.511-5.6085 5.6086-5.6085 5.6086 2.511 5.6086 5.6085m-3.5479-.0001c0 1.1381-.9226 2.0607-2.0607 2.0607-1.138 0-2.0606-.9226-2.0606-2.0607 0-1.138.9226-2.0606 2.0606-2.0606s2.0607.9226 2.0607 2.0606m1.5228 0c0 1.9791-1.6044 3.5835-3.5835 3.5835s-3.5834-1.6044-3.5834-3.5835 1.6044-3.5834 3.5834-3.5834 3.5835 1.6044 3.5835 3.5834",clipRule:"evenodd"})])]),a.createElementVNode("h5",{class:"sw-fw500"},"Around Current Location")])],-1)])]),q.value?(a.openBlock(),a.createElementBlock("li",Cc,[...g[6]||(g[6]=[a.createElementVNode("div",{class:"sw-dropdown-list-card"},[a.createElementVNode("h6",{class:"sw-text-label"},"Searching...")],-1)])])):a.createCommentVNode("",!0),!q.value&&S.value.trim().length<Ye?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},a.renderList(n,E=>a.createElementVNode("li",{key:E.geoId,class:"sw-dropdown-list-item",onClick:$=>Qt(E)},[a.createElementVNode("div",Ec,[g[7]||(g[7]=a.createElementVNode("span",{class:"sw-hotel-search-form-icon"},[a.createElementVNode("svg",{width:"30px",height:"30px",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-testid":"LocationIcon"},[a.createElementVNode("path",{d:"M13.5 8.0056c0 .8294-.6716 1.5017-1.5 1.5017s-1.5-.6723-1.5-1.5017.6716-1.5017 1.5-1.5017 1.5.6723 1.5 1.5017"}),a.createElementVNode("path",{fillRule:"evenodd",d:"M12 17.0359c2.7614 0 5-6.2457 5-9.0102C17 5.261 14.7614 3.02 12 3.02S7 5.2611 7 8.0257c0 2.7645 2.2386 9.0102 5 9.0102m2.1803-4.1114C15.0205 11.1538 15.5 9.1236 15.5 8.0257 15.5 6.088 13.9314 4.52 12 4.52S8.5 6.088 8.5 8.0257c0 1.098.4795 3.1281 1.3197 4.8988.414.8726.8717 1.5863 1.3208 2.0583.4658.4896.7566.5531.8595.5531s.3937-.0635.8595-.5531c.4491-.472.9068-1.1857 1.3208-2.0583",clipRule:"evenodd"}),a.createElementVNode("path",{d:"M16.8904 14.2118c-.1965.4142.0122.9154.4396 1.0813q.2178.0845.4184.175c1.5348.6914 1.7516 1.3369 1.7516 1.4976 0 .1606-.2168.8061-1.7516 1.4975-1.394.628-3.425 1.0553-5.7484 1.0553s-4.3544-.4273-5.7484-1.0553C4.7168 17.7718 4.5 17.1263 4.5 16.9657s.2168-.8062 1.7516-1.4976a8.5 8.5 0 0 1 .4184-.175c.4274-.1659.6361-.6671.4396-1.0813-.1528-.322-.5183-.493-.8522-.3682C4.2674 14.5873 3 15.7098 3 16.9657c0 2.2392 4.0294 4.0545 9 4.0545s9-1.8153 9-4.0545c0-1.2559-1.2674-2.3784-3.2574-3.1221-.3339-.1248-.6994.0462-.8522.3682"})])],-1)),a.createElementVNode("div",null,[a.createElementVNode("h5",Dc,a.toDisplayString(E.geoTitle),1),a.createElementVNode("h6",Pc,a.toDisplayString(E.displayName),1)])])],8,Tc)),64)):a.createCommentVNode("",!0),!q.value&&S.value.trim().length>=Ye&&K.value.length===0?(a.openBlock(),a.createElementBlock("li",Ic,[...g[8]||(g[8]=[a.createElementVNode("div",{class:"sw-dropdown-list-card"},[a.createElementVNode("h6",{class:"sw-text-label"},"No results found")],-1)])])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(K.value,E=>(a.openBlock(),a.createElementBlock("li",{key:E.geoId,class:"sw-dropdown-list-item",onClick:$=>Qt(E)},[a.createElementVNode("div",xc,[g[9]||(g[9]=a.createElementVNode("span",{class:"sw-hotel-search-form-icon"},[a.createElementVNode("svg",{width:"30px",height:"30px",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-testid":"LocationIcon"},[a.createElementVNode("path",{d:"M13.5 8.0056c0 .8294-.6716 1.5017-1.5 1.5017s-1.5-.6723-1.5-1.5017.6716-1.5017 1.5-1.5017 1.5.6723 1.5 1.5017"}),a.createElementVNode("path",{fillRule:"evenodd",d:"M12 17.0359c2.7614 0 5-6.2457 5-9.0102C17 5.261 14.7614 3.02 12 3.02S7 5.2611 7 8.0257c0 2.7645 2.2386 9.0102 5 9.0102m2.1803-4.1114C15.0205 11.1538 15.5 9.1236 15.5 8.0257 15.5 6.088 13.9314 4.52 12 4.52S8.5 6.088 8.5 8.0257c0 1.098.4795 3.1281 1.3197 4.8988.414.8726.8717 1.5863 1.3208 2.0583.4658.4896.7566.5531.8595.5531s.3937-.0635.8595-.5531c.4491-.472.9068-1.1857 1.3208-2.0583",clipRule:"evenodd"}),a.createElementVNode("path",{d:"M16.8904 14.2118c-.1965.4142.0122.9154.4396 1.0813q.2178.0845.4184.175c1.5348.6914 1.7516 1.3369 1.7516 1.4976 0 .1606-.2168.8061-1.7516 1.4975-1.394.628-3.425 1.0553-5.7484 1.0553s-4.3544-.4273-5.7484-1.0553C4.7168 17.7718 4.5 17.1263 4.5 16.9657s.2168-.8062 1.7516-1.4976a8.5 8.5 0 0 1 .4184-.175c.4274-.1659.6361-.6671.4396-1.0813-.1528-.322-.5183-.493-.8522-.3682C4.2674 14.5873 3 15.7098 3 16.9657c0 2.2392 4.0294 4.0545 9 4.0545s9-1.8153 9-4.0545c0-1.2559-1.2674-2.3784-3.2574-3.1221-.3339-.1248-.6994.0462-.8522.3682"})])],-1)),a.createElementVNode("div",null,[a.createElementVNode("h5",Vc,a.toDisplayString(E.geoTitle),1),a.createElementVNode("h6",Bc,a.toDisplayString(E.displayName),1)])])],8,Oc))),128))])])):a.createCommentVNode("",!0)],512)],2),a.createElementVNode("div",{class:a.normalizeClass(["sw-form-field","sw-pos-rel",{"thsw-field-error":te.value.nationality}])},[g[13]||(g[13]=a.createElementVNode("label",{for:"nationality"},"Nationality",-1)),a.createElementVNode("div",{class:"sw-custom-dropdown",ref_key:"nationalityDropdownRef",ref:x},[a.createElementVNode("div",Ac,[a.createElementVNode("input",{class:"hotel-destination-input",value:T.value,onInput:Yn,onFocus:g[1]||(g[1]=E=>O(!0)),placeholder:w.value.nationality},null,40,$c)]),v.value?(a.openBlock(),a.createElementBlock("div",Mc,[a.createElementVNode("ul",Nc,[W.value?(a.openBlock(),a.createElementBlock("li",Lc,[...g[11]||(g[11]=[a.createElementVNode("div",{class:"sw-dropdown-list-box"},[a.createElementVNode("div",null,[a.createElementVNode("h5",{class:"sw-fw500 sw-text-ellipsis"},"Searching...")])],-1)])])):a.createCommentVNode("",!0),!W.value&&T.value.trim().length<Ye?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},a.renderList(i,E=>a.createElementVNode("li",{key:E.country_id,class:"sw-dropdown-list-item",onClick:$=>Jt(E)},[a.createElementVNode("div",zc,[a.createElementVNode("div",null,[a.createElementVNode("h5",Rc,a.toDisplayString(E.country_name),1)]),a.createElementVNode("h6",jc,a.toDisplayString(E.country_code),1)])],8,Fc)),64)):a.createCommentVNode("",!0),!W.value&&T.value.trim().length>=Ye&&U.value.length===0?(a.openBlock(),a.createElementBlock("li",Hc,[...g[12]||(g[12]=[a.createElementVNode("div",{class:"sw-dropdown-list-box"},[a.createElementVNode("div",null,[a.createElementVNode("h5",{class:"sw-fw500 sw-text-ellipsis"},"No results found")])],-1)])])):a.createCommentVNode("",!0),!W.value&&T.value.trim().length>=Ye?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:3},a.renderList(jn.value,E=>(a.openBlock(),a.createElementBlock("li",{key:E.country_id,class:"sw-dropdown-list-item",onClick:$=>Jt(E)},[a.createElementVNode("div",Uc,[a.createElementVNode("div",null,[a.createElementVNode("h5",_c,a.toDisplayString(E.country_name),1)]),a.createElementVNode("h6",Yc,a.toDisplayString(E.country_code),1)])],8,Kc))),128)):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0)],512)],2),a.createElementVNode("div",qc,[a.createElementVNode("div",{class:a.normalizeClass(["sw-form-field","sw-pos-rel","sw-com-cal",{"thsw-field-error":te.value.checkIn}])},[g[14]||(g[14]=a.createElementVNode("label",{for:"checkIn"},"Check-in",-1)),a.createElementVNode("input",{id:"checkIn",class:"hotel-destination-input",readonly:"",value:Li(w.value.checkIn),placeholder:"Select date",onClick:zi},null,8,Wc),C.value?(a.openBlock(),a.createBlock(a.unref(fd),{key:0,ref_key:"calendarRef",ref:Y,modelValue:nt.value,"onUpdate:modelValue":[g[2]||(g[2]=E=>nt.value=E),$u],inline:"",selectionMode:"range",numberOfMonths:2,minDate:new Date,dateFormat:"dd M yy",class:"thsw-range-calendar"},null,8,["modelValue","minDate"])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{class:a.normalizeClass(["sw-form-field","sw-pos-rel","sw-com-cal",{"thsw-field-error":te.value.checkOut}])},[g[15]||(g[15]=a.createElementVNode("label",{for:"checkOut"},"Check-out",-1)),a.createElementVNode("input",{id:"checkOut",class:"hotel-destination-input",readonly:"",value:Li(w.value.checkOut),placeholder:"Select date",onClick:zi},null,8,Gc)],2)]),a.createElementVNode("div",Zc,[g[25]||(g[25]=a.createElementVNode("label",{for:"rooms"},"Rooms & Guests",-1)),a.createElementVNode("div",{class:"sw-custom-dropdown",ref_key:"roomsGuestsMenuRef",ref:j},[a.createElementVNode("div",{class:"sw-custom-dropdown-trigger",onClick:g[3]||(g[3]=E=>L(!P.value))},[a.createElementVNode("span",null,a.toDisplayString(w.value.roomsGuests),1)]),P.value?(a.openBlock(),a.createElementBlock("div",Qc,[g[24]||(g[24]=a.createElementVNode("h3",{class:"sw-rooms-guests-title"},"Number of Travellers",-1)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(V.value,(E,$)=>(a.openBlock(),a.createElementBlock("div",{key:$,class:"sw-room-section"},[a.createElementVNode("div",Jc,[g[16]||(g[16]=a.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},[a.createElementVNode("g",{transform:"translate(-4092.000000, -824.000000)"},[a.createElementVNode("g",{transform:"translate(4092.000000, 824.000000)"},[a.createElementVNode("rect",{fill:"#FFFFFF",opacity:"0",x:"0",y:"0",width:"24",height:"24"}),a.createElementVNode("g",{transform:"translate(3.000000, 6.000000)",fill:"var(--primary)",fillRule:"nonzero"},[a.createElementVNode("path",{d:"M18.011072,5.62815523 L18.011072,1.13048375 C18.011072,0.514180505 17.4892314,0.012765343 16.8478226,0.012765343 L2.14333676,0.012765343 C1.50192802,0.012765343 0.980087404,0.514180505 0.980087404,1.13048375 L0.980087404,5.62820217 C0.42596144,5.70920578 0,6.17002527 0,6.72475451 L0,9.50863177 C0,9.70302166 0.164015424,9.86061733 0.366323907,9.86061733 L0.75877892,9.86061733 L0.75877892,11.5970794 C0.75877892,11.7914693 0.922794344,11.949065 1.12510283,11.949065 L1.78639075,11.949065 L1.78639075,12.6268014 C1.78639075,12.8211913 1.95040617,12.978787 2.15271465,12.978787 C2.35502314,12.978787 2.51903856,12.8211913 2.51903856,12.6268014 L2.51903856,11.949065 L16.4721697,11.949065 L16.4721697,12.6268014 C16.4721697,12.8211913 16.6361362,12.978787 16.8384936,12.978787 C17.0408509,12.978787 17.2048175,12.8211913 17.2048175,12.6268014 L17.2048175,11.949065 L17.8661054,11.949065 C18.0684627,11.949065 18.2324293,11.7914693 18.2324293,11.5970794 L18.2324293,9.86061733 L18.6248355,9.86061733 C18.8271928,9.86061733 18.9911594,9.70302166 18.9911594,9.50863177 L18.9911594,6.72475451 C18.9911594,6.17002527 18.5651979,5.70915884 18.011072,5.62815523 Z M1.71268638,1.13048375 C1.71268638,0.902350181 1.90586118,0.716736462 2.14328792,0.716736462 L16.8477738,0.716736462 C17.0852005,0.716736462 17.2783753,0.902350181 17.2783753,1.13048375 L17.2783753,5.61553069 L15.99209,5.61553069 C16.2480283,5.35079061 16.5083625,5.0723935 16.7779769,4.77451986 C16.8978869,4.64203249 16.897838,4.44492058 16.777928,4.31248014 C15.7181285,3.14210469 14.8307943,2.28950181 13.6130848,1.27151264 C13.4752494,1.1562491 13.2700591,1.1562491 13.1321748,1.27151264 C11.9144165,2.28954874 11.0271311,3.14215162 9.96738046,4.31248014 C9.84747044,4.44492058 9.84742159,4.64203249 9.96733162,4.77451986 C10.2369949,5.07244043 10.4972802,5.35083755 10.7532185,5.61553069 L8.23764781,5.61553069 C8.49358612,5.35079061 8.75396915,5.0723935 9.02358355,4.77451986 C9.14349357,4.64203249 9.14349357,4.44492058 9.0235347,4.31248014 C7.96388175,3.14229242 7.07654756,2.28968953 5.85869152,1.27151264 C5.72085604,1.1562491 5.51566581,1.1562491 5.37778149,1.27151264 C4.15992545,2.28968953 3.27259126,3.14229242 2.2129383,4.31248014 C2.09297943,4.44492058 2.09297943,4.64203249 2.21288946,4.77451986 C2.4825527,5.0723935 2.74288689,5.35079061 2.99882519,5.61553069 L1.71268638,5.61553069 L1.71268638,1.13048375 Z M11.7640283,5.61553069 C11.4269614,5.28306859 11.0864756,4.92981588 10.7309949,4.54352347 C11.6067044,3.59142599 12.3820411,2.84643682 13.3726787,2.00519134 C14.3633162,2.84638989 15.138653,3.59142599 16.0144113,4.54352347 C15.6589794,4.92981588 15.3184447,5.28306859 14.9813779,5.61553069 L11.7640283,5.61553069 Z M4.0096838,5.61553069 C3.67261697,5.28302166 3.33208226,4.92981588 2.97660154,4.54352347 C3.85216452,3.59161372 4.62764781,2.84648375 5.61833419,2.00519134 C6.60902057,2.84648375 7.38450386,3.59161372 8.26006684,4.54352347 C7.90463496,4.92981588 7.56410026,5.28302166 7.22698458,5.61553069 L4.0096838,5.61553069 Z M17.4997815,11.2450939 L1.49142674,11.2450939 L1.49142674,9.86061733 L17.4997815,9.86061733 L17.4997815,11.2450939 Z M18.2585116,9.15664621 L0.732647815,9.15664621 L0.732647815,6.72475451 C0.732647815,6.50131408 0.921866324,6.31950181 1.15445758,6.31950181 L17.8367018,6.31950181 C18.0692931,6.31950181 18.2585116,6.50131408 18.2585116,6.72475451 L18.2585116,9.15664621 Z"})])])])])],-1)),a.createTextVNode(" Room "+a.toDisplayString($+1),1)]),a.createElementVNode("div",Xc,[a.createElementVNode("div",eu,[g[19]||(g[19]=a.createElementVNode("div",{class:"sw-room-control-label"},[a.createElementVNode("span",null,"Adult (18+ years)")],-1)),a.createElementVNode("div",tu,[a.createElementVNode("button",{type:"button",class:a.normalizeClass(["sw-count-button",E.adults===1?"sw-disabled":"sw-active"]),onClick:Q=>er($),disabled:E.adults===1},[...g[17]||(g[17]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",fill:"var(--sw-white)",viewBox:"0 -960 960 960"},[a.createElementVNode("path",{d:"M200-440v-80h560v80H200Z"})],-1)])],10,nu),a.createElementVNode("span",ru,a.toDisplayString(E.adults),1),a.createElementVNode("button",{type:"button",class:a.normalizeClass(["sw-count-button",E.adults>=Rn?"sw-disabled":"sw-active"]),onClick:Q=>Xn($),disabled:E.adults>=Rn},[...g[18]||(g[18]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",fill:"var(--sw-white)",viewBox:"0 -960 960 960"},[a.createElementVNode("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})],-1)])],10,iu)])]),a.createElementVNode("div",ou,[g[22]||(g[22]=a.createElementVNode("div",{class:"sw-room-control-label"},[a.createElementVNode("span",null,"Child (0-17 years)")],-1)),a.createElementVNode("div",au,[a.createElementVNode("button",{type:"button",class:a.normalizeClass(["sw-count-button",E.children===0?"sw-disabled":"sw-active"]),onClick:Q=>Bu($),disabled:E.children===0},[...g[20]||(g[20]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",fill:"var(--sw-white)",viewBox:"0 -960 960 960"},[a.createElementVNode("path",{d:"M200-440v-80h560v80H200Z"})],-1)])],10,su),a.createElementVNode("span",lu,a.toDisplayString(E.children),1),a.createElementVNode("button",{type:"button",class:a.normalizeClass(["sw-count-button",E.children>=4?"sw-disabled":""]),onClick:Q=>Vu($),disabled:E.children>=4},[...g[21]||(g[21]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",fill:"var(--sw-white)",viewBox:"0 -960 960 960"},[a.createElementVNode("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})],-1)])],10,du)])])]),a.createElementVNode("div",cu,[E.children>0?(a.openBlock(),a.createElementBlock("div",uu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Array.from({length:E.children}),(Q,ee)=>(a.openBlock(),a.createElementBlock("span",{key:ee,class:"sw-room-control-label"}," Child "+a.toDisplayString(ee+1),1))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",pu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Array.from({length:E.children}),(Q,ee)=>(a.openBlock(),a.createElementBlock("div",{key:ee,class:"sw-child-age-item"},[a.createVNode(a.unref(gl),{modelValue:E.childAges[ee]??0,options:s,optionLabel:"label",optionValue:"value","onUpdate:modelValue":pe=>Au($,ee,pe),placeholder:"Age",class:"child-age-dropdown"},null,8,["modelValue","onUpdate:modelValue"])]))),128))])]),V.value.length>1&&$>0?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"sw-remove-room-button",onClick:Q=>Zn($),"aria-label":`Remove Room ${$+1}`}," × ",8,hu)):a.createCommentVNode("",!0)]))),128)),a.createElementVNode("div",fu,[V.value.length<6?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"sw-add-room-button",onClick:Qn},[...g[23]||(g[23]=[a.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{fill:"none",d:"M0 0h16v16H0z"}),a.createElementVNode("path",{d:"M15 7H9V1H7v6H1v2h6v6h2V9h6z"})],-1),a.createTextVNode(" Add another room ",-1)])])):a.createCommentVNode("",!0),a.createElementVNode("div",mu,[a.createElementVNode("button",{type:"button",class:"sw-reset-button",onClick:Jn}," Reset "),a.createElementVNode("button",{type:"button",class:"sw-apply-button",onClick:g[4]||(g[4]=E=>L(!1))}," Apply ")])])])):a.createCommentVNode("",!0)],512)]),a.createVNode(a.unref(mn),{type:"submit",label:"Search",icon:"pi pi-search",class:"sw-search-button br-right"})],32),a.createElementVNode("div",gu,[a.createVNode(a.unref(gi),null,{default:a.withCtx(()=>[a.createVNode(a.unref(bi),{header:"Advanced Search options"},{default:a.withCtx(()=>[a.createElementVNode("div",bu,[g[27]||(g[27]=a.createElementVNode("h5",null,"Star Rating:",-1)),a.createElementVNode("div",yu,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList([5,4,3,2,1],E=>a.createElementVNode("label",{key:E,class:"sw-star-checkbox-wrap sw-checkbox-wrap"},[a.createElementVNode("input",{type:"checkbox",checked:le.value.includes(E),onChange:$=>Wn(E)},null,40,vu),a.createElementVNode("div",wu,[a.createElementVNode("span",ku,a.toDisplayString(E),1),g[26]||(g[26]=a.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 18 17",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M3.35375 16.6825L4.7865 10.5133L0 6.36525L6.31525 5.81725L8.77875 0L11.2422 5.81725L17.5575 6.36525L12.771 10.5133L14.2038 16.6825L8.77875 13.4095L3.35375 16.6825Z",fill:"#ffae43"})],-1))])])),64))])]),a.createElementVNode("div",Su,[g[28]||(g[28]=a.createElementVNode("h5",null,"Meal Type:",-1)),a.createElementVNode("div",Cu,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(o,E=>a.createElementVNode("label",{key:E.value,class:"sw-checkbox-wrap"},[a.createElementVNode("input",{type:"checkbox",checked:we.value.includes(E.value),onChange:$=>Gn(E.value)},null,40,Tu),a.createElementVNode("div",Eu,a.toDisplayString(E.label),1)])),64))])])]),_:1})]),_:1})])])],4))}};Be.HotelSearchWidget=Ni,Be.default=Ni,Object.defineProperties(Be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED