1(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[6],{Y0NT:function(e,t,a){"use strict";a.r(t);var n=a("q1tI"),r=a.n(n),o=a("KQm4"),i=a("/MKj"),c=a("nOHt"),u=a.n(c),d=a("S9gF"),s=a("R/iB"),l=a("HYuQ"),p=a("20ht"),v=a("wyBh"),y=r.a.createElement,b=function(e){var t=e.cardKey,a=e.imgSrc,n=e.title,r=e.content,o=e.redirectionUrl;return y("a",{href:o,className:"option-card light-border col-xs-margin-5",key:t,"data-test-id":"error-option-".concat(t)},y("img",{src:a,alt:n}),y("div",{className:"indent-15-all-sides"},y("p",{className:"option-title plain-text-btn invert-decoration gotham-xn-book"},n),y("p",{className:"option-text"},r)))},f=Object(i.b)((function(e){return e}))((function(){var e,t,a,n,r,i,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},f=c.admin,m=Object(l.b)(u.a.router),E=m.ubeId,g=E||(null===f||void 0===f||null===(e=f.data)||void 0===e||null===(t=e.ube)||void 0===t?void 0:t.id),O=Object(s.c)(g),h=!!O,S=null===f||void 0===f||null===(a=f.data)||void 0===a||null===(n=a.ube)||void 0===n||null===(r=n.bookingLocation)||void 0===r?void 0:r.uiCode,C="2"===S?"Personal Cruise Specialist":"4"===S?"Cruise Holiday Planner":"Cruise Vacation Planner",T=[].concat(Object(o.a)(h?[{imgSrc:"".concat(p.c,"/").concat(v.C,"images/global/book/error/recently-viewed-card-640.jpg"),title:"Recently Viewed Cruises",content:"See the latest Princess cruises that you have viewed.",redirectionUrl:"/cruise-search/recently-viewed/?recentlyViewed=true",key:"recent"}]:[]),[{imgSrc:"".concat(p.c,"/").concat(v.C,"images/global/book/error/find-cruises-card-640.jpg"),title:"Find Cruises",content:"Search the destinations you are interested in travelling.",redirectionUrl:"/cruise-search",key:"find"},{imgSrc:"".concat(p.c,"/").concat(v.C,"images/global/book/error/contact-specialist-card-640.jpg"),title:"Contact a Princess Specialist",content:"You've picked the place. Need help with the details? Talk to a Princess ".concat(C,"."),redirectionUrl:"".concat(p.c,"/captaincircle/cruiseVacationPlanner.page"),key:"specialist"}]);return y("div",{className:"error-container"},y("div",{className:"container"},y("div",{className:"align-center col-xs-pad-15"},y("h1",{className:"gotham-xn-medium font-size-p20"},"We Apologize for the Inconvenience"),y("p",{className:"red"},"We were not able to continue to the next step. Please try again or revisit us later this evening.")),y("div",{className:"d-flex option-cards"},T.map((function(e){return y(b,{key:e.key,cardKey:e.key,imgSrc:e.imgSrc,title:e.title,content:e.content,redirectionUrl:e.redirectionUrl})}))),y("div",{className:"align-center col-xs-pad-25-top"},y("span",{className:"gotham-xn-book follow-us-text"},"Follow Us:"),y("a",{href:"https://www.facebook.com/PrincessCruises",target:"_blank",rel:"noreferrer","aria-label":"Share Facebook. Opens in new tab.","data-test-id":"error-social-facebook"},y("svg",{className:"svg-icon social-icon","aria-hidden":"true"},y("use",{href:"#icon-facebook","data-test-id":"error-social-facebook-icon"}))),y("a",{href:"https://x.com/PrincessCruises",target:"_blank",rel:"noreferrer","aria-label":"Share X. Opens in new tab.","data-test-id":"error-social-x"},y("svg",{className:"svg-icon social-icon fill: #fff !important",style:{fill:"#c31d1d !important"},"aria-hidden":"true"},y("use",{href:"#icon-x","data-test-id":"error-social-x-icon"}))),y("a",{href:"https://www.youtube.com/princesscruises",target:"_blank",rel:"noreferrer","aria-label":"Share Youtube. Opens in new tab.","data-test-id":"error-social-youtube"},y("svg",{className:"svg-icon social-icon","aria-hidden":"true"},y("use",{href:"#icon-youtube","data-test-id":"error-social-youtube-icon"}))),y("a",{href:"https://instagram.com/princesscruises",target:"_blank",rel:"noreferrer","aria-label":"Share Instagram. Opens in new tab.","data-test-id":"error-social-instagram"},y("svg",{className:"svg-icon social-icon","aria-hidden":"true"},y("use",{href:"#icon-instagram","data-test-id":"error-social-instagram-icon"})))),y("div",{className:"align-center col-xs-pad-15-top"},"Session ID: ",null===(i=Object(d.d)())||void 0===i?void 0:i.sessionId)))}
1)),m=r.a.createElement;t.default=function(e){return m(f,e)}},aD8Y:function(e,t,a){"use strict";a.d(t,"t",(function(){return g})),a.d(t,"c",(function(){return O})),a.d(t,"u",(function(){return h})),a.d(t,"d",(function(){return S})),a.d(t,"q",(function(){return C})),a.d(t,"v",(function(){return T})),a.d(t,"w",(function(){return P})),a.d(t,"b",(function(){return D})),a.d(t,"f",(function(){return A})),a.d(t,"i",(function(){return I})),a.d(t,"h",(function(){return _})),a.d(t,"p",(function(){return R})),a.d(t,"g",(function(){return N})),a.d(t,"l",(function(){return L})),a.d(t,"a",(function(){return w})),a.d(t,"n",(function(){return x})),a.d(t,"o",(function(){return M})),a.d(t,"e",(function(){return F})),a.d(t,"r",(function(){return U})),a.d(t,"s",(function(){return B})),a.d(t,"k",(function(){return G})),a.d(t,"j",(function(){return H})),a.d(t,"m",(function(){return Y}));var n=a("KQm4"),r=a("o0o1"),o=a.n(r),i=a("rePB"),c=a("HaE+"),u=a("zuR4"),d=a("lf3Y"),s=a("20ht"),l=a("00EI"),p=a("Sd6l"),v=a("Nfny"),y=a("HYuQ"),b=a("S9gF"),f=a("wyBh");function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function E(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(Object(a),!0).forEach((function(t){Object(i.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var g=function(e){return function(t){return t({type:"SET_CARD",payload:{card:e}})}},O=function(e){return function(t){return t({type:"ADD_CARD",payload:{card:e}})}},h=function(e){return function(t){return t({type:"SET_CURRENT_CARD_INDEX",payload:e})}},S=function(e,t){return function(a){return a({type:"EDIT_CARD",payload:{card:e,cardIndex:t}})}},C=function(e){return function(t){return t({type:"REMOVE_CARD",payload:{cardIndex:e}})}},T=function(e){var t=e.paymentAmountType,a=e.totalAmountToBePaid;return function(e){return e({type:"SET_PAYMENT_AMOUNT_TYPE",payload:{paymentAmountType:t,totalAmountToBePaid:a}})}},P=function(e){var t=e.paymentAmountType,a=e.totalAmountToBePaid;return function(e){return e({type:"SET_PAYMENT_AMOUNT_TYPE_OLD",payload:{paymentAmountType:t,totalAmountToBePaid:a}})}},D=function(e){return function(t){return t({type:"ADD_ADDRESS",payload:e})}},A=function(e,t,a){return function(){var n=Object(c.a)(o.a.mark((function n(r){var i,c,v,b,f;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i="".concat(s.b,"/pbmf/").concat(Object(p.N)(),"/mc-gateway-mid?cruiseType=").concat(a,"¤cy=").concat(t,"&voyageId=").concat(e),c=Object(y.b)(),v=c.ubeId,b=E({},v&&{ubeId:v}),n.prev=3,n.next=6,u.a.get(i,{params:b,headers:l.b,withCredentials:!0});case 6:return f=n.sent,n.abrupt("return",r({type:"SET_MC_GATEWAY_DATA",payload:E(E({},f.data["mc-gateway-mid"]),{},{mcTransId:void 0})}));case 10:return n.prev=10,n.t0=n.catch(3),n.abrupt("return",r(Object(d.a)(n.t0,"ERROR.FETCHING.MC-GATEWAY-MID")));case 13:case"end":return n.stop()}}),n,null,[[3,10]])})));return function(e){return n.apply(this,arguments)}}()},j=function(e,t,a){return function(n){return n({type:"SET_BOOKING_NUMBER_AND_POLAR_SYNC_ID",payload:{polarSyncId:t,bookingNumber:e,authToken:a}})}},I=function(){return function(e,t){var a,n,r,o,i,c=t().payment,u=c.cards,d=c.payPalResponse,v=c.isPayPal,y=c.totalAmountToBePaid,b=null===(a=t().admin)||void 0===a||null===(n=a.data)||void 0===n||null===(r=n.ube)||void 0===r||null===(o=r.settings)||void 0===o||null===(i=o.features)||void 0===i?void 0:i.offer3Ds,f="".concat(s.b,"/pbmf/").concat(Object(p.N)(),"/pay"),m=null;if(v){var E=d.payPalNonce,g=d.payPalFirstName;m={payments:[{paymentAmount:y,payPal:{payPalNonce:E},creditCard:{type:"Paypal",owner:{lastName:d.payPalLastName,firstName:g,address:d.payPalAddress}}}]}}else m={payments:b?u.slice(0,1):u};return{payAPIUrl:f,payload:m,headers:l.b}}},_=function(){return function(e,t){var a,n,r,o,i=t().payment,c=i.totalAmountToBePaid,u=i.flexpayTokenData,d=i.gatewayMid,v=i.apiVersion,y=(null===(a=t().admin)||void 0===a||null===(n=a.data)||void 0===n||null===(r=n.ube)||void 0===r||null===(o=r.bookingLocation)||void 0===o?void 0:o.primaryCurrency)||"USD";return{payAPIUrl:"".concat(s.b,"/pbmf/").concat(Object(p.N)(),"/pay"),payload:{payments:[{paymentAmount:c,billingCurrency:y,masterCard:{mcSessionID:u.ccNumber,mcBrand:u.mcBrand,mcMethod:u.mcMethod,mcMaskedCC:u.mcMaskedNumber,mcGatewayMID:d,mcApiVersion:v,mcTransId:Date.now()},creditCard:{owner:{firstName:u.firstName,lastName:u.lastName,address:{address1:u.address1,city:u.cityCode,state:u.stateCode,zip:u.zipCode,country:u.countryCode}}}}]},headers:l.b}}},R=function(e,t,a){return function(){var n=Object(c.a)(o.a.mark((function n(r){var i,c,d,s,l,p,b,f;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.payAPIUrl,c=e.headers,d=e.payload,s=E(E({},c),{},{AppId:JSON.stringify(E(E({},JSON.parse(c.AppId)),{},{bookNum:a}))}),l=Object(y.b)(),p=l.ubeId,b=E({},p&&{ubeId:p}),d.polarSyncId=t,n.prev=5,n.next=8,u.a.post(i,d,{params:b,headers:s,withCredentials:!0});case 8:return f=n.sent,n.abrupt("return",r({type:"SET_PAYMENT_RESPONSE",payload:f.data}));case 12:n.prev=12,n.t0=n.catch(5),r({type:"SET_IS_PAY_API_FAILED",payload:!0}),v.b.error(n.t0,"ERROR.FETCHING.PAY");case 16:case"end":return n.stop()}}),n,null,[[5,12]])})));return function(e){return n.apply(this,arguments)}}()},N=function(){return function(e,t){var a,n,r,o,i,c,u,d,v,y,b=t(),m=b.admin,g=b.guestInformation,O=b.stateroomLocation,h=b.selectedCruise,S=b.payment,C=b.itemizedPricing,T=b.filters,P=b.insuranceTransferOptions,D=b.ships,A=b.abTesting,j=O.selectedRoom,I=g.guestData,_="T"===l.a.id,R=null===m||void 0===m||null===(a=m.data)||void 0===a?void 0:a.ube,N=(null===R||void 0===R||null===(n=R.guest)||void 0===n?void 0:n.contact)||{},L=N.gatewayCity,w=N.address,k=null===w||void 0===w?void 0:w.country,x=null===R||void 0===R||null===(r=R.bookingLocation)||void 0===r?void 0:r.primaryCurrency,M=C.totalFare,F=null===j||void 0===j?void 0:j.isGuarantee,U=null===j||void 0===j?void 0:j.id,B=null===j||void 0===j?void 0:j.zone,G=null===j||void 0===j?void 0:j.deckGroup,H=null===j||void 0===j?void 0:j.selectedBestCategory,Y=null===j||void 0===j?void 0:j.requestedCategory,K=h.id,V=h.startDate,q=null===(o=h.currentCruise)||void 0===o?void 0:o.endDate,W=j.promo.id,z=h.guestCount,Q=h.displayCouponCodeAB,J=h.isRefundableSelected,X=h.refundableCouponCode,Z=h.cancellationAssurance,$=j.couponCode,ee=T.coupon,te=(null===R||void 0===R||null===(i=R.settings)||void 0===i||null===(c=i.features)||void 0===c?void 0:c.autoAppliedCouponCode)||ee||Q,ae=null===(u=h.manualCouponCode)||void 0===u?void 0:u.code,ne=(A||{}).stateroomSummary,re=(ne=void 0===ne?{}:ne).assuranceConfig,oe=(null===h||void 0===h?void 0:h.isCancellationAssuranceSelected)?Z:{code:"",price:0,standardVacationProtectionPrice:0,standardVacationProtectionSelections:0},ie=(null===h||void 0===h?void 0:h.currentCruise).voyage.ship.id,ce={currency:x,cabinTypeId:"".concat(null===h||void 0===h?void 0:h.subMetaName," (").concat(H,")"),shipId:(null===D||void 0===D||null===(d=D.data)||void 0===d||null===(v=d.findBy)||void 0===v||null===(y=v.call(d,"id",ie))||void 0===y?void 0:y.id)||"",couponCode:Object(p.X)(J&&X||$||te||ee,ae),totalPrice:M,product:{selectedCruise:{id:null===K||void 0===K?void 0:K.split("-")[0],startDate:V,endDate:q,cabin:{number:F?"GUAR":U,zone:B,deckGroup:G,category:{code:H,requestedCategory:Y},bedConfiguration:h.bedConfiguration}},tour:_?{code:null===K||void 0===K?void 0:K.split("-")[1],startDate:V}:{}},passengers:Array.from({length:z||1},(function(e,t){var a=I[t],n=null===S||void 0===S?void 0:S.fccIDCCNMap[null===a||void 0===a?void 0:a.ccn],r=null===a||void 0===a?void 0:a.personalDetails.birthDate.split("/"),o=(null===r||void 0===r?void 0:r[2])+(null===r||void 0===r?void 0:r[0])+(null===r||void 0===r?void 0:r[1]),i=[null===a||void 0===a?void 0:a.address.phone];return null===a||void 0===a||delete a.address.phone,a?E(E(E({paxId:null===a||void 0===a?void 0:a.paxId,promoCode:W,transportation:{city:(null===a||void 0===a?void 0:a.nearestAirport)||L,country:k,preEzAirCitySelected:!1},title:null===a||void 0===a?void 0:a.name.title,firstName:null===a||void 0===a?void 0:a.name.firstName,middleName:null===a||void 0===a?void 0:a.name.middleName,lastName:null===a||void 0===a?void 0:a.name.lastName,gender:null===a||void 0===a?void 0:a.personalDetails.gender,dob:o},!P.isPastGuestMismatchError&&{ccn:null===a||void 0===a?void 0:a.ccn}),n&&{fccId:n}),{},{address:E(E({},null===a||void 0===a?void 0:a.address),{},{phones:i}),packages:(null===a||void 0===a?void 0:a.packages)||f.K,insurance:(null===re||void 0===re?void 0:re.isEnabled)&&oe?{code:oe.code,price:oe.price,id:(null===a||void 0===a?void 0:a.paxId)||t+1}:null===a||void 0===a?void 0:a.insurance,contractAcceptedBy:1,pastGuestInd:"N"}):{paxId:t+1,promoCode:W,transportation:{city:L,country:k,preEzAirCitySelected:!1},title:"MR",firstName:"TBA",lastName:"TBA",gender:"M",packages:f.K,insurance:(null===re||void 0===re?void 0:re.isEnabled)&&oe?{code:oe.code,price:oe.price,id:(null===a||void 0===a?void 0:a.paxId)||t+1}:{},contractAcceptedBy:1,pastGuestInd:"N"}}))};return function(e){var t,a=e.payload,n=e.ube,r=e.selectedCruise,o=null===n||void 0===n||null===(t=n.settings)||void 0===t?void 0:t.features,i=o.prepayGratuity,c=o.earMark1,u=o.earMark2,d=o.empPax1ConcessionCode,s=o.empPax234ConcessionCode,l=o.concessionCodeForPax12,p=o.displayFreeUpgrade,v=n.guest,y=v.offerEmpBenefit,b=v.sponsorId,f=[],m=[],E=[],g=[];p&&f.push({type:"UPG",code:(null===r||void 0===r?void 0:r.stateroomUpgrade)||"N"}),i&&f.push({type:"PPG",code:"Y"}),c&&f.push({type:"EM1",code:c}
1),u&&f.push({type:"EM2",code:u}),b&&f.push({type:"EID",code:b}),y?(d&&f.push({type:"CON",code:d}),s&&(m.push({type:"CON",code:s}),E.push({type:"CON",code:s}),g.push({type:"CON",code:s}))):l&&(f.push({type:"CON",code:l}),m.push({type:"CON",code:l})),f.length>0&&(a.passengers[0].specialServices=f),m.length>0&&a.passengers.length>1&&(a.passengers[1].specialServices=m),E.length>0&&a.passengers.length>2&&(a.passengers[2].specialServices=E),g.length>0&&a.passengers.length>3&&(a.passengers[3].specialServices=g)}({payload:ce,ube:R,selectedCruise:h}),{bookAPIUrl:"".concat(s.b,"/pbmf/").concat(Object(p.N)(),"/book"),headers:l.b,payload:ce}}},L=function(){return function(){var e=Object(c.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t({type:"FETCH_CP_LINKS",payload:{payment:"".concat(s.c,"/manage-booking/deepLink.page?src=summary&page=PAYMENT"),bookingsummary:"".concat(s.c,"/manage-booking/deepLink.page?src=summary"),travelSummaryURL:"".concat(s.c,"/manage-booking/deepLink.page?src=summary&page=PRINTTRASUMMARY")}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},w=function(){return Object(c.a)(o.a.mark((function e(){var t,a,n,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(b.d)(),a=t.payment,n=E(E({},l.b),{},{authtoken:null===a||void 0===a?void 0:a.authToken}),r="".concat(s.b,"/cpmf/v1.0/cpgateway"),e.prev=4,e.next=7,Object(u.a)(r,{headers:n,withCredentials:!0});case 7:if(e.sent.data){e.next=10;break}throw{error:"Failed to drop CP JWT"};case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),v.b.error(e.t0,"ERROR.DROPPING.CP-JWT");case 15:case"end":return e.stop()}}),e,null,[[4,12]])})))},k=!1,x=function(e){return function(){var t=Object(c.a)(o.a.mark((function t(a){var n,r,i,c,s,l,p,b,f,m,g,O;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!k){t.next=3;break}return v.b.error({message:"Duplicate book API call blocked"},"ERROR.BOOK.DUPLICATE.BLOCKED"),t.abrupt("return",{});case 3:return k=!0,n=e.bookAPIUrl,r=e.payload,i=e.headers,c=Object(y.b)(),s=c.ubeId,l=E({},s&&{ubeId:s}),t.prev=7,t.next=10,u.a.post(n,r,{params:l,headers:i,withCredentials:!0});case 10:return b=t.sent,f=null===b||void 0===b||null===(p=b.data)||void 0===p?void 0:p.createReviseResponse,m=f.bookingNumber,g=f.polarSyncId,O=f.authToken,a(j(m,g,O)),a({type:"SET_SESSION_END_TIME",payload:null}),a({type:"PAST_GUEST_MISMATCH",payload:{isPastGuestMismatchError:!1}}),t.abrupt("return",{bookingNumber:m,polarSyncId:g});case 18:throw t.prev=18,t.t0=t.catch(7),k=!1,a(Object(d.a)(t.t0,"ERROR.FETCHING.BOOK")),t.t0;case 23:case"end":return t.stop()}}),t,null,[[7,18]])})));return function(e){return t.apply(this,arguments)}}()},M=function(e,t){return function(){var a=Object(c.a)(o.a.mark((function a(n){var r,i,c,d,l,p,b,f,m,g,O,h,S,C,T,P,D,A,I,_;return o.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return r=Object(y.b)(),i=r.ubeId,c=E({},i&&{ubeId:i}),d=t.payload,l=e.payload,p=e.headers,b=E(E({},l),d),f="".concat(s.b,"/pbmf/p1.0/book-with-payment"),a.prev=6,a.next=9,u.a.post(f,b,{params:c,headers:p,withCredentials:!0});case 9:return g=a.sent,O=null===g||void 0===g||null===(m=g.data)||void 0===m?void 0:m.createReviseResponse,h=O.bookingNumber,S=O.polarSyncId,C=O.authToken,n(j(h,S,C)),T=null===g||void 0===g?void 0:g.data,n({type:"SET_PAYMENT_RESPONSE",payload:T}),n({type:"SET_SESSION_END_TIME",payload:null}),n({type:"PAST_GUEST_MISMATCH",payload:{isPastGuestMismatchError:!1}}),n({type:"SET_IS_PAY_API_FAILED",payload:!1}),a.abrupt("return",{bookingNumber:h,polarSyncId:S,paymentResponse:T});case 20:if(a.prev=20,a.t0=a.catch(6),!(P=a.t0.response)||417!==P.status){a.next=32;break}if(!(null===P||void 0===P||null===(D=P.data)||void 0===D||null===(A=D.message)||void 0===A?void 0:A.includes("redeemed"))){a.next=28;break}throw v.b.error(a.t0,"ERROR.REDEEMING.CASINO.VOUCHER"),console.log("Book UI Log - Casino API Redemption Error. splunk: ERROR.REDEEMING.CASINO.VOUCHER"),a.t0;case 28:if(!(null===P||void 0===P||null===(I=P.data)||void 0===I||null===(_=I.message)||void 0===_?void 0:_.includes("voucher"))){a.next=32;break}throw v.b.error(a.t0,"ERROR.VALIDATING.CASINO.VOUCHER"),console.log("Book UI Log - Casino API Validation Error. Splunk: ERROR.VALIDATING.CASINO.VOUCHER",(null===a.t0||void 0===a.t0?void 0:a.t0.description)||a.t0),a.t0;case 32:throw n({type:"SET_IS_PAY_API_FAILED",payload:!0}),console.log("Book UI Log - Book with Pay API failure. Splunk: ERROR.FETCHING.BOOK-WITH-PAYMENT",a.t0),v.b.error(a.t0,"ERROR.FETCHING.BOOK-WITH-PAYMENT"),a.t0;case 36:case"end":return a.stop()}}),a,null,[[6,20]])})));return function(e){return a.apply(this,arguments)}}()},F=function(e,t,a){return function(){var n=Object(c.a)(o.a.mark((function n(r){var i,c,d,b,f,m,g,O,h,S,C,T;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i="".concat(s.b,"/pbmf/").concat(Object(p.N)(),"/fcd"),c=Object(y.b)(),d=c.ubeId,b=E({},d&&{ubeId:d}),f={bookingCurrency:t,product:{selectedCruise:{startDate:a}},passengers:e.slice(0,2).map((function(e){return{ccn:e.ccn}})),requestType:"X"},n.prev=4,n.next=7,u.a.post(i,f,{params:b,headers:l.b,withCredentials:!0});case 7:return m=n.sent,g=m.data.credits,O=g.fcds,h=void 0===O?[]:O,S=g.ssvs,C=void 0===S?[]:S,h.forEach((function(t){var a;t.name=null===(a=e.findBy("ccn",t.ccnNumber))||void 0===a?void 0:a.name}
1)),C.forEach((function(e){e.pax1Eligibility="Y",e.pax2Eligibility="Y",e.desc=e.fccDescription})),T=[],e.forEach((function(e){var t=h.findBy("ccnNumber",e.ccn);t&&T.length<2&&T.push(t)})),r({type:"SET_FCC_SSVS",payload:C}),n.abrupt("return",r({type:"SET_FUTURE_CRUISE_DEPOSITS",payload:d?[]:T}));case 17:return n.prev=17,n.t0=n.catch(4),v.b.error(n.t0,"ERROR.FETCHING.FCD"),n.abrupt("return",r({type:"SET_FUTURE_CRUISE_DEPOSITS",payload:[]}));case 21:case"end":return n.stop()}}),n,null,[[4,17]])})));return function(e){return n.apply(this,arguments)}}()},U=function(){return function(e,t){var a;return e({type:"SET_ADDRESSES_FROM_GUEST_INFORMATION",payload:null===(a=t().guestInformation.guestData)||void 0===a?void 0:a.reduce((function(e,t){return"same"!==t.addressStatusForAllPax?[].concat(Object(n.a)(e),[t.address]):e}),[])})}},B=function(){return function(e,t){return e({type:"SET_CCN_ARRAY_FROM_GUEST_INFORMATION",payload:t().guestInformation.guestData.map((function(e){var t,a;return{ccn:e.ccn,name:Object(p.c)("".concat(null===(t=e.name)||void 0===t?void 0:t.firstName," ").concat(null===(a=e.name)||void 0===a?void 0:a.lastName))}}))})}},G=function(){return Object(c.a)(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u.a.get("".concat(s.b,"/crm-wm/p1.0/GenPaypalToken"));case 3:return t=e.sent,e.abrupt("return",t.data.clientToken);case 7:return e.prev=7,e.t0=e.catch(0),v.b.error(e.t0,"ERROR.FETCHING.GENERATE-PAYPAL-TOKEN"),e.abrupt("return",null);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})))},H=function(e){var t=e.dispatch,a=e.payPalState,n=e.setPayPalState;return Object(c.a)(o.a.mark((function e(){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u.a.get("".concat(s.b,"/crm-wm/p1.0/GenPaypalToken"));case 3:r=e.sent,t({type:"SET_PAYPAL_TOKEN",payload:r.data.clientToken}),e.next=12;break;case 7:return e.prev=7,e.t0=e.catch(0),v.b.error(e.t0,"ERROR.FETCHING.GENERATE-PAYPAL-TOKEN"),n(E(E({},a),{},{hasError:!0})),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[0,7]])})))},Y=function(){return Object(c.a)(o.a.mark((function e(){var t,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(s.q,"/assetroot/html/global/book/popups/cvv.html"),e.prev=1,e.next=4,u.a.get(t,{withCredentials:!0});case 4:return a=e.sent,e.abrupt("return",a.data);case 8:e.prev=8,e.t0=e.catch(1),v.b.error(e.t0,"ERROR.FETCHING.BOOK");case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))}},b7Qq:function(e,t,a){"use strict";a.d(t,"b",(function(){return g})),a.d(t,"a",(function(){return O})),a.d(t,"c",(function(){return h})),a.d(t,"d",(function(){return S}));var n=a("KQm4"),r=a("o0o1"),o=a.n(r),i=a("rePB"),c=a("HaE+"),u=a("zuR4"),d=a("lf3Y"),s=a("S9gF"),l=a("fGma"),p=a("H1lf"),v=a("HYuQ"),y=a("20ht"),b=a("00EI"),f=a("Sd6l");function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function E(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(Object(a),!0).forEach((function(t){Object(i.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var g=function(e){var t=e.route,a=e.useExistingProducts,n=e.resType,r=e.isReset,i=void 0!==r&&r,l=e.isAppInit,m=e.voyages;return function(){var e=Object(c.a)(o.a.mark((function e(r,g){var O,h,S,C,T,P,D,A,j,I,_,R,N,L,w,k,x,M,F,U,B,G,H,Y,K,V,q,W,z,Q,J,X,Z,$,ee,te,ae,ne,re,oe,ie,ce,ue,de,se,le,pe,ve,ye,be,fe,me,Ee,ge;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return D=g(),A=D.admin,j=D.trades,I={data:Object(v.b)()},_=null===A||void 0===A||null===(O=A.data)||void 0===O?void 0:O.ube,R=null===_||void 0===_?void 0:_.hasUbeId,N=(null===_||void 0===_?void 0:_.bookingLocation)||{},L=N.primaryCurrency,w=N.secondaryCurrency,k=(null===_||void 0===_||null===(h=_.settings)||void 0===h?void 0:h.features)||{},x=k.avmPromoTypes,M=k.includeBestBuyPromos,F=null===_||void 0===_||null===(S=_.guest)||void 0===S||null===(C=S.contact)||void 0===C||null===(T=C.address)||void 0===T?void 0:T.country,U=g().products[b.a.name],B=g().products.isFilteredProducts,G=!!(I.data&&(null===(P=Object.keys(I.data))||void 0===P?void 0:P.length)>0),H=!("results"===t||"details"===t),Y="details"===t||l,K=Object(f.u)(),V=!(null===K||void 0===K?void 0:K.agencyId)&&H&&!U.data&&!m,q=G&&!H,W=U.isLight&&!H,z=!U.isLight&&H,Q=W||z,e.next=20,s.a.getCompressed(b.a.name);case 20:if(J=e.sent,X=!J||!J.length,Z=!G&&X,$=Object(v.b)(),ee=$.preProd,te="true"===sessionStorage.getItem("clearingPromo"),ae="true"===sessionStorage.getItem("all-".concat(b.a.name,"-products-fetched")),ne=!!g().products.recentlyViewedFilteredcruises,!(!U.data||!ae||B||!Y&&ne||Q||Z||i||q||K.agencyId)){e.next=49;break}if(ue="".concat(y.b,"/resdb/p1.0/products"),de=!J||!J.length||!H&&!(null===(re=J)||void 0===re||null===(oe=re[0])||void 0===oe?void 0:oe.name)||q||te||R||m&&m.length>0,se=g(),le=se.filters,pe=Object.keys(null===I||void 0===I?void 0:I.data),ve=pe.includes("campaigns")||pe.includes("coupon")||pe.includes("itinPort")||pe.includes("years")||pe.includes("hasHiddenFilters"),ye=Object(p.d)(R,L,w,x,M,m),be=!ae&&!le.promo&&!le.coupon&&!ve&&!m&&!K.agencyId,m&&(I.data.voyages=m),K.agencyId&&(I.data.startDateRange=K.sailStart,I.data.endDateRange=K.sailBy,I.data.cruiseDuration=K.cruiseDuration,I.data.promos=K.promoCode,me=null===j||void 0===j||null===(fe=j.data)||void 0===fe?void 0:fe.filter((function(e){var t;return null===(t=K.trade)||void 0===t?void 0:t.includes(e.name)})).map((function(e){return e.id})).join(","),I.data.trades=me),Ee=E(E({agencyCountry:F||"US",cruiseType:n||"C",voyageStatus:ee?"A,B":"A",webDis
1play:ee?"N":"Y",promoFilter:"all",light:V},ye),be?{}:Object(v.d)(I,"products",void 0,void 0,{promo:le.promo},!!K.agencyId)),de&&!a||K.agencyId||be){e.next=43;break}e.t0=J,e.next=46;break;case 43:return e.next=45,Object(u.a)(ue,{headers:b.b,params:Ee,withCredentials:!0}).then(function(){var e=Object(c.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return J=t.data.products,e.next=3,s.a.setCompressed(b.a.name,t.data.products,900);case 3:if(G){e.next=7;break}return e.next=6,s.a.getCompressed(b.a.name);case 6:J=e.sent;case 7:return e.abrupt("return",t.data.products);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){throw r(Object(d.a)(e,Ee)),e}));case 45:e.t0=e.sent;case 46:return ge=e.t0,be&&!K.agencyId?(sessionStorage.setItem("all-".concat(b.a.name,"-products-fetched"),"true"),te&&sessionStorage.removeItem("clearingPromo")):sessionStorage.setItem("all-".concat(b.a.name,"-products-fetched"),"false"),e.abrupt("return",r({type:"FETCH_PRODUCTS",payload:{cruiseType:b.a,products:ge,isFullProducts:!!(null===(ie=J)||void 0===ie||null===(ce=ie[0])||void 0===ce?void 0:ce.name),filters:le,responseType:b.a.name,isFilteredProducts:G,isReset:!0}}));case 49:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},O=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=Object(l.a)(e,t);Object(s.g)({filters:t});var i={filters:t,filtered:o,products:e};if(n({type:"FILTER_PRODUCTS",payload:i}),a){var c=r().ports,u=Object(l.f)(i)||[],d=Object(l.d)(i)||[],p=Object(l.c)(i,c.data)||[],v=window.structuredClone(t),y=Object(f.y)(t.trade,u),b=Object(f.y)(t.ship,d),m=Object(f.y)(t.port,p.ports);n({type:"SET_FILTERS",payload:{filters:v=E(E(E(E({},v),y.length?{trade:y}:{}),b.length?{ship:b}:{}),m.length?{port:m}:{})}})}}},h=function(e,t){return function(a){if(e)return a({type:"SET_FILTERS",payload:{optionsFilters:e,optionsFiltersUpdated:t}})}},S=function(){return function(){var e=Object(c.a)(o.a.mark((function e(t,a){var r,i,c,u,d;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=a(),u=c.filters,d=Object(n.a)(s.b.get("recentSearchCriteria")||[]),JSON.stringify(u)!==JSON.stringify(null===(r=s.b.get("recentSearchCriteria"))||void 0===r?void 0:r[(null===(i=s.b.get("recentSearchCriteria"))||void 0===i?void 0:i.length)-1])&&d.push(u),d=d.length>5?d.slice(1):d,s.b.set("recentSearchCriteria",d),e.abrupt("return",t({type:"UPDATE_RECENT_SEARCH_CRITERIA",payload:d}));case 6:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()}},gdvo:function(e,t,a){"use strict";a.d(t,"e",(function(){return f})),a.d(t,"g",(function(){return m})),a.d(t,"a",(function(){return g})),a.d(t,"c",(function(){return O})),a.d(t,"f",(function(){return h})),a.d(t,"b",(function(){return S})),a.d(t,"d",(function(){return C}));var n=a("rePB"),r=a("o0o1"),o=a.n(r),i=a("HaE+"),c=a("zuR4"),u=a("Sd6l"),d=a("lf3Y"),s=a("00EI"),l=a("20ht"),p=a("Nfny");function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function y(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?v(Object(a),!0).forEach((function(t){Object(n.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):v(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var b=function(e,t,a,n){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,d="".concat(e.birthMonth,"/").concat(e.birthDay,"/").concat(e.birthYear),s=!i,l=(null===c||void 0===c?void 0:c.enableNewGuestForm)||!1,p=l?{Phone:e.number,Mobile:e.number}:{Phone:"H"===e.numberType?e.number:"",Mobile:"M"===e.numberType?e.number:""};return{Contact:{CruiseCompany:{BookingCompanyCode:t,ProductCompanyCode:a},FormCode:"WEBBKX",BypassFaultCode:n,Name:{Title:Object(u.M)(e.sex,d),FirstName:e.firstName,LastName:e.lastName},PersonalDetails:{Gender:e.sex,BirthDate:d},Address:{Address1:e.address1,Address2:e.address2,Address3:e.address3,HouseName:e.housename,City:e.city?e.city:e.district,StateOrCounty:e.state?e.state:e.zone,PostCode:e.zip,Country:e.country},Email:{Email:e.email},Telephone:p,ContactPreferences:r?s?{ExpressedConsent:"Yes"===(null===e||void 0===e?void 0:e.hearFromPCL)?"Customer Initiated via WEB, OK to Market By Phone":"",CPPhoneCode:"0-Call",CPMailCode:"0",CPEmailCode:(null===e||void 0===e?void 0:e.getPromotionalEmails)||(null===e||void 0===e?void 0:e.hearFromPCL_ByEmail)?"0":"1",LoyaltyOptInCode:"1"===(null===e||void 0===e?void 0:e.membership)?"0-Yes":"1-No",IMOptInCode:"0-Yes",SMSOptInCode:"0-Yes"}:{ExpressedConsent:"Yes"===(null===e||void 0===e?void 0:e.hearFromPCL)?"Customer Initiated via WEB, OK to Market By Phone":"",CPPhoneCode:"1"===(null===e||void 0===e?void 0:e.hearFromPCL_ByPhone)?"0-Call":"1-DoNotCall",CPMailCode:"1"===(null===e||void 0===e?void 0:e.hearFromPCL_ByMail)?"0":"1",CPEmailCode:e.getPromotionalEmails||"1"===(null===e||void 0===e?void 0:e.hearFromPCL_ByEmail)?"0":"1",IMOptInCode:"1"===(null===e||void 0===e?void 0:e.hearFromPCL_ByInstantMessage)?"0-Yes":"1-No",SMSOptInCode:"1"===(null===e||void 0===e?void 0:e.hearFromPCL_BySMS)?"0-Yes":"1-No",LoyaltyOptInCode:"1"===(null===e||void 0===e?void 0:e.membership)?"0-Yes":"1-No",DoNotShare:1===o?(null===e||void 0===e?void 0:e.agreement)?"0-OkToShare":"1-DoNotShare":void 0}:{}}}},f=function(e,t,a,n,r){return function(){var u=Object(i.a)(o.a.mark((function i(u,d){var v,y,f,m,E,g,O,h,S,C,T,P,D,A;return o.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return f=d(),m=f.admin,E=f.guestInformation,g=E.guestData,O=null===m||void 0===m||null===(v=m.data)||void 0===v?void 0:v.ube,h=(null===O||void 0===O?void 0:O.bookingLocation)||{}
1,S=h.bookingCompany,C=h.productCompany,T=null===O||void 0===O||null===(y=O.guest)||void 0===y?void 0:y.uk,e.nearestAirport=n,e.country=e.countryCode,e.birthDay=e.birthDay.padStart(2,0),e.birthMonth=e.birthMonth.padStart(2,0),P="".concat(l.b,"/crm/p1.0/register"),D=b(e,S,C,a,!0,t,T,r),"Y"===a&&u({type:"ADDRESS_NOT_VERIFIED",payload:!1}),e.title=D.Contact.Name.Title,o.next=15,c.a.post(P,D,{headers:s.b,withCredentials:!0}).then((function(a){var n=(window||{}).digitalDataHelper;e.CCNInfo=a.data,e.paxId=t;var r=e.CCNInfo.Contact.Id;n&&n.addData("user","profile",{ccn:e.CCNInfo.Contact.EncryptedId});for(var o=0;o<g.length;o+=1)if(o!==t-1&&r===g[o].ccn)return u({type:"IS_DUPLICATE_USER",payload:!0});return u({type:"UPDATE_GUEST_DATA",payload:e})})).catch((function(a){var n,r,o,i;p.b.error(a,"ERROR.FETCHING.REGISTER");var c=null===(n=a.response)||void 0===n||null===(r=n.data)||void 0===r||null===(o=r.errors)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.status;return"400"===c||"422"===c?u({type:"ADDRESS_NOT_VERIFIED",payload:!0}):(e.paxId=t,u({type:"UPDATE_GUEST_DATA",payload:e}))}));case 15:return A=o.sent,o.abrupt("return",A);case 17:case"end":return o.stop()}}),i)})));return function(e,t){return u.apply(this,arguments)}}()},m=function(e,t,a,n){return function(){var r=Object(i.a)(o.a.mark((function r(i,u){var d,v,f,m,E,g,O,h,S,C,T,P,D,A,j,I,_,R;return o.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return m=u(),E=m.admin,g=null===E||void 0===E||null===(d=E.data)||void 0===d?void 0:d.ube,O=(null===g||void 0===g?void 0:g.bookingLocation)||{},h=O.bookingCompany,S=O.productCompany,C=null===g||void 0===g||null===(v=g.guest)||void 0===v?void 0:v.uk,T=g.id,P=g.hasUbeId,D=e.CCNInfo,A="".concat(l.b,"/crm/v1.0/contacts/").concat(e.ccn),e.birthDay=e.birthDay.padStart(2,0),e.birthMonth=e.birthMonth.padStart(2,0),j=b(e,h,S,t,!0,a,C,n),I=y({},P&&T&&{ubeId:"UBE-".concat(T)}),e.title=j.Contact.Name.Title,"Y"===t&&i({type:"ADDRESS_NOT_VERIFIED",payload:!1}),(_=null===D||void 0===D||null===(f=D.SignOn)||void 0===f?void 0:f.token)&&(s.b.authtoken=_),r.next=17,c.a.post(A,j,{headers:s.b,params:I,withCredentials:!0}).then((function(){return i({type:"UPDATE_GUEST_DATA",payload:e})})).catch((function(e){var t,a;p.b.error(e,"ERROR.FETCHING.CONTACTS");var n=null===(t=e.response.data)||void 0===t||null===(a=t.errors[0])||void 0===a?void 0:a.status;if("400"===n||"422"===n)return i({type:"ADDRESS_NOT_VERIFIED",payload:!0})}));case 17:return R=r.sent,r.abrupt("return",R);case 19:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}()},E=function(e){var t,a,n;return(null===e||void 0===e||null===(t=e.ListOfValues)||void 0===t||null===(a=t.TypeCode)||void 0===a||null===(n=a.V
1alue)||void 0===n?void 0:n.find((function(e){return"address"===e.Name})))&&e.ListOfValues.TypeCode.Value.map((function(e){return"address"===e.Name&&(e.Value="Address 1",e.Description="Address 1",e.Name="address1"),e})),e},g=function(e){return function(){var t=Object(i.a)(o.a.mark((function t(a){var n,r,i,u;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="".concat(l.b,"/crm/p1.0/lovs"),r={country:e,typecode:"ADDRESS_FORMAT"},t.prev=2,t.next=5,c.a.get(n,{headers:s.b,params:r,withCredentials:!0});case 5:return i=t.sent,u=E(i.data),t.abrupt("return",a({type:"FETCH_ADDRESS_FORMAT",payload:u}));case 10:t.prev=10,t.t0=t.catch(2),p.b.error(t.t0,"ERROR.FETCHING.ADDRESS-FORMAT");case 13:case"end":return t.stop()}}),t,null,[[2,10]])})));return function(e){return t.apply(this,arguments)}}()},O=function(e,t){return function(){var a=Object(i.a)(o.a.mark((function a(n){var r,i,u;return o.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return r="".concat(l.b,"/resdb/p1.0/aircity"),i={countryCode:e,zipCode:t},a.prev=2,a.next=5,c.a.get(r,{headers:s.b,params:i,withCredentials:!0});case 5:return u=a.sent,a.abrupt("return",n({type:"FETCH_NEAREST_AIRPORT",payload:u.data}));case 9:a.prev=9,a.t0=a.catch(2),p.b.error(a.t0,"ERROR.FETCHING.AIRCITY");case 12:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e){return a.apply(this,arguments)}}()},h=function(e,t){return function(){var a=Object(i.a)(o.a.mark((function a(n,r){var i,u,d,v,y,b,f,m,E;return o.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return d=r(),v=d.admin,y=(null===v||void 0===v||null===(i=v.data)||void 0===i||null===(u=i.ube)||void 0===u?void 0:u.bookingLocation)||{},b=y.bookingCompany,f=y.productCompany,m="".concat(l.b,"/crm/v1.0/contacts/").concat(t.Contact.Id,"/preferences"),E={Contact:{CruiseCompany:{BookingCompanyCode:b,ProductCompanyCode:f},FormCode:"WEBBKX",Id:t.Contact.Id,Preferences:[{Question:"300",Answer:[e.membership]},{Question:"248",Answer:[e.hearFromPCL_ByPhone]},{Question:"247",Answer:[e.hearFromPCL_BySMS]},{Question:"246",Answer:[e.hearFromPCL_ByEmail]},{Question:"255",Answer:[e.hearFromPCL_ByInstantMessage]},{Question:"245",Answer:[e.hearFromPCL_ByMail]},{Question:"230",Answer:[e.receiveNewsDeals_ByPhone?"1":"2"]},{Question:"233",Answer:[e.receiveNewsDeals_BySMS?"1":"2"]},{Question:"231",Answer:[e.receiveNewsDeals_ByEmail?"1":"2"]},{Question:"234",Answer:[e.receiveNewsDeals_ByInstantMessage?"1":"2"]},{Question:"232",Answer:[e.receiveNewsDeals_ByMail?"1":"2"]}]}},s.b.authtoken=t.SignOn.token,a.prev=5,a.next=8,c.a.post(m,E,{headers:s.b,withCredentials:!0}).then((function(e){return e}));case 8:a.next=13;break;case 10:a.prev=10,a.t0=a.catch(5),p.b.error(a.t0,"ERROR.FETCHING.PREFERENCES");case 13:case"end":return a.stop()}}),a,null,[[5,10]])})));return function(e,t){return a.apply(this,arguments)}}()},S=function(e){return function(){var t=Object(i.a)(o.a.mark((function t(a){var n,r,i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="".concat(l.b,"/resdb/p1.0/agencies/aircities"),r={countries:e},t.prev=2,t.next=5,c.a.get(n,{headers:s.b,params:r,withCredentials:!0});case 5:return i=t.sent,t.abrupt("return",a({type:"FETCH_AIRCITIES",payload:i.data}));case 9:return t.prev=9,t.t0=t.catch(2),t.abrupt("return",a(Object(d.a)(t.t0,"ERROR.FETCHING.AIRCITIES")));case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()},C=function(){return function(){var e=Object(i.a)(o.a.mark((function e(t){var a,n,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(l.b,"/crm/p1.0/lovs"),n={typecode:"STATE_COUNTRIES_MATRIX"},e.prev=2,e.next=5,c.a.get(a,{headers:s.b,params:n,withCredentials:!0});case 5:return r=e.sent,e.abrupt("return",t({type:"FETCH_STATE_COUNTRIES_MATRIX",payload:r.data}));case 9:e.prev=9,e.t0=e.catch(2),p.b.error(e.t0,"ERROR.FETCHING.STATE-COUNTRIES-MATRIX");case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}()}},piak:function(e,t,a){"use strict";a.d(t,"a",(function(){return m})),a.d(t,"d",(function(){return E})),a.d(t,"e",(function(){return g})),a.d(t,"c",(function(){return O})),a.d(t,"b",(function(){return h}));
1var n=a("o0o1"),r=a.n(n),o=a("rePB"),i=a("HaE+"),c=a("zuR4"),u=a("FDF/"),d=a("00EI"),s=a("20ht"),l=a("Nfny"),p=a("Sd6l"),v=a("wyBh"),y=a("HYuQ");function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function f(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?b(Object(a),!0).forEach((function(t){Object(o.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var m=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var a=Object(i.a)(r.a.mark((function a(n,o){var i,u,l,v,b,m,E,g,O,h,S,C,T,P,D,A,j,I,_,R,N,L,w,k,x,M,F,U,B,G,H,Y,K,V,q,W,z,Q,J,X,Z,$,ee,te,ae,ne,re,oe,ie,ce,ue,de,se,le,pe,ve,ye,be;return r.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return m=t.isRefundableSelected,E=void 0!==m&&m,g=t.refundableCouponCode,O=void 0===g?null:g,h=t.manualCouponCode,S=void 0===h?null:h,C=t.isSummaryPage,T=void 0!==C&&C,P=o(),D=P.admin,A=P.guestInformation,j=P.selectedCruise,I=P.stateroomLocation,_=P.insuranceTransferOptions,R=P.filters,N=j.guestCount,L=j.isRefundableSelected,w=j.refundableCouponCode,k=j.displayCouponCodeAB,x=j.manualCouponCode,M=j.isADASelected,F=E||!T&&L,U=O||!T&&w,B=S||x,G=I.selectedRoom,H="T"===d.a.id,Y=null===D||void 0===D||null===(i=D.data)||void 0===i?void 0:i.ube,K=(null===Y||void 0===Y?void 0:Y.bookingLocation)||{},V=K.primaryCurrency,q=K.agencyId,W=null===Y||void 0===Y||null===(u=Y.guest)||void 0===u?void 0:u.contact,z=W.gatewayCity,Q=null===G||void 0===G?void 0:G.selectedBestCategory,J=null===G||void 0===G?void 0:G.requestedCategory,X=null===G||void 0===G?void 0:G.id,Z="".concat(s.b,"/pbmf/").concat(Object(p.N)(),"/ati-options"),$=Object(y.b)(),ee=$.ubeId,te=f({},ee&&{ubeId:ee}),ae=function(e){if(e)return"string"===typeof e?e:e.id||void 0},ne=(null===R||void 0===R?void 0:R.coupon)||(null===(l=Object(y.b)())||void 0===l?void 0:l.couponCode),re=(null===Y||void 0===Y||null===(v=Y.settings)||void 0===v||null===(b=v.features)||void 0===b?void 0:b.autoAppliedCouponCode)||ne,oe=null===G||void 0===G?void 0:G.couponCode,ie=Object(p.g)(F&&U,oe,re,k,null===j||void 0===j?void 0:j.couponCode,null===B||void 0===B?void 0:B.code),ce=f(f({bookingCurrency:V,agencyId:q},ie.length>0&&{coupons:ie}),{},{product:{selectedCruise:{id:j.id.split("-")[0],startDate:j.startDate,cabin:{category:{code:M?J:Q},number:X}},tour:H?{code:j.id.split("-")[1],startDate:j.startDate}:{}},passengers:Array.from({length:N||1},(function(e,t){var a,n,r,o,i,c,u,d,s,l,p,v,y,b,m,E=null===A||void 0===A||null===(a=A.guestData)||void 0===a?void 0:a[t];if(null===E||void 0===E||null===(n=E.personalDetails)||void 0===n?void 0:n.birthDate){var g=E.personalDetails.birthDate.split("/");3===g.length&&(m=g[2]+g[0]+g[1])}return f(f(f(f(f(f(f({paxId:t+1},!_.isPastGuestMismatchError&&{ccn:null===E||void 0===E?void 0:E.ccn}),(null===E||void 0===E||null===(r=E.name)||void 0===r?void 0:r.firstName)&&{firstName:E.name.firstName}),(null===E||void 0===E||null===(o=E.name)||void 0===o?void 0:o.lastName)&&{lastName:E.name.lastName}),(null===E||void 0===E||null===(i=E.name)||void 0===i?void 0:i.title)&&{title:null===E||void 0===E||null===(c=E.name)||void 0===c?void 0:c.title}),(null===E||void 0===E||null===(u=E.personalDetails)||void 0===u?void 0:u.gender)?{gender:E.personalDetails.gender}:{gender:"M"}),m&&{dob:m}),{},{promoCode:ae(null===(d=j.cabin)||void 0===d?void 0:d.promo),packages:[{code:"B0TNOXFR"},{code:"A0TNOXFR"}],transportation:{country:(null===E||void 0===E||null===(s=E.address)||void 0===s?void 0:s.countryCode)||(null===A||void 0===A||null===(l=A.guestData)||void 0===l||null===(p=l[0])||void 0===p||null===(v=p.address)||void 0===v?void 0:v.countryCode)||"US",nearestAirport:(null===E||void 0===E?void 0:E.nearestAirport)||(null===A||void 0===A||null===(y=A.guestData)||void 0===y||null===(b=y[0])||void 0===b?void 0:b.nearestAirport)||z||"DSM"}})}))}),a.prev=23,a.next=26,c.a.post(Z,ce,{params:te,headers:d.b,withCredentials:!0});case 26:return ue=a.sent,n({type:"FETCH_ATI_OPTIONS",payload:ue.data}),a.abrupt("return",ue.data);case 31:if(a.prev=31,a.t0=a.catch(23),"5"!==(null===(de=a.t0.response)||void 0===de||null===(se=de.data)||void 0===se||null===(le=se.errors)||void 0===le||null===(pe=le[0])||void 0===pe?void 0:pe.status.charAt(0))){a.next=40;break}if("prod"===(null===s.i||void 0===s.i?void 0:s.i.toLowerCase())||_.isPastGuestMismatchError){a.next=38;break}return console.log("Continuing without guest CCN: ".concat(JSON.stringify(null===(ve=a.t0.response)||void 0===ve||null===(ye=ve.data)||void 0===ye||null===(be=ye.errors)||void 0===be?void 0:be[0]))),n({type:"PAST_GUEST_MISMATCH",payload:{isPastGuestMismatchError:!0}}),a.abrupt("return",n(e()));case 38:return n({type:"ERROR_FETCH_ATI_OPTIONS",payload:{}}),a.abrupt("return");case 40:n({type:"ERROR_FETCH_ATI_OPTIONS",payload:{}});case 41:case"end":return a.stop()}}),a,null,[[23,31]])})));return function(e,t){return a.apply(this,arguments)}}()},E=function(){return function(){var e=Object(i.a)(r.a.mark((function e(t,a){var n,o,i,u,v,b,m,E,g,O,h,S,C,T,P,D,A,j,I,_;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v=a(),b=v.admin,m=v.guestInformation,E=v.selectedCruise,g=v.insuranceTransferOptions,O=null===b||void 0===b||null===(n=b.data)||void 0===n?void 0:n.ube,h=null===O||void 0===O||null===(o=O.guest)||void 0===o||null===(i=o.contact)||void 0===i?void 0:i.gatewayCity,S=(null===O||void 0===O?void 0:O.bookingLocation)||{},C=S.primaryCurrency,T=S.agencyId,null===(u=g.packages)||void 0===u?void 0:u.length){e.next=19;break}return P="".concat(s.b,"/pbmf/").concat(Object(p.N)(),"/packages"),D=Object(y.b)(),A=D.ubeId,j=f({},A&&{ubeId:A}),I={agencyId:T,product:{selectedCruise:{id:E.id.split("-")[0]}},bookingCurrency:C,passengers:m.guestData.map((function(e,t){return{paxId:t+1,transportation:{country:e.address.countryCode,nearestAirport:e.nearestAirport||h}}}))},e.prev=9,e.next=12,c.a.post(P,I,{params:j,headers:d.b,withCredentials:!0});case 12:return _=e.sent,e.abrupt("return",t({type:"FETCH_PACKAGES",payload:_.data}));case 16:e.prev=16,e.t0=e.catch(9),l.b.error(e.t0,"ERROR.FETCHING.PACKAGES");case 19:case"end":return e.stop()}}),e,null,[[9,16]])})));return function(t,a){return e.apply(this,arguments)}}()},g=function(){return function(){var e=Object(i.a)(r.a.mark((function e(t,a){var n,o,i,u,d,p,y,b,f,m;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=a(),i=o.admin,u=o.insuranceTransferOptions,d=null===i||void 0===i||null===(n=i.data)||void 0===n?void 0:n.ube,p=(null===d||void 0===d?void 0:d.bookingLocation)||{}
1,y=p.productCompany,b=p.bookingCompany,f="".concat(s.c,"/").concat(v.C,"html/global/insurance/").concat(y,"_").concat(b,"_OTHERS_insurance.html"),e.prev=4,u.waiverModalContent){e.next=10;break}return e.next=8,c.a.get(f,{withCredentials:!0});case 8:return m=e.sent,e.abrupt("return",t({type:"FETCH_WAIVER_MODAL_CONTENT",payload:m.data}));case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),l.b.error(e.t0,"ERROR.FETCHING.INSURANCE-HTML");case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(t,a){return e.apply(this,arguments)}}()},O=function(e){return function(){var t=Object(i.a)(r.a.mark((function t(a,n){var o,i,u,v,b,m,E,g;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),i=o.selectedCruise,u="".concat(s.b,"/pbmf/").concat(Object(p.N)(),"/package-description"),v=Object(y.b)(),b=v.ubeId,m=f({},b&&{ubeId:b}),E={product:{selectedCruise:{id:i.id.split("-")[0]}},code:e},t.prev=5,t.next=8,c.a.post(u,E,{params:m,headers:d.b,withCredentials:!0});case 8:return g=t.sent,t.abrupt("return",a({type:"FETCH_PACKAGE_DESCRIPTION",payload:g.data}));case 12:t.prev=12,t.t0=t.catch(5),l.b.error(t.t0,"ERROR.FETCHING.PACKAGE-DESCRIPTION");case 15:case"end":return t.stop()}}),t,null,[[5,12]])})));return function(e,a){return t.apply(this,arguments)}}()},h=function(){return function(){var e=Object(i.a)(r.a.mark((function e(t,a){var n,o,i,d,p,v,y,b,f,m;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a(),o=n.insuranceTransferOptions,i="".concat(s.q,"/plan/princess-vacation-protection-rhythmyx/"),e.prev=2,o.learnMoreContent){e.next=14;break}return e.next=6,c.a.get(i,{withCredentials:!0});case 6:return d=e.sent,p=u.load(d.data),v=p(".headline-bar").toArray().map((function(e){return p.html(e)})),y=v[0],b=p.html(p(".grid-2col-container").toArray()[1])+p.html(p(".floating-cards"))+p.html(p(".col-xs-12").toArray()[14]),f=v[3],m=p.html(p(".col-xs-12").toArray()[17]),e.abrupt("return",t({type:"FETCH_LEARN_MORE_CONTENT",payload:{benefitsSectionHeading:y,benefitsSection:b,productDetailsSectionHeading:f,productDetailsSection:m}}));case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),l.b.error(e.t0,"ERROR.FETCHING.PROTECTION-PLAN");case 19:case"end":return e.stop()}}),e,null,[[2,16]])})));return function(t,a){return e.apply(this,arguments)}}()}},q4gU:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"c",(function(){return i})),a.d(t,"d",(function(){return c})),a.d(t,"b",(function(){return d})),a.d(t,"f",(function(){return s})),a.d(t,"e",(function(){return l})),a.d(t,"g",(function(){return p}));var n=a("wd/R"),r=a.n(n),o=["SA","SB","SF","SG","MH","B0"],i="https://assets.princess.com/is/image/princesscruises/sanctuary-suite-premier-package:1x1-Square",c="https://assets.princess.com/is/image/princesscruises/sanctuary-suite-premier-package:5x4",u={SU:new Date("October 14 00:00:00 PDT 2024"),ST:new Date("August 04 00:00:00 PDT 2024")},d=function(e){if(null===e||void 0===e?void 0:e.id){var t=(null===e||void 0===e?void 0:e.voyage).ship;return r()(e.startDate,"YYYYMMDD").toDate()>u[null===t||void 0===t?void 0:t.id]}},s=90,l={modalTitle:"Princess Premier\xae Package",modalDescription:"Our best package at sea, a $90/day per guest cost included in your Sanctuary Collection\u2120 benefits.",headerColumns:["Daily a-la-carte Cost","With Premier"],lineItems:[{items:[{value:"Unlimited Premium Drinks",desc:"Selection of 75+ top shelf spirits, 40+ reserve wines by the glass, 20+ high end, crafted cocktails, wide selection of beers, all specialty coffees & non-alcoholic drinks."},{isPrice:!0,value:"85"},{isCheckMark:!0,value:""}]},{items:[{value:"Unlimited Specialty Dining",desc:""},{isPrice:!0,value:"45"},{isCheckMark:!0,value:""}]},{items:[{value:"Unlimited Wi-Fi",desc:"4 devices per guest"},{isPrice:!0,value:"45"},{isCheckMark:!0,value:""}]},{items:[{value:"Crew appreciation",desc:""},{isPrice:!0,value:"17-19"},{isCheckMark:!0,value:""}]}],footerColumns:[{value:"194/day",isPrice:!0,desc:"Per guest"},{value:"Included with Sanctuary Collection",desc:"",isPrice:!1}],modalBottomContent:{description:"Also included in your Premier Package:",bullets:["<strong>Unlimited</strong> casual dining","<strong>Unlimited</strong> professional photos","<strong>Unlimited</strong> boutique fitness classes including Pure Barre and YogaSix","Room service and OceanNow\xae delivery included","Reserved theater seating"]}}
1,p={S:{name:"All Suites",amenities:[{image:"https://assets.princess.com/is/image/princesscruises/princess-premier-logo?fmt=png-alpha",image5x4:"https://assets.princess.com/is/image/princesscruises/princess-premier-logo?fmt=png-alpha",title:"Princess Premier\xae",isFeature:!0,description:"Our best all-inclusive package with unlimited premium drinks, unlimited specialty dining, crew appreciation, and much more.",popupDescription:"Sanctuary Collection guests enjoy our highest-level all-inclusive package with unlimited multi-device MedallionNet\xae Max Wi-Fi, crew appreciation, unlimited premium spirits and an expertly curated wine list that pairs perfectly with any occasion. Premier also includes unlimited specialty dining, unlimited casual dining, even reserved theater seating for production shows.",isPremier:!0,goldenLabelTitle:"/person value included",premierPerDayValue:90},{image:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-club:1x1-Square",image5x4:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-club:5x4",title:"Sanctuary Club\u2120",isFeature:!0,description:"A tranquil, adults-only deck with poolside relaxation, craft cocktails, wellness classes, and private cabanas.",popupDescription:"Kick back in a private cabana or relax poolside with a craft cocktail. Order from your custom menu on this tranquil sundeck and happily lounge the day away."},{image:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-private-restaurant:1x1-Square",image5x4:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-private-restaurant:5x4",title:"Sanctuary Restaurant",isFeature:!0,description:"Exclusive dining for Sanctuary Collection guests with a custom chef\u2019s menu, no reservations, and award winning service.",popupDescription:"Reserved exclusively for Sanctuary Collection\u2120 guests. Enjoy a custom chef's menu and dedicated waitstaff and dining room. No reservations needed and no waiting \u2014 elevated dining is ready whenever you are."},{image:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-lounge-1:1x1-Square",image5x4:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-lounge-1:5x4",title:"Suite Lounge",isFeature:!0,description:"Guests enjoy exclusive access to our Suite Lounge for morning coffee, daytime retreat, afternoon drinks or evening relaxation.",popupDescription:"Exclusively available for Suites guests. Enjoy complimentary hors d'oeuvres and a stylish environment to unwind. Relax with a book, catch up on news, or simply kick back and relax.",goldenLabelTitle:"Suite guests only"}]},M:{name:"Sanctuary Mini-Suites",amenities:[{image:"https://assets.princess.com/is/image/princesscruises/princess-premier-logo?fmt=png-alpha",image5x4:"https://assets.princess.com/is/image/princesscruises/princess-premier-logo?fmt=png-alpha",title:"Princess Premier\xae",isFeature:!0,description:"Our best all-inclusive package with unlimited premium drinks, unlimited specialty dining, crew appreciation, and much more.",popupDescription:"Sanctuary Collection guests enjoy our highest-level all-inclusive package with unlimited multi-device MedallionNet\xae Max Wi-Fi, crew appreciation, unlimited premium spirits and an expertly curated wine list that pairs perfectly with any occasion. Premier also includes unlimited specialty dining, unlimited casual dining, even reserved theater seating for production shows.",isPremier:!0,goldenLabelTitle:"/person value included",premierPerDayValue:90},{image:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-club:1x1-Square",image5x4:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-club:5x4",title:"Sanctuary Club\u2120",isFeature:!0,description:"A tranquil, adults-only deck with poolside relaxation, craft cocktails, wellness classes, and private cabanas.",popupDescription:"Kick back in a private cabana or relax poolside with a craft cocktail. Order from your custom menu on this tranquil sundeck and happily lounge the day away."},{image:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-private-restaurant:1x1-Square",image5x4:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-private-restaurant:5x4",title:"Sanctuary Restaurant",isFeature:!0,description:"Exclusive dining for Sanctuary Collection guests with a custom chef\u2019s menu, no reservations, and award winning service.",popupDescription:"Reserved exclusively for Sanctuary Collection\u2120 guests. Enjoy a custom chef's menu and dedicated waitstaff and dining room. No reservations needed and no waiting \u2014 elevated dining is ready whenever you are."}]},B:{name:"Sanctuary Balcony",amenities:[{image:"https://assets.princess.com/is/image/princesscruises/princess-premier-logo?fmt=png-alpha",image5x4:"https://assets.princess.com/is/image/princesscruises/princess-premier-logo?fmt=png-alpha",title:"Princess Premier\xae",isFeature:!0,description:"Our best all-inclusive package with unlimited premium drinks, unlimited specialty dining, crew appreciation, and much more.",popupDescription:"Sanctuary Collection guests enjoy our highest-level all-inclusive package with unlimited multi-device MedallionNet\xae Max Wi-Fi, crew appreciation, unlimited premium spirits and an expertly curated
1wine list that pairs perfectly with any occasion. Premier also includes unlimited specialty dining, unlimited casual dining, even reserved theater seating for production shows.",isPremier:!0,goldenLabelTitle:"/person value included",premierPerDayValue:90},{image:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-club:1x1-Square",image5x4:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-club:5x4",title:"Sanctuary Club\u2120",isFeature:!0,description:"A tranquil, adults-only deck with poolside relaxation, craft cocktails, wellness classes, and private cabanas.",popupDescription:"Kick back in a private cabana or relax poolside with a craft cocktail. Order from your custom menu on this tranquil sundeck and happily lounge the day away."},{image:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-private-restaurant:1x1-Square",image5x4:"https://assets.princess.com/is/image/princesscruises/sanctuary-suite-private-restaurant:5x4",title:"Sanctuary Restaurant",isFeature:!0,description:"Exclusive dining for Sanctuary Collection guests with a custom chef\u2019s menu, no reservations, and award winning service.",popupDescription:"Reserved exclusively for Sanctuary Collection\u2120 guests. Enjoy a custom chef's menu and dedicated waitstaff and dining room. No reservations needed and no waiting \u2014 elevated dining is ready whenever you are."}]}}},qmZH:function(e,t,a){"use strict";a.d(t,"e",(function(){return P})),a.d(t,"i",(function(){return D})),a.d(t,"j",(function(){return A})),a.d(t,"b",(function(){return j})),a.d(t,"c",(function(){return I})),a.d(t,"n",(function(){return _})),a.d(t,"k",(function(){return R})),a.d(t,"l",(function(){return N})),a.d(t,"f",(function(){return L})),a.d(t,"m",(function(){return w})),a.d(t,"d",(function(){return k})),a.d(t,"o",(function(){return x})),a.d(t,"p",(function(){return M})),a.d(t,"g",(function(){return F})),a.d(t,"h",(function(){return U})),a.d(t,"a",(function(){return B}));var n=a("KQm4"),r=a("rePB"),o=a("wd/R"),i=a.n(o),c=a("q1tI"),u=a("nOHt"),d=a.n(u),s=a("q4gU"),l=a("Sd6l"),p=a("+Ki4"),v=a("kLa5"),y=a("wyBh"),b=a("/FMY"),f=a("S9gF"),m=a("00EI"),E=a("s5gF"),g=a("+kwO");function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function h(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?O(Object(a),!0).forEach((function(t){Object(r.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):O(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var S=function(e,t){var a,n,r,o,i,c,u,d,s,p,v,y,b,f,m,E,g,O,S,C,T,P,D=e.selectedCruise,A=e.pricing,j=e.metas,I=e.admin,_=e.appInit;if(null==I.data)return null;var R=_.casinoData,N=Object(l.U)(I.data),L=D.guestCount,w=D.currentCruise,k=D.flowSelected,x=j.metaId,M=j.subMetaId,F=M&&j.subMetaId.charAt("1"),U="manual"===k&&(null===A||void 0===A||null===(a=A.availablePricing)||void 0===a?void 0:a[0])?null===A||void 0===A||null===(n=A.availablePricing)||void 0===n||null===(r=n[0])||void 0===r||null===(o=r.cruises[0])||void 0===o?void 0:o.pricing:null===A||void 0===A||null===(i=A.data)||void 0===i||null===(c=i[0])||void 0===c||null===(u=c.cruises[0])||void 0===u?void 0:u.pricing,B=null===U||void 0===U?void 0:U.fares,G=N?0:(null===U||void 0===U?void 0:U.lowerBth)||0,H=null===w||void 0===w||null===(d=w.pricing)||void 0===d?void 0:d.fareType,Y=null===w||void 0===w||null===(s=w.pricing)||void 0===s?void 0:s.meta,K=null==M?null===B||void 0===B||null===(p=B.findBy("fareType",H))||void 0===p||null===(v=p.metas)||void 0===v||null===(y=v.findBy("id",x||Y))||void 0===y?void 0:y.bestCategory:null===B||void 0===B||null===(b=B.findBy("fareType",H))||void 0===b||null===(f=b.metas)||void 0===f||null===(m=f.findBy("id",x||Y).subMetas.findBy("id",F))||void 0===m?void 0:m.bestCategory,V=null===B||void 0===B||null===(E=B.findBy("fareType",H))||void 0===E?void 0:E.
1categories,q=null===V||void 0===V?void 0:V.sort((function(e,t){return e.averageGuestPrice-t.averageGuestPrice}))[0],W=Number(null===V||void 0===V||null===(g=V.findBy("id",K))||void 0===g||null===(O=g.guests)||void 0===O||null===(S=O[1])||void 0===S?void 0:S.fare),z=L>2?Number((null===V||void 0===V||null===(C=V.findBy("id",K))||void 0===C||null===(T=C.guests)||void 0===T||null===(P=T[2])||void 0===P?void 0:P.fare)||"Not a Number"):null,Q=(L<=2?t*L:2*t+(L-2)*z)||null,J=Q&&Number(Q+G),X=(null===q||void 0===q?void 0:q.guests[0].misc)||0,Z=Number((J/L).toFixed(2)),$=(null===q||void 0===q?void 0:q.guests[0].baseFare)-X===0?null===q||void 0===q?void 0:q.guests[0].fare:0;return h(h({cruisePrice:Q,lowestCruisePricing:R.isSet?X>0?$:0:null===q||void 0===q?void 0:q.averageGuestPrice,cruisePricePerPerson:Z,doubleOccupancyPrice:W},null!==z?{threeFourPrice:z}:{}),{},{tfpe:G,totalPrice:J})},C=function(e){var t,a="T"===m.a.id,n=e.invoicePricing,r=e.selectedCruise,o=e.itemizedPricing,i=e.admin,c=Object(E.a)().displayInclusivePricing;if(null===i||void 0===i||null===(t=i.data)||void 0===t?void 0:t.ube){var u,d,s,p,b,f,g,O,S,C,T,P,D,A,j=(i.data.ube||{}).guest,I=c(),_=i.data.ube.settings.features,R=_.displayAveragePrice,N=void 0!==R&&R,L=_.countriesToDisplayAveragePrice,w=void 0===L?[]:L,k=_.gftIncluded,x=void 0!==k&&k,M=_.displayRfceAmount,F=void 0!==M&&M,U=N&&w.includes(null===j||void 0===j||null===(u=j.contact)||void 0===u||null===(d=u.address)||void 0===d?void 0:d.country),B=r.guestCount,G=null===n||void 0===n?void 0:n.invoiceData,H=null===G||void 0===G?void 0:G.paymentSchedules,Y=null===G||void 0===G?void 0:G.guestInvoiceItems,K=o.isHotelPackageSelected,V=o.totalFare,q=o.totalPMTSAmount,W={guestWiseData:[]};W.isCALawApplicable=I,W.isAverageFare=U,null===o||void 0===o||null===(s=o.invoiceData)||void 0===s||s.forEach((function(e){var t=0!==e.taxesIncluded&&"0.00"!==e.taxesIncluded,a=Object(v.f)("Cruise Fare",I?Math.max((Number(e.cruiseFare)-Number(F?e.taxesFeeIncluded:e.taxesIncluded)).toFixed(2),0):e.cruiseFare),n=Object(v.f)("Taxes & Fees",Number(e.taxesFeeIncluded)+Number(e.taxes)),r=I&&F?[Object(v.f)("Required Cruises Fees & Expenses\u2020\u2020",Number(e.rcfe)),Object(v.f)("Government Taxes & Fees\u2020\u2020",Number(t?e.taxesIncluded:e.taxes))]:I&&!F?[Object(v.f)("Government Taxes & Fees\u2020\u2020",Number(t?e.taxesIncluded:e.taxes))]:[],o=Object(v.f)("Complementary Cabin Deposit\u2020",e.compCabinDeposit),i=Object(v.f)("Prepaid Crew Appreciation^",e.specialServices),c=Object(v.f)("Future Cruise Discount",e.cruiseCredits),u=Object(v.f)(K?"Hotel & Transfer Package":"Transfers",e.transfers),d=Object(v.f)("Vacation Protection",e.vacationProtection),s=I||U?[]:[Object(v.f)(x?"Taxes, Fees, & Port Expenses included":"Taxes, Fees, & Port Expenses",e.taxes)],p={name:Object(l.c)(e.guestName),total:Object(l.z)(e.totalGrossAmount,2),totalTaxFees:Number(e.taxesFeeIncluded)+Number(e.taxes),cruiseFare:I?Math.max((Number(e.cruiseFare)-Number(F?e.taxesFeeIncluded:e.taxesIncluded)).toFixed(2),0):e.cruiseFare,guestDescItems:[a].concat(r,[o,i,c,u,d],s).filter((function(e){return 0!==e[y.R.itemValueKey]&&"0.00"!==e[y.R.itemValueKey]||"Cruise Fare"===e[y.R.itemNameKey]})),guestSummaryItems:F?[a,n,o,i,c,u,d].concat(s).filter((function(e){return 0!==e[y.R.itemValueKey]&&"0.00"!==e[y.R.itemValueKey]||"Cruise Fare"===e[y.R.itemNameKey]})):[]};W.guestWiseData.push(p)}));var z=Number(null===Y||void 0===Y||null===(p=Y.filter((function(e){var t=e.code,a=e.seqNumber;return t&&"RSLT"===t&&"0"===a})))||void 0===p||null===(b=p[0])||void 0===b?void 0:b.amount),Q=Number(null===Y||void 0===Y||null===(f=Y.filter((function(e){var t=e.code,a=e.seqNumber;return t&&("TXFS"===t||"GVTF"===t)&&"0"===a})))||void 0===f||null===(g=f[0])||void 0===g?void 0:g.amount);I||(W.tfpe=Q);var J,X=0;if(a)X=Number(null===Y||void 0===Y||null===(J=Y.find((function(e){var t=e.code,a=e.seqNumber;return"MODS"===t&&"0"===a})))||void 0===J?void 0:J.amount);var Z=z+(x?0:Q)+X,$=Number(null===Y||void 0===Y||null===(O=Y.find((function(e){var t=e.code,a=e.seqNumber;return"RSLT"===t&&"1"===a})))||void 0===O?void 0:O.amount)||null,ee=B>2&&Number(null===Y||void 0===Y||null===(S=Y.find((function(e){var t=e.code,a=e.seqNumber;return"RSLT"===t&&"3"===a}
1)))||void 0===S?void 0:S.amount)||null,te=Number((Z/B).toFixed(2)),ae=0;null===o||void 0===o||null===(C=o.invoiceData)||void 0===C||C.forEach((function(e){var t=e.transfers;ae+=Number(t)}));var ne=0;null===o||void 0===o||null===(T=o.invoiceData)||void 0===T||T.forEach((function(e){var t=e.vacationProtection;ne+=Number(t)}));var re=(null===Y||void 0===Y||null===(P=Y.find((function(e){var t=e.code,a=e.seqNumber;return 0===Number(a)&&"MSCR"===t})))||void 0===P?void 0:P.amount)||0,oe=(null===Y||void 0===Y||null===(D=Y.find((function(e){var t=e.code,a=e.seqNumber;return 0===Number(a)&&"SSVC"===t})))||void 0===D?void 0:D.amount)||0,ie=(null===Y||void 0===Y||null===(A=Y.find((function(e){var t=e.code,a=e.seqNumber;return 0===Number(a)&&"MISC"===t})))||void 0===A?void 0:A.amount)||0,ce=Number((Number(z)+Number(ae)+Number(ne)+Number(oe)+(Number(re)||0)+Number(ie)||0).toFixed(2)),ue="";U&&(ue=I?"".concat(i.data.ube.bookingLocation.currencySymbol).concat(Object(l.z)(Math.round(V/B),0)," avg/person"):"".concat(i.data.ube.bookingLocation.currencySymbol).concat(Object(l.z)(Math.round(ce/B),0)," avg/person"),W.averagePriceText=ue),W.totalPrice=V,W.isGftIncluded=x,W.totalPMTSAmount=q;var de=(null===H||void 0===H?void 0:H.find((function(e){var t=e.code,a=e.seqNumber;return"3"===t&&"0"===a})))||{},se=Math.max((null===de||void 0===de?void 0:de.amount)-q,0);return h(h(h({fareSummaryDataObject:W,cruisePrice:ce},ue?{averagePriceText:ue}:{}),{},{cruisePricePerPerson:te},null!=ee?{threeFourPrice:ee}:{}),{},{tfpe:Q,totalPrice:Z,doubleOccupancyPrice:$,transferPrice:ae,vacationProtectionPrice:ne,depositAmount:se})}},T=function(e){var t=e.pageLoaded,a=e.callback,r=e.deps,o=Object(c.useRef)(!0);Object(c.useEffect)((function(){o.current?o.current=!1:t.status&&a(),(null===t||void 0===t?void 0:t.packagePage)&&a()}),Object(n.a)(r))},P=function(e){var t=e.campaigns,a=e.login,r=e.selectedCruise,o=e.guestCount,i=e.pageLoaded,c=e.admin,u=r.currentCruise,d=void 0===u?{}:u,s=((null===t||void 0===t?void 0:t.data)||{}).campaignCodes,l=void 0===s?[]:s;T({pageLoaded:i,callback:function(){var e,t,r,i,u,s,y,b=(Object(v.d)(o,d.pricing,c)||{}).totalPrice;if((null===a||void 0===a||null===(e=a.data)||void 0===e?void 0:e.status)&&((null===l||void 0===l?void 0:l.length)!==(null===(t=window.digitalData)||void 0===t||null===(r=t.product)||void 0===r||null===(i=r.campaignCodes)||void 0===i?void 0:i.length)||b!==(null===(u=window.digitalData)||void 0===u||null===(s=u.product)||void 0===s||null===(y=s.price)||void 0===y?void 0:y.totalPrice))){var f=[].concat(Object(n.a)(window.digitalData.product.campaignCodes),Object(n.a)(l));p.a.updateDataLayer({product:{campaignCodes:f,price:Object(v.d)(o,d.pricing,c)}})}},deps:[d.pricing,t]})},D=function(e){var t=e.pageLoaded,a=e.filters,n=e.cruiseType,r=e.ports,o=e.trades,i=e.ships,c=a.date,u=a.duration,d=a.port,s=a.ship,l=a.trade,v=a.tourduration,b=a.sequence,f=[{id:"any",name:"any"}];T({pageLoaded:t,callback:function(){var e=h(h(h({},c?{dates:{embarkDate:(null===c||void 0===c?void 0:c.map((function(e){var t=null===e||void 0===e?void 0:e.split("_");return new Date(t[0],t[1]-1,1)})))||"any"}}:{}),u?{cruiseDuration:u.map((function(e){return y.G.find((function(t){return t.id===e})).analytics}))||"any"}:{}),{},{port:(null===d||void 0===d?void 0:d.length)>0?d.map((function(e){return r.data.find((function(t){return t.id===e}))})):f,ship:(null===s||void 0===s?void 0:s.length)>0?s.map((function(e){return i.data.find((function(t){return t.id===e}))})):f,trade:(null===l||void 0===l?void 0:l.length)>0?l.map((function(e){return o.data.find((function(t){return t.id===e}))})):f},"T"===n.id?{cruisetour:h(h({},v?{duration:v.map((function(e){return y.hb.find((function(t){return t.id===e})).analytics}))||"any"}:{}),b?{sequence:a.sequence||"any"}:{})}:{});p.a.updateDataLayer({search:e})},deps:[a]})},A=function(e){var t,a,n,r,o=e.pageLoaded,i=e.filters,c=i.optionsFilters,u=void 0===c?{}:c,d=i.optionsFiltersUpdated,s=e.metas,v=e.subtrades;if(d){var y=u.GUESTS,f=u.SORT,m=u.STATEROOM,E=u.REGIONS;t=y,a=f,n=m,r=E}T({pageLoaded:{status:o.status&&u.isFiltersUpdated},callback:function(){var e,o,i=h(h(h(h({},t?{guestCount:parseInt(t)||2}:{}),n?{meta:{id:n||"any",name:Object(b.l)(s,n)||"any"}}:{}),a?{sortBy:Object(l.Y)(a)||"any"}:{}),r?{subtrade:{name:(null===(e=v.data)||void 0===e||null===(o=e.findBy("id",r))||void 0===o?void 0:o.name)||r,id:r}}:{});p.a.updateDataLayer({search:i})},deps:[u]})},j=function(e){var t,a=e.selectedCruise,n=e.ships,r=e.pageLoaded,o=e.filters.optionsFilters,c=void 0===o?{}:o,u=e.admin,d=a.currentCruise,s=void 0===d?{}:d,l=a.guestCount,y=((null===s||void 0===s||null===(t=s.voyage)||void 0===t?void 0:t.ship)||{}).id,b=l||c.GUESTS||"2";T({pageLoaded:r,callback:function(){var e,t,r={voyage:{id:a.currentCruise.id,name:a.product.name},ship:{id:a.currentCruise.voyage.ship.id,name:null===n||void 0===n||null===(e=n.data)||void 0===e||null===(t=e.findBy("id",y))||void 0===t?void 0:t.name},dates:{daysUntilEmbark:i()(a.currentCruise.startDate).diff(i()(new Date),"days"),embarkD
1ate:new Date(i()(a.startDate).format("MM/DD/YYYY"))},price:Object(v.d)(b,s.pricing,u)};p.a.updateDataLayer({product:r})},deps:[a.id]})},I=function(e){var t=e.selectedCruise,a=e.pageLoaded,n=e.filters.optionsFilters,r=void 0===n?{}:n,o=e.stateroomLocation,i=t.guestCount||r.GUESTS||"2";T({pageLoaded:a,callback:function(){var e,t=h(h({},null===(e=f.b.getWithExpiry("analytics"))||void 0===e?void 0:e.product),{},{ada:null===o||void 0===o?void 0:o.isADASelected,guestCount:i});p.a.updateDataLayer({product:t})},deps:[null===o||void 0===o?void 0:o.isADASelected,i]})},_=function(e){var t,a,n,r,o,i,u,d,v,y,b,m=e.selectedCruise,E=e.pricing,g=e.stateroomLocation,O=e.pageLoaded,C=e.metas,P=m.currentCruise,D=void 0===P?{}:P,A=m.flowSelected,j=sessionStorage.getItem("firstAvailableMetaId"),I=C.subMetaId,_=C.desc,R=C.metaId,N=void 0===R?j:R,L=("manual"===A?(null===E||void 0===E||null===(t=E.availablePricing)||void 0===t||null===(a=t[0])||void 0===a||null===(n=a.cruises[0])||void 0===n?void 0:n.pricing)||{}:(null===E||void 0===E||null===(r=E.data)||void 0===r||null===(o=r[0])||void 0===o||null===(i=o.cruises[0])||void 0===i?void 0:i.pricing)||{}).fares,w=void 0===L?[]:L,k=null===D||void 0===D||null===(u=D.pricing)||void 0===u?void 0:u.fareType,x=((null===(d=w.findBy("fareType",k))||void 0===d||null===(v=d.metas)||void 0===v?void 0:v.findBy("id",N))||{}).bestCategory,M=(w.findBy("fareType",k)||{}).categories;Object(c.useEffect)((function(){if(null===w||void 0===w?void 0:w.length){var e,t,a={},n=null===w||void 0===w||null===(e=w.findBy("fareType",k))||void 0===e?void 0:e.categories,r=(w.findBy("fareType",k)||{}).metas,o=void 0===r?[]:r;o.forEach((function(e){var t=e.id,r=e.subMetas;(void 0===r?[]:r).forEach((function(e){var r,o,i,c=e.id,u=e.bestCategory,d="".concat(t).concat(c),s=n.findBy("id",u);s&&_&&(a[d]={subMetaName:null===(r=_.findBy("id",t))||void 0===r||null===(o=r.subMetas)||void 0===o||null===(i=o.findBy("id",d))||void 0===i?void 0:i.name,count:s.availability})}))}));var i=Object(l.G)({metas:o,isADASelected:null===g||void 0===g?void 0:g.isADASelected});p.a.updateDataLayer({product:h(h({},null===(t=f.b.getWithExpiry("analytics"))||void 0===t?void 0:t.product),{},{availabilityCount:a,categoryMappingWithSubMetaIds:i})})}}),[w]);var F=Object(s.b)(D)&&-1!==s.a.findIndex((function(e){return e===I})),U=F&&((null===(y=s.g[null===N||void 0===N?void 0:N.toUpperCase()])||void 0===y?void 0:y.amenities)||[]),B={enabled:F,included:U&&U.flatMap((function(e){return e.title}))};T({pageLoaded:O,callback:function(){var t,a,n={};if(N||I){var r,o;if(N){var i,c,u,d,s,l,v=null===M||void 0===M||null===(i=M.findBy("id",x))||void 0===i||null===(c=i.guests)||void 0===c||null===(u=c[0])||void 0===u?void 0:u.fare,y=null===(d=C.data)||void 0===d||null===(s=d.filterBy("id",N))||void 0===s||null===(l=s[0])||void 0===l?void 0:l.name;t={id:N,name:y},n=S(e,v)}if(I){var b,m,E,O=null===g||void 0===g?void 0:g.selectedFare,T=null===_||void 0===_||null===(b=_.findBy("id",null===I||void 0===I?void 0:I[0]))||void 0===b||null===(m=b.subMetas)||void 0===m||null===(E=m.findBy("id",I))||void 0===E?void 0:E.name;a={id:I,name:T},n=S(e,O)}p.a.updateDataLayer({product:h(h({},null===(r=f.b.getWithExpiry("analytics"))||void 0===r?void 0:r.product),{},{price:h(h({},window.digitalData.product.price),n),meta:t,submeta:a||{},fareType:B.enabled?"PREMIER":(null===(o=g.selectedRoom)||void 0===o?void 0:o.fareTypeSelected)||k,sanctuary:B})})}},deps:[N,I,null===(b=g.selectedRoom)||void 0===b?void 0:b.fareTypeSelected,B]})},R=function(e){var t,a,n,r,o,i,c,u=e.selectedCruise,d=e.stateroomLocation,l=e.pageLoaded,v=u.currentCruise,y=u.zoneId,b=u.subMetaId,f=u.metaId,m=(null===d||void 0===d||null===(t=d.data)||void 0===t||null===(a=t.zones)||void 0===a||null===(n=a.findBy("id",y))||void 0===n?void 0:n.price)||(null===d||void 0===d?void 0:d.selectedFare),E=Object(s.b)(v)&&-1!==s.a.findIndex((function(e){return e===b})),g=E&&((null===(r=s.g[null===f||void 0===f?void 0:f.toUpperCase()])||void 0===r?void 0:r.amenities)||[]),O={enabled:E,included:g&&g.flatMap((function(e){return e.title}))},C=O.enabled?"PREMIER":(null===v||void 0===v||null===(o=v.pricing)||void 0===o?void 0:o.fareType)||"BESTFARE",P=null===(i=d.selectedRoom)||void 0===i?void 0:i.nonRefFlag,D="D"!==P&&P?"refund
1able":"non-refundable";T({pageLoaded:l,callback:function(){var t;p.a.updateDataLayer({product:{price:h(h({},window.digitalData.product.price),S(e,m)),fareType:O.enabled?"PREMIER":(null===(t=d.selectedRoom)||void 0===t?void 0:t.fareTypeSelected)||C,sanctuary:O,deposit:D}})},deps:[y,null===(c=d.selectedRoom)||void 0===c?void 0:c.fareTypeSelected,O,D]})},N=function(e,t){var a,n,r,o,i=e.metas,c=e.pageLoaded,u=t.stateroom,d=u.fare,l=u.metaId,v=u.fullSubMetaId,y=u.subMetaName,b=null===i||void 0===i||null===(a=i.data)||void 0===a||null===(n=a.findBy("id",l))||void 0===n?void 0:n.name,f=e.selectedCruise,m=e.stateroomLocation,E=f.currentCruise,g=Object(s.b)(E)&&-1!==s.a.findIndex((function(e){return e===v})),O=g&&((null===(r=s.g[null===l||void 0===l?void 0:l.toUpperCase()])||void 0===r?void 0:r.amenities)||[]),C={enabled:g,included:O&&O.flatMap((function(e){return e.title}))},P=C.enabled?"PREMIER":(null===E||void 0===E||null===(o=E.pricing)||void 0===o?void 0:o.fareType)||"BESTFARE";T({pageLoaded:c,callback:function(){var t;p.a.updateDataLayer({product:{price:h(h({},window.digitalData.product.price),S(e,d)),submeta:{id:v,name:y},meta:{id:l,name:b},fareType:C.enabled?"PREMIER":(null===(t=m.selectedRoom)||void 0===t?void 0:t.fareTypeSelected)||P,sanctuary:C}})},deps:[u,u.fullSubMetaId,u.metaId,g]})},L=function(e){var t,a,n,r=e.stateroomLocation,o=e.selectedCruise.currentCruise,i=(null===o||void 0===o||null===(t=o.pricing)||void 0===t?void 0:t.fareType)||"BESTFARE",c=null===r||void 0===r?void 0:r.selectedFare,u=(null===o||void 0===o||null===(a=o.sale)||void 0===a?void 0:a.name)&&{id:null===o||void 0===o?void 0:o.sale.name.code,name:null===o||void 0===o?void 0:o.sale.name.name};T({pageLoaded:{packagePage:!0},callback:function(){var t,a;p.a.updateDataLayer({product:h(h(h({},null===(t=f.b.getWithExpiry("analytics"))||void 0===t?void 0:t.product),u?{sale:u}:{}),{},{price:h(h({},window.digitalData.product.price),S(e,c)),fareType:(null===(a=r.selectedRoom)||void 0===a?void 0:a.fareTypeSelected)||i})})},deps:[null===(n=r.selectedRoom)||void 0===n?void 0:n.fareTypeSelected,e.pricing]})},w=function(e){var t,a,n=C(e),r=e.refundableDeposit,o=e.selectedCruise,i=e.stateroomLocation,c=h({},(null===(t=f.b.getWithExpiry("analytics"))||void 0===t?void 0:t.product)||{});c.dates&&(c.dates.embarkDate=new Date(c.dates.embarkDate)),c&&(c.deposit=r?"refundable":"non-refundable");T({pageLoaded:{status:!0},callback:function(){var e,t,a,r;p.a.updateDataLayer({product:h(h({},c),{},{couponCode:null===o||void 0===o||null===(e=o.manualCouponCode)||void 0===e?void 0:e.code,protection:(null===o||void 0===o?void 0:o.cancellationAssurance)?{standardVacationProtectionPrice:null===o||void 0===o||null===(t=o.cancellationAssurance)||void 0===t?void 0:t.standardVacationProtectionPrice,standardVacationProtectionSelections:null===o||void 0===o||null===(a=o.cancellationAssurance)||void 0===a?void 0:a.standardVacationProtectionSelections}:null,price:h(h({},window.digitalData.product.price),n),fareType:(null===(r=i.selectedRoom)||void 0===r?void 0:r.fareTypeSelected)||"BESTFARE"})})},deps:[n,null===o||void 0===o||null===(a=o.manualCouponCode)||void 0===a?void 0:a.code]})},k=function(e){var t=e.actionType,a=e.route;T({pageLoaded:{status:!0},callback:function(){var r,o,i,c,u=[],d=[],s="guest-info"===a?"edit":"".concat(Object(l.D)(y.Q,a),"-").concat(t);(null===e||void 0===e||null===(r=e.guestInformation)||void 0===r?void 0:r.guestData)&&(u.push(null===(i=e.guestInformation.guestData.flatMap((function(e){return e.address})))||void 0===i?void 0:i.flatMap((function(e){return e.email}))),d.push(null===(c=e.guestInformation.guestData.flatMap((function(e){return e.address})))||void 0===c?void 0:c.flatMap((function(e){return e.phone.number}))));var v={email:Object(n.a)(new Set(u[0])),phoneNumber:Object(n.a)(new Set(d[0]))},b=f.b.getWithExpiry("analytics")||{};p.a.updateDataLayer(h(h(h({},(null===(o=window.digitalData)||void 0===o?void 0:o.page)||{}),b.page||{}),{},{page:{level4:s},product:h(h({},b.product||{}),{},{contactInformation:v})}))},deps:[d.a.query,e.guestInformation.guestData]})},x=function(e){var t=e.pageLoaded,a=C(e)||{},n=a.totalPrice,r=a.tfpe,o=a.transferPrice,i=f.b.getWithExpiry("analytics").product.price;T({pageLoaded:t,callback:function(){t.status&&p.a.updateDataLayer({product:{price:h(h({},i),{},{transferPrice:o,totalPrice:n+o,tfpe:r})}})},deps:[o,t.status]})},M=function(e){var t=e.pageLoaded,a=C(e)||{},n=a.totalPrice,r=a.tfpe,o=a.vacationProtectionPrice,i=a.transferPrice,c=f.b.getWithExpiry("analytics").product.price;T({pageLoaded:t,callback:function(){t.status&&p.a.updateDataLayer({product:{price:h(h({},c),{},{vacationProtectionPrice:Math.round(100*o/100),totalPrice:Math.round(100*(n+o+i)/100),tfpe:r})}})},deps:[o,t.status]})},F=function(e,t){var a=e.payment,n=e.selectedCruise,r=t.isCruiseDepositAvailable,o=t.pricingState,i=o.payItAllNowAmount,c=o.cruiseDepositAmount,u=t.isFlexPayTabActive,d=a.paymentAmountType,s=a.futureCruiseDeposits,l=a.isPayPal,v=a.totalAmountToBePaid;T({pageLoaded:{status:!0},callback:function(){var e,t,a,o,y,b,m,E,g=d&&("FULL"===d?"full-payment":"DEPOSIT"===d?"deposit":"hold"),O=[];O.push("full-payment"),r&&!O.includes("deposit")&&O.push("deposit"),s.length&&!O.includes("fcd")&&O.push("fcd"),E=O.includes("fcd")&&s.findBy("applied",!0)?0===v?"fcd":l?"fcd-and-paypal":u?"fcd-and-flexpay":"fcd-and-creditcard":"FREE"===d?"none":l?"paypal":u?"flexp
1ay":"creditcard";var S="D"===(null===n||void 0===n||null===(e=n.selectedRoom)||void 0===e?void 0:e.nonRefFlag),C=O.filter((function(e){return"fcd"!==e})).map((function(e){switch(e){case"full-payment":return{type:e,refundable:!1,price:i};case"deposit":return{type:e,refundable:!S,price:c};default:return null}}));p.a.updateDataLayer({product:h(h({},null===(t=f.b.getWithExpiry("analytics"))||void 0===t?void 0:t.product),{},{dates:h(h({},null===(a=f.b.getWithExpiry("analytics"))||void 0===a||null===(o=a.product)||void 0===o?void 0:o.dates),{},{embarkDate:new Date(null===(y=f.b.getWithExpiry("analytics"))||void 0===y||null===(b=y.product)||void 0===b||null===(m=b.dates)||void 0===m?void 0:m.embarkDate)}),payment:h(h({},g?{typeSelected:g}:{}),{},{typesDisplayed:O,method:E}),paymentOptions:C})})},deps:[l,a,i,c,u]})},U=function(e,t,a,n){var r=e.payment,o=e.selectedCruise,i=r.paymentAmountType,c=r.cards,u=r.futureCruiseDeposits,d=r.isPayPal,s=r.totalAmountToBePaid,l=r.cruiseDepositAmount,v=r.payItAllNowAmount;T({pageLoaded:{status:!0},callback:function(){var e,r,y,b,m,E,g,O,S=i&&("FULL"===i?"full-payment":"DEPOSIT"===i?"deposit":"hold"),C=[];C.push("full-payment"),n&&!C.includes("hold")&&C.push("hold"),!a&&!C.includes("deposit")&&C.push("deposit"),t&&u.length>0&&!C.includes("fcd")&&C.push("fcd"),O=C.includes("fcd")&&u.findBy("applied",!0)?0===s?"fcd":d?"fcd-and-paypal":"fcd-and-creditcard":"FREE"===i?"none":d?"paypal":"creditcard";var T="D"===(null===o||void 0===o||null===(e=o.selectedRoom)||void 0===e?void 0:e.nonRefFlag),P=C.filter((function(e){return"fcd"!==e})).map((function(e){switch(e){case"full-payment":return{type:e,refundable:!1,price:v};case"hold":return{type:e,refundable:!T,price:0};case"deposit":return{type:e,refundable:!T,price:l};default:return null}}));p.a.updateDataLayer({product:h(h({},null===(r=f.b.getWithExpiry("analytics"))||void 0===r?void 0:r.product),{},{dates:h(h({},null===(y=f.b.getWithExpiry("analytics"))||void 0===y||null===(b=y.product)||void 0===b?void 0:b.dates),{},{embarkDate:new Date(null===(m=f.b.getWithExpiry("analytics"))||void 0===m||null===(E=m.product)||void 0===E||null===(g=E.dates)||void 0===g?void 0:g.embarkDate)}),payment:h(h({},S?{typeSelected:S}:{}),{},{typesDisplayed:C,method:O,creditcardCount:c.length}),paymentOptions:P})})},deps:[d,r]})},B=function(e){var t,a,n,r,o,i=Object(c.useRef)(),u=e.payment,d=e.pageLoaded,s=e.selectedCruise,l=u.bookingNumber,v=u.paymentResponse,y=u.totalAmountToBePaid,b=u.futureCruiseDeposits,m=null===s||void 0===s||null===(t=s.payment)||void 0===t?void 0:t.bookingNumber,E=u.paymentAmountType,O=null===v||void 0===v||null===(a=v.payments)||void 0===a?void 0:a.findBy("paymentStatus","FAILED"),S=(null===v||void 0===v||null===(n=v.payments)||void 0===n||null===(r=n.filterBy("paymentStatus","SUCCESS"))||void 0===r?void 0:r.length)||0,C=S>0&&O?"creditcard":O?"none":null===(o=window.digitalData.product.payment)||void 0===o?void 0:o.method;T({pageLoaded:d,callback:function(){p.a.updateDataLayer({product:h(h({},f.b.getWithExpiry("analytics").product),{},{booking:h(h({},window.digitalData.product.booking),{},{complete:!0})})})},deps:[d.status]}),T({pageLoaded:{status:!0},callback:function(){var e,t,a,n,r,o,i=0;0===y?i=b.reduce((function(e,t){return t.applied?e+t.amount:e}),0):null===v||void 0===v||null===(o=v.payments)||void 0===o||o.forEach((function(e){i+="SUCCESS"===e.paymentStatus?e.amountCharged:0}));"FULL"!==E&&"DEPOSIT"!==E||(E=O?"HOLD":E),p.a.updateDataLayer({product:h(h({},f.b.getWithExpiry("analytics").product),{},{dates:h(h({},null===(e=window.digitalData)||void 0===e||null===(t=e.product)||void 0===t?void 0:t.dates),{},{embarkDate:new Date(null===(a=window.digitalData)||void 0===a||null===(n=a.product)||void 0===n||null===(r=n.dates)||void 0===r?void 0:r.embarkDate)}),booking:h(h({},window.digitalData.product.booking),{},{id:l||m}),payment:h(h({},window.digitalData.product.payment),{},{creditcardCount:S,method:C,methodAmount:i})})})},deps:[E,d.status,l,m]}),Object(c.useEffect)((function(){if(!O&&(l||m)){var e=l||m;if(e&&i.current!==e){var t,a,n,r,o;i.current=e;var c=s.currentCruise,u=s.metaId,d=s.product,p=s.selectedFare,v=((null===(t=window.digitalData)||void 0===t||null===(a=t.activity)||void 0===a?void 0:a.ube)||{}).ube,y={voyageID:null===c||void 0===c?void 0:c.id,transactionID:e,totalRevenue:Number(p),productId:d.id,name:d.name,market:(null===v||void 0===v||null===(n=v.bookingLocation)||void 0===n?void 0:n.country)||"US",currency:(null===v||void 0===v||null===(r=v.bookingLocation)||void 0===r?void 0:r.primaryCurrency)||"USD",cabin_type:(null===s||void 0===s||null===(o=s.selectedRoom)||void 0===o?void 0:o.selectedBestCategory)||u,searchHub:"cruise_search_us",pipeline_id:"cmh-search-cruise_search_us"};Object(g.c)(g.a.purchase,y)}}}),[l,m,O])}},yVtN:function(e,t,a){"use strict";a.d(t,"i",(function(){return te})),a.d(t,"n",(function(){return ae})),a.d(t,"m",(function(){return ne})),a.d(t,"c",(function(){return re})),a.d(t,"d",(function(){return oe})),a.d(t,"o",(function(){return ie})),a.d(t,"k",(function(){return ce})),a.d(t,"b",(function(){return ue})),a.d(t,"p",(function(){return de})),a.d(t,"r",(function(){return se})),a.d(t,"q",(function(){return le})),a.d(t,"e",(function(){return pe})),a.d(t,"j",(function(){return ve})),a.d(t,"l",(function(){return ye})),a.d(t,"h",(function(){return be})),a.d(t,"g",(function(){return fe})),a.d(t,"f",(function(){return me})),a.d(t,"a",(function(){return Ee}));var n=a("ODXe"),r=a("rePB"),o=a("o0o1"),i=a.n(o),c=a("HaE+"),u=a("KQm4"),d=a("nOHt"),s=a.n(d),l=a("+kwO"),p=a("b7Qq"),v=a("zuR4"),y=a("lf3Y"),b=a("H1lf"),f=a("20ht"),m=a("00EI");function E(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function g(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};
1t%2?E(Object(a),!0).forEach((function(t){Object(r.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):E(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var O=function(e){var t=e.voyageIds,a=e.tourIds;return function(){var e=Object(c.a)(i.a.mark((function e(n,r){var o,c,u,d,s,l,p,E,O,h,S,C,T,P,D,A,j,I,_,R,N,L,w,k,x;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r(),p=l.admin,E=null===p||void 0===p||null===(o=p.data)||void 0===o?void 0:o.ube,O=null===E||void 0===E?void 0:E.hasUbeId,h=null===E||void 0===E?void 0:E.bookingLocation,S=h.primaryCurrency,C=h.secondaryCurrency,T=null===E||void 0===E||null===(c=E.settings)||void 0===c?void 0:c.features,P=T.avmPromoTypes,D=T.includeBestBuyPromos,A=null===E||void 0===E||null===(u=E.guest)||void 0===u||null===(d=u.contact)||void 0===d||null===(s=d.address)||void 0===s?void 0:s.country,j=!0,I=a?"T":"C",_=a?"cruisetours":"cruises",R=r(),N=R.filters,L="".concat(f.b,"/resdb/p1.0/products"),w=Object(b.d)(O,S,C,P,D),k=g(g(g({agencyCountry:A||"US",cruiseType:I,voyageStatus:"A",webDisplay:"Y",promoFilter:t,light:!1},t&&{voyages:t}),a&&{tours:a}),w),e.next=15,Object(v.a)(L,{headers:m.b,params:k,withCredentials:!0}).then((function(e){return e.data.products})).catch((function(e){throw n(Object(y.a)(e,k)),e}));case 15:return x=e.sent,e.abrupt("return",n({type:"FETCH_RECENTLY_VIEWED_PRODUCTS",payload:{cruiseType:I,products:x,isFullProducts:!0,responseType:_,filters:N,recentlyViewed:j}}));case 17:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},h=a("5GSB"),S=a("MxiE"),C=a("jskI"),T=a("JjV9"),P=a("931j"),D=a("CRX1"),A=a("YJKG"),j=a("GLKd"),I=a("Nfny"),_=function(){return function(){var e=Object(c.a)(i.a.mark((function e(t,a){var n,r,o,c,u,d,s,l,p,y,b,E,g,O,h;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=a(),u=c.admin,d=c.airDiscount,s=null===u||void 0===u||null===(n=u.data)||void 0===n?void 0:n.ube,l=null===s||void 0===s||null===(r=s.settings)||void 0===r||null===(o=r.features)||void 0===o?void 0:o.displayAirSaleBadge,p=(null===s||void 0===s?void 0:s.bookingLocation)||{},y=p.primaryCurrency,b=p.defaultHomeCity,!l||d.data){e.next=18;break}return E="".concat(f.b,"/resdb/p1.0/air-discount"),g={bookingCurrency:y,city:b},e.prev=7,e.next=10,Object(v.a)(E,{headers:m.b,params:g,withCredentials:!0});case 10:return O=e.sent,h=O.data.airDiscounts,e.abrupt("return",t({type:"FETCH_AIR_DISCOUNT",payload:h}));case 15:e.prev=15,e.t0=e.catch(7),I.b.error(e.t0,"ERROR.FETCHING.AIR-DISCOUNT");case 18:case"end":return e.stop()}}),e,null,[[7,15]])})));return function(t,a){return e.apply(this,arguments)}}()},R=a("o2ID"),N=a("KciO"),L=a("pizl"),w=a("RAqO"),k=a("pXOF"),x=function(e){return function(){var t=Object(c.a)(i.a.mark((function t(a,n){var r,o,c,u,d,s;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n(),o=r.scenicPorts.cachedScenicPorts,c=void 0===o?{}:o,u="".concat(f.b,"/resdb/p1.0/products/scenic-ports"),d={voyages:e},t.t0=c[e],t.t0){t.next=8;break}return t.next=7,Object(v.a)(u,{headers:m.b,params:d,withCredentials:!0}).then((function(e){return e.data.voyages[0]||[]})).catch((function(e){throw a(Object(y.a)(e)),e}));case 7:t.t0=t.sent;case 8:return s=t.t0,t.abrupt("return",a({type:"FETCH_SCENIC_PORTS",payload:s}));case 10:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}()},M=a("JH2C"),F=a("S9gF"),U=a("K92u"),B=a("gdvo"),G=a("piak"),H=a("aD8Y"),Y=a("k8TQ"),K=a("wyBh"),V=a("+Ki4"),q=a("HYuQ"),W=a("kLa5"),z=a("fGma"),Q=a("bhej"),J=a("iFXP");a("R/iB"),a("wd/R"),a("Sd6l");function X(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function Z(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?X(Object(a),!0).forEach((function(t){Object(r.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):X(Object(a)).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var $=function(){var e,t,a,n,r,o=m.a.id,i=Object(F.d)(),c=(null===i||void 0===i?void 0:i.ube)||(null===(e=window.digitalData)||void 0===e||null===(t=e.activity)||void 0===t?void 0:t.ube);return"C"===o&&c&&!c.hasUbeId&&(null===(a=window.digitalData)||void 0===a||null===(n=a.activity)||void 0===n||null===(r=n.ube)||void 0===r?void 0:r.skipPages)||[]},ee=function(e){var t=e.bookingSession,a=e.router,n=e.dispatch,r=t.isADASelected,o=t.flowSelected,i=t.guestCount,c=t.selectedRoom;return i?r||o?!(!r||c.id)&&(n({type:"SET_INLINE_MESSAGING",payload:{errorPage:"/stateroom-location"}}),a.push("/stateroom-location"),!0):(n({type:"SET_INLINE_MESSAGING",payload:{errorPage:"/choose-location"}}),a.push("/choose-location"),!0):(a.push("/results?resType=".concat(m.a.id)),!0)},te=function(e){var t=e.route,a=e.admin;return function(e,n){var r,o,i,c=null===a||void 0===a||null===(r=a.data)||void 0===r||null===(o=r.ube)||void 0===o||null===(i=o.settings)||void 0===i?void 0:i.offerShopping,u="cruisetours"===t?"T":"C";if(c)return e({type:"PAGE_LOADED",payload:!1}),Promise.resolve([e(Object(S.a)()).then((function(){return e(Object(p.b)({route:t,resType:u}))}))]).then((function(){return Promise.all([e(Object(h.a)()),e(Object(P.a)()),e(Object(T.b)()),e(Object(w.a)()),e(Object(C.a)())])})).then((function(){!n().pageLoaded.status&&V.a.routeLoad(!0,V.b.formatAndSetLegacyLandingData,e,n,t),e({type:"PAGE_LOADED",payload:!0})}))}},ae=function(e){var t=e.route,a=e.admin;return function(){var e=Object(c.a)(i.a.mark((function e(n,r){var o,c,u,d,l,v;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=null===a||void 0===a||null===(o=a.data)||void 0===o||null===(c=o.ube)||void 0===c||null===(u=c.settings)||void 0===u?void 0:u.offerShopping,l=Object(q.b)(s.a),v=l.resType,Object(m.c)({id:v||"C",name:"T"===v?"cruisetours":"cruises"}),!d){e.next=6;break}return n({type:"PAGE_LOADED",payload:!1}),e.abrupt("return",Promise.all([!r().aem.masterMetaData&&n(Object(J.d)()),n(Object(D.a)()),n(Object(A.d)()),n(Object(S.a)())]).then((function(){return Promise.all([n(Object(p.b)({route:t,resType:v}))])})).then((function(){return Promise.all([n(Object(J.j)()),n(Object(j.b)({})),n(Object(h.a)()),n(Object(w.a)()),n(Object(C.a)()),n(Object(T.b)()),n(Object(P.a)()),n(_()),n(Object(L.c)())])})).then((function(){!r().pageLoaded.status&&V.a.routeLoad(!0,V.b.formatAndSetLegacyLandingData,n,r,t),n({type:"PAGE_LOADED",payload:!0})})));case 6:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},ne=function(e,t,a,n,r,o){return function(){var d=Object(c.a)(i.a.mark((function c(d,s){var l,p,v,y;return i.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:y=null===e||void 0===e||null===(l=e.data)||void 0===l||null===(p=l.ube)||void 0===p||null===(v=p.settings)||void 0===v?void 0:v.offerShopping,!0,y&&(d({type:"PAGE_LOADED",payload:!1}),Promise.all([].concat(Object(u.a)(a?[d(O({voyageIds:a}))]:[]),Object(u.a)(n&&r?[d(O({tourVoyageIds:r,tourIds:n}))]:[]),[d(Object(D.a)()),d(Object(A.d)())])).then((function(){return Promise.all([a&&d(Object(j.b)({voyageIds:a,recentlyViewed:true})),(null===o||void 0===o?void 0:o.length)>0&&d(Object(j.b)({voyageAndTourIds:o,recentlyViewed:true})),d(Object(h.a)()),d(Object(S.a)()),d(Object(w.a)()),d(Object(C.a)()),d(Object(T.b)()),d(Object(P.a)()),d(_()),d(Object(L.c)())])})).then((function(){!s().pageLoaded.status&&V.a.routeLoad(!0,V.b.formatAndSetLegacyLandingData,d,s,t),d({type:"PAGE_LOADED",payload:!0})})));case 3:case"end":return i.stop()}}),c)})));return function(e,t){return d.apply(this,arguments)}}()},re=function(e,t){var a=e.cruiseType,n=e.selectedCruise,r=e.route,o=e.admin,d=e.pricing;return function(){var e=Object(c.a)(i.a.mark((function e(c,s){var v,y,b,f,m,E,g,O,I;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m=null===o||void 0===o||null===(v=o.data)||void 0===v||null===(y=v.ube)||void 0===y||null===(b=y.settings)||void 0===b?void 0:b.offerShopping,E=null===(f=n.product)||void 0===f?void 0:f.id,g="T"===a.id?t.split("-")[0]:t,O=s(),I=O.products,m&&(c({type:"PAGE_LOADED",payload:!1}
1),Promise.all([].concat(Object(u.a)(I["C"===a.id?"cruises":"cruisetours"].data?[]:[c(Object(p.b)({route:r,resType:a.id}))]),[c(Object(D.a)()),c(Object(A.d)())])).then((function(){return Promise.all([].concat(Object(u.a)(d.cruises.data?[]:[c(Object(j.b)({voyageId:t,productId:E}))]),[c(Object(J.j)()),c(Object(S.a)()),c(Object(P.a)()),c(Object(T.b)()),c(x(g)),c(Object(h.a)()),c(Object(w.a)()),c(Object(C.a)()),c(_()),c(Object(L.c)()),c({type:"RESET_DECK_DETAILS"})]))})).then((function(){!s().pageLoaded.status&&V.a.routeLoad(!0,V.b.formatAndSetInitialData,c,s,r),window.sessionStorage.removeItem("i-details-return-url"),l.b.productViewEvent(window.digitalData),Object(F.g)({isLegacyFlow:!0}),c({type:"PAGE_LOADED",payload:!0})})));case 5:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},oe=function(e){var t=e.products;return function(e,a){var n,r=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(r);var o=Object(F.d)();e({type:"UPDATE_SELECTED_CRUISE",payload:o});var i=o.isADASelected,c=void 0!==i&&i,d=o.currentCruise;e({type:"SET_IS_ADA_SELECTED",payload:c}),e({type:"RESET_SELECTED_META"}),e({type:"POPULATE_GUEST_DATA"}),e({type:"SET_IS_GUEST_COUNT_FLOW",payload:!1}),e({type:"RESET_SELECTED_META"});var l=(null===d||void 0===d||null===(n=d.voyage)||void 0===n?void 0:n.ship)||{},v=l.id,y=l.version,b=a().pricing,f="T"===m.a.id?t.cruisetours:t.cruises;return Promise.all([!f.data&&e(Object(p.b)({route:"details",resType:m.a.id})),e(Object(D.a)()),e(Object(A.d)()),e(Object(h.a)()),e(Object(C.a)()),e(Object(N.b)()),e(Object(R.a)(v,y)),e({type:"RESET_PRICING"})]).then((function(){var t;return Promise.all(Object(u.a)((null===b||void 0===b||null===(t=b.cruises)||void 0===t?void 0:t.data)?[]:[e(Object(j.b)({voyageId:null===d||void 0===d?void 0:d.id,productId:null===d||void 0===d?void 0:d.productId}))]))})).then((function(){!a().pageLoaded.status&&V.a.routeLoad(!0,V.b.formatAndSetInitialData,e,a,s.a.route),e({type:"PAGE_LOADED",payload:!0}),e({type:"SET_FLOW_SELECTED",payload:"null"})}))}},ie=function(){return function(e,t){var a,n=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(n);var r=Object(F.d)();if(!r.guestCount)return s.a.push("/results?resType=".concat(m.a.id)),void e({type:"SET_INLINE_MESSAGING",payload:{errorPage:"/guest-count"}});var o=t(),i=o.stateroomLocation,c=o.abTesting.stateroomType.stateroomTypeImageConfig,d=i.zones,l=i.deckData;e({type:"UPDATE_SELECTED_CRUISE",payload:r});var p=r.id,v=r.metaId,y=r.subMetaId,b=r.currentCruise,f=r.isADASelected,E=void 0!==f&&f,g=r.guestCount,O=r.metaDesc,S=b.voyage.sailDate,P=null===b||void 0===b||null===(a=b.voyage)||void 0===a?void 0:a.ship,I=P.id,_=P.version;return Promise.all([e(Object(D.a)()),e({type:"RESET_PRICING"}),e(Object(J.h)(I,_,S)),e(Object(J.i)(I,_,c))]).then((function(){return Promise.all([e(Object(j.c)(p,g>2||E?["Y","B"]:void 0)),e(Object(A.d)()),e(Object(h.a)()),e(Object(C.a)()),e(Object(T.b)()),e(Object(M.a)())].concat(Object(u.a)(O?[e({type:"FETCH_METAS_DESC",payload:O})]:[e(Object(T.c)(I,_))]),Object(u.a)(d?[]:[e(Object(Y.j)())]),Object(u.a)(l?[]:[e(Object(Y.f)())]),[e(Object(N.b)()),e(Object(k.a)()),e({type:"SET_IS_ADA_SELECTED",payload:E}),e({type:"SELECT_META",payload:v}),e({type:"SELECT_SUBMETA",payload:y})]))})).then((function(){!t().pageLoaded.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,t,s.a.route),e({type:"PAGE_LOADED",payload:!0})}))}},ce=function(e){var t=e.pricing;return function(e,a){var n,r,o=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(o);var i=Object(F.d)();if(!(null===(n=i.selectedRoom)||void 0===n?void 0:n.id)&&!(null===(r=i.selectedRoom)||void 0===r?void 0:r.isGuarantee))return i.flowSelected?e({type:"SET_INLINE_MESSAGING",payload:{errorPage:"/stateroom-location"}}):e({type:"SET_INLINE_MESSAGING",payload:{errorPage:"/choose-location"}}),s.a.back();e({type:"UPDATE_SELECTED_CRUISE",payload:i});var c=i.id,u=i.selectedFare,d=i.metaId,l=i.subMetaId,p=i.isADASelected,v=void 0!==p&&p,y=i.selectedRoom;e({type:"SET_SELECTED_ROOM",payload:y});var b=F.b.get("voucher");return Promise.all([e(Object(D.a)()),e(Object(J.e)()),e(Object(J.j)())]).then((function(){return Promise.all([b&&e(Object(j.c)(c,void 0)),!b&&!t.availablePricing&&e(Object(j.c)(c,["Y","B"])),!b&&!t.data&&e(Object(j.c)(c,void 0)),e(Object(A.d)()),e(Object(h.a)()),e(Object(C.a)()),e(Object(T.b)()),e(Object(N.b)()),e({type:"SET_IS_ADA_SELECTED",payload:v}),e({type:"SELECT_META",payload:d}),e({type:"SELECT_SUBMETA",payload:l}),e({type:"SET_SELECTED_FARE",payload:u})])})).then((function(){!a().pageLoaded.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,a,s.a.route),e({type:"PAGE_LOADED",payload:!0})}))}},ue=function(e){var t=e.pricing;return function(e,a){var n,r=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(r);var o=Object(F.d)();o.zoneId=null,o.deckLevel=null;var i=o.id,c=o.selectedFare,d=o.metaId,l=o.subMetaId,p=o.metaDesc,v=o.isADASelected,y=void 0!==v&&v,b=o.selectedRoom;if(!o.isPackagesAvailable&&(!d||!l))return e({type:"SET_INLINE_MESSAGING",payload:{errorPage:"/stateroom-type",errorMessage:K.T["/stateroom-type"]}}),s.a.back();e({type:"UPDATE_SELECTED_CRUISE",payload:o});var f=o.currentCruise,m=null===f||void 0===f||null===(n=f.voyage)||void 0===n?void 0:n.ship,E=m.id,g=m.version;e({type:"SET_SELECTED_ROOM",payload:b});var O=a().stateroomLocation,S=void 0===O?{}:O,P=((null===S||void 0===S?void 0:S.data)||{}).zones,A=void 0===P?null:P,I=S.deckData;return Promise.all([e(Object(D.a)()),!t.availablePricing&&e(Object(j.c)(i,["Y","B"])),!t.data&&e(Object(j.c)(i,["G"])),e(Object(h.a)()),e(Object(C.a)()),e(Object(T.b)())].concat(Object(u.a)(A?[]:[e(Object(Y.j)())]),Object(u.a)(I?[]:[e(Object(Y.f)())]),Object(u.a)(p?[e({type:"FETCH_METAS_DESC",payload:p})]:[e(Object(T.c)(E,g))]),[e(Object(N.b)()),e({type:"SET_IS_ADA_SELECTED",payload:y}),e({type:"SELECT_META",payload:d}),e({type:"SELECT_SUBMETA",payload:l}),e({type:"SET_SELECTED_FARE",payload:c})])).then((function(){!a().pageLoaded.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,a,s.a.route),e({type:"PAGE_LOADED",payload:!0})}))}},de=function(e){var t=e.pricing;return function(e,a){var n,r=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(r);var o=Object(F.d)();e({type:"UPDATE_SELECTED_CRUISE",payload:o});var i=o.id,c=o.selectedFare,d=o.metaId,l=o.subMetaId,p=o.metaDesc,v=o.isADASelected,y=o.selectedRoom,b=o.isSVGVisible,f=o.zoneId,m=o.deckLevel,E=o.currentCruise,g=o.flowSelected,O=o.skipChooseLocation,S=null===E||void 0===E||null===(n=E.voyage)||void 0===n?void 0:n.ship,P=S.id,I=S.version;return e({type:"SET_SELECTED_ROOM",payload:y}),!v||d&&l?v||g||O?(b&&m&&(e(Object(Y.c)()),e(Object(Y.h)(m)),e(Object(Y.g)(m,f,"auto"===g&&y.selectedBestCategory)),e(Object(Y.i)(m,f))),Promise.all([e(Object(D.a)())]).then((function(){return Promise.all([!t.availablePricing&&e(Object(j.c)(i,["Y","B"])),!t.data&&e(Object(j.c)(i,["G"])),e(Object(A.d)()),e(Object(h.a)()),e(Object(C.a)()),e(Object(T.b)())].concat(Object(u.a)(p?[e({type:"FETCH_METAS_DESC",payload:p})]:[e(Object(T.c)(P,I))]),[e(Object(N.b)()),e({type:"SET_IS_ADA_SELECTED",payload:v}),e({type:"SELECT_META",payload:d}),e({type:"SELECT_SUBMETA",payload:l}),e({type:"SET_SELECTED_FARE",payload:c})]))})).then((function(){var n,r,o,i,c,d,p,v,y=a().stateroomLocation,b=void 0===y?{}:y,f=((null===b||void 0===b?void 0:b.data)||{}).zones,m=void 0===f?null:f,E=b.deckData,O=b.isADASelected,h=null===t||void 0===t||null===(n=t["auto"===g?"data":"availablePricing"])||void 0===n||null===(r=n[0])||void 0===r||null===(o=r.cruises)||void 0===o?void 0:o[0],S=null===h||void 0===h||null===(i=h.pricing)||void 0===i?void 0:i.fares,C=null===S||void 0===S||null===(c=S[0])||void 0===c||null===(d=c.metas)||void 0===d?void 0:d.findBy("id",null===l||void 0===l?void 0:l[0]),T=null===C||void 0===C||null===(p=C.subMetas)||void 0===p||null===(v=p.findBy("id",l[1])
1)||void 0===v?void 0:v.bestCategory;return Promise.all([].concat(Object(u.a)(O?[e(Object(Y.d)(T))]:[]),Object(u.a)(m?[]:[e(Object(Y.j)())]),Object(u.a)(E?[]:[e(Object(Y.f)())]))).then((function(){!a().pageLoaded.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,a,s.a.route),e({type:"PAGE_LOADED",payload:!0})}))}))):(e({type:"SET_INLINE_MESSAGING",payload:{errorPage:"/choose-location"}}),s.a.back()):(e({type:"SET_INLINE_MESSAGING",payload:{errorPage:"/stateroom-type"}}),s.a.back())}},se=function(e){var t=e.pricing;return function(e,a){var r=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(r);var o=Object(F.d)();e({type:"UPDATE_SELECTED_CRUISE",payload:o});var d="/stateroom-summary"===r.pathname,l=Object(q.b)(s.a),v=l.voyageCode,y=l.category,b=l.requestedCode,f=l.cabinId,E=l.promos,g=l.deckNo,O=l.subMeta,S=l.noOfPax,P=void 0===S?2:S,_=l.ada,R=void 0!==_&&_,N="T"===m.a.id?v.split("-")[0]:v,w=Object(q.b)().resType,k=void 0===w?"C":w,x=a().products;return e({type:"SET_IS_ADA_SELECTED",payload:R}),Promise.all([].concat(Object(u.a)(x["C"===k?"cruises":"cruisetours"].data?[]:[e(Object(p.b)({route:"details",resType:k}))]),[e(Object(A.d)()),e(Object(D.a)()),e({type:"SET_FLOW_SELECTED",payload:"auto"}),e({type:"SELECT_GUEST_COUNT",payload:parseInt(P)||2})])).then((function(){return Promise.all([].concat(Object(u.a)(t.cruises.data?[]:[e(Object(j.b)({voyageId:N,productId:null}))]),[e(Object(T.b)()),e(Object(h.a)()),e(Object(M.a)()),e(Object(C.a)()),e(Object(L.c)()),e({type:"SELECT_META",payload:O[0]}),e({type:"SELECT_SUBMETA",payload:O})]))})).then((function(){var t=a(),r=t.products,o=t.pricing,l=t.filters,v=r[m.a.name].data;if(v&&o[m.a.name].data){var O=Object(W.g)(v,N);if(!O)return e({type:"SET_DEEP_LINK_POPUP_DATA",payload:K.I.PRODUCT_NOT_FOUND}),e(Object(p.a)(r[m.a.name],{})),e(Object(p.c)({},!1)),e(Object(Q.a)()),void s.a.push("/results?resType=".concat(m.a.id));var h=O.currentCruise.voyage.ship.version;return Promise.resolve(e({type:"SELECT_CRUISE",payload:{selectedProduct:O,shipVersion:h}})).then(Object(c.a)(i.a.mark((function t(){var o,v,h,S;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null===O||void 0===O||null===(o=O.currentCruise)||void 0===o||null===(v=o.pricing)||void 0===v||null===(h=v.bestCategory)||void 0===h?void 0:h.id){t.next=12;break}return t.prev=1,S=Object(z.g)(Z({},l),"promo",l.promo[0]),e(Object(p.a)(r[m.a.name],S)),s.a.push("/stateroom-type").then((function(){e({type:"SET_DEEP_LINK_POPUP_DATA",payload:K.I.EXPIRED_PROMOS})})),t.abrupt("return");case 8:t.prev=8,t.t0=t.catch(1),s.a.push("/results?resType=".concat(m.a.id));case 11:return t.abrupt("return");case 12:return t.abrupt("return",Promise.all([e(Object(Y.j)()),e(Object(Y.h)(g))].concat(Object(u.a)(R?[]:[e(Object(Y.g)(null,null,y,E))]),Object(u.a)(R?[e(Object(Y.d)(y,E))]:[]),[e(Object(Y.f)())])).then((function(){var t=a(),r=t.selectedCruise,o=t.stateroomLocation,u=o.deckCabins.cabins.findBy("id",f);try{var l,p,v,m=(null===(l=o[R?"cabinAvailability":"deckCabinsAvailability"].cabinAvailability)||void 0===l?void 0:l.cabins)||[],O=m.findBy("number",f),h=function(){e({type:"SET_IS_GUARANTEE_AVAILABLE",payload:!0}),u={isGuarantee:!0}};if("GUAR"===f){if(!O)return I.b.report("STATEROOM.DEEP.LINK","Cabin not found - Guarantee cabin passed",JSON.stringify(Object(q.b)(s.a)),"info"),e({type:"SET_DEEP_LINK_POPUP_DATA",payload:K.I.NO_CABIN_FOUND}),s.a.push("/stateroom-type");I.b.report("STATEROOM.DEEP.LINK","Cabin found - Guarantee cabin passed",JSON.stringify(Object(q.b)(s.a)),"info"),h()}else if(O)I.b.report("STATEROOM.DEEP.LINK","Cabin allocated from cabin availability and displaying",JSON.stringify(Object(q.b)(s.a)),"info");else{if(!m.length)return I.b.report("STATEROOM.DEEP.LINK","Cabin not present in cabin-availability and no other cabin found",JSON.stringify(Object(q.b)(s.a)),"info"),e({type:"SET_DEEP_LINK_POPUP_DATA",payload:K.I.NO_CABIN_FOUND}),s.a.push("/stateroom-type");var S=Object(n.a)(m,1)[0];u=o.deckCabins.cabins.findBy("id",S.number),"GUAR"!==S.number&&u?(I.b.report("STATEROOM.DEEP.LINK","Cabin not present in cabin-availability picking first cabin",JSON.stringify(Object(q.b)(s.a)),"info"),u=o.deckCabins.cabins.findBy("id",S.number),e({type:"SET_DEEP_LINK_POPUP_DATA",payload:K.I.DIFFERENT_CABIN_ASSIGNED})):(I.b.report("STATEROOM.DEEP.LINK","Cabin not present in cabin-availability attempted guarantee cabin",JSON.stringify(Object(q.b)(s.a)),"info"),e({type:"SET_DEEP_LINK_POPUP_DATA",payload:K.I.GUARANTEE_ASSIGNED}),h())}var C=null===(p=o.deckData.decks)||void 0===p||null===(v=p.findBy("id",Number(g)))||void 0===v?void 0:v.name;u=Z(Z({},u),{},{zone:u.zoneCode,deckName:C,selectedBestCategory:y,requestedCategory:b}),e({type:"SET_SELECTED_ROOM",payload:u});var T=a().selectedCruise.currentCruise.voyage.sailDate;return Promise.all([e(Object(U.b)()),e({type:"SET_HOTEL_PACKAGE_SELECTED",payload:!1})]).then(Object(c.a)(i.a.mark((function t(){var n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e(Object(U.c)({promo:E,voyageId:N,cruiseStartDate:T,selectedRoom:u,guestCount:null===r||void 0===r?void 0:r.guestCount,isStateroomSummaryPage:d,selectedCruise:r}));case 2:return n=t.sent,!a().pageLoaded.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,a,s.a.route),e({type:"PAGE_LOADED",payload:!0}),t.abrupt("return",[n,r]);case 6:case"end":return t.stop()}}),t)}))))}catch(P){console.log("error ",P)}})));case 13:case"end":return t.stop()}}),t,null,[[1,8]])}))))}}))}},le=function(e){var t=e.pricing;return function(e,a){var n,r=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(r),e({type:"POPULATE_GUEST_DATA"});var o=Object(F.d)(),d=o.skipPages||$();e({type:"UPDATE_SELECTED_CRUISE",payload:Z(Z({},o),{},{skipPages:d})});var l=o.id,p=o.selectedRoom,v=o.guestCount,y=o.startDate,b=o.isHotelPackageSelected,f=o.metaId,m=o.subMetaId,E=o.cabin,g=(null===p||void 0===p||null===(n=p.promo)||void 0===n?void 0:n.id)||(null===E||void 0===E?void 0:E.promo);e({type:"SET_SELECTED_ROOM",payload:p});var O=a(),S=O.abTesting,P=O.selectedCruise,A=S.stateroomSummary,I=A.enabledAddOnConfigurations,_=A.refund
1ableConfig,R=A.couponCodeConfig,L=A.assuranceConfig,w=(null===L||void 0===L?void 0:L.isEnabled)&&!(null===d||void 0===d?void 0:d.includes("pvp"));return Promise.all([e(Object(D.a)()),!a().aem.masterMetaData&&e(Object(J.d)())]).then((function(){var n,r;return Promise.all([!t.availablePricing&&e(Object(j.c)(l,["Y","B"])),!t.data&&e(Object(j.c)(l,["G"])),e(Object(J.j)()),I&&(_.isEnabled||R.isEnabled)&&e(Object(J.b)()),e(Object(h.a)()),e(Object(C.a)()),e(Object(T.b)()),I&&_.isEnabled&&e(Object(j.a)({coupons:[_.couponCode],isRefundablePromo:!0}))].concat(Object(u.a)((null===(n=a())||void 0===n||null===(r=n.amenities)||void 0===r?void 0:r.amenitiesContent)?[]:[e(Object(M.a)())]),[e(Object(N.c)()),e(Object(U.b)()),e(Object(N.b)()),e(Object(N.d)()),e({type:"SELECT_META",payload:f}),e({type:"SELECT_SUBMETA",payload:m}),e({type:"SET_HOTEL_PACKAGE_SELECTED",payload:b})])).then(Object(c.a)(i.a.mark((function t(){var n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e(Object(U.c)({promo:g,voyageId:l,cruiseStartDate:y,selectedRoom:p,guestCount:v,selectedCruise:P}));case 2:if(n=t.sent,t.t0=w,!t.t0){t.next=7;break}return t.next=7,e(Object(G.a)({isRefundableSelected:P.isRefundableSelected,refundableCouponCode:P.isRefundableSelected?null===_||void 0===_?void 0:_.couponCode:null,isSummaryPage:!0}));case 7:return!a().pageLoaded.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,a,s.a.route),e({type:"PAGE_LOADED",payload:!0}),t.abrupt("return",[n,P]);case 10:case"end":return t.stop()}}),t)}))))}))}},pe=function(){return function(){var e=Object(c.a)(i.a.mark((function e(t,a){var n,r,o,c,u,d,l,p,v,y,b,f,m,E,g,O,S;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=s.a.router,t({type:"PAGE_LOADED",payload:!1}),Object(F.e)(r),o=Object(F.d)(),c=a(),u=c.invoicePricing,d=c.pageLoaded,l=c.selectedCruise,!ee({bookingSession:o,router:s.a,dispatch:t})){e.next=7;break}return e.abrupt("return");case 7:if(p=o.skipPages||$(),t({type:"UPDATE_SELECTED_CRUISE",payload:Z(Z({},o),{},{skipPages:p})}),t({type:"POPULATE_GUEST_DATA"}),t({type:"SET_LOWER_FUNNEL",payload:!0}),v=o.id,y=o.selectedRoom,b=o.guestCount,f=o.startDate,m=o.holdUptill,E=o.isHotelPackageSelected,g=o.metaId,O=o.subMetaId,t({type:"SET_SELECTED_ROOM",payload:y}),m){e.next=16;break}return e.next=16,t(Object(U.a)({voyageId:v,selectedRoom:y,actionCode:"H",extendHold:!1}));case 16:return S=null===y||void 0===y||null===(n=y.promo)||void 0===n?void 0:n.id,e.abrupt("return",Promise.all([t(Object(D.a)()),t(Object(h.a)()),t(Object(C.a)()),t(Object(T.b)()),t(Object(B.d)()),(!u.invoiceData||u.shouldRefetch||l.isRefundableSelected)&&t(Object(U.c)({promo:S,voyageId:v,cruiseStartDate:f,selectedRoom:y,guestCount:b})),t(Object(J.j)()),t(Object(U.b)()),t({type:"SELECT_META",payload:g}),t({type:"SELECT_SUBMETA",payload:O}),t({type:"SET_HOTEL_PACKAGE_SELECTED",payload:E})]).then((function(){!d.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,t,a,s.a.route),t({type:"PAGE_LOADED",payload:!0})})));case 18:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},ve=function(){return function(e,t){var a,n=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(n);var r=Object(F.d)(),o=t(),i=o.invoicePricing,c=o.pageLoaded,u=o.insuranceTransferOptions;if(!ee({bookingSession:r,router:s.a,dispatch:e})){var d=r.skipPages||$();e({type:"UPDATE_SELECTED_CRUISE",payload:Z(Z({},r),{},{skipPages:d})}),e({type:"POPULATE_GUEST_DATA"});var l=r.id,p=r.selectedRoom,v=r.guestCount,y=r.startDate,b=r.hotelAndTransferOptions,f=r.transferEveryOneTogetherState,m=r.insuranceOptions,E=r.isHotelPackageSelected,g=r.metaId,O=r.subMetaId;e({type:"SET_SELECTED_ROOM",payload:p});var S=null===p||void 0===p||null===(a=p.promo)||void 0===a?void 0:a.id,P="/transfers"===n.pathname;return P?!u.packages&&e(Object(G.d)()):"/protection"===n.pathname&&e(Object(G.e)()),Promise.all([e(Object(h.a)()),e(Object(C.a)()),e(Object(G.a)()),e(Object(J.b)()),e(Object(T.b)()),(!P||!(null===i||void 0===i?void 0:i.invoiceData))&&e(Object(U.c)({promo:S,voyageId:l,cruiseStartDate:y,selectedRoom:p,guestCount:v})),e({type:"SELECT_META",payload:g}),e({type:"SELECT_SUBMETA",payload:O}),e({type:"UPDATE_PACKAGES_STATE",payload:{hotelAndTransferOptions:b,transferEveryOneTogetherState:f}}),e({type:"UPDATE_INSURANCE_STATE",payload:m}),e({type:"SET_HOTEL_PACKAGE_SELECTED",payload:E}),e(Object(U.b)())]).then((function(){!c.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,t,s.a.route),e({type:"PAGE_LOADED",payload:!0})}))}}},ye=function(){return function(e,t){var a=m.a.id,n=t().admin.data.ube,r=n.bookingLocation.primaryCurrency,o=n.guest.contact.address.country,i=Object(F.d)();if(!ee({bookingSession:i,router:s.a,dispatch:e})){var c=i.skipPages||$(),u=i.id,d=i.selectedRoom,l=i.guestCount,p=i.startDate,v=i.payment,y=void 0===v?{}:v,b=i.isHotelPackageSelected,f=i.subMetaId,E=i.cabin.promo,g=y.fccIDCCNMap;e({type:"UPDATE_SELECTED_CRUISE",payload:Z(Z({},i),{},{skipPages:c})}),e({type:"POPULATE_GUEST_DATA"}),e({type:"SET_SELECTED_ROOM",payload:d});var O=y.isPayPal,S=y.isPayPalFailed,P=y.payPalResponse,D=y.remainingAmou
1ntToBePaid,A=y.paidAmount;return e({type:"SET_IS_PAYPAL",payload:O}),e({type:"SET_IS_PAYPAL_FAILED",payload:S}),P&&e({type:"SESSION_SET_PAYPAL_RESPONSE",payload:{payPalResponse:P,remainingAmountToBePaid:D,paidAmount:A}}),e(Object(H.r)()),e({type:"SESSION_UPDATE_PAYMENT",payload:y}),e({type:"PAGE_LOADED",payload:!1}),Promise.all([e(Object(h.a)()),e(Object(C.a)()),e(Object(T.b)()),e(Object(J.f)(o)),e({type:"SET_HOTEL_PACKAGE_SELECTED",payload:b}),e({type:"SELECT_SUBMETA",payload:f}),e(Object(H.r)()),e(Object(B.a)(o)),e(Object(H.f)(u,r,a)),e(Object(G.e)()),e(Object(U.b)()),e(Object(N.d)()),e(Object(B.d)()),e(Object(U.c)({promo:E,voyageId:u,cruiseStartDate:p,selectedRoom:d,guestCount:l,fccIDCCNMap:g}))]).then((function(){!t().pageLoaded.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,t,s.a.route),e({type:"PAGE_LOADED",payload:!0})}))}}},be=function(){return function(e,t){var a,n,r,o=m.a.id,i=t().admin,c=null===i||void 0===i||null===(a=i.data)||void 0===a||null===(n=a.ube)||void 0===n?void 0:n.bookingLocation.primaryCurrency,u=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(u);var d=Object(F.d)();if(!ee({bookingSession:d,router:s.a,dispatch:e})){var l=d.skipPages||$(),p=d.id,v=d.selectedRoom,y=d.guestCount,b=d.startDate,f=d.payment,E=void 0===f?{}:f,g=d.isHotelPackageSelected,O=d.metaId,S=d.subMetaId;e({type:"UPDATE_SELECTED_CRUISE",payload:Z(Z({},d),{},{skipPages:l})}),e({type:"POPULATE_GUEST_DATA"}),e({type:"SET_SELECTED_ROOM",payload:v});var P=E.fccIDCCNMap,D=null===v||void 0===v||null===(r=v.promo)||void 0===r?void 0:r.id;return e({type:"SESSION_UPDATE_PAYMENT",payload:Z(Z({},E),{},{payPalResponse:{}})}),Promise.all([e(Object(h.a)()),e(Object(C.a)()),e(Object(T.b)()),e(Object(H.r)()),e(Object(H.f)(p,c,o)),e(Object(G.e)()),e(Object(U.b)()),e(Object(N.d)()),e({type:"SELECT_META",payload:O}),e({type:"SELECT_SUBMETA",payload:S}),e({type:"SET_HOTEL_PACKAGE_SELECTED",payload:g})]).then((function(){e(Object(U.c)({promo:D,voyageId:p,cruiseStartDate:b,selectedRoom:v,guestCount:y,fccIDCCNMap:P})),!t().pageLoaded.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,t,s.a.route),e({type:"PAGE_LOADED",payload:!0})}))}}},fe=function(){return function(e,t){var a,n,r,o,i,c,u,d,l=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(l),e((function(e){e({type:"RESET_ERROR_MESSAGES"})}));var p=Object(F.d)(),v=t(),y=v.admin,b=v.invoicePricing,f=v.pageLoaded;if(!ee({bookingSession:p,router:s.a,dispatch:e})){e({type:"UPDATE_SELECTED_CRUISE",payload:p}),e({type:"POPULATE_GUEST_DATA"});var m=p.id,E=p.selectedRoom,g=p.guestCount,O=p.startDate,S=p.payment,P=p.isHotelPackageSelected,D=p.metaId,A=p.subMetaId;e({type:"SET_SELECTED_ROOM",payload:E});var j=null===E||void 0===E||null===(a=E.promo)||void 0===a?void 0:a.id,I=S.isPaypal,_=S.isPaypalFailed,R=S.payPalResponse,L=S.remainingAmountToBePaid,w=S.totalAmountToBePaid,k=S.mcOrderId,x=S.gatewayMid,M=S.apiVersion,B=S.paymentAmountType,G=S.fccIDCCNMap,Y=S.paidAmount;if(e({type:"SET_IS_PAYPAL",payload:I}),e({type:"SET_IS_PAYPAL_FAILED",payload:_}),R&&e({type:"SESSION_SET_PAYPAL_RESPONSE",payload:{payPalResponse:R,remainingAmountToBePaid:L,paidAmount:Y}}),e({type:"SESSION_UPDATE_PAYMENT",payload:S}),e(Object(H.r)()),!B)return s.a.back(),void e({type:"SET_INLINE_MESSAGING",payload:{errorPage:"/payment-options"}});var q=null===y||void 0===y||null===(n=y.data)||void 0===n?void 0:n.ube,W=null===q||void 0===q||null===(r=q.bookingLocation)||void 0===r?void 0:r.primaryCurrency;return(null===(o=t().admin)||void 0===o||null===(i=o.data)||void 0===i||null===(c=i.ube)||void 0===c||null===(u=c.settings)||void 0===u||null===(d=u.features)||void 0===d?void 0:d.offer3Ds)&&e({type:"SET_3DS_PAYMENT_DATA",payload:{redirectUrl:K.t,amount:w,currency:W,orderId:k,gatewayMID:x,version:M}}),Promise.all([e(Object(h.a)()),e(Object(C.a)()),e(Object(T.b)()),e(Object(U.b)()),e(Object(N.d)()),e({type:"SELECT_META",payload:D}),e({type:"SELECT_SUBMETA",payload:A}),e({type:"SET_HOTEL_PACKAGE_SELECTED",payload:P})]).then((function(){!b.invoiceData&&e(Object(U.c)({promo:j,voyageId:m,cruiseStartDate:O,selectedRoom:E,guestCount:g,fccIDCCNMap:G}
1)),!f.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,t,s.a.route),e({type:"PAGE_LOADED",payload:!0})}))}}},me=function(){return function(e,t){var a,n,r,o,i,c,u=s.a.router;e({type:"PAGE_LOADED",payload:!1}),Object(F.e)(u);var d=Object(F.d)(),l=t(),p=l.admin,v=l.invoicePricing,y=l.pageLoaded,b=null===p||void 0===p||null===(a=p.data)||void 0===a||null===(n=a.ube)||void 0===n||null===(r=n.guest)||void 0===r||null===(o=r.contact)||void 0===o||null===(i=o.address)||void 0===i?void 0:i.country;if(!ee({bookingSession:d,router:s.a,dispatch:e})){e({type:"UPDATE_SELECTED_CRUISE",payload:d}),e({type:"POPULATE_GUEST_DATA"});var f=d.id,m=d.selectedRoom,E=d.guestCount,g=d.startDate,O=d.payment,S=d.isHotelPackageSelected,P=d.metaId,D=d.subMetaId;e({type:"SET_SELECTED_ROOM",payload:m}),e({type:"SESSION_UPDATE_PAYMENT",payload:O});var A=O.fccIDCCNMap,j=null===m||void 0===m||null===(c=m.promo)||void 0===c?void 0:c.id;return Promise.all([e(Object(h.a)()),e(Object(C.a)()),e(Object(T.b)()),e(Object(B.a)(b)),e(Object(B.d)()),!v.invoiceData&&e(Object(U.c)({promo:j,voyageId:f,cruiseStartDate:g,selectedRoom:m,guestCount:E,fccIDCCNMap:A})),e(Object(U.b)()),e({type:"SELECT_META",payload:P}),e({type:"SELECT_SUBMETA",payload:D}),e({type:"SET_HOTEL_PACKAGE_SELECTED",payload:S})]).then((function(){!y.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,t,s.a.route),e({type:"PAGE_LOADED",payload:!0})}))}}},Ee=function(){return function(e,t){var a;e({type:"PAGE_LOADED",payload:!1});var n=Object(F.d)(),r=t(),o=r.invoicePricing,i=r.pageLoaded;e({type:"UPDATE_SELECTED_CRUISE",payload:n}),e({type:"POPULATE_GUEST_DATA"});var c=n.id,u=n.selectedRoom,d=n.guestCount,p=n.startDate,v=n.payment;e({type:"SET_SELECTED_ROOM",payload:u}),e({type:"SESSION_UPDATE_PAYMENT",payload:v});var y=v.paymentResponse,b=v.authToken,f=v.fccIDCCNMap;y&&e({type:"SET_PAYMENT_RESPONSE",payload:{createReviseResponse:y}});var m=y.payments.filterBy("paymentStatus","SUCCESS").reduce((function(e,t){return e+t.amountCharged}),0),E=null===u||void 0===u||null===(a=u.promo)||void 0===a?void 0:a.id;return Promise.all([e(Object(h.a)()),e(Object(C.a)()),!o.invoiceData&&e(Object(U.c)({promo:E,voyageId:c,cruiseStartDate:p,selectedRoom:u,guestCount:d,fccIDCCNMap:f})),e(Object(H.l)(b))]).then((function(){var a,n;!!!(null===(a=F.b.getWithExpiry("analytics").product.booking)||void 0===a?void 0:a.complete)&&!i.status&&V.a.routeLoad(!0,V.b.persistDataAndFormatByRoute,e,t,s.a.route),l.b.purchaseEvent({digitalData:null===(n=window)||void 0===n?void 0:n.digitalData,paymentAmount:m}),e({type:"PAGE_LOADED",payload:!0})}))}}}}]);
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.