PageSourceSearch

https://edumateglobal.com/assets/HomesHomePage-CJ6X3hgq.js

js edumateglobal.com collected 2026-10-08 12:06:27 UTC 23,609 bytes, 1 lines download raw bytes

1import{j as e,C as B,L as g,f as m,cc as z,r as h,am as Q,an as W,c6 as R,ao as Y,dv as D,X as V,aY as X,H as G,dw as J}from"./index-BHId71c2.js";import{u as A,h as v,a as $,b as y,c as T,p as K,C as f,H as U,d as Z,e as ee,f as se,g as te,i as M,P as ae,j as re,k as le,l as ne}from"./PropertyCard-pLiZioBJ.js";import{u as oe}from"./use-media-query-DdLGOfC3.js";import{H as ie}from"./HomesSearchBox-SEdHKqYn.js";import{f as O,u as de,p as w,s as ce,c as me,d as xe,a as he}from"./shared-BoaCIQz2.js";import{f as x,S as I,Q as C,C as ue,W as pe,F as ge}from"./CountryCards-C6x82l7o.js";import{A as k}from"./arrow-right-FCShX6YD.js";import{M as be}from"./map-pin-UzlK3BIU.js";import{R as fe,L as je,T as Ne,C as we}from"./index-BV_1LxEN.js";import{B as ve}from"./building-2-CWwyuIlg.js";import"./useQuery-CFOjWBI_.js";import"./accordion-CRy0zkmx.js";import"./badge-indian-rupee-DHW08qce.js";import"./sliders-horizontal-DgrktBKY.js";import"./file-text-DsRvjFRK.js";import"./users-DPUtX6uP.js";import"./landmark-CVYWWkY7.js";import"./rotate-cw-BwwTELZr.js";import"./chevron-left-Cwh_Uk0q.js";import"./arrow-up-right-CCOrtvY1.js";const ye=["Prices in your currency","Free to enquire","Edumate advisor support"];function Ce({cities:s,citiesLoading:t}){var c;const n=s[0],l=oe("(min-width: 1024px)"),r=A(O((n==null?void 0:n.slug)??""),!!n),i=(((c=r.data)==null?void 0:c.items)??[]).filter(o=>o.thumbnailUrl).slice(0,3),a=de(s),d=s.slice(0,5);return e.jsx("section",{"aria-labelledby":"homes-hero-title",className:"relative -mt-[var(--homes-nav-h)] border-b border-slate-200 bg-[#f5f8ff] pt-[var(--homes-nav-h)]",children:e.jsxs("div",{className:"mx-auto grid max-w-7xl items-center gap-10 px-4 pb-10 pt-8 sm:px-6 md:pt-12 lg:grid-cols-[minmax(0,1.1fr)_minmax(0,1fr)] lg:gap-12 lg:px-8 lg:pb-12 lg:pt-12",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("p",{className:"inline-flex items-center gap-2 rounded-full border border-blue-100 bg-white px-3 py-1 text-xs font-semibold text-blue-800 shadow-sm",children:[e.jsxs("span",{className:"relative flex h-2 w-2","aria-hidden":"true",children:[e.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-500 opacity-60 motion-reduce:animate-none"}),e.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-emerald-600"})]}),a.properties>0?`${a.properties.toLocaleString("en-IN")} student homes live in ${w(a.countries,"country","countries")}`:"Student accommodation by Edumate"]}),e.jsxs("h1",{id:"homes-hero-title",className:"mt-4 font-heading text-[2rem] font-bold leading-[1.12] tracking-tight text-slate-900 [text-wrap:balance] sm:text-[2.5rem] lg:text-[2.75rem]",children:["Find your student room abroad, ",e.jsx("span",{className:"text-blue-700",children:"before you land."})]}),e.jsx("p",{className:"mt-4 max-w-lg text-base leading-relaxed text-slate-600 sm:text-[1.0625rem]",children:"Compare real rooms from student housing providers, see what you'll pay in your currency, and shortlist the ones that fit your course and budget."}),e.jsxs("div",{className:"mt-7 max-w-xl",children:[e.jsx(ie,{size:"hero"}),e.jsx("ul",{className:"mt-3 flex flex-wrap gap-x-5 gap-y-1.5 text-sm text-slate-700",children:ye.map(o=>e.jsxs("li",{className:"inline-flex items-center gap-1.5",children:[e.jsx(B,{className:"h-4 w-4 shrink-0 text-emerald-700","aria-hidden":"true"}),o]},o))})]}),e.jsx("div",{className:"mt-6 min-h-[36px]",children:t?e.jsx("div",{className:"flex flex-wrap gap-2","aria-hidden":"true",children:[88,72,96,64].map(o=>e.jsx("span",{className:"h-9 animate-pulse rounded-full bg-white motion-reduce:animate-none",style:{width:o}},o))}):d.length>0?e.jsxs("nav",{"aria-label":"Popular cities",className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"mr-1 text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Popular"}),d.map(o=>e.jsxs(g,{to:v({city:o.slug}),className:m("inline-flex h-9 items-center gap-1.5 rounded-full border border-slate-200 bg-white px-3.5 text-sm font-medium text-slate-800 transition hover:border-blue-200 hover:text-blue-800 motion-reduce:transition-none",x),children:[o.name,e.jsx("span",{className:"text-xs text-slate-500",children:o.propertyCount})]},o.slug))]}):null}),!l&&i.length>0&&a.properties>0&&e.jsxs("div",{className:"mt-6 flex items-center gap-3 lg:hidden",children:[e.jsx("div",{className:"flex -sp
1ace-x-3","aria-hidden":"true",children:i.map(o=>e.jsx("img",{src:o.thumbnailUrl,alt:"",width:44,height:44,decoding:"async",className:"h-11 w-11 rounded-full object-cover ring-2 ring-white"},o.slug))}),e.jsxs("p",{className:"text-sm text-slate-600",children:[e.jsx("span",{className:"font-semibold text-slate-900",children:w(a.properties,"student home")})," ","across ",w(a.cities,"city","cities")]})]})]}),l&&e.jsx(ke,{photos:i,loading:n?r.isLoading:t})]})})}function ke({photos:s,loading:t}){if(t)return e.jsxs("div",{className:"grid h-[400px] grid-cols-5 grid-rows-2 gap-3","aria-hidden":"true",children:[e.jsx("div",{className:"col-span-3 row-span-2 animate-pulse rounded-3xl bg-white motion-reduce:animate-none"}),e.jsx("div",{className:"col-span-2 animate-pulse rounded-3xl bg-white motion-reduce:animate-none"}),e.jsx("div",{className:"col-span-2 animate-pulse rounded-3xl bg-white motion-reduce:animate-none"})]});if(s.length===0)return null;const[n,...l]=s;return e.jsxs("figure",{className:"relative grid h-[400px] grid-cols-5 grid-rows-2 gap-3","aria-label":"Photos of homes listed on Edumate Homes",children:[e.jsx(_,{p:n,className:l.length?"col-span-3 row-span-2":"col-span-5 row-span-2",caption:!0}),l.map(r=>e.jsx(_,{p:r,className:l.length===1?"col-span-2 row-span-2":"col-span-2"},r.slug)),e.jsxs("span",{className:"absolute -left-4 top-6 inline-flex items-center gap-2 rounded-xl bg-white px-3 py-2 text-xs font-semibold text-slate-800 shadow-[0_12px_30px_-12px_rgba(15,23,42,0.35)] ring-1 ring-slate-200",children:[e.jsx("span",{className:"grid h-7 w-7 place-items-center rounded-lg bg-emerald-50 text-emerald-700","aria-hidden":"true",children:e.jsx(z,{className:"h-3.5 w-3.5"})}),"Live prices, refreshed every few minutes"]})]})}function _({p:s,className:t,caption:n}){var u;const[l,r]=h.useState(!1),[i,a]=h.useState(!1),d=$(s.priceFrom),{approx:c}=y(),o=c((u=s.priceFrom)==null?void 0:u.monthly);return e.jsxs(g,{to:T(s.slug),className:m("group relative block overflow-hidden rounded-3xl bg-slate-200",x,t),children:[!l&&e.jsx("img",{src:s.thumbnailUrl,alt:`${s.name}, ${s.city.name}`,decoding:"async",onLoad:()=>a(!0),onError:()=>r(!0),className:m("h-full w-full object-cover transition duration-500 group-hover:scale-[1.03] motion-reduce:transition-none motion-reduce:group-hover:scale-100",i?"opacity-100":"opacity-0")}),l&&e.jsx("span",{className:"sr-only",children:s.name}),n&&e.jsxs("span",{className:"absolute bottom-4 left-4 right-4 flex items-center justify-between gap-4 rounded-2xl bg-white/95 px-4 py-3 shadow-[0_12px_30px_-12px_rgba(15,23,42,0.4)] backdrop-blur",children:[e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate text-sm font-semibold text-slate-900",children:s.name}),e.jsx("span",{className:"block truncate text-xs text-slate-600",children:K(s.city.name,s.countryCode)})]}),d&&e.jsxs("span",{className:"shrink-0 text-right",children:[e.jsx("span",{className:"block text-xs text-slate-600",children:"from"}),e.jsxs("span",{className:"block text-sm font-bold text-slate-900",children:[d.amount,e.jsxs("span",{className:"font-medium text-slate-600",children:["/",d.unitShort]})]}),o&&e.jsxs("span",{className:"block text-[11px] text-slate-600",children:["≈ ",o,"/mo"]})]})]})]})}function Se({country:s=null,cities:t,leads:n,loading:l,error:r,onRetry:i,toolbar:a,footer:d}){return e.jsx("section",{"aria-labelledby":"homes-cities-title",className:"py-14 md:py-20",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[e.jsx(I,{id:"homes-cities-title",eyebrow:s?`Popular cities · ${f[s]??s}`:"Popular cities",title:"Where students are heading",sub:"Live counts and starting prices from the homes listed today.",children:e.jsxs(g,{to:s?v({country:s}):U,className:m("inline-flex items-center gap-1 self-start rounded-lg text-sm font-semibold text-blue-700 hover:underline md:self-auto",x),children:[s?`All homes in ${f[s]??s}`:"Browse all homes"," ",e.jsx(k,{className:"h-4 w-4","aria-hidden":"true"})]})}),a&&e.jsx("div",{className:"mt-6",children:a}),e.jsx("div",{className:a?"mt-5":"mt-8",children:r?e.jsx(C,{error:r,onRetry:i,what:"cities"}):l?e.jsx("ul",{className:"grid grid-cols-2 gap-3 sm:gap-5 lg:grid-cols-3","aria-hidden":"true",children:Array.from({length:6},(c,o)=>e.jsxs("li",{className:"overflow-hidden rounded-2xl border border-slate-200",children:[e.jsx("div",{className:"aspect-[4/3] animate-pulse bg-slate-100 motion-reduce:animate-none sm:aspect-[16/10]"}),e.jsxs("div",{className:"space-y-2 p-3 sm:p-4",children:[e.jsx("div",{className:"h-5 w-1/2 animate-pulse rounded bg-slate-100"}),e.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-slate-100"})]})]},o))}):t.length===0?e.jsx("p",{className:"rounded-2xl border border-slate-200 bg-slate-50 px-6 py-10 text-center text-sm text-slate-600",children:"No cities are listed right now. New homes are added regularly, so please check back soon."}):e.jsx("ul",{className:"grid grid-cols-2 gap-3 sm:gap-5 lg:grid-cols-3",children:t.map(c=>e.jsx("li",{children:e.jsx(Le,{city:c,lead:n.get(c.slug)})},c.slug))})}),d]})})}function Le({city:s,lead:t}){var u;
1const[n,l]=h.useState(!1),[r,i]=h.useState(!1),a=(u=t==null?void 0:t.card)==null?void 0:u.thumbnailUrl,d=y(),c=Z(s,d),o=f[s.countryCode]??s.countryCode;return e.jsxs(g,{to:v({city:s.slug}),className:m("group flex h-full flex-col overflow-hidden rounded-2xl border border-slate-200 bg-white transition-shadow duration-200 hover:shadow-[0_8px_30px_-12px_rgba(15,23,42,0.25)] motion-reduce:transition-none",x),children:[e.jsxs("div",{className:"relative aspect-[4/3] overflow-hidden bg-slate-100 sm:aspect-[16/10]",children:[(t==null?void 0:t.loading)&&e.jsx("div",{className:"absolute inset-0 animate-pulse bg-slate-200 motion-reduce:animate-none","aria-hidden":"true"}),a&&!n?e.jsx("img",{src:a,alt:"",loading:"lazy",decoding:"async",onLoad:()=>i(!0),onError:()=>l(!0),className:m("h-full w-full object-cover transition duration-500 group-hover:scale-[1.03] motion-reduce:transition-none motion-reduce:group-hover:scale-100",r?"opacity-100":"opacity-0")}):!(t!=null&&t.loading)&&e.jsx("div",{className:"grid h-full w-full place-items-center text-slate-500","aria-hidden":"true",children:e.jsx(be,{className:"h-8 w-8"})}),e.jsx("span",{className:"absolute left-2 top-2 rounded-full bg-white/95 px-2.5 py-1 text-xs font-semibold text-slate-900 shadow-sm sm:left-3 sm:top-3",children:o})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-1 p-3 sm:p-4",children:[e.jsxs("h3",{className:"flex items-center justify-between gap-2 font-heading text-base font-semibold text-slate-900 sm:text-lg",children:[s.name,e.jsx(k,{className:"hidden h-4 w-4 shrink-0 text-slate-500 transition group-hover:translate-x-0.5 group-hover:text-blue-700 motion-reduce:transition-none sm:block","aria-hidden":"true"})]}),e.jsx("p",{className:"text-sm text-slate-600",children:w(s.propertyCount,"property","properties")}),c!=null&&c.native?e.jsxs("p",{className:"text-sm text-slate-600",children:["from ",e.jsx("span",{className:"font-semibold text-slate-900",children:c.native}),"/month",c.approx&&e.jsxs("span",{className:"block text-xs sm:inline sm:text-sm",children:[" (≈ ",c.approx,")"]})]}):c!=null&&c.approx?e.jsxs("p",{className:"text-sm text-slate-600",children:["from ",e.jsxs("span",{className:"font-semibold text-slate-900",children:["≈ ",c.approx]}),"/month"]}):null]})]})}const Pe=8;function He(){const{slugs:s,count:t,toggle:n,clear:l}=ee(),[r,i]=h.useState(!1),a=[...s].reverse().slice(0,Pe),d=t-a.length;return e.jsxs(Q,{open:r,onOpenChange:i,children:[e.jsxs(W,{className:m("relative inline-flex h-11 items-center gap-2 rounded-xl px-3 text-sm font-semibold text-slate-800 transition hover:bg-slate-100 motion-reduce:transition-none",x),"aria-label":`Shortlist, ${t} saved ${t===1?"home":"homes"}`,children:[e.jsx(R,{className:m("h-5 w-5",t>0&&"fill-rose-500 text-rose-500"),"aria-hidden":"true"}),e.jsx("span",{className:"hidden sm:inline",children:"Shortlist"}),t>0&&e.jsx("span",{className:"grid h-5 min-w-[1.25rem] place-items-center rounded-full bg-slate-900 px-1.5 text-xs font-bold text-white","aria-hidden":"true",children:t})]}),e.jsxs(Y,{align:"end",sideOffset:8,className:"w-[min(24rem,calc(100vw-2rem))] rounded-2xl border-slate-200 bg-white p-0 text-slate-900 shadow-[0_24px_48px_-20px_rgba(15,23,42,0.35)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-slate-200 px-4 py-3",children:[e.jsxs("p",{className:"font-heading text-base font-semibold",children:["Your shortlist",t>0&&e.jsxs("span",{className:"font-normal text-slate-600",children:[" (",t,")"]})]}),t>0&&e.jsx("button",{type:"button",onClick:l,className:m("rounded-lg px-2 py-1 text-sm font-medium text-slate-600 hover:bg-slate-100 hover:text-slate-900",x),children:"Clear all"})]}),t===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e.jsx("span",{className:"grid h-11 w-11 place-items-center rounded-full bg-slate-100 text-slate-700",children:e.jsx(R,{className:"h-5 w-5","aria-hidden":"true"})}),e.jsx("p",{className:"text-sm font-semibold text-slate-900",children:"Nothing saved yet"}),e.jsx("p",{className:"text-sm text-slate-600",children:"Tap the heart on any home to keep it here while you compare."}),e.jsx(g,{to:U,onClick:()=>i(!1),className:m("mt-2 inline-flex h-11 items-center rounded-xl bg-blue-600 px-4 text-sm font-semibold text-white hover:bg-blue-700",x),children:"Find a room"})]}):e.jsxs(e.Fragment,{children:[e.jsx("ul",{className:"max-h-[60vh] overflow-y-auto p-2",children:a.map(c=>e.jsx(Re,{slug:c,onNavigate:()=>i(!1),onRemove:()=>n(c)},c))}),d>0&&e.jsxs("p",{className:"border-t border-slate-200 px-4 py-3 text-xs text-slate-600",children:["and ",d," more saved ",d===1?"home":"homes"]}),e.jsx("p",{className:"border-t border-slate-200 px-4 py-3 text-xs text-slate-600",children:"Saved on this device only."})]})]})]})}function Re({slug:s,onNavigate:t,onRemove:n}){var u,j,N;const l=se(s),r=l.data,i=D();h.useEffect(()=>{te(i,s,r)},[i,s,r]);const a=$((u=r==null?void 0:r.details)==null?void 0:u.priceFrom),{approx:d}=y(),c=d((N=(j=r==null?void 0:r.details)==null?void 0:j.priceFrom)==null?void 0:N.monthly),o=(r==null?void 0:r.listingStatus)==="NO_LONGER_AVAILABLE"||l.error instanceof M&&l.error.isNotFound;return e.jsxs("li",{className:"group relative flex items-center gap-3 rounded-xl p-2 hover:bg-slate-50",children:[e.jsx("div",{className:"h-14 w-14 shrink-0 overflow-hidden rounded-lg bg-slate-100",children:l.isLoading?e.jsx("div",{className:"h-full w-full animate-pulse bg-slate-200 motion-reduce:animate-none","aria-hidden":"true"}):r!=null&&r.thumbnailUrl?e.jsx("img",{src:r.thumbnailUrl,alt:"",loading:"lazy",decoding:"async",className:"h-full w-full object-cover"}):e.jsx("div",{className:"grid h-full w-full place-items-center text-slate-500","aria-hidden":"true",children:e.jsx(ve,{className:"h-5 w-5"})})}),e.jsx("div",{className:"min-w-0 flex-1",children:l.isLoading?e.jsxs("div",{className:"space-y-1.5","aria-label":"Loading saved home",children:[e.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-slate-200"}),e.jsx("div",{className:"h-3 w-1/2 animate-pulse rounded bg-slate-200"})]}):r?e.jsxs(e.Fragment,{children:[e.jsx(g,{to:T(r.slug),onClick:t,className:"block truncate text-sm font-semibold text-slate-900 after:absolute after:inset-0 after:rounded-xl focus-visible:outline-none group-focus-within:underline",children:r.name}),e.jsxs("p",{className:"truncate text-xs text-slate-600",children:[r.city.name,o?" · No longer available":a?` · from ${a.amount}/${a.unitShort}`:"",!o&&c?` (≈ ${c}/mo)`:""]})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"truncate text-sm font-semibold text-slate-900",children:o?"No longer listed":"Couldn't load this home"}),!o&&e.jsx("button",{type:"button",onClick:()=>l.refetch(),className:m("relative z-10 rounded text-xs font-medium text-blue-700 hover:underline",x),children:"Try again"})]})}),e.jsx("button",{type:"button",onClick:n,"aria-label":`Remove ${(r==null?void 0:r.name)??"this home"} from shortlist`,className:m("relative z-10 grid h-11 w-11 shrink-0 place-items-center rounded-lg text-slate-600 hover:bg-slate-100 hover:text-slate-900",x),children:e.jsx(V,{className:"h-4 w-4","aria-hidden":"true"})})]})}function _e({cities:s}){var i;const t=s.slice(0,4),[n,l]=h.useState(void 0),r=n&&t.some(a=>a.slug===n)?n:(i=t[0])==null?void 0:i.slug;return r?e.jsx("section",{"aria-labelledby":"homes-featured-title",className:"border-y border-slate-200 bg-slate-50 py-14 md:py-20",children:e.jsxs(fe,{value:r,onValueChange:l,className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"flex items-end justify-between gap-4",children:[e.jsx(I,{id:"homes-featured-title",eyebrow:"Top picks",title:"Recommended homes",sub:"Student residences first. Rooms you can enquire about today."}),e.jsx("div",{className:"shrink-0 rounded-xl border border-slate-200 bg-white",children:e.jsx(He,{})})]}),e.jsx(je,{"aria-label":"Choose a city",className:"-mx-4 mt-6 flex gap-2 overflow-x-auto px-4 pb-1 sm:mx-0 sm:flex-wrap sm:px-0 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:t.map(a=>e.jsx(Ne,{value:a.slug,className:m("inline-flex h-11 shrink-0 items-center rounded-full border px-5 text-sm font-semibold transition motion-reduce:transition-none","border-slate-300 bg-white text-slate-800 hover:bg-slate-100","data-[state=active]:border-slate-900 data-[state=active]:bg-slate-900 data-[state=active]:text-white",x),children:a.name},a.slug))}),t.map(a=>e.jsx(we,{value:a.slug,className:"mt-6 focus-visible:outline-none",children:e.jsx(Ee,{city:a})},a.slug))]})}):null}const E="-mx-4 flex snap-x snap-mandatory gap-4 overflow-x-auto scroll-px-4 px-4 pb-2 sm:-mx-6 sm:scroll-px-6 sm:px-6 lg:mx-0 lg:grid lg:grid-cols-4 lg:gap-5 lg:overflow-visible lg:px-0 lg:pb-0 [scrollbar-width:thin]",F="w-[78%] shrink-0 snap-start sm:w-[44%] lg:w-auto";function Ee({city:s}){var r;const t=A(O(s.slug)),n=((r=t.data)==null?void 0:r.items)??[],l=v({city:s.slug});return t.isLoading?e.jsx("div",{className:E,"aria-busy":"true","aria-label":`Loading homes in ${s.name}`,children:Array.from({length:4},(i,a)=>e.jsx("div",{className:F,children:e.jsx(ae,{})},a))}):t.isError&&!t.data?e.jsx(C,{error:t.error,onRetry:()=>t.refetch(),what:`homes in ${s.name}`}):n.length===0?e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white px-6 py-10 text-center",children:[e.jsxs("p",{className:"font-heading text-base font-semibold text-slate-900",children:["No rooms marked available in ",s.name," right now"]}),e.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Waitlisted and upcoming rooms are still listed."}),e.jsxs(g,{to:l,className:m("mt-4 inline-flex h-11 items-center rounded-xl border border-slate-300 bg-white px-4 text-sm font-semibold text-slate-900 hover:bg-slate-50",x),children:["See all homes in ",s.name]})]}):e.jsxs(e.Fragment,{children:[e.jsx("ul",{className:E,"aria-label":`Recommended homes in ${s.name}`,children:n.map(i=>e.jsx("li",{className:m(F,"flex"),children:e.jsx(re,{property:i,className:"w-full"})},i.slug))}),e.jsx("div",{className:"mt-6 flex justify-center",children:e.jsxs(g,{to:l,className:m("inline-flex h-11 items-center gap-2 rounded-xl border border-slate-300 bg-white px-5 text-sm font-semibold text-slate-900 transition hover:bg-slate-50 motion-reduce:transition-none",x),children:["See all ",s.propertyCount.toLocaleStr
1ing("en-IN")," homes in ",s.name,e.jsx(k,{className:"h-4 w-4","aria-hidden":"true"})]})})]})}const b="ALL";function Fe({countries:s,value:t,onChange:n,variant:l="band"}){if(s.length<2)return null;const r=[{code:b,label:"All countries"},...s.map(a=>({code:a.code,label:le[a.code]??f[a.code]??a.code}))],i=l==="inline";return e.jsx("div",{className:i?void 0:"border-b border-slate-200 bg-white",children:e.jsxs("div",{className:m("flex items-center gap-3",i?"-mx-4 px-4 sm:mx-0 sm:px-0":"mx-auto max-w-7xl px-4 py-3 sm:px-6 lg:px-8"),children:[e.jsx("span",{id:"homes-country-label",className:"hidden shrink-0 text-sm font-semibold text-slate-700 sm:inline",children:"Showing homes in"}),e.jsx("div",{role:"group","aria-labelledby":"homes-country-label","aria-label":"Choose a country",className:"-mx-1 flex min-w-0 flex-1 gap-2 overflow-x-auto px-1 py-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:r.map(a=>{const d=a.code===t;return e.jsx("button",{type:"button","aria-pressed":d,onClick:()=>n(a.code),className:m("inline-flex h-10 shrink-0 items-center rounded-full border px-4 text-sm font-semibold transition-colors motion-reduce:transition-none",d?"border-blue-600 bg-blue-600 text-white":"border-slate-300 bg-white text-slate-800 hover:border-blue-400 hover:bg-blue-50",x),children:a.label},a.code)})})]})})}function as(){var P;const s=ne(),t=h.useMemo(()=>ce(s.data).filter(p=>p.propertyCount>0),[s.data]),n=h.useMemo(()=>me(t),[t]),{currency:l}=y(),[r,i]=X(),a=((P=r.get("country"))==null?void 0:P.toUpperCase())??null,d=a===b?b:a&&n.some(p=>p.code===a)?a:xe(l,n)??b,c=p=>i(q=>{const H=new URLSearchParams(q);return H.set("country",p),H},{replace:!0,preventScrollReset:!0}),o=h.useMemo(()=>d===b?t:t.filter(p=>p.countryCode===d),[t,d]),u=h.useMemo(()=>o.slice(0,6),[o]),j=he(u),N=s.error instanceof M&&s.error.isDisabled;$e();const S=[...new Set(t.map(p=>f[p.countryCode]??p.countryCode))],L=`Find student accommodation${S.length?` in ${Ae(S)}`:" abroad"}. Compare rooms, prices with an estimate in your currency, room types and what's included, then shortlist and enquire with an Edumate advisor.`;return e.jsxs(e.Fragment,{children:[e.jsxs(G,{children:[e.jsx("title",{children:"Student Accommodation Abroad — Find Your Room | Edumate Homes"}),e.jsx("meta",{name:"description",content:L}),e.jsx("link",{rel:"canonical",href:"https://edumateglobal.com/homes"}),e.jsx("meta",{property:"og:title",content:"Edumate Homes — student accommodation abroad"}),e.jsx("meta",{property:"og:description",content:L}),e.jsx("meta",{property:"og:url",content:"https://edumateglobal.com/homes"}),e.jsx("meta",{property:"og:type",content:"website"})]}),e.jsx(Ce,{cities:t,citiesLoading:s.isLoading}),N?e.jsx("div",{className:"mx-auto max-w-3xl px-4 py-14 sm:px-6 md:py-20",children:e.jsx(C,{error:s.error,onRetry:()=>s.refetch()})}):e.jsxs(e.Fragment,{children:[e.jsx(ue,{}),e.jsx(Se,{country:d===b?null:d,toolbar:e.jsx(Fe,{variant:"inline",countries:n,value:d,onChange:c}),cities:u,leads:j,loading:s.isLoading,error:s.isError&&!s.data?s.error:null,onRetry:()=>s.refetch()}),e.jsx(_e,{cities:o})]}),e.jsx(pe,{city:o[0]}),e.jsx(ge,{})]})}const Ae=s=>s.length<=1?s.join(""):`${s.slice(0,-1).join(", ")} and ${s[s.length-1]}`;function $e(){const{hash:s,key:t}=J();h.useEffect(()=>{var i;if(!s)return;const n=decodeURIComponent(s.slice(1)),l=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-reduced-motion: reduce)").matches,r=window.setTimeout(()=>{const a=document.getElementById(n);if(!a)return;a.scrollIntoView({behavior:l?"auto":"smooth",block:"start"});const d=a.querySelector("h2");d&&(d.setAttribute("tabindex","-1"),d.focus({preventScroll:!0}))},60);return()=>window.clearTimeout(r)},[s,t])}export{as 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.