@digitransit-component/digitransit-component-autosuggest 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -12,5 +12,5 @@ p.version="2.29.4",O(Kz),p.fn=eo,p.min=$z,p.max=Mp,p.now=bp,p.utc=d,p.unix=qo,p.
12
12
  //! moment.js locale configuration
13
13
  var b="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),z=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",b[7],b[8],b[9]];function p(M,p,O,o){var c="";switch(O){case"s":return o?"muutaman sekunnin":"muutama sekunti";case"ss":c=o?"sekunnin":"sekuntia";break;case"m":return o?"minuutin":"minuutti";case"mm":c=o?"minuutin":"minuuttia";break;case"h":return o?"tunnin":"tunti";case"hh":c=o?"tunnin":"tuntia";break;case"d":return o?"päivän":"päivä";case"dd":c=o?"päivän":"päivää";break;case"M":return o?"kuukauden":"kuukausi";case"MM":c=o?"kuukauden":"kuukautta";break;case"y":return o?"vuoden":"vuosi";case"yy":c=o?"vuoden":"vuotta"}return c=function(M,p){return M<10?p?z[M]:b[M]:M}(M,o)+" "+c,c}return M.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:p,ss:p,m:p,mm:p,h:p,hh:p,d:p,dd:p,M:p,MM:p,y:p,yy:p},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},z(JM)})),xM((function(M,b){var z;z=function(M){return M.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(M){var b=M%10;return M+(1==~~(M%100/10)?":e":1===b||2===b?":a":":e")},week:{dow:1,doy:4}})},z(JM)})),xM((function(M,b){var z;z=function(M){
14
14
  //! moment.js locale configuration
15
- function b(M,b,z,p){var O={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[M+" Tage",M+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[M+" Monate",M+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[M+" Jahre",M+" Jahren"]};return b?O[z][0]:O[z][1]}return M.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:b,mm:"%d Minuten",h:b,hh:"%d Stunden",d:b,dd:b,w:b,ww:"%d Wochen",M:b,MM:b,y:b,yy:b},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},z(JM)})),{de:{address:"Adresse","address-place-or-business":"Adress, Ort or Geschäft","add-via-button-label":"Füge Zwischenziel hinzu","add-via-duration-button-label":"Set stop duration at via point {{index}}","add-via-duration-button-label-close":"Close stop duration selector at via point {{index}}","add-via-duration-button-label-open":"Open stop duration selector at via point {{index}}",airplane:"Flug",arrival:"Ankunft",back:"Zurück",bikerentalstation:"Leihrad-Station",bus:"Bus",cancel:"Abbrechen","clear-button-label":"Löschen","clear-search-history":"Suchhistorie löschen",currentposition:"Aktuelle Position",delete:"Löschen","delete-old-searches-header":"Wollen Sie die Such-Historie löschen?",departure:"Abfahrt",destination:"Ziel","give-origin":"Start eingeben.","give-destination":"Ziel eingeben.",favourite:"Favoriten",ferry:"Fähre","future-route":"Zukünftige Verbindung",origin:"Start","origin-stop-near-you":"Start",ownlocations:"Eigene Favoriten",loading:"Laden...","minute-short":"min",rail:"Zug",search:"Suche","search-address-or-place":"Suche anhand von Adresse oder Ortsangabe","search-button-label":"Suche","search-destination":"Suche Zielort, Linie or Haltestelle","search-destination-index":"Zielort eingeben","search-destination-results-but-no-search":"Ergebnisse in “Zielort”-Reiter anzeigen","search-no-results":"Kein Ort gefunden.","search-origin":"Suche Startort, Linie oder Haltestelle","search-origin-index":"Startort eingeben","search-position":"Standort ermitteln","search-autosuggest-label":"Venue, place and stopsearch.","search-autosuggest-label-instructions-desktop":"Navigate list with arrow keys and select with enter key.","search-autosuggest-label-instructions-mobile":"Enter the location and navigate in the list by swiping.","search-autosuggest-label-move-to-destination":"After selecting the starting location you are automatically moved to the destination field.","search-autosuggest-len":"There is {{count}} suggestion available","search-autosuggest-len_plural":"There are {{count}} suggestions available","search-current-suggestion":"Aktuelle Auswahl: {{selection}}",street:"Straße",subway:"U-Bahn",station:"Station",stop:"Haltestelle","stop-near-you":"Suche Haltestellen und Linien in der Nähe","stop-near-you-bus":"Suche Buslinien or Haltestellen","stop-near-you-citybike":"Suche Leihrad-Stationen","stop-near-you-rail":"Suche Zugverbindungen oder Bahnhöfe","stop-near-you-subway":"Suche U-Bahn-Linien oder Haltestellen","stop-near-you-tram":"Suche Stadtbahn-Haltestellen-Suche","today-at":"Heute um","tomorrow-at":"Morgen um",tram:"Straßenbahn","use-own-position":"Benutze aktuellen Standort","select-from-map":"Wähle Position anhand Karte","select-from-own-locations":"Aus eigenen Favoriten auswählen",venue:"Venue","via-point":"Zwischenziel",where:"Wohin?",place:"Ort"},en:{address:"Address","address-place-or-business":"Address, place or business","add-via-button-label":"Add via point","add-via-duration-button-label":"Set stop duration at via point {{index}}","add-via-duration-button-label-close":"Close stop duration selector at via point {{index}}","add-via-duration-button-label-open":"Open stop duration selector at via point {{index}}",airplane:"Flight",arrival:"Arrival",back:"Back",bikepark:"Park & Ride for bikes",bikerentalstation:"Bike station",bus:"bus",cancel:"Cancel",carpark:"Park & Ride","clear-button-label":"Clear","clear-search-history":"Clear search history",currentposition:"Current position",delete:"Delete","delete-old-searches-header":"Do you want to clear the search history?",departure:"Departure",destination:"Destination","give-origin":"Enter your origin.","give-destination":"Enter your destination",favourite:"Favourite",ferry:"Ferry","future-route":"Future route",origin:"Start","origin-stop-near-you":"Start",ownlocations:"Own locations",loading:"Loading...","minute-short":"m",platform:"Platform",rail:"Train",required:"required field",search:"Search","search-address-or-place":"Search by address or place name","search-button-label":"Search","search-destination":"Search destination, route or stop","search-destination-index":"Enter destination","search-destination-results-but-no-search":"View results in the adjacent “Destination” tab","search-no-results":"No location","search-origin":"Search origin, route or stop","search-origin-index":"Enter origin","search-position":"Detect location","search-autosuggest-label":"Venue, place and stopsearch.","search-autosuggest-label-instructions-desktop":"Navigate list with arrow keys and select with enter key.","search-autosuggest-label-instructions-mobile":"Enter the location and navigate in the list by swiping.","search-autosuggest-label-move-to-destination":"After selecting the starting location you are automatically moved to the destination field.","search-autosuggest-len":"There is {{count}} suggestion available","search-autosuggest-len_plural":"There are {{count}} suggestions available","search-current-suggestion":"Current selection: {{selection}}",street:"Street",subway:"Metro",station:"Station",stop:"Stop","stop-near-you":"Search stops and routes","stop-near-you-airplane":"Search flights or airports","stop-near-you-bus":"Search bus routes or stops","stop-near-you-citybike":"Search city bike stations","stop-near-you-rail":"Search train routes or stations","stop-near-you-subway":"Search metro routes or stations ","stop-near-you-tram":"Search tram routes or stops","stop-route-station":"Bus and stop search","today-at":"today at","tomorrow-at":"tomorrow at",tram:"Tram",track:"Track","use-own-position":"Use current location","select-from-map":"Select position from map","select-from-own-locations":"Select from own locations",venue:"Venue","via-point":"Via point",where:"Where to?",place:"Location"},fi:{address:"Osoite","address-place-or-business":"Osoite, paikka tai yritys","add-via-button-label":"Lisää välipiste","add-via-duration-button-label":"Aseta välipisteelle {{index}} pysähdyksen kesto","add-via-duration-button-label-close":"Avaa välipisteen {{index}} pysähdyksen kesto valitsin","add-via-duration-button-label-open":"Sulje välipisteen {{index}} pysähdyksen kesto valitsin",airplane:"Lentokone",arrival:"Perillä",back:"Takaisin",vehiclerentalstation:"Pyöräasema",bikepark:"Liityntäpyöräparkki",bus:"bussi",cancel:"Peruuta",carpark:"Liityntäpysäkointi","clear-button-label":"Tyhjennä","clear-search-history":"Tyhjennä hakuhistoria",currentposition:"Tämänhetkinen sijainti",delete:"Poista","delete-old-searches-header":"Haluatko tyhjentää hakuhistorian?",departure:"Lähtöaika",destination:"Määränpää",favourite:"Suosikki",ferry:"Lautta","future-route":"Tuleva reitti","give-origin":"Lähtöpaikka","give-destination":"Määränpää",origin:"Lähtöpaikka","origin-stop-near-you":"Lähtöpaikka",ownlocations:"Omat paikat",loading:"Ladataan...","minute-short":"min",platform:"Laituri",rail:"Juna",required:"pakollinen kenttä",search:"Etsi","search-address-or-place":"Hae osoitteella tai paikan nimellä","search-button-label":"Hae","search-destination":"Hae määränpäätä, linjaa tai pysäkkiä","search-destination-index":"Syötä määränpää","search-destination-results-but-no-search":"Katso tulokset viereiseltä Määränpää-välilehdeltä","search-no-results":"Ei tuloksia","search-origin":"Hae lähtöpaikkaa, linjaa tai pysäkkiä","search-origin-index":"Syötä lähtöpaikka","search-autosuggest-label":"Paikka, linja ja pysäkkihaku.","search-autosuggest-label-instructions-desktop":"Navigoi listassa nuolinäppäimillä ja valitse enterillä.","search-autosuggest-label-instructions-mobile":"Syötä sijainti ja navigoi listassa pyyhkäisemällä.","search-autosuggest-label-move-to-destination":"Valittuasi lähtöpaikan siirrytään suoraan määränpää-kenttään.","search-autosuggest-len":" Löydettiin {{count}} ehdotus","search-autosuggest-len_plural":" Löydettiin {{count}} ehdotusta","search-current-suggestion":"Tämänhetkinen valinta: {{selection}}","search-position":"Paikanna",street:"Katu",subway:"Metro",station:"Asema",stop:"Pysäkki","stop-near-you":"Linja, pysäkki tai asema","stop-near-you-airplane":"Hae lentoja tai lentoasemaa","stop-near-you-bus":"Hae bussilinjaa tai pysäkkiä","stop-near-you-citybike":"Hae kaupunkipyöräasemaa","stop-near-you-rail":"Hae lähijunaa tai asemaa","stop-near-you-subway":"Hae metrolinjaa tai asemaa","stop-near-you-tram":"Hae raitiolinjaa tai pysäkkiä","stop-route-station":"Linja- ja pysäkkihaku","today-at":"tänään klo","tomorrow-at":"huomenna klo",tram:"Raitiovaunu",track:"Raide","use-own-position":"Käytä nykyistä sijaintia","select-from-map":"Valitse sijainti kartalta","select-from-own-locations":"Valitse omista paikoista",venue:"Paikka","via-point":"Välipiste",where:"Minne mennään?",place:"Paikka"},sv:{address:"Adress","address-place-or-business":"Adress, plats eller företag","add-via-button-label":"Lägg till viapunkt","add-via-duration-button-label":"Ställ in varaktighet för viapunkten {{index}}","add-via-duration-button-label-close":"Stäng väljaren för varaktighet vid via-punkten {{index}}","add-via-duration-button-label-open":"Öppna väljaren för varaktighet vid via-punkten {{index}}",airplane:"Flyg",arrival:"Anländer",back:"Tillbaka",bikerentalstation:"Stadscykelstation",bikepark:"Anslutningsparkering för cyklar",bus:"Bussi",cancel:"Avbryt",carpark:"Infartsparkering","clear-button-label":"Töm","clear-search-history":"Töm sökhistoriken",currentposition:"Nuvarande position",delete:"Ta bort","delete-old-searches-header":"Vill du tömma sökhistoriken?",departure:"Avgångstid",destination:"Destination",favourite:"Favorit",ferry:"Färja","future-route":"Framtida rutt","give-destination":"Skriv in din destination","give-origin":"Skriv in din avfärdsplats",origin:"Avfärdsplats","origin-stop-near-you":"Avfärdsplats",ownlocations:"Egna platser",loading:"Laddar...","minute-short":"min",platform:"Plattform",rail:"Tåg",required:"obligatoriskt fält",search:"Sök","search-address-or-place":"Sök med adressen eller platsens namn","search-button-label":"Sök","search-destination":"Sök destination, linje eller hållplats","search-destination-index":"Skriv destination","search-destination-results-but-no-search":"Se resultaten under fliken Destination","search-no-results":"Inga sökresultat","search-origin":"Sök avfärdsplats, linje eller hållplats","search-origin-index":"Skriv avfärdsplats","search-position":"Sök position","search-autosuggest-label":"Plats, linje och hållplatssökning.","search-autosuggest-label-instructions-desktop":"Navigera listan med piltangenterna och välj med Enter-tangeten.","search-autosuggest-label-instructions-mobile":"Ange platsen och navigera i listan genom att svepa.","search-autosuggest-label-move-to-destination":"Efter att du valt avgångsplatsen tas du direkt till Destination-fältet.","search-autosuggest-len":"Hittade {{count}} förslag","search-current-suggestion":"Nuvarande val: {{selection}}",street:"Gata",subway:"Metro",station:"Station",stop:"Hållplats","stop-near-you":"Sök hållplatser eller linjer","stop-near-you-airplane":"Sök flyg eller flygplatser","stop-near-you-bus":"Sök busslinjer eller hållplatser","stop-near-you-citybike":"Sök stadscykelstationer","stop-near-you-rail":"Sök närtåger eller stationer","stop-near-you-subway":"Sök metrolinjer eller stationer","stop-near-you-tram":"Sök spårvagnlinjer eller hållplatser","stop-route-station":"Buss och stopp sökningen","today-at":"i dag kl","tomorrow-at":"i morgon",tram:"Spårvagn",track:"Spår","use-own-position":"Använd min position","select-from-map":"Välj position från kartan","select-from-own-locations":"Välj från egna platser",venue:"Mötesplats","via-point":"Via punkt",where:"Vart vill du åka?",place:"Plats"}});function $M(M,b){void 0===b&&(b={});var z=b.insertAt;if(M&&"undefined"!=typeof document){var p=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");O.type="text/css","top"===z&&p.firstChild?p.insertBefore(O,p.firstChild):p.appendChild(O),O.styleSheet?O.styleSheet.cssText=M:O.appendChild(document.createTextNode(M))}}var Mb={container:"styles_container__KXfyb",input:"styles_input__XmNBn",favourite:"styles_favourite__sjGcX",thin:"styles_thin__y3lnY",hasValue:"styles_hasValue__tzCTr",suggestionsContainerOpen:"styles_suggestionsContainerOpen__4AZDX",suggestionsContainer:"styles_suggestionsContainer__3dsEd",suggestionsList:"styles_suggestionsList__esTtR",suggestion:"styles_suggestion__7itfO",suggestionHighlighted:"styles_suggestionHighlighted__XUxvC","autosuggest-input-container":"styles_autosuggest-input-container__ZkKGO",origin:"styles_origin__ivlHi",destination:"styles_destination__y39VH","stop-route-station":"styles_stop-route-station__FneXd","autosuggest-input-icon":"styles_autosuggest-input-icon__uhYGQ","origin-stop-near-you":"styles_origin-stop-near-you__Ekwp-","clear-input":"styles_clear-input__Vx7B4","sr-only":"styles_sr-only__ZOrQT"};$M("input[type='text'] {\n margin: 0; }\n\n.styles_container__KXfyb {\n display: flex;\n width: 100%; }\n .styles_container__KXfyb .styles_input__XmNBn {\n font-size: 16px;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n display: flex;\n width: 100%;\n height: 44px;\n border-radius: 5px;\n border: solid 1px #888;\n background-color: #fff;\n padding-left: 50px;\n padding-right: 44px;\n line-height: 1.2;\n letter-spacing: -0.5px;\n color: #333;\n box-sizing: border-box;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none; }\n .styles_container__KXfyb .styles_input__XmNBn.styles_favourite__sjGcX {\n padding-left: 47px; }\n .styles_container__KXfyb .styles_input__XmNBn.styles_thin__y3lnY {\n height: 34px; }\n .styles_container__KXfyb .styles_input__XmNBn:focus {\n background: #fff;\n outline: none;\n border: solid 1px var(--color);\n box-shadow: 0 0 2px 1px var(--hover-color); }\n @media screen and (min-width: 768px) {\n .styles_container__KXfyb .styles_input__XmNBn {\n font-size: 15px;\n height: 44px;\n padding-left: 49px; } }\n .styles_container__KXfyb .styles_input__XmNBn::-moz-placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px; }\n .styles_container__KXfyb .styles_input__XmNBn::placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px; }\n\n.styles_hasValue__tzCTr {\n color: #333; }\n\n.styles_suggestionsContainerOpen__4AZDX {\n width: 100%;\n max-height: 44vh;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: solid 1px rgba(0, 0, 0, 0.1);\n overflow-x: hidden;\n overflow-y: scroll;\n position: absolute;\n background-color: white;\n top: calc(3 * 0.875rem + 9px);\n z-index: 20; }\n\n.styles_suggestionsContainer__3dsEd {\n background-color: white;\n z-index: 20; }\n .styles_suggestionsContainer__3dsEd .styles_suggestionsList__esTtR {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n background: white; }\n .styles_suggestionsContainer__3dsEd .styles_suggestionsList__esTtR li:hover {\n background: #f4f4f5; }\n\n.styles_suggestion__7itfO {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n cursor: pointer;\n list-style: none;\n display: block;\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap; }\n\n.styles_suggestionHighlighted__XUxvC {\n background-color: #f4f4f5; }\n\n.styles_autosuggest-input-container__ZkKGO {\n position: relative;\n width: 100%; }\n .styles_autosuggest-input-container__ZkKGO.styles_origin__ivlHi {\n z-index: 16; }\n .styles_autosuggest-input-container__ZkKGO.styles_destination__y39VH {\n z-index: 10; }\n .styles_autosuggest-input-container__ZkKGO.styles_stop-route-station__FneXd {\n z-index: 9; }\n\n.styles_autosuggest-input-icon__uhYGQ {\n display: flex;\n position: absolute;\n align-items: center;\n width: 16px;\n height: 100%;\n margin-top: 0;\n margin-left: 19px; }\n .styles_autosuggest-input-icon__uhYGQ svg {\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_origin__ivlHi svg {\n fill: #4ea700;\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_destination__y39VH svg {\n fill: #ec5188;\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_stop-route-station__FneXd svg, .styles_autosuggest-input-icon__uhYGQ.styles_favourite__sjGcX svg {\n fill: #888;\n width: 16px;\n height: 16px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_origin-stop-near-you__Ekwp- svg {\n fill: #888;\n width: 16px;\n height: 16px; }\n\nbutton.styles_clear-input__Vx7B4 {\n display: flex;\n position: absolute;\n padding: 14px 0;\n right: 0;\n width: 44px;\n height: 100%;\n color: var(--color);\n outline: none;\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.styles_clear-input__Vx7B4 svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.styles_clear-input__Vx7B4:focus {\n background-color: transparent;\n color: inherit;\n /* First apply outline that is used in Edge and Firefox */\n /* Then override outline for webkit browsers like Chrome, this has no effect on other browsers */\n outline: 5px auto -webkit-focus-ring-color; }\n button.styles_clear-input__Vx7B4:active {\n background-color: transparent;\n color: inherit; }\n button.styles_clear-input__Vx7B4:hover {\n background-color: transparent;\n color: inherit; }\n\n.styles_sr-only__ZOrQT:not(:focus, :active) {\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px; }\n");var bb={"fullscreen-root":"MobileSearch_fullscreen-root__WkMna","combobox-container":"MobileSearch_combobox-container__sRkYS","right-column":"MobileSearch_right-column__erBFe","combobox-icon":"MobileSearch_combobox-icon__xd0iZ","combobox-label":"MobileSearch_combobox-label__OqGpe",container:"MobileSearch_container__k-UVq",input:"MobileSearch_input__HbTUj","clear-input":"MobileSearch_clear-input__ILVwN",hasValue:"MobileSearch_hasValue__NYhZy",suggestion:"MobileSearch_suggestion__UBz5O",suggestionHighlighted:"MobileSearch_suggestionHighlighted__7ef5G",suggestionsContainerOpen:"MobileSearch_suggestionsContainerOpen__g7zkI",suggestionsList:"MobileSearch_suggestionsList__3pEzf","clear-search-history":"MobileSearch_clear-search-history__wblhz","mobile-modal-overlay":"MobileSearch_mobile-modal-overlay__f6Rl7","mobile-modal":"MobileSearch_mobile-modal__hNdM6","mobile-modal-content":"MobileSearch_mobile-modal-content__Yzz-V"};$M("input[type='text'] {\n margin: 0;\n padding: 0; }\n\n.MobileSearch_fullscreen-root__WkMna {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000; }\n\n.MobileSearch_combobox-container__sRkYS {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between; }\n .MobileSearch_combobox-container__sRkYS .MobileSearch_right-column__erBFe {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px; }\n\n.MobileSearch_combobox-icon__xd0iZ {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none; }\n .MobileSearch_combobox-icon__xd0iZ svg {\n fill: #007ac9;\n width: 14px;\n height: 21px;\n transform: rotate(-180deg); }\n\n.MobileSearch_combobox-label__OqGpe {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.2px;\n color: #333; }\n\n.MobileSearch_container__k-UVq {\n display: flex;\n align-items: center;\n width: 100%; }\n .MobileSearch_container__k-UVq .MobileSearch_input__HbTUj {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none; }\n .MobileSearch_container__k-UVq .MobileSearch_input__HbTUj:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff; }\n\nbutton.MobileSearch_clear-input__ILVwN {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.MobileSearch_clear-input__ILVwN svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.MobileSearch_clear-input__ILVwN:focus {\n background-color: transparent;\n color: inherit; }\n button.MobileSearch_clear-input__ILVwN:active {\n background-color: transparent;\n color: inherit; }\n button.MobileSearch_clear-input__ILVwN:hover {\n background-color: transparent;\n color: inherit; }\n\n.MobileSearch_hasValue__NYhZy {\n color: #333; }\n\n.MobileSearch_suggestion__UBz5O {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0; }\n\n.MobileSearch_suggestionHighlighted__7ef5G {\n background-color: #f4f4f5; }\n\n.MobileSearch_suggestionsContainerOpen__g7zkI {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll; }\n .MobileSearch_suggestionsContainerOpen__g7zkI .MobileSearch_suggestionsList__3pEzf {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f4f4f5; }\n\n.MobileSearch_clear-search-history__wblhz {\n display: flex;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f4f4f5;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd; }\n\n.MobileSearch_mobile-modal-overlay__f6Rl7 {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed; }\n\n.MobileSearch_mobile-modal__hNdM6 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n .MobileSearch_mobile-modal__hNdM6.ReactModal__Content--after-open > div {\n transform: translateY(0); }\n .MobileSearch_mobile-modal__hNdM6.ReactModal__Content--before-close > div {\n transform: translateY(10%); }\n\n.MobileSearch_mobile-modal-content__Yzz-V {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%); }\n");var zb={"fullscreen-root":"MobileNoScroll_fullscreen-root__zQN50","combobox-container":"MobileNoScroll_combobox-container__RDEiT","right-column":"MobileNoScroll_right-column__0P3qe","combobox-icon":"MobileNoScroll_combobox-icon__LA0rD","combobox-label":"MobileNoScroll_combobox-label__-rYsj",container:"MobileNoScroll_container__CaIIv",input:"MobileNoScroll_input__Opft5","clear-input":"MobileNoScroll_clear-input__-4SQO",hasValue:"MobileNoScroll_hasValue__jR1iW",suggestion:"MobileNoScroll_suggestion__NAWcY",suggestionHighlighted:"MobileNoScroll_suggestionHighlighted__V0GuG",suggestionsContainerOpen:"MobileNoScroll_suggestionsContainerOpen__MRa5Y",suggestionsList:"MobileNoScroll_suggestionsList__NUpJE","clear-search-history":"MobileNoScroll_clear-search-history__Cjj-1","mobile-modal-overlay":"MobileNoScroll_mobile-modal-overlay__LbLie","mobile-modal":"MobileNoScroll_mobile-modal__-Rx-A","mobile-modal-content":"MobileNoScroll_mobile-modal-content__nfrCI"};function pb(M,b){var z=Object.keys(M);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(M);b&&(p=p.filter((function(b){return Object.getOwnPropertyDescriptor(M,b).enumerable}))),z.push.apply(z,p)}return z}function Ob(M){for(var b=1;b<arguments.length;b++){var z=null!=arguments[b]?arguments[b]:{};b%2?pb(Object(z),!0).forEach((function(b){j(M,b,z[b])})):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(z)):pb(Object(z)).forEach((function(b){Object.defineProperty(M,b,Object.getOwnPropertyDescriptor(z,b))}))}return M}$M("input[type='text'] {\n margin: 0;\n padding: 0; }\n\n.MobileNoScroll_fullscreen-root__zQN50 {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000; }\n\n.MobileNoScroll_combobox-container__RDEiT {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between; }\n .MobileNoScroll_combobox-container__RDEiT .MobileNoScroll_right-column__0P3qe {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px; }\n\n.MobileNoScroll_combobox-icon__LA0rD {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none; }\n .MobileNoScroll_combobox-icon__LA0rD svg {\n fill: #007ac9;\n width: 14px;\n height: 21px;\n transform: rotate(-180deg); }\n\n.MobileNoScroll_combobox-label__-rYsj {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.2px;\n color: #333; }\n\n.MobileNoScroll_container__CaIIv {\n display: flex;\n align-items: center;\n width: 100%; }\n .MobileNoScroll_container__CaIIv .MobileNoScroll_input__Opft5 {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none; }\n .MobileNoScroll_container__CaIIv .MobileNoScroll_input__Opft5:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff; }\n\nbutton.MobileNoScroll_clear-input__-4SQO {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.MobileNoScroll_clear-input__-4SQO svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.MobileNoScroll_clear-input__-4SQO:focus {\n background-color: transparent;\n color: inherit; }\n button.MobileNoScroll_clear-input__-4SQO:active {\n background-color: transparent;\n color: inherit; }\n button.MobileNoScroll_clear-input__-4SQO:hover {\n background-color: transparent;\n color: inherit; }\n\n.MobileNoScroll_hasValue__jR1iW {\n color: #333; }\n\n.MobileNoScroll_suggestion__NAWcY {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0; }\n\n.MobileNoScroll_suggestionHighlighted__V0GuG {\n background-color: #f4f4f5; }\n\n.MobileNoScroll_suggestionsContainerOpen__MRa5Y {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll; }\n .MobileNoScroll_suggestionsContainerOpen__MRa5Y .MobileNoScroll_suggestionsList__NUpJE {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f4f4f5; }\n\n.MobileNoScroll_clear-search-history__Cjj-1 {\n display: flex;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f4f4f5;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd; }\n\n.MobileNoScroll_mobile-modal-overlay__LbLie {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed; }\n\n.MobileNoScroll_mobile-modal__-Rx-A {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n .MobileNoScroll_mobile-modal__-Rx-A.ReactModal__Content--after-open > div {\n transform: translateY(0); }\n .MobileNoScroll_mobile-modal__-Rx-A.ReactModal__Content--before-close > div {\n transform: translateY(10%); }\n\n.MobileNoScroll_mobile-modal-content__nfrCI {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%); }\n\n.MobileNoScroll_suggestionsContainerOpen__MRa5Y {\n -ms-overflow-style: none;\n /* Internet Explorer 10+ */\n scrollbar-width: none;\n /* Firefox */ }\n .MobileNoScroll_suggestionsContainerOpen__MRa5Y::-webkit-scrollbar {\n display: none;\n /* Safari and Chrome */ }\n");class ob extends X.default{constructor(M){super(M);var b=this;b.onSuggestionTouchMove=()=>{b.justSelectedSuggestion=!1,b.pressedSuggestion=null}}}var cb=M=>{var b,p=M.appElement,O=M.id,o=M.closeHandle,c=M.clearInput,A=M.value,e=M.suggestions,q=M.inputProps,n=M.fetchFunction,t=M.renderSuggestion,a=M.getSuggestionValue,i=M.ariaLabel,d=M.label,W=M.onSuggestionSelected,r=M.clearOldSearches,s=M.dialogHeaderText,u=M.dialogPrimaryButtonText,l=M.dialogSecondaryButtonText,f=M.clearInputButtonText,R=M.focusInput,L=M.color,h=M.hoverColor,B=M.accessiblePrimaryColor,m=M.searchOpen,X=M.fontWeights,g=M.showScroll?bb:zb,_=`${O}-input`,y=`${O}-label`,T=V(z.useState(!1),2),v=T[0],S=T[1],k=N.default.useRef();z.useEffect((()=>{I.default.setAppElement(p)}),[]);var w=z.useCallback((()=>{o()})),D=(M,b)=>{"clear-search-history"===b.suggestion.type?S(!0):b.suggestion.properties.arrowClicked||W(M,b)},E=M=>{var b=M&&(M.key||M.which||M.keyCode)||"";return!(!b||![13," ","Spacebar"].concat([32,"Enter"]).includes(b))&&(M.preventDefault(),!0)},C=M=>"clear-search-history"===M.type?"":a(M),P=M=>"clear-search-history"===M.type?N.default.createElement("button",{type:"button",className:g["clear-search-history"]},M.labelId):t(M);return R&&null!==(b=k.current)&&void 0!==b&&b.input&&k.current.input.focus(),N.default.createElement(I.default,{isOpen:m,className:g["mobile-modal"],overlayClassName:g["mobile-modal-overlay"],onAfterClose:w,shouldCloseOnEsc:!0},N.default.createElement("div",{className:g["mobile-modal-content"],style:{"--color":`${L}`,"--accessible-primary-color":B,"--hover-color":`${h}`,"--font-weight-medium":X.medium}},N.default.createElement("div",{className:g["combobox-container"],htmlFor:_},N.default.createElement("button",{type:"button",className:g["combobox-icon"],onClick:()=>w(),onKeyDown:M=>E(M)&&w(),"aria-label":l,tabIndex:0},N.default.createElement(x.default,{img:"arrow"})),N.default.createElement("span",{className:g["right-column"]},N.default.createElement("span",{className:g["combobox-label"],id:y},d),N.default.createElement(ob,{alwaysRenderSuggestions:!0,id:O,suggestions:e,onSuggestionsFetchRequested:n,getSuggestionValue:C,renderSuggestion:P,focusInputOnSuggestionClick:!0,shouldRenderSuggestions:()=>!0,inputProps:Ob(Ob({},q),{},{className:`${g.input} ${g[O]||""} ${q.value?g.hasValue:""}`,autoFocus:!0}),renderInputComponent:M=>N.default.createElement(N.default.Fragment,null,N.default.createElement("input",Object.assign({"aria-label":i,id:O},M)),A&&N.default.createElement("button",{type:"button",className:g["clear-input"],onClick:c,onKeyDown:M=>E(M)&&c(),"aria-label":f},N.default.createElement(x.default,{img:"close",color:L}))),theme:g,onSuggestionSelected:D,ref:k}))),N.default.createElement(H.default,{appElement:p,isModalOpen:v,handleClose:()=>S(!1),headerText:s,primaryButtonText:u,secondaryButtonText:l,primaryButtonOnClick:()=>{r(),S(!1)},secondaryButtonOnClick:()=>S(!1),color:L,hoverColor:h,fontWeights:X})))};"production"!==process.env.NODE_ENV&&(cb.propTypes={appElement:h.default.string.isRequired,id:h.default.string.isRequired,closeHandle:h.default.func.isRequired,clearInput:h.default.func.isRequired,value:h.default.string,clearInputButtonText:h.default.string.isRequired,suggestions:h.default.arrayOf(h.default.object).isRequired,inputProps:h.default.shape({onChange:h.default.func.isRequired,onBlur:h.default.func.isRequired,value:h.default.string.isRequired,placeholder:h.default.string.isRequired,className:h.default.string.isRequired}).isRequired,fetchFunction:h.default.func.isRequired,getSuggestionValue:h.default.func.isRequired,renderSuggestion:h.default.func.isRequired,onSuggestionSelected:h.default.func.isRequired,label:h.default.string.isRequired,clearOldSearches:h.default.func.isRequired,ariaLabel:h.default.string,dialogHeaderText:h.default.string,dialogPrimaryButtonText:h.default.string,dialogSecondaryButtonText:h.default.string,focusInput:h.default.bool,color:h.default.string,hoverColor:h.default.string,accessiblePrimaryColor:h.default.string.isRequired,searchOpen:h.default.bool.isRequired,fontWeights:h.default.shape({medium:h.default.number.isRequired}).isRequired,showScroll:h.default.bool}),cb.defaultProps={value:void 0,ariaLabel:void 0,dialogHeaderText:void 0,dialogPrimaryButtonText:void 0,dialogSecondaryButtonText:void 0,focusInput:!1,color:void 0,hoverColor:void 0,showScroll:void 0};var Ab,eb=xM((function(M,b){var z;"undefined"!=typeof self&&self,M.exports=(z=N.default,function(){var M={888:function(M,b,z){var p,O;O=void 0!==z.g?z.g:"undefined"!=typeof window?window:this,p=function(){return function(M){var b={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},z=function(){var M={};return Array.prototype.forEach.call(arguments,(function(b){for(var z in b){if(!b.hasOwnProperty(z))return;M[z]=b[z]}})),M},p=function(M){"#"===M.charAt(0)&&(M=M.substr(1));for(var b,z=String(M),p=z.length,O=-1,o="",c=z.charCodeAt(0);++O<p;){if(0===(b=z.charCodeAt(O)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");o+=b>=1&&b<=31||127==b||0===O&&b>=48&&b<=57||1===O&&b>=48&&b<=57&&45===c?"\\"+b.toString(16)+" ":b>=128||45===b||95===b||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122?z.charAt(O):"\\"+z.charAt(O)}return"#"+o},O=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},o=function(b){return b?(z=b,parseInt(M.getComputedStyle(z).height,10)+b.offsetTop):0;var z},c=function(b,z,p){0===b&&document.body.focus(),p||(b.focus(),document.activeElement!==b&&(b.setAttribute("tabindex","-1"),b.focus(),b.style.outline="none"),M.scrollTo(0,z))},A=function(b,z,p,O){if(z.emitEvents&&"function"==typeof M.CustomEvent){var o=new CustomEvent(b,{bubbles:!0,detail:{anchor:p,toggle:O}});document.dispatchEvent(o)}};return function(e,q){var n,t,a,i,d={cancelScroll:function(M){cancelAnimationFrame(i),i=null,M||A("scrollCancel",n)},animateScroll:function(p,e,q){d.cancelScroll();var t=z(n||b,q||{}),W="[object Number]"===Object.prototype.toString.call(p),r=W||!p.tagName?null:p;if(W||r){var s=M.pageYOffset;t.header&&!a&&(a=document.querySelector(t.header));var u,l,f,R=o(a),L=W?p:function(b,z,p,o){var c=0;if(b.offsetParent)do{c+=b.offsetTop,b=b.offsetParent}while(b);return c=Math.max(c-z-p,0),o&&(c=Math.min(c,O()-M.innerHeight)),c}(r,R,parseInt("function"==typeof t.offset?t.offset(p,e):t.offset,10),t.clip),h=L-s,N=O(),B=0,m=function(M,b){var z=b.speedAsDuration?b.speed:Math.abs(M/1e3*b.speed);return b.durationMax&&z>b.durationMax?b.durationMax:b.durationMin&&z<b.durationMin?b.durationMin:parseInt(z,10)}(h,t),X=function(b){u||(u=b),B+=b-u,f=s+h*function(M,b){var z;return"easeInQuad"===M.easing&&(z=b*b),"easeOutQuad"===M.easing&&(z=b*(2-b)),"easeInOutQuad"===M.easing&&(z=b<.5?2*b*b:(4-2*b)*b-1),"easeInCubic"===M.easing&&(z=b*b*b),"easeOutCubic"===M.easing&&(z=--b*b*b+1),"easeInOutCubic"===M.easing&&(z=b<.5?4*b*b*b:(b-1)*(2*b-2)*(2*b-2)+1),"easeInQuart"===M.easing&&(z=b*b*b*b),"easeOutQuart"===M.easing&&(z=1- --b*b*b*b),"easeInOutQuart"===M.easing&&(z=b<.5?8*b*b*b*b:1-8*--b*b*b*b),"easeInQuint"===M.easing&&(z=b*b*b*b*b),"easeOutQuint"===M.easing&&(z=1+--b*b*b*b*b),"easeInOutQuint"===M.easing&&(z=b<.5?16*b*b*b*b*b:1+16*--b*b*b*b*b),M.customEasing&&(z=M.customEasing(b)),z||b}(t,l=(l=0===m?0:B/m)>1?1:l),M.scrollTo(0,Math.floor(f)),function(b,z){var O=M.pageYOffset;if(b==z||O==z||(s<z&&M.innerHeight+O)>=N)return d.cancelScroll(!0),c(p,z,W),A("scrollStop",t,p,e),u=null,i=null,!0}(f,L)||(i=M.requestAnimationFrame(X),u=b)};0===M.pageYOffset&&M.scrollTo(0,0),function(M,b,z){b||history.pushState&&z.updateURL&&history.pushState({smoothScroll:JSON.stringify(z),anchor:M.id},document.title,M===document.documentElement?"#top":"#"+M.id)}(p,W,t),"matchMedia"in M&&M.matchMedia("(prefers-reduced-motion)").matches?c(p,Math.floor(L),!1):(A("scrollStart",t,p,e),d.cancelScroll(!0),M.requestAnimationFrame(X))}}},W=function(b){if(!b.defaultPrevented&&!(0!==b.button||b.metaKey||b.ctrlKey||b.shiftKey)&&"closest"in b.target&&(t=b.target.closest(e))&&"a"===t.tagName.toLowerCase()&&!b.target.closest(n.ignore)&&t.hostname===M.location.hostname&&t.pathname===M.location.pathname&&/#/.test(t.href)){var z,O;try{z=p(decodeURIComponent(t.hash))}catch(M){z=p(t.hash)}if("#"===z){if(!n.topOnEmptyHash)return;O=document.documentElement}else O=document.querySelector(z);(O=O||"#top"!==z?O:document.documentElement)&&(b.preventDefault(),function(b){if(history.replaceState&&b.updateURL&&!history.state){var z=M.location.hash;z=z||"",history.replaceState({smoothScroll:JSON.stringify(b),anchor:z||M.pageYOffset},document.title,z||M.location.href)}}(n),d.animateScroll(O,t))}},r=function(M){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(n)){var b=history.state.anchor;"string"==typeof b&&b&&!(b=document.querySelector(p(history.state.anchor)))||d.animateScroll(b,null,{updateURL:!1})}};return d.destroy=function(){n&&(document.removeEventListener("click",W,!1),M.removeEventListener("popstate",r,!1),d.cancelScroll(),n=null,t=null,a=null,i=null)},function(){if(!("querySelector"in document&&"addEventListener"in M&&"requestAnimationFrame"in M&&"closest"in M.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";d.destroy(),n=z(b,q||{}),a=n.header?document.querySelector(n.header):null,document.addEventListener("click",W,!1),n.updateURL&&n.popstate&&M.addEventListener("popstate",r,!1)}(),d}}(O)}.apply(b,[]),void 0===p||(M.exports=p)},432:function(M,b,z){var p=this&&this.__createBinding||(Object.create?function(M,b,z,p){void 0===p&&(p=z),Object.defineProperty(M,p,{enumerable:!0,get:function(){return b[z]}})}:function(M,b,z,p){void 0===p&&(p=z),M[p]=b[z]}),O=this&&this.__exportStar||function(M,b){for(var z in M)"default"===z||Object.prototype.hasOwnProperty.call(b,z)||p(b,M,z)};Object.defineProperty(b,"__esModule",{value:!0}),O(z(47),b),O(z(926),b),O(z(349),b),O(z(137),b),O(z(729),b),O(z(383),b),O(z(450),b),O(z(358),b),O(z(753),b),O(z(869),b),O(z(352),b),O(z(446),b),O(z(164),b),O(z(305),b),O(z(502),b)},349:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useArrowNavigation=void 0;var p=z(156);b.useArrowNavigation=function(M){var b=M.listItems,z=M.onArrowUpOrDown,O=(0,p.useState)(0),o=O[0],c=O[1],A=(0,p.useCallback)((function(M){c(M)}),[b]),e=function(M){var p=M.key;if(null==b?void 0:b.length)if("ArrowUp"===p)z&&z(),M.preventDefault(),A(o>0?o-1:b.length-1);else{if("ArrowDown"!==p)return;z&&z(),M.preventDefault(),o<b.length-1?A(o+1):A(0)}};return(0,p.useEffect)((function(){return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}})),(0,p.useEffect)((function(){A(0)}),[b]),{selectedIndex:o}}},446:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useDebounce=void 0;var p=z(156);b.useDebounce=function(M,b){void 0===b&&(b=300);var z=(0,p.useState)(M),O=z[0],o=z[1];return(0,p.useEffect)((function(){var z=setTimeout((function(){o(M)}),b);return function(){clearTimeout(z)}}),[M,b]),O}},164:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useElementSize=void 0;var p=z(156);b.useElementSize=function(){var M,b,z=(0,p.useRef)(null);return[z,{width:null===(M=null==z?void 0:z.current)||void 0===M?void 0:M.clientWidth,height:null===(b=null==z?void 0:z.current)||void 0===b?void 0:b.clientHeight}]},b.default=b.useElementSize},137:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIntersectionObserver=void 0;var p=z(156);b.useIntersectionObserver=function(M){var b=(0,p.useRef)(null),z=(0,p.useState)(!1),O=z[0],o=z[1],c=function(M){var b=M[0];o(b.isIntersecting)};return(0,p.useEffect)((function(){if(window&&window.IntersectionObserver){var z=new IntersectionObserver(c,M),p=b.current;return b.current&&z.observe(b.current),function(){p&&z.unobserve(p)}}o(!1)}),[b,M]),{containerRef:b,isVisible:O}},b.default=b.useIntersectionObserver},729:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIsBreakpoint=void 0;var p=z(156),O=z(432),o={xs:1,mobileSmall:320,mobile:375,tablet:768,tabletLarge:920,desktopSmall:1024,desktop:1260,desktopLarge:1440};b.useIsBreakpoint=function(M){var b="string"==typeof M?o[M]:M,z=(0,p.useState)(null),c=z[0],A=z[1],e=(0,p.useCallback)((function(){A(window.innerWidth)}),[]);return(0,p.useEffect)((function(){e()}),[]),(0,O.useOnResize)(e),c>=b},b.default=b.useIsBreakpoint},450:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIsLoadingAfterError=void 0;var p=z(156);b.useIsLoadingAfterError=function(M,b){var z=(0,p.useState)(b),O=z[0],o=z[1];return(0,p.useEffect)((function(){M||o(b)}),[M,b]),M&&O}},305:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIsMobile=void 0;var p=z(729);b.useIsMobile=function(){return!(0,p.useIsBreakpoint)("tablet")},b.default=b.useIsMobile},383:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIsomorphicLayoutEffect=void 0;var p=z(156);b.useIsomorphicLayoutEffect="undefined"!=typeof window?p.useLayoutEffect:p.useEffect,b.default=b.useIsomorphicLayoutEffect},753:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useOnLoseFocusWithin=void 0;var p=z(156);b.useOnLoseFocusWithin=function(M){var b=M.ref,z=M.callback,O=M.watch;(0,p.useEffect)((function(){var M=function(){var M;if(O)return(null===(M=b.current)||void 0===M?void 0:M.matches(":focus-within"))?void 0:z()};return document.addEventListener("keyup",M),function(){return document.removeEventListener("keyup",M)}}),[z,b,O])},b.default=b.useOnLoseFocusWithin},502:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useOnResize=void 0;var p=z(156);b.useOnResize=function(M){(0,p.useEffect)((function(){var b=function(){M(window.innerWidth)};return window.addEventListener("resize",b,{passive:!0}),function(){return window.removeEventListener("resize",b)}}),[])},b.default=b.useOnResize},352:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useOnWindowFocus=void 0;var p=z(156);b.useOnWindowFocus=function(M){(0,p.useEffect)((function(){var b=function(){M&&"visible"===document.visibilityState&&M()};return window.addEventListener("visibilitychange",b,!1),function(){return window.removeEventListener("visibilitychange",b)}}),[M])}},47:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useOutsideReacter=void 0;var p=z(156);b.useOutsideReacter=function(M,b){function z(z){M.current&&!M.current.contains(z.target)&&b()}(0,p.useEffect)((function(){return document.addEventListener("mousedown",z),function(){document.removeEventListener("mousedown",z)}}))}},869:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useRunAfterUpdate=void 0;var p=z(156);b.useRunAfterUpdate=function(){var M=(0,p.useRef)(null);return(0,p.useEffect)((function(){M.current&&(M.current(),M.current=null)})),function(b){M.current=b}},b.default=b.useRunAfterUpdate},926:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useScrollLock=void 0;var p=z(156);b.useScrollLock=function(){return{lock:(0,p.useCallback)((function(){var M=window.scrollY+"px",b=document.body;b.style.position="fixed",b.style.top="-"+M}),[]),unlock:(0,p.useCallback)((function(){var M=document.body,b=M.style.top,z=-1*parseInt(b||"0");M.style.position="",M.style.top="",z&&window.scrollTo(0,-1*parseInt(b||"0"))}),[])}}},358:function(M,b,z){var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(b,"__esModule",{value:!0}),b.useSmoothScroll=void 0;var O=z(156),o=p(z(888));b.useSmoothScroll=function(M){var b=(0,O.useRef)(null),z=M.ref,p=M.offset,c=void 0===p?0:p,A=M.speed,e=void 0===A?500:A;return(0,O.useEffect)((function(){b.current=new o.default(null,{speed:e,speedAsDuration:!0})}),[]),(0,O.useCallback)((function(){z&&b.current&&b.current.animateScroll(z.current,null,{offset:function(){return c},updateURL:!1})}),[c,z])}},156:function(M){M.exports=z}},b={};function p(z){var O=b[z];if(void 0!==O)return O.exports;var o=b[z]={exports:{}};return M[z].call(o.exports,o,o.exports,p),o.exports}return p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(M){if("object"==typeof window)return window}}(),p(432)}())})),qb=(Ab=eb)&&Ab.__esModule&&Object.prototype.hasOwnProperty.call(Ab,"default")?Ab.default:Ab;function nb(M,b){var z=Object.keys(M);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(M);b&&(p=p.filter((function(b){return Object.getOwnPropertyDescriptor(M,b).enumerable}))),z.push.apply(z,p)}return z}function tb(M){for(var b=1;b<arguments.length;b++){var z=null!=arguments[b]?arguments[b]:{};b%2?nb(Object(z),!0).forEach((function(b){j(M,b,z[b])})):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(z)):nb(Object(z)).forEach((function(b){Object.defineProperty(M,b,Object.getOwnPropertyDescriptor(z,b))}))}return M}QM.locale("en"),B.default.init({fallbackLng:"fi",defaultNS:"translation",interpolation:{escapeValue:!1}});var ab=M=>N.default.createElement("div",{className:Mb["spinner-loader"]},M&&M.children||N.default.createElement("span",{className:Mb["sr-only"]},B.default.t("loading")));"production"!==process.env.NODE_ENV&&(ab.propTypes={children:h.default.node}),ab.defaultProps={children:void 0};var ib=M=>{if(M&&M.GTFS.platform){var b=M.GTFS,z=b.modes,p=b.platform;return[z&&"RAIL"===z[0]?B.default.t("track"):B.default.t("platform"),p]}};function db(M){if("FutureRoute"!==M.type){if("SelectFromMap"===M.type)return["",B.default.t("select-from-map")];if("CurrentLocation"===M.type)return["",B.default.t("use-own-position")];if("SelectFromOwnLocations"===M.type)return["",B.default.t("select-from-own-locations")];var b,z=V(CM(M.properties,!0),2),p=z[0],O=z[1];if(M.properties.layer.toLowerCase().includes("bikerental")||M.properties.layer.toLowerCase().includes("bikestation"))return[b=B.default.t("vehiclerentalstation"),p,void 0,M.properties.labelId];if("bikepark"===M.properties.layer)return[b=B.default.t("bikepark"),p,void 0,void 0];if("carpark"===M.properties.layer)return[b=B.default.t("carpark"),p,void 0,void 0];if(M.properties.mode)b=B.default.t(M.properties.mode.toLowerCase().replace("favourite",""));else{var o=M.properties.layer.replace("route-","").toLowerCase().replace("favourite","");b=B.default.t(o)}if(M.properties.id&&("stop"===M.properties.layer||"station"===M.properties.layer)){var c,A=EM(M.properties),e=null===(c=M.properties.addendum)||void 0===c?void 0:c.GTFS.modes,q=ib(M.properties.addendum);return[b,lM(p,A),O,A,e,q]}if("favouriteStop"===M.properties.layer||"favouriteStation"===M.properties.layer){var n=M.properties,t=n.address,a=n.code;return[b,t?lM(t.split(",")[0],a):p,O,a,void 0,ib(M.properties.addendum)]}return[b,p,O]}var i=M.properties,d=i.origin,W=i.destination,r=d.locality?`, ${d.locality} foobar`:"",s=W.locality?`, ${W.locality}`:"",u=d.name,l=W.name;return[B.default.t("future-route"),`${B.default.t("origin")} ${u}${r} ${B.default.t("destination")} ${l}${s}`,M.translatedText]}function Wb(M){var b=QM.unix(M.properties.time),z=M.properties.arriveBy?B.default.t("arrival"):B.default.t("departure");return z=`${z=b.isSame(QM(),"day")?`${z} ${B.default.t("today-at")}`:b.isSame(QM().add(1,"day"),"day")?`${z} ${B.default.t("tomorrow-at")}`:`${z} ${b.format("dd D.M.")}`} ${QM(b).format("HH:mm")}`}var rb=M=>"SelectFromOwnLocations"===M.type||"back"===M.type?"":function(M){var b=CM(M,!0);switch(M.layer){case"selectFromMap":case"currentPosition":case"ownLocations":case"back":return b[1]||b[0];case"favouriteVehicleRentalStation":case"favouritePlace":return b[0];default:return b.length>1&&""!==b[1]?b.join(", "):b[1]||b[0]}}(M.properties);class sb extends N.default.Component{constructor(M){super(M),j(this,"onChange",((M,b)=>{var z=b.newValue,p=b.method,O={value:this.fInput||z||"",renderMobileSearch:this.props.isMobile};if(this.fInput=null,this.state.editing){if("enter"!==p||this.state.valid){if(this.state.typingTimer&&clearTimeout(this.state.typingTimer),"type"===p){var o=setTimeout((()=>{this.setState({typing:!1})}),1e3);O.typingTimer=o,O.typing=!0}this.setState(O)}}else O.editing=!0,this.setState(O,(()=>this.fetchFunction({value:z||""})))})),j(this,"onBlur",(()=>{this.state.renderMobileSearch||(this.state.editing&&this.input.focus(),this.setState({editing:!1,renderMobileSearch:!1,value:this.props.value}))})),j(this,"onSelected",((M,b)=>{if(this.state.valid){if("SelectFromOwnLocations"===b.suggestion.type)return void this.setState({sources:["Favourite","Back"],ownPlaces:!0,pendingSelection:b.suggestion.type,value:""},(()=>{this.fetchFunction({value:""})}));if("back"===b.suggestion.type||"FutureRoute"===b.suggestion.type)return void this.setState({sources:this.props.sources,ownPlaces:!1,pendingSelection:b.suggestion.type,suggestionIndex:b.suggestionIndex},(()=>{this.fetchFunction({value:""})}));this.selectionDone=!0,this.setState({editing:!1,value:b.suggestionValue},(()=>{this.input.blur(),this.props.handleViaPoints?this.props.handleViaPoints(b.suggestion,b.suggestionIndex):this.props.onSelect(b.suggestion,this.props.id),this.setState({renderMobileSearch:!1,sources:this.props.sources,ownPlaces:!1,suggestions:[]},(()=>{this.selectionDone=!1})),!this.props.focusChange||this.props.isMobile&&!this.props.isEmbedded||this.props.focusChange(),this.props.isMobile&&this.closeMobileSearch()}))}else this.setState((M=>({pendingSelection:M.value})),(()=>this.checkPendingSelection()))})),j(this,"onSuggestionsClearRequested",(()=>{this.setState({suggestions:[],sources:this.props.sources,ownPlaces:!1,editing:!1})})),j(this,"checkPendingSelection",(()=>{"SelectFromOwnLocations"!==this.state.pendingSelection&&"back"!==this.state.pendingSelection||!this.state.valid?this.state.pendingSelection&&this.state.valid&&this.setState({pendingSelection:null,editing:!1},(()=>{this.state.suggestions.length&&(this.input.blur(),this.props.onSelect(this.state.suggestions[this.state.suggestionIndex],this.props.id),this.props.isMobile&&this.closeMobileSearch(),!this.props.focusChange||this.props.isMobile&&!this.props.isEmbedded||this.props.focusChange())})):this.setState({pendingSelection:null,editing:!0},(()=>{this.input.focus()}))})),j(this,"clearButton",(()=>N.default.createElement("button",{type:"button",className:Mb["clear-input"],onClick:this.clearInput,"aria-label":B.default.t("clear-button-label")},N.default.createElement(x.default,{img:"close",color:this.props.color})))),j(this,"fetchFunction",(M=>{var b=M.value,z=M.cleanExecuted;return this.setState({valid:!1,cleanExecuted:z||!1},(()=>{if(!this.selectionDone){var M,z=Y.default(this.props.targets)||this.props.targets.includes("Locations");this.state.ownPlaces?(M=["Locations"],(Y.default(this.props.targets)||this.props.targets.includes("Stops"))&&M.push("Stops"),(Y.default(this.props.targets)||this.props.targets.includes("VehicleRentalStations"))&&M.push("VehicleRentalStations")):Y.default(this.props.targets)||(M=[...this.props.targets],z&&!this.props.isMobile&&(Y.default(this.props.sources)||this.props.sources.includes("Favourite"))&&M.push("SelectFromOwnLocations")),((M,b,z,p,O,o,c,A,e,q)=>{A(null),wM(M,b,z,p,O,o,c,A,e,q)})(M,this.state.sources&&this.state.sources.filter((M=>!(z&&"Favourite"===M&&!this.state.ownPlaces&&!this.props.isMobile))),this.props.transportMode,this.props.searchContext,this.props.filterResults,this.props.geocodingSize,{input:b||""},(M=>{if(null!=M){var z=(M.results||[]).filter((M=>"FutureRoute"!==M.type||"FutureRoute"===M.type&&M.properties.time>QM().unix())).map((M=>{if("CurrentLocation"===M.type||"SelectFromMap"===M.type||"SelectFromOwnLocations"===M.type||"back"===M.type){var b=tb({},M);return b.properties.labelId=B.default.t(M.properties.labelId),b}return M}));b!==this.state.value&&b!==this.state.pendingSelection&&"SelectFromOwnLocations"!==this.state.pendingSelection&&"back"!==this.state.pendingSelection&&"FutureRoute"!==this.state.pendingSelection||this.setState({valid:!0,suggestions:z},(()=>this.checkPendingSelection()))}}),this.props.pathOpts,this.props.refPoint)}}))})),j(this,"clearInput",(()=>{var M={editing:!0,value:"",sources:this.props.sources,ownPlaces:!1,renderMobileSearch:this.props.isMobile};this.setState(M,(()=>this.fetchFunction({value:"",cleanExecuted:!0}))),this.props.onClear&&this.props.onClear(this.props.id),this.input.focus()})),j(this,"inputClicked",(M=>{if(this.input.focus(),this.clearLocationText(),this.props.isMobile&&this.props.lock(),this.state.editing)this.props.isMobile&&!this.state.renderMobileSearch&&this.setState({renderMobileSearch:!0});else{var b={editing:!0,pendingSelection:null,renderMobileSearch:this.props.isMobile},z={editing:!0,pendingSelection:null,value:M};this.state.suggestions.length?(this.fetchFunction({value:this.state.value}),this.setState(b)):"object"!=typeof M&&M?this.setState(z,(()=>this.fetchFunction({value:M}))):this.setState(b,(()=>this.fetchFunction({value:this.state.value})))}})),j(this,"storeInputReference",(M=>{null!==M&&(this.input=M.input,this.props.storeRef&&this.props.storeRef(M.input))})),j(this,"fillInput",(M=>{this.fInput=M.properties.name;var b={editing:!0,value:M.properties.name,checkPendingSelection:M,valid:!0};this.setState(b),this.fetchFunction({value:M.properties.name}),this.input.focus()})),j(this,"renderItem",(M=>{var b="FutureRoute"===M.type?tb(tb({},M),{},{translatedText:Wb(M)}):M,z=db(M);return N.default.createElement(w.default,{item:b,content:z,loading:!this.state.valid,isMobile:this.props.isMobile,ariaFavouriteString:B.default.t("favourite"),color:this.props.color,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fillInput:this.fillInput,fontWeights:this.props.fontWeights,getAutoSuggestIcons:this.props.getAutoSuggestIcons,modeIconColors:this.props.modeIconColors,modeSet:this.props.modeSet})})),j(this,"closeMobileSearch",(()=>{this.props.unlock(),this.setState({renderMobileSearch:!1,value:this.props.value},(()=>{window.scrollTo(0,this.state.scrollY),this.onSuggestionsClearRequested()}))})),j(this,"keyDown",(M=>{if(!this.selectionDone){var b=M.key;if("Escape"===b&&this.setState({editing:!1}),this.state.editing)return"Enter"===b&&""!==this.state.value&&this.setState({pendingSelection:!0},(()=>{this.fetchFunction({value:this.state.value})})),void this.inputClicked();if("Enter"!==b&&"ArrowDown"!==b||""!==this.state.value){if("ArrowDown"===b&&""!==this.state.value){var z={editing:!0,value:this.state.value};this.setState(z,(()=>this.fetchFunction({value:this.state.value})))}this.state.editing||this.setState({editing:!0}),"Tab"===b&&this.onBlur()}else this.clearInput()}})),j(this,"suggestionAsAriaContent",(()=>{var M=[],b=this.state.suggestions[0];return b&&(b.type&&b.type.includes("Favourite")&&M.push(B.default.t("favourite")),M=M.concat(db(this.state.suggestions[0]))),[...new Set(M)].join(" - ")})),j(this,"clearOldSearches",(()=>{var M=this.props.searchContext,b=M.context,z=M.clearOldSearches,p=M.clearFutureRoutes;b&&z&&(z(b),p&&p(b),this.fetchFunction({value:this.state.value}))})),j(this,"isOriginDestinationOrViapoint",(()=>"origin"===this.props.id||"destination"===this.props.id||"via-point"===this.props.id||"origin-stop-near-you"===this.props.id)),j(this,"clearLocationText",(()=>{["Valittu sijainti","Nykyinen sijaintisi","Current position","Selected location","Vald position","Använd min position","Min position","Käytä nykyistä sijaintia","Use current location","Your current location"].includes(this.state.value)&&this.clearInput()})),j(this,"onFocus",(()=>{this.clearLocationText();var M=window.pageYOffset;return this.setState({scrollY:M})})),QM.tz.setDefault(M.timeZone),QM.locale(M.lang),this.state={value:M.value,suggestions:[],editing:!1,valid:!0,renderMobileSearch:!1,sources:M.sources,ownPlaces:!1,typingTimer:null,typing:!1,pendingSelection:null,suggestionIndex:0,cleanExecuted:!1,scrollY:0},Object.keys(ZM).forEach((M=>{B.default.addResourceBundle(M,"translation",ZM[M])}))}shouldComponentUpdate(M,b){return!D.default(b,this.state)||!D.default(M,this.props)}componentDidUpdate(){B.default.language!==this.props.lang&&B.default.changeLanguage(this.props.lang)}UNSAFE_componentWillReceiveProps(M){M.value===this.state.value||this.state.editing||this.setState({value:M.value})}render(){B.default.language!==this.props.lang&&B.default.changeLanguage(this.props.lang);var M=this.state,b=M.value,z=M.suggestions,p=M.renderMobileSearch,O=M.cleanExecuted,o={placeholder:this.props.translatedPlaceholder?this.props.translatedPlaceholder:B.default.t(this.props.placeholder),value:b,onChange:this.onChange,onBlur:this.onBlur,className:`${Mb.input} ${this.props.isMobile&&this.props.transportMode?Mb.thin:""} ${Mb[this.props.id]||""} ${this.state.value?Mb.hasValue:""} ${this.props.inputClassName}`,onKeyDown:this.keyDown,required:this.props.required},c=this.props.id.replace("searchfield-",""),A=this.props.ariaLabel||B.default.t(c);A=A.replace("searchfield-","").concat(".");var e=this.props.required?`${B.default.t("required")}.`:"",q=this.props.isMobile?B.default.t("search-autosuggest-label-instructions-mobile"):B.default.t("search-autosuggest-label-instructions-desktop"),n="origin"===this.props.id?B.default.t("search-autosuggest-label-move-to-destination"):"",t=q.concat(" ").concat(n),a=B.default.t("search-autosuggest-len",{count:z.length}),i=()=>this.suggestionAsAriaContent()||this.props.value?B.default.t("search-current-suggestion",{selection:this.suggestionAsAriaContent().toLowerCase()||this.props.value}):"";return N.default.createElement(N.default.Fragment,null,N.default.createElement("span",{className:Mb["sr-only"],role:"alert"},!this.state.typing&&this.state.editing&&`${a} ${i()}`),this.props.isMobile&&N.default.createElement(cb,{searchOpen:p,appElement:this.props.appElement,clearOldSearches:this.clearOldSearches,id:this.props.id,clearInput:this.clearInput,value:this.state.value,suggestions:[...z,{type:"clear-search-history",labelId:B.default.t("clear-search-history")}],inputProps:tb(tb({},o),{},{placeholder:this.isOriginDestinationOrViapoint()?B.default.t("address-place-or-business"):o.placeholder}),fetchFunction:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:rb,renderSuggestion:this.renderItem,closeHandle:this.closeMobileSearch,ariaLabel:e.concat(" ").concat(A).concat(" ").concat(i()),label:this.props.mobileLabel?this.props.mobileLabel:B.default.t(this.props.id),onSuggestionSelected:this.onSelected,dialogHeaderText:B.default.t("delete-old-searches-header"),dialogPrimaryButtonText:B.default.t("delete"),dialogSecondaryButtonText:B.default.t("cancel"),clearInputButtonText:B.default.t("clear-button-label"),focusInput:O,color:this.props.color,hoverColor:this.props.hoverColor,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fontWeights:this.props.fontWeights,showScroll:this.props.showScroll}),!p&&N.default.createElement("div",{className:m.default(Mb["autosuggest-input-container"],Mb[this.props.id]),style:{"--color":`${this.props.color}`,"--hover-color":`${this.props.hoverColor}`}},this.props.icon&&N.default.createElement("div",{className:m.default(Mb["autosuggest-input-icon"],Mb[this.props.id],this.props.inputClassName&&`${this.props.inputClassName}-input-icon`),"aria-label":e.concat(" ").concat(A).concat(" ").concat(B.default.t("search-autosuggest-label"))},N.default.createElement(x.default,{img:`${this.props.icon}`})),N.default.createElement(X.default,{alwaysRenderSuggestions:this.state.editing,id:this.props.id,suggestions:z,onSuggestionsFetchRequested:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:rb,renderSuggestion:this.renderItem,inputProps:tb(tb({},o),{},{onFocus:this.onFocus}),focusInputOnSuggestionClick:!0,shouldRenderSuggestions:()=>this.state.editing,highlightFirstSuggestion:!this.state.ownPlaces,theme:Mb,renderInputComponent:M=>N.default.createElement(N.default.Fragment,null,N.default.createElement("label",{className:Mb["sr-only"],htmlFor:this.props.id},i().concat(" ").concat(e).concat(" ").concat(A).concat(" ").concat(t)),N.default.createElement("input",Object.assign({"aria-label":i().concat(" ").concat(e).concat(" ").concat(A).concat(" ").concat(t),id:this.props.id,onClick:this.inputClicked,onKeyDown:this.keyDown},M)),this.state.value&&this.clearButton()),onSuggestionSelected:this.onSelected,ref:this.storeInputReference})))}}j(sb,"defaultProps",{autoFocus:!1,className:"",icon:void 0,value:"",transportMode:void 0,filterResults:void 0,onClear:void 0,lang:"fi",storeRef:void 0,handleViaPoints:void 0,focusChange:void 0,getAutoSuggestIcons:void 0,sources:[],targets:void 0,isMobile:!1,isEmbedded:!1,geocodingSize:void 0,color:"#007ac9",hoverColor:"#0062a1",accessiblePrimaryColor:"#0074be",timeZone:"Europe/Helsinki",pathOpts:{routesPrefix:"linjat",stopsPrefix:"pysakit"},ariaLabel:void 0,mobileLabel:void 0,inputClassName:"",translatedPlaceholder:void 0,fontWeights:{medium:500},modeIconColors:{"mode-bus":"#007ac9","mode-rail":"#8c4799","mode-tram":"#008151","mode-metro":"#ed8c00","mode-ferry":"#007A97","mode-citybike":"#f2b62d","mode-funicular":"#ff00ff"},required:!1,modeSet:void 0,showScroll:!1,refPoint:{}}),"production"!==process.env.NODE_ENV&&(sb.propTypes={appElement:h.default.string.isRequired,autoFocus:h.default.bool,className:h.default.string,icon:h.default.string,id:h.default.string.isRequired,placeholder:h.default.string.isRequired,translatedPlaceholder:h.default.string,value:h.default.string,searchContext:h.default.object.isRequired,ariaLabel:h.default.string,onSelect:h.default.func.isRequired,transportMode:h.default.string,filterResults:h.default.func,geocodingSize:h.default.number,onClear:h.default.func,storeRef:h.default.func,handleViaPoints:h.default.func,focusChange:h.default.func,lang:h.default.string,sources:h.default.arrayOf(h.default.string),targets:h.default.arrayOf(h.default.string),isMobile:h.default.bool,color:h.default.string,hoverColor:h.default.string,accessiblePrimaryColor:h.default.string,timeZone:h.default.string,pathOpts:h.default.shape({routesPrefix:h.default.string,stopsPrefix:h.default.string}),mobileLabel:h.default.string,lock:h.default.func.isRequired,unlock:h.default.func.isRequired,refPoint:h.default.shape({address:h.default.string,lat:h.default.number,lon:h.default.number}),inputClassName:h.default.string,fontWeights:h.default.shape({medium:h.default.number}),modeIconColors:h.default.objectOf(h.default.string),getAutoSuggestIcons:h.default.objectOf(h.default.func),required:h.default.bool,modeSet:h.default.string,showScroll:h.default.bool,isEmbedded:h.default.bool});var ub,lb=(ub=sb,M=>{var b=qb.useScrollLock(),z=b.lock,p=b.unlock;return N.default.createElement(ub,Object.assign({lock:z,unlock:p},M))});M.default=lb,Object.defineProperty(M,"__esModule",{value:!0})}));
15
+ function b(M,b,z,p){var O={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[M+" Tage",M+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[M+" Monate",M+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[M+" Jahre",M+" Jahren"]};return b?O[z][0]:O[z][1]}return M.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:b,mm:"%d Minuten",h:b,hh:"%d Stunden",d:b,dd:b,w:b,ww:"%d Wochen",M:b,MM:b,y:b,yy:b},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},z(JM)})),{de:{address:"Adresse","address-place-or-business":"Adress, Ort or Geschäft","add-via-button-label":"Füge Zwischenziel hinzu","add-via-duration-button-label":"Set stop duration at via point {{index}}","add-via-duration-button-label-close":"Close stop duration selector at via point {{index}}","add-via-duration-button-label-open":"Open stop duration selector at via point {{index}}",airplane:"Flug",arrival:"Ankunft",back:"Zurück",bikerentalstation:"Leihrad-Station",bus:"Bus",cancel:"Abbrechen","clear-button-label":"Löschen","clear-search-history":"Suchhistorie löschen",currentposition:"Aktuelle Position",delete:"Löschen","delete-old-searches-header":"Wollen Sie die Such-Historie löschen?",departure:"Abfahrt",destination:"Ziel","give-origin":"Start eingeben.","give-destination":"Ziel eingeben.",favourite:"Favoriten",ferry:"Fähre","future-route":"Zukünftige Verbindung",origin:"Start","origin-stop-near-you":"Start",ownlocations:"Eigene Favoriten",loading:"Laden...","minute-short":"min",rail:"Zug",search:"Suche","search-address-or-place":"Suche anhand von Adresse oder Ortsangabe","search-button-label":"Suche","search-destination":"Suche Zielort, Linie or Haltestelle","search-destination-index":"Zielort eingeben","search-destination-results-but-no-search":"Ergebnisse in “Zielort”-Reiter anzeigen","search-no-results":"Kein Ort gefunden.","search-origin":"Suche Startort, Linie oder Haltestelle","search-origin-index":"Startort eingeben","search-position":"Standort ermitteln","search-autosuggest-label":"Venue, place and stopsearch.","search-autosuggest-label-instructions-desktop":"Navigate list with arrow keys and select with enter key.","search-autosuggest-label-instructions-mobile":"Enter the location and navigate in the list by swiping.","search-autosuggest-label-move-to-destination":"After selecting the starting location you are automatically moved to the destination field.","search-autosuggest-len":"There is {{count}} suggestion available","search-autosuggest-len_plural":"There are {{count}} suggestions available","search-current-suggestion":"Aktuelle Auswahl: {{selection}}",street:"Straße",subway:"U-Bahn",station:"Station",stop:"Haltestelle","stop-near-you":"Suche Haltestellen und Linien in der Nähe","stop-near-you-bus":"Suche Buslinien or Haltestellen","stop-near-you-citybike":"Suche Leihrad-Stationen","stop-near-you-rail":"Suche Zugverbindungen oder Bahnhöfe","stop-near-you-subway":"Suche U-Bahn-Linien oder Haltestellen","stop-near-you-tram":"Suche Stadtbahn-Haltestellen-Suche","today-at":"Heute um","tomorrow-at":"Morgen um",tram:"Straßenbahn","use-own-position":"Benutze aktuellen Standort","select-from-map":"Wähle Position anhand Karte","select-from-own-locations":"Aus eigenen Favoriten auswählen",venue:"Venue","via-point":"Zwischenziel",where:"Wohin?",place:"Ort"},en:{address:"Address","address-place-or-business":"Address, place or business","add-via-button-label":"Add via point","add-via-duration-button-label":"Set stop duration at via point {{index}}","add-via-duration-button-label-close":"Close stop duration selector at via point {{index}}","add-via-duration-button-label-open":"Open stop duration selector at via point {{index}}",airplane:"Flight",arrival:"Arrival",back:"Back",bikepark:"Park & Ride for bikes",bikerentalstation:"Bike station",bus:"bus",cancel:"Cancel",carpark:"Park & Ride","clear-button-label":"Clear","clear-search-history":"Clear search history",currentposition:"Current position",delete:"Delete","delete-old-searches-header":"Do you want to clear the search history?",departure:"Departure",destination:"Destination","give-origin":"Enter your origin.","give-destination":"Enter your destination",favourite:"Favourite",ferry:"Ferry","future-route":"Future route",origin:"Start","origin-stop-near-you":"Start",ownlocations:"Own locations",loading:"Loading...","minute-short":"m",platform:"Platform",rail:"Train",required:"required field",search:"Search","search-address-or-place":"Search by address or place name","search-button-label":"Search","search-destination":"Search destination, route or stop","search-destination-index":"Enter destination","search-destination-results-but-no-search":"View results in the adjacent “Destination” tab","search-no-results":"No location","search-origin":"Search origin, route or stop","search-origin-index":"Enter origin","search-position":"Detect location","search-autosuggest-label":"Venue, place and stopsearch.","search-autosuggest-label-instructions-desktop":"Navigate list with arrow keys and select with enter key.","search-autosuggest-label-instructions-mobile":"Enter the location and navigate in the list by swiping.","search-autosuggest-label-move-to-destination":"After selecting the starting location you are automatically moved to the destination field.","search-autosuggest-len":"There is {{count}} suggestion available","search-autosuggest-len_plural":"There are {{count}} suggestions available","search-current-suggestion":"Current selection: {{selection}}",street:"Street",subway:"Metro",station:"Station",stop:"Stop","stop-near-you":"Search stops and routes","stop-near-you-airplane":"Search flights or airports","stop-near-you-bus":"Search bus routes or stops","stop-near-you-citybike":"Search city bike stations","stop-near-you-rail":"Search train routes or stations","stop-near-you-subway":"Search metro routes or stations ","stop-near-you-tram":"Search tram routes or stops","stop-route-station":"Bus and stop search","today-at":"today at","tomorrow-at":"tomorrow at",tram:"Tram",track:"Track","use-own-position":"Use current location","select-from-map":"Select position from map","select-from-own-locations":"Select from own locations",venue:"Venue","via-point":"Via point",where:"Where to?",place:"Location"},fi:{address:"Osoite","address-place-or-business":"Osoite, paikka tai yritys","add-via-button-label":"Lisää välipiste","add-via-duration-button-label":"Aseta välipisteelle {{index}} pysähdyksen kesto","add-via-duration-button-label-close":"Avaa välipisteen {{index}} pysähdyksen kesto valitsin","add-via-duration-button-label-open":"Sulje välipisteen {{index}} pysähdyksen kesto valitsin",airplane:"Lentokone",arrival:"Perillä",back:"Takaisin",vehiclerentalstation:"Pyöräasema",bikepark:"Liityntäpyöräparkki",bus:"bussi",cancel:"Peruuta",carpark:"Liityntäpysäkointi","clear-button-label":"Tyhjennä","clear-search-history":"Tyhjennä hakuhistoria",currentposition:"Tämänhetkinen sijainti",delete:"Poista","delete-old-searches-header":"Haluatko tyhjentää hakuhistorian?",departure:"Lähtöaika",destination:"Määränpää",favourite:"Suosikki",ferry:"Lautta","future-route":"Tuleva reitti","give-origin":"Lähtöpaikka","give-destination":"Määränpää",origin:"Lähtöpaikka","origin-stop-near-you":"Lähtöpaikka",ownlocations:"Omat paikat",loading:"Ladataan...","minute-short":"min",platform:"Laituri",rail:"Juna",required:"pakollinen kenttä",search:"Etsi","search-address-or-place":"Hae osoitteella tai paikan nimellä","search-button-label":"Hae","search-destination":"Hae määränpäätä, linjaa tai pysäkkiä","search-destination-index":"Syötä määränpää","search-destination-results-but-no-search":"Katso tulokset viereiseltä Määränpää-välilehdeltä","search-no-results":"Ei tuloksia","search-origin":"Hae lähtöpaikkaa, linjaa tai pysäkkiä","search-origin-index":"Syötä lähtöpaikka","search-autosuggest-label":"Paikka, linja ja pysäkkihaku.","search-autosuggest-label-instructions-desktop":"Navigoi listassa nuolinäppäimillä ja valitse enterillä.","search-autosuggest-label-instructions-mobile":"Syötä sijainti ja navigoi listassa pyyhkäisemällä.","search-autosuggest-label-move-to-destination":"Valittuasi lähtöpaikan siirrytään suoraan määränpää-kenttään.","search-autosuggest-len":" Löydettiin {{count}} ehdotus","search-autosuggest-len_plural":" Löydettiin {{count}} ehdotusta","search-current-suggestion":"Tämänhetkinen valinta: {{selection}}","search-position":"Paikanna",street:"Katu",subway:"Metro",station:"Asema",stop:"Pysäkki","stop-near-you":"Linja, pysäkki tai asema","stop-near-you-airplane":"Hae lentoja tai lentoasemaa","stop-near-you-bus":"Hae bussilinjaa tai pysäkkiä","stop-near-you-citybike":"Hae kaupunkipyöräasemaa","stop-near-you-rail":"Hae lähijunaa tai asemaa","stop-near-you-subway":"Hae metrolinjaa tai asemaa","stop-near-you-tram":"Hae raitiolinjaa tai pysäkkiä","stop-route-station":"Linja- ja pysäkkihaku","today-at":"tänään klo","tomorrow-at":"huomenna klo",tram:"Raitiovaunu",track:"Raide","use-own-position":"Käytä nykyistä sijaintia","select-from-map":"Valitse sijainti kartalta","select-from-own-locations":"Valitse omista paikoista",venue:"Paikka","via-point":"Välipiste",where:"Minne mennään?",place:"Paikka"},sv:{address:"Adress","address-place-or-business":"Adress, plats eller företag","add-via-button-label":"Lägg till viapunkt","add-via-duration-button-label":"Ställ in varaktighet för viapunkten {{index}}","add-via-duration-button-label-close":"Stäng väljaren för varaktighet vid via-punkten {{index}}","add-via-duration-button-label-open":"Öppna väljaren för varaktighet vid via-punkten {{index}}",airplane:"Flyg",arrival:"Anländer",back:"Tillbaka",bikerentalstation:"Stadscykelstation",bikepark:"Anslutningsparkering för cyklar",bus:"Bussi",cancel:"Avbryt",carpark:"Infartsparkering","clear-button-label":"Töm","clear-search-history":"Töm sökhistoriken",currentposition:"Nuvarande position",delete:"Ta bort","delete-old-searches-header":"Vill du tömma sökhistoriken?",departure:"Avgångstid",destination:"Destination",favourite:"Favorit",ferry:"Färja","future-route":"Framtida rutt","give-destination":"Skriv in din destination","give-origin":"Skriv in din avfärdsplats",origin:"Avfärdsplats","origin-stop-near-you":"Avfärdsplats",ownlocations:"Egna platser",loading:"Laddar...","minute-short":"min",platform:"Plattform",rail:"Tåg",required:"obligatoriskt fält",search:"Sök","search-address-or-place":"Sök med adressen eller platsens namn","search-button-label":"Sök","search-destination":"Sök destination, linje eller hållplats","search-destination-index":"Skriv destination","search-destination-results-but-no-search":"Se resultaten under fliken Destination","search-no-results":"Inga sökresultat","search-origin":"Sök avfärdsplats, linje eller hållplats","search-origin-index":"Skriv avfärdsplats","search-position":"Sök position","search-autosuggest-label":"Plats, linje och hållplatssökning.","search-autosuggest-label-instructions-desktop":"Navigera listan med piltangenterna och välj med Enter-tangeten.","search-autosuggest-label-instructions-mobile":"Ange platsen och navigera i listan genom att svepa.","search-autosuggest-label-move-to-destination":"Efter att du valt avgångsplatsen tas du direkt till Destination-fältet.","search-autosuggest-len":"Hittade {{count}} förslag","search-current-suggestion":"Nuvarande val: {{selection}}",street:"Gata",subway:"Metro",station:"Station",stop:"Hållplats","stop-near-you":"Sök hållplatser eller linjer","stop-near-you-airplane":"Sök flyg eller flygplatser","stop-near-you-bus":"Sök busslinjer eller hållplatser","stop-near-you-citybike":"Sök stadscykelstationer","stop-near-you-rail":"Sök närtåger eller stationer","stop-near-you-subway":"Sök metrolinjer eller stationer","stop-near-you-tram":"Sök spårvagnlinjer eller hållplatser","stop-route-station":"Buss och stopp sökningen","today-at":"i dag kl","tomorrow-at":"i morgon",tram:"Spårvagn",track:"Spår","use-own-position":"Använd min position","select-from-map":"Välj position från kartan","select-from-own-locations":"Välj från egna platser",venue:"Mötesplats","via-point":"Via punkt",where:"Vart vill du åka?",place:"Plats"}});function $M(M,b){void 0===b&&(b={});var z=b.insertAt;if(M&&"undefined"!=typeof document){var p=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");O.type="text/css","top"===z&&p.firstChild?p.insertBefore(O,p.firstChild):p.appendChild(O),O.styleSheet?O.styleSheet.cssText=M:O.appendChild(document.createTextNode(M))}}var Mb={container:"styles_container__KXfyb",input:"styles_input__XmNBn",favourite:"styles_favourite__sjGcX",thin:"styles_thin__y3lnY",hasValue:"styles_hasValue__tzCTr",suggestionsContainerOpen:"styles_suggestionsContainerOpen__4AZDX",suggestionsContainer:"styles_suggestionsContainer__3dsEd",suggestionsList:"styles_suggestionsList__esTtR",suggestion:"styles_suggestion__7itfO",suggestionHighlighted:"styles_suggestionHighlighted__XUxvC","autosuggest-input-container":"styles_autosuggest-input-container__ZkKGO",origin:"styles_origin__ivlHi",destination:"styles_destination__y39VH","stop-route-station":"styles_stop-route-station__FneXd","autosuggest-input-icon":"styles_autosuggest-input-icon__uhYGQ","origin-stop-near-you":"styles_origin-stop-near-you__Ekwp-","clear-input":"styles_clear-input__Vx7B4","sr-only":"styles_sr-only__ZOrQT"};$M("input[type='text'] {\n margin: 0; }\n\n.styles_container__KXfyb {\n display: flex;\n width: 100%; }\n .styles_container__KXfyb .styles_input__XmNBn {\n font-size: 16px;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n display: flex;\n width: 100%;\n height: 44px;\n border-radius: 5px;\n border: solid 1px #888;\n background-color: #fff;\n padding-left: 50px;\n padding-right: 44px;\n line-height: 1.2;\n letter-spacing: -0.5px;\n color: #333;\n box-sizing: border-box;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none; }\n .styles_container__KXfyb .styles_input__XmNBn.styles_favourite__sjGcX {\n padding-left: 47px; }\n .styles_container__KXfyb .styles_input__XmNBn.styles_thin__y3lnY {\n height: 34px; }\n .styles_container__KXfyb .styles_input__XmNBn:focus {\n background: #fff;\n outline: none;\n border: solid 1px var(--color);\n box-shadow: 0 0 2px 1px var(--hover-color); }\n @media screen and (min-width: 768px) {\n .styles_container__KXfyb .styles_input__XmNBn {\n font-size: 15px;\n height: 44px;\n padding-left: 49px; } }\n .styles_container__KXfyb .styles_input__XmNBn::-moz-placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px; }\n .styles_container__KXfyb .styles_input__XmNBn::placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px; }\n\n.styles_hasValue__tzCTr {\n color: #333; }\n\n.styles_suggestionsContainerOpen__4AZDX {\n width: 100%;\n max-height: 44vh;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: solid 1px rgba(0, 0, 0, 0.1);\n overflow-x: hidden;\n overflow-y: scroll;\n position: absolute;\n background-color: white;\n top: calc(3 * 0.875rem + 9px);\n z-index: 20; }\n\n.styles_suggestionsContainer__3dsEd {\n background-color: white;\n z-index: 20; }\n .styles_suggestionsContainer__3dsEd .styles_suggestionsList__esTtR {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n background: white; }\n .styles_suggestionsContainer__3dsEd .styles_suggestionsList__esTtR li:hover {\n background: #f4f4f5; }\n\n.styles_suggestion__7itfO {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n cursor: pointer;\n list-style: none;\n display: block;\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap; }\n\n.styles_suggestionHighlighted__XUxvC {\n background-color: #f4f4f5; }\n\n.styles_autosuggest-input-container__ZkKGO {\n position: relative;\n width: 100%; }\n .styles_autosuggest-input-container__ZkKGO.styles_origin__ivlHi {\n z-index: 16; }\n .styles_autosuggest-input-container__ZkKGO.styles_destination__y39VH {\n z-index: 10; }\n .styles_autosuggest-input-container__ZkKGO.styles_stop-route-station__FneXd {\n z-index: 9; }\n\n.styles_autosuggest-input-icon__uhYGQ {\n display: flex;\n position: absolute;\n align-items: center;\n width: 16px;\n height: 100%;\n margin-top: 0;\n margin-left: 19px; }\n .styles_autosuggest-input-icon__uhYGQ svg {\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_origin__ivlHi svg {\n fill: #4ea700;\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_destination__y39VH svg {\n fill: #ec5188;\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_stop-route-station__FneXd svg, .styles_autosuggest-input-icon__uhYGQ.styles_favourite__sjGcX svg {\n fill: #888;\n width: 16px;\n height: 16px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_origin-stop-near-you__Ekwp- svg {\n fill: #888;\n width: 16px;\n height: 16px; }\n\nbutton.styles_clear-input__Vx7B4 {\n display: flex;\n position: absolute;\n padding: 14px 0;\n right: 0;\n width: 44px;\n height: 100%;\n color: var(--color);\n outline: none;\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.styles_clear-input__Vx7B4 svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.styles_clear-input__Vx7B4:focus {\n background-color: transparent;\n color: inherit;\n /* First apply outline that is used in Edge and Firefox */\n /* Then override outline for webkit browsers like Chrome, this has no effect on other browsers */\n outline: 5px auto -webkit-focus-ring-color; }\n button.styles_clear-input__Vx7B4:active {\n background-color: transparent;\n color: inherit; }\n button.styles_clear-input__Vx7B4:hover {\n background-color: transparent;\n color: inherit; }\n\n.styles_sr-only__ZOrQT:not(:focus, :active) {\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px; }\n");var bb={"fullscreen-root":"MobileSearch_fullscreen-root__WkMna","combobox-container":"MobileSearch_combobox-container__sRkYS","right-column":"MobileSearch_right-column__erBFe","combobox-icon":"MobileSearch_combobox-icon__xd0iZ","combobox-label":"MobileSearch_combobox-label__OqGpe",container:"MobileSearch_container__k-UVq",input:"MobileSearch_input__HbTUj","clear-input":"MobileSearch_clear-input__ILVwN",hasValue:"MobileSearch_hasValue__NYhZy",suggestion:"MobileSearch_suggestion__UBz5O",suggestionHighlighted:"MobileSearch_suggestionHighlighted__7ef5G",suggestionsContainerOpen:"MobileSearch_suggestionsContainerOpen__g7zkI",suggestionsList:"MobileSearch_suggestionsList__3pEzf","clear-search-history":"MobileSearch_clear-search-history__wblhz","mobile-modal-overlay":"MobileSearch_mobile-modal-overlay__f6Rl7","mobile-modal":"MobileSearch_mobile-modal__hNdM6","mobile-modal-content":"MobileSearch_mobile-modal-content__Yzz-V"};$M("input[type='text'] {\n margin: 0;\n padding: 0; }\n\n.MobileSearch_fullscreen-root__WkMna {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000; }\n\n.MobileSearch_combobox-container__sRkYS {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between; }\n .MobileSearch_combobox-container__sRkYS .MobileSearch_right-column__erBFe {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px; }\n\n.MobileSearch_combobox-icon__xd0iZ {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none; }\n .MobileSearch_combobox-icon__xd0iZ svg {\n fill: #007ac9;\n width: 14px;\n height: 21px;\n transform: rotate(-180deg); }\n\n.MobileSearch_combobox-label__OqGpe {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.2px;\n color: #333; }\n\n.MobileSearch_container__k-UVq {\n display: flex;\n align-items: center;\n width: 100%; }\n .MobileSearch_container__k-UVq .MobileSearch_input__HbTUj {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none; }\n .MobileSearch_container__k-UVq .MobileSearch_input__HbTUj:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff; }\n\nbutton.MobileSearch_clear-input__ILVwN {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.MobileSearch_clear-input__ILVwN svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.MobileSearch_clear-input__ILVwN:focus {\n background-color: transparent;\n color: inherit; }\n button.MobileSearch_clear-input__ILVwN:active {\n background-color: transparent;\n color: inherit; }\n button.MobileSearch_clear-input__ILVwN:hover {\n background-color: transparent;\n color: inherit; }\n\n.MobileSearch_hasValue__NYhZy {\n color: #333; }\n\n.MobileSearch_suggestion__UBz5O {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0; }\n\n.MobileSearch_suggestionHighlighted__7ef5G {\n background-color: #f4f4f5; }\n\n.MobileSearch_suggestionsContainerOpen__g7zkI {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll; }\n .MobileSearch_suggestionsContainerOpen__g7zkI .MobileSearch_suggestionsList__3pEzf {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f4f4f5; }\n\n.MobileSearch_clear-search-history__wblhz {\n display: flex;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f4f4f5;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd; }\n\n.MobileSearch_mobile-modal-overlay__f6Rl7 {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed; }\n\n.MobileSearch_mobile-modal__hNdM6 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n .MobileSearch_mobile-modal__hNdM6.ReactModal__Content--after-open > div {\n transform: translateY(0); }\n .MobileSearch_mobile-modal__hNdM6.ReactModal__Content--before-close > div {\n transform: translateY(10%); }\n\n.MobileSearch_mobile-modal-content__Yzz-V {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%); }\n");var zb={"fullscreen-root":"MobileNoScroll_fullscreen-root__zQN50","combobox-container":"MobileNoScroll_combobox-container__RDEiT","right-column":"MobileNoScroll_right-column__0P3qe","combobox-icon":"MobileNoScroll_combobox-icon__LA0rD","combobox-label":"MobileNoScroll_combobox-label__-rYsj",container:"MobileNoScroll_container__CaIIv",input:"MobileNoScroll_input__Opft5","clear-input":"MobileNoScroll_clear-input__-4SQO",hasValue:"MobileNoScroll_hasValue__jR1iW",suggestion:"MobileNoScroll_suggestion__NAWcY",suggestionHighlighted:"MobileNoScroll_suggestionHighlighted__V0GuG",suggestionsContainerOpen:"MobileNoScroll_suggestionsContainerOpen__MRa5Y",suggestionsList:"MobileNoScroll_suggestionsList__NUpJE","clear-search-history":"MobileNoScroll_clear-search-history__Cjj-1","mobile-modal-overlay":"MobileNoScroll_mobile-modal-overlay__LbLie","mobile-modal":"MobileNoScroll_mobile-modal__-Rx-A","mobile-modal-content":"MobileNoScroll_mobile-modal-content__nfrCI"};function pb(M,b){var z=Object.keys(M);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(M);b&&(p=p.filter((function(b){return Object.getOwnPropertyDescriptor(M,b).enumerable}))),z.push.apply(z,p)}return z}function Ob(M){for(var b=1;b<arguments.length;b++){var z=null!=arguments[b]?arguments[b]:{};b%2?pb(Object(z),!0).forEach((function(b){j(M,b,z[b])})):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(z)):pb(Object(z)).forEach((function(b){Object.defineProperty(M,b,Object.getOwnPropertyDescriptor(z,b))}))}return M}$M("input[type='text'] {\n margin: 0;\n padding: 0; }\n\n.MobileNoScroll_fullscreen-root__zQN50 {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000; }\n\n.MobileNoScroll_combobox-container__RDEiT {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between; }\n .MobileNoScroll_combobox-container__RDEiT .MobileNoScroll_right-column__0P3qe {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px; }\n\n.MobileNoScroll_combobox-icon__LA0rD {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none; }\n .MobileNoScroll_combobox-icon__LA0rD svg {\n fill: #007ac9;\n width: 14px;\n height: 21px;\n transform: rotate(-180deg); }\n\n.MobileNoScroll_combobox-label__-rYsj {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.2px;\n color: #333; }\n\n.MobileNoScroll_container__CaIIv {\n display: flex;\n align-items: center;\n width: 100%; }\n .MobileNoScroll_container__CaIIv .MobileNoScroll_input__Opft5 {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none; }\n .MobileNoScroll_container__CaIIv .MobileNoScroll_input__Opft5:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff; }\n\nbutton.MobileNoScroll_clear-input__-4SQO {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.MobileNoScroll_clear-input__-4SQO svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.MobileNoScroll_clear-input__-4SQO:focus {\n background-color: transparent;\n color: inherit; }\n button.MobileNoScroll_clear-input__-4SQO:active {\n background-color: transparent;\n color: inherit; }\n button.MobileNoScroll_clear-input__-4SQO:hover {\n background-color: transparent;\n color: inherit; }\n\n.MobileNoScroll_hasValue__jR1iW {\n color: #333; }\n\n.MobileNoScroll_suggestion__NAWcY {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0; }\n\n.MobileNoScroll_suggestionHighlighted__V0GuG {\n background-color: #f4f4f5; }\n\n.MobileNoScroll_suggestionsContainerOpen__MRa5Y {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll; }\n .MobileNoScroll_suggestionsContainerOpen__MRa5Y .MobileNoScroll_suggestionsList__NUpJE {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f4f4f5; }\n\n.MobileNoScroll_clear-search-history__Cjj-1 {\n display: flex;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f4f4f5;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd; }\n\n.MobileNoScroll_mobile-modal-overlay__LbLie {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed; }\n\n.MobileNoScroll_mobile-modal__-Rx-A {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n .MobileNoScroll_mobile-modal__-Rx-A.ReactModal__Content--after-open > div {\n transform: translateY(0); }\n .MobileNoScroll_mobile-modal__-Rx-A.ReactModal__Content--before-close > div {\n transform: translateY(10%); }\n\n.MobileNoScroll_mobile-modal-content__nfrCI {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%); }\n\n.MobileNoScroll_suggestionsContainerOpen__MRa5Y {\n -ms-overflow-style: none;\n /* Internet Explorer 10+ */\n scrollbar-width: none;\n /* Firefox */ }\n .MobileNoScroll_suggestionsContainerOpen__MRa5Y::-webkit-scrollbar {\n display: none;\n /* Safari and Chrome */ }\n");class ob extends X.default{constructor(M){super(M);var b=this;b.onSuggestionTouchMove=()=>{b.justSelectedSuggestion=!1,b.pressedSuggestion=null}}}var cb=M=>{var b,p=M.appElement,O=M.id,o=M.closeHandle,c=M.clearInput,A=M.value,e=M.suggestions,q=M.inputProps,n=M.fetchFunction,t=M.renderSuggestion,a=M.getSuggestionValue,i=M.ariaLabel,d=M.label,W=M.onSuggestionSelected,r=M.clearOldSearches,s=M.dialogHeaderText,u=M.dialogPrimaryButtonText,l=M.dialogSecondaryButtonText,f=M.clearInputButtonText,R=M.focusInput,L=M.color,h=M.hoverColor,B=M.accessiblePrimaryColor,m=M.searchOpen,X=M.fontWeights,g=M.showScroll?bb:zb,_=`${O}-input`,y=`${O}-label`,T=V(z.useState(!1),2),v=T[0],S=T[1],k=N.default.useRef();z.useEffect((()=>{I.default.setAppElement(p)}),[]);var w=z.useCallback((()=>{o()})),D=(M,b)=>{"clear-search-history"===b.suggestion.type?S(!0):b.suggestion.properties.arrowClicked||W(M,b)},E=M=>{var b=M&&(M.key||M.which||M.keyCode)||"";return!(!b||![13," ","Spacebar"].concat([32,"Enter"]).includes(b))&&(M.preventDefault(),!0)},C=M=>"clear-search-history"===M.type?"":a(M),P=M=>"clear-search-history"===M.type?N.default.createElement("button",{type:"button",className:g["clear-search-history"]},M.labelId):t(M);return R&&null!==(b=k.current)&&void 0!==b&&b.input&&k.current.input.focus(),N.default.createElement(I.default,{isOpen:m,className:g["mobile-modal"],overlayClassName:g["mobile-modal-overlay"],onAfterClose:w,shouldCloseOnEsc:!0},N.default.createElement("div",{className:g["mobile-modal-content"],style:{"--color":`${L}`,"--accessible-primary-color":B,"--hover-color":`${h}`,"--font-weight-medium":X.medium}},N.default.createElement("div",{className:g["combobox-container"],htmlFor:_},N.default.createElement("button",{type:"button",className:g["combobox-icon"],onClick:()=>w(),onKeyDown:M=>E(M)&&w(),"aria-label":l,tabIndex:0},N.default.createElement(x.default,{img:"arrow"})),N.default.createElement("span",{className:g["right-column"]},N.default.createElement("span",{className:g["combobox-label"],id:y},d),N.default.createElement(ob,{alwaysRenderSuggestions:!0,id:O,suggestions:e,onSuggestionsFetchRequested:n,getSuggestionValue:C,renderSuggestion:P,focusInputOnSuggestionClick:!0,shouldRenderSuggestions:()=>!0,inputProps:Ob(Ob({},q),{},{className:`${g.input} ${g[O]||""} ${q.value?g.hasValue:""}`,autoFocus:!0}),renderInputComponent:M=>N.default.createElement(N.default.Fragment,null,N.default.createElement("input",Object.assign({"aria-label":i,id:O},M)),A&&N.default.createElement("button",{type:"button",className:g["clear-input"],onClick:c,onKeyDown:M=>E(M)&&c(),"aria-label":f},N.default.createElement(x.default,{img:"close",color:L}))),theme:g,onSuggestionSelected:D,ref:k}))),N.default.createElement(H.default,{appElement:p,isModalOpen:v,handleClose:()=>S(!1),headerText:s,primaryButtonText:u,secondaryButtonText:l,primaryButtonOnClick:()=>{r(),S(!1)},secondaryButtonOnClick:()=>S(!1),color:L,hoverColor:h,fontWeights:X})))};"production"!==process.env.NODE_ENV&&(cb.propTypes={appElement:h.default.string.isRequired,id:h.default.string.isRequired,closeHandle:h.default.func.isRequired,clearInput:h.default.func.isRequired,value:h.default.string,clearInputButtonText:h.default.string.isRequired,suggestions:h.default.arrayOf(h.default.object).isRequired,inputProps:h.default.shape({onChange:h.default.func.isRequired,onBlur:h.default.func.isRequired,value:h.default.string.isRequired,placeholder:h.default.string.isRequired,className:h.default.string.isRequired}).isRequired,fetchFunction:h.default.func.isRequired,getSuggestionValue:h.default.func.isRequired,renderSuggestion:h.default.func.isRequired,onSuggestionSelected:h.default.func.isRequired,label:h.default.string.isRequired,clearOldSearches:h.default.func.isRequired,ariaLabel:h.default.string,dialogHeaderText:h.default.string,dialogPrimaryButtonText:h.default.string,dialogSecondaryButtonText:h.default.string,focusInput:h.default.bool,color:h.default.string,hoverColor:h.default.string,accessiblePrimaryColor:h.default.string.isRequired,searchOpen:h.default.bool.isRequired,fontWeights:h.default.shape({medium:h.default.number.isRequired}).isRequired,showScroll:h.default.bool}),cb.defaultProps={value:void 0,ariaLabel:void 0,dialogHeaderText:void 0,dialogPrimaryButtonText:void 0,dialogSecondaryButtonText:void 0,focusInput:!1,color:void 0,hoverColor:void 0,showScroll:void 0};var Ab,eb=xM((function(M,b){var z;"undefined"!=typeof self&&self,M.exports=(z=N.default,function(){var M={888:function(M,b,z){var p,O;O=void 0!==z.g?z.g:"undefined"!=typeof window?window:this,p=function(){return function(M){var b={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},z=function(){var M={};return Array.prototype.forEach.call(arguments,(function(b){for(var z in b){if(!b.hasOwnProperty(z))return;M[z]=b[z]}})),M},p=function(M){"#"===M.charAt(0)&&(M=M.substr(1));for(var b,z=String(M),p=z.length,O=-1,o="",c=z.charCodeAt(0);++O<p;){if(0===(b=z.charCodeAt(O)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");o+=b>=1&&b<=31||127==b||0===O&&b>=48&&b<=57||1===O&&b>=48&&b<=57&&45===c?"\\"+b.toString(16)+" ":b>=128||45===b||95===b||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122?z.charAt(O):"\\"+z.charAt(O)}return"#"+o},O=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},o=function(b){return b?(z=b,parseInt(M.getComputedStyle(z).height,10)+b.offsetTop):0;var z},c=function(b,z,p){0===b&&document.body.focus(),p||(b.focus(),document.activeElement!==b&&(b.setAttribute("tabindex","-1"),b.focus(),b.style.outline="none"),M.scrollTo(0,z))},A=function(b,z,p,O){if(z.emitEvents&&"function"==typeof M.CustomEvent){var o=new CustomEvent(b,{bubbles:!0,detail:{anchor:p,toggle:O}});document.dispatchEvent(o)}};return function(e,q){var n,t,a,i,d={cancelScroll:function(M){cancelAnimationFrame(i),i=null,M||A("scrollCancel",n)},animateScroll:function(p,e,q){d.cancelScroll();var t=z(n||b,q||{}),W="[object Number]"===Object.prototype.toString.call(p),r=W||!p.tagName?null:p;if(W||r){var s=M.pageYOffset;t.header&&!a&&(a=document.querySelector(t.header));var u,l,f,R=o(a),L=W?p:function(b,z,p,o){var c=0;if(b.offsetParent)do{c+=b.offsetTop,b=b.offsetParent}while(b);return c=Math.max(c-z-p,0),o&&(c=Math.min(c,O()-M.innerHeight)),c}(r,R,parseInt("function"==typeof t.offset?t.offset(p,e):t.offset,10),t.clip),h=L-s,N=O(),B=0,m=function(M,b){var z=b.speedAsDuration?b.speed:Math.abs(M/1e3*b.speed);return b.durationMax&&z>b.durationMax?b.durationMax:b.durationMin&&z<b.durationMin?b.durationMin:parseInt(z,10)}(h,t),X=function(b){u||(u=b),B+=b-u,f=s+h*function(M,b){var z;return"easeInQuad"===M.easing&&(z=b*b),"easeOutQuad"===M.easing&&(z=b*(2-b)),"easeInOutQuad"===M.easing&&(z=b<.5?2*b*b:(4-2*b)*b-1),"easeInCubic"===M.easing&&(z=b*b*b),"easeOutCubic"===M.easing&&(z=--b*b*b+1),"easeInOutCubic"===M.easing&&(z=b<.5?4*b*b*b:(b-1)*(2*b-2)*(2*b-2)+1),"easeInQuart"===M.easing&&(z=b*b*b*b),"easeOutQuart"===M.easing&&(z=1- --b*b*b*b),"easeInOutQuart"===M.easing&&(z=b<.5?8*b*b*b*b:1-8*--b*b*b*b),"easeInQuint"===M.easing&&(z=b*b*b*b*b),"easeOutQuint"===M.easing&&(z=1+--b*b*b*b*b),"easeInOutQuint"===M.easing&&(z=b<.5?16*b*b*b*b*b:1+16*--b*b*b*b*b),M.customEasing&&(z=M.customEasing(b)),z||b}(t,l=(l=0===m?0:B/m)>1?1:l),M.scrollTo(0,Math.floor(f)),function(b,z){var O=M.pageYOffset;if(b==z||O==z||(s<z&&M.innerHeight+O)>=N)return d.cancelScroll(!0),c(p,z,W),A("scrollStop",t,p,e),u=null,i=null,!0}(f,L)||(i=M.requestAnimationFrame(X),u=b)};0===M.pageYOffset&&M.scrollTo(0,0),function(M,b,z){b||history.pushState&&z.updateURL&&history.pushState({smoothScroll:JSON.stringify(z),anchor:M.id},document.title,M===document.documentElement?"#top":"#"+M.id)}(p,W,t),"matchMedia"in M&&M.matchMedia("(prefers-reduced-motion)").matches?c(p,Math.floor(L),!1):(A("scrollStart",t,p,e),d.cancelScroll(!0),M.requestAnimationFrame(X))}}},W=function(b){if(!b.defaultPrevented&&!(0!==b.button||b.metaKey||b.ctrlKey||b.shiftKey)&&"closest"in b.target&&(t=b.target.closest(e))&&"a"===t.tagName.toLowerCase()&&!b.target.closest(n.ignore)&&t.hostname===M.location.hostname&&t.pathname===M.location.pathname&&/#/.test(t.href)){var z,O;try{z=p(decodeURIComponent(t.hash))}catch(M){z=p(t.hash)}if("#"===z){if(!n.topOnEmptyHash)return;O=document.documentElement}else O=document.querySelector(z);(O=O||"#top"!==z?O:document.documentElement)&&(b.preventDefault(),function(b){if(history.replaceState&&b.updateURL&&!history.state){var z=M.location.hash;z=z||"",history.replaceState({smoothScroll:JSON.stringify(b),anchor:z||M.pageYOffset},document.title,z||M.location.href)}}(n),d.animateScroll(O,t))}},r=function(M){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(n)){var b=history.state.anchor;"string"==typeof b&&b&&!(b=document.querySelector(p(history.state.anchor)))||d.animateScroll(b,null,{updateURL:!1})}};return d.destroy=function(){n&&(document.removeEventListener("click",W,!1),M.removeEventListener("popstate",r,!1),d.cancelScroll(),n=null,t=null,a=null,i=null)},function(){if(!("querySelector"in document&&"addEventListener"in M&&"requestAnimationFrame"in M&&"closest"in M.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";d.destroy(),n=z(b,q||{}),a=n.header?document.querySelector(n.header):null,document.addEventListener("click",W,!1),n.updateURL&&n.popstate&&M.addEventListener("popstate",r,!1)}(),d}}(O)}.apply(b,[]),void 0===p||(M.exports=p)},432:function(M,b,z){var p=this&&this.__createBinding||(Object.create?function(M,b,z,p){void 0===p&&(p=z),Object.defineProperty(M,p,{enumerable:!0,get:function(){return b[z]}})}:function(M,b,z,p){void 0===p&&(p=z),M[p]=b[z]}),O=this&&this.__exportStar||function(M,b){for(var z in M)"default"===z||Object.prototype.hasOwnProperty.call(b,z)||p(b,M,z)};Object.defineProperty(b,"__esModule",{value:!0}),O(z(47),b),O(z(926),b),O(z(349),b),O(z(137),b),O(z(729),b),O(z(383),b),O(z(450),b),O(z(358),b),O(z(753),b),O(z(869),b),O(z(352),b),O(z(446),b),O(z(164),b),O(z(305),b),O(z(502),b)},349:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useArrowNavigation=void 0;var p=z(156);b.useArrowNavigation=function(M){var b=M.listItems,z=M.onArrowUpOrDown,O=(0,p.useState)(0),o=O[0],c=O[1],A=(0,p.useCallback)((function(M){c(M)}),[b]),e=function(M){var p=M.key;if(null==b?void 0:b.length)if("ArrowUp"===p)z&&z(),M.preventDefault(),A(o>0?o-1:b.length-1);else{if("ArrowDown"!==p)return;z&&z(),M.preventDefault(),o<b.length-1?A(o+1):A(0)}};return(0,p.useEffect)((function(){return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}})),(0,p.useEffect)((function(){A(0)}),[b]),{selectedIndex:o}}},446:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useDebounce=void 0;var p=z(156);b.useDebounce=function(M,b){void 0===b&&(b=300);var z=(0,p.useState)(M),O=z[0],o=z[1];return(0,p.useEffect)((function(){var z=setTimeout((function(){o(M)}),b);return function(){clearTimeout(z)}}),[M,b]),O}},164:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useElementSize=void 0;var p=z(156);b.useElementSize=function(){var M,b,z=(0,p.useRef)(null);return[z,{width:null===(M=null==z?void 0:z.current)||void 0===M?void 0:M.clientWidth,height:null===(b=null==z?void 0:z.current)||void 0===b?void 0:b.clientHeight}]},b.default=b.useElementSize},137:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIntersectionObserver=void 0;var p=z(156);b.useIntersectionObserver=function(M){var b=(0,p.useRef)(null),z=(0,p.useState)(!1),O=z[0],o=z[1],c=function(M){var b=M[0];o(b.isIntersecting)};return(0,p.useEffect)((function(){if(window&&window.IntersectionObserver){var z=new IntersectionObserver(c,M),p=b.current;return b.current&&z.observe(b.current),function(){p&&z.unobserve(p)}}o(!1)}),[b,M]),{containerRef:b,isVisible:O}},b.default=b.useIntersectionObserver},729:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIsBreakpoint=void 0;var p=z(156),O=z(432),o={xs:1,mobileSmall:320,mobile:375,tablet:768,tabletLarge:920,desktopSmall:1024,desktop:1260,desktopLarge:1440};b.useIsBreakpoint=function(M){var b="string"==typeof M?o[M]:M,z=(0,p.useState)(null),c=z[0],A=z[1],e=(0,p.useCallback)((function(){A(window.innerWidth)}),[]);return(0,p.useEffect)((function(){e()}),[]),(0,O.useOnResize)(e),c>=b},b.default=b.useIsBreakpoint},450:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIsLoadingAfterError=void 0;var p=z(156);b.useIsLoadingAfterError=function(M,b){var z=(0,p.useState)(b),O=z[0],o=z[1];return(0,p.useEffect)((function(){M||o(b)}),[M,b]),M&&O}},305:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIsMobile=void 0;var p=z(729);b.useIsMobile=function(){return!(0,p.useIsBreakpoint)("tablet")},b.default=b.useIsMobile},383:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useIsomorphicLayoutEffect=void 0;var p=z(156);b.useIsomorphicLayoutEffect="undefined"!=typeof window?p.useLayoutEffect:p.useEffect,b.default=b.useIsomorphicLayoutEffect},753:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useOnLoseFocusWithin=void 0;var p=z(156);b.useOnLoseFocusWithin=function(M){var b=M.ref,z=M.callback,O=M.watch;(0,p.useEffect)((function(){var M=function(){var M;if(O)return(null===(M=b.current)||void 0===M?void 0:M.matches(":focus-within"))?void 0:z()};return document.addEventListener("keyup",M),function(){return document.removeEventListener("keyup",M)}}),[z,b,O])},b.default=b.useOnLoseFocusWithin},502:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useOnResize=void 0;var p=z(156);b.useOnResize=function(M){(0,p.useEffect)((function(){var b=function(){M(window.innerWidth)};return window.addEventListener("resize",b,{passive:!0}),function(){return window.removeEventListener("resize",b)}}),[])},b.default=b.useOnResize},352:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useOnWindowFocus=void 0;var p=z(156);b.useOnWindowFocus=function(M){(0,p.useEffect)((function(){var b=function(){M&&"visible"===document.visibilityState&&M()};return window.addEventListener("visibilitychange",b,!1),function(){return window.removeEventListener("visibilitychange",b)}}),[M])}},47:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useOutsideReacter=void 0;var p=z(156);b.useOutsideReacter=function(M,b){function z(z){M.current&&!M.current.contains(z.target)&&b()}(0,p.useEffect)((function(){return document.addEventListener("mousedown",z),function(){document.removeEventListener("mousedown",z)}}))}},869:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useRunAfterUpdate=void 0;var p=z(156);b.useRunAfterUpdate=function(){var M=(0,p.useRef)(null);return(0,p.useEffect)((function(){M.current&&(M.current(),M.current=null)})),function(b){M.current=b}},b.default=b.useRunAfterUpdate},926:function(M,b,z){Object.defineProperty(b,"__esModule",{value:!0}),b.useScrollLock=void 0;var p=z(156);b.useScrollLock=function(){return{lock:(0,p.useCallback)((function(){var M=window.scrollY+"px",b=document.body;b.style.position="fixed",b.style.top="-"+M}),[]),unlock:(0,p.useCallback)((function(){var M=document.body,b=M.style.top,z=-1*parseInt(b||"0");M.style.position="",M.style.top="",z&&window.scrollTo(0,-1*parseInt(b||"0"))}),[])}}},358:function(M,b,z){var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(b,"__esModule",{value:!0}),b.useSmoothScroll=void 0;var O=z(156),o=p(z(888));b.useSmoothScroll=function(M){var b=(0,O.useRef)(null),z=M.ref,p=M.offset,c=void 0===p?0:p,A=M.speed,e=void 0===A?500:A;return(0,O.useEffect)((function(){b.current=new o.default(null,{speed:e,speedAsDuration:!0})}),[]),(0,O.useCallback)((function(){z&&b.current&&b.current.animateScroll(z.current,null,{offset:function(){return c},updateURL:!1})}),[c,z])}},156:function(M){M.exports=z}},b={};function p(z){var O=b[z];if(void 0!==O)return O.exports;var o=b[z]={exports:{}};return M[z].call(o.exports,o,o.exports,p),o.exports}return p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(M){if("object"==typeof window)return window}}(),p(432)}())})),qb=(Ab=eb)&&Ab.__esModule&&Object.prototype.hasOwnProperty.call(Ab,"default")?Ab.default:Ab;function nb(M,b){var z=Object.keys(M);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(M);b&&(p=p.filter((function(b){return Object.getOwnPropertyDescriptor(M,b).enumerable}))),z.push.apply(z,p)}return z}function tb(M){for(var b=1;b<arguments.length;b++){var z=null!=arguments[b]?arguments[b]:{};b%2?nb(Object(z),!0).forEach((function(b){j(M,b,z[b])})):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(z)):nb(Object(z)).forEach((function(b){Object.defineProperty(M,b,Object.getOwnPropertyDescriptor(z,b))}))}return M}QM.locale("en"),B.default.init({fallbackLng:"fi",defaultNS:"translation",interpolation:{escapeValue:!1}});var ab=M=>N.default.createElement("div",{className:Mb["spinner-loader"]},M&&M.children||N.default.createElement("span",{className:Mb["sr-only"]},B.default.t("loading")));"production"!==process.env.NODE_ENV&&(ab.propTypes={children:h.default.node}),ab.defaultProps={children:void 0};var ib=M=>{if(M&&M.GTFS.platform){var b=M.GTFS,z=b.modes,p=b.platform;return[z&&"RAIL"===z[0]?B.default.t("track"):B.default.t("platform"),p]}};function db(M){if("FutureRoute"!==M.type){if("SelectFromMap"===M.type)return["",B.default.t("select-from-map")];if("CurrentLocation"===M.type)return["",B.default.t("use-own-position")];if("SelectFromOwnLocations"===M.type)return["",B.default.t("select-from-own-locations")];var b,z=V(CM(M.properties,!0),2),p=z[0],O=z[1];if(M.properties.layer.toLowerCase().includes("bikerental")||M.properties.layer.toLowerCase().includes("bikestation"))return[b=B.default.t("vehiclerentalstation"),p,void 0,M.properties.labelId];if("bikepark"===M.properties.layer)return[b=B.default.t("bikepark"),p,void 0,void 0];if("carpark"===M.properties.layer)return[b=B.default.t("carpark"),p,void 0,void 0];if(M.properties.mode)b=B.default.t(M.properties.mode.toLowerCase().replace("favourite",""));else{var o=M.properties.layer.replace("route-","").toLowerCase().replace("favourite","");b=B.default.t(o)}if(M.properties.id&&("stop"===M.properties.layer||"station"===M.properties.layer)){var c,A=EM(M.properties),e=null===(c=M.properties.addendum)||void 0===c?void 0:c.GTFS.modes,q=ib(M.properties.addendum);return[b,lM(p,A),O,A,e,q]}if("favouriteStop"===M.properties.layer||"favouriteStation"===M.properties.layer){var n=M.properties,t=n.address,a=n.code;return[b,t?lM(t.split(",")[0],a):p,O,a,void 0,ib(M.properties.addendum)]}return[b,p,O]}var i=M.properties,d=i.origin,W=i.destination,r=d.locality?`, ${d.locality} foobar`:"",s=W.locality?`, ${W.locality}`:"",u=d.name,l=W.name;return[B.default.t("future-route"),`${B.default.t("origin")} ${u}${r} ${B.default.t("destination")} ${l}${s}`,M.translatedText]}function Wb(M){var b=QM.unix(M.properties.time),z=M.properties.arriveBy?B.default.t("arrival"):B.default.t("departure");return z=`${z=b.isSame(QM(),"day")?`${z} ${B.default.t("today-at")}`:b.isSame(QM().add(1,"day"),"day")?`${z} ${B.default.t("tomorrow-at")}`:`${z} ${b.format("dd D.M.")}`} ${QM(b).format("HH:mm")}`}var rb=M=>"SelectFromOwnLocations"===M.type||"back"===M.type?"":function(M){var b=CM(M,!0);switch(M.layer){case"selectFromMap":case"currentPosition":case"ownLocations":case"back":return b[1]||b[0];case"favouriteVehicleRentalStation":case"favouritePlace":return b[0];default:return b.length>1&&""!==b[1]?b.join(", "):b[1]||b[0]}}(M.properties);class sb extends N.default.Component{constructor(M){super(M),j(this,"onChange",((M,b)=>{var z=b.newValue,p=b.method,O={value:this.fInput||z||"",renderMobileSearch:this.props.isMobile};if(this.fInput=null,this.state.editing){if("enter"!==p||this.state.valid){if(this.state.typingTimer&&clearTimeout(this.state.typingTimer),"type"===p){var o=setTimeout((()=>{this.setState({typing:!1})}),1e3);O.typingTimer=o,O.typing=!0}this.setState(O)}}else O.editing=!0,this.setState(O,(()=>this.fetchFunction({value:z||""})))})),j(this,"onBlur",(()=>{this.state.renderMobileSearch||(this.state.editing&&this.input.focus(),this.setState({editing:!1,renderMobileSearch:!1,value:this.props.value}))})),j(this,"onSelected",((M,b)=>{if(this.state.valid){if("SelectFromOwnLocations"===b.suggestion.type)return void this.setState({sources:["Favourite","Back"],ownPlaces:!0,pendingSelection:b.suggestion.type,value:""},(()=>{this.fetchFunction({value:""})}));if("back"===b.suggestion.type||"FutureRoute"===b.suggestion.type)return void this.setState({sources:this.props.sources,ownPlaces:!1,pendingSelection:b.suggestion.type,suggestionIndex:b.suggestionIndex},(()=>{this.fetchFunction({value:""})}));this.selectionDone=!0,this.setState({editing:!1,value:b.suggestionValue},(()=>{this.input.blur(),this.props.handleViaPoints?this.props.handleViaPoints(b.suggestion,b.suggestionIndex):this.props.onSelect(b.suggestion,this.props.id),this.setState({renderMobileSearch:!1,sources:this.props.sources,ownPlaces:!1,suggestions:[]},(()=>{this.selectionDone=!1})),!this.props.focusChange||this.props.isMobile&&!this.props.isEmbedded||this.props.focusChange(),this.props.isMobile&&this.closeMobileSearch()}))}else this.setState((M=>({pendingSelection:M.value})),(()=>this.checkPendingSelection()))})),j(this,"onSuggestionsClearRequested",(()=>{this.setState({suggestions:[],sources:this.props.sources,ownPlaces:!1,editing:!1})})),j(this,"checkPendingSelection",(()=>{"SelectFromOwnLocations"!==this.state.pendingSelection&&"back"!==this.state.pendingSelection||!this.state.valid?this.state.pendingSelection&&this.state.valid&&this.setState({pendingSelection:null,editing:!1},(()=>{this.state.suggestions.length&&(this.input.blur(),this.props.onSelect(this.state.suggestions[this.state.suggestionIndex],this.props.id),this.props.isMobile&&this.closeMobileSearch(),!this.props.focusChange||this.props.isMobile&&!this.props.isEmbedded||this.props.focusChange())})):this.setState({pendingSelection:null,editing:!0},(()=>{this.input.focus()}))})),j(this,"clearButton",(()=>N.default.createElement("button",{type:"button",className:Mb["clear-input"],onClick:this.clearInput,"aria-label":B.default.t("clear-button-label")},N.default.createElement(x.default,{img:"close",color:this.props.color})))),j(this,"fetchFunction",(M=>{var b=M.value,z=M.cleanExecuted;return this.setState({valid:!1,cleanExecuted:z||!1},(()=>{if(!this.selectionDone){var M,z=Y.default(this.props.targets)||this.props.targets.includes("Locations");this.state.ownPlaces?(M=["Locations"],(Y.default(this.props.targets)||this.props.targets.includes("Stops"))&&M.push("Stops"),(Y.default(this.props.targets)||this.props.targets.includes("VehicleRentalStations"))&&M.push("VehicleRentalStations")):Y.default(this.props.targets)||(M=[...this.props.targets],z&&!this.props.isMobile&&(Y.default(this.props.sources)||this.props.sources.includes("Favourite"))&&M.push("SelectFromOwnLocations")),((M,b,z,p,O,o,c,A,e,q)=>{A(null),wM(M,b,z,p,O,o,c,A,e,q)})(M,this.state.sources&&this.state.sources.filter((M=>!(z&&"Favourite"===M&&!this.state.ownPlaces&&!this.props.isMobile))),this.props.transportMode,this.props.searchContext,this.props.filterResults,this.props.geocodingSize,{input:b||""},(M=>{if(null!=M){var z=(M.results||[]).filter((M=>"FutureRoute"!==M.type||"FutureRoute"===M.type&&M.properties.time>QM().unix())).map((M=>{if("CurrentLocation"===M.type||"SelectFromMap"===M.type||"SelectFromOwnLocations"===M.type||"back"===M.type){var b=tb({},M);return b.properties.labelId=B.default.t(M.properties.labelId),b}return M}));b!==this.state.value&&b!==this.state.pendingSelection&&"SelectFromOwnLocations"!==this.state.pendingSelection&&"back"!==this.state.pendingSelection&&"FutureRoute"!==this.state.pendingSelection||this.setState({valid:!0,suggestions:z},(()=>this.checkPendingSelection()))}}),this.props.pathOpts,this.props.refPoint)}}))})),j(this,"clearInput",(()=>{var M={editing:!0,value:"",sources:this.props.sources,ownPlaces:!1,renderMobileSearch:this.props.isMobile};this.setState(M,(()=>this.fetchFunction({value:"",cleanExecuted:!0}))),this.props.onClear&&this.props.onClear(this.props.id),this.input.focus()})),j(this,"inputClicked",(M=>{if(this.input.focus(),this.clearLocationText(),this.props.isMobile&&this.props.lock(),this.state.editing)this.props.isMobile&&!this.state.renderMobileSearch&&this.setState({renderMobileSearch:!0});else{var b={editing:!0,pendingSelection:null,renderMobileSearch:this.props.isMobile},z={editing:!0,pendingSelection:null,value:M};this.state.suggestions.length?(this.fetchFunction({value:this.state.value}),this.setState(b)):"object"!=typeof M&&M?this.setState(z,(()=>this.fetchFunction({value:M}))):this.setState(b,(()=>this.fetchFunction({value:this.state.value})))}})),j(this,"storeInputReference",(M=>{null!==M&&(this.input=M.input,this.props.storeRef&&this.props.storeRef(M.input))})),j(this,"fillInput",(M=>{this.fInput=M.properties.name;var b={editing:!0,value:M.properties.name,checkPendingSelection:M,valid:!0};this.setState(b),this.fetchFunction({value:M.properties.name}),this.input.focus()})),j(this,"renderItem",(M=>{var b="FutureRoute"===M.type?tb(tb({},M),{},{translatedText:Wb(M)}):M,z=db(M);return N.default.createElement(w.default,{item:b,content:z,loading:!this.state.valid,isMobile:this.props.isMobile,ariaFavouriteString:B.default.t("favourite"),color:this.props.color,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fillInput:this.fillInput,fontWeights:this.props.fontWeights,getAutoSuggestIcons:this.props.getAutoSuggestIcons,modeIconColors:this.props.modeIconColors,modeSet:this.props.modeSet})})),j(this,"closeMobileSearch",(()=>{this.props.unlock(),this.setState({renderMobileSearch:!1,value:this.props.value},(()=>{window.scrollTo(0,this.state.scrollY),this.onSuggestionsClearRequested()}))})),j(this,"keyDown",(M=>{if(!this.selectionDone){var b=M.key;if("Escape"===b&&this.setState({editing:!1}),this.state.editing)return"Enter"===b&&""!==this.state.value&&this.setState({pendingSelection:!0},(()=>{this.fetchFunction({value:this.state.value})})),void this.inputClicked();if("Enter"!==b&&"ArrowDown"!==b||""!==this.state.value){if("ArrowDown"===b&&""!==this.state.value){var z={editing:!0,value:this.state.value};this.setState(z,(()=>this.fetchFunction({value:this.state.value})))}this.state.editing||this.setState({editing:!0}),"Tab"===b&&this.onBlur()}else this.clearInput()}})),j(this,"suggestionAsAriaContent",(()=>{var M=[],b=this.state.suggestions[0];return b&&(b.type&&b.type.includes("Favourite")&&M.push(B.default.t("favourite")),M=M.concat(db(this.state.suggestions[0]))),[...new Set(M)].join(" - ")})),j(this,"clearOldSearches",(()=>{var M=this.props.searchContext,b=M.context,z=M.clearOldSearches,p=M.clearFutureRoutes;b&&z&&(z(b),p&&p(b),this.fetchFunction({value:this.state.value}))})),j(this,"isOriginDestinationOrViapoint",(()=>"origin"===this.props.id||"destination"===this.props.id||"via-point"===this.props.id||"origin-stop-near-you"===this.props.id)),j(this,"clearLocationText",(()=>{["Valittu sijainti","Nykyinen sijaintisi","Current position","Selected location","Vald position","Använd min position","Min position","Käytä nykyistä sijaintia","Use current location","Your current location"].includes(this.state.value)&&this.clearInput()})),j(this,"onFocus",(()=>{this.clearLocationText();var M=window.pageYOffset;return this.setState({scrollY:M})})),QM.tz.setDefault(M.timeZone),QM.locale(M.lang),this.state={value:M.value,suggestions:[],editing:!1,valid:!0,renderMobileSearch:!1,sources:M.sources,ownPlaces:!1,typingTimer:null,typing:!1,pendingSelection:null,suggestionIndex:0,cleanExecuted:!1,scrollY:0},Object.keys(ZM).forEach((M=>{B.default.addResourceBundle(M,"translation",ZM[M])}))}shouldComponentUpdate(M,b){return!D.default(b,this.state)||!D.default(M,this.props)}componentDidUpdate(){B.default.language!==this.props.lang&&B.default.changeLanguage(this.props.lang)}UNSAFE_componentWillReceiveProps(M){M.value===this.state.value||this.state.editing||this.setState({value:M.value})}render(){B.default.language!==this.props.lang&&B.default.changeLanguage(this.props.lang);var M=this.state,b=M.value,z=M.suggestions,p=M.renderMobileSearch,O=M.cleanExecuted,o={placeholder:this.props.translatedPlaceholder?this.props.translatedPlaceholder:B.default.t(this.props.placeholder),value:b,onChange:this.onChange,onBlur:this.onBlur,className:`${Mb.input} ${this.props.isMobile&&this.props.transportMode?Mb.thin:""} ${Mb[this.props.id]||""} ${this.state.value?Mb.hasValue:""} ${this.props.inputClassName}`,onKeyDown:this.keyDown,required:this.props.required},c=this.props.id.replace("searchfield-",""),A=this.props.ariaLabel||B.default.t(c);A=A.replace("searchfield-","").concat(".");var e=this.props.required?`${B.default.t("required")}.`:"",q=this.props.isMobile?B.default.t("search-autosuggest-label-instructions-mobile"):B.default.t("search-autosuggest-label-instructions-desktop"),n="origin"===this.props.id?B.default.t("search-autosuggest-label-move-to-destination"):"",t=q.concat(" ").concat(n),a=B.default.t("search-autosuggest-len",{count:z.length}),i=()=>this.suggestionAsAriaContent()||this.props.value?B.default.t("search-current-suggestion",{selection:this.suggestionAsAriaContent().toLowerCase()||this.props.value}):"";return N.default.createElement(N.default.Fragment,null,N.default.createElement("span",{className:Mb["sr-only"],role:"alert"},!this.state.typing&&this.state.editing&&`${a} ${i()}`),this.props.isMobile&&N.default.createElement(cb,{searchOpen:p,appElement:this.props.appElement,clearOldSearches:this.clearOldSearches,id:this.props.id,clearInput:this.clearInput,value:this.state.value,suggestions:[...z,{type:"clear-search-history",labelId:B.default.t("clear-search-history")}],inputProps:tb(tb({},o),{},{placeholder:this.isOriginDestinationOrViapoint()?B.default.t("address-place-or-business"):o.placeholder}),fetchFunction:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:rb,renderSuggestion:this.renderItem,closeHandle:this.closeMobileSearch,ariaLabel:e.concat(" ").concat(A).concat(" ").concat(i()),label:this.props.mobileLabel?this.props.mobileLabel:B.default.t(this.props.id),onSuggestionSelected:this.onSelected,dialogHeaderText:B.default.t("delete-old-searches-header"),dialogPrimaryButtonText:B.default.t("delete"),dialogSecondaryButtonText:B.default.t("cancel"),clearInputButtonText:B.default.t("clear-button-label"),focusInput:O,color:this.props.color,hoverColor:this.props.hoverColor,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fontWeights:this.props.fontWeights,showScroll:this.props.showScroll}),!p&&N.default.createElement("div",{className:m.default(Mb["autosuggest-input-container"],Mb[this.props.id]),style:{"--color":`${this.props.color}`,"--hover-color":`${this.props.hoverColor}`}},this.props.icon&&N.default.createElement("div",{className:m.default(Mb["autosuggest-input-icon"],Mb[this.props.id],this.props.inputClassName&&`${this.props.inputClassName}-input-icon`),"aria-label":e.concat(" ").concat(A).concat(" ").concat(B.default.t("search-autosuggest-label"))},N.default.createElement(x.default,{img:`${this.props.icon}`})),N.default.createElement(X.default,{alwaysRenderSuggestions:this.state.editing,id:this.props.id,suggestions:z,onSuggestionsFetchRequested:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:rb,renderSuggestion:this.renderItem,inputProps:tb(tb({},o),{},{onFocus:this.onFocus}),focusInputOnSuggestionClick:!0,shouldRenderSuggestions:()=>this.state.editing,highlightFirstSuggestion:!this.state.ownPlaces,theme:Mb,renderInputComponent:M=>N.default.createElement(N.default.Fragment,null,N.default.createElement("label",{className:Mb["sr-only"],htmlFor:this.props.id},i().concat(" ").concat(e).concat(" ").concat(A).concat(" ").concat(t)),N.default.createElement("input",Object.assign({"aria-label":i().concat(" ").concat(e).concat(" ").concat(A).concat(" ").concat(t),id:this.props.id,onClick:this.inputClicked,onKeyDown:this.keyDown},M)),this.state.value&&this.clearButton()),onSuggestionSelected:this.onSelected,ref:this.storeInputReference})))}}j(sb,"defaultProps",{autoFocus:!1,className:"",icon:void 0,value:"",transportMode:void 0,filterResults:void 0,onClear:void 0,lang:"fi",storeRef:void 0,handleViaPoints:void 0,focusChange:void 0,getAutoSuggestIcons:void 0,sources:[],targets:void 0,isMobile:!1,isEmbedded:!1,geocodingSize:void 0,color:"#007ac9",hoverColor:"#0062a1",accessiblePrimaryColor:"#0074be",timeZone:"Europe/Helsinki",pathOpts:{routesPrefix:"linjat",stopsPrefix:"pysakit"},ariaLabel:void 0,mobileLabel:void 0,inputClassName:"",translatedPlaceholder:void 0,fontWeights:{medium:500},modeIconColors:{"mode-bus":"#007ac9","mode-rail":"#8c4799","mode-tram":"#008151","mode-metro":"#ed8c00","mode-ferry":"#007A97","mode-citybike":"#f2b62d","mode-funicular":"#ff00ff"},required:!1,modeSet:void 0,showScroll:!1,refPoint:{}}),"production"!==process.env.NODE_ENV&&(sb.propTypes={appElement:h.default.string.isRequired,autoFocus:h.default.bool,className:h.default.string,icon:h.default.string,id:h.default.string.isRequired,placeholder:h.default.string.isRequired,translatedPlaceholder:h.default.string,value:h.default.string,searchContext:h.default.shape({URL_PELIAS:h.default.string,context:h.default.object,clearOldSearches:h.default.func,clearFutureRoutes:h.default.func}).isRequired,ariaLabel:h.default.string,onSelect:h.default.func.isRequired,transportMode:h.default.string,filterResults:h.default.func,geocodingSize:h.default.number,onClear:h.default.func,storeRef:h.default.func,handleViaPoints:h.default.func,focusChange:h.default.func,lang:h.default.string,sources:h.default.arrayOf(h.default.string),targets:h.default.arrayOf(h.default.string),isMobile:h.default.bool,color:h.default.string,hoverColor:h.default.string,accessiblePrimaryColor:h.default.string,timeZone:h.default.string,pathOpts:h.default.shape({routesPrefix:h.default.string,stopsPrefix:h.default.string}),mobileLabel:h.default.string,lock:h.default.func.isRequired,unlock:h.default.func.isRequired,refPoint:h.default.shape({address:h.default.string,lat:h.default.number,lon:h.default.number}),inputClassName:h.default.string,fontWeights:h.default.shape({medium:h.default.number}),modeIconColors:h.default.objectOf(h.default.string),getAutoSuggestIcons:h.default.objectOf(h.default.func),required:h.default.bool,modeSet:h.default.string,showScroll:h.default.bool,isEmbedded:h.default.bool});var ub,lb=(ub=sb,M=>{var b=qb.useScrollLock(),z=b.lock,p=b.unlock;return N.default.createElement(ub,Object.assign({lock:z,unlock:p},M))});M.default=lb,Object.defineProperty(M,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=index.js.map