1import{a2 as Me,a0 as xe,aM as $e,a5 as se,a3 as Ae,a4 as Re,a6 as le,H as m,i as S,a7 as qe,A as re,B as Le,ae as q,w as M,g as b,f as n,b as h,d as W,a9 as ze,q as l,c as j,O as E,Q as Te,h as Ue,e as ne,v as H,F as G,p as oe,ad as ce,j as _e,W as Ve,D as We,a as f,dj as ue}from"./index-BspZFfai.js";import{u as je,_ as de,a as Ee,b as He,B as Ge}from"./MapBottomSheet-Bfir0FUM.js";import{B as Qe}from"./BasePagination-AWtc-dfk.js";import{u as Ke,a as Ye}from"./facilitiesStore-ZJlMSVj5.js";import{t as Je}from"./taman-wisata-bougenville-logo-CTdvclkb.js";import{B as L}from"./BaseChip-BDDvZYmj.js";const Xe={class:"relative rcm"},Ze={class:"content--vertical content--fixed-width--xl px-16 lg:px-32 py-32 lg:py-64","data-test":"search-result-page"},et={key:0,class:"p-24 border border-neutral-900/10 rounded-2xl flex flex-col gap-16"},tt={class:"flex flex-row gap-8"},at={key:1,class:"flex flex-row gap-8"},it={class:"flex flex-row gap-8"},st={class:"grid grid-cols-1 lg:grid-cols-3 gap-24"},lt={class:"grid-cols-1 lg:grid-cols-2 col-span-1 lg:col-span-2 grid gap-24 gap-y-24 min-h-[50vh]"},rt=["href"],nt={class:"col-span-1 lg:col-span-2 flex flex-row justify-center items-center h-full"},ot={class:"col-span-1 lg:col-span-2 flex flex-row justify-center items-center h-fit p-8 my-40"},ct=1024,pt={__name:"PageSearchTamanWisataBougenville",setup(ut){Me({title:"Villas for Rent at Taman Wisata Bougenville, Bandung",description:"Browse available villas for rent at Taman Wisata Bougenville, a highland villa estate in Puntang, Bandung. Book directly with Kozystay.",canonical:"/taman-wisata-bougenville/search"});const y=xe(`(max-width: ${ct-1}px)`),Q=m(null),me={to:"/taman-wisata-bougenville",image:Je,name:"Taman Wisata Bougenville"},he=["home","login","signup","register-property","profile"],o=Le(),z=We(),K=m([]),F=m([]),B=m({cities:[],districts:[]}),Y=$e(),{buildingIds:k}=se(Y),e=Ae(),{isBoundsMode:D,onMapBoundsChanged:fe,clearMapBounds:J}=Re(),{showLoadingSkeleton:w,withSkeleton:x}=je(),ge=async i=>{await x(()=>fe(i))},T=Ke(),U=Ye(),I=m(-1),ve=m(0),r=S({get(){return e.searchForm},set(i){e.searchForm=i}}),{getSearchResults:p,isLoading:P,getLastPage:pe,getCurrentPage:_,getTotalPages:be}=se(e),X=S(()=>Math.min(be.value,10)),C=m(!1),$=m(!1),Z=S(()=>T.getAmenities.map(i=>({label:i.name,name:"amenity-"+i.id,value:i.id}))),ee=S(()=>U.getFacilities.map(i=>({label:i.name,name:"facility-"+i.id,value:i.id}))),c=m(!0),O=m(!1);K.value=le([{group:"search",fields:[{label:"Stay date",name:"stayDate",type:"date",rules:"required"},{label:"Guest",name:"guest",type:"guest",placeholder:"Add guest",rules:"required",iconBefore:"content-guest",filterMode:!0}]}]),F.value=le([{group:"search",fields:[{label:"City",name:"cityId",type:"select",placeholder:"Add city",options:S(()=>D.value?e.getCities.map(i=>i.value===0?{...i,label:"Map area"}:i):e.getCities),iconBefore:"content-search",onClick:()=>{D.value&&J()}},{label:"District",name:"districtId",type:"select",placeholder:"Add district",options:S(()=>D.value?[{value:0,label:"Map area",slug:"all-districts"}]:e.getDistricts)},{label:"Stay date",name:"stayDate",type:"date",rules:"required"},{label:"Guest",name:"guest",type:"guest",placeholder:"Add guest",rules:"required",iconBefore:"content-guest",filterMode:!0},{label:"Filter",name:"filter",type:"filter",iconBefore:"content-filter",amenitiesOptions:Z,facilitiesOptions:ee}]}]);const ye=async()=>{await e.readMore()},Fe=async i=>{w.value=!0,window.scrollTo({top:0}),await x(()=>e.goToPage(i))},Be=async i=>{if(I.value=i.isPicked?p.value.findIndex(a=>a.id===+i.id):-1,I.value>=0){const a=document.getElementById(`listing-${I.value}`);if(a){const t=new IntersectionObserver(s=>{s.forEach(g=>{if(g.isIntersecting){const d=document.querySelector(".header").offsetHeight+16,u=window.scrollY+a.getBoundingClientRect().top-d;window.scrollTo({top:u}),t.disconnect()}})});t.observe(a),a.scrollIntoView({behavior:"smooth",block:"start"})}}},ke=m(!1),Ce=async()=>{e.getCities.length===0&&(await e.readCities(),B.value={...B.value,cities:e.getCities});const{cityId:i,citySlug:a}=o.params;i&&a&&(e.searchForm.cityId=Number(i),e.searchForm.citySlug=a);let t=e.getCities.find(s=>s.value===e.getCityId);e.getCityId===0?e.searchForm.cityName="All Destinations":e.searchForm.cityName=t?t.label:e.searchForm.cityName},Se=async()=>{const{districtId:i,districtSlug:a}=o.params;if(i&&a&&(e.searchForm.districtId=Number(i),e.searchForm.districtSlug=a),e.searchForm.cityId!==0){await e.readDistricts(),B.value={...B.value,districts:e.getDistricts};let t=e.getDistricts.find(s=>s.value===e.getDistrictId);e.searchForm.districtName=t?t.label:e.searchForm.districtName,F.value[0].fields[1].readonly=!1}else e.searchForm.districtName="All Districts",F.value[0].fields[1].readonly=!0},te=()=>{const{checkinDate:i,checkoutDate:a,adult:t,child:s,infant:g,numberOfBedrooms:v,numberOfBathrooms:d,numberOfBeds:u,prices:R,facilityFeatures:V,buildingIds:N}=o.query;e.searchForm={...e.searchForm,checkinDate:i||e.searchForm.checkinDate,checkoutDate:a||e.searchForm.checkoutDate,guest:{adult:Number(t||e.searchForm.guest.adult),child:Number(s||e.searchForm.guest.child),infant:Number(g||e.searchForm.guest.infant)},filter:{...e.searchForm.filter,numberOfBedrooms:v?Number(v):e.searchForm.filter.numberOfBedrooms,numberOfBathrooms:d?Number(d):e.searchForm.filter.numberOfBathrooms,numberOfBeds:u?Number(u):e.searchForm.filter.numberOfBeds,facilityFeatures:V,amenities:o.query.amenities?o.query.amenities.split(",").map(Number):e.searchForm.filter.amenities,facilities:o.query.facilities?o.query.facilities.split(",").map(Number):e.searchForm.filter.facilities,prices:R?R.split(",").map(Ne=>Number(Ne)):[Number(e.searchForm.filter.minPrice),Number(e.searchForm.filter.maxPrice)]},buildingIds:N,businessUnitCode:N&&N.length>0?"TWB":null}},ae=(i,a)=>{B.value={cities:i,districts:a}};qe(async()=>{e.getCities.length===0&&await e.readCities(),ae(e.getCities,e.getDistricts)});const ie=async()=>{let i={isPopular:!0,sort:"name",order:"asc",page:1,pageSize:20};T.params=i,U.params=i,await Promise.all([Ce(),Se(),T.readAmenities(),U.readFacilities(),Y.readBuildingsByBusinessUnit("TWB")]
1),te(),e.searchForm.isFinalPrice=!0,await e.readListings()};re(async()=>{const{cityId:i,citySlug:a,districtId:t,districtSlug:s}=o.params;i&&a&&t&&s?document.title=`Search result of ${parseInt(i)===0?"All destinations":q(a)} ${parseInt(t)===0?"":` - ${q(s)}`}`:window.location.pathname.includes("taman-wisata-bougenville")?document.title="Search result of Taman Wisata Bougenville":document.title="Search result of Kozystay properties"}),re(async()=>{const i=document.querySelector(".header").offsetHeight;ve.value=i+16,await x(()=>ie()),M(D,a=>{a&&(e.searchForm.cityId=0,e.searchForm.districtId=0)}),M(()=>r.value.cityId,async(a,t)=>{e.searchForm.cityId=a,await e.readDistricts(),e.searchForm.cityId===0?F.value[0].fields[1].readonly=!0:(F.value[0].fields[1].readonly=!1,ae(e.getCities,e.getDistricts)),a!==t&&(e.searchForm.districtId=0,e.searchForm.districtName="All Districts")}),M(()=>o.fullPath,async()=>{await x(()=>ie())}),M(()=>o.query,async()=>{te()},{deep:!0})});const De=i=>{let a=`/listing/${i.id}/${i.name.toLowerCase().replace(/ /g,"-")}`,t=r.value.checkinDate,s=r.value.checkoutDate;!t&&i.isFinalPrice&&i.finalPrice&&(t=i.finalPrice.checkinDate,s=i.finalPrice.checkoutDate);let g={checkinDate:t,checkoutDate:s,adult:r.value.guest.adult>0?r.value.guest.adult:null,child:r.value.guest.child>0?r.value.guest.child:null,infant:r.value.guest.infant>0?r.value.guest.infant:null,finalPrice:i.displayPrice,withStayDate:!!(r.value.checkinDate&&r.value.checkoutDate)},v=Object.entries(g).filter(([,d])=>d!=null&&d!=="").map(([d,u])=>`${d}=${u}`).join("&");return`${a}${v?`?${v}`:""}`},A=async()=>{J(),C.value=!1,we()&&(w.value=!0)},we=()=>{const i=(u,R,V)=>u.find(N=>N.value===R)?.slug||V,a=i(e.cities,e.searchForm.cityId,"all-cities"),t=i(e.districts,e.searchForm.districtId,"all-districts");e.searchForm.citySlug=a,e.searchForm.districtSlug=t;let s=e.searchForm,g={checkinDate:s.checkinDate?s.checkinDate:e.getDefaultSearchForm.checkinDate,checkoutDate:s.checkoutDate?s.checkoutDate:e.getDefaultSearchForm.checkoutDate,adult:Number(s.guest.adult),child:Number(s.guest.child),infant:Number(s.guest.infant),numberOfBedrooms:Number(s.filter.numberOfBedrooms),numberOfBathrooms:Number(s.filter.numberOfBathrooms),numberOfBeds:Number(s.filter.numberOfBeds),prices:s.filter.prices[0]!==null&&s.filter.prices[1]!==null?`${s.filter.prices[0]},${s.filter.prices[1]}`:`${s.filter.minPrice},${s.filter.maxPrice}`,facilityFeatures:s.filter.facilityFeatures,amenities:s.filter.amenities&&s.filter.amenities.length>0?s.filter.amenities.join(","):null,facilities:s.filter.facilities&&s.filter.facilities.length>0?s.filter.facilities.join(","):null};c.value&&k.value&&k.value.length>0?g.buildingIds=k.value:(g.cityId=s.cityId,g.districtId=s.districtId);let v=Object.fromEntries(Object.entries(g).filter(([,u])=>u!=null&&u!==""));return z.resolve({path:"/taman-wisata-bougenville/search",query:v}).fullPath===o.fullPath?!1:(z.replace({path:"/taman-wisata-bougenville/search",query:v}),document.title=`Search result of ${s.cityId===0?"All Destinations":q(s.citySlug)} ${s.districtId===0?"":` - ${q(s.districtSlug)}`}`,!0)},Ie=()=>{C.value=!C.value},Pe=()=>{$.value=!$.value},Oe=()=>z.push("/taman-wisata-bougenville");return M(()=>c.value,()=>{const i=e.searchForm.checkinDate,a=e.searchForm.checkoutDate,t=ue(e.searchForm.guest);e.searchForm=ue(e.getDefaultSearchForm),e.searchForm.checkinDate=i,e.searchForm.checkoutDate=a,e.searchForm.guest=t,c.value?(delete e.searchForm.cityId,delete e.searchForm.districtId,e.searchForm.buildingIds=Array.isArray(k.value)?k.value?.join(","):k.value||"",e.searchForm.businessUnitCode="TWB"):(e.searchForm.buildingIds&&delete e.searchForm.buildingIds,e.searchForm.businessUnitCode=null),y.value||(w.value=!0,A())}),(i,a)=>(f(),b("div",Xe,[n(ze,{headerAction:me,menu:he,overrideBack:Oe,onChatClick:()=>Q.value?.handleClick(),showChatOnAllRoutes:""},null,8,["onChatClick"]),h("section",Ze,[a[12]||(a[12]=h("h1",{class:"sr-only"},"Villas for Rent at Taman Wisata Bougenville, Bandung",-1)),l(y)?(f(),b("div",at,[n(E,{ghost:"",size:"sm",type:"button",onClick:Ie,label:"Search",iconBefore:"content-search"}),n(Te,{layout:"vertical"}),n(E,{ghost:"",size:"sm",type:"button",onClick:Pe,label:"Show map",iconBefore:"content-world"})])):(f(),b("div",et,[h("div",tt,[n(L,{size:"sm",label:"Taman Wisata Bougenville",active:c.value,onClick:a[0]||(a[0]=t=>c.value=!0)},null,8,["active"]),n(L,{size:"sm",label:"All properties",active:!c.value,onClick:a[1]||(a[1]=t=>c.value=!1)},null,8,["active"])]),c.value?(f(),j(de,{key:0,modelValue:r.value,"onUpdate:modelValue":a[2]||(a[2]=t=>r.value=t),fields:K.value,layout:"horizontal",secondaryButton:"",submitLabel:"Search",submitForm:A,widthFit:!1},null,8,["modelValue","fields"])):(f(),j(de,{key:1,modelValue:r.value,"onUpdate:modelValue":a[3]||(a[3]=t=>r.value=t),fields:F.value,layout:"horizontal",secondaryButton:"",submitLabel:"Search",submitForm:A,flexWrap:!0},null,8,["modelValue","fields"]))])),n(Ee,{visible:r.value&&l(y)&&C.value,"onUpdate:visible":a[4]||(a[4]=t=>C.value=t),modelValue:r.value,"onUpdate:modelValue":a[5]||(a[5]=t=>r.value=t),submitForm:A,locations:B.value,isSearchRCMActive:c.value,"onUpdate:cityId":a[6]||(a[6]=t=>r.value.cityId=t),"onUpdate:isSearchRCMActive":a[7]||(a[7]=t=>c.value=t),amenitiesOptions:Z.value,facilitiesOptions:ee.value},{controls:Ue(({toggle:t})=>[h("div",it,[n(L,{size:"sm",label:"Taman Wisata Bougenville",active:c.value,onClick:s=>t(!0)},null,8,["active","onClick"]),n(L,{size:"sm",label:"All properties",active:!c.value,onClick:s=>t(!1)},null,8,["active","onClick"])])]),_:1},8,["visible","modelValue","locations","isSearchRCMActive","amenitiesOptions","facilitiesOptions"]),n(He,{visible:$.value&&l(y),"onUpdate:visible":a[8]||(a[8]=t=>$.value=t),searchResults:l(p),isLoading:l(P),action:ye,lastPage:l(pe)},null,8,["visible","searchResults","isLoading","lastPage"]),h("div",st,[W(h("div",lt,[l(w)||l(P)&&l(p).length===0?(f(),b(G,{key:0},[a[10]||(a[10]=h("p",{class:"sr-only",role:"status","aria-live":"polite"},"Loading propertiesâ¦",-1)),(f(),b(G,null,oe(10,t=>h("div",{key:"skeleton-"+t},[n(ce,{skeleton:!0})])),64))],64)):(f(!0),b(G,{key:1},oe(l(p),(t,s)=>(f(),b("a",{key:t.id,href:De(t)},[n(ce,{id:"listing-"+t.id,selected:s===I.value,areaSquareMeters:t.areaSquareMeters,baseRatePerNight:t.displayPrice,cityName:t.city,districtName:t.district,guestCapacity:t.guestCapacity,listingId:t.id,image:t.thumbnailUrl,images:t.images||[],numberOfBedrooms:t.numberOfBedrooms,numberOfBathrooms:t.numberOfBathrooms,name:t.name,rating:t.rating,businessUnitId:t.businessUnitId,isFinalPrice
1:t.isFinalPrice||!1,finalPrice:t.finalPrice||null,showDateRange:!l(o).query.checkinDate},null,8,["id","selected","areaSquareMeters","baseRatePerNight","cityName","districtName","guestCapacity","listingId","image","images","numberOfBedrooms","numberOfBathrooms","name","rating","businessUnitId","isFinalPrice","finalPrice","showDateRange"])],8,rt))),128)),W(h("div",nt,[...a[11]||(a[11]=[h("p",null,"No properties available",-1)])],512),[[H,!l(w)&&!l(P)&&l(p).length===0]]),h("div",ot,[!l(P)&&l(p).length>0?(f(),j(Qe,{key:0,mode:"numbered",page:l(_),totalPages:X.value,disablePrev:l(_)<=1,disableNext:l(_)>=X.value,onChange:Fe},null,8,["page","totalPages","disablePrev","disableNext"])):ne("",!0)])],512),[[H,!O.value]]),l(p).length>0&&!l(y)?(f(),b("div",{key:0,class:_e(["hidden lg:block relative transition-all duration-300 sticky top-112 h-[80vh]",[O.value?"col-span-1 lg:col-span-3":"col-span-1"]])},[n(E,{class:"absolute top-24 right-24 z-20 shadow-lg !bg-neutral-0 hover:!bg-neutral-50 !text-neutral-900 border border-neutral-100 !px-8 !gap-0 !w-40",iconBefore:O.value?"content-diagonal-arrow-collapse":"content-diagonal-arrow",onClick:a[9]||(a[9]=t=>O.value=!O.value),size:"sm"},null,8,["iconBefore"]),n(Ge,{listings:l(p),activeIndex:I.value,isLoading:l(P),boundsMode:l(D),onListingToggled:Be,onBoundsChanged:ge,toggled:ke.value,heightSize:"full",featureType:"poi"},null,8,["listings","activeIndex","isLoading","boundsMode","toggled"])],2)):ne("",!0)])]),W(n(Ve,{ref_key:"guestChatFunnelRef",ref:Q},null,512),[[H,!C.value&&!l(y)]])]))}};export{pt 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.