PageSourceSearch

https://www.wyndhamhotels.com/travel-packages/itinerary/assets/hotels._hotelId-D-WJF6RU.js

js wyndhamhotels.com collected 2026-10-09 21:41:45 UTC 73,841 bytes, 1 lines download raw bytes

1import{r as h,j as e}from"./react-BEJkGLFG.js";import{b as Ts}from"./fareAmenities-C1kiw8-4.js";import{a as Et}from"./MobilePayBar-bevIgxIA.js";import{c as Ds,I as As,i as Rs}from"./transferPicks-C1vVsMHD.js";import{c as Zt,a as es,C as Be,d2 as Bs,F as Os,bg as Ms,u as Ie,d3 as Fs,aM as Es,d4 as $s,cR as _s,cu as Ls,D as Vs,af as qs,r as pe,I as $t,aV as _t,d5 as Ws,aX as Se,B as oe,o as Lt,d6 as Vt,W as qt,d7 as Hs,w as zs,O as Te,P as De,S as Ae,U as Re,V as Us,X as Ks,a9 as ze,f as Gs,d8 as Ys,ce as Ue,T as lt,d9 as Js,a4 as Xs,a5 as Qs,c4 as Zs,cS as ea,b1 as ta}from"./index-C2R9cRGb.js";import{g as Wt}from"./_lang.all-inclusive-vacations.Search-DeSq78tb.js";import{I as sa}from"./supplierLocale-z6ycKUyO.js";import{m as aa,c as na}from"./googleMapsLoader-mROqU5v4.js";import{D as ia,J as ra,K as Ht,a as la,L as oa}from"./HotelInfoModal-DU_eFeir.js";import{H as ca}from"./confirm-reservation-CHigbMJn.js";import{r as rt,I as da}from"./_lang.Transfer.Search-B44OxBxV.js";import{u as ha,c as ua,P as ma,w as xa}from"./search.hotel-BHYq8yQN.js";import{N as zt,n as ga,aK as Ut,aa as Kt,g as pa,A as Gt,a as fe,aM as fa,aP as Yt,aQ as ba,aR as Na,P as ya,$ as ja,e as Pa,aS as va,w as ka,aT as wa,aU as Ca,aV as Ia,z as Sa,aW as Ta,aX as Da,aY as Aa,aA as Ra,aZ as Ba,a1 as Oa,d as Ma,a_ as Fa}from"./icons-CI-onX_J.js";import"./CollapsibleTripSummary-CidvGrTs.js";import"./radix-YpfejCpa.js";import"./DualCurrencyPriceCards-BwZl3GO7.js";import"./useHotelHeroImage-DK8lZa0B.js";import"./insider-upsell-confirmation-DwDv-I1B.js";const Ea=Zt({method:"POST"}).handler(es("77747ac7779903f2ffb1a96574b7bd5029e1d7d4914d366a974c3d2a2330d5d2"));Zt({method:"POST"}).handler(es("f4f17acc5f69d6799497960fc4ed03758cd0186d3674f075c8d7864cd663481e"));function le(n){return ta(n,"USD")}const $a=n=>/^SNOW[1-6]$/i.test(String(n||""));function te(n){return Ys(n).filter(u=>$a(u.code))}function _a(n){return String(n??"").trim().replace(/^\.\s+/,"").replace(/\s*\.\s*\.+\s*$/,".").replace(/([.!?])\s*\.\s*$/,"$1").trim()}function Jt(){if(typeof window>"u")return{};let n={};try{n=JSON.parse(sessionStorage.getItem("wr:hotelSearchCtx")||"{}")||{}}catch{n={}}let u=n?.searchSessionId;try{u=u||sessionStorage.getItem("tmt:hotelSessionId")||void 0}catch{}return{...n,searchSessionId:u}}function La({hotelName:n,onSubmit:u}){const[o,g]=h.useState(""),[I,k]=h.useState(""),[S,v]=h.useState(2),[p,D]=h.useState(0),[F,l]=h.useState(1),E=new Date().toISOString().slice(0,10),r=!!o&&!!I&&I>o,L="mt-1 w-full min-h-11 rounded-md border border-border bg-background px-3 py-2 text-sm";return e.jsx("div",{className:"bg-muted/30 min-h-screen",children:e.jsx("div",{className:"container mx-auto max-w-lg px-4 py-10",children:e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 shadow-sm",children:[e.jsx("h1",{className:"font-display text-2xl font-bold text-foreground leading-tight",children:"Choose your stay"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:n?`Tell us when you'd like to stay at ${n} and we'll show live rates.`:"Tell us when you'd like to stay and we'll show live rates for this property."}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-5",children:[e.jsxs("label",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:["Check-in",e.jsx("input",{type:"date",min:E,value:o,onChange:O=>g(O.target.value),className:L})]}),e.jsxs("label",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:["Check-out",e.jsx("input",{type:"date",min:o||E,value:I,onChange:O=>k(O.target.value),className:L})]}),e.jsxs("label",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:["Adults",e.jsx("input",{type:"number",min:1,max:9,value:S,onChange:O=>v(Math.max(1,Number(O.target.value)||1)),className:L})]}),e.jsxs("label",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:["Children",e.jsx("input",{type:"number",min:0,max:9,value:p,onChange:O=>D(Math.max(0,Number(O.target.value)||0)),className:L})]}),e.jsxs("label",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground col-span-2",children:["Rooms",e.jsx("input",{type:"number",min:1,max:9,value:F,onChange:O=>l(Math.max(1,Number(O.target.value)||1)),className:L})]})]}),!r&&(o||I)&&e.jsx("p",{className:"text-xs text-destructive mt-3",children:"Check-out must be after check-in."}),e.jsx(oe,{className:"w-full mt-5 min-h-11",disabled:!r,onClick:()=>u({checkIn:o,checkOut:I,adults:S,children:p,rooms:F}),children:"Show rates"})]})})})}const ts=[{key:"king",label:"King Bed",re:/\bking\b/},{key:"queen",label:"Queen",re:/\bqueen\b/},{key:"double",label:"Double",re:/\b(double|two\s*double)\b/},{key:"twin",label:"Twin",re:/\b(twin|two\s*single)\b/},{key:"suite",label:"Suite",re:/\bsuite\b/},{key:"studio",label:"Studio",re:/\bstudio\b/},{key:"accessible",label:"Accessible",re:/\b(accessible|ada|mobility|hearing)\b/},{key:"nonsmoking",label:"Non-smoking",re:/\bnon[- ]?smoking\b/},{key:"view",label:"Ocean / View",re:/\b(ocean|sea|gulf|bay|water|view)\b/},{key:"balcony",label:"Balcony",re:/\b(balcony|terrace|patio)\b/}],ct=[{key:"pet",label:"Pet Friendly",re:/\bpet[-\s]?friendly|\bpets?\b|\bdog\b/i},{key:"accessible",label:"Accessible",re:/\baccessible|\bada\b|mobility|hearing|roll[-\s]?in/i},{key:"nonsmoking",label:"Non-Smoking",re:/non[-\s]?smoking/i},{key:"smoking",label:"Smoking",re:/(^|[^-])smoking(?!\s*free)/i},{key:"view",label:"View",re:/\b(ocean|sea|gulf|bay|water|city|mountain|river|pool)\s*view\b|\bview\b/i},{key:"balcony",label:"Balcony",re:/\bbalcony|\bterrace|\bpatio/i},{key:"breakfast",label:"Breakfast",re:/breakfast/i},{key:"highfloor",label:"High Floor",re:/high[-\s]?floor|upper\s*floor|executive\s*floor/i},{key:"kitchenette",label:"Kitchenette",re:/kitchenette|kitchen\b|microwave/i}];function ot(n){const u=[n.name||"",n.description||"",n.beds||"",...n.perks||[],...n.roomAmenities||[]].join(" ").toLowerCase(),o=new Set;for(const g of ct)g.re.test(u)&&o.add(g.key);return o}function Xt(n){if(!n)return"—";const u=new Date(n);return isNaN(u.getTime())?n:u.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Va({hotelName:n,checkIn:u,checkOut:o,nights:g,fromPerNight:I,rooms:k,rateFilters:S,toggleRate:v,roomTypeFilters:p,toggleRoomType:D,attrFilters:F,toggleAttr:l,codeFilters:E,toggleCode:r,anyFilterOn:L,resetFilters:O}){const{t:N}=Be(),Y=ts.map(x=>{const b=k.filter(y=>x.re.test(`${y.name} ${y.beds||""} ${y.description||""}`.toLowerCase())).length;return{...x,count:b}}).filter(x=>x.count>0),z={prepaid:0,paylater:0,breakfast:0};for(const x of k){const b=te(x);b.some(y=>!y.isPostpaid)&&z.prepaid++,b.some(y=>y.isPostpaid)&&z.paylater++,b.some(y=>y.hasBreakfast)&&z.breakfast++}const se=[["prepaid",N("hotelDetailsPage.filterRate.prepaid")],["paylater",N("hotelDetailsPage.filterRate.paylater")],["breakfast",N("hotelDetailsPage.filterRate.breakfast")]].filter(([x])=>z[x]>0),ae=ct.map(x=>{const b=k.filter(y=>ot(y).has(x.key)).length;return{...x,count:b}}).filter(x=>x.count>0),be=new Map;for(const x of k){const b=new Set,y=te(x);for(const H of y){if(b.has(H.code))continue;b.add(H.code);const J=be.get(H.code)||{code:H.code,label:H.name,count:0};J.count+=1,be.set(H.code,J)}}const ne=Array.from(be.values()).filter(x=>x.count>0),[Ne,ye]=h.useState(!1);return e.jsxs("aside",{className:"lg:sticky lg:top-16 lg:max-h-[calc(100vh-5rem)] lg:overflow-y-auto rounded-2xl border border-navy/10 bg-white shadow-[0_20px_50px_-24px_rgba(0,21,74,0.25)] overflow-hidden",children:[e.jsxs("div",{className:"relative px-5 py-5 bg-gradient-to-br from-navy via-[#001a5e] to-[#002a7a] text-white overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.08] bg-[radial-gradient(circle_at_top_right,var(--gold)_0%,transparent_60%)]"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.22em] text-gold",children:N("hotelDetailsPage.yourStay")}),e.jsx("div",{className:"mt-1 text-[15px] font-display font-bold leading-tight line-clamp-2",children:n}),e.jsxs("div",{className:"mt-2 inline-flex items-center gap-1.5 rounded-full bg-white/10 backdrop-blur px-2.5 py-1 text-[11px] font-semibold tabular-nums",children:[Xt(u)," ",e.jsx("span",{className:"text-gold",children:"→"})," ",Xt(o),g>0&&e.jsxs("span",{className:"text-white/70",children:["· ",g,"n"]})]})]})]}),e.jsxs("div",{className:"px-5 py-3 flex items-center justify-between gap-2 border-b border-navy/10",children:[e.jsxs("button",{type:"button",onClick:()=>ye(x=>!x),"aria-expanded":Ne,className:"lg:pointer-events-none inline-flex items-center gap-2",children:[e.jsx("span",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full bg-navy/5",children:e.jsx(Oa,{className:"h-3.5 w-3.5 text-navy"})}),e.jsx("span",{className:"text-[12px] font-extrabold uppercase tracking-[0.18em] text-navy",children:N("hotelDetailsPage.filters")}),e.jsx(Ma,{className:`lg:hidden h-4 w-4 text-navy/60 transition-transform ${Ne?"rotate-180":""}`})]}),L&&e.jsxs("button",{type:"button",onClick:O,className:"inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-bold uppercase tracking-wider text-gold hover:bg-gold/10 transition",children:[e.jsx(Fa,{className:"h-3 w-3"})," ",N("hotelDetailsPage.reset")]})]}),e.jsxs("div",{className:`${Ne?"":"hidden"} lg:block`,children:[se.length>0&&e.jsxs("div",{className:"px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"h-px flex-1 bg-gradient-to-r from-gold/40 to-transparent"}),e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-navy/70",children:N("hotelDetailsPage.rate")}),e.jsx("div",{className:"h-px flex-1 bg-gradient-to-l from-gold/40 to-transparent"})]}),e.jsx("ul",{className:"space-y-1.5",children:se.map(([x,b])=>{const y=S[x],H=z[x],J=H===0;return e.jsx("li",{children:e.jsxs("button",{type:"button",disabled:J,onClick:()=>v(x),className:`group w-full inline-flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-[13px] font-semibold text-left transition-all ${y?"bg-navy text-white shadow-[0_4px_12px_-4px_rgba(0,21,74,0.4)]":J?"text-muted-foreground
1/40 cursor-not-allowed":"text-foreground hover:bg-navy/5 hover:translate-x-0.5"}`,children:[e.jsx("span",{className:`inline-flex h-4 w-4 items-center justify-center rounded-[4px] border transition ${y?"border-gold bg-gold text-navy":"border-navy/50 bg-background group-hover:border-navy"}`,children:y&&e.jsx(fe,{className:"h-3 w-3",strokeWidth:3.5})}),e.jsx("span",{className:"flex-1",children:b}),e.jsx("span",{className:`text-[10px] font-bold tabular-nums rounded-full px-1.5 py-0.5 min-w-[22px] text-center ${y?"bg-gold/25 text-gold":"bg-muted text-muted-foreground"}`,children:H})]})},x)})})]}),e.jsxs("div",{className:"px-5 pb-5 pt-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"h-px flex-1 bg-gradient-to-r from-gold/40 to-transparent"}),e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-navy/70",children:N("hotelDetailsPage.roomType")}),e.jsx("div",{className:"h-px flex-1 bg-gradient-to-l from-gold/40 to-transparent"})]}),Y.length===0?e.jsx("div",{className:"text-[12px] text-muted-foreground italic text-center py-2",children:N("hotelDetailsPage.noRoomTypeVariants")}):e.jsx("ul",{className:"space-y-1.5",children:Y.map(x=>{const b=p.has(x.key),y=N(`hotelDetailsPage.filterRoomType.${x.key}`,{defaultValue:x.label});return e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>D(x.key),className:`group w-full inline-flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-[13px] font-semibold text-left transition-all ${b?"bg-navy text-white shadow-[0_4px_12px_-4px_rgba(0,21,74,0.4)]":"text-foreground hover:bg-navy/5 hover:translate-x-0.5"}`,children:[e.jsx("span",{className:`inline-flex h-4 w-4 items-center justify-center rounded-[4px] border transition ${b?"border-gold bg-gold text-navy":"border-navy/50 bg-background group-hover:border-navy"}`,children:b&&e.jsx(fe,{className:"h-3 w-3",strokeWidth:3.5})}),e.jsx("span",{className:"flex-1",children:y}),e.jsx("span",{className:`text-[10px] font-bold tabular-nums rounded-full px-1.5 py-0.5 min-w-[22px] text-center ${b?"bg-gold/25 text-gold":"bg-muted text-muted-foreground"}`,children:x.count})]})},x.key)})})]}),ae.length>0&&e.jsxs("div",{className:"px-5 pb-5 pt-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"h-px flex-1 bg-gradient-to-r from-gold/40 to-transparent"}),e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-navy/70",children:N("hotelDetailsPage.roomFeatures")}),e.jsx("div",{className:"h-px flex-1 bg-gradient-to-l from-gold/40 to-transparent"})]}),e.jsx("ul",{className:"space-y-1.5",children:ae.map(x=>{const b=F.has(x.key),y=N(`hotelDetailsPage.filterAttr.${x.key}`,{defaultValue:x.label});return e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>l(x.key),className:`group w-full inline-flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-[13px] font-semibold text-left transition-all ${b?"bg-navy text-white shadow-[0_4px_12px_-4px_rgba(0,21,74,0.4)]":"text-foreground hover:bg-navy/5 hover:translate-x-0.5"}`,children:[e.jsx("span",{className:`inline-flex h-4 w-4 items-center justify-center rounded-[4px] border transition ${b?"border-gold bg-gold text-navy":"border-navy/50 bg-background group-hover:border-navy"}`,children:b&&e.jsx(fe,{className:"h-3 w-3",strokeWidth:3.5})}),e.jsx("span",{className:"flex-1",children:y}),e.jsx("span",{className:`text-[10px] font-bold tabular-nums rounded-full px-1.5 py-0.5 min-w-[22px] text-center ${b?"bg-gold/25 text-gold":"bg-muted text-muted-foreground"}`,children:x.count})]})},x.key)})})]}),ne.length>0&&e.jsxs("div",{className:"px-5 pb-5 pt-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"h-px flex-1 bg-gradient-to-r from-gold/40 to-transparent"}),e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-navy/70",children:N("hotelDetailsPage.rateCode")}),e.jsx("div",{className:"h-px flex-1 bg-gradient-to-l from-gold/40 to-transparent"})]}),e.jsx("ul",{className:"space-y-1.5",children:ne.map(x=>{const b=E.has(x.code),y=N(`hotelRatePlans.names.${x.code}`,{defaultValue:x.label});return e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>r(x.code),className:`group w-full inline-flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-[13px] font-semibold text-left transition-all ${b?"bg-navy text-white shadow-[0_4px_12px_-4px_rgba(0,21,74,0.4)]":"text-foreground hover:bg-navy/5 hover:translate-x-0.5"}`,children:[e.jsx("span",{className:`inline-flex h-4 w-4 items-center justify-center rounded-[4px] border transition ${b?"border-gold bg-gold text-navy":"border-navy/50 bg-background group-hover:border-navy"}`,children:b&&e.jsx(fe,{className:"h-3 w-3",strokeWidth:3.5})}),e.jsx("span",{className:"font-mono text-[11px] font-bold tracking-wider w-12 text-left",children:x.code}),e.jsx("span",{className:"flex-1 text-[12px] truncate",children:y}),e.jsx("span",{className:`text-[10px] font-bold tabular-nums rounded-full px-1.5 py-0.5 min-w-[22px] text-center ${b?"bg-gold/25 text-gold":"bg-muted text-muted-foreground"}`,children:x.count})]})},x.code)})})]})]})]})}function qa(n,u){if(typeof window>"u")return u;try{const o=Object.keys(sessionStorage).filter(g=>g.startsWith("wr:hotelList:"));for(const g of o){const I=sessionStorage.getItem(g);if(!I)continue;
1const k=JSON.parse(I),S=Array.isArray(k)?k.find(p=>String(p?.id||"")===String(n)):null,v=typeof S?.pricePerNight=="number"&&S.pricePerNight>0?S.pricePerNight:void 0;if(v)return v}}catch{return u}return u}function un(){const{t:n}=Be();ha();const{hotelId:u}=Bs.useParams(),o=Os(),g=Ms(),I=Ie(Fs),k=Ie(Es),S=Ie($s),v=Ie(_s),p=Ls(),D=Vs(),F=Gs();h.useEffect(()=>{let t=!1;try{const s=typeof window<"u"?sessionStorage.getItem("wr:pkgAirHotel"):null;if(!s)return;const c=JSON.parse(s),d=c.origin,m=c.destAirport||c.destination;if(!d||!m||!c.departureDate)return;const j={origin:d,destination:m,departureDate:c.departureDate,returnDate:c.returnDate,travelers:c.travelers,cabin:c.cabin,stops:c.stops,pkg:"air-hotel"},P=/(\d+)\s*Adults?,\s*(\d+)\s*Children?,\s*(\d+)\s*Infants?/i.exec(c.travelers||""),w=P?Number(P[1]):1,T=P?Number(P[2]):0,A=P?Number(P[3]):0;p.prefetchQuery({queryKey:["flights",j],staleTime:0,queryFn:()=>v({data:{origin:d,destination:m,departureDate:c.departureDate,returnDate:c.returnDate||void 0,adults:w,children:T,infants:A,cabinClass:(c.cabin==="Premium"?"PremiumEconomy":c.cabin)||"Economy",nonstop:c.stops==="Nonstop"}})}).catch(()=>{})}catch{}return()=>{t=!0}},[p,v]);const[l,E]=h.useState({}),[r,L]=h.useState(null),O=qs(),N=t=>O.inline(t,r?.currency||"USD"),[Y,z]=h.useState(null),[se,ae]=h.useState(!1),[be,ne]=h.useState(!0),[Ne,ye]=h.useState(null),[x,b]=h.useState([]),y=Ie(Ea);h.useEffect(()=>{const t=r?.latitude,s=r?.longitude;if(!Number.isFinite(t)||!Number.isFinite(s)){b([]);return}let c=!1;return(async()=>{try{const d=await y({data:{lat:t,lng:s,radius:2e3}});c||b(Array.isArray(d)?d:[])}catch{c||b([])}})(),()=>{c=!0}},[r?.latitude,r?.longitude,y]);const[H,J]=h.useState({}),[ss,dt]=h.useState(!1),je=h.useRef(null),[as,Oe]=h.useState(!1),[ht,Ke]=h.useState(!1),ce=h.useRef(!1),Me=Ts(),ut=Ds("hotel-rate"),[Ge,mt]=h.useState(()=>{try{return!!pe()?.insider}catch{return!1}}),[ns,xt]=h.useState(()=>{try{return!!pe()}catch{return!1}});h.useEffect(()=>{const t=()=>{try{mt(!!pe()?.insider),xt(!!pe()),bt(Number(pe()?.points??0)||0)}catch{mt(!1),xt(!1),bt(0)}};return window.addEventListener($t,t),window.addEventListener("storage",t),()=>{window.removeEventListener($t,t),window.removeEventListener("storage",t)}},[]);const Ye=!!D.user||ns,[is,gt]=h.useState(!1),[rs,Ua]=h.useState("photos"),[ie,pt]=h.useState(null),[ls,ft]=h.useState(!1),[X,Je]=h.useState(null),[Q,Xe]=h.useState(null),[Qe,Ze]=h.useState(null),[os,et]=h.useState(!1),[cs,bt]=h.useState(()=>{try{return Number(pe()?.points??0)||0}catch{return 0}}),Fe=F?Number(D.user?.wyn_earned_points??0)||0:cs,[de,tt]=h.useState(null),[ds,st]=h.useState(null),[hs,at]=h.useState(!1),[us,nt]=h.useState(!1),Nt=h.useRef(null),Ee=Number(D.user?.profile?.DiscountPercent)||0,[ms,yt]=h.useState(!1),[Pe,jt]=h.useState(null),[ve,Pt]=h.useState({prepaid:!1,paylater:!1,breakfast:!1}),[$e,vt]=h.useState(new Set),[ke,kt]=h.useState(new Set),[_e,wt]=h.useState(new Set),[V,Ct]=h.useState("cash"),[It,xs]=h.useState(new Set),St=t=>xs(s=>{const c=new Set(s);return c.has(t)?c.delete(t):c.add(t),c}),[Tt,gs]=h.useState([]),[re,Dt]=h.useState(0),[Le,At]=h.useState([]);h.useEffect(()=>{const t=ua();t&&t.length>0&&gs(t)},[]);const he=Math.max(1,Math.min(9,Tt.length||(l.rooms??1)||1)),ue=Tt[re]??{adults:l.adults??1,children:l.children??0,infants:0},ps=re>=he-1,me=()=>{setTimeout(()=>{document.getElementById("rooms")?.scrollIntoView({behavior:"smooth",block:"start"})},50)},fs=t=>{Pt(s=>({...s,[t]:!s[t]})),me()},bs=t=>{vt(s=>{const c=new Set(s);return c.has(t)?c.delete(t):c.add(t),c}),me()},Rt=t=>{kt(s=>{const c=new Set(s);return c.has(t)?c.delete(t):c.add(t),c}),me()},Ns=t=>{wt(s=>{const c=new Set(s);return c.has(t)?c.delete(t):c.add(t),c}),me()},ys=Object.values(ve).some(Boolean)||$e.size>0||ke.size>0||_e.size>0,js=()=>{Pt({prepaid:!1,paylater:!1,breakfast:!1}),vt(new Set),kt(new Set),wt(new Set)},$=h.useMemo(()=>ia(),[]),xe=!!$,{total:ge,anchorMissing:Ps}=ra(xe,$,{insider:!!D?.isInsider}),_=h.useMemo(()=>_t(l.checkIn,l.checkOut),[l.checkIn,l.checkOut]),[vs,ks]=h.useState(!1);h.useEffect(()=>{E(Jt()),ks(!0)},[]);const ws=vs&&!(l.checkIn&&l.checkOut);h.useEffect(()=>{let t=!0;return pt(null),(async()=>{try{const s=await S({data:{propertyId:u}});t&&s&&pt(s)}catch{}})(),()=>{t=!1}},[u,S]),h.useEffect(()=>{let t=!0;const s=l.checkIn,c=l.checkOut;if(!s||!c){ne(!1);return}const d=String(l.brand||"WY").toUpperCase();return ne(!0),ye(null),(async()=>{let m=null;try{const j=await I({data:{propertyId:u,brand:d,checkIn:s,checkOut:c,adults:l.adults??1,children:l.children??0,rooms:l.rooms??1,sessionId:l.searchSessionId||
1(()=>{try{return sessionStorage.getItem("tmt:hotelSessionId")||void 0}catch{return}})()}});m=Ws(j,u,d,{fallbackRatePerNight:qa(u,l.pricePerNight),nights:_t(l.checkIn,l.checkOut),rooms:l.rooms??1})}catch(j){t&&(ye(j instanceof Error?j.message:"Room availability could not be retrieved."),L(null),ne(!1));return}t&&(L(m),ne(!1),(async()=>{try{const j=await k({data:{hotelId:u,brandId:m?.brand||d,brandTier:m?.brandTier||l.brandTier||""}}),P=j&&(j.imageUrl||j.url||j.heroImage||j.HeroImage)||(Array.isArray(j?.images)?j.images[0]:null);t&&typeof P=="string"&&z(P)}catch{}})())})(),()=>{t=!1}},[u,l.brand,l.checkIn,l.checkOut,l.adults,l.children,l.rooms,I,k]);function Bt(t,s){if(!r)return;const c=l.rooms??1,d=s.cashTotal??0,m=s.pointsPerNight*_*c,j={room:{id:t.id,name:t.name,beds:t.beds,sleeps:t.sleeps,description:t.description,image:t.images&&t.images[0]||t.image,rateCode:t.rateCode,roomBasis:t.roomBasis||t.roomTypeCode||t.roomType||t.id,roomTypeCode:t.roomTypeCode||t.roomType||t.id,roomType:t.roomType||t.id,refundable:t.refundable,perks:t.perks||[],ratePerNight:s.cashPerNight||t.ratePerNight,allInclusivePerNight:s.cashPerNight||t.ratePerNight,allInclusiveTotal:s.cashTotal,beforeTaxPerNight:s.cashBeforeTaxPerNight,beforeTaxTotal:s.cashBeforeTaxTotal,taxesIncluded:s.taxesIncluded??!0,isInsiderContract:!1,qualPointsEarned:t.qualPointsEarned===void 0?null:t.qualPointsEarned,insiderAltRate:t.insiderAltRate},payment:{method:s.method,label:s.label,tagline:s.tagline,cashPerNight:s.cashPerNight,pointsPerNight:s.pointsPerNight,cashTotal:s.cashTotal,cashBeforeTaxPerNight:s.cashBeforeTaxPerNight,cashBeforeTaxTotal:s.cashBeforeTaxTotal,taxesIncluded:s.taxesIncluded??!0},occupancy:ue},P=[...Le,j];if(!ps){At(P),Dt(C=>C+1),me();return}const w=he>1;xa(w?P:null);const T=d,A=w?P.reduce((C,i)=>C+i.payment.pointsPerNight,0)*_:m,U=w&&P.every(C=>C.payment.method==="points"),B=w&&P.some(C=>C.payment.method==="cash"||C.payment.method==="cash-points"),q=w?{...s,method:U?"points":B?"cash":s.method,label:U?s.label:B?"Mixed payment":s.label,cashPerNight:P.reduce((C,i)=>C+i.payment.cashPerNight,0),pointsPerNight:P.reduce((C,i)=>C+i.payment.pointsPerNight,0),cashTotal:T,taxesIncluded:!0}:s,We=(ie?.imageGroups||[]).flatMap(C=>C.images),He=Se(l.image||Y||r.images&&r.images[0]||We[0]||"");Zs({hotel:{id:r.id,brand:r.brand,brandLabel:r.brandLabel,name:r.name,city:r.city,address:r.address,rating:r.rating,reviewCount:r.reviewCount,image:He,pricePerNight:s.cashPerNight||t.ratePerNight,insiderPerNight:s.cashPerNight||t.ratePerNight,latitude:r.latitude??l.latitude??l.searchLatitude,longitude:r.longitude??l.longitude??l.searchLongitude,currency:r.currency,amenities:r.amenities},details:{address:r.address,amenities:r.amenities,images:r.images,description:r.description,rating:r.rating,reviewCount:r.reviewCount},room:{...t,ratePerNight:s.cashPerNight||t.ratePerNight,allInclusivePerNight:s.cashPerNight||t.ratePerNight,allInclusiveTotal:s.cashTotal,beforeTaxPerNight:s.cashBeforeTaxPerNight,beforeTaxTotal:s.cashBeforeTaxTotal,taxesIncluded:s.taxesIncluded??!0,isInsiderContract:!1,qualPointsEarned:t.qualPointsEarned===void 0?null:t.qualPointsEarned},insider:!1,checkIn:l.checkIn||"",checkOut:l.checkOut||"",nights:_,adults:l.adults??1,children:l.children??0,rooms:c,total:T,payment:q,cashTotal:T,pointsTotal:A,qualPointsEarned:t.qualPointsEarned===void 0?null:t.qualPointsEarned,propertyFees:r.propertyFees,searchSessionId:l.searchSessionId||(()=>{try{return sessionStorage.getItem("tmt:hotelSessionId")||void 0}catch{return}})()});let W=null;try{const C=typeof window<"u"?sessionStorage.getItem("wr:pkgAirHotel"):null;C&&(W=JSON.parse(C))}catch{}if(W){Ke(!0);const C=!!t.isInsiderContract,i=t.ratePerNight||s.cashPerNight||0,a=s.method!=="cash",f=Number(t.standardRatePerNight)||0,R=Number(t.insiderRatePerNight)||0,M=a?i:f>0?f:C?Math.ceil(i/.85*100)/100:i,K=a?i:R>0?R:C?i:Math.ceil(i*.85*100)/100,Z=Math.max(1,c),ee=s.cashTotal??T,Ce=w?P.reduce((it,Ss)=>it+Ss.payment.pointsPerNight,0)*_:s.pointsPerNight*_*Z,G={id:r.id,name:r.name,brand:r.brandLabel||r.brand||"",city:r.city||"",rating:r.rating||0,reviews:r.reviewCount||0,pricePerNight:i,currency:r.currency,image:He,amenities:r.amenities||[],distanceMi:0,rooms:[],room:{id:t.id,name:t.name,description:t.description||"",beds:t.beds||"",sleeps:t.sleeps||2,publicRate:M,insiderRate:K,refundable:t.refundable,perks:t.perks||[]},checkIn:l.checkIn,checkOut:l.checkOut,nights:_,total:ee,insiderRate:a?!1:C,ratePerNight:i,roomsCount:Z,payment:{method:s.method,label:s.label,tagline:s.tagline,cashPerNight:s.cashPerNight,pointsPerNight:s.pointsPerNight,cashTotal:ee,cashBeforeTaxPerNight:s.cashBeforeTaxPerNight,cashBeforeTaxTotal:s.cashBeforeTaxTotal,taxesIncluded:s.taxesIncluded??!0},pointsTotal:Ce};ea(G),o({to:"/search/air",search:{origin:W.origin,destination:W.destAirport||W.destination,departureDate:W.departureDate,returnDate:W.returnDate,travelers:W.travelers,cabin:W.cabin,stops:W.stops,pkg:"air-hotel"}}).catch(()=>{});return}Ke(!0),o({to:"/review/hotel"}).catch(()=>{})}function Ot(t,s){const c={method:"cash",label:s.name,tagline:s.tagline||"",cashPerNight:s.cashPerNight,cashTotal:s.totalCash,cashBeforeTaxPerNight:s.beforeTaxPerNight,cashBeforeTaxTotal:s.beforeTaxTotal,taxesIncluded:s.taxesIncluded,pointsPerNight:0};Xs(s.isInsider),Qs(s.isInsider);
1const d=te(t),m=Vt(d,Ye)??null,j=d.filter(B=>B.isInsider&&B.cashPerNight>0),P=j.reduce((B,q)=>!B||q.cashPerNight<B.cashPerNight?q:B,null),w=m?.cashPerNight??null,T=P?.cashPerNight??null,A=s.isInsider?null:j.reduce((B,q)=>!B||q.cashPerNight<B.cashPerNight||q.cashPerNight===B.cashPerNight&&q.code.toUpperCase()==="SNOW6"?q:B,null),U=A?{rateCode:A.code,roomBasis:A.roomBasis,roomTypeCode:A.roomTypeCode,refundable:A.refundable,cashPerNight:A.cashPerNight,cashTotal:A.totalCash,cashBeforeTaxPerNight:A.beforeTaxPerNight,cashBeforeTaxTotal:A.beforeTaxTotal,taxesIncluded:A.taxesIncluded,qualPointsEarned:A.qualPointsEarned??null,previousRate:{rateCode:s.code,cashPerNight:s.cashPerNight,cashTotal:s.totalCash,cashBeforeTaxPerNight:s.beforeTaxPerNight,cashBeforeTaxTotal:s.beforeTaxTotal,taxesIncluded:s.taxesIncluded,qualPointsEarned:s.qualPointsEarned??null,roomBasis:s.roomBasis,roomTypeCode:s.roomTypeCode,refundable:s.refundable}}:void 0;Bt({...t,rateCode:s.code,roomBasis:s.roomBasis||t.roomBasis||t.roomTypeCode||t.roomType||t.id,roomTypeCode:s.roomTypeCode||t.roomTypeCode||t.roomType||t.id,isInsiderContract:s.isInsider,refundable:s.refundable??t.refundable,cancelPolicy:s.cancelPolicy??t.cancelPolicy,ratePerNight:s.cashPerNight,standardRatePerNight:w,insiderRatePerNight:T,isPostpaid:s.isPostpaid,qualPointsEarned:s.qualPointsEarned??null,insiderAltRate:U},c)}function Ve(t,s){if(ce.current)return;const c=Js(s.code),d=Rs(D.user);if((c==="login"||s.isInsider)&&!d){F?nt(!0):(Ze({room:t,plan:s}),et(!0));return}if(s.isInsider&&!Me){ut.hold(()=>{ce.current=!0,je.current={room:t,plan:s},Oe(!0)});return}Ot(t,s)}const Cs=Se((ie?.imageGroups||[]).flatMap(t=>t.images)[0]||r?.images?.[0]||Y||l.image||"");if(h.useEffect(()=>{ae(!1)},[Cs]),ws)return e.jsx(La,{hotelName:l.name,onSubmit:t=>{const s={...l,...t};try{sessionStorage.setItem("wr:hotelSearchCtx",JSON.stringify(s))}catch{}E(s)}});if(Ne)return e.jsx("div",{className:"bg-muted/30 min-h-screen",children:e.jsx("div",{className:"container mx-auto max-w-lg px-4 py-10",children:e.jsxs("div",{className:"rounded-2xl border border-destructive/30 bg-card p-6 shadow-sm",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 text-destructive font-semibold",children:[e.jsx(zt,{className:"h-4 w-4"})," Room availability unavailable"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"We couldn’t reach the availability service for this property, so we can’t show rates right now. This is a temporary connection problem — it does not mean the hotel is sold out."}),e.jsx(oe,{className:"mt-5 min-h-11",onClick:()=>{ye(null),E(Jt())},children:"Try again"})]})})});if(be||!r)return e.jsx(Lt,{fullscreen:!0,engine:"hotels",label:n("hotelDetailsPage.preparingSuite"),sublabel:n("hotelDetailsPage.preparingSuiteSub")});const Mt=r.rooms.reduce((t,s)=>{const c=te(s);let d=s.ratePerNight>0?s.ratePerNight:Number.POSITIVE_INFINITY;for(const m of c)m.cashPerNight>0&&m.cashPerNight<d&&(d=m.cashPerNight);return d<t?d:t},Number.POSITIVE_INFINITY),Is=Number.isFinite(Mt)?Mt:0;(()=>{let t=Number.POSITIVE_INFINITY;for(const s of r.rooms)for(const c of te(s))c.isInsider&&c.cashPerNight>0&&c.cashPerNight<t&&(t=c.cashPerNight);return Number.isFinite(t)?t:0})();const Ft=(ie?.imageGroups||[]).flatMap(t=>t.images),we=(Ft.length>0?Ft:r.images||[]).map(Se).filter(Boolean),qe=Se(we[0]||Y||l.image||"");return e.jsxs("div",{className:"bg-muted/30 min-h-screen",children:[e.jsx("div",{className:"border-b border-border bg-card",children:e.jsxs("div",{className:"container mx-auto max-w-6xl px-4 lg:px-6 xl:px-0 py-6",children:[$?.origin&&e.jsx(ma,{active:"hotel"}),e.jsxs("button",{onClick:()=>$?.origin?Wt(g,"search:air-hotel:lastUrl",()=>o({to:"/search/air-hotel",search:{origin:$.origin,destination:$.destination||l.destination,destAirport:$.destAirport,departureDate:$.departureDate,returnDate:$.returnDate,travelers:$.travelers,cabin:$.cabin,stops:$.stops,checkIn:$.checkIn||l.checkIn,checkOut:$.checkOut||l.checkOut,allInclusive:$.allInclusive||void 0}})):Wt(g,"search:hotel:lastUrl",()=>o({to:"/search/hotel",search:{destination:l.destination,checkIn:l.checkIn,checkOut:l.checkOut}})),className:"text-xs font-semibold text-muted-foreground inline-flex items-center hover:text-foreground transition mb-3",children:[e.jsx(ga,{className:"h-3.5 w-3.5 mr-1"})," ",n("hotelDetailsPage.backToResults")]}),e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"font-display text-[28px] md:text-[32px] font-bold leading-tight text-[#00154a]",children:/^Wyndham property /i.test(r.name)&&l.name?l.name:r.name}),e.jsxs("div",{className:"mt-1 text-[13px] text-muted-foreground flex flex-col gap-1",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground
1/80 mr-1",children:"Address:"}),[r.addressLines&&r.addressLines.length>0?r.addressLines.join(", "):r.address,r.city,r.state,[r.country,r.postalCode].filter(Boolean).join(" ")].filter(Boolean).join(", ")]}),r.phone&&e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/80 mr-1",children:"Phone:"}),r.phone]}),r.email&&e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/80 mr-1",children:"Email:"}),e.jsx("a",{href:`mailto:${r.email}`,className:"hover:text-foreground break-all",children:r.email})]}),r.creditCards&&r.creditCards.length>0&&e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/80 mr-1",children:"Cards accepted:"}),r.creditCards.join(" · ")]})]})]}),e.jsx("div",{className:"shrink-0 flex items-center justify-center h-14 min-w-[120px] rounded-md bg-card px-3",children:e.jsx("span",{className:"font-display text-base font-bold tracking-[0.18em] uppercase text-[#00154a]",children:r.brandLabel||l.brandLabel||r.brand})})]}),e.jsxs("div",{className:"mt-5 grid grid-cols-1 md:grid-cols-12 gap-5 items-start",children:[e.jsxs("button",{type:"button",onClick:()=>we.length>0&&gt(!0),className:"md:col-span-3 relative group rounded-md overflow-hidden bg-muted text-left",children:[qe&&!se?e.jsx("img",{src:qe,alt:r.name,className:"w-full h-40 object-cover transition group-hover:brightness-95",loading:"eager",fetchpriority:"high",decoding:"async",onError:t=>{const s=t.currentTarget,c=l.image&&l.image!==qe?l.image:"";c&&s.src!==c?s.src=c:ae(!0)}}):e.jsx("div",{className:"w-full h-40 bg-muted grid place-items-center text-muted-foreground",children:e.jsx(Ut,{className:"h-8 w-8 opacity-40"})}),we.length>0&&e.jsxs("span",{className:"absolute right-2 bottom-2 max-w-[calc(100%-16px)] inline-flex items-center gap-1 rounded-full bg-black/60 px-2 py-0.5 text-[10px] font-semibold text-white whitespace-nowrap leading-none",children:[e.jsx(Ut,{className:"h-3 w-3 shrink-0"})," ",we.length>99?"99+":we.length]})]}),e.jsxs("div",{className:"md:col-span-2 text-sm",children:[e.jsx("div",{className:"text-[12px] font-semibold text-foreground/80",children:n("hotelDetailsPage.checkIn")}),e.jsx("div",{className:"mt-0.5 text-[13px] text-muted-foreground",children:Ht(r.checkInTime)||"3:00 PM"}),e.jsx("div",{className:"mt-3 text-[12px] font-semibold text-foreground/80",children:n("hotelDetailsPage.checkout")}),e.jsx("div",{className:"mt-0.5 text-[13px] text-muted-foreground",children:Ht(r.checkOutTime)||"11:00 AM"})]}),e.jsxs("div",{className:"md:col-span-5",children:[e.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-foreground/80 mb-2",children:n("hotelDetailsPage.featuredAmenities")}),(()=>{const t=(ie?.topAmenities&&ie.topAmenities.length>0?ie.topAmenities:r.topAmenities||[]).slice(0,6);return t.length===0?e.jsx("div",{className:"text-xs text-muted-foreground",children:n("hotelDetailsPage.noAmenities")}):e.jsx("div",{className:"grid grid-cols-2 gap-x-6 gap-y-1.5 text-[13px] text-foreground/85",children:t.map(s=>e.jsxs("div",{className:"inline-flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-[#00154a] shrink-0",children:Qt(s,"h-4 w-4")}),e.jsx("span",{className:"truncate",children:s})]},s))})})()]}),e.jsxs("div",{className:"md:col-span-2 flex flex-col items-end gap-1.5",children:[(()=>{const t=Number(r.rating)>0?Number(r.rating):null,s=Number(r.reviewCount)>0?Number(r.reviewCount):null;if(t==null)return null;const c=Math.round(t);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"inline-flex items-center gap-1.5",children:e.jsx("span",{className:"font-display text-[10px] font-bold tracking-tight text-[#00AA6C]",children:"Tripadvisor"})}),e.jsx("div",{className:"inline-flex items-center gap-0.5","aria-label":`Rated ${t} out of 5`,children:Array.from({length:5}).map((d,m)=>e.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full border-2 ${m<c?"bg-[#00AA6C] border-[#00AA6C]":"bg-transparent border-[#00AA6C]/50"}`},m))}),s!=null?e.jsx("div",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:n("hotelDetailsPage.tripadvisorRating",{count:s})}):null]})})(),e.jsxs("div",{className:"mt-1.5 flex flex-col items-end gap-0.5",children:[e.jsx("button",{type:"button",onClick:()=>ft(!0),className:"text-[12px] font-semibold text-[#0a64bc] hover:underline",children:n("hotelDetailsPage.viewAmenities")}),e.jsx("button",{type:"button",onClick:()=>yt(!0),className:"text-[12px] font-semibold text-[#0a64bc] hover:underline",children:n("hotelDetailsPage.viewHotelPolicies")})]})]})]}),r.alertMessage&&e.jsxs("div",{className:"mt-3 inline-flex items-start gap-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-900",children:[e.jsx(Kt,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),e.jsx("span",{children:r.alertMessage})]})]})}),e.jsx("div",{className:"container mx-auto max-w-6xl px-4 lg:px-6 xl:px-0 py-8 space-y-6",children:e.jsxs("div",{className:"space-y-6 min-w-0",children:[r.description&&e.jsx("section",{id:"overview",className:"scroll-mt-16",children:e.jsx("p",{className:"text-sm text-foreground
1/80 leading-relaxed",children:r.description})}),(()=>{const t=x.slice(0,8),s=(r.attractions??[]).slice(0,8),d=t.length>0?t.map(m=>({key:`g:${m.name}`,name:m.name,distance:m.distanceLabel,rating:m.rating})):s.map(m=>({key:`s:${m.name}`,name:m.name,distance:m.distance,rating:void 0}));return d.length===0?null:e.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6 space-y-3",children:[e.jsx("h2",{className:"font-display text-lg font-bold",children:n("hotelDetailsPage.whatsNearby")}),e.jsx("ul",{className:"grid gap-2 sm:grid-cols-2 text-sm",children:d.map(m=>e.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-lg border border-border bg-background px-3 py-2",children:[e.jsxs("span",{className:"truncate flex items-center gap-2",children:[e.jsx("span",{className:"truncate",children:m.name}),typeof m.rating=="number"&&e.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[10px] font-semibold text-muted-foreground tabular-nums shrink-0",children:[e.jsx(pa,{className:"h-3 w-3 fill-current text-amber-500"}),m.rating.toFixed(1)]})]}),m.distance&&e.jsx("span",{className:"text-xs font-semibold text-muted-foreground tabular-nums shrink-0",children:m.distance})]},m.key))})]})})(),e.jsxs("section",{id:"rooms",className:"space-y-3 scroll-mt-16",children:[e.jsx("div",{className:"py-2",children:e.jsx("h2",{className:"font-display text-[22px] font-bold leading-none text-primary",children:n("hotelDetailsPage.chooseYourRoom")})}),he>1&&e.jsxs("div",{className:"rounded-xl border-2 border-[#C9A57B] bg-gradient-to-r from-[#C9A57B]/10 to-[#C9A57B]/5 px-5 py-4 flex flex-wrap items-center justify-between gap-3 sticky top-[91px] z-40 shadow-md backdrop-blur supports-[backdrop-filter]:bg-[#fdf8f0]/95",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-[#00154a]",children:n("hotelDetailsPage.selectingRoomOf",{current:re+1,total:he})}),e.jsx("div",{className:"mt-1 font-semibold text-foreground text-sm",children:n("hotelDetailsPage.pickRoomAndRate",{occupancy:[n("occupancy.adult",{count:ue.adults}),ue.children>0?n("occupancy.child",{count:ue.children}):null,ue.infants>0?n("occupancy.infant",{count:ue.infants}):null].filter(Boolean).join(", ")})}),Le.length>0&&e.jsxs("div",{className:"mt-1.5 text-xs text-muted-foreground",children:[n("hotelDetailsPage.pickedSoFar"),Le.map((t,s)=>e.jsxs("span",{className:"mr-2",children:[n("hotelDetailsPage.roomLabel",{n:s+1}),e.jsx("span",{className:"font-semibold text-foreground",children:t.room.name})]},s))]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1.5",children:Array.from({length:he}).map((t,s)=>e.jsx("span",{"aria-label":`Room ${s+1}`,className:s<re?"h-2.5 w-2.5 rounded-full bg-[#00154a]":s===re?"h-2.5 w-6 rounded-full bg-[#C9A57B]":"h-2.5 w-2.5 rounded-full bg-muted"},s))}),re>0&&e.jsx("button",{type:"button",onClick:()=>{At(t=>t.slice(0,-1)),Dt(t=>Math.max(0,t-1)),me()},className:"text-xs font-semibold text-[#00154a] hover:underline ml-2",children:n("hotelDetailsPage.backToRoom",{n:re})})]})]}),e.jsxs("div",{className:`${he>1?"sticky top-[173px]":"sticky top-[91px]"} z-30 -mx-2 flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-border bg-card/95 px-4 py-3 shadow-sm backdrop-blur supports-[backdrop-filter]:bg-card/80`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-[#00154a]",children:n("hotelDetailsPage.shopWith")}),e.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:n(V==="cash"?"hotelDetailsPage.showingCash":"hotelDetailsPage.showingPoints")})]}),e.jsxs("div",{className:"inline-flex rounded-lg border border-border bg-background p-0.5",children:[e.jsx("button",{type:"button",onClick:()=>Ct("cash"),"aria-pressed":V==="cash",className:`inline-flex items-center gap-1.5 rounded-md px-4 py-1.5 text-xs font-semibold transition ${V==="cash"?"bg-[#00154a] text-white":"text-muted-foreground hover:text-foreground"}`,children:n("hotelDetailsPage.cash")}),e.jsxs("button",{type:"button",onClick:()=>Ct("points"),"aria-pressed":V==="points",className:`inline-flex items-center gap-1.5 rounded-md px-4 py-1.5 text-xs font-semibold transition ${V==="points"?"bg-[#C9A57B] text-[#00154a]":"text-muted-foreground hover:text-foreground"}`,children:[e.jsx(Gt,{className:"h-3.5 w-3.5"})," ",n("hotelDetailsPage.points")]})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[260px_minmax(0,1fr)] items-start",children:[e.jsx(Va,{hotelName:/^Wyndham property /i.test(r.name)&&l.name?l.name:r.name,checkIn:l.checkIn,checkOut:l.checkOut,nights:_,fromPerNight:Is,rooms:r.rooms,rateFilters:ve,toggleRate:fs,roomTypeFilters:$e,toggleRoomType:bs,attrFilters:ke,toggleAttr:Rt,codeFilters:_e,toggleCode:Ns,anyFilterOn:ys,resetFilters:js}),e.jsx("ul",{className:"space-y-6 min-w-0",children:(()=>{const t=r.rooms.filter(d=>{if($e.size>0){const m=`${d.name} ${d.beds||""} ${d.description||""}`.toLowerCase();let j=!1;for(const P of $e){const w=ts.find(T=>T.key===P);if(w&&w.re.test(m)){j=!0;break}}if(!j)return!1}if(ke.size>0){const m=ot(d);for(const j of ke)if(!m.has(j))return!1}return!(V==="points"&&!(d.pointsOffers&&d.pointsOffers.length>0))}),s=d=>{let m=1/0;const j=te(d);for(const P of j)P.cashPerNight<m&&(m=P.cashPerNight);return d.ratePerNight&&d.ratePerNight<m&&(m=d.ratePerNight),isFinite(m)?m:Number.MAX_SAFE_INTEGER},c=[...t].sort((d,m)=>s(d)-s(m)).map(d=>({key:d.id,label:d.name,rooms:[d]}));return c.length===0?e.jsx("li",{className:"rounded-2xl border border-border bg-card p-6 text-sm text-muted-foreground",children:n(V==="points"?"hotelDetailsPage.noPointsAvailable":"hotelDetailsPage.noRoomsMatch")}):c.map(d=>{const m=d.rooms.find(i=>i.images&&i.images.length||i.image),P=(m?m.images&&m.images.length?m.images:m.image?[m.image]:[]:[]).map(Se).filter(
1Boolean)[0]||rt;(()=>{let i=1/0;for(const a of d.rooms){const f=te(a);for(const R of f)R.cashPerNight<i&&(i=R.cashPerNight);a.ratePerNight&&a.ratePerNight<i&&(i=a.ratePerNight)}return isFinite(i)?i:0})();const w=[];for(const i of V==="cash"?d.rooms:[]){const a=te(i),f=Vt(a,Ye),R=a.filter(M=>(!ve.prepaid||!M.isPostpaid)&&(!ve.paylater||M.isPostpaid)&&(!ve.breakfast||M.hasBreakfast)&&(_e.size===0||_e.has(M.code)));for(const M of R)w.push({room:i,plan:M,standardPlan:f})}w.sort((i,a)=>i.plan.cashPerNight-a.plan.cashPerNight),w.filter(i=>!i.plan.isPostpaid),w.filter(i=>i.plan.isPostpaid);const T=[];if(V==="points"){for(const i of d.rooms)for(const a of i.pointsOffers||[])T.push({room:i,offer:a});T.sort((i,a)=>i.offer.kind!==a.offer.kind?i.offer.kind==="points"?-1:1:i.offer.pointsPerNight-a.offer.pointsPerNight)}T.filter(i=>i.offer.kind==="points"),T.filter(i=>i.offer.kind==="points-cash");const A=new Set;for(const i of d.rooms)for(const a of ot(i))A.add(a);const U=new Set;for(const i of d.rooms){for(const a of i.roomAmenities||[])a&&U.add(a);for(const a of i.perks||[])a&&U.add(a)}const B=Array.from(U).slice(0,10),q=d.rooms.find(i=>i.description)?.description;Math.max(0,...d.rooms.map(i=>i.sleeps||0));const We=d.rooms.find(i=>i.beds)?.beds;if(V==="cash"&&w.length===0||V==="points"&&T.length===0)return null;const He=({room:i,plan:a,standardPlan:f})=>{const R=(H[i.id]||"snow5")===a.id,M=a.totalCash??a.cashPerNight*_*Math.max(1,l.rooms??1),K=xe&&ge!=null?M+ge:null,Z=f&&a.isInsider?Math.max(0,f.cashPerNight-a.cashPerNight):0,ee=Z*_*Math.max(1,l.rooms??1),Ce=f&&a.isInsider&&f.cashPerNight>0?Math.round(Z/f.cashPerNight*100):0;return e.jsxs("li",{className:`relative grid grid-cols-1 md:grid-cols-[1fr_auto] items-start gap-4 px-5 py-4 min-h-[120px] transition ${R?"bg-[#C9A57B]/5":a.isInsider?"bg-[#C9A57B]/[0.04] hover:bg-[#C9A57B]/10":"hover:bg-muted/40"}`,children:[(R||a.isInsider)&&e.jsx("span",{className:`absolute left-0 top-0 bottom-0 w-1 ${a.isInsider?"bg-[#C9A57B]":"bg-[#00154a]"}`}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{title:`Rate code: ${a.code}`,className:`inline-flex items-center rounded font-mono font-bold tracking-wider text-[10px] px-1.5 py-0.5 border ${a.isInsider?"bg-[#00154a] text-white border-[#C9A57B]":"bg-white text-[#00154a] border-[#00154a]/30"}`,children:a.code}),e.jsx("span",{className:"font-display text-base font-bold text-foreground",children:n(`hotelRatePlans.names.${a.code}`,{defaultValue:a.name})}),a.isInsider&&!(Ge||Me)&&e.jsxs("button",{type:"button",onClick:G=>{G.stopPropagation(),dt(!0)},title:n("insiderInfoModal.title",{defaultValue:"About Wyndham Insider"}),"data-compact-touch":!0,className:"inline-flex items-center gap-1 rounded-full bg-[#C9A57B] text-[#00154a] px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider hover:bg-[#C9A57B]/90 transition",children:[e.jsx(ze,{className:"h-[0.975rem] w-[0.975rem]"}),n("hotelRatePlans.insiderBadge",{defaultValue:"Insider"}),e.jsx(Kt,{className:"h-3 w-3"})]}),a.badge&&e.jsxs("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider ${a.isInsider?"bg-[#C9A57B] text-[#00154a]":"bg-muted text-muted-foreground"}`,children:[a.isInsider&&e.jsx(ze,{className:"inline h-[0.975rem] w-[0.975rem] mr-0.5"}),a.badge]}),a.isInsider&&ee>0&&e.jsx("span",{className:"rounded-full bg-[#C9A57B]/20 text-[#00154a] px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",children:n("hotelDetailsPage.saveAmountPct",{amount:N(ee),pct:Ce})})]}),e.jsxs("div",{className:"mt-1 text-xs text-foreground/80 flex flex-wrap gap-x-2 gap-y-0.5",children:[e.jsx("span",{className:"font-semibold text-[#00154a]",children:i.id==="insider"?n("hotelRatePlans.insiderRoom.name"):i.name}),(()=>{const G=(i.rateCode||"").toUpperCase();return G?e.jsxs("span",{className:"font-mono text-[10px] text-muted-foreground",children:["[",G,"]"]}):null})(),i.beds&&e.jsxs("span",{className:"text-muted-foreground",children:["·"," ",i.id==="insider"?n("hotelRatePlans.insiderRoom.beds1King",{defaultValue:i.beds}):i.beds]})]}),e.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-0.5 text-xs",children:[e.jsx("button",{type:"button",onClick:()=>Je({room:i,plan:a}),className:"text-[#00154a] font-semibold hover:underline",children:n("hotelDetailsPage.rateDetails")}),a.tagline&&e.jsxs("span",{className:"text-muted-foreground",children:["·"," ",n(`hotelRatePlans.taglines.${a.code}`,{defaultValue:a.tagline})]})]}),a.isInsider&&!(Ge||Me)&&e.jsx(sa,{className:"mt-3 w-full"})]}),e.jsxs("div",{className:"flex flex-col items-stretch md:items-end gap-2",children:[e.jsx("div",{className:"w-full md:w-auto text-left md:text-right",children:xe?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[9px] font-bold uppercase tracking-[0.16em] text-primary",children:n("hotelDetailsPage.bundleTotal")}),e.jsx("div",{className:"font-display text-2xl font-bold text-[#00154a] leading-none tabular-nums",children:K!=null?N(K):N(M)}),D?.isInsider&&Ps&&K==null&&e.jsx("div",{className:"text-[10px] text-muted-foreground mt-0.5",children:n("searchHotelPage.bundleFlightNextStep",{defaultValue:"Flight pricing at next step"})})]}):e.jsxs(e.Fragment,{children:[a.isInsider&&f&&f.cashPerNight>a.cashPerNight&&e.jsx("div",{className:"text-[11px] font-semibold text-[#00154a]/55 line-through tabular-nums mb-0.5",children:N(f.cashPerNight)}),e.jsx("div",{className:"font-display text-2xl font-bold text-[#00154a] leading-none tabular-nums",children:N(a.cashPerNight)}),e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground mt-0.5",children:n("hotelDetailsPage.perNight")}),e.jsx("button",{type:"button",onClick:()=>Xe({room:i,plan:a}),className:"mt-1 text-[11px] text-[#00154a] font-semibold hover:underline whitespace-nowrap",children:n("hotelDetailsPage.totalForStay",{amount:N(M)})}),a.taxesIncluded&&e.jsx("div",{className:"text-[10px] text-muted-foreground",children:n("hotelDetailsPage.taxesIncluded")})]})}),e.jsx(oe,{onClick:()=>{J(G=>({...G,[i.id]:a.id})),Ve(i,a)},className:`w-full md:w-[190px] whitespace-normal leading-tight h-auto py-2 font-bold ${a.isInsider?"bg-[#C9A57B] text-[#00154a] hover:bg-[#C9A57B]/90":"bg-[#001
154a] hover:bg-[#00154a]/90 text-white"}`,children:a.isInsider&&!(Ge||Me)?Et():a.isPostpaid?n("hotelDetailsPage.bookPayLater","BOOK & PAY LATER"):n("hotelDetailsPage.book","BOOK")})]})]},`${i.id}-${a.id}`)},W=(i,a)=>{if(!Ye){F?nt(!0):(st({room:i,offer:a}),at(!0));return}const f=a.pointsPerNight,R=a.totalPoints,M=R===f&&_>1,K=(M?f*_:R)+Le.reduce((G,it)=>G+(it.payment.pointsPerNight||0)*_,0),Z=xe?"package":"hotel";if(K>Fe){console.info("[hotel.points.guard] blocked",{flow:Z,rateCode:a.rateCode||(a.kind==="points"?"SRB":"PAC"),required:K,available:Fe,source:M?"perNight*nights":"totalPoints"}),tt({required:K,available:Fe});return}console.info("[hotel.points.guard] allowed",{flow:Z,rateCode:a.rateCode||(a.kind==="points"?"SRB":"PAC"),required:K,available:Fe,source:M?"perNight*nights":"totalPoints"});const ee=a.kind==="points-cash"?a.cashPerNight??0:0,Ce={method:a.kind==="points"?"points":"cash-points",label:a.rateplanName||(a.kind==="points"?n("hotelDetailsPage.freeNights"):n("hotelDetailsPage.pointsCash")),tagline:a.rateplanDescription||"",cashPerNight:ee,cashTotal:a.cashTotal,cashBeforeTaxPerNight:a.cashBeforeTaxPerNight,cashBeforeTaxTotal:a.cashBeforeTaxTotal,taxesIncluded:!0,pointsPerNight:a.pointsPerNight};Bt({...i,rateCode:a.rateCode||(a.kind==="points"?"SRB":"PAC"),roomBasis:a.roomBasis||i.roomBasis||i.roomTypeCode||i.roomType||i.id,roomTypeCode:a.roomTypeCode||i.roomTypeCode||i.roomType||i.id,refundable:a.refundable??i.refundable,cancelPolicy:a.cancelPolicy??i.cancelPolicy,ratePerNight:ee,qualPointsEarned:0},Ce)};Nt.current=W;const C=({room:i,offer:a})=>{const f=a.kind==="points";return e.jsxs("li",{className:"relative grid grid-cols-1 md:grid-cols-[1fr_auto_auto] items-center gap-4 px-5 py-4 min-h-[120px] bg-[#C9A57B]/[0.04] hover:bg-[#C9A57B]/10 transition",children:[e.jsx("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-[#C9A57B]"}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"inline-flex items-center rounded font-mono font-bold tracking-wider text-[10px] px-1.5 py-0.5 border bg-[#00154a] text-white border-[#C9A57B]",children:a.rateCode||(f?"SRB":"PAC")}),e.jsx("span",{className:"font-display text-base font-bold text-foreground",children:a.rateplanName||n(f?"hotelDetailsPage.freeNights":"hotelDetailsPage.pointsCash")}),e.jsxs("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider bg-[#C9A57B] text-[#00154a]",children:[e.jsx(Gt,{className:"inline h-3 w-3 mr-0.5"}),n(f?"hotelDetailsPage.pointsOnly":"hotelDetailsPage.pointsCash")]})]}),e.jsxs("div",{className:"mt-1 text-xs text-foreground/80 flex flex-wrap gap-x-2 gap-y-0.5",children:[e.jsx("span",{className:"font-semibold text-[#00154a]",children:i.id==="insider"?n("hotelRatePlans.insiderRoom.name"):i.name}),i.beds&&e.jsxs("span",{className:"text-muted-foreground",children:["·"," ",i.id==="insider"?n("hotelRatePlans.insiderRoom.beds1King",{defaultValue:i.beds}):i.beds]})]}),a.rateplanDescription&&e.jsx("p",{className:"mt-1 text-[12px] leading-relaxed text-muted-foreground line-clamp-2",children:a.rateplanDescription}),a.cancelPolicy&&e.jsx("div",{className:"mt-1 text-[11px] text-muted-foreground",children:a.cancelPolicy})]}),e.jsxs("div",{className:"text-left md:text-right",children:[Ee>0&&e.jsxs("div",{className:"text-[11px] font-bold text-foreground mb-0.5",children:[Ee,"% ",n("hotelDetailsPage.pointsDiscount","POINTS DISCOUNT")]}),e.jsx("div",{className:`font-display text-2xl font-bold text-[#00154a] leading-none tabular-nums ${Ee>0?"line-through text-[#00154a]/60":""}`,children:Ue(a.pointsPerNight)}),e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground mt-0.5",children:n("hotelDetailsPage.ptsPerNight")}),!f&&a.cashPerNight?e.jsx("div",{className:"text-[11px] text-foreground/80 mt-1",children:e.jsx(lt,{i18nKey:"hotelDetailsPage.plusCashPerNight",values:{amount:N(a.cashPerNight)},components:{1:e.jsx("span",{className:"font-semibold tabular-nums"})}})}):null,e.jsxs("div",{className:"text-[10px] text-muted-foreground mt-1",children:[e.jsx(lt,{i18nKey:"hotelDetailsPage.totalForNights",count:_,values:{points:Ue(a.totalPoints)},components:{1:e.jsx("span",{className:Ee>0?"line-through":""})}}),!f&&a.cashTotal?e.jsxs(e.Fragment,{children:[" + ",N(a.cashTotal)]}):null]}),xe&&ge!=null&&ge>
10&&e.jsxs("div",{className:"text-[11px] text-foreground/80 mt-1 tabular-nums",children:["+ ",N(ge)," ",e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:n("hotelDetailsPage.flightCashLabel",{defaultValue:"flight (cash)"})})]})]}),e.jsx(oe,{onClick:()=>W(i,a),className:"w-[150px] font-bold bg-[#C9A57B] text-[#00154a] hover:bg-[#C9A57B]/90",children:n("hotelDetailsPage.book","BOOK")})]},`${i.id}-pts-${a.rateCode||a.rateplanName||a.pointsPerNight}`)};return e.jsxs("li",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"p-5 flex flex-col md:flex-row gap-5 bg-muted/30",children:[e.jsx("div",{className:"md:w-56 shrink-0",children:e.jsx("div",{className:"rounded-lg overflow-hidden bg-muted aspect-[4/3]",children:e.jsx("img",{src:P,alt:d.label,className:"w-full h-full object-cover",loading:"lazy",decoding:"async",onError:i=>{const a=i.currentTarget;a.src.endsWith(rt)||(a.src=rt)}})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[We&&e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.22em] text-[#C9A57B]",children:We}),e.jsx("h3",{className:"font-display text-2xl font-extrabold mt-1 leading-tight text-[#00154a]",children:d.label}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:n("hotelDetailsPage.pickRateCodeBelow")}),q&&e.jsx("p",{className:"mt-2 text-[12.5px] leading-relaxed text-foreground/80 line-clamp-3",children:q}),B.length>0&&e.jsx("p",{className:"mt-3 text-[12.5px] leading-relaxed text-foreground/80",children:B.join(", ")}),e.jsx("button",{type:"button",onClick:()=>jt({title:`${d.label} — ${n("hotelDetailsPage.roomAmenities",{defaultValue:"Room Amenities"})}`,items:Array.from(U)}),disabled:U.size===0,className:"mt-2 text-[12px] font-semibold text-[#00154a] hover:text-[#C9A57B] hover:underline disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:n("hotelDetailsPage.roomAmenities",{defaultValue:"Room Amenities"})}),A.size>0&&e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:ct.filter(i=>A.has(i.key)).map(i=>{const a=ke.has(i.key),f=n(`hotelDetailsPage.filterAttr.${i.key}`,{defaultValue:i.label});return e.jsxs("button",{type:"button",onClick:()=>Rt(i.key),className:`inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-semibold border transition ${a?"bg-[#00154a] text-white border-[#00154a]":"bg-white text-[#00154a] border-[#00154a]/30 hover:bg-[#00154a]/5"}`,children:[a&&e.jsx(fe,{className:"h-3 w-3"}),f]},i.key)})})]})]}),V==="points"?T.length===0?e.jsx("div",{className:"px-5 py-6 text-sm text-muted-foreground",children:n("hotelDetailsPage.noAwardOffersRoom")}):(()=>{const i=`pts-${d.key}`,a=It.has(i),f=a?T:T.slice(0,3),R=T.length-f.length;return e.jsxs(e.Fragment,{children:[e.jsx("ul",{className:"divide-y divide-border",children:f.map(C)}),(R>0||a)&&e.jsx("div",{className:"px-5 py-3 border-t border-border",children:e.jsx("button",{type:"button",onClick:()=>St(i),className:"text-[13px] font-semibold text-[#c8102e] hover:underline",children:a?"− See Fewer Rates":`+ See More Rates (${R})`})})]})})():w.length===0?e.jsx("div",{className:"px-5 py-6 text-sm text-muted-foreground",children:n("hotelDetailsPage.noRatesMatch")}):(()=>{const i=`cash-${d.key}`,a=It.has(i),f=a?w:w.slice(0,3),R=w.length-f.length;return e.jsxs(e.Fragment,{children:[e.jsx("ul",{className:"divide-y divide-border",children:f.map(He)}),(R>0||a)&&e.jsx("div",{className:"px-5 py-3 border-t border-border",children:e.jsx("button",{type:"button",onClick:()=>St(i),className:"text-[13px] font-semibold text-[#c8102e] hover:underline",children:a?"− See Fewer Rates":`+ See More Rates (${R})`})})]})})()]},`${d.key}-${V}`)})})()},V)]})]})]})}),e.jsx(da,{open:ss,onClose:()=>dt(!1)}),is&&e.jsx(ca,{hotelId:r.id,brandId:r.brand,brandTier:r.brandTier||l.brandTier||"",hotelName:r.name,fallbackImage:qe,defaultTab:rs,prefetched:ie,onClose:()=>gt(!1)}),e.jsx(Wa,{open:!!X,onClose:()=>Je(null),room:X?.room??null,plan:X?.plan??null,nights:_,rooms:l.rooms??1,hotelPolicies:r.policies,onSelect:()=>{X&&(J(t=>({...t,[X.room.id]:X.plan.id})),Ve(X.room,X.plan)),Je(null)}}),e.jsx(Ha,{open:!!Q,onClose:()=>Xe(null),room:Q?.room??null,plan:Q?.plan??null,nights:_,rooms:l.rooms??1,adults:l.adults??1,children:l.children??0,pkgActive:xe,pkgFlightTotal:ge??void 0,onSelect:()=>{Q&&(J(t=>({...t,[Q.room.id]:Q.plan.id})),Ve(Q.room,Q.plan)),Xe(null)}}),e.jsx(za,{open:ms,onClose:()=>yt(!1),policies:r.policies}),e.jsx(As,{open:as,onOpenChange:t=>{Oe(t),!t&&!ht&&(je.current=null,ce.current=!1)},surface:"rates",confirmLabel:Et(),onCancel:()=>{je.current=null,ce.current=!1,na("hotel"),Oe(!1)},onConfirm:()=>{const t=je.current;if(je.current=null,aa("hotel"),Oe(!1),!t){ce.current=!1;return}Ke(!0),window.requestAnimationFrame(()=>{ce.current=!1,Ot(t.room,t.plan)})}}),ut.dialog,ht&&e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-background/85 backdrop-blur-sm","aria-live":"polite",children:e.jsx(Lt,{label:"Preparing your booking…"})}),e.jsx(qt,{open:os,onClose:()=>{et(!1),Ze(null)},title:Qe?.plan?.isInsider?"Sign in to add Insider":"Sign in to book this rate",subt
1itle:Qe?.plan?.isInsider?"Wyndham Rewards Insider requires a Wyndham Rewards account.":"This member rate requires a Wyndham Rewards account.",onSignedIn:t=>{try{Hs(t)}catch{}et(!1);const s=Qe;Ze(null),s&&Ve(s.room,s.plan)}}),e.jsx(la,{open:us,onClose:()=>nt(!1),furl:typeof window<"u"?window.location.pathname+window.location.search:"/"}),e.jsx(qt,{open:hs,onClose:()=>{at(!1),st(null)},title:n("hotelDetailsPage.signInPointsTitle",{defaultValue:"Sign in to book with points"}),subtitle:n("hotelDetailsPage.signInPointsSubtitle",{defaultValue:"Points redemptions require a Wyndham Rewards account."}),onSignedIn:t=>{try{zs({...t,insider:!!t?.insider})}catch{}at(!1);const s=ds;st(null),s&&setTimeout(()=>Nt.current?.(s.room,s.offer),0)}}),e.jsx(Te,{open:!!de,onOpenChange:t=>{t||tt(null)},children:e.jsxs(De,{className:"sm:max-w-md",children:[e.jsxs(Ae,{children:[e.jsxs(Re,{className:"flex items-center gap-2",children:[e.jsx(zt,{className:"h-5 w-5 text-[#C9A57B]"}),n("hotelDetailsPage.insufficientPointsTitle",{defaultValue:"Not enough points"})]}),e.jsx(Us,{children:n("hotelDetailsPage.insufficientPointsBody",{defaultValue:"You do not have enough points to complete this booking. Please select another room option."})})]}),de&&e.jsxs("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-sm space-y-1",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:n("activityDetailsPage.pointsRequired",{defaultValue:"Points required"})}),e.jsxs("span",{className:"font-semibold tabular-nums",children:[de.required.toLocaleString()," pts"]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:n("activityDetailsPage.pointsAvailable",{defaultValue:"Your balance"})}),e.jsxs("span",{className:"font-semibold tabular-nums",children:[de.available.toLocaleString()," pts"]})]}),e.jsxs("div",{className:"flex justify-between pt-1 border-t border-border",children:[e.jsx("span",{className:"text-muted-foreground",children:n("activityDetailsPage.pointsShort",{defaultValue:"Short by"})}),e.jsxs("span",{className:"font-semibold tabular-nums text-destructive",children:[(de.required-de.available).toLocaleString()," pts"]})]})]}),e.jsx(Ks,{children:e.jsx(oe,{onClick:()=>tt(null),className:"w-full bg-[#00154a] hover:bg-[#001f6b] text-white",children:n("hotelDetailsPage.chooseAnotherRoom",{defaultValue:"Choose another room"})})})]})}),e.jsx(oa,{hotelId:r.id,brand:r.brand,hotelName:r.name,checkIn:l.checkIn,checkOut:l.checkOut,adults:l.adults,children:l.children,rooms:l.rooms,open:ls,onOpenChange:ft}),e.jsx(Te,{open:!!Pe,onOpenChange:t=>!t&&jt(null),children:e.jsxs(De,{className:"max-w-2xl max-h-[85vh] overflow-hidden flex flex-col p-0 gap-0 bg-white border-0 [&>button[type='button']]:text-white [&>button[type='button']]:opacity-90 [&>button[type='button']]:hover:opacity-100",children:[e.jsxs("div",{className:"bg-gradient-to-br from-[#00154a] via-[#001a5e] to-[#002472] px-8 py-6 text-white",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-bold uppercase tracking-[0.25em] text-[#C9A57B] mb-2",children:[e.jsx(ze,{className:"h-[1.1375rem] w-[1.1375rem]"}),n("hotelDetailsPage.roomAmenities",{defaultValue:"Room Amenities"})]}),e.jsx(Ae,{children:e.jsx(Re,{className:"font-display text-2xl text-white",children:Pe?.title??n("hotelDetailsPage.roomAmenities",{defaultValue:"Room Amenities"})})}),e.jsx("div",{className:"mt-3 h-px w-16 bg-[#C9A57B]"})]}),e.jsx("div",{className:"overflow-y-auto px-8 py-6 flex-1 bg-white",children:Pe&&Pe.items.length>0?e.jsx("ul",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:Pe.items.map(t=>e.jsxs("li",{className:"flex items-start gap-2.5 text-[13px] text-foreground/85",children:[e.jsx("span",{className:"mt-0.5 inline-flex h-6 w-6 items-center justify-center rounded-full bg-[#00154a]/5",children:Qt(t)}),e.jsx("span",{className:"leading-snug",children:t})]},t))}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No room amenities listed."})})]})})]})}function Qt(n,u="h-4 w-4 text-[#00154a]"){const o=n.toLowerCase();return o.includes("wifi")||o.includes("wireless")||o.includes("internet")?e.jsx(fa,{className:u}):o.includes("breakfast")?e.jsx(Yt,{className:u}
1):o.includes("restaurant")||o.includes("dining")?e.jsx(ba,{className:u}):o.includes("bar")||o.includes("lounge")?e.jsx(Na,{className:u}):o.includes("shuttle")||o.includes("airport")?e.jsx(ya,{className:u}):o.includes("meeting")||o.includes("conference")||o.includes("business")?e.jsx(ja,{className:u}):o.includes("parking")||o.includes("valet")?e.jsx(Pa,{className:u}):o.includes("pool")||o.includes("swim")?e.jsx(va,{className:u}):o.includes("hot tub")||o.includes("jacuzzi")||o.includes("spa")?e.jsx(ka,{className:u}):o.includes("fitness")||o.includes("gym")?e.jsx(wa,{className:u}):o.includes("non-smoking")||o.includes("smoking")?e.jsx(Ca,{className:u}):o.includes("pet")||o.includes("dog")?e.jsx(Ia,{className:u}):o.includes("ada")||o.includes("accessible")||o.includes("wheelchair")?e.jsx(Sa,{className:u}):o.includes("kids")||o.includes("family")||o.includes("children")?e.jsx(Ta,{className:u}):o.includes("laundry")||o.includes("washer")?e.jsx(Da,{className:u}):o.includes("ev ")||o.includes("charging")||o.includes("charger")?e.jsx(Aa,{className:u}):o.includes("air condition")||o.includes("ac ")||o.includes("air-condition")?e.jsx(Ra,{className:u}):o.includes("coffee")||o.includes("tea")?e.jsx(Yt,{className:u}):o.includes("group")||o.includes("event")?e.jsx(Ba,{className:u}):e.jsx(fe,{className:u})}function Wa({open:n,onClose:u,room:o,plan:g,nights:I,rooms:k,hotelPolicies:S,onSelect:v}){const{t:p}=Be();if(!g||!o)return null;const D=g.totalCash??g.cashPerNight*I*Math.max(1,k),F=g.isInsider?p("hotelRatePlans.rateDescriptions.insider",{code:g.code,tagline:p(`hotelRatePlans.taglines.${g.code}`,{defaultValue:g.tagline??""})}).trim():g.code==="WR"?p("hotelRatePlans.rateDescriptions.WR"):g.code==="WR2X"?p("hotelRatePlans.rateDescriptions.WR2X"):p("hotelRatePlans.rateDescriptions.BAR"),l=p("hotelRatePlans.cancellationRefundable"),E=g.isPostpaid?p("hotelRatePlans.paymentPostpaid"):p("hotelRatePlans.paymentPrepaid");return e.jsx(Te,{open:n,onOpenChange:r=>{r||u()},children:e.jsxs(De,{className:"max-w-xl",children:[e.jsx(Ae,{children:e.jsx(Re,{className:"font-display text-xl uppercase tracking-wider text-[#00154a]",children:p("hotelDetailsPage.additionalRateDetails")})}),e.jsxs("div",{className:"space-y-5 text-sm",children:[e.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-display text-base font-bold text-foreground",children:p(`hotelRatePlans.names.${g.code}`,{defaultValue:g.name})}),e.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:o.id==="insider"?p("hotelRatePlans.insiderRoom.name"):o.name})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"font-display text-2xl font-bold text-[#00154a] tabular-nums leading-none",children:le(g.cashPerNight)}),e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground mt-0.5",children:p("hotelDetailsPage.perNight")})]})]}),e.jsxs("div",{className:"mt-3 flex flex-col gap-1 text-xs text-muted-foreground border-t border-border/60 pt-2",children:[e.jsxs("div",{children:[e.jsx("strong",{className:"text-foreground",children:I})," night",I!==1?"s":""," ","× ",e.jsx("strong",{className:"text-foreground",children:k})," room",k!==1?"s":""]}),e.jsxs("div",{children:["Total for stay ",e.jsx("strong",{className:"text-[#00154a]",children:le(D)})]}),g.taxesIncluded&&e.jsx("div",{children:"Taxes & fees included"}),typeof g.qualPointsEarned=="number"&&g.qualPointsEarned>0&&e.jsxs("div",{children:["Earn"," ",e.jsx("strong",{className:"text-foreground",children:Ue(g.qualPointsEarned)})]})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-[#00154a] mb-1.5",children:p("hotelDetailsPage.rateDetails")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:F})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-[#00154a] mb-1.5",children:p("hotelDetailsPage.reservationPolicies")}),e.jsxs("div",{className:"space-y-2 text-muted-foreground leading-relaxed",children:[l?e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-foreground",children:p("hotelDetailsPage.cancellation")}),l]}):null,e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-foreground",children:p("hotelDetailsPage.payment")}),E]})]})]}),S&&S.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-[#00154a] mb-1.5",children:p("hotelDetailsPage.hotelPolicies")}),e.jsx("ul",{className:"space-y-1.5 text-muted-foreground leading-relaxed",children:S.slice(0,5).map(r=>e.jsxs("li",{children:[e.jsxs("span",{className:"font-semibold text-foreground",children:[r.title,": "]}),r.text]},r.title))})]}),e.jsx("div",{className:"flex justify-end pt-1",children:e.jsx(oe,{onClick:u,className:"font-bold uppercase tracking-wider bg-[#001
154a] hover:bg-[#00154a]/90 text-white",children:p("hotelDetailsPage.close")})})]})]})})}function Ha({open:n,onClose:u,room:o,plan:g,nights:I,rooms:k,adults:S,children:v,pkgActive:p,pkgFlightTotal:D,onSelect:F}){const{t:l}=Be();if(!g||!o)return null;const E=g.totalCash??g.cashPerNight*I*Math.max(1,k),r=.13,L=g.taxesIncluded?g.beforeTaxTotal??Math.ceil(E/(1+r)*100)/100:E,O=g.taxesIncluded?E-L:Math.ceil(E*r*100)/100,N=p&&D!=null&&D>0?D:0,Y=L+O+N,z=typeof g.qualPointsEarned=="number"?g.qualPointsEarned:0,se=l("hotelRatePlans.cancellationRefundableShort");return e.jsx(Te,{open:n,onOpenChange:ae=>{ae||u()},children:e.jsxs(De,{className:"max-w-xl",children:[e.jsx(Ae,{children:e.jsx(Re,{className:"font-display text-2xl text-foreground",children:l("hotelDetailsPage.totalForStayTitle")})}),e.jsxs("div",{className:"space-y-5 text-sm",children:[e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("div",{children:[S," Adult",S!==1?"s":"",", ",v," Child",v!==1?"ren":""," ","× ",I," Night",I!==1?"s":""]}),e.jsxs("div",{children:["For ",e.jsx("span",{className:"font-semibold text-foreground",children:le(Y)})]})]}),e.jsxs("div",{className:"border-y border-border divide-y divide-border",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 py-3 text-sm",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"font-bold text-foreground",children:l("hotelDetailsPage.checkInTime")}),e.jsx("div",{className:"font-bold text-foreground",children:l("hotelDetailsPage.checkOutTime")}),e.jsx("div",{className:"font-bold text-foreground",children:l("hotelDetailsPage.totalRooms")})]}),e.jsxs("div",{className:"space-y-1 text-[#00154a]",children:[e.jsx("div",{children:"3:00 PM"}),e.jsx("div",{children:"11:00 AM"}),e.jsx("div",{children:k})]})]}),e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsx("div",{className:"font-bold text-foreground",children:l("hotelDetailsPage.totalBeforeTaxes")}),e.jsxs("div",{className:"font-semibold text-foreground tabular-nums",children:[le(L)," ",e.jsxs("span",{className:"text-muted-foreground font-normal",children:["(",k," Room",k!==1?"s":"",")"]})]})]}),e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsx("div",{className:"font-bold text-foreground",children:l("hotelDetailsPage.totalTaxes")}),e.jsx("div",{className:"font-semibold text-foreground tabular-nums",children:le(O)})]}),N>0&&e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsx("div",{className:"font-bold text-foreground",children:l("hotelDetailsPage.flightCashLine",{defaultValue:"Flight (cash)"})}),e.jsx("div",{className:"font-semibold text-foreground tabular-nums",children:le(N)})]}),e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsx("div",{className:"font-bold text-foreground",children:l("hotelDetailsPage.totalBundlePrice")}),e.jsx("div",{className:"font-display font-bold text-[#00154a] text-lg tabular-nums",children:le(Y)})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"font-bold text-foreground mb-1",children:l("hotelDetailsPage.disclaimer")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed text-xs",children:"Except for any taxes that may apply only to certain guests (e.g., local guests) in certain countries, if Estimated Taxes and Fees for the room price show zero, then any taxes and fees are already included in the “Price Per Night,” and “Total Before Taxes and Fees” will be the same as “Total.” Additional charges may apply for local amenities such as rollaway beds, parking, safe warranties, telephone charges, and pets (if allowed). Cancellation policies for bundles/add-ons may differ from those applicable to your stay. Please check with the property for further information."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"font-bold text-foreground mb-1",children:l("hotelDetailsPage.reservationPolicies")}),se?e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:se}):null]}),z>0&&e.jsxs("div",{className:"rounded-lg bg-[#C9A57B]/10 border border-[#C9A57B]/30 px-3 py-2 text-xs text-foreground flex items-center gap-2",children:[e.jsx(ze,{className:"h-[1.3rem] w-[1.3rem] text-[#C9A57B] shrink-0"}),e.jsx(lt,{i18nKey:"hotelDetailsPage.membersEarn",values:{points:Ue(z)},components:{1:e.jsx("strong",{})}}),e.jsx("span",{className:"text-[#00154a] font-semibold underline cursor-pointer",children:l("hotelDetailsPage.signIn")}),e.jsx("span",{className:"text-muted-foreground",children:l("hotelDetailsPage.or")}),e.jsx("span",{className:"text-[#00154a] font-semibold underline cursor-pointer",children:l("hotelDetailsPage.joinNow")})]}),e.jsx("div",{className:"flex justify-end gap-2 pt-1",children:e.jsx(oe,{variant:"outline",onClick:u,className:"font-bold uppercase tracking-wider",children:l("hotelDetailsPage.close")})})]})]})})}function za({open:n,onClose:u,policies:o}){const{t:g}=Be(),I=v=>{const p=v.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_|_$/g,""),F={check_in:{key:"hotelPolicies.checkIn",fallback:"Check-in"},checkout:{key:"hotelPolicies.checkOut",fallback:"Checkout"},check_out:{key:"hotelPolicies.checkOut",fallback:"Checkout"},children_stay_free_policy:{key:"hotelPolicies.childrenStayFree",fallback:"Children Stay Free Policy"},children:{key:"hotelPolicies.children",fallback:"Children"},pet_policy:{key:"hotelPolicies.petPolicy",fallback:"Pet Policy"},smoking:{key:"hotelPolicies.smoking",fallback:"Smoking"},cancellation:{key:"hotelPolicies.cancellation",fallback:"Cancellation"},deposit:{key:"hotelPolicies.deposit",fallback:"Deposit"},payment:{key:"hotelPolicies.payment",fallback:"Payment"},parking:{key:"hotelPolicies.parking",fallback:"Parking"}}[p];return F?g(F.key,{defaultValue:F.fallback}):v},k=[{title:"Check-in",text:"3:00 PM"},{title:"Checkout",text:"11:00 AM"},{title:"Children Stay Free Policy",text:"Children 17 and under stay free."},{title:"Pet Policy",text:"Service Animals - ADA-defined service animals are welcome free of charge. / Pets Allowed - 2 pets max. Cats and dogs only. 75lbs or less per pet. / Fees - Non-refundable 25 USD nightly for up to 2 pets. Max 75 USD per stay. / Other Information - Contact hotel for additional details and availability."}],S=(()=>{const v=[...o??[]];for(const p of k)v.some(D=>D.title.toLowerCase()===p.title.toLowerCase())||v.push(p);return v})();return e.jsx(Te,{open:n,onOpenChange:v=>{v||u()},children:e.jsxs(De,{className:"max-w-xl",children:[e.jsx(Ae,{children:e.jsx(Re,{className:"font-display text-2xl text-foreground",children:g("hotelPolicies.title",{defaultValue:"Hotel Policies"})})}),e.jsx("div",{className:"space-y-5 text-sm border-t border-border pt-4",children:S.map(v=>e.jsxs("section",{children:[e.jsx("h3",{className:"font-bold uppercase tracking-wider text-foreground text-[13px] mb-1",children:I(v.title)}),e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-line",children:_a(v.text??"")})]}
1,v.title))})]})})}export{un as component};

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.