1import{a as Un,b as Ii}from"./chunk-GTNKQMCK.js";import{a as Bn}from"./chunk-QBZF2FHY.js";import{c as Gn}from"./chunk-KP7AZOXK.js";import{a as $n}from"./chunk-QDAXBKJR.js";import{a as Wn}from"./chunk-5AOCP23F.js";import{a as Nn,b as st}from"./chunk-K7GIG4PM.js";import{a as An}from"./chunk-6KV3ORFX.js";import{a as kn}from"./chunk-ZCV7FAQ3.js";import"./chunk-ZZQEJNWQ.js";import"./chunk-TJX345SZ.js";import"./chunk-GCNYFASL.js";import"./chunk-EPPYQK6W.js";import"./chunk-2DWD7A2A.js";import{b as Ln}from"./chunk-OYSJI6RO.js";import"./chunk-V44A3BOS.js";import{a as me,b as K,c as J}from"./chunk-UNU7YQF7.js";import{e as Fn}from"./chunk-L6U4KHHE.js";import{a as le}from"./chunk-3EOOGZS3.js";import{a as En}from"./chunk-XTZ5GSNR.js";import{a as Rn,b as Dn}from"./chunk-YAEAFWFH.js";import{a as wn}from"./chunk-E75PFQOI.js";import{a as Qe}from"./chunk-AP2HUJHM.js";import{b as Se}from"./chunk-JOZ3MY2W.js";import{a as Oi,b as vt}from"./chunk-J5G6ZPHH.js";import{a as _t}from"./chunk-RCEVHZGS.js";import{a as On}from"./chunk-MQ6UVRLW.js";import"./chunk-7463HO3K.js";import{a as Sn}from"./chunk-OE5IPYW6.js";import"./chunk-6AKYVZ4S.js";import"./chunk-QZPOQA3X.js";import{b as Tn}from"./chunk-TQFQRCK7.js";import{b as In}from"./chunk-JUUXZP4P.js";import{a as Lt}from"./chunk-DRAI7BZI.js";import{a as Ct}from"./chunk-7PS5OOKF.js";import{a as De}from"./chunk-YSCGXM2A.js";import{a as Mn}from"./chunk-GP3XVPFC.js";import{a as se}from"./chunk-LMLUF4EH.js";import"./chunk-WFS7SXBZ.js";import"./chunk-JKKIAUZR.js";import"./chunk-XLMAP663.js";import"./chunk-VAPSTI6H.js";import"./chunk-DTS7DQFC.js";import{a as ue}from"./chunk-O3WGNDHN.js";import"./chunk-AXETTHNK.js";import"./chunk-6OEEPDV4.js";import{a as Vn,b as Ti}from"./chunk-H24D5XYS.js";import"./chunk-F4LT5HYA.js";import"./chunk-RB4H2LPF.js";import"./chunk-MJ7MA5FM.js";import"./chunk-YY32VEBO.js";import"./chunk-RFVGIZ7O.js";import"./chunk-SPALAOYO.js";import{c as mn}from"./chunk-662XZICC.js";import{b as $t}from"./chunk-YGIYUTLU.js";import{e as kt,g as Bt}from"./chunk-YPKJM2FT.js";import"./chunk-YK5TE4SE.js";import"./chunk-6M375RXK.js";import"./chunk-NHJTH5WO.js";import{a as vn,m as qe}from"./chunk-4HL4SGL4.js";import"./chunk-256T6XGD.js";import"./chunk-77A6WJ4G.js";import{u as je,v as Pn}from"./chunk-MYAV2RVH.js";import"./chunk-SRHBIUOA.js";import"./chunk-DIBJZJWZ.js";import{a as Te}from"./chunk-65MX5DGF.js";import{b as xn}from"./chunk-F65RSXQO.js";import{a as ee,g as Mi}from"./chunk-37BFIKWR.js";import"./chunk-YIW73Z7F.js";import"./chunk-24WENEMY.js";import{a as Rt,b as y,c as nn,d as ft,e as Dt}from"./chunk-U4G6IDFH.js";import{a as h}from"./chunk-UA77TK5E.js";import"./chunk-LM4VHPX7.js";import{d as Vt}from"./chunk-MBK6PEMM.js";import"./chunk-S3QA7A5D.js";import"./chunk-XRAFRYVE.js";import"./chunk-JXLCV3KC.js";import{b as ze}from"./chunk-3NUVCZSM.js";import"./chunk-C3YVOUSC.js";import"./chunk-7G5XKCOM.js";import{b as He,h as Y}from"./chunk-UECJ453Z.js";import"./chunk-X7E55REQ.js";import"./chunk-RHB4VPG6.js";import"./chunk-64MUM4D5.js";import"./chunk-UHX2SD6L.js";import"./chunk-KN3URXNF.js";import"./chunk-47TNIFQY.js";import"./chunk-YUP4O7PA.js";import"./chunk-VX45OPQM.js";import{a as Si}from"./chunk-D42LMYQN.js";import{a as oe}from"./chunk-33OUW7JG.js";import"./chunk-CJ7MFRDY.js";import{C as bt,E as D,b as We,d as L,e as B,g as F,h as E,i as M,j as fn,l as w,o as Pe,q as gn,s as Re,t as gt,u as bn,v as ae,w as V,y as Cn}from"./chunk-T3JNGRHC.js";import"./chunk-6JUBPOD4.js";import{a as xi,c as Pi}from"./chunk-7UMG6GAH.js";import"./chunk-6F24TLUE.js";import"./chunk-AWY3ZPQQ.js";import"./chunk-OO32DFUM.js";import{a as hn}from"./chunk-EEFHK3HE.js";import"./chunk-ROXA7HIG.js";import"./chunk-4YCTPXYS.js";import"./chunk-KOZQW2NX.js";import"./chunk-7CYI6VVX.js";import"./chunk-RV7U4QKZ.js";import{d as Nt}from"./chunk-227VMNZI.js";import{l as _n}from"./chunk-X4ZDYXD6.js";import"./chunk-OE2Y72RC.js";import"./chunk-6H4RW4GC.js";import{l as tn}from"./chunk-DI77E2UP.js";import"./chunk-AL36TWJK.js";import"./chunk-D4EV7OVS.js";import{a as wi}from"./chunk-OXCEURZ7.js";import{a as cn}from"./chunk-E2P542RK.js";import{e as an}from"./chunk-ESOXOPOP.js";import"./chunk-CNYEDN6E.js";import{a as en}from"./chunk-PP3VD5HN.js";import"./chunk-E67GSJZS.js";import{c as Et,f as rn}from"./chunk-EI6WOAVY.js";import{b as un}from"./chunk-C3E6HVFP.js";import"./chunk-NGSTBHRD.js";import"./chunk-5ZYPI6NP.js";import"./chunk-2IPAVY6Z.js";import"./chunk-GY3FA5MN.js";import"./chunk-3GGUL4LO.js";import"./chunk-6LDUSBHJ.js";import"./chunk-AWK3HYDF.js";import"./chunk-NXROK4SX.js";import"./chunk-XS53GY5F.js";import{a as dn,d as pn,f as At}from"./chunk-XEV32GRI.js";import"./chunk-2EAX2XML.js";import{a as It}from"./chunk-AS37JCKL.js";import{a as Ge,b as ge}from"./chunk-VHA6NNFB.js";import"./chunk-DZYT67VT.js";import{a as yn}from"./chunk-56YJHNYB.js";import"./chunk-QS3FVHUX.js";import"./chunk-6KNESGBS.js";import{d as ln,f as xe}from"./chunk-FIEPOV3L.js";import"./chunk-QNZ5PBTF.js";import"./chunk-ZRHSOQAA.js";import"./chunk-2Q7GJLW7.js";import"./chunk-IJLD3ADS.js";import"./chunk-HHA24DUW.js";import"./chunk-ENXHN3NY.js";import{b as on}from"./chunk-VPIKUZV2.js";import{e as Ft,h as R}from"./chunk-JA6V3LP7.js";import{a as S,c as Ie}from"./chunk-YYDSENFE.js";import{b as re}from"./chunk-CBDOLHOQ.js";import{d as q,i as Zi}from"./chunk-QLCNJGUD.js";import{D as sn}from"./chunk-GIXQ2ZV6.js";import"./chunk-XIGR5Y23.js";import{h as X}from"./chunk-SOKMTEZX.js";import"./chunk-YEH6RQGE.js";import"./chunk-S6QVQOMT.js";import"./chunk-LD5QKCP6.js";import{n as Ji}from"./chunk-CZAV6ZVA.js";import{Ab as qi,Ba as Q,D as ie,E as be,Eb as I,Ed as Ki,Fc as mt,Gb as Xi,Gc as ht,H as Ui,Ha as Ve,Hc as W,J as Gi,Ja as pt,Jb as Tt,Jc as ye,Kb as Ot,Lc as u,Mc as T,Nc as C,Oc as Yi,P as Wi,S as Hi,Tc as we,Uc as rt,Vc as Le,Xb as fe,Xc as vi,Y as zi,Yc as pe,Z as Qi,Zc as Ue,_b as g,aa as _i,ac as b,ad as s,bd as d,cc as Ce,cd as j,da as ji,dc as _e,ec as ve,ed as yi,fc as p,gc as c,hb as ut,hc as l,i as $i,ic as _,ld as $,m as Li,mc as Be,na as m,nc as $e,ob as r,qc as G,qd as Me,rd as x,s as Ee,sa as H,sd as at,ta as z,u as St,ub as ot,va as A,vc as O,wa as N,xc as v,yd as ne}from"./chunk-AQSA2CXO.js";import{a as Z,b as dt,d as ki,g as Bi}from"./chunk-4WJLCSWN.js";var Hn=(()=>{let i=class i extends $n{constructor(){let t=m(qi),o=m(ot),a=m(Nt);super(t,o,a),this.ddAcceptNotLoggedInUser=!0,this.ddIfHasRole=tn.CUSTOMER}};i.\u0275fac=function(o){return new(o||i)},i.\u0275dir=Xi({type:i,selectors:[["","ddIfIsCustomerOrNotLogin",""]],features:[Tt]});let e=i;return e})();var xo=Bi(en());function Mo(e,i){e&1&&(c(0,"p",2),u(1),s(2,"transloco"),l()),e&2&&(r(),C(" ",d(2,1,"booking.trip.login.textUK")," "))}function To(e,i){e&1&&(c(0,"p",3),u(1),s(2,"transloco"),l()),e&2&&(r(),C(" ",d(2,1,"booking.trip.login.textFR")," "))}function Io(e,i){e&1&&(c(0,"p",4),u(1),s(2,"transloco"),l()),e&2&&(r(),C(" ",d(2,1,"booking.trip.login.textNonUK")," "))}function Ro(e,i){if(e&1){let n=G();c(0,"section",0)(1,"h4",1),u(2),s(3,"transloco"),l(),g(4,Mo,3,3,"p",2)(5,To,3,3,"p",3)(6,Io,3,3,"p",4),c(7,"button",5),O("click",function(){A(n);let o=v();return N(o.login())}),u(8),s(9,"transloco"),l()()}if(e&2){let n=v();r(2),C(" ",d(3,4,"booking.trip.login.title")," "),r(2),b(n.isUkSite?4:n.isFrSite?5:6),r(3),p("size",n.$buttonSize()),r(),C(" ",d(9,6,"booking.trip.login.loginToYourAccount")," ")}}var zn=(()=>{let i=class i{constructor(){this.appSiteCountry=m(It),this._authenticationService=m(_n),this._bfBreakpointService=m(hn),this.$isLoggedIn=this._authenticationService.$isAuthenticated,this.$buttonSize=$(()=>this._bfBreakpointService.$isMobile()?"large":"medium")}login(){this._authenticationService.login()}get isUkSite(){return this.appSiteCountry===Ge.GB}get isFrSite(){return this.appSiteCountry===Ge.FR}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-login-club-voyage"]],decls:1,vars:1,consts:[["data-testid","login",1,"login-club-voyage","flex","column","gap-m"],[1,"title","bf-subtitle"],["data-testid","loginTextUK",1,"bf-body-2-regular"],["data-testid","loginTextFR",1,"bf-body-2-regular"],["data-testid","loginTextNonUK",1,"bf-body-2-regular"],["mat-stroked-button","","data-testid","loginBtn","type","button",3,"click","
1size"]],template:function(o,a){o&1&&g(0,Ro,10,8,"section",0),o&2&&b(a.$isLoggedIn()?-1:0)},dependencies:[re,xe,D,R],styles:[".login-club-voyage[_ngcontent-%COMP%]{margin:0 0 32px;padding:24px;border-radius:6px;background-color:#f1f5f9}.login-club-voyage[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin:0;color:#23308e}.login-club-voyage[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}@media(min-width:600px){.login-club-voyage[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:fit-content}}"],changeDetection:0});let e=i;return e})();var Do=e=>({optional:e});function Eo(e,i){if(e&1&&(c(0,"mat-list-option",7),u(1),s(2,"transloco"),l()),e&2){let n=i.$implicit;p("value",n),r(),C(" ",d(2,2,`booking.trip.passengers.disability.${n}`)," ")}}function Vo(e,i){if(e&1&&(c(0,"mat-form-field",1),_(1,"input",8),s(2,"transloco"),l()),e&2){let n=v();r(),p("maxlength",n.disabilityTextMaxLength)("placeholder",j(2,2,"booking.trip.passengers.disability.placeholderOther",pe(5,Do,!n.isOtherTextRequired(n.disabilityDetail.value))))}}var Qn=(()=>{let i=class i{constructor(){this._fb=m(bt),this._cdr=m(ne),this._controlContainer=m(B);let t=m(un);this.isDesktop=t.device.isDesktop,this.disability=st,this.disabilities=Object.values(st),this.disabilityTextMaxLength=35}ngOnInit(){this.form=this._controlContainer.control,this.form.addControl("disabilityDetail",this._fb.control(null)),this.form.addControl("otherDisabilityText",this._fb.control(null,[se.requiredIf(()=>this.isOtherTextRequired(this.disabilityDetail?.value)),L.maxLength(this.disabilityTextMaxLength)]))}selectDisability(t){t.options.length!==0&&(this.disabilityDetail.patchValue(t.options[0].value),this.disabilityDetail.value===null&&this.form.patchValue({otherDisabilityText:null}),this.otherDisabilityText.updateValueAndValidity(),this._cdr.detectChanges())}isOtherTextRequired(t){return[st.OTHER,st.WALKING_DIFFICULTIES,st.MEDICAL_EQUIPMENT,st.MEDICATION].includes(t)}get isOtherDisabilityTextVisible(){return this.disabilityDetail.value!==null}get disabilityDetail(){return this.form?.controls.disabilityDetail}get otherDisabilityText(){return this.form.controls.otherDisabilityText}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-passengers-disability-select"]],hostAttrs:[1,"dd-passengers-disability-select"],decls:16,vars:18,consts:[[1,"container",3,"formGroup"],["subscriptSizing","dynamic"],["data-testid","disabilityDetail","formControlName","disabilityDetail",3,"label","placeholder","closeOnSelect"],["display-value",""],[1,"select-wrapper"],[1,"type-select",3,"selectionChange","multiple","hideSingleSelectionIndicator"],["matRipple","","tabindex","0",3,"value"],["matRipple","","data-testid","disabilityDetailDropdownItem","tabindex","0",3,"value"],["matInput","","type","text","formControlName","otherDisabilityText",3,"maxlength","placeholder"]],template:function(o,a){o&1&&(c(0,"div",0)(1,"mat-form-field",1)(2,"bf-responsive-select",2),s(3,"transloco"),s(4,"transloco"),c(5,"span",3),u(6),s(7,"transloco"),l(),c(8,"div",4)(9,"mat-selection-list",5),O("selectionChange",function(P){return a.selectDisability(P)}),c(10,"mat-list-option",6),u(11),s(12,"transloco"),l(),_e(13,Eo,3,4,"mat-list-option",7,Ce),l()()()(),g(15,Vo,3,7,"mat-form-field",1),l()),o&2&&(p("formGroup",a.form),r(2),p("label",d(3,10,"booking.trip.passengers.disability.title"))("placeholder",d(4,12,"booking.trip.passengers.disability.noSpecialAssistance"))("closeOnSelect",!0),r(4),T(d(7,14,`booking.trip.passengers.disability.${a.disabilityDetail.value}`)),r(3),p("multiple",!1)("hideSingleSelectionIndicator",!0),r(),p("value",null),r(),C(" ",d(12,16,"booking.trip.passengers.disability.noSpecialAssistance")," "),r(2),ve(a.disabilities),r(2),b(a.isOtherDisabilityTextVisible?15:-1))},dependencies:[D,We,F,E,Cn,V,ae,Y,Bt,kt,sn,ze,De,R],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}"],changeDetection:0});let e=i;return e})();var Fo=["disabilityDialog"],Ao=["disabilitySafetyDialog"];function No(e,i){e&1&&(c(0,"bf-dialog",12),s(1,"transloco"),s(2,"transloco"),_(3,"p",13),s(4,"transloco"),l()),e&2&&(p("secondaryActionButtonTranslation",d(1,3,"booking.trip.passengers.disability.dialog.textButton"))("title",d(2,5,"booking.trip.passengers.disability.dialog.title")),r(3),p("innerHTML",d(4,7,"booking.trip.passengers.disability.dialog.text"),ut))}function ko(e,i){if(e&1){let n=G();c(0,"div",10)(1,"button",14),O("click",function(){A(n);let o=v();return N(o.onClickOpenDisabilitySafetyInformation())}),c(2,"mat-icon"),u(3,"info"),l(),c(4,"span"),u(5),s(6,"transloco"),l()()()}if(e&2){let n=v();r(5),T(d(6,1,n.getSafetyInformationMessage()))}}function Bo(e,i){if(e&1&&(c(0,"bf-dialog",15),s(1,"transloco"),s(2,"transloco"),c(3,"div"),_(4,"p",13),s(5,"transloco"),_(6,"p",13),s(7,"transloco"),l()()),e&2){let n=v();p("secondaryActionButtonTranslation",d(1,4,"booking.trip.passengers.disability.disabilitySafetyDialog.textButton"))("title",d(2,6,"booking.trip.passengers.disability.disabilitySafetyDialog.title")),r(4),p("innerHTML",d(5,8,n.disabilitySafetyMessageToDisplay),ut),r(2),p("innerHTML",d(7,10,"booking.trip.passengers.disability.disabilitySafetyDialog.text2"),ut)}}function $o(e,i){e&1&&(c(0,"div",11)(1,"h3")(2,"mat-icon"),u(3,"info"),l(),u(4),s(5,"transloco"),l()()),e&2&&(r(4),C(" ",d(5,1,"booking.trip.passengers.disability.twentyFourHoursNotice")," "))}var Oe=class Oe{constructor(){this.$isSameInboundPassengers=x(!0,{alias:"isSameInboundPassengers"}),this.$display24hDisabilityNotice=x(!1,{alias:"display24hDisabilityNotice"}),this._controlContainer=m(B),this._formBuilder=m(bt),this._matDialog=m(an),this._$disabilityDialog=at("disabilityDialog",{read:ot}),this._$disabilitySafetyDialog=at("disabilitySafetyDialog",{read:ot})}get outwardPassengersDisability(){return this.formTrip.controls.outwardPassengersDisability}get inwardPassengersDisability(){return this.formTrip.controls.inwardPassengersDisability}ngOnInit(){this.formTrip=this._controlContainer.control,this.formTrip.addControl("outwardPassengersDisability",this._formBuilder.group({})),this.formTrip.addControl("inwardPassengersDisability",this._formBuilder.group({}))}hasOneDisabilityDetail(){return!!this.outwardPassengersDisability.value?.disabilityDetail||!!this.inwardPassengersDisability.value?.disabilityDetail}onClickOpenDisabilityInformation(){this._$disabilityDialog()&&this._matDialog.open(this._$disabilityDialog(),{panelClass:["albatros","ignore-bf-common-ui"]}
1)}onClickOpenDisabilitySafetyInformation(){this._$disabilitySafetyDialog()&&(this.disabilitySafetyMessageToDisplay=this.hasPortWithLimitedAccessibility()?"booking.trip.passengers.disability.disabilitySafetyDialog.textImportant":"booking.trip.passengers.disability.disabilitySafetyDialog.text",this._matDialog.open(this._$disabilitySafetyDialog(),{panelClass:["albatros","ignore-bf-common-ui"]}))}getSafetyInformationMessage(){return this.hasPortWithLimitedAccessibility()?"booking.trip.passengers.disability.safetyLimitsInfosImportant":"booking.trip.passengers.disability.safetyLimitsInfos"}hasPortWithLimitedAccessibility(){let i,n=this.formTrip.controls.outwardRoute?.value.departure.code,t=this.formTrip.controls.outwardRoute?.value.arrival.code,o=this.formTrip.controls.inwardRoute?.value?.departure.code;return this.formTrip.controls.isReturnTrip?.value?this.formTrip.controls.isSameInboundPort.value?i=Oe._PORTS_WITHOUT_ACCESSIBILITY.includes(n)||Oe._PORTS_WITHOUT_ACCESSIBILITY.includes(t):i=Oe._PORTS_WITHOUT_ACCESSIBILITY.includes(n)||Oe._PORTS_WITHOUT_ACCESSIBILITY.includes(o):i=Oe._PORTS_WITHOUT_ACCESSIBILITY.includes(n),i}};Oe._PORTS_WITHOUT_ACCESSIBILITY=[xi.ESBIO,xi.IEROE],Oe.\u0275fac=function(n){return new(n||Oe)},Oe.\u0275cmp=I({type:Oe,selectors:[["dd-passengers-disability"]],viewQuery:function(n,t){n&1&&mt(t._$disabilityDialog,Fo,5,ot)(t._$disabilitySafetyDialog,Ao,5,ot),n&2&&ht(2)},hostAttrs:[1,"dd-passengers-disability"],inputs:{$isSameInboundPassengers:[1,"isSameInboundPassengers","$isSameInboundPassengers"],$display24hDisabilityNotice:[1,"display24hDisabilityNotice","$display24hDisabilityNotice"]},decls:25,vars:13,consts:[["disabilityDialog",""],["disabilitySafetyDialog",""],[3,"formGroup"],[1,"form-field-area-title"],[1,"title"],["mat-button","","type","button","size","small",3,"click"],[1,"passengers-disability-container"],[1,"form"],["formGroupName","outwardPassengersDisability"],["data-testid","isSameInboundPassengers","formGroupName","inwardPassengersDisability",3,"hidden"],["data-testid","hasOneDisabilityDetail",1,"disability-information"],["data-testid","display24hDisabilityNotice",1,"information-message"],["icon","info",3,"secondaryActionButtonTranslation","title"],[3,"innerHTML"],["mat-button","","size","small","type","button",1,"infos",3,"click"],["icon","accessible",3,"secondaryActionButtonTranslation","title"]],template:function(n,t){n&1&&(Be(0,2),c(1,"span",3)(2,"span",4)(3,"mat-icon"),s(4,"transloco"),u(5,"accessible_forward"),l(),c(6,"h4"),u(7),s(8,"transloco"),l()(),c(9,"button",5),O("click",function(){return t.onClickOpenDisabilityInformation()}),c(10,"mat-icon"),u(11,"info"),l(),c(12,"span"),u(13),s(14,"transloco"),l()()(),Ot(15,No,5,9,"ng-template",null,0,yi),c(17,"div",6)(18,"div",7),_(19,"dd-passengers-disability-select",8)(20,"dd-passengers-disability-select",9),g(21,ko,7,3,"div",10),l(),Ot(22,Bo,8,12,"ng-template",null,1,yi),g(24,$o,6,3,"div",11),l(),$e()),n&2&&(p("formGroup",t.formTrip),r(3),fe("aria-label",d(4,7,"booking.trip.passengers.disability.title")),r(4),T(d(8,9,"booking.trip.passengers.disability.title")),r(6),T(d(14,11,"booking.trip.passengers.disability.moreInfos")),r(7),p("hidden",t.$isSameInboundPassengers()),r(),b(t.hasOneDisabilityDetail()?21:-1),r(3),b(t.$display24hDisabilityNotice()?24:-1))},dependencies:[D,E,V,gt,X,re,Qn,xe,cn,R],styles:["[_nghost-%COMP%]{display:block;width:100%}@media(min-width:600px){[_nghost-%COMP%]{max-width:600px}}.form-field-area-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.form-field-area-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center}.form-field-area-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{margin-right:16px;width:1.25rem;min-width:1.25rem;height:1.25rem;line-height:1.25rem;font-size:1.25rem;display:inline-flex;align-items:center;justify-content:center}.form-field-area-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;color:#23308e;font-size:1rem;font-weight:500}.passengers-disability-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;gap:24px}.passengers-disability-container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.passengers-disability-container[_ngcontent-%COMP%] .information-message[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1}.passengers-disability-container[_ngcontent-%COMP%] .information-message[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;color:#23308e;font-size:.875rem;line-height:24px;margin:0;font-weight:500}.passengers-disability-container[_ngcontent-%COMP%] .information-message[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{margin-right:12px;width:1.25rem;min-width:1.25rem;height:1.25rem;line-height:1.25rem;font-size:1.25rem;display:inline-flex;align-items:center;justify-content:center;color:#23308e}"],changeDetection:0});var Ut=Oe;var jn=Bi(en());var Xe=class extends K{get isSamePassengersOnBothWayForced(){return!1}get showCabinOneTypeNotification(){return!1}get minimumAdults(){return Lt.DEFAULT_ADULT_MIN}};var Gt=class extends Xe{constructor(){super(...arguments),this.context=h.AGENT}};var Wt=class extends Xe{constructor(){super(),this.context=h.PROMO,this._funnelRulesStateService=m(me),this._funnelRules=this._funnelRulesStateService.funnelRules()}get isSamePassengersOnBothWayForced(){return!!this._funnelRules?.selectTrip?.passengers?.isSamePassengersOnBothWayForced}get showCabinOneTypeNotification(){return this._funnelRules?.limitOneCabinPerType()}get minimumAdults(){return this._funnelRules?.selectTrip?.passengers?.minAdults??1}};var Ht=class extends Xe{constructor(){super(...arguments),this.context=h.STANDARD}};var qn=e=>({number:e});function Lo(e,i){e&1&&(c(0,"ul",12)(1,"li"),u(2),s(3,"transloco"),l(),c(4,"li"),u(5),s(6,"transloco"),l()()),e&2&&(r(2),C(" ",d(3,2,"booking.trip.passengers.errorPassengerReplaced1")," "),r(3),C(" ",d(6,4,"booking.trip.passengers.errorPassengerReplaced2")," "))}function Uo(e,i){if(e&1){let n=G();c(0,"mat-form-field",6)(1,"bf-responsive-select",9,1),s(3,"transloco"),s(4,"transloco"),c(5,"span",10),u(6),s(7,"transloco"),l(),c(8,"dd-passengers-select",11),O("valueChange",function(o){A(n);let a=v();return N(a.form.controls.inwardPassengersQuantity.setValue(o))})("confirm",function(){A(n);let o=W(2);return N(o.close())}),l()(),c(9,"mat-error"),g(10,Lo,7,6,"ul",12),l()()}if(e&2){let n=v();r(),p("label",d(3,9,"booking.trip.passengers.inwardPassengers"))("placeholder",d(4,11,"booking.trip.passengers.inwardPassengers")),r(4),ye("empty",n.getInwardPassengersAmount===0),r(),C(" ",j(7,13,"booking.trip.passengers.inwardSelected",pe(16,qn,n.getInwardPassengersAmount))," "),r(2),p("value",n.form.controls.inwardPassengersQuantity.value)("cabinOneTypeNotification",n.funnelPassengers.showCabinOneTypeNotification)("minimumAdults",n.funnelPassengers.minimumAdults),r(2),b(n.hasInwardPassengersQuantityError?10:-1)}}function Go(e,i){e&1&&(c(0,"div",7)(1,"mat-checkbox",13),u(2),s(3,"transloco"),l()()),e&2&&(r(2),C(" ",d(3,1,"booking.trip.passengers.sameInboundJourney")," "))}var Ri=(()=>{let i=class i{constructor(){this._bookingService=m(qe),this._cd=m(ne),this._controlContainer=m(B),this._destroyRef=m(Q),this.activatedRoute=m(q),this.display24hDisabilityNotice=!1,this._environmentInjector=m(H)}ngOnInit(){this.funnelPassengers=z(this._environmentInjector,()=>this.createFunnelPassengers()),this.form=this._controlContainer.control,this.form.controls.outwardPassengersQuantity.setValidators([Se.validatePassengerCount.bind(this),L.required]),this.form.controls.inwardPassengersQuantity.setValidators([this.inwardPassengersValidatorIfVisible.bind(this),this.validatePassengerNotReplaced.bind(this)]),this.outwardPassengersDisability.disable(),this.inwardPassengersDisability.disable(),this.watchReturnTripState(),this.watchIsSameInboundPassengers(),this.togglePassengersDisabledState(),this.toggleIsSameInboundPassengersDisabledState()}get isReturnTrip(){return this.form.controls.isReturnTrip}
1get outwardDate(){return this.form.controls.outwardDate}get inwardDate(){return this.form.controls.inwardDate}get outwardPassengersQuantity(){return this.form.controls.outwardPassengersQuantity}get inwardPassengersQuantity(){return this.form.controls.inwardPassengersQuantity}get outwardPassengersDisability(){return this.form.controls.outwardPassengersDisability}get inwardPassengersDisability(){return this.form.controls.inwardPassengersDisability}get isSameInboundPassengers(){return this.form.controls.isSameInboundPassengers}get hasOneDisability(){return!!this.outwardPassengersDisability.value?.disabilityDetail||!!this.inwardPassengersDisability.value?.disabilityDetail}get getOutwardPassengersAmount(){return this.getPassengersFormQuantity(this.outwardPassengersQuantity?.value)}get getInwardPassengersAmount(){return this.getPassengersFormQuantity(this.inwardPassengersQuantity?.value)}get isInwardPassengerVisible(){return this.funnelPassengers.isSamePassengersOnBothWayForced?!1:this.isReturnTrip.value&&!this.isSameInboundPassengers.value}get hasInwardPassengersQuantityError(){return this.inwardPassengersQuantity.hasError("passengerReplaced")}static createForm(){return new M({isSameInboundPassengers:new w({value:!0,disabled:!0},{nonNullable:!0}),outwardPassengersQuantity:new w({value:void 0,disabled:!0},{nonNullable:!0}),inwardPassengersQuantity:new w({value:void 0,disabled:!0},{nonNullable:!0}),outwardPassengersDisability:new M({disabilityDetail:new w(null),otherDisabilityText:new w(null)}),inwardPassengersDisability:new M({disabilityDetail:new w(null),otherDisabilityText:new w(null)})})}getPassengersFormQuantity(t){let o=0;return t&&(o+=t.childrensPassengers||0,o+=t.infantsPassengers||0,o+=t.adultsPassengers||0),o}watchReturnTripState(){this.isReturnTrip.valueChanges.pipe(S(this._destroyRef)).subscribe(t=>{t||(this.inwardPassengersQuantity.patchValue(void 0),this.resetInwardPassengersDisability(),this.isSameInboundPassengers.patchValue(!0),this._cd.detectChanges())})}watchIsSameInboundPassengers(){this.isSameInboundPassengers.valueChanges.pipe(S(this._destroyRef)).subscribe(t=>{t&&(this.inwardPassengersQuantity.patchValue(void 0),this.resetInwardPassengersDisability())})}resetInwardPassengersDisability(){this.inwardPassengersDisability.patchValue({disabilityDetail:null,otherDisabilityText:null})}togglePassengersDisabledState(){ie(this._bookingService.formRestored,this.outwardDate.valueChanges,this.inwardDate.valueChanges,this.isReturnTrip.valueChanges).pipe(S(this._destroyRef)).subscribe(t=>{this.outwardDate.value&&this.inwardDate.value&&this.isReturnTrip.value||this.outwardDate.value&&!this.isReturnTrip.value?(this.outwardPassengersQuantity.enable({emitEvent:!1}),this.outwardPassengersDisability.enable({emitEvent:!1}),this.inwardPassengersQuantity.enable({emitEvent:!1}),this.inwardPassengersDisability.enable({emitEvent:!1})):(this.outwardPassengersQuantity.disable({emitEvent:!1}),this.outwardPassengersDisability.disable({emitEvent:!1}),this.inwardPassengersQuantity.disable({emitEvent:!1}),this.inwardPassengersDisability.disable({emitEvent:!1})),this.display24hDisabilityNotice=this.outwardDate.value?.isAfter?!this.outwardDate.value.isAfter((0,jn.default)(),"day"):!1,this._cd.detectChanges()})}toggleIsSameInboundPassengersDisabledState(){ie(this._bookingService.formRestored,this.outwardPassengersQuantity.valueChanges,this.outwardDate.valueChanges,this.inwardDate.valueChanges,this.isReturnTrip.valueChanges).pipe(S(this._destroyRef)).subscribe(()=>{this.outwardPassengersQuantity.value&&this.inwardDate.value?this.isSameInboundPassengers.enable({emitEvent:!1}):this.isSameInboundPassengers.disable({emitEvent:!1})})}inwardPassengersValidatorIfVisible(t){return!t.parent||!this.isInwardPassengerVisible?null:Se.validatePassengerCount(t)}validatePassengerNotReplaced(){let t=this.outwardPassengersQuantity,o=this.inwardPassengersQuantity;if(t.value&&o.value){let a=t.value.adultsPassengers<o.value.adultsPassengers||t.value.childrensPassengers<o.value.childrensPassengers||t.value.infantsPassengers<o.value.infantsPassengers,f=t.value.adultsPassengers>o.value.adultsPassengers||t.value.childrensPassengers>o.value.childrensPassengers||t.value.infantsPassengers>o.value.infantsPassengers;if(a&&f)return this.inwardPassengersQuantity.markAsTouched(),{passengerReplaced:!0}}return null}createFunnelPassengers(){let t=J([{constructableSelector:h.STANDARD,constructableType:Ht},{constructableSelector:h.AGENT,constructableType:Gt},{constructableSelector:h.PROMO,constructableType:Wt}],this.activatedRoute.snapshot.parent?.parent?.data.funnelType);if(!t)throw new Error("No funnel passengers found for funnel type: "+this.activatedRoute.snapshot.parent?.parent?.data.funnelType);return t}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-passengers"]],decls:13,vars:22,consts:[["outwardPassengersResponsiveSelect",""],["inwardPassengersResponsiveSelect",""],[3,"formGroup"],["data-testid","out
1wardPassengers","formControlName","outwardPassengersQuantity",3,"label","placeholder"],["data-testid","outwardPassengersDisplay","display-value","",1,"passenger-display"],["direction","outward",3,"valueChange","confirm","value","cabinOneTypeNotification","minimumAdults"],["subscriptSizing","dynamic",1,"inward-passenger-form-field"],[1,"sameInboundPassengers"],[3,"isSameInboundPassengers","display24hDisabilityNotice"],["data-testid","inwardPassengers","formControlName","inwardPassengersQuantity",3,"label","placeholder"],["data-testid","inwardPassengersDisplay","display-value","",1,"passenger-display"],["direction","inward",3,"valueChange","confirm","value","cabinOneTypeNotification","minimumAdults"],["data-testid","passengerReplacedError"],["data-testid","isSameInboundPassengersCheckbox","formControlName","isSameInboundPassengers","color","primary"]],template:function(o,a){if(o&1){let f=G();Be(0,2),c(1,"mat-form-field")(2,"bf-responsive-select",3,0),s(4,"transloco"),s(5,"transloco"),c(6,"span",4),u(7),s(8,"transloco"),l(),c(9,"dd-passengers-select",5),O("valueChange",function(k){return a.form.controls.outwardPassengersQuantity.setValue(k)})("confirm",function(){A(f);let k=W(3);return N(k.close())}),l()()(),g(10,Uo,11,18,"mat-form-field",6),g(11,Go,4,3,"div",7),_(12,"dd-passengers-disability",8),$e()}o&2&&(p("formGroup",a.form),r(2),p("label",d(4,13,"booking.trip.passengers.outwardPassengers"))("placeholder",d(5,15,"booking.trip.passengers.outwardPassengers")),r(4),ye("empty",a.getOutwardPassengersAmount===0),r(),C(" ",j(8,17,"booking.trip.passengers.outwardSelected",pe(20,qn,a.getOutwardPassengersAmount))," "),r(2),p("value",a.form.controls.outwardPassengersQuantity.value)("cabinOneTypeNotification",a.funnelPassengers.showCabinOneTypeNotification)("minimumAdults",a.funnelPassengers.minimumAdults),r(),b(a.isInwardPassengerVisible?10:-1),r(),b(a.isReturnTrip.value&&!a.funnelPassengers.isSamePassengersOnBothWayForced?11:-1),r(),p("isSameInboundPassengers",a.isSameInboundPassengers.value)("display24hDisabilityNotice",a.display24hDisabilityNotice))},dependencies:[D,F,E,V,ae,Y,Lt,He,le,Ut,De,R],styles:[".mat-mdc-form-field[_ngcontent-%COMP%]{width:100%;display:block}@media(min-width:600px){.mat-mdc-form-field[_ngcontent-%COMP%]{max-width:600px}}.passenger-display[_ngcontent-%COMP%]{font-size:.875rem}.inward-passenger-form-field[_ngcontent-%COMP%], .sameInboundPassengers[_ngcontent-%COMP%]{margin-bottom:24px}"],changeDetection:0});let e=i;return e})();function Wo(e,i){e&1&&(_(0,"bf-alert",11),s(1,"transloco"),s(2,"transloco")),e&2&&p("label",d(1,2,"booking.trip.pets.exoticPetNoticeText"))("title",d(2,4,"booking.trip.pets.pleaseContactUs"))}var Xn=(()=>{let i=class i{constructor(){this._destroyRef=m(Q),this.$value=x.required({alias:"value"}),this.valueChange=Me(),this.confirm=Me(),this.form=new M({smallDogs:new w(0,{nonNullable:!0}),largeDogs:new w(0,{nonNullable:!0}),otherPets:new w(0,{nonNullable:!0}),hasExoticPet:new w(!1,{nonNullable:!0})},{validators:Se.petFormValid()}),pt(()=>{let t=this.$value();t&&this.form&&JSON.stringify(t)!==JSON.stringify(this.form.value)&&this.form.patchValue(t)})}ngOnInit(){this.form.valueChanges.pipe(Gi(300),S(this._destroyRef)).subscribe(()=>{let t=this.$value();(this.form.valid||this.hasExoticPet.value)&&JSON.stringify(t)!==JSON.stringify(this.form.value)&&this.valueChange.emit(new xn(this.form.value))})}get smallDogs(){return this.form.controls.smallDogs}get largeDogs(){return this.form.controls.largeDogs}get otherPets(){return this.form.controls.otherPets}get hasExoticPet(){return this.form.controls.hasExoticPet}get nbPetsLeft(){return i._MAX_NB_PETS-this.smallDogs.value-this.largeDogs.value-this.otherPets.value}get maxSmallDogs(){return this.nbPetsLeft+this.smallDogs.value}get maxLargeDogs(){return this.nbPetsLeft+this.largeDogs.value}get maxOtherPets(){return this.nbPetsLeft+this.otherPets.value}};i._MAX_NB_PETS=5,i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-pets-select"]],hostAttrs:[1,"albatros","ignore-bf-common-ui"],inputs:{$value:[1,"value","$value"]},outputs:{valueChange:"valueChange",confirm:"confirm"},decls:40,vars:30,consts:[["data-testid","selectWrapper",1,"pets-select-wrapper"],["novalidate","",3,"ngSubmit","formGroup"],[1,"pet-category-line"],[1,"pet-list-item-labels"],[1,"title"],[1,"label"],["data-testid","smallDogs","formControlName","smallDogs","min","0",1,"pet-list-item-number",3,"max"],["data-testid","largeDogs","formControlName","largeDogs","min","0",1,"pet-list-item-number",3,"max"],["data-testid","catsFerrets","formControlName","otherPets","min","0",1,"pet-list-item-number",3,"max"],[1,"pet-category-line","exotic-pet"],["formControlName","hasExoticPet","color","primary"],["data-testid","hasExoticPet","type","warning",3,"label","t
1itle"],[1,"actions-container"],["mat-flat-button","","data-testid","submit","type","submit",3,"disabled"]],template:function(o,a){o&1&&(c(0,"div",0)(1,"form",1),O("ngSubmit",function(){return a.confirm.emit()}),c(2,"div",2)(3,"div",3)(4,"span",4),u(5),s(6,"transloco"),l(),c(7,"div",5),u(8),s(9,"transloco"),l()(),_(10,"bf-number-selector",6),l(),c(11,"div",2)(12,"div",3)(13,"span",4),u(14),s(15,"transloco"),l(),c(16,"div",5),u(17),s(18,"transloco"),l()(),_(19,"bf-number-selector",7),l(),c(20,"div",2)(21,"div",3)(22,"span",4),u(23),s(24,"transloco"),l()(),_(25,"bf-number-selector",8),l(),c(26,"div",9)(27,"div",3)(28,"span",4),u(29),s(30,"transloco"),l()(),c(31,"p")(32,"mat-checkbox",10),u(33),s(34,"transloco"),l()(),g(35,Wo,3,6,"bf-alert",11),l(),c(36,"div",12)(37,"button",13),u(38),s(39,"transloco"),l()()()()),o&2&&(r(),p("formGroup",a.form),r(4),C(" ",d(6,14,"booking.trip.pets.smallDogs")," "),r(3),C(" ",d(9,16,"booking.trip.pets.upTo10")," "),r(2),p("max",a.maxSmallDogs),r(4),C(" ",d(15,18,"booking.trip.pets.largeDogs")," "),r(3),C(" ",d(18,20,"booking.trip.pets.over10")," "),r(2),p("max",a.maxLargeDogs),r(4),C(" ",d(24,22,"booking.trip.pets.catsFerrets")," "),r(2),p("max",a.maxOtherPets),r(4),C(" ",d(30,24,"booking.trip.pets.exoticPetTitle")," "),r(4),C(" ",d(34,26,"booking.trip.pets.exoticPetText")," "),r(2),b(a.hasExoticPet.value?35:-1),r(2),p("disabled",a.form.invalid),r(),C(" ",d(39,28,"booking.trip.pets.save")," "))},dependencies:[D,Pe,F,E,V,ae,Ct,le,ue,re,R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%]{color:#23308e;font-size:.875rem;width:100%;height:100%}@media(min-width:960px){[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%]{max-width:600px}}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:500px}@media(min-width:960px){[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{overflow:auto}}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .pet-category-line[_ngcontent-%COMP%]{display:flex;padding:24px 0;border-bottom:1px solid #cbd5e1;row-gap:8px}@media(min-width:600px){[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .pet-category-line[_ngcontent-%COMP%]{padding:24px 16px}}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .pet-category-line.exotic-pet[_ngcontent-%COMP%]{flex-direction:column}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .pet-category-line[_ngcontent-%COMP%] .pet-list-item-labels[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;flex:1 1 100%}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .pet-category-line[_ngcontent-%COMP%] .pet-list-item-labels[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#23308e;font-weight:500;font-size:.875rem;line-height:24px}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .pet-category-line[_ngcontent-%COMP%] .pet-list-item-labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;line-height:22px}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .infos[_ngcontent-%COMP%]{font-size:.75rem;line-height:22px;margin:0 0 5px}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%]{display:flex;padding:24px 0}@media(min-width:600px){[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%]{padding:24px 16px}}[_nghost-%COMP%] .pets-select-wrapper[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] .mdc-button[_ngcontent-%COMP%]{flex:1}"],changeDetection:0});let e=i;return e})();var Di=e=>({number:e});function Ho(e,i){if(e&1&&(c(0,"span",7),u(1),l()),e&2){let n=v();r(),C("(",n.outwardPetsDisplayValue,")")}}function zo(e,i){if(e&1&&(c(0,"span",7),u(1),l()),e&2){let n=v(2);r(),C("(",n.inwardPetsDisplayValue,")")}}function Qo(e,i){if(e&1){let n=G();c(0,"mat-form-field")(1,"bf-responsive-select",16,1),s(3,"transloco"),s(4,"transloco"),c(5,"span",17),u(6),s(7,"transloco"),g(8,zo,2,1,"span",7),l(),c(9,"dd-pets-select",8),O("valueChange",function(o){A(n);let a=v();return N(a.inwardPets.setValue(o))})("confirm",function(){A(n);let o=W(2);return N(o.close())}),l()()()}if(e&2){let n=v();r(),p("formControl",n.form.controls.inwardPets)("label",d(3,8,"booking.trip.pets.inboundPets"))("placeholder",j(4,10,"booking.trip.pets.inboundSelected",pe(16,Di,n.getInwardPetsAmount))),r(4),ye("empty",n.getInwardPetsAmount===0),r(),C(" ",j(7,13,"booking.trip.pets.inboundSelected",pe(18,Di,n.getInwardPetsAmount))," "),r(2),b(n.getInwardPetsAmount?8:-1),r(),p("value",n.inwardPets.value)}}function jo(e,i){e&1&&(c(0,"div")(1,"mat-checkbox",18),u(2),s(3,"transloco"),l()()),e&2&&(r(2),C(" ",d(3,1,"booking.trip.pets.sameInboundPets")," "))}function qo(e,i){e&1&&(c(0,"div",12)(1,"h3")(2,"mat-icon"),u(3,"info"),l(),u(4),s(5,"transloco"),l(),c(6,"p"),u(7),s(8,"transloco"),l()()),e&2&&(r(4),C(" ",d(5,2,"booking.trip.pets.petVehicleInfosTitle")," "),r(3),C(" ",d(8,4,"booking.trip.pets.petVehicleInfos")," "))}function Xo(e,i){e&1&&(_(0,"bf-alert",14),s(1,"transloco"),s(2,"transloco"),s(3,"transloco")),e&2&&p("title",`${d(1,2,"booking.trip.pets.petRequirementsTitle")} ${d(2,4,"booking.trip.pets.petRequirementsDogsTitle")}`)("label",d(3,6,"booking.trip.pets.petRequirementsDogsText"))}function Yo(e,i){e&1&&(_(0,"bf-alert",15),s(1,"transloco"),s(2,"transloco"),s(3,"transloco")),e&2&&p("title",`${d(1,2,"booking.trip.pets.petRequirementsTitle")} ${d(2,4,"booking.trip.pets.petRequirementsCatsFerretsTitle")}`)("label",d(3,6,"booking.trip.pets.petRequirementsCatsFerretsText"))}var Ei=(()=>{let i=class i{constructor(){this._bookingService=m(qe),this._translocoService=m(Ft),this._bottomSheet=m(mn),this._controlContainer=m(B),this._cd=m(ne),this._destroyRef=m(Q),this.displayOutwardVehiclePetHint=!1,this.displayInwardVehiclePetHint=!1}ngOnInit(){this.form=this._controlContainer.control,this.watchReturnTripState(),this.removeNextStepsOnPetsChanges(),this.watchIsSameInboundPets(),this.togglePetsDisabledState()}static createForm(){let t=new M({outwardPets:new w({smallDogs:0,largeDogs:0,otherPets:0,hasExoticPet:!1},{validators:Se.petFormValid()}),inwardPets:new w({smallDogs:0,largeDogs:0,otherPets:0,hasExoticPet:!1},{validators:Se.petFormValid()}),isSameInboundPets:new w(!0,{nonNullable:!0})});return t.controls.outwardPets.disable({emitEvent:!1}),t.controls.inwardPets.disable({emitEvent:!1}),t}get isInwardPetsVisible(){return this.isReturnTrip.value&&!this.isSameInboundPets.value}get hasAtLeastOneDog(){return!!(this.outwardPets.value?.largeDogs||this.outwardPets.value?.smallDogs||this.inwardPets.value?.largeDogs||this.inwardPets.value?.smallDogs)}get hasAtLeastOneOtherPets(){return!!(this.outwardPets.value?.otherPets||this.inwardPets.value?.otherPets)}get outwardPetsDisplayValue(){return this.petsDisplayValue(this.outwardPets.value??{})}get inwardPetsDisplayValue(){return this.petsDisplayValue(this.inwardPets.value??{})}petsDisplayValue({smallDogs:t,largeDogs:o,otherPets:a}){let f=[];return t&&f.push(`${t}x ${this._translocoService.translate("booking.trip.pets.smallDogs")}`),o&&f.push(`${o}x ${this._translocoService.translate("booking.trip.pets.largeDogs")}`),a&&f.push(`${a}
1x ${this._translocoService.translate("booking.trip.pets.catsFerrets")}`),f.join(", ")}isAuthorizedVehicleType(t){return t?this.vehicle.enabled&&[y.CAR,y.MINIBUS,y.VAN].includes(t):!1}get displayPetVehicleInfo(){return this.displayInwardVehiclePetHint&&this.isInwardPetsVisible||this.displayOutwardVehiclePetHint}get outwardDate(){return this.form.controls.outwardDate}get isReturnTrip(){return this.form.controls.isReturnTrip}get vehicle(){return this.form.controls.vehicle}get outwardPets(){return this.form.controls.outwardPets}get inwardPets(){return this.form.controls.inwardPets}get isSameInboundPets(){return this.form.controls.isSameInboundPets}get getOutwardPetsAmount(){let t=this.outwardPets.value;return t?this.getPetsAmount(t):0}get getInwardPetsAmount(){let t=this.inwardPets.value;return t?this.getPetsAmount(t):0}getPetsAmount(t){let o=t.smallDogs??0,a=t.largeDogs??0,f=t.otherPets??0;return o+a+f}onClickOpenPetsInformation(){this._bottomSheet.open(Ln,{data:{tags:["microcopyPetsInformation"],showButtonBottom:!0}})}watchReturnTripState(){this.isReturnTrip.valueChanges.pipe(S(this._destroyRef)).subscribe(t=>{t||(this.inwardPets.patchValue(null),this.isSameInboundPets.patchValue(!0),this._cd.detectChanges())})}removeNextStepsOnPetsChanges(){ie(this.outwardPets.valueChanges,this.inwardPets.valueChanges).pipe(be(t=>t!==null),S(this._destroyRef)).subscribe(()=>this._bookingService.removeFutureSteps(Te.SELECT_TRIP))}watchIsSameInboundPets(){this.isSameInboundPets.valueChanges.pipe(S(this._destroyRef)).subscribe(t=>{t&&this.inwardPets.patchValue(null)})}togglePetsDisabledState(){this._bookingService.formRestored.pipe(St(()=>ie(this.isReturnTrip.valueChanges,this.outwardDate.valueChanges,this.vehicle.valueChanges,this.isSameInboundPets.valueChanges)),S(this._destroyRef)).subscribe(()=>{if(!this.vehicle.value?.outward?.type&&!this.vehicle.value?.inward?.type)return;let t=this.isAuthorizedVehicleType(this.vehicle.value?.outward?.type),o=this.vehicle.value?.isSameInboundVehicle||this.isAuthorizedVehicleType(this.vehicle.value?.inward?.type);this.isReturnTrip.value&&t&&o?this.isSameInboundPets.enable({emitEvent:!1}):(this.vehicle.controls.isSameInboundVehicle.value||this.isSameInboundPets.setValue(!1,{emitEvent:!1}),this.isSameInboundPets.disable({emitEvent:!1})),t?(this.outwardPets.enable({emitEvent:!1}),this.displayOutwardVehiclePetHint=!1):(this.outwardPets.disable({emitEvent:!1}),this.getOutwardPetsAmount>0?this.outwardPets.patchValue({smallDogs:0,largeDogs:0,otherPets:0,hasExoticPet:!1}):this.outwardPets.patchValue(null),this.displayOutwardVehiclePetHint=!0),this.vehicle.value?.isSameInboundVehicle&&t||!this.vehicle.value?.isSameInboundVehicle&&o?(this.inwardPets.enable({emitEvent:!1}),this.displayInwardVehiclePetHint=!1):(this.inwardPets.disable({emitEvent:!1}),this.getInwardPetsAmount>0?this.inwardPets.patchValue({smallDogs:0,largeDogs:0,otherPets:0,hasExoticPet:!1}):this.inwardPets.patchValue(null),this.displayInwardVehiclePetHint=!0),this._cd.detectChanges()})}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-pets"]],decls:26,vars:27,consts:[["outwardPetsResponsiveSelect",""],["inwardPetsResponsiveSelect",""],[3,"formGroup"],[1,"container"],[1,"form"],["data-testid","outwardPets",3,"formControl","label","placeholder"],["data-testid","outwardPetsDisplay","display-value","",1,"pet-display"],[1,"bf-secondary"],[3,"valueChange","confirm","value"],["mat-button","","type","button","size","small",1,"infos",3,"click"],["data-testid","petsComfortInformationIcon"],["data-testid","petsComfortInformation"],["data-testid","vehicle-info",1,"information-message"],[1,"flex","column","gap-s"],["data-testid","dogPetRequirements","type","info",3,"title","label"],["data-testid","catFerretPetRequirements","type","info",3,"title","label"],["data-testid","inwardPets",3,"formControl","label","placeholder"],["data-testid","inwardPetsDisplay","display-value","",1,"pet-display"],["data-testid","isSameInboundPets","formControlName","isSameInboundPets","color","primary"]],template:function(o,a){if(o&1){let f=G();Be(0,2),c(1,"div",3)(2,"div",4)(3,"mat-form-field")(4,"bf-responsive-select",5,0),s(6,"transloco"),s(7,"transloco"),c(8,"span",6)(9,"span"),u(10),s(11,"transloco"),g(12,Ho,2,1,"span",7),l()(),c(13,"dd-pets-select",8),O("valueChange",function(k){return a.outwardPets.setValue(k)})("confirm",function(){A(f);let k=W(5);return N(k.close())}),l()()(),g(14,Qo,10,20,"mat-form-field"),c(15,"button",9),O("click",function(){return a.onClickOpenPetsInformation()}),c(16,"mat-icon",10),u(17,"info"),l(),c(18,"span",11),u(19),s(20,"transloco"),l()(),g(21,jo,4,3,"div"),l(),g(22,qo,9,6,"div",12),c(23,"div",13),g(24,Xo,4,8,"bf-alert",14),g(25,Yo,4,8,"bf-alert",15),l()(),$e()}o&2&&(p("formGroup",a.form),r(4),p("formControl",a.form.controls.outwardPets)("label",d(6,16,"booking.trip.pets.outboundPets"))("placeholder",d(7,18,"booking.trip.pets.noPetInfos")),r(4),ye("empty",a.getOutwardPetsAmount===0),r(),fe("data-testid",a.isInwardPetsVisible?"inwardPetsVisible":"inwardPetsNotVisible"),r(),C(" ",j(11,20,a.isInwardPetsVisible?"booking.trip.pets.outboundSelected":"booking.trip.pets.selected",pe(25,Di,a.getOutwardPetsAmount))," "),r(2),b(a.getOutwardPetsAmount?12:-1),r(),p("value",a.outwardPets.value),r(),b(a.isInwardPetsVisible?14:-1),r(5),T(d(20,23,"booking.trip.pets.moreInfo")),r(2),b(a.isReturnTrip.value?21:-1),r(),b(a.displayPetVehicleInfo?22:-1),r(2),b(a.hasAtLeastOneDog?24:-1),r(),b(a.hasAtLeastOneOtherPets?25:-1))},dependencies:[D,F,E,Re,V,ae,Y,Xn,re,X,le,De,ue,xe,R],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;gap:24px}@media(min-width:1280px){.container[_ngcontent-%COMP%]{flex-direction:row}}.container[_ngcontent-%COMP%] .bf-alert[_ngcontent-%COMP%]{width:100%}@media(min-width:600px){.container[_ngcontent-%COMP%] .bf-alert[_ngcontent-%COMP%]{max-width:600px}}@media(min-width:600px){.container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%]{width:100%;max-width:600px}}.container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin-top:-10px;margin-bottom:15px;font-size:.75rem;color:#b91c1c}.container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:.75rem;min-width:.75rem;height:.75rem;line-height:.75rem;font-size:.75rem;display:inline-flex;align-items:center;justify-content:center;margin-right:10px;color:#b91c1c}.container[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .infos[_ngcontent-%COMP%]{margin-bottom:16px}.container[_ngcontent-%COMP%] .information-message[_ngcontent-%COMP%]{margin-top:10px}@media(min-width:1280px){.container[_ngcontent-%COMP%] .information-message[_ngcontent-%COMP%]{margin-top:0}}"],changeDetection:0});let e=i;return e})();var Ye=class extends K{};var zt=class extends Ye{constructor(){super(...arguments),this.context=h.AGENT}};var Qt=class extends Ye{constructor(){super(),this.context=h.PROMO}};var jt=class extends Ye{constructor(){super(...arguments),this.context=h.STANDARD}};var yt=(()=>{let i=class i{constructor(){this._controlContainer=m(B),this._activatedRoute=m(q),this._environmentInjector=m(H),this.$passengers=x.required({alias:"passengers"}),this.$type=x.required({alias:"type"}
1),this.$bicycleCount=$(()=>{let t=this.$passengers();return ee.countPassenger(t)>0?Math.min(ee.countPassenger(t)-t.infantsPassengers,4):4}),Ki(()=>{this.count&&(this.count.setValue(this.$bicycleCount()),this.count.updateValueAndValidity())})}ngOnInit(){this.funnelVehicle=z(this._environmentInjector,()=>this.createFunnelVehicle()),this.form=this._controlContainer.control,this.form.addValidators([se.minDynamic(()=>this.$bicycleCount()),se.maxDynamic(()=>this.$bicycleCount())]),this.setupFormValidation(this.$type())}static createForm(){return new M({count:new w(null)})}setupFormValidation(t){t===y.BICYCLE?this.form.enable({emitEvent:!0}):this.form.disable({emitEvent:!0}),this.form.updateValueAndValidity()}get count(){return this.form.controls.count}createFunnelVehicle(){let t=J([{constructableSelector:h.STANDARD,constructableType:jt},{constructableSelector:h.AGENT,constructableType:zt},{constructableSelector:h.PROMO,constructableType:Qt}],this._activatedRoute.snapshot.parent?.parent?.data.funnelType);if(!t)throw new Error("No factory found for the given funnel type");return t}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle-bicycle"]],hostAttrs:[1,"albatros","ignore-bf-common-ui"],inputs:{$passengers:[1,"passengers","$passengers"],$type:[1,"type","$type"]},decls:11,vars:10,consts:[[1,"form",3,"formGroup"],[1,"label"],[1,"title"],[3,"formControl","min","max"],[1,"info"],[3,"innerHTML"]],template:function(o,a){if(o&1&&(c(0,"div",0)(1,"span",1)(2,"span",2),u(3),s(4,"transloco"),l()(),_(5,"bf-number-selector",3),l(),c(6,"div",4)(7,"mat-icon"),u(8,"info"),l(),_(9,"span",5),s(10,"transloco"),l()),o&2){p("formGroup",a.form),r(3),T(d(4,6,"booking.trip.vehicle.howMany"));let f=a.$bicycleCount();r(2),p("formControl",a.count)("min",f)("max",f),r(4),p("innerHTML",d(10,8,"booking.trip.vehicle.bicycleInfo"),ut)}},dependencies:[D,F,E,Re,V,Ct,X,R],styles:[".form[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;max-width:600px;margin-bottom:20px}.form[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.form[_ngcontent-%COMP%] .label[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{line-height:24px;font-size:.875rem}.info[_ngcontent-%COMP%]{display:flex;font-size:.75rem}.info[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:16px;min-width:16px;height:16px;line-height:16px;font-size:16px;display:inline-flex;align-items:center;justify-content:center;margin-right:10px}.info[_ngcontent-%COMP%] a{color:#23308e;text-decoration:underline}"],changeDetection:0});let e=i;return e})();var Ke=class extends K{get isInboundVehicleChangeAllowed(){return!0}get getMaxVehicleHeight(){return 4}get getMaxVehicleLength(){return 30}get getProhibitedVehicles(){return[]}get isBookingPromotion(){return!1}};var qt=class extends Ke{constructor(){super(...arguments),this.context=h.AGENT}};var Xt=class extends Ke{constructor(){super(),this.context=h.PROMO,this._funnelRulesStateService=m(me),this._funnelRules=this._funnelRulesStateService.funnelRules()}get isBookingPromotion(){return this._funnelRules?.rulesType===_t.PROMO}get isInboundVehicleChangeAllowed(){return!this._funnelRules?.selectTrip?.transport?.isSameTransportOnBothWayForced}get getMaxVehicleHeight(){return this._funnelRules?.selectTrip?.transport?.maxDimensions?.maxHeight??super.getMaxVehicleHeight}get getMaxVehicleLength(){return this._funnelRules?.selectTrip?.transport?.maxDimensions?.maxLength??super.getMaxVehicleLength}get getProhibitedVehicles(){let i=[];if(this._funnelRules?.selectTrip?.transport?.isOnFootAllowed||i.push(y.FOOT),this._funnelRules?.selectTrip?.transport?.isBicycleAllowed||i.push(y.BICYCLE),this._funnelRules?.selectTrip?.transport?.allowedMotorizedVehicles)for(let n in y)n===y.FOOT||n===y.BICYCLE||this._funnelRules?.selectTrip?.transport?.allowedMotorizedVehicles.includes(n)||i.push(n);return i}};var Yt=class extends Ke{constructor(){super(...arguments),this.context=h.STANDARD}};var ce=(function(e){return e[e.CAR=1.83]="CAR",e[e.FOUR_FOUR=2.6]="FOUR_FOUR",e[e.MINIBUS=2.6]="MINIBUS",e[e.MOTORHOME_SM=3]="MOTORHOME_SM",e[e.MOTORHOME_MD=3]="MOTORHOME_MD",e[e.MOTORHOME_LG=3]="MOTORHOME_LG",e[e.MOTORHOME_XLG=4]="MOTORHOME_XLG",e[e.SMALL_VAN=2.6]="SMALL_VAN",e[e.MEDIUM_VA
1N=2.6]="MEDIUM_VAN",e[e.LARGE_VAN=3]="LARGE_VAN",e[e.EXTRA_LARGE_VAN=3]="EXTRA_LARGE_VAN",e[e.XX_LARGE_VAN=4]="XX_LARGE_VAN",e})(ce||{}),de=(function(e){return e[e.CAR=5]="CAR",e[e.FOUR_FOUR=6]="FOUR_FOUR",e[e.MINIBUS=6]="MINIBUS",e[e.MOTORHOME_SM=6]="MOTORHOME_SM",e[e.MOTORHOME_MD=7]="MOTORHOME_MD",e[e.MOTORHOME_LG=8]="MOTORHOME_LG",e[e.MOTORHOME_XLG=9]="MOTORHOME_XLG",e[e.SMALL_VAN=5]="SMALL_VAN",e[e.MEDIUM_VAN=6]="MEDIUM_VAN",e[e.LARGE_VAN=7]="LARGE_VAN",e[e.EXTRA_LARGE_VAN=8]="EXTRA_LARGE_VAN",e[e.XX_LARGE_VAN=9]="XX_LARGE_VAN",e})(de||{}),U=class{constructor(i={}){Object.assign(this,i)}static findIdByDimensionsAndType(i,n,t){if(!i||n===null||t===null||!Kt[i])return null;let o=Kt[i].filter(f=>f.height===n&&f.length===t)[0];if(o)return o;let a=Kt[i].length-1;do{let f=Kt[i][a];f.height>=n&&f.length>=t?(o=f,a--):a=-1}while(a>=0);return o}},Jt="dimension-motorhome",Yn=new U({id:"CAR_DIMENSIONS",type:y.CAR,height:ce.CAR,length:de.CAR,icon:"dimension-car"}),Kn=new U({id:"LONG_CAR_DIMENSIONS",type:y.CAR,height:ce.CAR,length:de.FOUR_FOUR,icon:"dimension-car"}),Jn=new U({id:"SHORT_FOUR_FOUR_DIMENSIONS",type:y.CAR,height:ce.FOUR_FOUR,length:de.CAR,icon:"dimension-four-four"}),Zn=new U({id:"FOUR_FOUR_DIMENSIONS",type:y.CAR,height:ce.FOUR_FOUR,length:de.FOUR_FOUR,icon:"dimension-four-four"}),eo=new U({id:"MINIBUS_DIMENSIONS",type:y.MINIBUS,height:ce.MINIBUS,length:de.MINIBUS,icon:"dimension-minibus"}),to=new U({id:"MOTORHOME_SM_DIMENSIONS",type:y.MINIBUS,height:ce.MOTORHOME_SM,length:de.MOTORHOME_SM,icon:Jt}),io=new U({id:"MOTORHOME_MD_DIMENSIONS",type:y.MINIBUS,height:ce.MOTORHOME_MD,length:de.MOTORHOME_MD,icon:Jt}),no=new U({id:"MOTORHOME_LG_DIMENSIONS",type:y.MINIBUS,height:ce.MOTORHOME_LG,length:de.MOTORHOME_LG,icon:Jt}),oo=new U({id:"MOTORHOME_XLG_DIMENSIONS",type:y.MINIBUS,height:ce.MOTORHOME_XLG,length:de.MOTORHOME_XLG,icon:Jt}),ro=new U({id:"SMALL_VAN_DIMENSIONS",type:y.VAN,height:ce.SMALL_VAN,length:de.SMALL_VAN,icon:"dimension-van-small"}),ao=new U({id:"MEDIUM_VAN_DIMENSIONS",type:y.VAN,height:ce.MEDIUM_VAN,length:de.MEDIUM_VAN,icon:"dimension-van-medium"}
1),so=new U({id:"LARGE_VAN_DIMENSIONS",type:y.VAN,height:ce.LARGE_VAN,length:de.LARGE_VAN,icon:"dimension-van-large"}),lo=new U({id:"EXTRA_LARGE_VAN_DIMENSIONS",type:y.VAN,height:ce.EXTRA_LARGE_VAN,length:de.EXTRA_LARGE_VAN,icon:"dimension-van-large"}),co=new U({id:"XX_LARGE_VAN_DIMENSIONS",type:y.VAN,height:ce.XX_LARGE_VAN,length:de.XX_LARGE_VAN,icon:"dimension-van-large"}),lt=new U({id:"OTHER_DIMENSIONS",type:null,height:null,length:null,icon:"more"}),po=[Yn,Kn,Jn,Zn,eo,to,io,no,oo,ro,ao,so,lo,co],uo=e=>ft.includes(e),Kt={CAR:[Yn,Kn,Jn,Zn],MINIBUS:[eo,to,io,no,oo],VAN:[ro,ao,so,lo,co]};var Fe=(function(e){return e.UP_TO_183="UP_TO_1_83_M",e.UP_TO_260="UP_TO_2_60_M",e.UP_TO_300="UP_TO_3_M",e.UP_TO_400="UP_TO_4_M",e})(Fe||{});var Ae=(function(e){return e.UP_TO_300="UP_TO_3_M",e.UP_TO_400="UP_TO_4_M",e.UP_TO_500="UP_TO_5_M",e.UP_TO_600="UP_TO_6_M",e.UP_TO_700="UP_TO_7_M",e.UP_TO_800="UP_TO_8_M",e.UP_TO_900="UP_TO_9_M",e})(Ae||{});var Je=class extends K{getRoofItemSizes(){return Object.values(je)}isAllowedFourWheelsVehicleExtra(i){return!0}caravanHeights(){return Object.values(Fe)}caravanLengths(){return Object.values(Ae)}};var Zt=class extends Je{constructor(){super(...arguments),this.context=h.AGENT}};var wt=class{constructor(i={}){Object.assign(this,i)}get height(){let i=Object.keys(Fe).find(n=>n===this.id);return Fe[i]}},Ko=new wt({id:"UP_TO_183",heightInMeters:1.83}),Jo=new wt({id:"UP_TO_260",heightInMeters:2.6}),Zo=new wt({id:"UP_TO_300",heightInMeters:3}),er=new wt({id:"UP_TO_400",heightInMeters:4}),mo=[Ko,Jo,Zo,er];var Ne=class{constructor(i={}){Object.assign(this,i)}get length(){let i=Object.keys(Ae).find(n=>n===this.id);return Ae[i]}},tr=new Ne({id:"UP_TO_300",lengthInMeters:3}),ir=new Ne({id:"UP_TO_400",lengthInMeters:4}),nr=new Ne({id:"UP_TO_500",lengthInMeters:5}),or=new Ne({id:"UP_TO_600",lengthInMeters:6}),rr=new Ne({id:"UP_TO_700",lengthInMeters:7}),ar=new Ne({id:"UP_TO_800",lengthInMeters:8}),sr=new Ne({id:"UP_TO_900",lengthInMeters:9}),ho=[tr,ir,nr,or,rr,ar,sr];var xt=class{constructor(i={}){Object.assign(this,i)}get size(){let i=Object.keys(je).find(n=>n===this.id);return je[i]}},lr=new xt({id:"UP_TO_183",sizeInMeters:1.83}),cr=new xt({id:"UP_TO_260",sizeInMeters:2.6}),dr=new xt({id:"UP_TO_300",sizeInMeters:3}),pr=new xt({id:"UP_TO_400",sizeInMeters:4}),fo=[lr,cr,dr,pr];var ei=class extends Je{constructor(){super(),this.context=h.PROMO,this._funnelRulesStateService=m(me),this._funnelRules=this._funnelRulesStateService.funnelRules()}isAllowedFourWheelsVehicleExtra(i){return this._funnelRules?.selectTrip?.transport?.allowedFourWheelsVehicleExtra?this._funnelRules.isAllowedFourWheelsVehicleExtra(i):super.isAllowedFourWheelsVehicleExtra(i)}getRoofItemSizes(){let i=this._funnelRules?.selectTrip?.transport?.maxDimensions?.maxHeight;return i?fo.filter(n=>n.sizeInMeters<=i).map(n=>n.size):super.getRoofItemSizes()}caravanHeights(){let i=this._funnelRules?.selectTrip?.transport?.maxDimensions?.maxHeight;return i?mo.filter(n=>n.heightInMeters<=i).map(n=>n.height):super.caravanHeights()}caravanLengths(){let i=this._funnelRules?.selectTrip?.transport?.maxDimensions?.maxLength;return i?ho.filter(n=>n.lengthInMeters<=i).map(n=>n.length):super.caravanLengths()}};var ti=class extends Je{constructor(){super(...arguments),this.context=h.STANDARD}};function ur(e,i){if(e&1&&(c(0,"mat-option",11),u(1),s(2,"transloco"),l()),e&2){let n=i.$implicit;p("value",n),r(),C(" ",d(2,2,`booking.trip.vehicle.caravanHeight.${n}`)," ")}}function mr(e,i){if(e&1&&(c(0,"mat-option",11),u(1),s(2,"transloco"),l()),e&2){let n=i.$implicit;p("value",n),r(),C(" ",d(2,2,`booking.trip.vehicle.caravanLength.${n}`)," ")}}function hr(e,i){if(e&1&&(c(0,"section",7)(1,"section",8)(2,"bf-label",9),u(3),s(4,"transloco"),l(),c(5,"mat-form-field",null,0)(7,"mat-select",10),_e(8,ur,3,4,"mat-option",11,Ce),l()()(),c(10,"section",12)(11,"bf-label",9),u(12),s(13,"transloco"),l(),c(14,"mat-form-field",null,1)(16,"mat-select",10),_e(17,mr,3,4,"mat-option",11,Ce),l()()()()),e&2){let n=W(6),t=W(15),o=v(2);r(2),p("for",n),r(),C("",d(4,8,"booking.trip.vehicle.height"),"*"),r(4),p("formControl",o.form.controls.caravan.controls.height)("hideSingleSelectionIndicator",!0),r(),ve(o.caravanHeights),r(3),p("for",t),r(),C("",d(13,10,"booking.trip.vehicle.length"),"*"),r(4),p("formControl",o.form.controls.caravan.controls.length)("hideSingleSelectionIndicator",!0),r(),ve(o.caravanLengths)}}function fr(e,i){if(e&1&&(c(0,"div",5)(1,"mat-checkbox",6),u(2),s(3,"transloco"),l(),g(4,hr,19,12,"section",7),l()),e&2){let n=v();p("formGroup",n.form.controls.caravan),r(),p("formControl",n.form.controls.caravan.controls.active),r(),C(" ",d(3,4,"booking.trip.vehicle.extraCaravan")," "),r(2),b(n.form.controls.caravan.controls.active.value?4:-1)}}function gr(e,i){if(e&1&&(c(0,"mat-option",11),u(1),s(2,"transloco"),l()),e&2){let n=i.$implicit;p("value",n),r(),C(" ",d(2,2,`booking.trip.vehicle.roofHeight.${n}`)," ")}}function br(e,i){if(e&1&&(c(0,"section",14)(1,"section",8)(2,"bf-label",9),u(3),s(4,"transloco"),l(),c(5,"mat-form-field",null,2)(7,"mat-select",10),_e(8,gr,3,4,"mat-option",11,Ce),l()()()()),e&2){let n=W(6),t=v(2);r(2),p("for",n),r(),C("",d(4,4,"booking.trip.vehicle.height"),"*"),r(4),p("formControl",t.form.controls.roofItems.controls.height)("hideSingleSelectionIndicator",!0),r(),ve(t.roofItemSizes)}}function Cr(e,i){if(e&1&&(c(0,"div",5)(1,"mat-checkbox",13),u(2),s(3,"transloco"),l(),g(4,br,10,6,"section",14),l()),e&2){let n=v();p("formGroup",n.form.controls.roofItems),r(),p("formControl",n.form.controls.roofItems.controls.active),r(),C(" ",d(3,4,"booking.trip.vehicle.extraRoof")," "),r(2),b(n.form.controls.roofItems.controls.active.value?4:-1)}}function _r(e,i){if(e&1&&(c(0,"div",5)(1,"mat-checkbox",15),u(2),s(3,"transloco"),l()()),e&2){let n=v();p("formGroup",n.form.controls.bikes),r(),p("formControl",n.form.controls.bikes.controls.active),r(),C(" ",d(3,3,"booking.trip.vehicle.extraRearBiked")," ")}}var ii=(()=>{let i=class i{constructor(){this._destroyRef=m(Q),this._environmentInjector=m(H),this._activatedRoute=m(q),this._controlContainer=m(B),this.$isRoofItemForbiddenForVehicle=x(!1,{alias:"isRoofItemForbiddenForVehicle"}),this.roofItemSizes=[],this.caravanHeights=[],this.caravanLengths=[],this.funnelRulesSelectTripTransportFourWheelsVehicleExtraType=vt}ngOnInit(){this.funnelVehicle4WheelsExtra=z(this._environmentInjector,()=>this.createFunnelVehicle4WheelsExtra()),this.roofItemSizes=this.funnelVehicle4WheelsExtra.getRoofItemSizes(),this.caravanHeights=this.funnelVehicle4WheelsExtra.caravanHeights(),this.caravanLengths=this.funnelVehicle4WheelsExtra.caravanLengths(),this.form=this._controlContainer.control,this.listenCaravanAndBikes(),this.listenRoofItem(),setTimeout(()=>this.form.patchValue(this.form.getRawValue()),50)}static createForm(){let t=se.requiredIf(o=>!!o?.value.active);return new M({caravan:new M({active:new w(!1,{nonNullable:!0,validators:[se.canBeTrueIf(o=>{let a=o.parent?.controls??{};return"bikes"in a&&!a.bikes?.value.active})]}),height:new w(null,[t]),length:new w(null,[t])},{}),roofItems:new M({active:new w(!1,{nonNullable:!0}),height:new w(null,[t])}),bikes:new M({active:new w(!1,{nonNullable:!0,validators:[se.canBeTrueIf(o=>{let a=o.parent?.controls??{};return"caravan"in a&&!a.caravan?.value.active})]})})})}get isAllowedCaravanOrTrailer(){return this.funnelVehicle4WheelsExtra.isAllowedFourWheelsVehicleExtra(this.funnelRulesSelectTripTransportFourWheelsVehicleExtraType.CARAVAN_OR_TRAILOR)}get isAllowedRearMountedBikeCarrier(){return this.funnelVehicle4WheelsExtra.isAllowedFourWheelsVehicleExtra(this.funnelRulesSelectTripTransportFourWheelsVehicleExtraType.REAR_MOUNTED_BIKE_CARRIER)}get isAllowedRoofItem(){return this.funnelVehicle4WheelsExtra.isAllowedFourWheelsVehicleExtra(this.funnelRulesSelectTripTransportFourWheelsVehicleExtraType.ROOF_ITEM)}listenRoofItem(){this.form.controls.roofItems.controls.active.valueChanges.pipe(S(this._destroyRef)).subscribe(t=>{t||this.form.controls.roofItems.controls.height.reset(),this.form.controls.roofItems.controls.height.updateValueAndValidity()})}listenCaravanAndBikes(){ie(this.form.controls.caravan.controls.active.valueChanges,this.form.controls.bikes.controls.active.valueChanges).pipe(Ee(()=>({caravan:this.form.controls.caravan.controls.active.value,bikes:this.form.controls.bikes.controls.active.value})),S(this._destroyRef)).subscribe(({bikes:t,caravan:o})=>{this.form.controls.bikes.enable({emitEvent:!1}),this.form.controls.caravan.enable({emitEvent:!1}),o||this.form.controls.caravan.reset({},{emitEvent:!1}),this.form.controls.caravan.controls.height.updateValueAndValidity(),this.form.controls.caravan.controls.length.updateV
1alueAndValidity(),t?this.form.controls.caravan.disable({emitEvent:!1}):o&&this.form.controls.bikes.disable({emitEvent:!1})})}createFunnelVehicle4WheelsExtra(){let t=J([{constructableSelector:h.STANDARD,constructableType:ti},{constructableSelector:h.AGENT,constructableType:Zt},{constructableSelector:h.PROMO,constructableType:ei}],this._activatedRoute.snapshot.parent?.parent?.data.funnelType);if(!t)throw new Error("No funnel vehicle type select found for the current funnel");return t}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle-4wheels-extra"]],inputs:{$isRoofItemForbiddenForVehicle:[1,"isRoofItemForbiddenForVehicle","$isRoofItemForbiddenForVehicle"]},decls:9,vars:7,consts:[["caravanHeight",""],["caravanLength",""],["roofHeight",""],[1,"panel-title","bf-body-2-semi-bold"],[1,"vehicle-details",3,"formGroup"],[1,"vehicle-details-option",3,"formGroup"],["data-testid","vehicleCaravanCheckbox","color","primary",3,"formControl"],["data-testid","vehicleCaravanHeight",1,"vehicle-details-option-selections"],[1,"vehicle-details-option-selection"],[3,"for"],[3,"formControl","hideSingleSelectionIndicator"],[3,"value"],["data-testid","vehicleCaravanLength",1,"vehicle-details-option-selection"],["data-testid","vehicleRoofItemsCheckbox","color","primary",3,"formControl"],["data-testid","vehicleRoofHeight",1,"vehicle-details-option-selections"],["data-testid","extraRearBikedCheckbox","color","primary",3,"formControl"]],template:function(o,a){o&1&&(c(0,"p",3)(1,"mat-icon"),u(2,"add_circle"),l(),u(3),s(4,"transloco"),l(),c(5,"form",4),g(6,fr,5,6,"div",5),g(7,Cr,5,6,"div",5),g(8,_r,4,5,"div",5),l()),o&2&&(r(3),T(d(4,5,"booking.trip.vehicle.carExtrasTitle")),r(2),p("formGroup",a.form),r(),b(a.isAllowedCaravanOrTrailer?6:-1),r(),b(!a.$isRoofItemForbiddenForVehicle()&&a.isAllowedRoofItem?7:-1),r(),b(a.isAllowedRearMountedBikeCarrier?8:-1))},dependencies:[D,Pe,F,E,Re,V,le,Y,$t,Vt,Qe,X,R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;background-color:#f1f5f9;padding:16px;border-radius:12px;gap:24px}@media(min-width:600px){[_nghost-%COMP%]{max-width:600px}}[_nghost-%COMP%] .panel-title[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:12px;color:#23308e;margin:0}[_nghost-%COMP%] .vehicle-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}[_nghost-%COMP%] .vehicle-details[_ngcontent-%COMP%] .vehicle-details-option[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding-left:2px}[_nghost-%COMP%] .vehicle-details[_ngcontent-%COMP%] .vehicle-details-option[_ngcontent-%COMP%] .vehicle-details-option-selections[_ngcontent-%COMP%]{display:flex;column-gap:16px;margin-top:12px;flex-wrap:wrap}[_nghost-%COMP%] .vehicle-details[_ngcontent-%COMP%] .vehicle-details-option[_ngcontent-%COMP%] .vehicle-details-option-selections[_ngcontent-%COMP%] .vehicle-details-option-selection[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;flex:1}"],changeDetection:0});let e=i;return e})();function vr(e,i){if(e&1&&(c(0,"mat-option",9)(1,"div",13),_(2,"mat-icon",14),u(3),s(4,"transloco"),l()()),e&2){let n=i.$implicit;p("value",n.id),r(2),p("svgIcon",n.icon),r(),C(" ",d(4,3,`booking.trip.vehicle.dimensions.ID_${n.id}`)," ")}}function yr(e,i){e&1&&(_(0,"bf-alert",10),s(1,"transloco"),s(2,"transloco")),e&2&&p("label",d(1,2,"booking.trip.vehicle.dimensions.warningOnOther.text"))("title",d(2,4,"booking.trip.vehicle.dimensions.warningOnOther.title"))}var Vi=(()=>{let i=class i{constructor(){this._controlContainer=m(B),this._destroyRef=m(Q),this.$type=x.required({alias:"type"}),this.$dimensions=x.required({alias:"dimensions"}),this.$isRegistrationNumberValid=x.required({alias:"isRegistrationNumberValid"}),this.formSubmit=Me()}ngOnInit(){this.form=this._controlContainer.control,this.form.controls.make.setValidators([L.required]),this.form.controls.model.setValidators([L.required]),this.setMatchingDimension(this.form.getRawValue()),ie(this.form.controls.length.valueChanges,this.form.controls.height.valueChanges).pipe(S(this._destroyRef)).subscribe(()=>{this.setMatchingDimension(this.form.value)})}selectDimension(t){let o=this.$dimensions().find(a=>a.id===t);o&&t!==lt.id&&this.form.patchValue({height:o.height,length:o.length},{emitEvent:!1})}onSubmit(){this.form.markAllAsTouched(),this.isSubmitButtonDisabled||this.formSubmit.emit(this.form.getRawValue())}get isAnotherDimensions(){return this.form.controls.dimensionControlId?.value===lt.id}get isSubmitButtonDisabled(){return this.isAnotherDimensions||this.form.controls.make.invalid||this.form.controls.model.invali
1d||this.form.controls.height.invalid||this.form.controls.length.invalid||!this.$isRegistrationNumberValid()}static createForm(){let t=se.requiredIf(o=>o instanceof M?o.controls.height.value===null&&o.controls.length.value===null:!1);return new M({make:new w(null),model:new w(null),height:new w(null,L.required),length:new w(null,L.required),dimensionControlId:new w(null,t)})}setMatchingDimension(t){let o=this.findMatchingDimension(t.height,t.length);o?this.form.controls.dimensionControlId.setValue(o.id,{emitEvent:!1}):this.form.controls.dimensionControlId.setValue(null,{emitEvent:!1})}findMatchingDimension(t,o){return U.findIdByDimensionsAndType(this.$type(),t,o)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle-4wheels-manual-form"]],hostAttrs:[1,"albatros","ignore-bf-common-ui"],inputs:{$type:[1,"type","$type"],$dimensions:[1,"dimensions","$dimensions"],$isRegistrationNumberValid:[1,"isRegistrationNumberValid","$isRegistrationNumberValid"]},outputs:{formSubmit:"formSubmit"},decls:27,vars:19,consts:[["makeField",""],["modelField",""],["dimensionsField",""],[1,"manual-form-container",3,"formGroup"],["data-testid","vehicleManualInputForm",1,"manual-inputs"],[3,"for"],["matInput","","formControlName","make"],["matInput","","formControlName","model"],["formControlName","dimensionControlId",3,"selectionChange","hideSingleSelectionIndicator"],["data-testid","dimensionDropdownItem",3,"value"],["data-testid","isAnotherDimensionsDisplay","type","warning",3,"label","title"],[1,"actions-container"],["mat-flat-button","","data-testid","vehicleDetailsSubmit","size","large","type","button",3,"click","disabled"],[1,"dimension"],[3,"svgIcon"]],template:function(o,a){if(o&1&&(c(0,"form",3)(1,"div",4)(2,"bf-label",5),u(3),s(4,"transloco"),l(),c(5,"mat-form-field",null,0),_(7,"input",6),l(),c(8,"bf-label",5),u(9),s(10,"transloco"),l(),c(11,"mat-form-field",null,1),_(13,"input",7),l(),c(14,"bf-label",5),u(15),s(16,"transloco"),l(),c(17,"mat-form-field",null,2)(19,"mat-select",8),O("selectionChange",function(P){return a.selectDimension(P.value)}),_e(20,vr,5,5,"mat-option",9,Ce),l()(),g(22,yr,3,6,"bf-alert",10),l(),c(23,"div",11)(24,"button",12),O("click",function(){return a.onSubmit()}),u(25),s(26,"transloco"),l()()()),o&2){let f=W(6),P=W(12),k=W(18);p("formGroup",a.form),r(2),p("for",f),r(),C(" ",d(4,11,"booking.trip.vehicle.manualMake")," "),r(5),p("for",P),r(),C(" ",d(10,13,"booking.trip.vehicle.manualModel")," "),r(5),p("for",k),r(),C(" ",d(16,15,"booking.trip.vehicle.dimensions.title"),"* "),r(4),p("hideSingleSelectionIndicator",!0),r(),ve(a.$dimensions()),r(2),b(a.isAnotherDimensions?22:-1),r(2),p("disabled",a.isSubmitButtonDisabled),r(),C(" ",d(26,17,"booking.trip.vehicle.save")," ")}},dependencies:[D,Pe,We,F,E,V,ae,X,re,Y,Qe,ze,$t,Vt,ue,xe,R],styles:["[_nghost-%COMP%] .manual-form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}[_nghost-%COMP%] .manual-form-container[_ngcontent-%COMP%] .manual-inputs[_ngcontent-%COMP%]{margin-top:16px;display:flex;flex-direction:column;background-color:#fff;padding:16px;border-radius:12px}[_nghost-%COMP%] .manual-form-container[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:16px;margin-top:24px}[_nghost-%COMP%] .manual-form-container[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}@media(min-width:600px){[_nghost-%COMP%] .manual-form-container[_ngcontent-%COMP%] .actions-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:auto}}.dimension[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:12px}"],changeDetection:0});let e=i;return e})();var wr=["registrationInput"];function xr(e,i){e&1&&(c(0,"mat-error",8),u(1),s(2,"transloco"),l()),e&2&&(r(),C(" ",d(2,1,"booking.trip.vehicle.error.registrationFormat")," "))}function Pr(e,i){e&1&&(_(0,"bf-alert",10),s(1,"transloco")),e&2&&p("label",d(1,1,"booking.trip.vehicle.notFoundDetails"))}function Sr(e,i){if(e&1&&(g(0,Pr,2,3,"bf-alert",10),c(1,"button",11)(2,"mat-icon"),u(3,"search"),l(),u(4),s(5,"transloco"),l()),e&2){let n=v();b(n.$isVehicleFound()?-1:0),r(),p("isLoading",n.$loadingRegistrationNumber())("disabled",n.form.controls.registrationNumber.invalid||n.$isManualInputEnabled()),r(3),C(" ",d(5,4,"booking.trip.vehicle.searchVehicle")," ")}}function Or(e,i){e&1&&(_(0,"bf-alert",9),s(1,"transloco")),e&2&&p("label",d(1,1,"booking.trip.vehicle.noSearchAvailableForCountry"))}var Fi=(()=>{let i=class i{constructor(){this._controlContainer=m(B),this._destroyRef=m(Q),this._vehicleService=m(Un),this.registrationInput=at("registrationInput"),this.$defaultCountryCode=x.required({alias:"defaultCountryCode"}),this.$initialData=x(null,{alias:"initialData"}),this.$isManualInputEnabled=x(!1,{alias:"isManualInputEnabled"}),this.vehicleFound=Me(),this.$loadingRegistrationNumber=Ve(!1),this.$hasRegistrationPatternError=Ve(!1),this.$isVehicleFound=Ve(!0),this.isUnknownVehicle=!1,this.carBonusCountryList=Ii.allC
1ountries.filter(t=>Ii.EUCountriesISO.includes(t.iso)).map(t=>t.iso),this.preferredCountries=[ge.UnitedKingdom,ge.Ireland,ge.France,ge.Spain],this._carWebCountries=[ge.UnitedKingdom,ge.France],this.watchManualInputChanges()}ngOnInit(){this.form=this._controlContainer.control,this.form.controls.registrationCountry.value||this.form.controls.registrationCountry.setValue(this.$defaultCountryCode()),this.setupFormListeners()}get canCallCarWeb(){return this.form.controls.registrationCountry.valid&&this._carWebCountries.includes(this.form.controls.registrationCountry.value)}findRegistrationNumber(){if(this.normalizeRegistrationNumber(),!!this.form.controls.registrationNumber.valid){if(!this.canCallCarWeb){this.handleNoCarWebSupport();return}this.searchVehicle()}}getFormValue(){return{registrationNumber:this.form.controls.registrationNumber.value,registrationCountry:this.form.controls.registrationCountry.value}}watchManualInputChanges(){pt(()=>{this.$isManualInputEnabled()?(this.form.controls.registrationNumber.disable(),this.form.controls.registrationCountry.disable()):(this.form.controls.registrationNumber.enable(),this.form.controls.registrationCountry.enable())})}static createForm(){return new M({registrationCountry:new w(null),registrationNumber:new w(null,[L.required,L.pattern(Se.VEHICLE_REGISTRATION_PATTERN)])})}setupFormListeners(){this.form.controls.registrationNumber.statusChanges.pipe(S(this._destroyRef)).subscribe(()=>{this.$hasRegistrationPatternError.set(this.form.controls.registrationNumber.hasError("pattern"))})}normalizeRegistrationNumber(){let t=this.form.controls.registrationNumber.value?.toUpperCase().replaceAll(/[ -]/g,"");this.form.controls.registrationNumber.patchValue(t,{emitEvent:!1})}handleNoCarWebSupport(){this.$isVehicleFound.set(!1),this.vehicleFound.emit(null)}searchVehicle(){this.$loadingRegistrationNumber.set(!0),this._vehicleService.getVehicleFromRegistrationInformations(this.form.controls.registrationNumber.value,this.form.controls.registrationCountry.value).subscribe(t=>{this.$isVehicleFound.set(!!t),this.vehicleFound.emit(t),this.$loadingRegistrationNumber.set(!1)})}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle-registration-search"]],viewQuery:function(o,a){o&1&&mt(a.registrationInput,wr,5),o&2&&ht()},hostAttrs:[1,"albatros","ignore-bf-common-ui"],inputs:{$defaultCountryCode:[1,"defaultCountryCode","$defaultCountryCode"],$initialData:[1,"initialData","$initialData"],$isManualInputEnabled:[1,"isManualInputEnabled","$isManualInputEnabled"]},outputs:{vehicleFound:"vehicleFound"},decls:14,vars:13,consts:[["countrySelector",""],["registrationField",""],["registrationInput",""],[1,"registration-search-container",3,"submit"],[3,"label","formControl","countryList","preferredCountriesISO"],[3,"for"],["subscriptSizing","dynamic",1,"registration-number"],["matInput","","data-testid","registrationInput","maxLength","12","autocomplete","off","placeholder","AB123CD",1,"registration-number-input",3,"formControl"],["data-testid","vehicleRNFormat"],["type","warning",3,"label"],["icon","info","type","error",3,"label"],["mat-stroked-button","","data-testid","registrationButton","size","large","bfButtonLoading","","type","submit",1,"registration-search-button",3,"isLoading","disabled"]],template:function(o,a){if(o&1&&(c(0,"form",3),O("submit",function(){return a.findRegistrationNumber()}),_(1,"bf-country-selector",4,0),s(3,"transloco"),c(4,"bf-label",5),u(5),s(6,"transloco"),l(),c(7,"mat-form-field",6,1),_(9,"input",7,2),g(11,xr,3,3,"mat-error",8),l(),g(12,Sr,6,6)(13,Or,2,3,"bf-alert",9),l()),o&2){let f=W(8);r(),p("label",d(3,9,"booking.trip.vehicle.vehicleRegistrationCountry"))("formControl",a.form.controls.registrationCountry)("countryList",a.carBonusCountryList)("preferredCountriesISO",a.preferredCountries),r(3),p("for",f),r(),C(" ",d(6,11,"booking.trip.vehicle.registrationPlaceholder")," "),r(4),p("formControl",a.form.controls.registrationNumber),r(2),b(a.$hasRegistrationPatternError()?11:-1),r(),b(a.canCallCarWeb||a.$isManualInputEnabled()?12:13)}},dependencies:[D,Pe,We,F,E,Re,re,X,Y,He,Gn,Qe,ze,ue,ln,xe,R],styles:["[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .registration-search-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}[_nghost-%COMP%] .registration-number-input[_ngcontent-%COMP%]{text-transform:uppercase}[_nghost-%COMP%] .registration-search-button[_ngcontent-%COMP%]{align-self:flex-end;width:100%}@media(min-width:600px){[_nghost-%COMP%] .registration-search-button[_ngcontent-%COMP%]{width:fit-content}}[_nghost-%COMP%] .registration-search-button[disabled][_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:unset}"],changeDetection:0});let e=i;return e})();var Ze=class extends K{isOtherDimensionsAllowed(){return!0}maxHeight(){return 4}maxLength(){return 30}};var ni=class extends Ze{constructor(){super(...arguments),this.context=h.AGENT}};var oi=class extends Ze{constructor(){super(),this.context=h.PROMO,this._funnelRulesStateService=m(me),this._funnelRules=this._funnelRulesStateService.funnelRules()}isOtherDimensionsAllowed(){return this._funnelRules?.rulesType!==_t.PROMO}maxHeight(){return this._funnelRules?.selectTrip?.transport?.maxDimensions?.maxHeight??super.maxHeight()}maxLength(){return this._funnelRules?.selectTrip?.transport?.maxDimensions?.maxLength??super.maxLength()}};var ri=class extends Ze{constructor(){super(...arguments),this.context=h.STANDARD}};var Mr=["registrationSearchComponent"],Tr="TBC",Ir="TBC",Rr="TBC",Mt=(()=>{let i=class i{constructor(){this._cdr=m(ne),this._activatedRoute=m(q),this._environmentInjector=m(H),this._translocoService=m(Ft),this._appSiteCountry=m(It),this.registrationSearchComponent=at("registrationSearchComponent"),this.$type=x.required({alias:"type"}),this.$vehicle4WheelsFormDto=x(null,{alias:"vehicle4WheelsFormDto"}),this.newVehicle=Me(),this.$isManualInputEnabled=Ve(!1),this.preferredCountries=[ge.UnitedKingdom,ge.Ireland,ge.France,ge.Spain],this.defaultCountryCode=this.preferredCountries.includes(this._appSiteCountry.toLowerCase())?this._appSiteCountry.toLowerCase():ge.UnitedKingdom,this.$dimensions=$(()=>{let t=po.filter(o=>o.type===this.$type());return this.funnelVehicle4WheelsForm?.maxHeight()&&(t=t.filter(o=>o.height<=this.funnelVehicle4WheelsForm.maxHeight())),this.funnelVehicle4WheelsForm?.maxLength()&&(t=t.filter(o=>o.length<=this.funnelVehicle4WheelsForm.maxLength())),this.funnelVehicle4WheelsForm?.isOtherDimensionsAllowed()?[...t,lt]:[...t]}),this.formatVehicleDimensionFn=t=>this._translocoService.translate(`booking.trip.vehicle.dimensions.ID_${t.id}`)}ngOnInit(){this.form=i.createForm();let t=this.$vehicle4WheelsFormDto();t&&(this.form.patchValue(t,{emitEvent:!0}),t.make&&t.model&&this.$isManualInputEnabled.set(!0)),this.funnelVehicle4WheelsForm=z(this._environmentInjector,()=>this.createFunnelVehicle4WheelsForm())}static createForm(){return new M(dt(Z(Z({},Fi.createForm().controls),Vi.createForm().controls),{extras:ii.createForm(),saved:new w(!1,{nonNullable:!0})}
1))}onManualFormSubmit(t){this.newVehicle.emit(dt(Z(Z({},this.form.getRawValue()),t),{saved:!0}))}onVehicleFound(t){if(t){let o=!t.height||!t.length?null:this.findMatchingDimension(t.height,t.length),a=o===lt||o===null;this.form.patchValue({make:t.make,model:t.model,height:a?null:t.height,length:a?null:t.length,dimensionControlId:o?.id}),this.newVehicle.emit(dt(Z({},this.form.getRawValue()),{saved:!a})),this._cdr.detectChanges()}}onUnknownVehicle(t){let o=!!this.form.controls.make.value||!!this.form.controls.model.value||!!this.form.controls.height.value||!!this.form.controls.length.value;if(t.checked){if(this.form.patchValue({registrationNumber:Tr}),!o){let a=this.$dimensions()?.at(0);this.form.patchValue({make:Ir,model:Rr,height:a?.height||null,length:a?.length||null,dimensionControlId:a?.id||null})}this.$isManualInputEnabled.set(!0)}else this.$isManualInputEnabled.set(!1)}createFunnelVehicle4WheelsForm(){return J([{constructableSelector:h.STANDARD,constructableType:ri},{constructableSelector:h.AGENT,constructableType:ni},{constructableSelector:h.PROMO,constructableType:oi}],this._activatedRoute.snapshot?.parent?.parent?.data?.funnelType)}findMatchingDimension(t,o){return U.findIdByDimensionsAndType(this.$type(),t,o)??lt}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle-4wheels-form"]],viewQuery:function(o,a){o&1&&mt(a.registrationSearchComponent,Mr,5),o&2&&ht()},hostAttrs:[1,"albatros","ignore-bf-common-ui"],inputs:{$type:[1,"type","$type"],$vehicle4WheelsFormDto:[1,"vehicle4WheelsFormDto","$vehicle4WheelsFormDto"]},outputs:{newVehicle:"newVehicle"},decls:9,vars:14,consts:[[1,"bf-body-1-semi-bold"],[3,"vehicleFound","formGroup","defaultCountryCode","isManualInputEnabled"],[1,"unknown-vehicle-checkbox"],["data-testid","unknownVehicleCheckbox","color","primary",3,"change","checked"],[3,"formSubmit","formGroup","type","dimensions","isRegistrationNumberValid"]],template:function(o,a){o&1&&(c(0,"p",0),u(1),s(2,"transloco"),l(),c(3,"dd-vehicle-registration-search",1),O("vehicleFound",function(P){return a.onVehicleFound(P)}),l(),c(4,"div",2)(5,"mat-checkbox",3),O("change",function(P){return a.onUnknownVehicle(P)}),u(6),s(7,"transloco"),l()(),c(8,"dd-vehicle-4wheels-manual-form",4),O("formSubmit",function(P){return a.onManualFormSubmit(P)}),l()),o&2&&(r(),T(d(2,10,"booking.trip.vehicle.searchTitle")),r(2),p("formGroup",a.form)("defaultCountryCode",a.defaultCountryCode)("isManualInputEnabled",a.$isManualInputEnabled()),r(2),p("checked",a.$isManualInputEnabled()),r(),C(" ",d(7,12,"booking.trip.vehicle.vehicleTBC")," "),r(2),p("formGroup",a.form)("type",a.$type())("dimensions",a.$dimensions())("isRegistrationNumberValid",a.form.controls.registrationNumber.valid||a.form.controls.registrationNumber.disabled))},dependencies:[D,E,V,Fi,Vi,le,R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100%;width:100%;background-color:#f1f5f9;padding:16px;border-radius:12px;gap:24px}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#23308e}@media(min-width:600px){[_nghost-%COMP%]{max-width:600px}}"],changeDetection:0});let e=i;return e})();function Dr(e,i){if(e&1&&(c(0,"p",2),u(1),l()),e&2){v();let n=Le(0);r(),Yi("",n.make," ",n.model)}}function Er(e,i){e&1&&(c(0,"p",3),u(1),s(2,"transloco"),l()),e&2&&(r(),T(d(2,1,"booking.trip.vehicle.noMake")))}function Vr(e,i){if(e&1&&_(0,"bf-tag",5),e&2){v();let n=Le(0);p("label",n==null?null:n.registrationNumber)}}var go=(()=>{let i=class i{constructor(){this.activatedRoute=m(q),this.$formCarDto=x(void 0,{alias:"formCarDto"}),this.editVehicle=Me(),this.$isMakeVisible=$(()=>{let t=this.$formCarDto();return!!t.make||!!t.model})}onEditVehicle(){this.editVehicle.emit()}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle-4wheels-summary"]],hostAttrs:[1,"albatros","ignore-bf-common-ui"],inputs:{$formCarDto:[1,"formCarDto","$formCarDto"]},outputs:{editVehicle:"editVehicle"},decls:25,vars:14,consts:[[1,"vehicle-resume"],[1,"resume-title"],["data-testid","make",1,"bf-body-1-semi-bold"],["data-testid","noMake",1,"bf-body-1-semi-bold"],[1,"vehicle-info"],["size","big","type","on-surface",1,"registration-number",3,"label"],[1,"size"],["size","big","type","on-surface",3,"label"],[1,"bf-body-1-semi-bold"],[1,"actions"],["mat-stroked-button","","data-testid","edit-vehicle-button","size","medium","type","button",3,"click"]],template:function(o,a){if(o&1&&(we(0),c(1,"div",0)(2,"div",1)(3,"mat-icon"),u(4,"directions_car"),l(),g(5,Dr,2,2,"p",2)(6,Er,3,3,"p",3),l(),c(7,"div",4),g(8,Vr,1,1,"bf-tag",5),c(9,"section",6),_(10,"bf-tag",7),s(11,"transloco"),c(12,"p",8),u(13),l()(),c(14,"section",6),_(15,"bf-tag",7),s(16,"transloco"),c(17,"p",8),u(18),l()()(),c(19,"div",9)(20,"button",10),O("click",function(){return a.onEditVehicle()}),c(21,"mat-icon"),u(22,"edit"),l(),u(23),s(24,"transloco"),l()()()),o&2){let f=rt(a.$formCarDto());r(5),b(a.$isMakeVisible()?5:6),r(3),b(f!=null&&f.registrationNumber?8:-1),r(2),p("label",d(11,8,"booking.trip.vehicle.length")),r(3),C("",f.length," m"),r(2),p("label",d(16,10,"booking.trip.vehicle.height")),r(3),C("",f.height," m"),r(5),C(" ",d(24,12,"booking.trip.vehicle.changeVehicle")," ")}},dependencies:[re,X,xe,yn,R],styles:["[_nghost-%COMP%]{display:block;width:100%}@media(min-width:600px){[_nghost-%COMP%]{max-width:600px}}.vehicle-resume[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:16px;background-color:#f1f5f9;border-radius:4px}.vehicle-resume[_ngcontent-%COMP%] .resume-title[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center}.vehicle-resume[_ngcontent-%COMP%] .resume-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#23308e}.vehicle-resume[_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center}.vehicle-resume[_ngcontent-%COMP%] .size[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#0f172a}.vehicle-resume[_ngcontent-%COMP%] .vehicle-info[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:24px;align-items:center;flex-wrap:wrap}.vehicle-resume[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:12px;margin-top:auto;justify-content:flex-end}"],changeDetection:0});let e=i;return e})();var et=class extends K{getMaxVehicleHeight(){return 4}getMaxVehicleLength(){return 30}isAllowedFourWheelsVehicleExtra(i){return!0}};var ai=class extends et{constructor(){super(...arguments),this.context=h.AGENT}};var si=class extends et{constructor(){super(),this.context=h.PROMO,this._funnelRulesStateService=m(me),this._funnelRules=this._funnelRulesStateService.funnelRules()}getMaxVehicleHeight(){return this._funnelRules?.selectTrip?.transport?.maxDimensions?.maxHeight??super.getMaxVehicleHeight()}getMaxVehicleLength(){return this._funnelRules?.selectTrip?.transport?.maxDimensions?.maxLength??super.getMaxVehicleLength()}isAllowedFourWheelsVehicleExtra(i){if(!this._funnelRules?.selectTrip?.transport?.allowedF
1ourWheelsVehicleExtra)return super.isAllowedFourWheelsVehicleExtra(i);let n=Dt.includes(i);return this._funnelRules?.isAllowedFourWheelsVehicleExtra(vt.CARAVAN_OR_TRAILOR)||!n&&this._funnelRules?.isAllowedFourWheelsVehicleExtra(vt.ROOF_ITEM)||this._funnelRules?.isAllowedFourWheelsVehicleExtra(vt.REAR_MOUNTED_BIKE_CARRIER)}};var li=class extends et{constructor(){super(...arguments),this.context=h.STANDARD}};function Fr(e,i){if(e&1){let n=G();c(0,"dd-vehicle-4wheels-form",4),O("newVehicle",function(o){A(n);let a=v();return N(a.onSaveCar(o))}),l()}if(e&2){let n=v();p("type",n.$type())("vehicle4WheelsFormDto",n.currentVehicleDto)}}function Ar(e,i){if(e&1){let n=G();c(0,"dd-vehicle-4wheels-summary",5),O("editVehicle",function(){A(n);let o=v();return N(o.onEditCar())}),l()}if(e&2){let n=v();p("formCarDto",n.currentVehicleDto)}}function Nr(e,i){e&1&&(_(0,"bf-alert",2),s(1,"transloco")),e&2&&p("label",d(1,1,"booking.trip.vehicle.error.required"))}function kr(e,i){e&1&&(_(0,"bf-alert",2),s(1,"transloco")),e&2&&p("label",d(1,1,"booking.trip.vehicle.error.missingRequired"))}var bo=(()=>{let i=class i{constructor(){this._controlContainer=m(B),this._cdr=m(ne),this._environmentInjector=m(H),this._destroyRef=m(Q),this.activatedRoute=m(q),this.$type=x.required({alias:"type"}),this.$isRoofItemForbiddenForVehicle=$(()=>Dt.includes(this.$type()))}ngOnInit(){this.initializeForm(),this.setupFormValidation(this.$type())}get isAllowedFourWheelsVehicleExtra(){return this.funnelVehicle4Wheels.isAllowedFourWheelsVehicleExtra(this.$type())}get isVehicleSaved(){return this.form.controls.saved.value}get currentVehicleDto(){return dt(Z({},this.form.getRawValue()),{saved:this.form.controls.saved.value})}get currentExtras(){return this.form.controls.extras.getRawValue()}onEditCar(){this.form.patchValue({registrationNumber:void 0,make:void 0,model:void 0,height:void 0,length:void 0,dimensionControlId:null,saved:!1})}onSaveCar(a){var f=a,{extras:t}=f,o=ki(f,["extras"]);this.form.patchValue(o),this.form.updateValueAndValidity(),this._cdr.detectChanges()}get isVehicleFormInError(){return this.form.controls.height.invali
1d&&this.form.controls.height.touched&&this.form.controls.length.invalid&&this.form.controls.length.touched}get isExtrasInError(){return this.isRoofItemsExtraInError||this.isCaravanExtraInError||this.isBikesExtraInError}get isCaravanExtraInError(){return this.form.controls.extras.invalid&&this.form.controls.extras.controls.caravan.controls.active.value&&this.form.controls.extras.controls.caravan.controls.height.touched&&this.form.controls.extras.controls.caravan.controls.length.touched}get isRoofItemsExtraInError(){return this.form.controls.extras.invalid&&this.form.controls.extras.controls.roofItems.controls.active.value&&this.form.controls.extras.controls.roofItems.controls.height.touched}get isBikesExtraInError(){return this.form.controls.extras?.invalid&&this.form.controls.extras.controls.bikes.controls.active.value&&this.form.controls.extras.controls.bikes.touched}initializeForm(){this.form=this._controlContainer.control,this.funnelVehicle4Wheels=z(this._environmentInjector,()=>this.createFunnelVehicle4Wheels()),this.form.statusChanges.pipe(S(this._destroyRef)).subscribe(()=>{this._cdr.detectChanges()})}setupFormValidation(t){ft.includes(t)?this.form.enable({emitEvent:!0}):this.form.disable({emitEvent:!0}),this.form.updateValueAndValidity()}createFunnelVehicle4Wheels(){let t=J([{constructableSelector:h.STANDARD,constructableType:li},{constructableSelector:h.AGENT,constructableType:ai},{constructableSelector:h.PROMO,constructableType:si}],this.activatedRoute.snapshot.parent?.parent?.data.funnelType);if(!t)throw new Error("No funnel vehicle type select found for the current funnel");return t}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle-4wheels"]],inputs:{$type:[1,"type","$type"]},decls:5,vars:5,consts:[[3,"type","vehicle4WheelsFormDto"],["data-testid","vehicleResume",3,"formCarDto"],["data-testid","vehicleErrorMessage","type","error",3,"label"],[3,"formGroup","isRoofItemForbiddenForVehicle"],[3,"newVehicle","type","vehicle4WheelsFormDto"],["data-testid","vehicleResume",3,"editVehicle","formCarDto"]],template:function(o,a){o&1&&(g(0,Fr,1,2,"dd-vehicle-4wheels-form",0)(1,Ar,1,1,"dd-vehicle-4wheels-summary",1),g(2,Nr,2,3,"bf-alert",2),_(3,"dd-vehicle-4wheels-extra",3),g(4,kr,2,3,"bf-alert",2)),o&2&&(b(a.isVehicleSaved?1:0),r(2),b(a.isVehicleFormInError?2:-1),r(),p("formGroup",a.form.controls.extras)("isRoofItemForbiddenForVehicle",a.$isRoofItemForbiddenForVehicle()),r(),b(a.isExtrasInError?4:-1))},dependencies:[D,E,V,go,Mt,ii,ue,R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:24px}[_nghost-%COMP%] .bf-alert[_ngcontent-%COMP%]{width:100%}@media(min-width:600px){[_nghost-%COMP%] .bf-alert[_ngcontent-%COMP%]{max-width:600px}}"],changeDetection:0});let e=i;return e})();var Co={footNotificationLink:{[Ge.GB]:"/ferry-routes/rail-and-sail",[Ge.IE]:"/ferry-routes/rail-and-sail",[Ge.FR]:"/traversees/train-et-ferry",[Ge.ES]:"/rutas/tren-y-ferry"}};var tt=class extends K{};var ci=class extends tt{constructor(){super(...arguments),this.context=h.AGENT}};var di=class extends tt{constructor(){super(),this.context=h.PROMO}};var pi=class extends tt{constructor(){super(...arguments),this.context=h.STANDARD}};function Br(e,i){e&1&&(c(0,"div",4)(1,"mat-icon"),u(2,"info"),l(),c(3,"span"),u(4),s(5,"transloco"),l()()),e&2&&(r(4),T(d(5,1,"booking.trip.vehicle.sidecarHelper")))}function $r(e,i){e&1&&(c(0,"mat-error",14),u(1),s(2,"transloco"),l()),e&2&&(r(),T(d(2,1,"booking.trip.vehicle.error.registrationFormat")))}function Lr(e,i){if(e&1){let n=G();c(0,"div",11)(1,"bf-label",12),u(2),s(3,"transloco"),l(),c(4,"mat-form-field",null,0)(6,"input",13),s(7,"transloco"),O("blur",function(){let o=A(n).$index,a=v();return N(a.uppercaseAndTrimRegistrationNumber(o))}),l(),g(8,$r,3,3,"mat-error",14),l(),c(9,"mat-checkbox",15),u(10),s(11,"transloco"),l()()}if(e&2){let n=i.$implicit,t=i.$index,o=W(5),a=v();p("formGroupName",t),r(),p("for",o),r(),T(d(3,6,`booking.trip.vehicle.motorbikeRN${t}`)),r(4),p("placeholder",d(7,8,"booking.trip.vehicle.registrationPlaceholder")),r(2),b(a.isRegistrationNumberInvalid(n)?8:-1),r(2),T(d(11,10,"booking.trip.vehicle.motorbikeTBC"))}}var ui=(()=>{let i=class i{constructor(){this._bookingService=m(qe),this._fb=m(bt),this._controlContainer=m(B),this._cdr=m(ne),this._destroyRef=m(Q),this._environmentInjector=m(H),this._activatedRoute=m(q),this.$direction=x(void 0,{alias:"direction"}),this.$type=x.required({alias:"type"}),this.$passengerCount=x.required({alias:"passengerCount"}),pt(()=>{let t=this.$passengerCount();this.form&&t!==null&&(t>3?(this.hasSidecar.patchValue(!1),this.hasSidecar.disable()):this.hasSidecar.enable(),this.adjustCountToMinMax())})}ngOnInit(){this.funnelVehicle=z(this._environmentInjector,()=>this.createFunnelVehicle()),this.form=this._controlContainer.control,this.form.controls.count.addValidators([se.minDynamic(()=>this.minMotorbike),se.maxDynamic(()=>this.maxMotorbike)]),this.watchCountChanges(),this.watchFormRestored(),this.hasSidecar.valueChanges.pipe(S(this._destroyRef)).subscribe(()=>this.adjustCountToMinMax()),this.setupFormValidation(this.$type())}ngOnDestroy(){this.motorbikes.clear(),this.form.disable({emitEvent:!0}),this.form.updateValueAndValidity()}static createForm(){return new M({count:new w(null),hasSidecar:new w(!1,{nonNullable:!0}),motorbikes:new gn([])})}setupFormValidation(t){t===y.MOTORBIKE?this.form.enable({emitEvent:!0}):this.form.disable({emitEvent:!0}),this.form.updateValueAndValidity()}uppercaseAndTrimRegistrationNumber(t){let o=this.motorbikes.controls?.at(t)?.controls.registrationNumber;o&&o.patchValue(o.value?.toUpperCase().replaceAll(/[ -]/g,"")??"")}isRegistrationNumberInvalid(t){return t.controls.registrationNumber.hasError("pattern")}get minMotorbike(){return this.hasSidecar?.value?1:this.$passengerCount()>0?Math.min(Math.ceil(this.$passengerCount()/2),4):0}get maxMotorbike(){return this.hasSidecar?.value?1:this.$passengerCount()>0?Math.min(this.$passengerCount(),4):4}get count(){return this.form.controls.count}get motorbikes(){return this.form.controls.motorbikes}get hasSidecar(){return this.form.controls.hasSidecar}watchCountChanges(){this.count.valueChanges.pipe(S(this._destroyRef)).subscribe(()=>{this.handleNumberOfMotorbikes()})}watchFormRestored(){this._bookingService.formRestored.pipe(be(t=>(this.$direction()===oe.OUTBOUND?t?.vehicle?.outward?.type:t?.vehicle?.inward?.type)===y.MOTORBIKE),S(this._destroyRef)).subscribe(t=>{this.form.enable(),this.handleNumberOfMotorbikes();let o=this.$direction()===oe.OUTBOUND?t?.vehicle?.outward?.motorbike?.motorbikes:t?.vehicle?.inward?.motorbike?.motorbikes;this.motorbikes.patchValue(o,{emitEvent:!1})})}adjustCountToMinMax(){let t=this.count.value??0;t<this.minMotorbike?this.count.patchValue(this.minMotorbike):t>this.maxMotorbike&&this.count.patchValue(this.maxMotorbike)}handleNumberOfMotorbikes(){if(!this.count.value)return;let t=this.motorbikes.controls.length,o=Math.abs(this.count.value-t);if(o!==0){if(this.count.value>t)for(let a=0;a<o;a++){let f=this._fb.group({registrationNumber:this._fb.control(null,[L.required,L.pattern(Se.VEHICLE_REGISTRATION_PATTERN)]),registrationNumberTBC:this._fb.control(!1)});this.watchRegistrationNumber(f),this.motorbikes.push(f,{emitEvent:!1})}else if(this.count.value<t)for(let a=0;a<o;a++)this.motorbikes.removeAt(this.motorbikes.controls.length-1);this._cdr.detectChanges()}}watchRegistrationNumber(t){t.controls.registrationNumber.valueChanges.pipe(be(o=>!!o),S(this._destroyRef)).subscribe(o=>{t.controls.registrationNumber.patchValue(o?.toUpperCase()??"",{emitEvent:!1}),t.controls.registrationNumberTBC.patchValue(!1,{emitEvent:!1})}),t.controls.registrationNumberTBC.valueChanges.pipe(Qi(this._bookingService.formRestored),S(this._destroyRef)).subscribe(o=>t.controls.registrationNumber.patchValue(o?"TBC":null,{emitEvent:!1}))}createFunnelVehicle(){let t=J([{constructableSelector:h.STANDARD,constructableType:pi},{constructableSelector:h.AGENT,constructableType:ci},{constructableSelector:h.PROMO,constructableType:di}],this._activatedRoute.snapshot.parent?.parent?.data.funnelType);if(!t)throw new Error("No factory found for funnel type "+this._activatedRoute.snapshot.parent?.parent?.data.funnelType);return t}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle-motorbike"]],hostAttrs:[1,"albatros","ignore-bf-common-ui"],inputs:{$direction:[1,"direction","$direction"],$type:[1,"type","$type"],$passengerCount:[1,"passengerCount","$passengerCount"]},decls:19,vars:15,consts:[["registration",""],[1,"motorbike-select",3,"formGroup"],[1,"has-sidecar"],["formControlName","hasSidecar","color","primary",1,"tba-checkbox"],["data-testid","sidecarHelper",1,"sidecar-helper"],["data-testid","countSelector",1,"count-selector"],[1,"left"],[1,"title"],[1,"subtitle"],["formControlName","count",3,"min","max"],["formArrayName","motorbikes",1,"registration-numbers"],[1,"registration-number",3,"formGroupName"],[3,"for"],["matInput","","ddBlurOnEnter","","maxLength","12","autocomplete","off","formControlName","registrationNumber",3,"blur","placeholder"],["data-testid","isRegistrationNumberInvalidDisplay"],["color","primary","formControlName","registrationNumberTBC",1,"tba-checkbox"]],template:function(o,a){o&1&&(c(0,"form",1)(1,"div",2)(2,"mat-checkbox",3),u(3),s(4,"transloco"),l(),g(5,Br,6,3,"div",4),l(),_(6,"br"),c(7,"div",5)(8,"div",6)(9,"span",7),u(10),s(11,"transloco"),l(),c(12,"span",8),u(13),s(14,"transloco"),l()(),_(15,"bf-number-selector",9),l(),c(16,"div",10),_e(17,Lr,12,12,"div",11,Ce),l()()),o&2&&(p("formGroup",a.form),r(3),C(" ",d(4,9,"booking.trip.vehicle.hasSidecar")," "),r(2),b(a.hasSidecar.value||a.$passengerCount()>3?5:-1),r(2),ye("hidden",a.minMotorbike===1&&a.maxMotorbike===1),r(3),T(d(11,11,"booking.trip.vehicle.howMany")),r(3),T(d(14,13,"booking.trip.vehicle.motorbikePerParty")),r(2),p("min",a.minMotorbike)("max",a.maxMotorbike),r(2),ve(a.motorbikes.controls))},dependencies:[D,Pe,We,F,E,V,ae,gt,bn,le,X,Ct,Y,Qe,ze,Wn,He,R],styles:[".motorbike-select[_ngcontent-%COMP%]{display:flex;flex-direction:column}.motorbike-select[_ngcontent-%COMP%] .has-sidecar[_ngcontent-%COMP%]{padding-bottom:25px;border-bottom:1px solid #cbd5e1}.motorbike-select[_ngcontent-%COMP%] .has-sidecar[_ngcontent-%COMP%] .sidecar-helper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:15px;line-height:1.83;font-size:.75rem;color:#c2410c}.motorbike-select[_ngcontent-%COMP%] .has-sidecar[_ngcontent-%COMP%] .sidecar-helper[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:1rem;min-width:1rem;height:1rem;line-height:1rem;font-size:1rem;display:inline-flex;align-items:center;justify-content:center;margin-right:10px;color:#c2410c}.motorbike-select[_ngcontent-%COMP%] .count-selector[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;max-width:600px}.motorbike-select[_ngcontent-%COMP%] .count-selector.hidden[_ngcontent-%COMP%]{display:none}.motorbike-select[_ngcontent-%COMP%] .count-selector[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.motorbike-select[_ngcontent-%COMP%] .count-selector[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .motorbike-select[_ngcontent-%COMP%] .count-selector[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{line-height:24px}.motorbike-select[_ngcontent-%COMP%] .count-selector[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:.875rem}.motorbike-select[_ngcontent-%COMP%] .count-selector[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-size:.75rem}.motorbike-select[_ngcontent-%COMP%] .registration-numbers[_ngcontent-%COMP%] .registration-number[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-top:20px}.motorbike-select[_ngcontent-%COMP%] .registration-numbers[_ngcontent-%COMP%] .registration-number[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-transform:uppercase}.motorbike-select[_ngcontent-%COMP%] .registration-numbers[_ngcontent-%COMP%] .registration-number[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{text-transform:none}"],changeDetection:0});let e=i;return e})();var it=class extends K{isVehicleTypeAllowed(i){return Object.values(y).includes(i)}};var mi=class extends it{constructor(){super(...arguments),this.context=h.AGENT}};var hi=class extends it{constructor(){super(),this.context=h.PROMO,this._funnelRulesStateService=m(me),this._funnelRules=this._funnelRulesStateService.funnelRules()}isVehicleTypeAllowed(i){return!this._funnelRules||!this._funnelRules.selectTrip?!1:i===y.FOOT?this._funnelRules.selectTrip?.transport?.isOnFootAllowed??!1:i===y.BICYCLE?this._funnelRules.selectTrip?.transport?.isBicycleAllowed??!1:Object.values(this._funnelRules.selectTrip?.transport?.allowedMotorizedVehicles??[]).includes(i)}};var fi=class extends it{constructor(){super(...arguments),this.context=h.STANDARD}};function Ur(e,i){if(e&1&&(c(0,"mat-list-option",7),u(1),s(2,"transloco"),l()),e&2){let n=i.$implicit;p("disabled",n.isDisabled)("value",n.value),fe("data-e2eid",`vehicleType-${n.value}`),r(),C(" ",d(2,4,`booking.trip.vehicle.type_${n.value}`)," ")}}function Gr(e,i){e&1&&(c(0,"mat-error",8),u(1),s(2,"transloco"),l()),e&2&&(r(),T(d(2,1,"core.form.select")))}var _o=(()=>{let i=class i{constructor(){this._activatedRoute=m(q),this._environmentInjector=m(H),this.$vehicleTypes=x(Object.values(y),{alias:"vehicleTypes"}),this.$disabledVehicleTypes=x([],{alias:"disabledVehicleTypes"}),this.$control=x.required({alias:"control"}),this.$filteredVehicleTypes=$(()=>{let t=this.$disabledVehicleTypes();return this.$vehicleTypes().filter(o=>this.funnelVehicle.isVehicleTypeAllowed(o)).map(o=>({value:o,isDisabled:t.includes(o)}))})}get isAgentFunnel(){return this.funnelVehicle.context===h.AGENT}ngOnInit(){this.funnelVehicle=z(this._environmentInjector,()=>this.createFunnelVehicle())}getIconByType(t){switch(t){case y.FOOT:return"directions_walk";case y.MOTORBIKE:return"two_wheeler";case y.BICYCLE:return"pedal_bike";case y.CAR:return"directions_car";case y.MINIBUS:return"airport_shuttle";case y.VAN:return"local_shipping";default:return"directions_walk"}}createFunnelVehicle(){let t=J([{constructableSelector:h.STANDARD,constructableType:fi},{constructableSelector:h.AGENT,constructableType:mi},{constructableSelector:h.PROMO,constructableType:hi}],this._activatedRoute.snapshot.parent?.parent?.data.funnelType);if(!t)throw new Error("No funnel vehicle type select found for the current funnel");return t}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle-type-select"]],hostAttrs:[1,"albatros","ignore-bf-common-ui"],inputs:{$vehicleTypes:[1,"vehicleTypes","$vehicleTypes"],$disabledVehicleTypes:[1,"disabledVehicleTypes","$disabledVehicleTypes"],$control:[1,"control","$control"]},decls:18,vars:21,consts:[["vehicleTypeMobileSelect",""],[3,"for"],["subscriptSizing","dynamic",1,"full-width"],["data-testid","vehicleTypeMobile",3,"formControl","label","placeholder","closeOnSelect"],["display-value",""],[1,"select-wrapper"],[3,"selectionChange","multiple","hideSingleSelectionIndicator"],[3,"disabled","value"],[1,"error-message"]],template:function(o,a){if(o&1){let f=G();we(0),c(1,"div")(2,"label",1),u(3),s(4,"transloco"),l(),c(5,"mat-form-field",2,0)(7,"bf-responsive-select",3),s(8,"transloco"),s(9,"transloco"),c(10,"span",4),u(11),s(12,"transloco"),l(),c(13,"div",5)(14,"mat-selection-list",6),O("selectionChange",function(k){A(f);let ke=Le(0);return N(ke.setValue(k.options[0].value))}),_e(15,Ur,3,6,"mat-list-option",7,Ce),l()()()()(),g(17,Gr,3,3,"mat-error",8)}if(o&2){let f=W(6),P=rt(a.$control());r(),ye("agent-funnel",a.isAgentFunnel),r(),p("for",f),r(),T(d(4,13,"booking.trip.vehicle.typeOfTravel")),r(4),p("formControl",P)("label",d(8,15,"booking.trip.vehicle.typeOfTravel"))("placeholder",d(9,17,"booking.trip.vehicle.noTypeOfTravelSelected"))("closeOnSelect",!0),r(4),C(" ",d(12,19,`booking.trip.vehicle.type_${P.value}`)," "),r(3),p("multiple",!1)("hideSingleSelectionIndicator",!0),r(),ve(a.$filteredVehicleTypes()),r(2),b(P.invali
1d&&P.dirty?17:-1)}},dependencies:[D,F,Re,He,Y,De,Bt,kt,R],styles:["[_nghost-%COMP%] label[_ngcontent-%COMP%]{display:block;margin-bottom:12px;color:#23308e;font-size:.875rem;font-style:normal;font-weight:600;line-height:150%}[_nghost-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:inherit}[_nghost-%COMP%] .error-message[_ngcontent-%COMP%]{margin-top:12px}"],changeDetection:0});let e=i;return e})();var ct=(()=>{let i=class i{static validIsVehicleFret(){return t=>{if(!(t instanceof M)||!t.contains("length")||!t.contains("height"))return null;let o=t.controls.length?.value??0,a=t.controls.height?.value??0,f=Pn(a*100,o*100);return o>=10||f?.code==="HX"?{vehicleIsFret:!0}:null}}static validVehicleDimensions(t,o){return a=>{if(!(a instanceof M)||!a.contains("length")||!a.contains("height"))return null;let f=0,P=0,k=0;try{f=this.getCaravanHeight(a),P=this.getCaravanLength(a),k=this.getRoofItemHeight(a)}catch(Oo){return Oo}let ke={};return ke=Object.assign(ke,this.validVehicleHeight(o,f,k,a.controls.height?.value)),ke=Object.assign(ke,this.validVehicleLength(t,P,a.controls.length?.value)),Object.keys(ke).length?ke:null}}static getCaravanHeight(t){let o=new Rt,a=t.controls.extras.value,f=0;if(a.caravan?.active){if(!a.caravan?.height)throw{missingCaravanHeight:!0};let P=Object.keys(Fe).find(k=>Fe[k]===a.caravan?.height);if(!P)throw{invalidCaravanHeight:!0};f=Number.parseInt(P.substring(6)),f=o.fromJson(f)}return f??0}static getCaravanLength(t){let o=new Rt,a=t.controls.extras?.value,f=0;if(a.caravan?.active){if(!a.caravan?.length)throw{missingCaravanLength:!0};let P=Object.keys(Ae).find(k=>Ae[k]===a.caravan?.length);if(!P)throw{invalidCaravanLength:!0};f=Number.parseInt(P.substring(6)),f=o.fromJson(f)}return f??0}static getRoofItemHeight(t){let o=new Rt,a=t.controls.extras?.value,f=0;if(a.roofItems?.active){if(!a.roofItems?.height)throw{missingRoofItemsHeight:!0};let P=Object.keys(je).find(k=>je[k]===a.roofItems?.height);if(!P)throw{invalidRoofItemsHeight:!0};f=Number.parseInt(P.substring(6)),f=o.fromJson(f)}return f??0}static validVehicleHeight(t,o,a,f){return o>f&&(f=o),o>0&&a>0?o>a?f=o:f=a:o>0&&o>f?f=o:a>0&&a>f&&(f=a),f>t?{vehicleTooHigh:!0}:null}static validVehicleLength(t,o,a){return o>0&&(a=o),a>t?{vehicleTooLong:!0}:null}static validVehicleQuantity(){return t=>{if(!(t instanceof M&&t.controls.vehicle instanceof M&&t.controls.vehicle.controls.outward
1instanceof M)||!t||!t.parent||!t.contains("vehicle")||!t.controls.vehicle.contains("isSameInboundVehicle")||!(t.controls.vehicle.contains("outward")&&t.controls.vehicle.controls.outward.contains("type"))||!t.contains("outwardPassengersQuantity")||!t.contains("inwardPassengersQuantity")||!t.contains("isSameInboundPassengers"))return null;let o=t.controls.vehicle.controls.isSameInboundVehicle?.value,a=t.controls.vehicle.controls.outward.controls.type?.value,f=ee.countPassengerWithoutInfants(t.controls.outwardPassengersQuantity?.value),P=ee.countPassengerWithoutInfants(t.controls.inwardPassengersQuantity?.value),k=t.controls.isSameInboundPassengers?.value;return a===y.BICYCLE&&f!==P&&!k&&o?{sameInboundNotAuthorized:!0}:null}}};i.VEHICLE_REGISTRATION_PATTERN=/^[a-zA-Z0-9 -]+$/,i.VOUCHER_PATTERN=/^[0-9]{6}$/;let e=i;return e})();var vo=(e,i)=>({maxLength:e,maxHeight:i}),yo=e=>({under25:e}),wo=(e,i)=>({text:e,url:i});function Wr(e,i){e&1&&(c(0,"p",2),u(1),s(2,"transloco"),l()),e&2&&(r(),C(" ",d(2,1,"booking.trip.vehicle.outboundJourney")," "))}function Hr(e,i){if(e&1&&(_(0,"bf-alert",4),s(1,"transloco")),e&2){let n=v();p("label",d(1,2,"booking.trip.vehicle.error.fret"))("type",n.outwardCarGroup!=null&&n.outwardCarGroup.hasError("vehicleIsFret")?"error":"warning")}}function zr(e,i){if(e&1&&(_(0,"bf-alert",5),s(1,"transloco")),e&2){let n=v();p("label",j(1,2,"booking.trip.vehicle.error.size",Ue(5,vo,n.funnelVehicle.getMaxVehicleLength,n.funnelVehicle.getMaxVehicleHeight)))("type",n.outwardCarGroup!=null&&n.outwardCarGroup.hasError("vehicleTooHigh")||n.outwardCarGroup!=null&&n.outwardCarGroup.hasError("vehicleTooLong")?"error":"warning")}}function Qr(e,i){e&1&&(_(0,"bf-alert",6),s(1,"transloco")),e&2&&p("label",d(1,1,"booking.trip.vehicle.vanWarning"))}function jr(e,i){if(e&1&&(_(0,"bf-alert",7),s(1,"transloco"),s(2,"transloco"),s(3,"transloco"),s(4,"bfLocalizedLink")),e&2){let n=v();p("label",j(1,3,"booking.trip.vehicle.footNotification.description",pe(12,yo,n.$isRailAndSailRouteOutward())))("title",d(2,6,"booking.trip.vehicle.footNotification.title"))("link",Ue(14,wo,d(3,8,"booking.trip.vehicle.footNotification.link"),d(4,10,n.vehicleLocalizedLinks.footNotificationLink)))}}function qr(e,i){if(e&1&&_(0,"dd-vehicle-bicycle",8),e&2){let n=v();p("passengers",n.$outwardPassengers())("type",n.form.controls.outward.controls.type.value)}}function Xr(e,i){if(e&1&&_(0,"dd-vehicle-motorbike",9),e&2){let n=v();p("passengerCount",n.typeIsMotorbike("outward")?n.getPassengerCount(n.$outwardPassengersQuantity()):0)("type",n.form.controls.outward.controls.type.value)("direction",n.Direction.OUTBOUND)}}function Yr(e,i){if(e&1&&_(0,"dd-vehicle-4wheels",17),e&2){v();let n=Le(0);p("type",n)}}function Kr(e,i){if(e&1&&(we(0),g(1,Yr,1,1,"dd-vehicle-4wheels",17)),e&2){let n=v(),t=rt(n.getFourWheelsVehicleTypeFromVehicleType(n.form.controls.outward.controls.type.value));r(),b(t?1:-1)}}function Jr(e,i){e&1&&(c(0,"div",10)(1,"mat-checkbox",18),u(2),s(3,"transloco"),l()()),e&2&&(r(2),C(" ",d(3,1,"booking.trip.vehicle.sameInboundJourney")," "))}function Zr(e,i){e&1&&(c(0,"p",12),u(1),s(2,"transloco"),l()),e&2&&(r(),C(" ",d(2,1,"booking.trip.vehicle.inboundJourney")," "))}function ea(e,i){if(e&1&&(_(0,"bf-alert",13),s(1,"transloco")),e&2){let n=v();p("label",d(1,2,"booking.trip.vehicle.error.size"))("type",n.inwardCarGroup!=null&&n.inwardCarGroup.hasError("vehicleIsFret")?"error":"warning")}}function ta(e,i){if(e&1&&(_(0,"bf-alert",14),s(1,"transloco")),e&2){let n=v();p("label",j(1,2,"booking.trip.vehicle.error.size",Ue(5,vo,n.funnelVehicle.getMaxVehicleLength,n.funnelVehicle.getMaxVehicleHeight)))("type",n.inwardCarGroup!=null&&n.inwardCarGroup.hasError("vehicleTooHigh")||n.inwardCarGroup!=null&&n.inwardCarGroup.hasError("vehicleTooLong")?"error":"warning")}}function ia(e,i){e&1&&(_(0,"bf-alert",15),s(1,"transloco")),e&2&&p("label",d(1,1,"booking.trip.vehicle.vanWarning"))}function na(e,i){if(e&1&&(_(0,"bf-alert",16),s(1,"transloco"),s(2,"transloco"),s(3,"transloco"),s(4,"bfLocalizedLink")),e&2){let n=v();p("label",j(1,3,"booking.trip.vehicle.footNotification.description",pe(12,yo,n.$isRailAndSailRouteOutward())))("title",d(2,6,"booking.trip.vehicle.footNotification.title"))("link",Ue(14,wo,d(3,8,"booking.trip.vehicle.footNotification.link"),d(4,10,n.vehicleLocalizedLinks.footNotificationLink)))}}function oa(e,i){if(e&1&&_(0,"dd-vehicle-bicycle",8),e&2){let n=v();p("passengers",n.$inwardPassengers())("type",n.form.controls.inward.controls.type.value)}}function ra(e,i){if(e&1&&_(0,"dd-vehicle-motorbike",9),e&2){let n=v();p("passengerCount",n.typeIsMotorbike("inward")?n.getPassengerCount(n.$inwardPassengersQuantity()):0)("type",n.form.controls.inward.controls.type.value)("direction",n.Direction.INBOUND)}}function aa(e,i){if(e&1&&_(0,"dd-vehicle-4wheels",19),e&2){v();let n=Le(0);p("type",n)}}function sa(e,i){if(e&1&&(we(0),g(1,aa,1,1,"dd-vehicle-4wheels",19)),e&2){let n=v(),t=rt(n.getFourWheelsVehicleTypeFromVehicleType(n.form.controls.inward.controls.type.value));r(),b(t?1:-1)}}var Ai=(()=>{let i=class i{constructor(){this._controlContainer=m(B),this._cdr=m(ne),this._bookingService=m(qe),this._activatedRoute=m(q),this._destroyRef=m(Q),this.$outwardFootPaxAllowed=x.required({alias:"outwardFootPaxAllowed"}),this.$inwardFootPaxAllowed=x.required({alias:"inwardFootPaxAllowed"}),this.$outwardBicycleAllowed=x.required({alias:"outwardBicycleAllowed"}),this.$inwardBicycleAllowed=x.required({alias:"inwardBicycleAllowed"}),this.$outwardPassengersQuantity=x.required({alias:"outwardPassengersQuantity"}),this.$inwardPassengersQuantity=x.required({alias:"inwardPassengersQuantity"}),this.$outwardPassengersDisability=x.required({alias:"outwardPassengersDisability"}),this.$inwardPassengersDisability=x.required({alias:"inwardPassengersDisability"}),this.$isReturnTrip=x.required({alias:"isReturnTrip"}),this.$outwardRoute=x.required({alias:"outwardRoute"}),this.$inwardRoute=x.required({alias:"inwardRoute"}),this.outwardFootPaxAllowedChange$=Ie(this.$outwardFootPaxAllowed),this.inwardFootPaxAllowedChange$=Ie(this.$inwardFootPaxAllowed),this.outwardBicycleAllowedChange$=Ie(this.$outwardBicycleAllowed),this.inwardBicycleAllowedChange$=Ie(this.$inwardBicycleAllowed),this.outwardPassengerQuantityChange$=Ie(this.$outwardPassengersQuantity),this.inwardPassengerQuantityChange$=Ie(this.$inwardPassengersQuantity),this.outwardPassengerDisabilityChange$=Ie(this.$outwardPassengersDisability),this.inwardPassengerDisabilityChange$=Ie(this.$inwardPassengersDisability),this.isReturnTripChange$=Ie(this.$isReturnTrip),this._environmentInjector=m(H),this.$isRailAndSailRouteOutward=$(()=>{let t=this.$outwardRoute();return!!t&&this._railAndSailCountries.includes(t.departure.country)&&this._railAndSailCountries.includes(t.arrival.country)}),this.$isRailAndSailRouteInward=$(()=>{let t=this.$inwardRoute();return this.$isReturnTrip()&&this.$isRailAndSailRouteOutward()||!!t&&this._railAndSailCountries.includes(t.departure.country)&&this._railAndSailCountries.includes(t.arrival.country)}),this.$outwardPassengers=$(()=>{let t=this.$outwardPassengersQuantity()??{},o=this.$outwardPassengersDisability()??{};return new ee(Z(Z({},t),o))}),this.$inwardPassengers=$(()=>{let t=this.$inwardPassengersQuantity()??{},o=this.$inwardPassengersDisability()??{};return new ee(Z(Z({},t),o))}),this.$outwardVehicleTypes=$(()=>{let t=this.$outwardFootPaxAllowed(),o=this.$outwardBicycleAllowed(),a=this.funnelVehicle?.getProhibitedVehicles,f=new Set([...t?[]:[y.FOOT],...o?[]:[y.BICYCLE],...a]);return Object.values(y).filter(P=>!f.has(P))}),this.$inwardVehicleTypes=$(()=>{let t=this.$inwardFootPaxAllowed(),o=this.$inwardBicycleAllowed(),a=this.funnelVehicle?.getProhibitedVehicles,f=new Set([...t?[]:[y.FOOT],...o?[]:[y.BICYCLE],...a]);return Object.values(y).filter(P=>!f.has(P))}),this.$outwardDisabledVehicleTypes=$(()=>{let t=this.$outwardPassengersQuantity();if(!t)return[];let o=[];return ee.countPassenger(t)>8&&o.push(y.MOTORBIKE),ee.countPassengerWithoutInfants(t)>4&&o.push(y.BICYCLE),o}),this.$inwardDisabledVehicleTypes=$(()=>{let t=this.$inwardPassengersQuantity();if(!t)return[];let o=[];return ee.countPassenger(t)>8&&o.push(y.MOTORBIKE),ee.countPassengerWithoutInfants(t)>4&&o.push(y.BICYCLE),o}),this.Direction=oe,this._railAndSailCountries=["FRA","IRL"],this.vehicleLocalizedLinks=Co}ngOnInit(){if(!this._controlContainer||!(this._controlContainer.control instanceof fn))throw new Error("Missing FormGroupName directive from host element of the component");this.funnelVehicle=z(this._environmentInjector,()=>this.createFunnelVehicle()),this.form=this._controlContainer.control,this.form.controls.outward.controls.car.addValidators([ct.validIsVehicleFret(),ct.validVehicleDimensions(this.funnelVehicle.getMaxVehicleLength,this.funnelVehicle.getMaxVehicleHeight)]),this.form.controls.inward.controls.car.addValidators([ct.validIsVehicleFret(),ct.validVehicleDimensions(this.funnelVehicle.getMaxVehicleLength,this.funnelVehicle.getMaxVehicleHeight)]),this.form.controls.outward.controls.type.addValidators(()=>this.checkOutwardTypeAvailability(this.form.controls.outward.controls.type)),this.form.controls.inward.controls.type.addValidators(()=>this.checkInwardTypeAvailability(this.form.controls.inward.controls.type)),this.makeListenerDisableCondition(),this.makeListenerTypeChanges("outward"),this.makeListenerTypeChanges("inward"),this.makeListenerPassengerQuantityChanges(this.outwardPassengerQuantityChange$,"outward"),this.makeListenerPassengerQuantityChanges(this.inwardPassengerQuantityChange$,"inward"),this.makeListenerFootPaxAllowedChanges(this.outwardFootPaxAllowedChange$,"outward"),this.makeListenerFootPaxAllowedChanges(this.inwardFootPaxAllowedChange$,"inward"),this.makeListenerBicycleAllowedChanges(this.outwardBicycleAllowedChange$,"outward"),this.makeListenerBicycleAllowedChanges(this.inwardBicycleAllowedChange$,"inward"),this.makeListenerIsSameInboundDisableCondition(),this._bookingService.formRestored.pipe(Wi()).subscribe(()=>{this.form.controls.outward.controls.type.setValue(this.form.controls.outward.controls.type.value),this.$isReturnTrip()&&!this.isSameInboundVehicle.value?this.form.controls.inward.controls.type.setValue(this.form.controls.inward.controls.type.value):this.form.controls.inward.controls.type.setValue(null)})}ngAfterViewInit(){this.makeListenerIsReturnTripChanges()}
1static createForm(){return new M({isSameInboundVehicle:new w(!0,{nonNullable:!0}),outward:new M({type:new w(null,L.required),bicycle:yt.createForm(),motorbike:ui.createForm(),car:Mt.createForm()}),inward:new M({type:new w(null,L.required),bicycle:yt.createForm(),motorbike:ui.createForm(),car:Mt.createForm()})})}typeIsBicycle(t){return this.form.get(`${t}.type`)?.value===y.BICYCLE}typeIsMotorbike(t){return this.form.get(`${t}.type`)?.value===y.MOTORBIKE}typeIsVan(t){return this.form.get(`${t}.type`)?.value===y.VAN}typeIsFoot(t){return this.form.get(`${t}.type`)?.value===y.FOOT}getFourWheelsVehicleTypeFromVehicleType(t){return t&&uo(t)?t:null}getPassengerCount(t){return ee.countPassenger(t)}get outwardType(){return this.form.controls.outward.controls.type}get inwardType(){return this.form.controls.inward.controls.type}get outwardCarGroup(){return this.form.controls.outward.controls.car}get inwardCarGroup(){return this.form.controls.inward.controls.car}get isSameInboundVehicle(){return this.form.controls.isSameInboundVehicle}checkOutwardTypeAvailability(t){if(!t.value)return null;let o=this.$outwardVehicleTypes(),a=this.$outwardDisabledVehicleTypes();return!o.includes(t.value)||a?.includes(t.value)?{typeNotAllowed:!0}:null}checkInwardTypeAvailability(t){if(!t.value)return null;let o=this.$inwardVehicleTypes(),a=this.$inwardDisabledVehicleTypes();return!o.includes(t.value)||a?.includes(t.value)?{typeNotAllowed:!0}:null}makeListenerDisableCondition(){this.form.disable({emitEvent:!1}),this._bookingService.formRestored.pipe(St(()=>ie(this.outwardPassengerQuantityChange$,this.inwardPassengerQuantityChange$,this.outwardPassengerDisabilityChange$,this.inwardPassengerDisabilityChange$,this.isReturnTripChange$,this.isSameInboundVehicle.valueChanges)),Ee(()=>[this.$outwardPassengersQuantity()!==null&&this.$outwardPassengersDisability()!==null,this.$inwardPassengersQuantity()!==null&&this.$inwardPassengersDisability()!==null]),S(this._destroyRef)).subscribe(([t,o])=>{t&&(this.form.controls.isSameInboundVehicle.enable({emitEvent:!1}),this.form.controls.outward.controls.type.enable({emitEvent:!1})),this.isSameInboundVehicle.value||!this.$isReturnTrip()?(this.form.controls.inward.controls.type.setValue(null),this.form.controls.inward.disable({emitEvent:!1})):o&&this.form.controls.inward.controls.type.enable({emitEvent:!1}),this._cdr.markForCheck()})}makeListenerIsSameInboundDisableCondition(){this._bookingService.formRestored.pipe(St(()=>ie(this.outwardPassengerQuantityChange$,this.inwardPassengerQuantityChange$,this.outwardPassengerDisabilityChange$,this.inwardPassengerDisabilityChange$,this.isReturnTripChange$,this.outwardType.valueChanges)),S(this._destroyRef)).subscribe(()=>{let t=this.outwardType.value,o=ee.countPassengerWithoutInfants(this.$outwardPassengersQuantity()),a=ee.countPassengerWithoutInfants(this.$inwardPassengersQuantity());t===y.BICYCLE&&o!==a?(this.isSameInboundVehicle.patchValue(!1),this.isSameInboundVehicle.disable()):this.isSameInboundVehicle.enable(),this._cdr.markForCheck()})}makeListenerIsReturnTripChanges(){this.isReturnTripChange$.pipe(S(this._destroyRef),Et()).subscribe(()=>{this.isSameInboundVehicle.patchValue(!0),this.form.controls.inward.reset()})}makeListenerTypeChanges(t){this.form.controls[t].controls.type.valueChanges.pipe(S(this._destroyRef),Hi(),be(([o,a])=>o!==a)).subscribe(([o,a])=>{a&&!ft.includes(a)&&this.form.controls[t].controls.car.disable({emitEvent:!1});let f=this.form.controls[t].controls.car.value.registrationCountry;this.form.controls[t].reset({type:this.form.controls[t].controls.type.value}),f&&this.form.controls[t].controls.car.patchValue({registrationCountry:f},{emitEvent:!1})})}makeListenerPassengerQuantityChanges(t,o){t.pipe(S(this._destroyRef),rn(),be(a=>!!(a&&ee.countPassenger(a)>8&&nn.includes(this.form.controls[o].controls.type.value)))).subscribe(()=>this.form.controls[o].reset())}makeListenerFootPaxAllowedChanges(t,o){t.pipe(S(this._destroyRef),be(a=>!a&&y.FOOT===this.form.controls[o].controls.type.value)).subscribe(()=>this.form.controls[o].reset())}makeListenerBicycleAllowedChanges(t,o){t.pipe(S(this._destroyRef),be(a=>!a&&y.BICYCLE===this.form.controls[o].controls.type.value)).subscribe(()=>this.form.controls[o].reset())}createFunnelVehicle(){let t=J([{constructableSelector:h.STANDARD,constructableType:Yt},{constructableSelector:h.AGENT,constructableType:qt},{constructableSelector:h.PROMO,constructableType:Xt}],this._activatedRoute.snapshot.parent?.parent?.data.funnelType);if(!t)throw new Error("No funnel vehicle found for this funnel type");return t}};i.outwardType="outward.type",i.inwardType="inward.type",i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=I({type:i,selectors:[["dd-vehicle"]],hostAttrs:[1,"albatros","ignore-bf-common-ui"],inputs:{$outwardFootPaxAllowed:[1,"outwardFootPaxAllowed","$outwardFootPaxAllowed"],$inwardFootPaxAllowed:[1,"inwardFootPaxAllowed","$inwardFootPaxAllowed"],$outwardBicycleAllowed:[1,"outwardBicycleAllowed","$outwardBicycleAllowed"],$inwardBicycleAllowed:[1,"inwardBicycleAllowed","$inwardBicycleAllowed"],$outwardPassengersQuantity:[1,"outwardPassengersQuantity","$outwardPassengersQuantity"],$inwardPassengersQuantity:[1,"inwardPassengersQuantity","$inwardPassengersQuantity"],$outwardPassengersDisability:[1,"outwardPassengersDisability","$outwardPassengersDisability"],$inwardPassengersDisability:[1,"inwardPassengersDisability","$inwardPassengersDisability"],$isReturnTrip:[1,"isReturnTrip","$isReturnTrip"],$outwardRoute:[1,"outwardRoute","$outwardRoute"],$inwardRoute:[1,"inwardRoute","$inwardRoute"]},decls:22,vars:20,consts:[[3,"formGroup"],["formGroupName","outward",1,"outbound"],["data-testid","outboundJourneyTitle",1,"vehicle-outbound-title","bf-body-2-semi-bold"],[1,"vehicle-type-select",3,"control","vehicleTypes","disabledVehicleTypes"],["data-testid","fretErrorOutward",3,"label","type"],["data-testid","vehicleOutwardSizeError",3,"label","type"],["data-testid","vanNotificationOutbound","type","warning",1,"van-notification",3,"label"],["data-testid","footNotificationOutbound","type","info","icon","train",1,"foot-notification",3,"label","t
1itle","link"],["formGroupName","bicycle",3,"passengers","type"],["formGroupName","motorbike",3,"passengerCount","type","direction"],[1,"is-same-inbound-trip"],["formGroupName","inward",1,"inward"],["data-testid","inboundJourneyTitle",1,"vehicle-inbound-title","bf-body-2-semi-bold"],["data-testid","fretErrorInward",3,"label","type"],["data-testid","vehicleInwardSizeError",3,"label","type"],["data-testid","vanNotificationInbound","type","warning",1,"van-notification",3,"label"],["data-testid","footNotificationInbound","type","info","icon","train",1,"foot-notification",3,"label","title","link"],["data-testid","vehicle4WheelsOutward","formGroupName","car",3,"type"],["data-testid","isSameInboundVehicle","formControlName","isSameInboundVehicle","color","primary"],["data-testid","vehicle4WheelsInward","formGroupName","car",3,"type"]],template:function(o,a){o&1&&(Be(0,0),c(1,"div",1),g(2,Wr,3,3,"p",2),_(3,"dd-vehicle-type-select",3),g(4,Hr,2,4,"bf-alert",4),g(5,zr,2,8,"bf-alert",5),g(6,Qr,2,3,"bf-alert",6),g(7,jr,5,17,"bf-alert",7)(8,qr,1,2,"dd-vehicle-bicycle",8)(9,Xr,1,3,"dd-vehicle-motorbike",9)(10,Kr,2,2),l(),g(11,Jr,4,3,"div",10),c(12,"div",11),g(13,Zr,3,3,"p",12),g(14,ea,2,4,"bf-alert",13),_(15,"dd-vehicle-type-select",3),g(16,ta,2,8,"bf-alert",14),g(17,ia,2,3,"bf-alert",15),g(18,na,5,17,"bf-alert",16)(19,oa,1,2,"dd-vehicle-bicycle",8)(20,ra,1,3,"dd-vehicle-motorbike",9)(21,sa,2,2),l(),$e()),o&2&&(p("formGroup",a.form),r(2),b(a.$isReturnTrip()&&a.funnelVehicle.isInboundVehicleChangeAllowed?2:-1),r(),p("control",a.outwardType)("vehicleTypes",a.$outwardVehicleTypes())("disabledVehicleTypes",a.$outwardDisabledVehicleTypes()),r(),b(a.outwardCarGroup!=null&&a.outwardCarGroup.hasError("vehicleIsFret")?4:-1),r(),b(a.outwardCarGroup!=null&&a.outwardCarGroup.hasError("vehicleTooHigh")||a.outwardCarGroup!=null&&a.outwardCarGroup.hasError("vehicleTooLong")?5:-1),r(),b(a.typeIsVan("outward")?6:-1),r(),b(a.typeIsFoot("outward")&&!a.funnelVehicle.isBookingPromotion?7:a.typeIsBicycle("outward")?8:a.typeIsMotorbike("outward")?9:10),r(4),b(a.$isReturnTrip()&&a.funnelVehicle.isInboundVehicleChangeAllowed?11:-1),r(),ye("h-inward",a.isSameInboundVehicle.value),r(),b(a.$isReturnTrip()&&a.funnelVehicle.isInboundVehicleChangeAllowed?13:-1),r(),b(a.inwardCarGroup!=null&&a.inwardCarGroup.hasError("vehicleIsFret")?14:-1),r(),p("control",a.inwardType)("vehicleTypes",a.$inwardVehicleTypes())("disabledVehicleTypes",a.$inwardDisabledVehicleTypes()),r(),b(a.inwardCarGroup!=null&&a.inwardCarGroup.hasError("vehicleTooHigh")||a.inwardCarGroup!=null&&a.inwardCarGroup.hasError("vehicleTooLong")?16:-1),r(),b(a.typeIsVan("inward")?17:-1),r(),b(a.typeIsFoot("inward")?18:a.typeIsBicycle("inward")?19:a.typeIsMotorbike("inward")?20:21))},dependencies:[D,F,E,V,ae,gt,_o,ue,yt,ui,bo,le,R,At],styles:["[_nghost-%COMP%] .bf-alert[_ngcontent-%COMP%]{width:100%}@media(min-width:600px){[_nghost-%COMP%] .bf-alert[_ngcontent-%COMP%]{max-width:600px}}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .vehicle-outbound-title[_ngcontent-%COMP%], [_nghost-%COMP%] .vehicle-inbound-title[_ngcontent-%COMP%]{color:#64748b}[_nghost-%COMP%] .h-inward[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%] .outbound[_ngcontent-%COMP%]{margin-top:24px;display:flex;flex-direction:column;gap:16px}[_nghost-%COMP%] .inward[_ngcontent-%COMP%]{padding-top:24px;border-top:1px solid #cbd5e1;display:flex;flex-direction:column;gap:16px}[_nghost-%COMP%] .is-same-inbound-trip[_ngcontent-%COMP%]{margin:24px 0}"],changeDetection:0});let e=i;return e})();var nt=class extends K{constructor(){super(...arguments),this.context=h.STANDARD}get submitButtonI18n(){return"booking.trip.submit"}get offerCode(){}get canBeOneWayTrip(){return!0}get canBeReturnTrip(){return!0}get isSameRouteOnBothWayForced(){return!1}get maxHoursOnshore(){return 0}isInboundPassengerChangeAllowed(){return!0}get isPetsAllowed(){return!0}getOutWardRoutes(i){return i.getRoutes("outward")}getInWardRoutes(i,n){return i.getRoutes("inward",n)}get isBookingPromotion(){return!1}};var gi=class extends nt{constructor(){super(...arguments),this.context=h.AGENT}get submitButtonI18n(){return"booking.agent.next"}};var bi=class extends nt{constructor(){super(),this.context=h.PROMO,this._funnelRulesStateService=m(me),this._funnelRules=this._funnelRulesStateService.funnelRules()}get offerCode(){return this._funnelRules?.offerCode}get canBeOneWayTrip(){return!!this._funnelRules?.selectTrip?.crossingWay?.includes(Oi.ONE_WAY)}get canBeReturnTrip(){return!!this._funnelRules?.selectTrip?.crossingWay?.includes(Oi.RETURN_TRIP)}get isSameRouteOnBothWayForced(){return!!this._funnelRules?.selectTrip?.routes?.isSameRouteOnBothWayForced}get maxHoursOnshore(){return this._funnelRules?.selectTrip?.dates?.maxHoursOnshore??0}isInboundPassengerChangeAllowed(){return!this._funnelRules?.selectTrip?.passengers?.isSamePassengersOnBothWayForced}get isPetsAllowed(){return!!this._funnelRules?.selectTrip?.isPetsAllowed}getOutWardRoutes(i){return i.getRoutes("outward",void 0,this._funnelRules.offerCode)}getInWardRoutes(i,n){return i.getRoutes("inward",n,this._funnelRules.offerCode)}get isBookingPromotion(){return this._funnelRules?.rulesType===_t.PROMO}};var Ci=class extends nt{constructor(){super(...arguments),this.context=h.STANDARD}};var Po=()=>[],So=(e,i)=>({departure:e,arrival:i}),la=e=>({deadline:e});function ca(e,i){e&1&&_(0,"dd-login-club-voyage",0)}function da(e,i){e&1&&Ot(0,ca,1,0,"dd-login-club-voyage",6)}function pa(e,i){e&1&&(_(0,"dd-ship-loader",3),s(1,"transloco")),e&2&&p("message",d(1,1,"booking.loadingBooking"))}function ua(e,i){e&1&&(c(0,"div",4),_(1,"dd-error-message",7),s(2,"transloco"),s(3,"transloco"),l()),e&2&&(r(),p("title",d(2,3,"core.error.booking.title"))("message",d(3,5,"core.error.booking.message"))("tryAgainVisible",!1))}function ma(e,i){e&1&&(c(0,"mat-radio-button",31),u(1),s(2,"transloco"),l()),e&2&&(p("value",!0),r(),T(d(2,2,"booking.trip.returnTrip")))}function ha(e,i){e&1&&(c(0,"mat-radio-button",32),u(1),s(2,"transloco"),l()),e&2&&(p("value",!1),r(),C(" ",d(2,2,"booking.trip.oneWay")," "))}function fa(e,i){if(e&1&&(c(0,"div",9)(1,"mat-radio-group",30),s(2,"transloco"),g(3,ma,3,4,"mat-radio-button",31),g(4,ha,3,4,"mat-radio-button",32),l()()),e&2){let n=v(2);r(),fe("aria-label",d(2,3,"booking.trip.isReturnTrip")),r(2),b(n.funnelBookingTripChoose.canBeReturnTrip?3:-1),r(),b(n.funnelBookingTripChoose.canBeOneWayTrip?4:-1)}}function ga(e,i){e&1&&(c(0,"span"),u(1),s(2,"transloco"),l()),e&2&&(r(),C(" ",d(2,1,"home.widget.outwardRoute")," "))}function ba(e,i){e&1&&(c(0,"mat-icon",33),u(1,"arrow_right_alt"),l())}function Ca(e,i){e&1&&(c(0,"mat-icon",34),u(1,"sync_alt"),l())}function _a(e,i){if(e&1&&(u(0),s(1,"capitalize"),g(2,ba,2,0,"mat-icon",33),g(3,Ca,2,0,"mat-icon",34),u(4),s(5,"capitalize")),e&2){let n=v(2);C(" ",d(1,4,n.form.controls.outwardRoute.value.departure.name)," "),r(2),b(!n.isReturnTrip.value||!n.funnelBookingTripChoose.isSameRouteOnBothWayForced?2:-1),r(),b(n.isReturnTrip.value&&n.funnelBookingTripChoose.isSameRouteOnBothWayForced?3:-1),r(),C(" ",d(5,6,n.form.controls.outwardRoute.value.arrival.name)," ")}}function va(e,i){if(e&1&&(we(0),s(1,"transloco"),we(2),s(3,"transloco"),_(4,"bf-alert",35),s(5,"transloco"),_(6,"br")),e&2){let n=v(2),t=d(1,1,`core.port.${n.outwardRoute.value==null||n.outwardRoute.value.departure==null?null:n.outwardRoute.value.departure.code}`),o=d(3,3,`core.port.${n.outwardRoute.value==null||n.outwardRoute.value.arrival==null?null:n.outwardRoute.value.arrival.code}`);r(4),p("label",j(5,5,"journeyPlanner.alert.uncertainDates",Ue(8,So,t,o)))}}function ya(e,i){if(e&1&&(c(0,"span",13),u(1),s(2,"capitalize"),c(3,"mat-icon"),u(4,"arrow_right_alt"),l(),u(5),s(6,"capitalize"),l()),e&2){let n=v(3);r(),C(" ",d(2,2,n.form.controls.inwardRoute.value.departure.name)," "),r(4),C(" ",d(6,4,n.form.controls.inwardRoute.value.arrival.name)," ")}}function wa(e,i){if(e&1&&(we(0),s(1,"transloco"),we(2),s(3,"transloco"),_(4,"bf-alert",35),s(5,"transloco"),_(6,"br")),e&2){let n=v(3),t=d(1,1,`core.port.${n.inwardRoute.value==null||n.inwardRoute.value.departure==null?null:n.inwardRoute.value.departure.code}`),o=d(3,3,`core.port.${n.inwardRoute.value==null||n.inwardRoute.value.arrival==null?null:n.inwardRoute.value.arrival.code}`);r(4),p("label",j(5,5,"journeyPlanner.alert.uncertainDates",Ue(8,So,t,o)))}}function xa(e,i){if(e&1){let n=G();c(0,"mat-form-field")(1,"bf-responsive-select",36),s(2,"transloco"),s(3,"transloco"),g(4,ya,7,6,"span",13),c(5,"dd-route-select",37),s(6,"async"),O("valueChange",function(o){A(n);let a=v(2);return N(a.form.controls.inwardRoute.setValue(o??null))}),l()()(),g(7,wa,7,11)}if(e&2){let n=v(2);r(),p("label",d(2,7,"home.widget.inwardRoute"))("placeholder",d(3,9,"home.widget.inwardRoute"))("closeOnSelect",!0),r(3),b(n.form.controls.inwardRoute.value?4:-1),r(),p("value",n.form.controls.inwardRoute.value)("routesByCountries",d(6,11,n.inwardRoutesByCountries$)??vi(13,Po)),r(2),b(n.isInwardUncertainRoute?7:-1)}}function Pa(e,i){e&1&&(c(0,"div")(1,"mat-checkbox",38),u(2),s(3,"transloco"),l()()),e&2&&(r(2),C(" ",d(3,1,"booking.trip.route.sameInboundPort")," "))}function Sa(e,i){e&1&&(_(0,"bf-alert",20),s(1,"transloco")),e&2&&p("label",d(1,1,"booking.trip.date.promo.maxHoursOnshore.message"))}function Oa(e,i){e&1&&(_(0,"bf-alert",21),s(1,"transloco")),e&2&&p("label",d(1,1,"booking.trip.date.promo.maxHoursOnshore.error"))}function Ma(e,i){if(e&1&&(c(0,"div",22)(1,"h3")(2,"mat-icon"),u(3,"info"),l(),u(4),s(5,"transloco"),l(),c(6,"p"),u(7),s(8,"bfDate"),s(9,"transloco"),c(10,"a",39),s(11,"bfLocalizedLink"),u(12),s(13,"transloco"),l()()()),e&2){let n=v(2);r(4),C(" ",d(5,4,"booking.trip.date.dateInfo.title")," "),r(3),C(" ",j(9,8,"booking.trip.date.dateInfo.message",pe(15,la,d(8,6,n.deadLineAmendDate.subtract(1,"days"))))," "),r(3),p("routerLink",d(11,11,n.termAndConditionsLocalizedLinks)),r(2),C(" ",d(13,13,"booking.trip.date.dateInfo.link")," ")}}function Ta(e,i){if(e&1&&(c(0,"div",26)(1,"div",11)(2,"mat-icon"),s(3,"transloco"),u(4,"pets"),l(),c(5,"h4"),u(6),s(7,"transloco"),l(),c(8,"span",40),u(9),s(10,"transloco"),l()(),_(11,"dd-pets",41),l()),e&2){let n=v(2);r(2),fe("aria-label",d(3,4,"booking.trip.pets.title")),r(4),T(d(7,6,"booking.trip.pets.title")),r(3),T(d(10,8,"booking.trip.pets.helper")),r(2),p("formGroup",n.form)}}function Ia(e,i){e&1&&(_(0,"bf-alert",27),s(1,"transloco")),e&2&&p("label",d(1,1,"booking.allFieldMandatory"))}function Ra(e,i){if(e&1){let n=G();c(0,"div",5)(1,"form",8),O("ngSubmit",function(){A(n);let o=v();return N(o.onSubmit())}),g(2,fa,5,5,"div",9),c(3,"div",10)(4,"div",11)(5,"mat-icon"),s(6,"transloco"),u(7,"support"),l(),c(8,"h4"),u(9),s(10,"transloco"),l()(),c(11,"mat-form-field")(12,"bf-responsive-select",12),s(13,"transloco"),s(14,"transloco"),c(15,"span",13),g(16,ga,3,3,"span")(17,_a,6,8),l(),c(18,"dd-route-select",14),s(19,"async"),O("valueChange",function(o){A(n);let a=v();return N(a.selectOutwardRoute(o))}),l()()(),g(20,va,7,11),g(21,xa,8,14),g(22,Pa,4,3,"div"),l(),c(23,"div",15)(24,"div",11)(25,"mat-icon"),s(26,"transloco"),u(27,"calendar_today"),l(),c(28,"h4"),u(29),s(30,"transloco"),l()(),c(31,"div",16)(32,"div",17),_(33,"dd-booking-dates",18),c(34,"div",19),g(35,Sa,2,3,"bf-alert",20),g(36,Oa,2,3,"bf-alert",21),l()(),g(37,Ma,14,17,"div",22),l()(),c(38,"div",23)(39,"div",11)(40,"mat-icon"),s(41,"transloco"),u(42,"account_circle"),l(),c(43,"h4"),u(44),s(45,"transloco"),l()(),_(46,"dd-passengers"),l(),c(47,"div",24)(48,"div",11)(49,"mat-icon"),s(50,"transloco"),u(51,"directions_car"),l(),c(52,"h4"),u(53),s(54,"transloco"),l()(),_(55,"dd-vehicle",25),l(),g(56,Ta,
112,10,"div",26),g(57,Ia,2,3,"bf-alert",27),c(58,"div",28)(59,"button",29),u(60),s(61,"transloco"),l()()()()}if(e&2){let n=v();r(),p("formGroup",n.form),r(),b(n.metaData!=null&&n.metaData.isInCreatingMode?2:-1),r(3),fe("aria-label",d(6,49,"booking.trip.route.title")),r(4),T(d(10,51,"booking.trip.route.title")),r(3),p("label",d(13,53,"home.widget.outwardRoute"))("placeholder",d(14,55,"home.widget.outwardRoute"))("closeOnSelect",!0),r(4),b(n.form.controls.outwardRoute.value?17:16),r(2),p("value",n.form.controls.outwardRoute.value)("routesByCountries",d(19,57,n.outwardRoutesByCountries$)??vi(73,Po))("isReturnTrip",n.isReturnTrip.value)("isSameRouteOnBothWayForced",n.funnelBookingTripChoose.isSameRouteOnBothWayForced)("showChannelIslandsUKRoutes",!1)("showChannelIslandsFranceRoutes",!1)("showCondorRoutes",!1),r(2),b(n.isOutwardUncertainRoute?20:-1),r(),b(n.isInwardRouteVisible?21:-1),r(),b(n.isReturnTrip.value&&!n.funnelBookingTripChoose.isSameRouteOnBothWayForced?22:-1),r(3),fe("aria-label",d(26,59,"booking.trip.date.title")),r(4),T(d(30,61,"booking.trip.date.title")),r(4),p("context",n.funnelBookingTripChoose.context)("isReturnTrip",n.form.controls.isReturnTrip.value)("outwardRouteFormControl",n.outwardRoute)("inwardRouteFormControl",n.inwardRoute)("deadLineAmendDate",n.deadLineAmendDate)("offerCode",n.funnelBookingTripChoose.offerCode)("maxHoursOnshore",n.funnelBookingTripChoose.maxHoursOnshore),r(2),b(n.funnelBookingTripChoose.maxHoursOnshore>0?35:-1),r(),b(n.hasDateErrors?36:-1),r(),b(n.deadLineAmendDate&&!n.isAgent?37:-1),r(3),fe("aria-label",d(41,63,"booking.trip.passengers.title")),r(4),T(d(45,65,"booking.trip.passengers.title")),r(5),fe("aria-label",d(50,67,"booking.trip.vehicle.title")),r(4),T(d(54,69,"booking.trip.vehicle.title")),r(2),p("formGroup",n.form.controls.vehicle)("outwardPassengersQuantity",n.outwardPassengersQuantity.value?n.outwardPassengersQuantity.value:null)("inwardPassengersQuantity",n.inwardPassengersQuantity.value?n.inwardPassengersQuantity.value:null)("outwardPassengersDisability",n.outwardPassengersDisability)("inwardPassengersDisability",n.inwardPassengersDisability)("outwardFootPaxAllowed",n.form.controls.outwardFootPaxAllowed.value)("inwardFootPaxAllowed",n.form.controls.inwardFootPaxAllowed.value)("outwardBicycleAllowed",n.form.controls.outwardBicycleAllowed.value)("inwardBicycleAllowed",n.form.controls.inwardBicycleAllowed.value)("isReturnTrip",n.form.controls.isReturnTrip.value)("inwardRoute",n.inwardRoute.value)("outwardRoute",n.outwardRoute.value),r(),b(n.funnelBookingTripChoose.isPetsAllowed?56:-1),r(),b(n.triedToValidate&&n.form.invalid?57:-1),r(3),C(" ",d(61,71,n.submitButtonI18n)," ")}}var Pt=class Pt extends An{constructor(){super(Te.SELECT_TRIP),this._routesService=m(In),this._bookingEditService=m(kn),this._bookingAnalyticsService=m(Sn),this._reactiveFormService=m(En),this._alertManagerService=m(vn),this._cd=m(ne),this._bookingCartService=m(Fn),this._accountService=m(Nt),this._environmentInjector=m(H),this.termAndConditionsLocalizedLinks=wn.termAndConditions,this.$isErrorDisplayed=Ve(!1),this.$isLoading=Ve(!1),this.triedToValidate=!1,this.sponsorNumber="",this.isAgent=!1,this.triedToValidate=!1,this.form=new M(Z(Z(Z({isReturnTrip:new w(!0,{nonNullable:!0}),outwardRoute:new w(null,L.required),inwardRoute:new w(null,this.inwardRouteRequiredIfVisible.bind(this)),isSameInboundPort:new w({value:!0,disabled:!0},{nonNullable:!0}),outwardFootPaxAllowed:new w(!0,{nonNullable:!0}),inwardFootPaxAllowed:new w(!0,{nonNullable:!0}),outwardBicycleAllowed:new w(!0,{nonNullable:!0}),inwardBicycleAllowed:new w(!0,{nonNullable:!0}),infantsPassengers:new w(!1,{nonNullable:!0}),outwardDate:new w(null,L.required),inwardDate:new w(null,se.requiredIf(i=>i.get("isReturnTrip")?.value)),vehicle:Ai.createForm()},yt.createForm().controls),Ri.createForm().controls),Ei.createForm().controls))}ngOnInit(){super.ngOnInit(),this.funnelBookingTripChoose=z(this._environmentInjector,()=>this.createFunnelBookingTripChoose()),this.outwardRoutesByCountries$=this.funnelBookingTripChoose?.getOutWardRoutes(this._routesService),this.inwardRoutesByCountries$=ie(this.outwardRoute.valueChanges,this.bookingService.formRestored).pipe(Ee(()=>this.outwardRoute.value),be(i=>!!i),_i(i=>this.funnelBookingTripChoose?.getInWardRoutes(this._routesService,i).pipe(Ee(n=>n.filter(t=>
1t.departureCountry!==wi.iso2ToIso3(i?.departure?.countryISO))))),ji(()=>{this.inwardRoute.value&&this.outwardRoute.value&&this.inwardRoute.value.departure.countryISO===this.outwardRoute.value.departure.countryISO&&this.inwardRoute.patchValue(null)})),this.sponsorNumber=this.activatedRoute.snapshot.queryParams.sponsorNumber,this.form.addValidators(ct.validVehicleQuantity()),this._accountService.user$.pipe(S(this.destroyRef)).subscribe(i=>{this.isAgent=i?.isAgent()??!1}),this.isInEditingMode&&this.initEditingMode(),this.watchReturnTripState(),this.watchIsSameInboundPort(),this.toggleIsSameInboundPortDisabledState(),this.watchOutboundRoute(),this.watchInBoundRoute(),this._alertManagerService.resetCV2Dialogs()}ngAfterViewInit(){super.ngAfterViewInit(),this.initFormFromQueryParams(),this.isInEditingMode||this.setMetaDataDirection()}get isOutwardUncertainRoute(){let i=this.outwardRoute.value,n=this.form.controls.outwardDate?.value;return!i||!n?!1:Ti(i.departure.code,i.arrival.code,n)}get isInwardUncertainRoute(){let i=this.inwardRoute.value,n=this.form.controls.inwardDate?.value;return!i||!n?!1:Ti(i.departure.code,i.arrival.code,n)}get isInwardRouteVisible(){return!this.isSameInboundPort.value&&this.isReturnTrip.value}get hasDateErrors(){return!!(this.form.controls.inwardDate?.dirty&&(this.form.controls.inwardDate.errors??this.form.controls.outwardDate.errors))}get isLoginClubVoyageVisible(){return this.funnelBookingTripChoose?.context!==h.AGENT&&(!this.isInEditingMode||!!this.sponsorNumber)}get submitButtonI18n(){return this.funnelBookingTripChoose?.submitButtonI18n??""}get submitButtonStyle(){return"flat"}get submitButtonState(){return"enabled"}onSubmit(){if(this.form.markAllAsDirty(),this.form.valid&&this.metaData){if(this._bookingAnalyticsService.setSelectTripData(On.getBookingTypeAnalyticsFromFunnelType(this.funnelBookingTripChoose?.context),this.metaData.mode,this.funnelBookingTripChoose?.offerCode),!this.form.controls.outwardPassengersQuantity.value?.infantsPassengers){let i=this.bookingService.getStep(Te.YOUR_COMFORT);i&&this.bookingService.updateStep(Te.YOUR_COMFORT,i)}if(this.isReturnTrip.value&&this.form.controls.isSameInboundPassengers.value&&!this.form.controls.outwardPassengersQuantity.value?.infantsPassengers||!this.form.controls.isSameInboundPassengers.value&&!this.form.controls.inwardPassengersQuantity.value?.infantsPassengers){let i=this.bookingService.getStep(Te.YOUR_COMFORT_INBOUND);i&&this.bookingService.updateStep(Te.YOUR_COMFORT_INBOUND,i)}this.router.navigate(this.navigateUrl,{queryParamsHandling:"preserve"})}else this.triedToValidate=!0,this._reactiveFormService.touchFormAndScrollToError(this.form,".ng-invalid[formControlName]:not(.membership-number-input)")}get isReturnTrip(){return this.form.controls.isReturnTrip}get outwardRoute(){return this.form.controls.outwardRoute}get inwardRoute(){return this.form.controls.inwardRoute}get isSameInboundPort(){return this.form.controls.isSameInboundPort}get outwardPassengersQuantity(){return this.form.controls.outwardPassengersQuantity}get inwardPassengersQuantity(){return this.form.controls.isSameInboundPassengers?.value?this.form.controls.outwardPassengersQuantity:this.form.controls.inwardPassengersQuantity}get outwardPassengersDisability(){return this.form.controls.outwardPassengersDisability}get inwardPassengersDisability(){return this.form.controls.isSameInboundPassengers?.value?this.form.controls.outwardPassengersDisability:this.form.controls.inwardPassengersDisability}selectOutwardRoute(i){this.form.controls.outwardRoute.setValue(i??null)}get navigateUrl(){return Vn.buildFunnelRoute(this.activatedRoute.snapshot,["choose-crossing",oe.OUTBOUND])}initEditingMode(){if(this.$isLoading.set(!0),!this.metaData){this.$isLoading.set(!1),this.$isErrorDisplayed.set(!0);return}this._bookingEditService.init(this.metaData.bookingReference??"",this.metaData.direction,this.funnelBookingTripChoose?.offerCode).pipe(Ui(i=>(this.$isLoading.set(!1),this.$isErrorDisplayed.set(!0),this._cd.detectChanges(),Li(()=>i))),_i(([i,n])=>this._bookingCartService.refreshCartFromNetworkIsLoading$.pipe(zi(1),Et(),Ee(()=>[i,n]))),S(this.destroyRef)).subscribe(i=>
1{let[n,t]=i;this.metaData&&this.metaData.direction===oe.INBOUND&&(this.outwardRoutesByCountries$=this._routesService.getRoutes("inward",new Si({departure:new Pi({code:t.outbound.departPortCode}),arrival:new Pi({code:t.outbound.arrivalPortCode})})).pipe(Ee(f=>f.filter(P=>P.departureCountry!==wi.iso2ToIso3(t.outbound.departCountryISO))))),this.activatedRoute.snapshot.queryParamMap.get("cleanCarRegistrationNumbers")==="true"&&(n.vehicle.outward.car=new Mi({extras:n.vehicle.outward.car.extras}),n.vehicle.inward.car=new Mi({extras:n.vehicle.inward.car.extras})),this.deadLineAmendDate=t.deadLineAmendDate,this.$isLoading.set(!1),this.$isErrorDisplayed.set(!1),this._cd.detectChanges(),this.form.patchValue(n,{emitEvent:!1}),this.bookingService.formRestored.next(n)})}initFormFromQueryParams(){let i=this.activatedRoute.snapshot.queryParamMap,n=i.get("departureCode");if(n){let t={outwardRoute:new Si({departure:{code:n,name:i.get("departurePort")??void 0},arrival:{code:i.get("arrivalCode")??void 0,name:i.get("arrivalPort")??void 0}}),outwardDate:(0,xo.default)(Number.parseInt(i.get("date")??"0",10))};this._cd.detectChanges(),this.form.patchValue(t,{emitEvent:!1}),this.bookingService.formRestored.next(this.form.getRawValue())}}watchReturnTripState(){this.isReturnTrip.valueChanges.pipe(S(this.destroyRef)).subscribe(i=>{i||this.form.patchValue({inwardRoute:null,isSameInboundPort:!0}),this.setMetaDataDirection()})}watchIsSameInboundPort(){this.isSameInboundPort.valueChanges.pipe(S(this.destroyRef)).subscribe(i=>{i&&this.inwardRoute.patchValue(null)})}toggleIsSameInboundPortDisabledState(){ie(this.bookingService.formRestored,this.outwardRoute.valueChanges).pipe(S(this.destroyRef)).subscribe(()=>{this.outwardRoute.value&&!this.funnelBookingTripChoose?.isSameRouteOnBothWayForced?this.isSameInboundPort.enable({emitEvent:!1}):this.isSameInboundPort.disable({emitEvent:!1})})}watchOutboundRoute(){this.outwardRoute.valueChanges.pipe(S(this.destroyRef)).subscribe(()=>{this.bookingService.removeStep(Te.CHOOSE_CROSSING),this.bookingService.removeComfortAndExtrasStepForDirection(oe.OUTBOUND),this._bookingCartService.removeDirectionFromCart(oe.OUTBOUND),this.isSameInboundPort.value&&(this.bookingService.removeStep(Te.CHOOSE_CROSSING_INBOUND),this.bookingService.removeComfortAndExtrasStepForDirection(oe.INBOUND),this._bookingCartService.removeDirectionFromCart(oe.INBOUND))})}watchInBoundRoute(){this.inwardRoute.valueChanges.pipe(S(this.destroyRef)).subscribe(()=>{this.bookingService.removeStep(Te.CHOOSE_CROSSING_INBOUND),this.bookingService.removeComfortAndExtrasStepForDirection(oe.INBOUND),this._bookingCartService.removeDirectionFromCart(oe.INBOUND)})}inwardRouteRequiredIfVisible(i){return!i.parent||!this.isInwardRouteVisible||i.value?null:{required:!0}}setMetaDataDirection(){let i=this.bookingMetaDataService.getMetaData();i&&(i.direction=this.isReturnTrip.value?oe.BOTH:oe.OUTBOUND,this.bookingMetaDataService.saveMetaData(i))}createFunnelBookingTripChoose(){let i=J([{constructableSelector:h.STANDARD,constructableType:Ci},{constructableSelector:h.AGENT,constructableType:gi},{constructableSelector:h.PROMO,constructableType:bi}],this.activatedRoute.snapshot.parent?.parent?.data.funnelType);if(!i)throw new Error("No funnelBookingTripChoose found for this funnel type");return i}};Pt.\u0275fac=function(n){return new(n||Pt)},Pt.\u0275cmp=I({type:Pt,selectors:[["dd-booking-trip-choose-page"]],hostAttrs:[1,"albatros","ignore-bf-common-ui"],features:[Tt],decls:8,vars:7,consts:[["data-testid","loginClubVoyage"],[1,"step"],[1,"bf-title-3"],["data-testid","shipLoader",1,"loader",3,"message"],["data-testid","errorMessage",1,"error-wrapper"],["data-testid","content",1,"content"],["data-testid","loginClubVoyage",4,"ddIfIsCustomerOrNotLogin"],["theme","grey",3,"title","message","tryAgainVisible"],[3,"ngSubmit","formGroup"],["data-testid","isInCreatingMode",1,"form-field-area","return-trip"],[1,"form-field-area","route-field-area"],[1,"form-field-area-title"],["data-testid","outwardRoute","formControlName","outwardRoute",3,"label","placeholder","closeOnSelect"],["display-value","",1,"route-display"],["direction","outward",3,"valueChange","value","routesByCountries","isReturnTrip","isSameRouteOnBothWayForced","showChannelIslandsUKRoutes","showChannelIslandsFranceRoutes","showCondorRoutes"],[1,"form-field-area"],[1,"date-content"],[1,"date-content-input"],[3,"context","isReturnTrip","outwardRouteFormControl","inwardRouteFormControl","deadLineAmendDate","offerCode","maxHoursOnshore"],[1,"date-notification"],["data-testid","maxHoursOnshoreMessage","type","info",3,"label"],["data-testid","maxHoursOnshoreError","type","warning",3,"label"],["data-testid","deadLineAmendDateMessage",1,"information-message"],[1,"form-field-area","passenger-field-area"],[1,"form-field-area","vehicle-field-area"],[3,"formGroup","outwardPassengersQuantity","inwardPassengersQuantity","outwardPassengersDisability","inwardPassengersDisability","outwardFootPaxAllowed","inwardFootPaxAllowed","outwardBicycleAllowed","inwardBicycleAllowed","isReturnTrip","inwardRoute","outwardRoute"],["data-testid","pets",1,"form-field-area","pets-field-area"],["data-testid","allFieldsAreMandatoryError","type","error","data-error-code","101",1,"bottom-error",3,"label"],[1,"actions-container"],["mat-flat-button","","data-testid","submit","type","submit"],["data-testid","isReturnTrip","formControlName","isReturnTrip","color","primary"],["data-testid","canBeReturnTrip",3,"value"],["data-testid","canBeOneWayTrip",3,"value"],["data-testid","iconOneWayTrip"],["data-testid","iconSameRouteOnBothWayForced"],["icon","info","type","warning",3,"label"],["data-testid","inwardRoute","formControlName","inwardRoute",3,"label","placeholder","closeOnSelect"],["direction","inward",3,"valueChange","value","routesByCountries"],["data-testid","isSameInboundPort","formControlName","isSameInboundPort","color","primary"],["target","_blank","rel","noreferrer noopener",3,"routerLink"],[1,"helper-label"],[3,"formGroup"]],template:function(n,t){n&1&&(g(0,da,1,0,"dd-login-club-voyage",0),c(1,"div",1)(2,"h3",2),u(3),s(4,"transloco"),l(),g(5,pa,2,3,"dd-ship-loader",3),g(6,ua,4,7,"div",4),g(7,Ra,62,74,"div",5),l()),n&2&&(b(t.isLoginClubVoyageVisible?0:-1),r(3),T(d(4,5,"booking.trip.title")),r(2),b(t.$isLoading()?5:-1),r(),b(t.$isErrorDisplayed()?6:-1),r(),b(!t.$isLoading()&&!t.$isErrorDisplayed()?7:-1))},dependencies:[Hn,zn,X,Nn,Bn,D,Pe,F,E,V,ae,Rn,Dn,Y,Tn,le,Mn,ue,Zi,Ri,Ai,Ei,re,De,Ji,pn,At,R,dn],styles:[".step[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0}.step[_ngcontent-%COMP%] .bf-title-3[_ngcontent-%COMP%]{color:#23308e;margin-bottom:32px}.step[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0}.booking[_ngcontent-%COMP%] .dd-booking-step[_ngcontent-%COMP%]{display:block;letter-spacing:1.5px}.booking[_ngcontent-%COMP%] .dd-booking-step[_ngcontent-%COMP%]:not(:last-child){margin-bottom:10px}.actions-container[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:32px 0;width:100%}.actions-container[_ngcontent-%COMP%] .mat-mdc-unelevated-button[_ngcontent-%COMP%]{width:100%;max-width:400px}.loader[_ngcontent-%COMP%] svg{border-radius:0 0 4px 4px}.error-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:10px 0 20px}.form-field-area[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:32px 0}.form-field-area[_ngcontent-%COMP%]:not(.pets-field-area){border-bottom:1px solid #cbd5e1}.form-field-area[_ngcontent-%COMP%]:first-of-type{padding-top:0}.form-field-area[_ngcontent-%COMP%] .form-field-area-title[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:12px}.form-field-area[_ngcontent-%COMP%] .form-field-area-title[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:1.25rem;min-width:1.25rem;height:1.25rem;line-height:1.25rem;font-size:1.25rem;display:inline-flex;align-items:center;justify-content:center;margin-right:12px}.form-field-area[_ngcontent-%COMP%] .form-field-area-title[_ngcontent-%COMP%] h4[_ng
1content-%COMP%]{margin:0;color:#23308e;font-size:1rem;font-weight:500}.form-field-area[_ngcontent-%COMP%] .form-field-area-title[_ngcontent-%COMP%] .helper-label[_ngcontent-%COMP%]{margin-left:10px;font-size:.8125rem}.form-field-area.return-trip[_ngcontent-%COMP%] > .mat-mdc-radio-group[_ngcontent-%COMP%]{display:flex;gap:24px}.form-field-area[_ngcontent-%COMP%] dd-booking-dates[_ngcontent-%COMP%], .form-field-area[_ngcontent-%COMP%] .mat-mdc-form-field{width:100%}@media(min-width:600px){.form-field-area[_ngcontent-%COMP%] dd-booking-dates[_ngcontent-%COMP%], .form-field-area[_ngcontent-%COMP%] .mat-mdc-form-field{max-width:600px}}.date-notification[_ngcontent-%COMP%]{margin-top:24px}@media(min-width:600px){.date-notification[_ngcontent-%COMP%]{margin-top:32px}}.date-notification[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(:first-child){margin-top:10px}.agent[_nghost-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.agent[_nghost-%COMP%] form[_ngcontent-%COMP%] .form-field-area[_ngcontent-%COMP%]{width:50%;padding:15px}.agent[_nghost-%COMP%] form[_ngcontent-%COMP%] .return-trip[_ngcontent-%COMP%], .agent[_nghost-%COMP%] form[_ngcontent-%COMP%] .pets-field-area[_ngcontent-%COMP%]{width:100%}.route-field-area[_ngcontent-%COMP%] .route-display[display-value][_ngcontent-%COMP%]{display:flex;align-items:center;color:#23308e;font-size:.875rem}.route-field-area[_ngcontent-%COMP%] .route-display[display-value][_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:1rem;min-width:1rem;height:1rem;line-height:1rem;font-size:1rem;display:inline-flex;align-items:center;justify-content:center;margin:0 10px}.bottom-error[_ngcontent-%COMP%]{margin:24px 0}.date-content[_ngcontent-%COMP%]{display:flex;width:100%;flex-wrap:wrap;column-gap:24px;row-gap:12px}.date-content[_ngcontent-%COMP%] .date-content-input[_ngcontent-%COMP%]{width:100%;max-width:600px}.information-message[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .information-message h3{display:flex;color:#23308e;font-size:.875rem;line-height:24px;margin:0;font-weight:500}.information-message[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .information-message h3 .mat-icon{margin-right:10px;width:1.25rem;min-width:1.25rem;height:1.25rem;line-height:1.25rem;font-size:1.25rem;display:inline-flex;align-items:center;justify-content:center;color:#23308e}.information-message[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .information-message p{font-size:.875rem;line-height:24px;margin:0}"],changeDetection:0});var Ni=Pt;$i([on()],Ni.prototype,"setMetaDataDirection",null);export{Ni as BookingTripChoosePageComponent};
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.