1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,247563,246723,702822,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(948148),a=e.i(730911),i=e.i(321081),n=e.i(172002),o=e.i(997560),l=e.i(782327),c=e.i(950951),u=e.i(702915),d=e.i(12872),p=e.i(748346),h=e.i(964166),g=e.i(998182),m=e.i(182283),T=e.i(625657);let f={type:h.AUTOCOMPLETE_TYPES.GEOLOC,name:"",value:null},A=e=>{let{placeholder:A,placeholderExample:_=null,defaultValue:S=null,action:y,icon:R=null,taggingAction:E,fieldType:x="departure"}=e,b=(0,s.useTranslations)(),N=(0,a.useAppDispatch)(),{data:v}=(0,g.useMyFavorites)(),[I,O]=(0,r.useState)(""),[j,P]=(0,r.useState)([]),[D,w]=(0,r.useState)(0),[C,M]=(0,r.useState)(!1),[k,L]=(0,r.useState)(!0),[U,Y]=(0,r.useState)(!1),[$,B]=(0,r.useState)(null),[H,G]=(0,r.useState)([]);(0,r.useEffect)(()=>{G((0,u.getRecentEntities)(c.ENTITY_PARAM.ADDRESS))},[]),(0,r.useEffect)(()=>{P([f,...H])},[H]),(0,r.useEffect)(()=>{O(S||""),Y(!!S)},[S]);let F=async t=>{try{let r;e.geolocation&&e.geolocation.latitude&&e.geolocation.longitude?(r=await (0,d.fetchWithTimeout)(`${o.ROUTES_SEARCH_URL}?query=${t}&from=${e.geolocation.latitude},${e.geolocation.longitude}`,5e3),console.log(`${o.ROUTES_SEARCH_URL}?query=${t}&from=${e.geolocation.latitude},${e.geolocation.longitude}`)):r=await (0,d.fetchWithTimeout)(`${o.ROUTES_SEARCH_URL}?query=${t}`,5e3);let s=await r.json();"places"in s&&P([...s.places])}catch(e){console.error(`Une erreur s'est produite lors de la r\xe9cup\xe9ration de l'autocomplete : ${e}`)}},V=()=>{O(""),"departure"===x?N((0,i.setRouteDeparture)(null)):N((0,i.setRouteArrival)(null)),P([f,...v.stops.map(p.transformFavoriteToSuggestion),...H]),L(!1),Y(!1),$&&setTimeout(()=>$.focus(),1)},K=()=>{M(!1),U||L(!1)};return(0,t.jsx)("div",{className:`route-search-input ${void 0!==I&&I.trim().length>0&&0===j.length?"no-result":""}`,children:(0,t.jsx)(n.default,{suggestions:[f,...j.filter(e=>e.type!==h.AUTOCOMPLETE_TYPES.GEOLOC)],onSuggestionsFetchRequested:({value:e})=>{e.trim().length>0?(D&&clearTimeout(D),w(setTimeout(()=>F(e),200))):(clearTimeout(D),setTimeout(()=>P([f,...v.stops.map(p.transformFavoriteToSuggestion),...H]),200))},onSuggestionsClearRequested:()=>P([f]),focusInputOnSuggestionClick:!1,getSuggestionValue:e=>e?.name,renderSuggestion:e=>{let s,a,i,n=e.type===h.AUTOCOMPLETE_TYPES.GEOLOC,o=void 0!==e.isRecentSearch&&!0===e.isRecentSearch,c="favorite"===e.type;if(n)return(0,t.jsxs)("div",{className:"title-icon display-flex display-full",children:[(0,t.jsx)("div",{className:"m-r-0-25 bg-bg-light border-radius-full",children:(0,t.jsx)("svg",{width:18,height:18,className:"f-blue",children:(0,t.jsx)("use",{xlinkHref:"#icon-tbm-geoloc-new"})})}),(0,t.jsx)("span",{className:"text-blue",children:b("nearbyMe.btn_geoloc")})]});switch(e.type){case l.ROUTES_TYPES_CAP.ADDRESS:s="icon-tbm-marker-fill-new";break;case l.ROUTES_TYPES_CAP.STOP_AREA:s="icon-tbm-stoparea-new";break;case l.ROUTES_TYPES_CAP.PARKS:s="icon-tbm-parking-new";break;case l.ROUTES_TYPES_CAP.VCUBS:s="icon-tbm-bss-new";break;default:s="icon-tbm-marker-fill-new"}return"poiType"in e?(s=(0,T.getPictoByType)(e.poiType),a=(0,T.getLabelByType)(e.poiType)):a=(0,T.getLabelByType)(e.type),o&&(s="icon-tbm-global-search-new"),e.distance&&(i=e.distance<1e3?`${e.distance} m`:`${parseFloat((e.distance/1e3).toFixed(1))} km`),(0,t.jsxs)("div",{className:"title-icon display-flex display-full",children:[(0,t.jsx)("div",{className:"m-r-0-5 bg-bg-light border-radius-full",children:c&&e.line?(0,t.jsx)(r.Fragment,{children:(0,m.renderLine)(e.line,30)}):(0,t.jsx)("svg",{width:18,height:18,className:"f-text","aria-hidden":"true",children:(0,t.jsx)("use",{xlinkHref:`#${s}`})})}),(0,t.jsxs)("div",{className:"display-flex flex-direction-row justify-content-space-between align-items-center display-full",children:[(0,t.jsxs)("div",{className:"display-flex flex-direction-column",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("span",{children:[e.name," ",e.address?`- ${e.address}`:""]})}),a&&(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"c-grey text-small",children:b(
1a)})})]}),i&&(0,t.jsx)("div",{className:"m-l-0-5",children:(0,t.jsx)("span",{className:"distance c-grey text-small",children:i})})]})]})},renderInputComponent:r=>{let s=r.key;return s&&delete r.key,(0,t.jsxs)("div",{onFocus:()=>{M(!0),e.geolocateAction(!1,!1)},onBlur:K,children:[(0,t.jsxs)("label",{className:C||I.trim().length>0?"text-blue":"placeholder",htmlFor:`autosuggest_${A}`,children:[R?(0,t.jsx)("svg",{width:"20",height:"20",role:"img","aria-label":b("route.search."+x),className:`m-0 flex-shrink-0 ${"departure"==x?"f-placeholder":"f-blue"}`,children:(0,t.jsx)("use",{xlinkHref:`#icon-${R}`})}):null,(0,t.jsxs)("span",{className:"example",children:[b(_??"")," ",e.required?"*":""]})]}),(0,t.jsx)("input",{...r,ref:e=>B(e),autoComplete:"off",role:"combobox","aria-expanded":C,"aria-invalid":!k&&!C,"aria-describedby":`errorlabel-${x}`,required:e.required??!1,id:`autosuggest_${A}`,placeholder:`${b(A)}`,className:(r.className?r.className:"")+(k||C?"":" error-autosuggest")},s),k||C?(0,t.jsx)("span",{id:`errorlabel-${x}`,className:"hidden"}):(0,t.jsx)("span",{id:`errorlabel-${x}`,className:"display-block m-t-0-25 text-small text-error text-center",children:b(`route.search.empty_input_error.${x}`)}),I.trim().length>0?(0,t.jsx)("span",{className:"react-autosuggest__clear",onClick:()=>V(),onKeyUp:()=>V(),onKeyDown:()=>V(),role:"button",tabIndex:-1,children:(0,t.jsx)("svg",{width:"18",height:"18",className:"f-bg",children:(0,t.jsx)("use",{xlinkHref:"#icon-tbm-close-new"})})}):null]})},onSuggestionSelected:(t,{suggestion:r})=>{O(""),L(!0),Y(!0),r.type===h.AUTOCOMPLETE_TYPES.GEOLOC?(e.geolocation||e.geolocateAction(!0,!0),e.geolocation&&(O(b("nearbyMe.btn_geoloc")),y({id:"",type:h.AUTOCOMPLETE_TYPES.GEOLOC,name:b("nearbyMe.btn_geoloc"),value:{latitude:e.geolocation.latitude,longitude:e.geolocation.longitude}})),E(l.ROUTE_TAGGING_ACTION.LOCATED)):(O(r.name),"favorite"===r.type&&(r.type="STOP_AREA",r.stopPointId?r.id=r.stopPointId:r.stopAreaId&&(r.id=r.stopAreaId)),y(r),void 0!==r.isRecentSearch&&r.isRecentSearch?E(l.ROUTE_TAGGING_ACTION.LAST_SEARCH):void 0!==r.isFavorite&&r.isFavorite?E(l.ROUTE_TAGGING_ACTION.FAVORITE):E(l.ROUTE_TAGGING_ACTION.INPUT_ADDRESS))},shouldRenderSuggestions:()=>!0,renderSuggestionsContainer:({containerProps:e,children:r})=>{C&&(e.className=`${e.className} react-autosuggest__suggestions-container--open`);let s=e.key;return s&&delete e.key,(0,t.jsx)("div",{...e,children:I.length&&0===j.length&&C?(0,t.jsx)("ul",{className:"react-autosuggest__suggestions-list",children:(0,t.jsx)("li",{className:"react-autosuggest__suggestion react-autosuggest__suggestion--first",children:(0,t.jsx)("div",{className:"title-icon display-flex display-full",children:(0,t.jsx)("span",{className:"autosuggest__message text-light m-l-0-5 m-md-l-0",children:b("schedules.search.no_result")})})})}):r},s)},inputProps:{value:I,onChange:e=>{O(e.target.value),Y(!1)},onKeyDown:e=>{e.target.closest(".react-autosuggest__container").querySelectorAll(".react-autosuggest__suggestion--highlighted").length&&"Enter"===e.key&&(O(e.target.value),e.target.blur(),L(!0))}}})})};e.s(["default",0,()=>{let e=(0,s.useTranslations)(),{departure:n,arrival:o}=(0,a.useAppSelector)(e=>e.routes),l=(0,a.useAppSelector)(e=>e.app.language),c=(0,a.useAppDispatch)(),[u,d]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),[g,m]=(0,r.useState)(null),T=(t=!1,r=!1)=>{!t&&(u||null!==g||p)||(h(!0),d(!0),navigator.geolocation.getCurrentPosition(async e=>{d(!1),m({latitude:e.coords.latitude,longitude:e.coords.longitude})},t=>{d(!1),console.error("Error when geolocating user",t),r&&alert(e("global.no_geolocation_available"))}))};return(0,t.jsxs)("div",{className:`display-flex align-items-center route-search react-autosuggest ${"es"===l?"lang-es":"en"===l?"lang-en":""}`,children:[(0,t.jsxs)("div",{className:"display-flex display-full g-1-25 m-b-0-5 flex-wrap",children:[(0,t.jsx)(A,{placeholder:"route.search.from",placeholderExample:"route.search.example",defaultValue:n?.name,taggingAction:e=>c((0,i.setTaggingStartingPoint)(e)),action:e=>c((0,i.setRouteDeparture)(e)),geolocateAction:T,geolocation:g,fieldType:"departure",required:!0,icon:"tbm-position-off-new"}
1,"departure"),(0,t.jsx)(A,{placeholder:"route.search.to",placeholderExample:"route.search.example",defaultValue:o?.name,taggingAction:e=>c((0,i.setTaggingArrivalPoint)(e)),action:e=>c((0,i.setRouteArrival)(e)),geolocateAction:T,geolocation:g,fieldType:"arrival",required:!0,icon:"tbm-destination-new"},"arrival")]}),(0,t.jsxs)("button",{type:"button",className:"route-switch",title:e("route.a11y.switch"),onClick:()=>c((0,i.reverseRouteDirections)()),children:[(0,t.jsx)("span",{className:"visually-hidden",children:e("route.a11y.switch")}),(0,t.jsx)("svg",{width:22,height:22,className:"f-blue","aria-hidden":"true",children:(0,t.jsx)("use",{xlinkHref:"#icon-tbm-switch-new"})})]})]})}],247563);var _=e.i(666644);let S=({icon:e,transportMode:r,checked:a,allowTab:i=!1,switchAction:n,borderBottom:o=!1})=>{let l=(0,s.useTranslations)();return(0,t.jsx)("div",{className:`col-xs-12 transport ${o?"border-bottom-light":""}`,children:(0,t.jsxs)("div",{className:"toggle-input display-flex align-items-center display-full flex-direction-row",children:[(0,t.jsx)("input",{id:`${r}-display-switch`,type:"checkbox",value:"1",checked:a,onChange:n,tabIndex:-1}),(0,t.jsxs)("div",{className:"display-flex display-full align-items-center justify-content-space-between",children:[(0,t.jsxs)("label",{htmlFor:`${r}-display-switch`,className:"display-flex align-items-center text-text",children:[(0,t.jsx)("svg",{width:"34",height:"34",className:"m-0 m-r-0-5","aria-hidden":"true",children:(0,t.jsx)("use",{xlinkHref:`#${e}`})}),l(`route.transport_modes.${r}`)]}),(0,t.jsx)("span",{className:`switch-toggle ${a?"checked":""}`,tabIndex:i?0:-1,onKeyDown:e=>{"Enter"===e.key&&n()}})]})]})})};e.s(["default",0,()=>{let e=(0,s.useTranslations)(),n=(0,a.useAppDispatch)(),[o,c]=(0,r.useState)(!1),u=l.SORT_OPTIONS[0],d=[...l.DEFAULT_TRANSPORT_TYPES],{transportModes:p,option:h,transportModesError:g}=(0,a.useAppSelector)(e=>e.routes),m=(0,a.useAppSelector)(e=>e.app.isHomepage),T=!0;return(0,r.useEffect)(()=>{n((0,i.setTaggingPreferences)(+!!o))},[n,o]),(d.sort().join(",")!==[...p].sort().join(",")||u!==h)&&(T=!1),(0,t.jsx)("div",{className:`route-options preferences ${m?"homepage":""} ${!T?"hasChanged":""}`,children:(0,t.jsxs)(_.default,{trigger:(0,t.jsxs)("div",{className:"display-flex settings align-items-center align-content-stretch justify-space-between m-md-l-0-50 collapsible-header",children:[(0,t.jsx)("div",{className:"p-l-0 m-r-0-5 m-l-0-25 display-flex align-items-center justify-content-center",children:(0,t.jsxs)("span",{className:"display-inline-flex align-items-center justify-content-center",children:[(0,t.jsx)("svg",{width:"30",height:"30",className:"m-0 m-r-0-5 flex-shrink-0","aria-hidden":"true",children:(0,t.jsx)("use",{xlinkHref:`#icon-tbm-options-circle-blue-${!T?"active-":""}new`})}),e("route.transport_modes.title")]})}),(0,t.jsx)("div",{className:"collapse arrow",children:(0,t.jsx)("svg",{width:"15",height:"15",className:"f-blue","aria-hidden":"true",children:(0,t.jsx)("use",{xlinkHref:"#icon-arrow-down"})})})]}),open:o,onOpening:()=>c(!0),onClosing:()=>c(!1),tabIndex:0,triggerTagName:"div",triggerClassName:"",children:[(0,t.jsxs)("div",{className:"m-b-2 m-t-2",children:[(0,t.jsx)("div",{className:"col-xs-12",children:(0,t.jsx)("p",{className:"font-bold fs-xbig m-b",children:e("route.options.title")})}),l.SORT_OPTIONS.map(r=>(0,t.jsx)("div",{className:"col-xs-12 m-t-0-5 m-b-0-5 display-flex border-bottom-light",children:(0,t.jsxs)("label",{htmlFor:r,className:"checkbox",children:[(0,t.jsx)("input",{id:r,type:"radio",value:"1",onChange:()=>n((0,i.setOption)(r)),checked:h===r,tabIndex:-1}),(0,t.jsx)("span",{tabIndex:o?0:-1,className:"checkmark",onKeyDown:e=>{"Enter"===e.key&&n((0,i.setOption)(r))}}),(0,t.jsx)("span",{className:"label-checkbox",children:e(`route.options.${r}`)})]})},r))]}),(0,t.jsxs)("div",{className:"toggle-content",children:[(0,t.jsx)("div",{className:"col-xs-12",children:(0,t.jsx)("p",{className:"font-bold fs-xbig m-b",children:e("route.transport_modes.title_name")})}),(0,t.jsx)(S,{icon:"icon-tbm-tram-circle-new",transportMode:"tram",checked:p.includes(l.NAVITIA_TRANSPORT_TYPES.TRAM),switchAction:()=>n((0,i.switchRouteTransport)(l.NAVITIA_TRANSPORT_TYPES.TRAM)),allowTab:o,borderBottom:!0}),(0,t.jsx)(S,{icon:"icon-tbm-bus-circle-new",transportMode:"bus",checked:p.includes(l.NAVITIA_TRANSPORT_TYPES.BUS),switchAction:()=>n((0,i.switchRouteTransport)(l.NAVITIA_TRANSPORT_TYPES.BUS)),allowTab:o,borderBottom:!0}),(0,t.jsx)(S,{icon:"icon-tbm-flex-circle-new",transportMode:"flex_aero",checked:p.includes(l.NAVITIA_TRANSPORT_TYPES.FLEX_AREO),switchAction:()=>n((0,i.switchRouteTransport)(l.NAVITIA_TRANSPORT_TYPES.FLEX_AREO)),allowTab:o,borderBottom:!0}),(0,t.jsx)(S,{icon:"icon-tbm-bato-circle-new",transportMode:"batcub",checked:p.includes(l.NAVITIA_TRANSPORT_TYPES.BATCUB),switchAction:()=>n((0,i.switchRouteTransport)(l.NAVITIA_TRANSPORT_TYPES.BATCUB)),allowTab:o,borderBottom:!0}),(0,t.jsx)(S,{icon:"icon-tbm-bss-circle-new",transportMode:"vcub",checked:p.includes(l.NAVITIA_TRANSPORT_TYPES.VCUB),switchAction:()=>n((0,i.switchRouteTransport)(l.NAVITIA_TRANSPORT_TYPES.VCUB)),allowTab:o,borderBottom:!0}),(0,t.jsx)(S,{icon:"icon-tbm-autocar-circle-new",transportMode:"autocar",checked:p.includes(l.NAVITIA_TRANSPORT_TYPES.AUTOCAR),switchAction:()=>n((0,i.switchRouteTransport)(l.NAVITIA_TRANSPORT_TYPES.AUTOCAR)),allowTab:o,borderBottom:!0}),(0,t.jsx)(S,{icon:"icon-tbm-train-circle-new",transportMode:"train",checked:p.includes(l.NAVITIA_TRANSPORT_TYPES.TRAIN_TER),switchAction:()=>n((0,i.switchRouteTransport)(l.NAVITIA_TRANSPORT_TYPES.TRAIN_TER)),allowTab:o,borderBottom:!1}),g?(0,t.jsx)("div",{role:"alert","aria-live":"polite",className:"col-xs-12",children:(0,t.jsx)("p",{className:"m-t alert-box alert-error",children:e(g)})}):null]})]})})}],246723);var y=e.i(337728),R=e.i(340429),E=e.i(796304),x=e.i(899260),b=e.i(602762);let N="departure";e.s(["default",0,()=>{let e=(0,s.useTranslations)(),n=(0,a.useAppDispatch)(),{isDepartureDate:o,date:c}=(0,a.useAppSelector)(e=>e.routes),{isHomepage:u,language:d}=(0,a.useAppSelector)(e=>e.app);R.default.locale(d);let p=(0,R.default)(),[h,g]=(0,r.useState)((0,R.default)(c)),[m,T]=(0,r.useState)(!1),[f,A]=(0,r.useState)(!1),[S,v]=(0,r.useState)(null),I=!0,O=(0,R.default)().toDate();(0,x.isWebview)()&&((0,R.default)(c).isBefore((0,R.default)(l.MIN_DATE_WEBVIEWS,"MM-DD-YYYY HH:mm:ss"))&&n((0,b.setDate)((0,R.default)(l.MIN_DATE_WEBVIEWS,"MM-DD-YYYY HH:mm:ss").format("YYYY-MM-DDTHH:mm:ssZ"))),(0,R.default)(l.MIN_DATE_WEBVIEWS,"MM-DD-YYYY HH:mm:ss").isAfter((0,R.default)())&&(O=(0,R.default)(l.MIN_DATE_WEBVIEWS,"MM-DD-YYYY HH:mm:ss").toDate())),(0,r.useEffect)(()=>
1{if((0,R.default)(c).isBefore((0,R.default)(),"day"))g((0,R.default)());else if((0,R.default)(c).isSame((0,R.default)(),"day")&&(0,R.default)(c).isSameOrBefore((0,R.default)(),"minute")){let e=(0,R.default)();g(e),n((0,i.setRouteDate)(e.format()))}else g((0,R.default)(c))},[n,c]),p.isAfter(h,"minute")&&g(p),p.isSame(h,"minute")&&o||(I=!1);let j=e=>{n((0,i.setIsDepartureDate)(e.target.value===N))};return(0,t.jsx)("div",{className:"route-opt-wrapper",children:(0,t.jsx)("div",{className:`route-options date ${u?"homepage":""} ${!I?"hasChanged":""}`,children:(0,t.jsxs)(_.default,{trigger:(0,t.jsxs)("div",{className:"display-flex settings align-items-center align-content-stretch justify-space-between m-md-l-0-50 collapsible-header",children:[(0,t.jsxs)("div",{className:"p-l-0 m-r-0-5 m-l-0-25 display-flex align-items-center justify-content-center",children:[(0,t.jsxs)("span",{className:"display-flex align-items-center justify-content-center",children:[(0,t.jsx)("svg",{width:"30",height:"30",className:"m-0 m-r-0-5 flex-shrink-0","aria-hidden":"true",children:(0,t.jsx)("use",{xlinkHref:`#icon-tbm-clock-circle-blue-${!I?"active-":""}new`})}),o?e("route.search.datetime_represents.departure"):e("route.search.datetime_represents.arrival"),"â¯:â¯"]}),(0,t.jsx)("span",{children:h.isToday()||h.isTomorrow()?h.isToday()?`${h.format("HH[h]mm")}`:`${e("traffic.tomorrow")} ${e("traffic.at")} ${h.format("HH[h]mm")}`:`${h.format("LL")} ${e("traffic.at")} ${h.format("HH[h]mm")}`})]}),(0,t.jsx)("div",{className:"collapse arrow",children:(0,t.jsx)("svg",{width:"15",height:"15",className:"f-blue","aria-hidden":"true",children:(0,t.jsx)("use",{xlinkHref:"#icon-arrow-down"})})})]}),open:m,onOpening:()=>T(!0),onClosing:()=>{T(!1),A(!1)},tabIndex:0,triggerTagName:"div",contentOuterClassName:`${f&&"active"}`,children:[(0,t.jsx)("div",{className:"col-xs-12 m-t-1-5 display-flex",children:(0,t.jsxs)("div",{className:"switch display-flex display-full border",role:"radiogroup","aria-labelledby":"switch-departure-arrival",children:[(0,t.jsx)("p",{id:"switch-departure-arrival",className:"visually-hidden",children:e("route.a11y.searchWay")}),(0,t.jsxs)("div",{className:"radio col-xs-6",children:[(0,t.jsx)("input",{id:"datetime_represents_departure",type:"radio",className:"radio-datetime-represents departure",name:"datetime_represents",value:N,onChange:e=>j(e),checked:o,onKeyDown:e=>{"Enter"===e.key&&n((0,i.setIsDepartureDate)(!o))},tabIndex:m?0:-1}),(0,t.jsx)("label",{className:"label-radio",htmlFor:"datetime_represents_departure",children:e("route.search.datetime_represents.departure")})]}),(0,t.jsxs)("div",{className:"radio col-xs-6",children:[(0,t.jsx)("input",{id:"datetime_represents_arrival",type:"radio",className:"radio-datetime-represents arrival",name:"datetime_represents",value:"arrival",onChange:e=>j(e),checked:!o,tabIndex:m?0:-1}),(0,t.jsx)("label",{className:"label-radio",htmlFor:"datetime_represents_arrival",children:e("route.search.datetime_represents.arrival")})]})]})}),(0,t.jsxs)("div",{className:"col-xs-12 text-left m-t-0-75 m-lg-t-1 ws-nw display-flex g-1-5 datetime-container",children:[(0,t.jsx)("button",{type:"button",className:`btn g-1-5 btn-route-date ${f?"active":""}`,onClick:()=>A(!f),tabIndex:m?0:-1,children:(0,E.initCap)(h.format("dddd D MMMM YYYY"))}),f&&(0,t.jsx)(y.default,{defaultValue:O,value:h.toDate(),minDate:O,onChange:e=>{if(Array.isArray(e))return;let t=(0,R.default)(e).hour(h.hour()).minute(h.minute());g(t),n((0,i.setRouteDate)(t.format())),A(!1)},locale:d}),(0,t.jsx)("label",{htmlFor:"route-start-hour",className:"visually-hidden",children:e("route.a11y.searchHour")}),(0,t.jsx)("input",{id:"route-start-hour",className:`btn-route-time ${S?"input-error":""}`,type:"time",value:h.format("HH:mm"),onChange:t=>{let r=t.target.value,s=(0,R.default)(`${h.format("YYYY-MM-DD")}T${r}`);if(s.isBefore((0,R.default)()))v(e("route.search.future_date_error"));else{v(null);let e=h.hour(s.hour()).minute(s.minute());g(e),n((0,i.setRouteDate)(e.format()))}},tabIndex:m?0:-1}),S&&(0,t.jsx)("p",{className:"error-message",children:S})]})]})})})}],702822)},61010,e=>{"use strict";e.s(["journeySearchSortOptionToDto",0,function(e){switch(e){case"earliestArrival":return"EARLIEST_ARRIVAL";case"fastest":return"FASTEST";case"leastTransfers":return"LEAST_TRANSFERS";case"leastWalking":return"LEAST_WALKING";default:throw Error("Invalid sort option : "+e)}},"journeySearchToOriginDestinationDto",0,function(e){if(null===e)return{};switch(e.type){case"STOP_AREA":return{type:"ID",value:e.id?.includes("-")?e.id?.split("-")[0]:e.id};case"POI":case"ADDRESS":case"ADMINISTRATIVE_REGION":return{type:"ID",value:e.id};case"GEOLOC":return{type:"GEOCOORDINATES",value:{latitude:e?.value?.latitude,longitude:e?.value?.longitude}};default:throw Error("Invalid location type "+e.type)}},"journeySearchToReferenceDateDto",0,function(e){return{type:e.isDepartureDate?"DEPARTURE":"ARRIVAL",date:e.value.toISOString()}},"journeySearchToTransportModesDto",0,function(e){let t,r=[];for(t in e)"string"==typeof e[t]&&"onDemandTransport"!==e[t]&&r.push(function(e){switch(e){case"tramway":return"TRAMWAY";case"bus":return"BUS";
1case"regionalBus":case"car":return"REGIONAL_BUS";case"ferry":return"FERRY";case"train":return"TRAIN";case"bss":return"BSS";default:throw Error("Invalid transport mode type : "+e)}}(e[t]));return r}])},625657,e=>{"use strict";e.s(["getLabelByType",0,e=>{switch(e){case"HOTEL":return"pointOfInterest.types.hotel";case"RESTAURANT":return"pointOfInterest.types.restaurant";case"BANK":return"pointOfInterest.types.bank";case"LAW":return"pointOfInterest.types.law";case"PARK_AND_RIDE":return"pointOfInterest.types.parkAndRide";case"CAR_PARK":return"pointOfInterest.types.carPark";case"MIXED_USE_CAR_PARK":return"pointOfInterest.types.mixedUseCarPark";case"CITIZ":return"pointOfInterest.types.citiz";case"BIKE_BOX":return"pointOfInterest.types.bikeBox";case"BIKE_SHELTER":return"pointOfInterest.types.bikeShelter";case"BICYCLETTERIE":return"pointOfInterest.types.bicycletterie";case"BSS_STANDS":return"pointOfInterest.types.bssStands";case"HEALTH":return"pointOfInterest.types.health";case"SCHOOL":return"pointOfInterest.types.school";case"SPORT_CENTER":return"pointOfInterest.types.sportCenter";case"SUPERMARKET":return"pointOfInterest.types.supermarket";case"AIRPORT":return"pointOfInterest.types.airport";case"CITY_HALL":return"pointOfInterest.types.cityHall";case"PARK":return"pointOfInterest.types.park";case"OTHER":return"pointOfInterest.types.other";case"ADDRESS":return"pointOfInterest.types.address";case"ADMINISTRATIVE_REGION":return"pointOfInterest.types.region";case"STOP_POINT":return"pointOfInterest.types.stop";case"STOP_AREA":return"pointOfInterest.types.stopArea";default:return null}},"getPictoByType",0,e=>{switch(e){case"BSS_STANDS":return"icon-le-velo";case"BICYCLETTERIE":case"BIKE_BOX":case"BIKE_SHELTER":return"icon-abri-velo";case"PARK_AND_RIDE":return"icon-park-and-ride-search";case"CAR_PARK":return"icon-parking";case"MIXED_USE_CAR_PARK":return"icon-mixed-use-car-park";case"HOTEL":return"icon-bed";case"SPORT_CENTER":return"icon-dumbbell";case"RESTAURANT":return"icon-restaurant";case"SUPERMARKET":return"icon-bag";case"SCHOOL":return"icon-school";case"HEALTH":return"icon-medical-cross";case"AIRPORT":return"icon-plane";case"PARK":return"icon-tree";case"CITY_HALL":case"LAW":case"BANK":return"icon-museum";case"CITIZ":return"icon-tbm-car-new";default:return"icon-tbm-marker-fill-new"}}])},619709,e=>{"use strict";var t=e.i(271645);e.s(["useIsMounted",0,function(){let e=(0,t.useRef)(!1);return(0,t.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),(0,t.useCallback)(()=>e.current,[])}])},321081,654816,e=>{"use strict";var t=e.i(642778),r=e.i(340429),s=e.i(327225),a=e.i(602762),i=e.i(782327),n=e.i(387644),o=e.i(88809);let l=e=>{let t=(0,r.default)(e.date),s=(0,r.default)(),a=!1;s.diff(t)>=0&&(a=!0);try{(0,n.sendGTMEvent)({event:"tbm_click_itineraries_search",tbm_params:{departure_point_selection:e.taggingStartingPoint.length>0?e.taggingStartingPoint:i.ROUTE_TAGGING_ACTION.INPUT_ADDRESS,arrival_point_selection:e.taggingArrivalPoint.length>0?e.taggingArrivalPoint:i.ROUTE_TAGGING_ACTION.INPUT_ADDRESS,departure_city:e.taggingStartingPoint!==i.ROUTE_TAGGING_ACTION.LOCATED?e.departure?.name.split("(").slice(-1)[0].slice(0,-1):void 0,arrival_city:e.taggingArrivalPoint!==i.ROUTE_TAGGING_ACTION.LOCATED?e.arrival?.name.split("(").slice(-1)[0].slice(0,-1):void 0,search_type:e.isDepartureDate?i.ROUTE_REPRESENT.DEPARTURE:i.ROUTE_REPRESENT.ARRIVAL,date_time_planning:+!a,sort_usage:+("earliestArrival"!==e.option),selected_sort:(0,o.getSelectedSortLabelByOption)(e.option),transport_mode_choice:e.taggingPreferencesOpened&&e.transportModes.length<7?"Oui":"Non",selected_transport_mode:e.transportModes.map(e=>(0,o.getLineNameByMode)(e)).join(", "),selected_accessible_routes:e.withAccessibility?"Oui":"Non"}})}catch(e){console.error("dataLayer",e)}return null},c=e=>{try{(0,n.sendGTMEvent)({event:"tbm_itineraries_search_success",tbm_params:{route_search_success:e>0?"Oui":"Non",proposed_route_results_count:e}})}catch(e){console.error("dataLayer",e)}return null},u=()=>{try{(0,n.sendGTMEvent)({event:"tbm_switch_origin_destination",tbm_params:{swap_departure_arrival:"Oui"}})}catch(e){console.error("dataLayer",e)}return null};e.s(["taggingEventRouteRoadmap",0,e=>{let t="";switch(e){case i.ROADMAP_TAGGING_ACTION.PEDESTRIAN_DETAILS:t="pedestrian_details_from_route_sheet";break;case i.ROADMAP_TAGGING_ACTION.STOP_POINTS_DETAILS:t="stop_points_details_from_route_sheet";break;default:t="tbm_click_item"}let r={tbm_params:{[t]:e}};try{(0,n.sendGTMEvent)({event:"tbm_click_itinerary_result",...r})}catch(e){console.error("dataLayer",e)}return null},"taggingEventRouteRoadmapResultClick",0,e=>{try{let t={tbm_params:{result_list_position:e.rank,section_results_count:e.total,selected_tab_name:e.tab}};(0,n.sendGTMEvent)({event:"tbm_click_itineraries_search_results",...t})}catch(e){console.error("dataLayer",e)}return null},"taggingEventRouteRoadmapResultList",0,c,"taggingEventSearchRoute",0,l,"taggingResultTimeShiftingEvent",0,e=>{try{(0,n.sendGTMEvent)({event:"tbm_itinerary_result_time_lag_success",tbm_params:{shift_type:e}})}catch(e){console.error("dataLayer",e)}return null},"taggingSwitchDepartureArrivalEvent",0,u],654816);var d=e.i(12872),p=e.i(997560),h=e.i(61010),g=e.i(499256),m=e.i(17444);let T=e=>t=>{t((0,a.setDeparture)(e.departure)),t((0,a.setArrival)(e.arrival)),t((0,a.setDate)(e.date)),t((0,a.setIsDepartureDate)(e.isDepartureDate)),t((0,a.switchTransportsModes)(e.transportModes)),t((0,a.setWithAccessibility)({withAccessibility:e.withAccessibility,transportModes:e.transportModes}))},f=(e=!0)=>async n=>{let u="fr";try{let T=s.store.getState().routes;if(!T.departure||!T.arrival||T.loading)return;let f=s.store.getState().app;f.language&&(u=f.language);let A=T.searchPreferencesHash,_=(0,o.generateSearchPreferencesHash)(T);if(A.length>0&&t.default.isEqual(_,A))return;n((0,a.setSearchPreferencesHash)(_)),n((0,a.setLoading)(!0)),n((0,a.setFetchError)(null)),n((0,a.setActiveJourneyError)(null));let S=await (0,d.fetchWithTimeout)(p.JOURNEY_SEARCH_RESULTS_URL,1e4,{origin:(0,h.journeySearchToOriginDestinationDto)(T.departure),destination:(0,h.journeySearchToOriginDestinationDto)(T.arrival),referenceDate:(0,h.journeySearchToReferenceDateDto)({isDepartureDate:T.isDepartureDate,value:(0,r.default)(T.date)}),sort:(0,h.journeySearchSortOptionToDto)(T.option),transportModes:(0,h.journeySearchToTransportModesDto)(T.transportModes),flexAeroEnabled:T.transportModes.includes(i.NAVITIA_TRANSPORT_TYPES.FLEX_AREO),isAccessible:T.withAccessibility},"POST",!1,void 0,u),y=await S.json();if("error"in y){n((0,a.setFetchError)("route.errors.fetch")),n((0,a.setSearchPreferencesHash)("")),n((0,a.setLoading)(!1));return}
1e&&(l(T),c(y.categories.bike.journeys.length+y.categories.car.carParkJourneys.length+y.categories.car.parkAndRideJourneys.length+y.categories.publicTransport.publicTransportJourneys.length+y.categories.publicTransport.onDemandTransportJourneys.length+y.categories.walking.journeys.length)),n((0,a.setSearchResults)(y)),n((0,a.setActiveJourneyId)((0,m.getFirstSelectedJourney)(y.categories))),(0,g.delay)(700).then(()=>n((0,a.setLoading)(!1)))}catch(e){n((0,a.setFetchError)("route.errors.fetch")),n((0,a.setSearchPreferencesHash)("")),n((0,a.setLoading)(!1)),console.error(`Une erreur est survenue lors de la r\xe9cup\xe9ration de l'itin\xe9raire : ${e}`)}};e.s(["calculateJourneySearchResults",0,f,"resetRouteState",0,()=>e=>{e((0,a.resetRoutesState)())},"retrieveCurrentJourney",0,e=>async t=>{try{var r;let i;t((0,a.setActiveJourneyError)(null));let n=s.store.getState().routes,o=!1;if(n.activeJourney&&(n.activeJourney.steps.forEach(e=>{("CAR"===e.mode&&"PARK_AND_RIDE"===e.carParkType||"BSS"===e.mode)&&(o=!0)}),!o))return;let l=await (0,d.fetchWithTimeout)(`${p.GET_JOURNEY_RESULT_URL}/${e}`,1e4),c=await l.json();if("error"in c)return void t((0,a.setActiveJourneyError)("route.errors.fetch"));if(c.steps.forEach(e=>{("CAR"===e.mode&&"PARK_AND_RIDE"===e.carParkType||"BSS"===e.mode)&&(o=!0)}),r=c,i={ascentMeters:0,descentMeters:0},r&&r.steps&&r.steps.forEach(e=>{e.slope&&(i.ascentMeters+=e.slope.ascentMeters,i.descentMeters+=e.slope.descentMeters)}),c.slope=i,o){let t=await (0,d.fetchWithTimeout)(`${p.GET_JOURNEY_RESULT_REALTIME_URL}/${e}/real-time`,1e4),r=await t.json();for(let e=0;e<r.realtime.length;e++){let t=r.realtime[e];"PARK_AND_RIDE"===t.type&&t.parkAndRideId?t.id=t.parkAndRideId:"BSS_STANDS"===t.type&&t.bssId&&(t.id=t.bssId);for(let e=0;e<c.steps.length;e++){let r=c.steps[e];r.departure.id===t.id&&(r.departure.realTimeInfo=t),r.arrival.id===t.id&&(r.arrival.realTimeInfo=t)}}}t((0,a.setActiveJourneyId)(e)),t((0,a.setActiveJourney)(c))}catch(e){t((0,a.setFetchError)("route.errors.fetch")),console.error(`Une erreur est survenue lors de la r\xe9cup\xe9ration de l'itin\xe9raire : ${e}`)}},"reverseRouteDirections",0,()=>e=>{u(),e((0,a.reverseRouteDirections)())},"setActiveTab",0,e=>t=>{t((0,a.setActiveTab)(e))},"setIsDepartureDate",0,e=>t=>{t((0,a.setIsDepartureDate)(e))},"setOption",0,e=>t=>{t((0,a.setOption)(e))},"setRouteArrival",0,e=>t=>{t((0,a.setArrival)(e))},"setRouteDate",0,e=>t=>{t((0,a.setDate)(e))},"setRouteDeparture",0,e=>t=>{t((0,a.setDeparture)(e))},"setTaggingArrivalPoint",0,e=>t=>t((0,a.setTaggingArrivalPoint)(e)),"setTaggingPreferences",0,e=>t=>t((0,a.setTaggingPreferencesOpened)(e)),"setTaggingStartingPoint",0,e=>t=>t((0,a.setTaggingStartingPoint)(e)),"setWithAccessibility",0,e=>t=>{let r=e?s.store.getState().routes.transportModes.filter(e=>!i.NON_ACCESSIBLE_TRANSPORT_TYPES.includes(e)):i.DEFAULT_TRANSPORT_TYPES;t((0,a.setWithAccessibility)({withAccessibility:e,transportModes:r}))},"switchRouteTransport",0,e=>t=>{if(!Object.values(i.NAVITIA_TRANSPORT_TYPES).includes(e))return!1;t((0,a.setTransportModesError)(null));let r=[...s.store.getState().routes.transportModes];if(r.includes(e)){let t=r.indexOf(e);r.splice(t,1)}else r.push(e);if(0===r.length)return t((0,a.setTransportModesError)("route.errors.no_transport_selected")),(0,g.delay)(5e3).then(()=>t((0,a.setTransportModesError)(null))),!1;t((0,a.switchTransportsModes)(r))},"syncStoreFromRequest",0,(e,t=!1,a=!1)=>async i=>{try{let{departure:n,arrival:o,date:l,isDepartureDate:c}=s.store.getState().routes;if("string"!=typeof e.departure||"string"!=typeof e.arrival)return;let u=JSON.parse(e.departure);null!==u&&(null===n||t||n?.id!==u.id)&&(n=u);let d=JSON.parse(e.arrival);null!==d&&(null===o||t||o?.id!==d.id)&&(o=d);let p=(0,r.default)();"date"in e&&(l=(0,r.default)(e.date).toString()),p.diff(l)>0&&(l=p.toString()),"true"!==e.isDepartureDate&&(c=!1);let h={departure:n,arrival:o,date:l,isDepartureDate:c,option:e.option,transportModes:e.transportModes.split(","),withAccessibility:"1"===e.withAccessibility};i(T(h)),a&&i(f(!1))}catch(e){console.error(`Une erreur est survenue lors de la r\xe9cup\xe9ration des points d'itin\xe9raire : ${e}`)}},"syncStoreFromRouteRequest",0,(e,t=!1,a=!1)=>async n=>{try{let{departure:o,arrival:l,date:c,transportModes:u}=s.store.getState().routes;if("string"!=typeof e.departure&&"string"!=typeof e.arrival)return;if(e.departure){let r=JSON.parse(e.departure);
1null!==r&&(null===o||t||o?.id!==r.id)&&(o=r)}if(e.arrival){let r=JSON.parse(e.arrival);null!==r&&(null===l||t||l?.id!==r.id)&&(l=r)}let d=(0,r.default)();"date"in e&&(c=(0,r.default)(e.date).toString()),d.diff(c)>0&&(c=d.toString()),u=e.transportModes?e.transportModes.split(","):i.DEFAULT_TRANSPORT_TYPES;let p={departure:o,arrival:l,date:c,isDepartureDate:!0,option:e.option,transportModes:u,withAccessibility:"1"===e.withAccessibility};n(T(p)),a&&n(f(!1))}catch(e){console.error(`Une erreur est survenue lors de la r\xe9cup\xe9ration des points d'itin\xe9raire : ${e}`)}}],321081)},748346,e=>{"use strict";e.s(["transformFavoriteToSuggestion",0,function(e){return{id:e.id,name:e.name,type:"favorite",line:e.line,route:e.route,stopAreaId:e.stopAreaId,stopPointId:e.stopPointId,coordinates:e.coordinates,isFavorite:!0,lines:null}}])},499256,e=>{"use strict";e.s(["delay",0,function(e){return new Promise(t=>setTimeout(t,e))}])}]);
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.