PageSourceSearch

https://hotelzify.com/static/js/6852.92fc17c6.chunk.js

js hotelzify.com collected 2026-10-01 15:36:13 UTC 12,557 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunklanding_page=self.webpackChunklanding_page||[]).push([[6852],{6852:(e,a,c)=>{c.r(a),c.d(a,{default:()=>oe});var n=c(9379),s=c(5043),r=c(8601),i=c(4117);const l="PackageCard_packageCard__FYU5P",t="PackageCard_packageTypeBadge__YCi--",o="PackageCard_packageTypeText__t-lqJ",d="PackageCard_savingsTag__VCBsB",_="PackageCard_cardContent__DWvjt",g="PackageCard_leftSection__l66pf",h="PackageCard_imageContainer__JpmCK",m="PackageCard_roomImage__mxeCs",u="PackageCard_imageOverlay__INpN1",v="PackageCard_moreRoomsIndicator__0Z3+X",p="PackageCard_roomDetails__fMcDC",k="PackageCard_packageTitle__Hdvi+",x="PackageCard_roomTypeSummary__53PYz",C="PackageCard_roomTypeItem__5dKV7",P="PackageCard_roomCount__f94vU",j="PackageCard_roomType__QByOz",f="PackageCard_guestInfo__q3P2u",N="PackageCard_guestItem__eNE-o",S="PackageCard_roomDistribution__lFBRc",y="PackageCard_distributionLabel__HhWMx",I="PackageCard_distributionList__0E6zR",b="PackageCard_distributionItem__CE4gL",w="PackageCard_distributionSummary__keMfg",E="PackageCard_rightSection__IOALp",A="PackageCard_priceContainer__rEhAl",B="PackageCard_comboLabel__iN7Vg",L="PackageCard_priceSection__TyZSZ",T="PackageCard_originalPrice__U0rK7",z="PackageCard_finalPrice__3owgj",R="PackageCard_priceBreakdown__1CHtI",M="PackageCard_pricePerRoom__C8SJD",D="PackageCard_benefits__E5hcz",O="PackageCard_benefitItem__RnqCG",G="PackageCard_selectButton__TlcAc",H="PackageCard_features__EHO2H",V="PackageCard_featureTag__TnbUR";var W=c(5346),F=c(579);const U=e=>{var a;let{packageData:c,onSelect:n,currency:r="INR"}=e;if(!c)return null;const{name:i,rooms:U,totalPrice:q,totalDiscount:J,color:K,type:X}=c;console.log("Rendering PackageCard with data:",c);const Y=e=>"INR"===r?"\u20b9".concat(Math.round(e).toLocaleString("en-IN")):"".concat(r," ").concat(Math.round(e).toLocaleString()),Z=(()=>
1{if(!U||!Array.isArray(U))return"";const e=U.reduce((e,a)=>{const c=(null===a||void 0===a?void 0:a.roomName)||"Standard Room";return e[c]||(e[c]=[]),e[c].push(a),e},{});return Object.entries(e).map(e=>{let[a,c]=e;return{type:a,count:c.length,rooms:c}})})(),Q=U&&Array.isArray(U)?U.reduce((e,a)=>({adults:e.adults+((null===a||void 0===a?void 0:a.adults)||0),children:e.children+((null===a||void 0===a?void 0:a.children)||0),infants:e.infants+((null===a||void 0===a?void 0:a.infants)||0)}),{adults:0,children:0,infants:0}):{adults:0,children:0,infants:0},$=(()=>{var e,a;if(!U||!Array.isArray(U)||0===U.length)return null;const c=U.find(e=>{var a;return(null===e||void 0===e||null===(a=e.roomImages)||void 0===a?void 0:a.length)>0});return null!==c&&void 0!==c&&null!==(e=c.roomImages)&&void 0!==e&&null!==(a=e[0])&&void 0!==a&&a.cdnImageUrl?"".concat(c.roomImages[0].cdnImageUrl,"?tr=w-280,h-180,q-80"):null})(),ee=q+J,ae=J>0?Math.round(J/ee*100):0;(0,s.useEffect)(()=>{(0,W.fireGtmEvent)("package_card_viewed",{package_name:i,package_type:X,total_price:q,total_discount:J,savings_percentage:ae,room_count:(null===U||void 0===U?void 0:U.length)||0,currency:r})},[i,X,q,J,ae,null===U||void 0===U?void 0:U.length,r]);return(0,F.jsxs)("div",{className:l,style:{"--package-color":K},children:[(0,F.jsxs)("div",{className:t,style:{backgroundColor:K},children:[(0,F.jsx)("span",{className:o,children:i}),ae>0&&(0,F.jsxs)("span",{className:d,children:[ae,"% OFF"]})]}),(0,F.jsxs)("div",{className:_,children:[(0,F.jsxs)("div",{className:g,children:[$&&(0,F.jsxs)("div",{className:h,children:[(0,F.jsx)("img",{src:$,alt:(null===(a=Z[0])||void 0===a?void 0:a.type)||"Room",className:m}),(null===U||void 0===U?void 0:U.length)>1&&(0,F.jsx)("div",{className:u,children:(0,F.jsxs)("span",{className:v,children:["+",U.length-1," more"]})})]}),(0,F.jsxs)("div",{className:p,children:[(0,F.jsx)("h3",{className:k,children:i}),(0,F.jsx)("div",{className:x,children:Z.map((e,a)=>(0,F.jsxs)("div",{className:C,children:[(0,F.jsxs)("span",{className:P,children:[e.count," x"]}),(0,F.jsx)("span",{className:j,children:e.type})]},a))}),(0,F.jsxs)("div",{className:f,children:[(0,F.jsxs)("div",{className:N,children:[(0,F.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:(0,F.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})}),(0,F.jsxs)("span",{children:[Q.adults," Adults"]})]}),Q.children>0&&(0,F.jsxs)("div",{className:N,children:[(0,F.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:(0,F.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})}),(0,F.jsxs)("span",{children:[Q.children," Children"]})]}),Q.infants>0&&(0,F.jsxs)("div",{className:N,children:[(0,F.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:(0,F.jsx)("path",{d:"M14 8.64C14 7.17 13.28 6 11.81 6S9.5 7.17 9.5 8.64c0 .83.39 1.61 1.04 2.12l-.52 3.2c-.1.55.29 1.04.85 1.04h1.88c.56 0 .95-.49.85-1.04l-.52-3.2c.65-.51 1.04-1.29 1.04-2.12z"})}),(0,F.jsxs)("span",{children:[Q.infants," Infants"]})]})]}),(0,F.jsxs)("div",{className:S,children:[(0,F.jsx)("span",{className:y,children:"Room Distribution:"}),(0,F.jsx)("div",{className:I,children:U&&U.length<=4?U.map((e,a)=>(0,F.jsxs)("span",{className:b,children:["Rm",a+1,": ",(null===e||void 0===e?void 0:e.adults)||0,"A",(null===e||void 0===e?void 0:e.children)>0&&"+".concat(e.children,"C"),(null===e||void 0===e?void 0:e.infants)>0&&"+".concat(e.infants,"I")]},a)):(0,F.jsxs)("span",{className:w,children:[U.length," rooms for ",Q.adults,"A",Q.children>0&&"+".concat(Q.children,"C"),Q.infants>0&&"+".concat(Q.infants,"I")]})})]})]})]}),(0,F.jsx)("div",{className:E,children:(0,F.jsxs)("div",{className:A,children:[(0,F.jsxs)("div",{className:B,children:[(0,F.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,F.jsx)("path",{d:"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"})}),(0,F.jsx)("span",{children:"Combo Price"})]}),(0,F.jsxs)("div",{className:L,children:[J>0&&(0,F.jsx)("div",{className:T,children:Y(ee)}),(0,F.jsx)("div",{className:z,children:Y(q)}),(0,F.jsx)("div",{className:R,children:(0,F.jsxs)("span",{className:M,children:[Y(q/((null===U||void 0===U?void 0:U.length)||1))," per room"]})})]}),J>0&&(0,F.jsx)("div",{className:D,children:(0,F.jsxs)("div",{className:O,children:[(0,F.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"green",children:(0,F.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),(0,F.jsxs)("span",{children:["Save ",Y(J)]})]})}),(0,F.jsx)("button",{className:G,onClick:()=>{(0,W.fireGtmEvent)("package_card_clicked",{package_name:i,package_type:X,total_price:q,total_discount:J,savings_percentage:ae,room_count:(null===U||void 0===U?void 0:U.length)||0,total_adults:Q.adults,total_children:Q.children,total_infants:Q.infants,currency:r}),n(c)},style:{backgroundColor:K},children:"Select Package"}),(0,F.jsxs)("div",{className:H,children:["budget"===X&&(0,F.jsx)("span",{className:V,children:"Best Value"}),"convenience"===X&&(0,F.jsx)("span",{className:V,children:"Most Popular"}),"luxury"===X&&(0,F.jsx)("span",{className:V,children:"Premium Choice"}),"smart-mix"===X&&(0,F.jsx)("span",{className:V,children:"Smart Mix"})]})]})})]})]})},q="PackageSection_packageSection__JhjXV",J="PackageSection_sectionHeader__1FuC6",K="PackageSection_headerContent__HCMGa",X="PackageSection_sectionTitle__ryGFx",Y="PackageSection_navigationDesktop__s72ie",Z="PackageSection_navButton__LyOaE",Q="PackageSection_disabled__ct7OS",$="PackageSection_packagesContainer__SdLW4",ee="PackageSection_packagesScroll__X4EBY",ae="PackageSection_packageWrapper__gI4qF",ce="PackageSection_infoBanner__Gccq1",ne="PackageSection_infoIcon__PtXAD",se="PackageSection_infoText__cpAe1",re="PackageSection_loadingContainer__swJpP",ie="PackageSection_loadingText__ccMp4";var le=c(9277),te=c(2457);const oe=e=>{let{packages:a,currency:c,onPackageSelect:l}=e;const{t:t}
1=(0,i.Bd)(),o=(0,r.wA)(),d=(0,s.useRef)(null),[_,g]=(0,s.useState)(!1),[h,m]=(0,s.useState)(!1),[u,v]=(0,s.useState)(!1),[p,k]=(0,s.useState)(a);(0,s.useEffect)(()=>{var e;console.log("[PackageSection] Packages prop updated, count:",null===a||void 0===a?void 0:a.length),k(null!==(e=null===a||void 0===a?void 0:a.filter(e=>e.totalPrice>0))&&void 0!==e?e:[])},[a]),(0,s.useEffect)(()=>{const e=()=>{if(d.current){const{scrollLeft:e,scrollWidth:a,clientWidth:c}=d.current;g(e>0),m(e<a-c-10)}};e();const a=d.current;return a&&(a.addEventListener("scroll",e),window.addEventListener("resize",e)),()=>{a&&a.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[p]);const x=async e=>{try{var a;if(v(!0),(0,W.fireGtmEvent)("package_select",{package_name:(null===e||void 0===e?void 0:e.name)||"unknown",package_type:(null===e||void 0===e?void 0:e.type)||"unknown",total_price:(null===e||void 0===e?void 0:e.totalPrice)||0,total_discount:(null===e||void 0===e?void 0:e.totalDiscount)||0,room_count:(null===e||void 0===e||null===(a=e.rooms)||void 0===a?void 0:a.length)||0,currency:c}),!e||!e.rooms||!Array.isArray(e.rooms))return void console.error("Invalid package data:",e);const s=[],r={};e.rooms.forEach(e=>{var a;const c="".concat(e.roomId,"_").concat(e.ratePlanCode||"standard","_").concat(e.ratePlan.id);r[c]||(r[c]=0);const i=r[c];r[c]++;let l={};try{l=e.ratePlan.ratePlanConfig?JSON.parse(e.ratePlan.ratePlanConfig):{}}catch(d){console.error("Error parsing rate plan config:",d)}const t=(0,n.A)((0,n.A)({},l),{},{id:e.ratePlan.id}),o={sAdult:e.adults||0,sChild:e.children||0,sInfant:e.infants||0,code:null===(a=e.ratePlan)||void 0===a?void 0:a.ratePlanCode,roomId:e.roomId,rpObject:t,id:c,idx:i,RoomImages:e.roomImages||[],roomName:e.roomName||"Room"};console.log("PackageSection: Creating selectedRatePlan:",{roomId:o.roomId,code:o.code,id:o.id,idx:o.idx,baseId:c,instanceIdx:i}),s.push(o)}),o({type:"SET_SELECTED_PACKAGE",payload:{package:e,selectedRatePlans:s}}),l&&await l(e,s)}catch(s){console.error("Error selecting package:",s),console.error("Stack trace:",s.stack),te.A.error("Failed to select package. Please try again.")}finally{v(!1)}le.i.AUTO_SELECT&&setTimeout(()=>{const e=document.getElementById("rooms-section");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},300)};return u?(0,F.jsx)("div",{className:q,children:(0,F.jsx)("div",{className:re,children:(0,F.jsx)("div",{className:ie,children:"Applying package selection..."})})}):p&&0!==p.length?(0,F.jsxs)("div",{className:q,children:[le.i.SHOW_SAVINGS&&p.some(e=>e.totalDiscount>0)&&(0,F.jsxs)("div",{className:ce,children:[(0,F.jsx)("svg",{className:ne,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,F.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),(0,F.jsx)("span",{className:se,children:t("package_info","Packages include special discounts and are optimized for your group size")})]}),(0,F.jsxs)("div",{className:J,children:[(0,F.jsx)("div",{className:K,children:(0,F.jsx)("h2",{className:X,children:t("recommended_packages","Recommended Packages")})}),p.length>2&&(0,F.jsxs)("div",{className:Y,children:[(0,F.jsx)("button",{className:"".concat(Z," ").concat(_?"":Q),onClick:()=>{d.current&&((0,W.fireGtmEvent)("package_section_scroll",{direction:"left",total_packages:(null===p||void 0===p?void 0:p.length)||0}),d.current.scrollBy({left:-340,behavior:"smooth"}))},disabled:!_,"aria-label":"Scroll left",children:(0,F.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:(0,F.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,F.jsx)("button",{className:"".concat(Z," ").concat(h?"":Q),onClick:()=>{d.current&&((0,W.fireGtmEvent)("package_section_scroll",{direction:"right",total_packages:(null===p||void 0===p?void 0:p.length)||0}),d.current.scrollBy({left:340,behavior:"smooth"}))},disabled:!h,"aria-label":"Scroll right",children:(0,F.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:(0,F.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]})]}),(0,F.jsx)("div",{className:$,children:(0,F.jsx)("div",{className:ee,ref:d,children:p.map((e,a)=>(0,F.jsx)("div",{className:ae,children:(0,F.jsx)(U,{packageData:e,currency:c,onSelect:x})},"".concat(e.type,"-").concat(a)))})})]}):null}}}]);
2//# sourceMappingURL=6852.92fc17c6.chunk.js.map

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.