PageSourceSearch

https://www.hopnepal.com/_next/static/chunks/pages/hotels/[slug]/book-now-49f5f4db2b2ab177.js

js hopnepal.com collected 2026-10-02 19:16:09 UTC 14,538 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[692],{79458:function(e,s,c){"use strict";c.r(s),c.d(s,{__N_SSP:function(){return D},default:function(){return S}});var t=c(59499),a=c(67294),o=c(11163),n=c(36752),r=c(97169),l=c(77843),i=c(22929),u=c(10808),d=c(30381),h=c.n(d),m=c(87301),_=c(12424),k=c(64726),p=c(19207),j=c(85893);function f(e,s){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);s&&(t=t.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),c.push.apply(c,t)}return c}function x(e){for(var s=1;s<arguments.length;s++){var c=null!=arguments[s]?arguments[s]:{};s%2?f(Object(c),!0).forEach((function(s){(0,t.Z)(e,s,c[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):f(Object(c)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(c,s))}))}return e}var v=function(e){var s,c=e.details,t=e.registerDate,o=e.guestInfo,n=e.setBookingDetail,r=e.roomId,l=(0,p.VT)(),d=l.selectedCurrency,f=l.currencyConverter,v=c.base_price;if(c.rooms&&r){var N,y=null===c||void 0===c||null===(N=c.rooms)||void 0===N?void 0:N.filter((function(e){return e.id==r}));y.length>0&&(v=y[0].price)}var g=(0,a.useState)(1),b=g[0],O=g[1],w=(0,_._)(c.images),D=new Date,S=new Date(D);S.setDate(S.getDate()+1);var P=t||null,I=P.checkIn,C=P.checkOut,E=(0,a.useState)(1),Z=E[0],V=E[1],B=(0,a.useState)(!1),T=B[0],A=B[1],F=(0,a.useState)(!1),J=F[0],L=F[1],H=(0,a.useState)(!1),R=H[0],q=H[1],M=(0,a.useState)({checkIn:I,checkOut:C}),X=M[0],G=M[1],Q=(0,a.useState)(x({},o)),U=Q[0],z=Q[1],K="".concat(Z," guest").concat(1===Z?"":"s"," for ").concat(U.rooms," room").concat(1===U.rooms?"":"s"),W="".concat(U.rooms," room").concat(1===U.rooms?"":"s"," / ").concat(1===Z?"1 guest":"".concat(Z," guests"));(0,a.useEffect)((function(){var e=h()(X.checkIn),s=h()(X.checkOut).diff(e,"days");O(s)}),[X]),(0,a.useEffect)((function(){n(x({checkIn:h()(X.checkIn).format(),checkOut:h()(X.checkOut).format()},U))}),[X,U]),(0,a.useEffect)((function(){var e=U.adult+U.children;V(e)}),[U]),(0,a.useEffect)((function(){if(I&&C){var e=h()(I),s=h()(C);L(!(e.isValid()&&s.isValid()&&s.isAfter(e,"day")))}else L(!1);G({checkIn:I||D,checkOut:C||S})}),[I,C]);var Y=(0,j.jsxs)("div",{className:"checkout-guest-dropdown",children:[(0,j.jsxs)("div",{className:"checkout-guest-dropdown__row",children:[(0,j.jsx)("span",{className:"checkout-guest-dropdown__label",children:"Adults"}),(0,j.jsxs)("div",{className:"checkout-guest-dropdown__controls",children:[(0,j.jsx)("button",{type:"button",className:"checkout-guest-dropdown__icon",onClick:function(){U.adult>1&&z(x(x({},U),{},{adult:U.adult-1}))},children:(0,j.jsx)("i",{className:"fas fa-minus"})}),(0,j.jsx)("span",{className:"checkout-guest-dropdown__count",children:U.adult}),(0,j.jsx)("button",{type:"button",className:"checkout-guest-dropdown__icon",onClick:function(){U.adult>-1&&z(x(x({},U),{},{adult:U.adult+1}))},children:(0,j.jsx)("i",{className:"fas fa-plus"})})]})]}),(0,j.jsxs)("div",{className:"checkout-guest-dropdown__row",children:[(0,j.jsx)("span",{className:"checkout-guest-dropdown__label",children:"Children"}),(0,j.jsxs)("div",{className:"checkout-guest-dropdown__controls",children:[(0,j.jsx)("button",{type:"button",className:"checkout-guest-dropdown__icon",onClick:function(){U.children>0&&z(x(x({},U),{},{children:U.children-1}))},children:(0,j.jsx)("i",{className:"fas fa-minus"})}),(0,j.jsx)("span",{className:"checkout-guest-dropdown__count",children:U.children}),(0,j.jsx)("button",{type:"button",className:"checkout-guest-dropdown__icon",onClick:function(){U.children>-1&&z(x(x({},U),{},{children:U.children+1}))},children:(0,j.jsx)("i",{className:"fas fa-plus"})})]})]}),(0,j.jsxs)("div",{className:"checkout-guest-dropdown__row",children:[(0,j.jsx)("span",{className:"checkout-guest-dropdown__label",children:"Rooms"}),(0,j.jsxs)("div",{className:"checkout-guest-dropdown__controls",children:[(0,j.jsx)("button",{type:"button",className:"checkout-guest-dropdown__icon",onClick:function(){U.rooms>1&&z(x(x({},U),{},{rooms:U.rooms-1}))},children:(0,j.jsx)("i",{className:"fas fa-minus"})}),(0,j.jsx)("span",{className:"checkout-guest-dropdown__count",children:U.rooms}),(0,j.jsx)("button",{type:"button",className:"checkout-guest-dropdown__icon",onClick:function(){U.rooms>-1&&z(x(x({},U),{},{rooms:U.rooms+1}))},children:(0,j.jsx)("i",{className:"fas fa-plus"})})]})]})]});return(0,j.jsxs)("div",{className:"col-span-3 checkout-summary",children:[(0,j.jsxs)("div",{className:"checkout-summary__card checkout-summary__property",children:[(0,j.jsx)("figure",{className:"checkout-summary__image",children:null!=c.images&&(0,j.jsx)("img",{className:"checkout-summary__photo",src:w.url,alt:w.alt})}),(0,j.jsxs)("div",{className:"checkout-summary__body",children:[(0,j.jsx)("span",{className:"checkout-summary__tag",children:"Hotel"}),(0,j.jsx)("h2",{className:"checkout-summary__title",children:c.name}),(0,j.jsx)(m.Z,{rating:c.rating}),(0,j.jsx)("a",{href:"/hotels/".concat(c.slug),className:"checkout-summary__link",children:null===c||void 0===c||null===(s=c.meta_tag)||void 0===s?void 0:s.title})]})]}),(0,j.jsx)("div",{className:"checkout-summary__card",children:(0,j.jsxs)("div",{className:"checkout-summary__body",children:[(0,j.jsxs)("div",{className:"checkout-summary__header",children:[(0,j.jsx)("h3",{className:"checkout-summary__title",children:"Stay 
1snapshot"}),(0,j.jsxs)("span",{className:"checkout-summary__pill",children:[b," nights"]})]}),(0,j.jsxs)("div",{className:"checkout-summary__section",children:[(0,j.jsx)("span",{className:"checkout-summary__label",children:"Check-in"}),(0,j.jsx)("div",{className:"checkout-summary__value",children:T?(0,j.jsx)("div",{className:"checkout-summary__date-picker",children:(0,j.jsx)(i.Z,{className:"checkout-summary__datepicker",onChange:function(e){G(x(x({},X),{},{checkIn:e}))},placeholder:"Check In",defaultValue:h()(null===X||void 0===X?void 0:X.checkIn),disabledDate:function(e){return e.isBefore(h()().subtract(1,"day"))}})}):"".concat(h()(null===X||void 0===X?void 0:X.checkIn).format("dddd, LL")," from 2:00 PM")})]}),(0,j.jsxs)("div",{className:"checkout-summary__section",children:[(0,j.jsx)("span",{className:"checkout-summary__label",children:"Check-out"}),(0,j.jsx)("div",{className:"checkout-summary__value",children:T?(0,j.jsx)("div",{className:"checkout-summary__date-picker",children:(0,j.jsx)(i.Z,{className:"checkout-summary__datepicker",onChange:function(e){G(x(x({},X),{},{checkOut:e}))},placeholder:"Check Out",defaultValue:h()(null===X||void 0===X?void 0:X.checkOut),disabledDate:function(e){return e.isBefore(h()())}})}):"".concat(h()(null===X||void 0===X?void 0:X.checkOut).format("dddd, LL")," until 1:00 PM")})]}),J&&(0,j.jsx)("p",{className:"checkout-summary__error",children:"Invalid Date Selected."}),(0,j.jsxs)("button",{type:"button",className:"checkout-link-button",onClick:function(e){return function(e){e.preventDefault();var s=h()(X.checkIn),c=h()(X.checkOut),t=s.isValid()&&c.isValid()&&c.isAfter(s,"day");L(!t),t&&A(!T)}(e)},children:[(0,j.jsx)("i",{className:"fas fa-pencil-alt"})," ",T?"Done":"Edit dates"]}),(0,j.jsx)("div",{className:"checkout-summary__divider"}),(0,j.jsxs)("div",{className:"checkout-summary__section",children:[(0,j.jsx)("span",{className:"checkout-summary__label",children:"Guests"}),(0,j.jsx)("div",{className:"checkout-summary__value",children:R?(0,j.jsx)(u.Z,{content:Y,placement:"bottom",trigger:"click",arrowContent:!0,children:(0,j.jsxs)("button",{type:"button",className:"checkout-guest-button checkout-guest-button--outline",children:[(0,j.jsx)("span",{className:"checkout-guest-button__value",children:W}),(0,j.jsx)("i",{className:"fas fa-chevron-down"})]})}):K}),(0,j.jsxs)("button",{type:"button",className:"checkout-link-button",onClick:function(e){return function(e){e.preventDefault(),q(!R)}(e)},children:[(0,j.jsx)("i",{className:"fas fa-pencil-alt"})," ",R?"Done":"Edit guests"]})]})]})}),(0,j.jsx)("div",{className:"checkout-summary__card",children:(0,j.jsxs)("div",{className:"checkout-summary__body",children:[(0,j.jsx)("div",{className:"checkout-summary__header",children:(0,j.jsx)("h3",{className:"checkout-summary__title",children:"Price breakdown"})}),(0,j.jsxs)("div",{className:"checkout-summary__list",children:[(0,j.jsxs)("div",{className:"checkout-summary__row",children:[(0,j.jsx)("span",{children:"Price per room"}),(0,j.jsxs)("span",{children:[d," ",f(v)]})]}),(0,j.jsxs)("div",{className:"checkout-summary__row",children:[(0,j.jsx)("span",{children:"Rooms"}),(0,j.jsx)("span",{children:U.rooms})]}),(0,j.jsxs)("div",{className:"checkout-summary__row",children:[(0,j.jsx)("span",{children:"Nights"}),(0,j.jsx)("span",{children:b})]})]}),(0,j.jsx)("div",{className:"checkout-summary__divider"}),(0,j.jsxs)("div",{className:"checkout-summary__row",children:[(0,j.jsx)("span",{children:"Discount"}),(0,j.jsxs)("span",{children:[d," 0"]})]}),(0,j.jsxs)("div",{className:"checkout-summary__total",children:[(0,j.jsx)("span",{children:"Total"}),(0,j.jsxs)("span",{children:[d," ",function(e){var s=f(e),c="number"===typeof s?s:Number(String(s||"").replace(/,/g,""));return Number.isFinite(c)?c.toFixed(2):s}(v*U.rooms*b)]})]})]})}),(0,j.jsx)("div",{className:"checkout-summary__note",children:(0,j.jsx)(k.Z,{})})]})},N=c(69640),y=c(15987),g=c(31782),b=c(64317);function O(e,s){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);s&&(t=t.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),c.push.apply(c,t)}return c}function w(e){for(var s=1;s<arguments.length;s++){var c=null!=arguments[s]?arguments[s]:{};
1s%2?O(Object(c),!0).forEach((function(s){(0,t.Z)(e,s,c[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):O(Object(c)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(c,s))}))}return e}var D=!0,S=function(e){var s,c,t,i,u,d=e.initialSlug,h=void 0===d?"":d,m=((0,o.useRouter)()||{}).query,_=(void 0===m?{}:m)||{},k=_.slug,p=void 0===k?"":k,f=_.bookDate,x=_.roomData,O=_.roomId,D=p||h,S=(0,a.useState)({}),P=S[0],I=S[1],C=f&&(null===(s=JSON.parse(f))||void 0===s?void 0:s.checkIn)||null,E=f&&(null===(c=JSON.parse(f))||void 0===c?void 0:c.checkOut)||null,Z=x&&(null===(t=JSON.parse(x))||void 0===t?void 0:t.adult)||1,V=x&&(null===(i=JSON.parse(x))||void 0===i?void 0:i.children)||0,B=x&&(null===(u=JSON.parse(x))||void 0===u?void 0:u.rooms)||1,T=(0,a.useState)({checkIn:C||null,checkOut:E||null}),A=T[0],F=T[1],J=(0,a.useState)({adult:Z||1,children:V||0,rooms:B||1}),L=J[0],H=J[1],R=(0,a.useState)({checkIn:null,checkOut:null,adult:null,children:null,rooms:null}),q=R[0],M=R[1],X=(null===P||void 0===P?void 0:P.slug)||D,G=X?"hotels/".concat(X):"";(0,a.useEffect)((function(){D&&(0,n.bQ)(D).then((function(e){return I(e.data.data)})),F(w(w({},A),{},{checkIn:C,checkOut:E})),H(w(w({},L),{},{adult:Z,children:V,rooms:B}))}),[C,E,Z,V,B,D]);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{title:"HopNepal | Booking ".concat(null===P||void 0===P?void 0:P.name),canonical:G}),(0,j.jsx)("div",{className:"checkout-page",children:(0,j.jsxs)("div",{className:"container mx-auto px-3 py-4 xl:min-h-screen checkout-page__container",children:[(0,j.jsx)(N.Z,{type:"Hotel",name:null===P||void 0===P?void 0:P.name}),(0,j.jsx)("section",{className:"checkout-hero",children:(0,j.jsxs)("div",{className:"checkout-hero__card",children:[(0,j.jsxs)("div",{className:"checkout-hero__main",children:[(0,j.jsx)("span",{className:"checkout-hero__eyebrow",children:"Hotel booking"}),(0,j.jsx)("h1",{className:"checkout-hero__title",children:null!==P&&void 0!==P&&P.name?"Book your stay at ".concat(P.name):"Book your stay"}),(0,j.jsx)("p",{className:"checkout-hero__subtitle",children:"A refined booking flow designed for comfort, clarity, and confidence."}),(0,j.jsxs)("div",{className:"checkout-hero__badges",children:[(0,j.jsxs)("span",{className:"checkout-hero__badge",children:[(0,j.jsx)("i",{className:"fas fa-hotel"})," Verified stays"]}),(0,j.jsxs)("span",{className:"checkout-hero__badge",children:[(0,j.jsx)("i",{className:"fas fa-headset"})," Local support"]}),(0,j.jsxs)("span",{className:"checkout-hero__badge",children:[(0,j.jsx)("i",{className:"fas fa-shield-alt"})," Secure checkout"]})]})]}),(0,j.jsxs)("aside",{className:"checkout-hero__assist",children:[(0,j.jsx)("span",{className:"checkout-hero__assist-tag",children:"Need assistance?"}),(0,j.jsx)("h3",{className:"checkout-hero__assist-title",children:"Talk to a travel specialist"}),(0,j.jsxs)("div",{className:"checkout-hero__assist-list",children:[(0,j.jsxs)("a",{href:"tel:+977-15915380",children:[(0,j.jsx)("i",{className:"fas fa-phone-alt"})," +977-15915380"]}),(0,j.jsxs)("a",{href:"tel:+61291718861",children:[(0,j.jsx)("i",{className:"fas fa-phone-alt"})," (+061) 02 91718861 (AU)"]}),(0,j.jsxs)("a",{href:"https://wa.me/9779812193787",target:"_blank",rel:"noopener noreferrer",children:[(0,j.jsx)("i",{className:"fab fa-whatsapp"})," +977-9812193787"]}),(0,j.jsxs)("a",{href:"mailto:[email protected]",children:[(0,j.jsx)("i",{className:"fas fa-envelope"})," [email protected]"]})]}),(0,j.jsx)("p",{className:"checkout-hero__assist-note",children:"Response time under 30 minutes during business hours."})]})]})}),(0,j.jsx)(g.Z,{selectCircle:(0,r.Pc)()?2:1,variant:"checkout"}),(0,j.jsxs)("div",{className:"checkout-layout lg:grid grid-cols-12 gap-6",children:[(0,r.Pc)()?(0,j.jsx)(l.Z,{roomId:O,details:P,serviceType:"hotel",bookingDetail:q}):(0,j.jsx)(j.Fragment,{children:P&&(0,j.jsx)(y.Z,{queryString:function(){var e="?service=hotels&slug=".concat(D,"&bookDate=").concat(f,"&roomData=").concat(x);return O&&(e+="&roomId=".concat(O)),e}(),service:"hotel",checkInDate:C,checkOutDate:E,adult:Z,childrens:V,rooms:B,basePrice:null===P||void 0===P?void 0:P.base_price,details:P,modifySearch:function(e){var s=e.checkin,c=e.checkout,t=e.adult,a=e.children,o=e.rooms;F(w(w({},A),{},{checkIn:s,checkOut:c})),H(w(w({},L),{},{adult:t,children:a,rooms:o}))},variant:"checkout"})}),P&&P.images?(0,j.jsx)(v,{details:P,registerDate:A,guestInfo:L,roomId:O,setBookingDetail:M}):(0,j.jsx)(j.Fragment,{})]})]})})]})}},29967:function(e,s,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/hotels/[slug]/book-now",function(){return c(79458)}])}},function(e){e.O(0,[4885,3714,1036,4908,1577,4233,2074,752,2372,5804,7352,9026,9774,2888,179],(function(){return s=29967,e(e.s=s);var s}));var s=e.O();_N_E=s}]);

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.