1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e.SENTRY_RELEASE={id:"production-f5e5fe0"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];if(null!=t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:luxgroup-customer-portal":!0});var a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="baecec51-eece-4563-a237-71bb0b479653",e._sentryDebugIdIdentifier="sentry-dbid-baecec51-eece-4563-a237-71bb0b479653")}catch(e){}}();"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[6850],{514569(e,a,t){t.d(a,{default:()=>en});var r=t(474848),l=t(296540),s=t(665673),i=t(106669),o=t(868441),n=t(744718),d=t(677127),c=t(227571),u=t(671468),m=t(582544),f=t(137688),g=t(750142),h=t(803556),b=t(846341),p=t(724633),M=t(919427),A=t(78272),v=t(897729),x=t(792435),k=t(842930),y=t(266414);let L=(0,b.YK)({title:{id:"SOPFSrEA7bGWKcSXcAiI",defaultMessage:"Callback request sent",description:"Heading title for callback request confirmation modal"},agentWillCall:{id:"b57U3JXB2e4sjq8WCgtm",defaultMessage:"A customer service agent will call you at",description:"Text preceding callback time and date details in a modal dialog"},callbackTime:{id:"uhqiXU5epsdg3ZCJLsax",defaultMessage:"Time: {callbackTime}",description:"Callback time label with scheduled time value in a modal dialog"},callbackDate:{id:"nxmeqSakwIpYv5Qsciyq",defaultMessage:"Date: {callbackDate}",description:"Callback date label with scheduled date value in a modal dialog"},confirmationEmailSent:{id:"iVghxqNNfzm-7op-X6RR",defaultMessage:"A confirmation email has been sent to {email}.",description:"Confirmation message showing email address where callback confirmation was sent"},closeButton:{id:"WBCU5gxBkiV7tdThi_tc",defaultMessage:"Close",description:"Close button for callback confirmation modal dialog window"},startAnotherRequest:{id:"9w0JP8XoxtCoMvQj-rin",defaultMessage:"Start another request",description:"Secondary action button in callback confirmation modal to immediately open a fresh callback request flow for the next customer"}});function j(e){let a=(0,s.A)(),t=(0,k.ZT)(),{callbackTime:l,callbackDate:i,email:o}=e.customer,n=i?t(i,x.jj):"";return(0,r.jsxs)(A.A,{gap:20,children:[e.showTitle&&(0,r.jsx)(M.Ay,{as:"h2",variant:"heading3",children:a.formatMessage(L.title)}),(0,r.jsxs)(v.A,{direction:"vertical",gap:20,children:[(0,r.jsx)(p.A,{variant:"large",children:e.agentWillCallMessage??a.formatMessage(L.agentWillCall)}),(0,r.jsxs)(v.A,{direction:"vertical",gap:0,children:[(0,r.jsx)(p.A,{variant:"large",weight:"bold",children:a.formatMessage(L.callbackTime,{callbackTime:(0,y.sg)(l,t)})}),(0,r.jsx)(p.A,{variant:"large",weight:"bold",children:a.formatMessage(L.callbackDate,{callbackDate:n})})]}),(0,r.jsx)(p.A,{variant:"large",children:a.formatMessage(L.confirmationEmailSent,{email:o})})]})]})}function q(e){let a=(0,s.A)(),t=e.onStartAnotherRequest?{children:a.formatMessage(L.startAnotherRequest),onClick:(a,t)=>{t(),e.onStartAnotherRequest?.()}}:void 0;return(0,r.jsx)(i.A,{children:(0,r.jsxs)("form",{children:[(0,r.jsx)(o.Ay,{title:a.formatMessage(L.title)}),(0,r.jsx)(n.A,{children:(0,r.jsx)(d.A,{children:(0,r.jsx)(j,{customer:e.customer})})}),(0,r.jsx)(c.A,{primaryActionProps:{children:a.formatMessage(L.closeButton)},secondaryActionProps:t})]})})}let S=(0,b.YK)({title:{id:"5YPiLJ5lPiyrkn9veV0P",defaultMessage:"Callback request error",description:"Heading title for callback request error modal in a modal dialog"},message:{id:"H2nTs2afRH_vHTJSpL4F",defaultMessage:"There was an error scheduling your callback.",description:"Error message when callback scheduling fails when an issue occurs"},closeButton:{id:"xhDcfqBWlYOXTAaJNUTX",defaultMessage:"Close",description:"Close/dismiss button for callback error modal in a modal dialog"}});function P(e){let a=(0,s.A)();return(0,r.jsxs)(A.A,{gap:20,children:[e.showTitle&&(0,r.jsx)(M.Ay,{as:"h2",variant:"heading3",children:e.title??a.formatMessage(S.title)}
1),(0,r.jsx)(v.A,{direction:"vertical",gap:20,children:(0,r.jsx)(p.A,{variant:"large",children:e.message??a.formatMessage(S.message)})})]})}function T(){let e=(0,s.A)();return(0,r.jsx)(i.A,{children:(0,r.jsxs)("form",{children:[(0,r.jsx)(o.Ay,{title:e.formatMessage(S.title)}),(0,r.jsx)(n.A,{children:(0,r.jsx)(d.A,{children:(0,r.jsx)(P,{})})}),(0,r.jsx)(c.A,{primaryActionProps:{children:e.formatMessage(S.closeButton)}})]})})}var w=t(107813);let D=(0,b.YK)({title:{id:"S94SnfbCdOmMESZKCuVc",defaultMessage:"Callback request error",description:"Title for callback request warning modal when user already has a pending callback"},duplicateCallbackMessage:{id:"rXz2hhJuWr9hjKCyUjm_",defaultMessage:"You have already requested a callback. Weâll get back to you as soon as we can.",description:"Warning message when user has already scheduled a callback"},closeButton:{id:"0EPxPE2sjYYL1YnqXBB6",defaultMessage:"Close",description:"Close/dismiss button for callback warning modal in a modal dialog"}});function C(e){let a=(0,s.A)();return(0,r.jsxs)(A.A,{gap:20,children:[e.showTitle&&(0,r.jsx)(M.Ay,{as:"h2",variant:"heading3",children:e.title??a.formatMessage(D.title)}),(0,r.jsx)(v.A,{direction:"vertical",gap:20,children:(0,r.jsx)(p.A,{variant:"large",children:e.message??a.formatMessage(D.duplicateCallbackMessage)})})]})}function E(){let e=(0,s.A)();return(0,r.jsx)(i.A,{children:(0,r.jsxs)("form",{children:[(0,r.jsx)(o.Ay,{title:e.formatMessage(D.title)}),(0,r.jsx)(n.A,{children:(0,r.jsx)(d.A,{children:(0,r.jsx)(C,{})})}),(0,r.jsx)(c.A,{primaryActionProps:{children:e.formatMessage(D.closeButton)}})]})})}var _=t(871942),N=t(955293);t(517642),t(658004),t(733853),t(845876),t(432475),t(515024),t(731698),t(125509),t(665223),t(660321),t(241927),t(511632),t(864377),t(966771),t(712516),t(368931),t(652514),t(235694),t(652774),t(849536),t(321926),t(994483),t(916215);var R=t(269685),I=t(98773);let O=new Set(["SALES","SUPPORT"]);async function B(e,a,t){let r=function({formData:e,requester:a,chatId:t}){let r="authenticated"===a.type?a.account:void 0,l=`${e.phone.prefix||r?.phonePrefix||""} ${e.phone.phone||r?.phone||""}`.trim();return{chatId:t,customerId:r?.memberId??void 0,customerPhone:l,type:e.type,campaign:e.campaign,isImmediateCallback:!O.has(e.type),customer:{firstName:e.firstName??r?.givenName??"",lastName:e.lastName??r?.surname??"",email:e.email??r?.email??"",phone:`${e.phone.prefix??""} ${e.phone.phone??""}`,message:e.message,destination:e.destination,numberOfTravellers:e.numberOfTravellers,travelDates:e.travelDates,countryCode:r?.countryCode,callbackDate:e.callbackDate,callbackTime:e.callbackTime,timezone:e.timezone}}}({formData:e,requester:a,chatId:t}),l=await (0,I.vB)(r);return l.data.updatePhoneNumber&&"authenticated"===a.type&&a.account.memberId&&(0,R.DG)({phone:e.phone.phone,phonePrefix:e.phone.prefix}),l.data}var H=t(952971),z=t(78102),V=t(336753),F=t(439714),Y=t(881126);t(78898),t(218111),t(161701);var U=t(165008),W=t(257918),X=t(590380),K=t(795093),J=t.n(K);let G=["Australia/Sydney","Australia/Melbourne","Australia/Brisbane","Australia/Hobart","Australia/Adelaide","Australia/Darwin","Australia/Perth","Pacific/Auckland"],Q=J()(),Z=(0,k.MS)(),$=function({type:e,fixedTimezone:a,label:t}){let i=(0,s.A)(),o=(0,k.ZT)(),[n,d]=(0,l.useState)(Q.format(x.Jv)),[c,u]=(0,l.useState)(),[m,f]=(0,l.useState)(a??Z),[g,h]=(0,l.useState)([]),b=(0,l.useCallback)((e,a)=>{d(a)},[]),p=(0,l.useCallback)(async(a,t)=>await (0,I.mQ)({date:t,timezone:a,type:e}),[e]),M=(0,l.useCallback)(e=>{switch(e){case"Australia/Sydney":return i.formatMessage({id:"ksjk-o_g4ZPcBJuGGKYZ",defaultMessage:"Sydney",description:"Timezone option label for Sydney in the callback request form"});case"Australia/Melbourne":return i.formatMessage({id:"CxBNTkzArnJLyNWPYqFB",defaultMessage:"Melbourne",description:"Timezone option label for Melbourne in the callback request form"});case"Australia/Brisbane":return i.formatMessage({id:"mvTBAPeLiL0clxJPpELW",defaultMessage:"Brisbane",description:"Timezone option label for Brisbane in the callback request form"});case"Australia/Hobart":return i.formatMessage({id:"dVBN-4tfaN7vA8nlrmdA",defaultMessage:"Hobart",description:"Timezone option label for Hobart in the callback request form"});case"Australia/Adelaide":return i.formatMessage({id:"BYBASpn3Ae5vX3KDVKg7",defaultMessage:"Adelaide",description:"Timezone option label for Adelaide in the callback request form"});case"Australia/Darwin":return i.formatMessage({id:"xd_abgQDj5BqxIb5PIwu",defaultMessage:"Darwin",de
1scription:"Timezone option label for Darwin in the callback request form"});case"Australia/Perth":return i.formatMessage({id:"5taher6OUL8E9Lc-3aR-",defaultMessage:"Perth",description:"Timezone option label for Perth in the callback request form"});case"Pacific/Auckland":return i.formatMessage({id:"rCrlhoMyxga6hUHWwEHS",defaultMessage:"Auckland",description:"Timezone option label for Auckland in the callback request form"});default:return e}},[i]);(0,l.useEffect)(()=>{(async()=>{let a=(await p(m,n)).data.times;0===a.length&&d(J()(Q).add(1,"day").format(x.Jv)),h(a),"SUPPORT"!==e&&"SALES"!==e&&a.length>0&&u(a[0].start)})()},[n,p,m,e]);let{minDate:A,maxDate:L}=(0,l.useMemo)(()=>{let e=new Date(Q.year(),Q.month(),Q.date()+30),a=g.at(-1)?.key;if(a){let[t]=a.split(":").map(Number);if(Q.hour()>=t)return{minDate:new Date(Q.year(),Q.month(),Q.date()+1),maxDate:e}}return{minDate:new Date(Q.year(),Q.month(),Q.date()),maxDate:e}},[g]),j=t??i.formatMessage({id:"pQGDyHSjptWDQuqnIeHc",defaultMessage:"Preferred callback date and time",description:"Form field label for callback date and time input section"});return(0,r.jsx)(v.A,{direction:"vertical",gap:8,horizontalAlign:"stretch",children:(0,r.jsxs)(W.A,{label:j,optionalIndicatorEnabled:!1,children:[(0,r.jsxs)(v.A,{direction:"horizontal",gap:8,horizontalAlign:"stretch",children:[(0,r.jsx)(U.A,{required:!0,dropdownPlacement:"bottom",name:"callbackDate",min:A,max:L,value:n,onDateChange:b,requiredErrorMessage:i.formatMessage({id:"XahJjVF263CJLoqu9Vtb",defaultMessage:"Please select date",description:"Validation error when callback date is not selected"})}),(0,r.jsx)(X.A,{required:!0,invalidErrorMessage:i.formatMessage({id:"7Dpoa8pGZID2Yz4uUmbd",defaultMessage:"Please select time",description:"Validation error when callback time is not selected"}),name:"callbackTime",autoComplete:"off",value:c,onChange:e=>u(e.target.value),children:g.map(e=>(0,r.jsx)("option",{value:e.start,children:(0,y.sg)(e.start,o,e.key)},e.start))})]}),a&&(0,r.jsx)(F.A,{name:"timezone",value:a}),!a&&(0,r.jsx)(X.A,{required:!0,label:i.formatMessage({id:"O_7lHb4bXMYrP04Ij2tp",defaultMessage:"Timezone",description:"Form field label for timezone selection dropdown in the customer support assistant"}),invalidErrorMessage:i.formatMessage({id:"cYsyXq3aRIxcnPXIy8OS",defaultMessage:"Please select timezone",description:"Form validation error when timezone is not selected"}),name:"timezone",autoComplete:"off",value:m,onChange:e=>f(e.target.value),children:G.map(e=>(0,r.jsx)("option",{value:e,children:M(e)},e))})]})})},ee=["FLIGHTS","LESA","SALES","SUPPORT","TOURS","HOTELS_AND_VILLAS"],ea=["FLIGHTS","LESA","SALES","SUPPORT"],et=["LESA","SUPPORT","SALES"],er=(0,b.YK)({anytime:{id:"D5x2F4IzxftPMWpB2Fa6",defaultMessage:"Anytime",description:"Default travel dates value for callback request form"},hotelsAndVillasIntro:{id:"xij7p65cctxiIbO_l4QY",defaultMessage:"Hi {givenName}, you are entitled to a personalised concierge call to assist with your booking. Share your contact details, and our 24/7 concierge team will get back to you as soon as possible.",description:"Introduction text for hotels and villas callback request with personalized greeting"},callbackIntro:{id:"0Oq4gs-v2jhU8wE5bxS_",defaultMessage:"Share your details with us, and our {teamType} team will get back to you as soon as possible.",description:"Introduction text for callback request with team type"},invalidCharacters:{id:"WjKkTpT4cLJJ8i0H0AB4",defaultMessage:"Invalid characters. Please use only letters and spaces",description:"Validation error for callback form fields with invalid characters"},firstNameLabel:{id:"vn47O_iQED4cwD1Wt3o2",defaultMessage:"First name *",description:"Form field label for first name input in the callback form"},firstNamePlaceholder:{id:"JUCDQ7Rz9HdXILLczwTI",defaultMessage:"Your first name",description:"Input placeholder text for first name input in the callback form"},firstNameRequired:{id:"qzZDCdNdLn_SxWShwwrF",defaultMessage:"First name is required",description:"Required validation error for first name input on the form"},lastNameLabel:{id:"fop5bbvh2FBNn0TgXeXR",defaultMessage:"Last name *",description:"Form field label for last name input in the callback form"},lastNamePlaceholder:{id:"Ml_IXB99D3e5AQ9oNrQY",defaultMessage:"Your last name",description:"Input placeholder text for last name input in the callback form"},lastNameRequired:{id:"zllXrM8MQFzGeYryQI1_",defaultMessage:"Last name is required",description:"Required validation error for last name input on the form"},emailInvalid:{id:"opDchOAfkRQxGRCFQ7fy",defaultMessage:"Invalid email address",description:"Validation error for invalid email format in callback form"},emailLabel:{id:"DOnRgbCi5Q8hci9ODjz2",defaultMessage:"Email address *",description:"Form field label for the email input in callback form"},emailPlaceholder:{id:"cMULTOwGTGHNc8cj1Y0P",defaultMessage:"Enter email address",description:"Placeholder for email input in callback form when field is empty"},emailRequired:{id:"RCjQqjdeTdYIAbDYDgbv",defaultMessage:"Email address is required",description:"Required validation error for email input when an issue occurs"},mobileNumberLabel:{id:"go8BNgqVpuBrmLFRpj2q",defaultMessage:"Mobile number",description:"Label for mobile phone number input in callback form"},mobileNumberPlaceholder:{id:"0j1EJRqxK_ms_TE4U1-h",defaultMessage:"e.g. 412 345 678",description:"Placeholder example for mobile phone number input on the form"},mobileNumberRequired:{id:"CsIQSKwulZJojENZf0Iz",defaultMessage:"Mobile number is required",description:"Required validation error for mobile number input on the form"}
1,destinationLabel:{id:"c-zLt9rk7BGZ6CLp2Kpw",defaultMessage:"Where do you plan to go?",description:"Form field label for the destination input in the callback form"},destinationPlaceholder:{id:"YFn879RvRoMoKRZOqPTd",defaultMessage:"The destination you would like to travel to",description:"Placeholder text for the travel destination input in the agent callback request form"},destinationRequired:{id:"dILRXjOqc9lwFtZjQH_T",defaultMessage:"Destination is required",description:"Required validation error for destination input on the form"},travelDatesLabel:{id:"yNuHqxfL59_XrA-KHxMM",defaultMessage:"When are you looking to travel?",description:"Label for travel dates input in hotels or tours callback form"},travelDatesPlaceholder:{id:"K6nVOu2V5IWSU6UFxhAw",defaultMessage:"The dates you would like to travel on",description:"Placeholder for travel dates input in hotels or tours callback form"},travelDatesRequired:{id:"R6NBcBgGLqILGXaMHllV",defaultMessage:"Dates are required",description:"Required validation error for travel dates input on callback form"},numberOfTravellersLabel:{id:"bHCcwn7NF1jmbos5WSHO",defaultMessage:"How many people will you be travelling with?",description:"Label for number of travellers input in callback form"},numberOfTravellersPlaceholder:{id:"ussxbY0uMzArbDjXqica",defaultMessage:"The number of people you will be travelling with",description:"Placeholder for number of travellers input in the traveller form"},numberOfTravellersRequired:{id:"C-AgyBqBNCBjB0lu4roK",defaultMessage:"Number of people you are travelling with is required",description:"Required validation error for number of travellers input"},supportMessageLabel:{id:"H82x5vzgcR4zPUKHY0u-",defaultMessage:"Message",description:"Label for message textarea in support/sales callback form"},supportMessagePlaceholder:{id:"TLD4qrB48tjfoRcAwKFP",defaultMessage:"e.g. I have a payment issue",description:"Placeholder for message textarea in support/sales callback form"},travelMessageLabel:{id:"VDNrD6_RoHsgP4jjx9NC",defaultMessage:"Any other questions or comments?",description:"Label for message textarea in hotels/tours callback form"},travelMessagePlaceholder:{id:"oaDvpbb7ue1PVnTouJ5n",defaultMessage:"e.g. Do I need a vaccine?",description:"Placeholder for message textarea in hotels/tours callback form"},flightsMessageLabel:{id:"apNP6219d9bXmw9lXQqs",defaultMessage:"What would you like to ask?",description:"Label for message textarea in flights callback form"},flightsMessagePlaceholder:{id:"JHP3lGCjdiEJy_26jxkB",defaultMessage:"e.g. Can I change my booking date?",description:"Placeholder for message textarea in flights callback form"}}),el=function(e){let{type:a,requester:t,messagePlaceholder:i,filters:o,location:n,campaign:d,prefillFirstName:c,prefillLastName:u,prefillEmail:m,prefillPhone:f,prefillPhonePrefix:g,emailReadOnly:h=!1,children:b}=e,M=(0,s.A)(),x="authenticated"===t.type,k="authenticated"===t.type?t.account:void 0,[L,j]=(0,l.useState)((0,y.TB)(o??{},M)??""),[q,S]=(0,l.useState)((0,y.YW)(o??{},M)??M.formatMessage(er.anytime));(0,l.useEffect)(()=>{o&&(j((0,y.TB)(o,M)||""),S((0,y.YW)(o,M)||M.formatMessage(er.anytime)))},[o,M]);let P=!x||ea.includes(a),T=!x||et.includes(a),w="HOTELS_AND_VILLAS"===a&&x&&!!k?.givenName,D=ee.includes(a)&&!w,C="SALES"===a?"sales":"TOURS"===a?"tours concierge":"HOTELS_AND_VILLAS"===a?"concierge":"support",E=(0,l.useCallback)(e=>{j(e.target.value)},[]),_=(0,l.useCallback)(e=>{S(e.target.value)},[]);return(0,r.jsxs)(A.A,{gap:20,children:[w&&(0,r.jsx)(p.A,{variant:"large",children:M.formatMessage(er.hotelsAndVillasIntro,{givenName:k.givenName})}),D&&(0,r.jsx)(p.A,{variant:"large",children:M.formatMessage(er.callbackIntro,{teamType:C})}),(0,r.jsxs)(v.A,{direction:"vertical",gap:8,children:[P&&(0,r.jsxs)(v.A,{direction:"horizontal",gap:8,horizontalAlign:"stretch",children:[(0,r.jsx)(V.A,{name:"firstName",defaultValue:c??k?.givenName,invalidErrorMessage:M.formatMessage(er.invalidCharacters),label:M.formatMessage(er.firstNameLabel),maxLength:100,minLength:2,pattern:"^[A-Za-z ]+$",placeholder:M.formatMessage(er.firstNamePlaceholder),required:!0,requiredErrorMessage:M.formatMessage(er.firstNameRequired)}),(0,r.jsx)(V.A,{name:"lastName",defaultValue:u??k?.surname,invali
1dErrorMessage:M.formatMessage(er.invalidCharacters),label:M.formatMessage(er.lastNameLabel),maxLength:100,minLength:2,pattern:"^[A-Za-z ]+$",placeholder:M.formatMessage(er.lastNamePlaceholder),required:!0,requiredErrorMessage:M.formatMessage(er.lastNameRequired)})]}),T&&(0,r.jsx)(V.A,{invalidErrorMessage:M.formatMessage(er.emailInvalid),defaultValue:m??k?.email,label:M.formatMessage(er.emailLabel),maxLength:100,name:"email",placeholder:M.formatMessage(er.emailPlaceholder),readOnly:h,required:!0,requiredErrorMessage:M.formatMessage(er.emailRequired),type:"email"}),(0,r.jsx)($,{type:a}),(0,r.jsx)(H.A,{defaultPhoneNumber:f??k?.phone,defaultPhonePrefix:g??k?.phonePrefix,label:M.formatMessage(er.mobileNumberLabel),name:"phone",placeholder:M.formatMessage(er.mobileNumberPlaceholder),required:!0,requiredErrorMessage:M.formatMessage(er.mobileNumberRequired)}),("HOTELS_AND_VILLAS"===a||"TOURS"===a)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(V.A,{name:"destination",defaultValue:n,invalidErrorMessage:M.formatMessage(er.invalidCharacters),label:M.formatMessage(er.destinationLabel),maxLength:100,minLength:2,autoComplete:"off",pattern:"^[A-Za-z ]+$",placeholder:M.formatMessage(er.destinationPlaceholder),required:!0,requiredErrorMessage:M.formatMessage(er.destinationRequired)}),"TOURS"===a&&(0,r.jsx)(V.A,{name:"travelDates",label:M.formatMessage(er.travelDatesLabel),maxLength:100,minLength:2,autoComplete:"off",placeholder:M.formatMessage(er.travelDatesPlaceholder),required:!0,requiredErrorMessage:M.formatMessage(er.travelDatesRequired)}),"HOTELS_AND_VILLAS"===a&&(0,r.jsx)(V.A,{name:"travelDates",value:q,onChange:_,label:M.formatMessage(er.travelDatesLabel),maxLength:100,minLength:2,autoComplete:"off",placeholder:M.formatMessage(er.travelDatesPlaceholder),required:!0,startIcon:(0,r.jsx)(Y.A,{}),requiredErrorMessage:M.formatMessage(er.travelDatesRequired)}),"HOTELS_AND_VILLAS"===a&&(0,r.jsx)(V.A,{name:"numberOfTravellers",value:L,onChange:E,label:M.formatMessage(er.numberOfTravellersLabel),maxLength:100,minLength:1,autoComplete:"off",placeholder:M.formatMessage(er.numberOfTravellersPlaceholder),required:!0,requiredErrorMessage:M.formatMessage(er.numberOfTravellersRequired)})]}),("LESA"===a||"SUPPORT"===a||"SALES"===a)&&(0,r.jsx)(z.A,{label:M.formatMessage(er.supportMessageLabel),maxLength:500,name:"message",placeholder:i??M.formatMessage(er.supportMessagePlaceholder)}),("HOTELS_AND_VILLAS"===a||"TOURS"===a)&&(0,r.jsx)(z.A,{label:M.formatMessage(er.travelMessageLabel),maxLength:500,name:"message",placeholder:i??M.formatMessage(er.travelMessagePlaceholder)}),"FLIGHTS"===a&&(0,r.jsx)(z.A,{label:M.formatMessage(er.flightsMessageLabel),maxLength:500,name:"message",placeholder:i??M.formatMessage(er.flightsMessagePlaceholder)}),(0,r.jsx)(F.A,{name:"type",value:a}),!!d&&(0,r.jsx)(F.A,{name:"campaign",value:d})]}),b]})},es=function(e){let{chatId:a,formId:t,requester:s,onSubmittingChange:i,onSubmitted:o,onDuplicateCallback:n,onError:d,...c}=e,u=(0,l.useCallback)(async e=>{e.preventDefault(),i(!0);let t=(0,N.Ry)(e.currentTarget);try{let e=await B(t,s,a);e.customerHasRecentlyScheduledCallback?n(e):await o(e)}catch{d()}finally{i(!1)}},[a,n,d,o,i,s]);return(0,r.jsx)("form",{id:t,onSubmit:u,children:(0,r.jsx)(el,{...c,requester:s})})},ei="request-agent-callback-form",eo={SALES:"request_agent_callback_sales",SUPPORT:"request_agent_callback_support",HOTELS_AND_VILLAS:"",LESA:"",TOURS:"",FLIGHTS:""},en=(0,u.Ng)(e=>({loggedIn:(0,h.W0)(e),account:e.auth.account}))(function(e){let{initialMode:a="requestAgentCallbackLogin",resetPasswordToken:t,hotelOfferDetails:u,dismissable:h,defaultEmail:b,callbackPath:p,onStartAnotherRequest:M,loggedIn:A,account:v,type:x,chatId:k,onRequestSubmitted:y,messagePlaceholder:L,isLESATouchpoint:j,filters:S,location:P,campaign:D,prefillFirstName:C,prefillLastName:N,prefillEmail:R,prefillPhone:I,prefillPhonePrefix:O}=e,B=(0,s.A)();(0,l.useEffect)(()=>{(0,_.trackClientEvent)({action:"request_agent_callback_form_displayed",subject:eo[x],category:"request_agent_callback",type:"interaction"})},[x]);let[H,z]=(0,l.useState)(a),V=(0,g.GV)(e=>e.auth.processing),F=(0,w.A)(),[Y,U]=(0,l.useState)(null),[W,X]=(0,l.useState)(!1),[K,J]=(0,l.useState)(!1),[G,Q]=(0,l.useState)(!1),[Z,$]=(0,l.useState)(!1),ee=(0,l.useCallback)(async e=>{U(e);try{await y?.(e)}catch{}j?F.resolve(e):X(!0)},[j,F,y]),ea=(0,l.useCallback)(e=>{j?F.resolve(e):(U(e),Q(!0))},[j,F]),et=(0,l.useCallback)(()=>{J(!0)},[]);return(0,r.jsxs)(i.A,{children:[(0,r.jsx)(m.A,{visible:V,floating:!0}),!A&&(0,r.jsx)(f.default,{mode:H,defaultEmail:b,onModeChange:z,resetPasswordToken:t,hotelOfferDetails:u,callbackPath:p,dismissable:h}),A&&!W&&!G&&!K&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Ay,{title:B.formatMessage({id:"MdjLVExO_9sMGVOXIif4",defaultMessage:"Request a callback",description:"Title for the request agent callback modal in the agent portal"})}),(0,r.jsx)(n.A,{children:(0,r.jsx)(d.A,{children:(0,r.jsx)(es,{formId:ei,type:x,requester:A?{type:"authenticated",account:v}:{type:"guest"},chatId:k,messagePlaceholder:L,filters:S,location:P,campaign:D,prefillFirstName:C,prefillLastName:N,prefillEmail:R,prefillPhone:I,prefillPhonePrefix:O,onSubmittingChange:$,onSubmitted:ee,onDuplicateCallback:ea,onError:et})})}),Z&&(0,r.jsx)(m.A,{floating:!0}),(0,r.jsx)(c.A,{primaryActionProps:{children:B.formatMessage({id:"4PlRTYD7woo__6dNbhtu",defaultMessage:"Submit Request",description:"Submit button text for callback request form in a modal dialog"}),type:"submit",form:ei,disabled:Z}})]}),W&&Y&&(0,r.jsx)(q,{customer:Y.customer,onStartAnotherRequest:M}),G&&(0,r.jsx)(E,{}),K&&(0,r.jsx)(T,{})]})})}}]); 2//# sourceMappingURL=6850.a5162304f6792da9.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.