@digitransit-component/digitransit-component-autosuggest 7.1.3 → 7.1.4

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
@@ -1,3 +1,3 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prop-types"),require("react"),require("react-i18next"),require("classnames"),require("lodash/debounce"),require("lodash/flatten"),require("lodash/take"),require("lodash/isString"),require("lodash/orderBy"),require("lodash/uniqWith"),require("lodash/get"),require("downshift"),require("@digitransit-component/digitransit-component-icon"),require("i18next"),require("lodash/isEqual"),require("lodash/memoize"),require("lodash/escapeRegExp"),require("lodash/cloneDeep"),require("luxon"),require("react-modal"),require("@digitransit-component/digitransit-component-dialog-modal"),require("@digitransit-component/digitransit-component-suggestion-item")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","react-i18next","classnames","lodash/debounce","lodash/flatten","lodash/take","lodash/isString","lodash/orderBy","lodash/uniqWith","lodash/get","downshift","@digitransit-component/digitransit-component-icon","i18next","lodash/isEqual","lodash/memoize","lodash/escapeRegExp","lodash/cloneDeep","luxon","react-modal","@digitransit-component/digitransit-component-dialog-modal","@digitransit-component/digitransit-component-suggestion-item"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).DTAutosuggest={},e.PropTypes,e.React,e.reactI18next,e.cx,e.debounce,e.flatten,e.take,e.isString,e.orderBy,e.uniqWith,e.get,e.downshift,e.Icon,e.i18next,e.isEqual,e.memoize,e.escapeRegExp,e.cloneDeep,e.luxon,e.ReactModal,e.DialogModal,e.SuggestionItem)}(this,function(e,t,u,n,o,r,i,a,s,l,c,d,p,g,f,h,b,E,A,m,y,F,D){"use strict";function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=C(t),B=C(u),v=C(o),S=C(r),k=C(i),w=C(a),x=C(s),O=C(l),j=C(c),M=C(d),P=C(g),R=C(b),I=C(E),L=C(A),N=C(y),q=C(F),z=C(D);function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function H(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var u=e[Symbol.toPrimitive];if(void 0!==u){var n=u.call(e,t||"default");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==T(t)?t:t+""}function U(e,t,u){return(t=H(t))in e?Object.defineProperty(e,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):e[t]=u,e}function V(e,t){return e&&t&&e===t}const G=["stop","station","favouriteStop","favouriteStation"],W=["favouriteVehicleRentalStation","bikestation"];function $(e){if(!e)return"";const t=e.split(":");return 0===t.length?"":`citybikes${t[0]}:bikestation:${t[1]}`}function Q(e,t){const u=e.properties,n=t.properties;if("FutureRoute"===e.type&&"FutureRoute"===t.type){const e=u.origin,t=u.destination,o=n.origin,r=n.destination;return`${e.name}//${e.localadmin}//${t.name}//${t.localadmin}`===`${o.name}//${o.localadmin}//${r.name}//${r.localadmin}`}if("FutureRoute"===e.type||"FutureRoute"===t.type)return!1;if(W.includes(u.layer)&&W.includes(n.layer)){return(u.gid||$(u.labelId))===(n.gid||$(n.labelId))}if(u.gtfsId&&n.gtfsId)return u.gtfsId===n.gtfsId;if(G.includes(u.layer)&&G.includes(n.layer)&&u.gid&&n.gid)return u.gid===n.gid;const o=e&&e.geometry?e.geometry.coordinates:void 0,r=t&&t.geometry?t.geometry.coordinates:void 0;return!!(o&&r&&Math.abs(o[0]-r[0])<1e-6&&Math.abs(o[1]-r[1])<1e-6&&(V(u.name,n.name)||V(u.label,n.label)||V(u.address,n.address)||V(u.address,n.label)||V(u.label,n.address)))}const K=e=>x.default(e)?e.toLowerCase():"",X=e=>e.split(/([A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{1031F}\u{1032D}-\u{10340}\u{10342}-\u{10349}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{10400}-\u{1049D}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10860}-\u{10876}\u{10880}-\u{1089E}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{10900}-\u{10915}\u{10920}-\u{10939}\u{10940}-\u{10959}\u{10980}-\u{109B7}\u{109BE}\u{109BF}\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A60}-\u{10A7C}\u{10A80}-\u{10A9C}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B60}-\u{10B72}\u{10B80}-\u{10B91}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10D00}-\u{10D23}\u{10D4A}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC7}\u{10F00}-\u{10F1C}\u{10F27}\u{10F30}-\u{10F45}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FC4}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{11103}-\u{11126}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111DA}\u{111DC}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11680}-\u{116AA}\u{116B8}\u{11700}-\u{1171A}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118DF}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DB0}-\u{11DDB}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11FB0}\u{12000}-\u{12399}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A70}-\u{16ABE}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16E40}-\u{16E7F}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF2}\u{16FF3}\u{17000}-\u{18CD5}\u{18CFF}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E4D0}-\u{1E4EB}\u{1E5D0}-\u{1E5ED}\u{1E5F0}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}\u{1E6FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E900}-\u{1E943}\u{1E94B}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B81D}\u{2B820}-\u{2CEAD}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{33479}]+)/u),Z=e=>/^[0-9]+[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{1031F}\u{1032D}-\u{10340}\u{10342}-\u{10349}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{10400}-\u{1049D}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10860}-\u{10876}\u{10880}-\u{1089E}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{10900}-\u{10915}\u{10920}-\u{10939}\u{10940}-\u{10959}\u{10980}-\u{109B7}\u{109BE}\u{109BF}\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A60}-\u{10A7C}\u{10A80}-\u{10A9C}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B60}-\u{10B72}\u{10B80}-\u{10B91}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10D00}-\u{10D23}\u{10D4A}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC7}\u{10F00}-\u{10F1C}\u{10F27}\u{10F30}-\u{10F45}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FC4}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{11103}-\u{11126}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111DA}\u{111DC}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11680}-\u{116AA}\u{116B8}\u{11700}-\u{1171A}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118DF}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DB0}-\u{11DDB}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11FB0}\u{12000}-\u{12399}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A70}-\u{16ABE}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16E40}-\u{16E7F}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF2}\u{16FF3}\u{17000}-\u{18CD5}\u{18CFF}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E4D0}-\u{1E4EB}\u{1E5D0}-\u{1E5ED}\u{1E5F0}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}\u{1E6FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E900}-\u{1E943}\u{1E94B}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B81D}\u{2B820}-\u{2CEAD}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{33479}]+$/u.test(e),J="back",Y="currentPosition",ee="favouriteStop",te="favouriteStation",ue="favouritePlace",ne="favouriteRoute",oe="favouriteVehicleRentalStation",re="futureRoute",ie="station",ae="selectFromMap",se="ownLocations",le="stop",ce="bikestation",de="carpark",pe="bikepark",ge=({layer:e,type:t})=>"stop"===e||"favouriteStop"===e||"stop"===t||"favouriteStop"===t,fe=(e,t)=>{switch(e){case Y:return 1;case J:return.9;case ae:return.8;case se:return.79;case te:case ue:case ee:case ne:case oe:return.45;case re:return.44;case ie:return x.default(t)&&0===t.indexOf("gtfs")?.43:.42;case de:case pe:case ce:return.38;case le:return.36;default:return.41}},he=(e,t,u="")=>{if(!Array.isArray(t)||!t.length)return t;const n=t=>x.default(t)&&e&&e.test(t),o=K(u),r=n(o),i=O.default(t.filter(e=>e),[e=>r&&n(K(e.properties.shortName))&&0===K(e.properties.shortName).indexOf(o)?1:0,e=>{const{confidence:t,layer:u,source:n}=e.properties;if(0===o.length)return fe(u,n);if(!t)return fe(u,n)+((e,t)=>x.default(e)&&0!==e.length?["name","label","address","shortName"].map(e=>({name:e,value:t[e]})).filter(e=>x.default(e.value)&&e.value.length>0).map(t=>{let u=K(t.value);return 0===u.indexOf(e)?("shortName"===t.name&&Z(u)&&([u]=X(u)),.5+e.length/u.length):.5*e.length/(e.length+1)}).reduce((e,t)=>t>e?t:e,0):0)(o,e.properties);switch(u){case ie:return t+(0===n.indexOf("gtfs")?.02:.01);case le:case de:case pe:return t-.05;case ce:return t-.04;default:return t}},e=>{if(e.properties.shortName)return Z(e.properties.shortName)?X(e.properties.shortName)[0]:e.properties.shortName},e=>{if(e.properties.shortName)return Z(e.properties.shortName)?X(e.properties.shortName)[1]:e.properties.shortName},"properties.longName"],["desc","desc","asc","asc","asc"]);return j.default(i,Q)},be=(e,t)=>null!=t&&-1!==e.lastIndexOf(t)?e.substring(0,e.lastIndexOf(t)-1):e;function Ee(e,t,u){if("string"==typeof t&&t.length>0){const n=t.toLowerCase().trim(),o=n.includes(" ")||n.includes(",");return e.filter(e=>{let t=[];u.forEach(u=>{let n=M.default(e,u);o||"properties.label"!==u&&"address"!==u||!n||(n=n.split(","),n.length>2?n.splice(n.length-2,2):n.length>1&&n.splice(n.length-1,1),n=n.join(",")),n&&(t=o?t.concat(n.toLowerCase()):t.concat(n.toLowerCase().replace(/,/g," ").split(" ")))});for(let e=0;e<t.length;e++)if(0===t[e].indexOf(n))return!0;return!1})}return e}function Ae(e,t){return e?Object.keys(e).map(u=>{const n=t||u,o=e[u];return"object"==typeof o?Ae(o,n):`${encodeURIComponent(n)}=${encodeURIComponent(o)}`}).join("&"):""}const me=require("axios").default;function ye(e,t){return me.get(encodeURI(e)+(t?(-1===e.search(/\?/)?"?":"&")+Ae(t):""),{timeout:1e4,method:"GET",headers:{Accept:"application/json"}}).then(e=>e.data)}function Fe(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function De(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):Fe(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}function Ce(e,t,u,n,o,r,i,a){const s=e?e.trim():null;if(null==s||s.length<1||i&&!i.test(s))return Promise.resolve([]);const l=r||"https://api.digitransit.fi/geocoding/v1/search";let c=De(De(De({text:s},t),n),{},{lang:u});if(o&&(c=De(De({},c),{},{sources:o})),a){const e=a.toString();c=De(De({},c),{},{layers:e})}return ye(l,c).then(e=>e.features)}function _e(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function Be(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):_e(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}function ve(e,t){if(!e||e.length<1)return Promise.resolve([]);let u="";const n=e.map(e=>{const t="stop"===e.type?"stop":"station";let n=`gtfs${e.gtfsId.split(":")[0].toLowerCase()}:${t}:GTFS:${e.gtfsId}`;return e.code&&(n+=`#${e.code}`),u+=`${n},`,Be(Be({},e),{},{gid:n})}).reduce(function(e,t){return e[t.gid]=t,e},{});return ye(t,{ids:u.slice(0,-1)}).then(e=>e.features.map(e=>({type:"FavouriteStop",properties:{addendum:e.properties.addendum,gid:n[e.properties.gid].gid,code:n[e.properties.gid].code,gtfsId:n[e.properties.gid].gtfsId,lastUpdated:n[e.properties.gid].lastUpdated,favouriteId:n[e.properties.gid].favouriteId,address:e.properties.label,layer:ge(e.properties)?"favouriteStop":"favouriteStation"},geometry:e.geometry})))}function Se(e,t,u){let n=Ee(e,t,["properties.name","properties.label","properties.address","properties.shortName","properties.longName"]);return u&&(n=n.filter(e=>!u.includes(e.properties.layer))),Promise.resolve(w.default(n,10).map(e=>{const t=Be(Be({},e),{},{type:"OldSearch",timetableClicked:!1,arrowClicked:!1});return delete t.properties.confidence,t}))}const ke=["route-TRAM","route-BUS","route-RAIL","route-FERRY","route-SUBWAY","route-AIRPLANE","route-FUNICULAR"],we=["venue","address","street"],xe=["carpark","bikepark"],Oe=["stop","station"];const je=S.default(function(e,t,u,n,o,r,{input:i},a,s,l){const{getPositions:c,getFavouriteLocations:d,getOldSearches:p,getFavouriteStops:g,parkingAreaSources:f,getLanguage:h,getStopAndStationsQuery:b,getFavouriteVehicleRentalStationsQuery:E,getFavouriteVehicleRentalStations:A,getFavouriteRoutesQuery:m,getFavouriteRoutes:y,getRoutesQuery:F,context:D,isPeliasLocationAware:C,minimalRegexp:_,lineRegexp:B,URL_PELIAS:v,URL_PELIAS_PLACE:S,feedIDs:x,geocodingSearchParams:O,geocodingSources:j,getFutureRoutes:M,cityBikeNetworks:P}=n,R=!e||0===e.length,I=!t||0===t.length,L=c(D),N=[],q={type:"all",term:i,results:[]},z=h(D),T=C&&null!=l&&l.lat&&null!=l&&l.lon?{"focus.point.lat":l.lat.toFixed(3),"focus.point.lon":l.lon.toFixed(3)}:{},H=u?u.split("-")[1]:void 0;if(e.includes("CurrentPosition")&&"geolocation-not-supported"!==L.status&&N.push(function(e,t){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"CurrentLocation",address:t.address,lat:t.lat,lon:t.lon,properties:{labelId:"use-own-position",layer:"currentPosition",address:t.address,lat:t.lat,lon:t.lon},geometry:{type:"Point",coordinates:[t.lon,t.lat]}}]):Promise.resolve([])}(i,L)),(R||e.includes("MapPosition"))&&N.push(function(e){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"SelectFromMap",address:"SelectFromMap",lat:null,lon:null,properties:{labelId:"select-from-map",layer:"selectFromMap",address:"SelectFromMap",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]):Promise.resolve([])}(i)),e.includes("FutureRoutes")){const e=M(D);N.push(w.default(e,3))}if(e.includes("SelectFromOwnLocations")&&function(e){const t=e.getFavouriteLocations(e.context);if((null==t?void 0:t.length)>0)return!0;const u=e.getFavouriteVehicleRentalStations(e.context);if((null==u?void 0:u.length)>0)return!0;const n=e.getFavouriteStops(e.context);return(null==n?void 0:n.length)>0}(n)&&N.push(function(e){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"SelectFromOwnLocations",address:"SelectFromOwnLocations",lat:null,lon:null,properties:{labelId:"select-from-own-locations",layer:"ownLocations",address:"selectFromOwnLocations",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]):Promise.resolve([])}(i)),R||e.includes("Locations")){const u=O;if(t.includes("Favourite")){const e=d(D);N.push(function(e,t){return Promise.resolve(Ee(e,t,["address","name"]).map(e=>({type:"FavouritePlace",properties:Be(Be({},e),{},{label:e.name,layer:"favouritePlace"}),geometry:{type:"Point",coordinates:[e.lon,e.lat]}})))}(e,i)),t.includes("Back")&&N.push(Promise.resolve([{type:"back",address:"back",lat:null,lon:null,properties:{labelId:"back",layer:"back",address:"back",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]))}if(I||t.includes("Datasource")){const t=["venue","address","street"];e.includes("Stations")&&t.push("station"),N.push(Ce(i,u,z,T,j.join(","),v,_,t))}if(I||t.includes("History")){const e=p(D,"endpoint"),t=["bikestation"];t.push(...Oe),t.push(...ke),t.push(...xe),N.push(Se(e,i,t))}}if(R||e.includes("ParkingAreas")){if(I||t.includes("Datasource")){const e=O;r&&10!==r&&(e.size=r);const t=["carpark","bikepark"],u=f?f.join(","):null;N.push(Ce(i,e,z,T,u,v,_,t).then(e=>o?o(e,H):e))}if(I||t.includes("History")){const e=p(D),t=["bikestation"];t.push(...Oe),t.push(...ke),t.push(...we),N.push(Se(e,i,t))}}const U=e.includes("Stops"),V=e.includes("Stations");if(R||U||V){if(t.includes("Favourite")){const e=g(D);let t;t=e.every(e=>"station"===e.type)?ve(e,S).then(e=>o?o(e,H):e):b(e).then(e=>ve(e,S)).then(e=>o?o(e,H):e),N.push(function(e,t,u,n){return e.then(e=>Ee(e.filter(e=>"stop"===e.type?u:n),t,["properties.name","properties.name","properties.address"]))}(t,i,U,V))}if(I||t.includes("Datasource")){const t=[];U&&t.push("stop"),V&&t.push("station");const u=r&&10!==r?{size:r}:{};O&&O["boundary.country"]&&(u["boundary.country"]=O["boundary.country"]),(R||e.includes("Locations"))&&(u.dedupestops=1);const n=x.map(e=>`gtfs${e}`).join(",");N.push(Ce(i,u,z,T,n,v,_,t).then(e=>o?o(e,H):e))}if(I||t.includes("History")){const e=p(D).filter(e=>!e.properties.gid||e.properties.gid.includes("GTFS:")),t=["bikestation"];t.push(...ke),t.push(...we),t.push(...xe),U||t.push("stop"),V||t.push("station"),u?N.push(Se(e,i,t).then(e=>o?o(e,H):e)):N.push(Se(e,i,t))}}if(R||e.includes("Routes")){if(t.includes("Favourite")){const e=y(D);N.push(m(e,i,H,s).then(e=>o?o(e,H,"Routes"):e))}if(N.push(F(i,x,u,s).then(e=>o?o(e,H,"Routes"):e)),I||t.includes("History")){const e=p(D),t=["bikestation"];u&&t.push(...ke.filter(e=>!(e===u))),t.push(...Oe),t.push(...we),t.push(...xe),N.push(Se(e,i,t).then(e=>o?o(e,H,"Routes"):e))}}if(R||e.includes("VehicleRentalStations")){if(t.includes("Favourite")){const e=A(D);N.push(E(e,i))}if(I||t.includes("Datasource")){const e=["bikestation"],t=r&&10!==r?{size:r}:{};N.push(Ce(i,t,z,T,P.join(","),v,_,e).then(e=>o?o(e,H,"VehicleRentalStations"):e))}if(I||t.includes("History")){const e=p(D),t=[...Oe];t.push(...ke),t.push(...we),t.push(...xe),N.push(Se(e,i,t))}}Promise.all(N).then(k.default).then(e=>{q.results=e}).catch(e=>{q.error=e}).then(()=>{a(Be(Be({},q),{},{results:he(B,q.results,i)}))})},300,{leading:!0}),Me=f.createInstance({fallbackLng:"fi",resources:{de:{translation:{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:{translation:{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-bikepark":"Search bike parks","stop-near-you-bus":"Search bus routes or stops","stop-near-you-carpark":"Search car parks","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:{translation:{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äpysäköinti",bus:"bussi",cancel:"Peruuta",carpark:"Liityntäpysäköinti","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-bikepark":"Hae pyöräparkkia","stop-near-you-bus":"Hae bussilinjaa tai pysäkkiä","stop-near-you-carpark":"Hae autoparkkia","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"}},pl:{translation:{address:"Adres","address-place-or-business":"Adres, miejsce lub firma","add-via-button-label":"Dodaj punkt pośredni","add-via-duration-button-label":"Wybierz czas postoju dla punktu {{index}}","add-via-duration-button-label-close":"Zamknij wybornik czasu postoju w punkcie {{index}}","add-via-duration-button-label-open":"Otwórz wybornik czasu postoju w punkcie {{index}}",airplane:"Lot",arrival:"Przyjazd",back:"Wróć",bikepark:"Parkuj i Jedź dla rowerów",bikerentalstation:"Stacja rowerowa",bus:"autobus",cancel:"Anuluj",carpark:"Parkuj i Jedź","clear-button-label":"Wyczyść","clear-search-history":"Wyczyść historię wyszukiwania",currentposition:"Obecne położenie",delete:"Usuń","delete-old-searches-header":"Czy na pewno chcesz wyczyścić historię wyszukiwania?",departure:"Odjazd",destination:"Cel","give-origin":"Wprowadź swój punkt początkowy.","give-destination":"Wprowadź swój cel",favourite:"Ulubione",ferry:"Prom","future-route":"Przyszła trasa",origin:"Początek","origin-stop-near-you":"Początek",ownlocations:"Własne miejsca",loading:"Ładowanie…","minute-short":"min.",platform:"Peron",rail:"Pociąg",required:"wymagane pole",search:"Szukaj","search-address-or-place":"Szukaj po adresie lub nazwie miejsca","search-button-label":"Szukaj","search-destination":"Szukaj celu, trasy lub przystanku","search-destination-index":"Wprowadź punkt docelowy","search-destination-results-but-no-search":"Wyświetl wyniki w sąsiedniej karcie „Cel”","search-no-results":"Brak lokalizacji","search-origin":"Wyszukaj początek, koniec lub punkt pośredni","search-origin-index":"Wprowadź punkt początkowy","search-position":"Wykryj lokalizację","search-autosuggest-label":"Miejsce, lokalizacja i przystanek.","search-autosuggest-label-instructions-desktop":"Nawiguj po liście używając strzałek i wybieraj klawiszem Enter.","search-autosuggest-label-instructions-mobile":"Wprowadź lokalizację i nawiguj po liście gestami przesuwania.","search-autosuggest-label-move-to-destination":"Po wybraniu lokalizacji początkowej, automatycznie przejdziesz do pola miejsca docelowego.","search-autosuggest-len":"Dostępna jest {{count}} propozycja","search-autosuggest-len_few":"Dostępne są {{count}} propozycje","search-autosuggest-len_other":"Dostępne jest {{count}} propozycji","search-current-suggestion":"Obecny wybór: {{selection}}",street:"Ulica",subway:"Metro",station:"Stacja",stop:"Przystanek","stop-near-you":"Szukaj przystanków i tras","stop-near-you-airplane":"Szukaj lotów i lotnisk","stop-near-you-bus":"Szukaj tras autobusowych i przystanków","stop-near-you-citybike":"Szukaj stacji rowerów miejskich","stop-near-you-rail":"Szukaj tras kolejowych i przystanków","stop-near-you-subway":"Szukaj tras metra i przystanków ","stop-near-you-tram":"Szukaj tras tramwajowych i przystanków","stop-route-station":"Wyszukiwanie autobusów i przystanków","today-at":"dziś o","tomorrow-at":"jutro o",tram:"Tramwaj",track:"Tor","use-own-position":"Użyj obecnej lokalizacji","select-from-map":"Wybierz miejsce na mapie","select-from-own-locations":"Wybierz z własnych miejsc",venue:"Miejsce","via-point":"Przez punkt",where:"Dokąd?",place:"Miejsce"}},sv:{translation:{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-bikepark":"Sök cykelparkering","stop-near-you-bus":"Sök busslinjer eller hållplatser","stop-near-you-carpark":"Sök anslutningsparkering","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"}}},defaultNS:"translation",react:{useSuspense:!0}});function Pe(e,t){void 0===t&&(t={});var u=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===u&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Me.init();var Re={container:"styles_container__CyBuz",input:"styles_input__x7Oye",favourite:"styles_favourite__xn1Du",thin:"styles_thin__ToA7-",hasValue:"styles_hasValue__qkIFF",suggestionsContainerOpen:"styles_suggestionsContainerOpen__1odqA",suggestionsContainer:"styles_suggestionsContainer__-FUbj",suggestionsList:"styles_suggestionsList__e-mac",suggestion:"styles_suggestion__oCpdb",suggestionHighlighted:"styles_suggestionHighlighted__vdJIb","autosuggest-input-container":"styles_autosuggest-input-container__C4ks3",origin:"styles_origin__J6GD2",destination:"styles_destination__yOA4k","stop-route-station":"styles_stop-route-station__ofvbR","autosuggest-input-icon":"styles_autosuggest-input-icon__-XA83","origin-stop-near-you":"styles_origin-stop-near-you__Vq9IO","clear-input":"styles_clear-input__KFeWb","sr-only":"styles_sr-only__FIitE"};Pe('input[type=text] {\n margin: 0;\n}\n\n.styles_container__CyBuz {\n display: flex;\n width: 100%;\n}\n.styles_container__CyBuz .styles_input__x7Oye.styles_favourite__xn1Du {\n padding-left: 47px;\n}\n.styles_container__CyBuz .styles_input__x7Oye.styles_thin__ToA7- {\n height: 34px;\n}\n.styles_container__CyBuz .styles_input__x7Oye {\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 appearance: none;\n}\n.styles_container__CyBuz .styles_input__x7Oye:focus {\n background: #fff;\n outline: none;\n border: solid 1px var(--color);\n box-shadow: 0 0 2px 1px var(--hover-color);\n}\n@media screen and (min-width: 768px) {\n .styles_container__CyBuz .styles_input__x7Oye {\n font-size: 15px;\n height: 44px;\n padding-left: 49px;\n }\n}\n.styles_container__CyBuz .styles_input__x7Oye::-webkit-input-placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px;\n}\n.styles_container__CyBuz .styles_input__x7Oye::placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px;\n}\n\n.styles_hasValue__qkIFF {\n color: #333;\n}\n\n.styles_suggestionsContainerOpen__1odqA {\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(2.625rem + 9px);\n z-index: 20;\n}\n\n.styles_suggestionsContainer__-FUbj {\n background-color: white;\n z-index: 20;\n}\n.styles_suggestionsContainer__-FUbj .styles_suggestionsList__e-mac {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n background: white;\n}\n.styles_suggestionsContainer__-FUbj .styles_suggestionsList__e-mac li:hover {\n background: #f2f5f7;\n}\n\n.styles_suggestion__oCpdb {\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 z-index: 20;\n}\n\n.styles_suggestionHighlighted__vdJIb {\n background-color: #f2f5f7;\n}\n\n.styles_autosuggest-input-container__C4ks3 {\n position: relative;\n width: 100%;\n}\n.styles_autosuggest-input-container__C4ks3.styles_origin__J6GD2 {\n z-index: 16;\n}\n.styles_autosuggest-input-container__C4ks3.styles_destination__yOA4k {\n z-index: 10;\n}\n.styles_autosuggest-input-container__C4ks3.styles_stop-route-station__ofvbR {\n z-index: 9;\n}\n\n.styles_autosuggest-input-icon__-XA83 {\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}\n.styles_autosuggest-input-icon__-XA83 svg {\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__-XA83.styles_origin__J6GD2 svg {\n fill: #4ea700;\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__-XA83.styles_destination__yOA4k svg {\n fill: #ec5188;\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__-XA83.styles_stop-route-station__ofvbR svg, .styles_autosuggest-input-icon__-XA83.styles_favourite__xn1Du svg {\n fill: #888;\n width: 16px;\n height: 16px;\n}\n.styles_autosuggest-input-icon__-XA83.styles_origin-stop-near-you__Vq9IO svg {\n fill: #888;\n width: 16px;\n height: 16px;\n}\n\nbutton.styles_clear-input__KFeWb {\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}\nbutton.styles_clear-input__KFeWb svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.styles_clear-input__KFeWb: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}\nbutton.styles_clear-input__KFeWb:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.styles_clear-input__KFeWb:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.styles_sr-only__FIitE: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}');const Ie=e=>e.localadmin||e.localadmin||e.address&&e.address.lastIndexOf(",")<e.address.length-2&&e.address.substring(e.address.lastIndexOf(",")+2)||"",Le=({id:e,code:t})=>t||(void 0!==e&&void 0!==e.indexOf&&-1!==e.indexOf("#")?e.substring(e.indexOf("#")+1):void 0),Ne=R.default((e,t=!1)=>{switch(e.layer){case"currentPosition":return[e.labelId,e.address];case"selectFromMap":case"ownLocations":case"back":return[e.labelId];case"favouritePlace":return u=e.name,n=e.address,[u||n&&n.split(",")[0],"string"==typeof n?n.replace(new RegExp(`${I.default(u)}([ ,]|$)+`),""):""];case"favouriteVehicleRentalStation":case"bikestation":return[e.name];case"favouriteRoute":case"route-BUS":case"route-TRAM":case"route-RAIL":case"route-SUBWAY":case"route-FERRY":case"route-FUNICULAR":case"route-AIRPLANE":return!t&&e.shortName?[e.gtfsId,e.mode.toLowerCase(),e.longName]:[e.shortName,e.longName,e.agency?e.agency.name:void 0];case"venue":case"address":case"street":return[e.name,e.label.replace(new RegExp(`${I.default(e.name)}(,)?( )?`),"")];case"favouriteStop":case"stop":return t?[e.name||e.label||e.address&&e.address.split(",")[0],Ie(e)]:[e.name,e.id,Le(e),Ie(e)];default:return[e.name||e.label||e.address&&e.address.split(",")[0],Ie(e)]}var u,n},(e,t)=>{const u=L.default(e);return u.plain=t,u});const qe=e=>{const t=e&&(e.key||e.which||e.keyCode)||"";return!(!t||![13," ","Spacebar"].concat([32,"Enter"]).includes(t))&&(e.preventDefault(),!0)},ze=e=>"origin"===e||"destination"===e||"via-point"===e||"origin-stop-near-you"===e,Te=(e,t,u)=>{if(!u)return;if(!e||!e.GTFS.platform)return;const{modes:n,platform:o}=e.GTFS;return[n&&"RAIL"===n[0]?u("track",{lng:t}):u("platform",{lng:t}),o]};function He(e,t,u){if(!u)return;if("FutureRoute"!==e.type){if("SelectFromMap"===e.type)return["",u("select-from-map",{lng:t})];if("CurrentLocation"===e.type)return["",u("use-own-position",{lng:t})];if("SelectFromOwnLocations"===e.type)return["",u("select-from-own-locations",{lng:t})];let o,[r,i]=Ne(e.properties,!0);if(e.properties.layer.toLowerCase().includes("bikerental")||e.properties.layer.toLowerCase().includes("bikestation")){o=u("vehiclerentalstation",{lng:t});return[o,r,void 0,e.properties.labelId]}if("bikepark"===e.properties.layer)return o=u("bikepark",{lng:t}),[o,r,void 0,void 0];if("carpark"===e.properties.layer)return o=u("carpark",{lng:t}),[o,r,void 0,void 0];if(e.properties.mode)o=u(e.properties.mode.toLowerCase().replace("favourite",""),{lng:t});else{o=u(e.properties.layer.replace("route-","").toLowerCase().replace("favourite",""),{lng:t})}if(e.properties.id&&("stop"===e.properties.layer||"station"===e.properties.layer)){var n;const a=Le(e.properties),s=null===(n=e.properties.addendum)||void 0===n?void 0:n.GTFS.modes,l=Te(e.properties.addendum,t,u);return[o,be(r,a),i,a,s,l]}if("favouriteStop"===e.properties.layer||"favouriteStation"===e.properties.layer){const{address:u,code:n}=e.properties;return[o,u?be(u.split(",")[0],n):r,i,n,void 0,Te(e.properties.addendum,t)]}return[o,r,i]}const{origin:o,destination:r}=e.properties,i=o.locality?`, ${o.locality} foobar`:"",a=r.locality?`, ${r.locality}`:"",s=o.name,l=r.name;return[u("future-route",{lng:t}),`${u("origin",{lng:t})} ${s}${i} ${u("destination",{lng:t})} ${l}${a}`,e.translatedText]}function Ue(e,t,u){if(!u)return;const n=m.DateTime.fromSeconds(Number(e.properties.time)),o=m.DateTime.now();let r=e.properties.arriveBy?u("arrival",{lng:t}):u("departure",{lng:t});return r=n.hasSame(o,"day")?`${r} ${u("today-at")}`:n.hasSame(o.plus({days:1}),"day")?`${r} ${u("tomorrow-at",{lng:t})}`:`${r} ${n.toFormat("ccc d.L.")}`,r=`${r} ${n.toFormat("HH:mm")}`,r}const Ve=e=>"SelectFromOwnLocations"===e.type||"back"===e.type?"":function(e){const t=Ne(e,!0);switch(e.layer){case"selectFromMap":case"currentPosition":case"ownLocations":case"back":return t[1]||t[0];case"favouriteVehicleRentalStation":case"favouritePlace":return t[0];default:return t.length>1&&""!==t[1]?t.join(", "):t[1]||t[0]}}(e.properties),Ge=({suggestions:e,t:t,lng:u})=>{let n=[];const o=e[0];return o&&(o.type&&o.type.includes("Favourite")&&n.push(t("favourite",{lng:u})),n=n.concat(He(e[0],u))),[...new Set(n)].join(" - ")};function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $e,Qe={exports:{}};
2
- /*! For license information please see index.js.LICENSE.txt */var Ke=($e||($e=1,function(e){var t;"undefined"!=typeof self&&self,e.exports=(t=B.default,function(){var e={888:function(e,t,u){var n,o;o=void 0!==u.g?u.g:"undefined"!=typeof window?window:this,n=function(){return function(e){var t={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},u=function(){var e={};return Array.prototype.forEach.call(arguments,function(t){for(var u in t){if(!t.hasOwnProperty(u))return;e[u]=t[u]}}),e},n=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,u=String(e),n=u.length,o=-1,r="",i=u.charCodeAt(0);++o<n;){if(0===(t=u.charCodeAt(o)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");r+=t>=1&&t<=31||127==t||0===o&&t>=48&&t<=57||1===o&&t>=48&&t<=57&&45===i?"\\"+t.toString(16)+" ":t>=128||45===t||95===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?u.charAt(o):"\\"+u.charAt(o)}return"#"+r},o=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},r=function(t){return t?(u=t,parseInt(e.getComputedStyle(u).height,10)+t.offsetTop):0;var u},i=function(t,u,n){0===t&&document.body.focus(),n||(t.focus(),document.activeElement!==t&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),e.scrollTo(0,u))},a=function(t,u,n,o){if(u.emitEvents&&"function"==typeof e.CustomEvent){var r=new CustomEvent(t,{bubbles:!0,detail:{anchor:n,toggle:o}});document.dispatchEvent(r)}};return function(s,l){var c,d,p,g,f={cancelScroll:function(e){cancelAnimationFrame(g),g=null,e||a("scrollCancel",c)},animateScroll:function(n,s,l){f.cancelScroll();var d=u(c||t,l||{}),h="[object Number]"===Object.prototype.toString.call(n),b=h||!n.tagName?null:n;if(h||b){var E=e.pageYOffset;d.header&&!p&&(p=document.querySelector(d.header));var A,m,y,F=r(p),D=h?n:function(t,u,n,r){var i=0;if(t.offsetParent)do{i+=t.offsetTop,t=t.offsetParent}while(t);return i=Math.max(i-u-n,0),r&&(i=Math.min(i,o()-e.innerHeight)),i}(b,F,parseInt("function"==typeof d.offset?d.offset(n,s):d.offset,10),d.clip),C=D-E,_=o(),B=0,v=function(e,t){var u=t.speedAsDuration?t.speed:Math.abs(e/1e3*t.speed);return t.durationMax&&u>t.durationMax?t.durationMax:t.durationMin&&u<t.durationMin?t.durationMin:parseInt(u,10)}(C,d),S=function(t){A||(A=t),B+=t-A,y=E+C*function(e,t){var u;return"easeInQuad"===e.easing&&(u=t*t),"easeOutQuad"===e.easing&&(u=t*(2-t)),"easeInOutQuad"===e.easing&&(u=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e.easing&&(u=t*t*t),"easeOutCubic"===e.easing&&(u=--t*t*t+1),"easeInOutCubic"===e.easing&&(u=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e.easing&&(u=t*t*t*t),"easeOutQuart"===e.easing&&(u=1- --t*t*t*t),"easeInOutQuart"===e.easing&&(u=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e.easing&&(u=t*t*t*t*t),"easeOutQuint"===e.easing&&(u=1+--t*t*t*t*t),"easeInOutQuint"===e.easing&&(u=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),e.customEasing&&(u=e.customEasing(t)),u||t}(d,m=(m=0===v?0:B/v)>1?1:m),e.scrollTo(0,Math.floor(y)),function(t,u){var o=e.pageYOffset;if(t==u||o==u||(E<u&&e.innerHeight+o)>=_)return f.cancelScroll(!0),i(n,u,h),a("scrollStop",d,n,s),A=null,g=null,!0}(y,D)||(g=e.requestAnimationFrame(S),A=t)};0===e.pageYOffset&&e.scrollTo(0,0),function(e,t,u){t||history.pushState&&u.updateURL&&history.pushState({smoothScroll:JSON.stringify(u),anchor:e.id},document.title,e===document.documentElement?"#top":"#"+e.id)}(n,h,d),"matchMedia"in e&&e.matchMedia("(prefers-reduced-motion)").matches?i(n,Math.floor(D),!1):(a("scrollStart",d,n,s),f.cancelScroll(!0),e.requestAnimationFrame(S))}}},h=function(t){if(!t.defaultPrevented&&!(0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey)&&"closest"in t.target&&(d=t.target.closest(s))&&"a"===d.tagName.toLowerCase()&&!t.target.closest(c.ignore)&&d.hostname===e.location.hostname&&d.pathname===e.location.pathname&&/#/.test(d.href)){var u,o;try{u=n(decodeURIComponent(d.hash))}catch(e){u=n(d.hash)}if("#"===u){if(!c.topOnEmptyHash)return;o=document.documentElement}else o=document.querySelector(u);(o=o||"#top"!==u?o:document.documentElement)&&(t.preventDefault(),function(t){if(history.replaceState&&t.updateURL&&!history.state){var u=e.location.hash;u=u||"",history.replaceState({smoothScroll:JSON.stringify(t),anchor:u||e.pageYOffset},document.title,u||e.location.href)}}(c),f.animateScroll(o,d))}},b=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(c)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(n(history.state.anchor)))||f.animateScroll(t,null,{updateURL:!1})}};return f.destroy=function(){c&&(document.removeEventListener("click",h,!1),e.removeEventListener("popstate",b,!1),f.cancelScroll(),c=null,d=null,p=null,g=null)},function(){if(!("querySelector"in document&&"addEventListener"in e&&"requestAnimationFrame"in e&&"closest"in e.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";f.destroy(),c=u(t,l||{}),p=c.header?document.querySelector(c.header):null,document.addEventListener("click",h,!1),c.updateURL&&c.popstate&&e.addEventListener("popstate",b,!1)}(),f}}(o)}.apply(t,[]),void 0===n||(e.exports=n)},432:function(e,t,u){var n=this&&this.__createBinding||(Object.create?function(e,t,u,n){void 0===n&&(n=u),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[u]}})}:function(e,t,u,n){void 0===n&&(n=u),e[n]=t[u]}),o=this&&this.__exportStar||function(e,t){for(var u in e)"default"===u||Object.prototype.hasOwnProperty.call(t,u)||n(t,e,u)};Object.defineProperty(t,"__esModule",{value:!0}),o(u(47),t),o(u(926),t),o(u(349),t),o(u(137),t),o(u(729),t),o(u(383),t),o(u(450),t),o(u(358),t),o(u(753),t),o(u(869),t),o(u(352),t),o(u(446),t),o(u(164),t),o(u(305),t),o(u(502),t)},349:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useArrowNavigation=void 0;var n=u(156);t.useArrowNavigation=function(e){var t=e.listItems,u=e.onArrowUpOrDown,o=(0,n.useState)(0),r=o[0],i=o[1],a=(0,n.useCallback)(function(e){i(e)},[t]),s=function(e){var n=e.key;if(null==t?void 0:t.length)if("ArrowUp"===n)u&&u(),e.preventDefault(),a(r>0?r-1:t.length-1);else{if("ArrowDown"!==n)return;u&&u(),e.preventDefault(),r<t.length-1?a(r+1):a(0)}};return(0,n.useEffect)(function(){return window.addEventListener("keydown",s),function(){return window.removeEventListener("keydown",s)}}),(0,n.useEffect)(function(){a(0)},[t]),{selectedIndex:r}}},446:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useDebounce=void 0;var n=u(156);t.useDebounce=function(e,t){void 0===t&&(t=300);var u=(0,n.useState)(e),o=u[0],r=u[1];return(0,n.useEffect)(function(){var u=setTimeout(function(){r(e)},t);return function(){clearTimeout(u)}},[e,t]),o}},164:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useElementSize=void 0;var n=u(156);t.useElementSize=function(){var e,t,u=(0,n.useRef)(null);return[u,{width:null===(e=null==u?void 0:u.current)||void 0===e?void 0:e.clientWidth,height:null===(t=null==u?void 0:u.current)||void 0===t?void 0:t.clientHeight}]},t.default=t.useElementSize},137:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersectionObserver=void 0;var n=u(156);t.useIntersectionObserver=function(e){var t=(0,n.useRef)(null),u=(0,n.useState)(!1),o=u[0],r=u[1],i=function(e){var t=e[0];r(t.isIntersecting)};return(0,n.useEffect)(function(){if(window&&window.IntersectionObserver){var u=new IntersectionObserver(i,e),n=t.current;return t.current&&u.observe(t.current),function(){n&&u.unobserve(n)}}r(!1)},[t,e]),{containerRef:t,isVisible:o}},t.default=t.useIntersectionObserver},729:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsBreakpoint=void 0;var n=u(156),o=u(432),r={xs:1,mobileSmall:320,mobile:375,tablet:768,tabletLarge:920,desktopSmall:1024,desktop:1260,desktopLarge:1440};t.useIsBreakpoint=function(e){var t="string"==typeof e?r[e]:e,u=(0,n.useState)(null),i=u[0],a=u[1],s=(0,n.useCallback)(function(){a(window.innerWidth)},[]);return(0,n.useEffect)(function(){s()},[]),(0,o.useOnResize)(s),i>=t},t.default=t.useIsBreakpoint},450:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsLoadingAfterError=void 0;var n=u(156);t.useIsLoadingAfterError=function(e,t){var u=(0,n.useState)(t),o=u[0],r=u[1];return(0,n.useEffect)(function(){e||r(t)},[e,t]),e&&o}},305:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsMobile=void 0;var n=u(729);t.useIsMobile=function(){return!(0,n.useIsBreakpoint)("tablet")},t.default=t.useIsMobile},383:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsomorphicLayoutEffect=void 0;var n=u(156);t.useIsomorphicLayoutEffect="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,t.default=t.useIsomorphicLayoutEffect},753:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useOnLoseFocusWithin=void 0;var n=u(156);t.useOnLoseFocusWithin=function(e){var t=e.ref,u=e.callback,o=e.watch;(0,n.useEffect)(function(){var e=function(){var e;if(o)return(null===(e=t.current)||void 0===e?void 0:e.matches(":focus-within"))?void 0:u()};return document.addEventListener("keyup",e),function(){return document.removeEventListener("keyup",e)}},[u,t,o])},t.default=t.useOnLoseFocusWithin},502:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useOnResize=void 0;var n=u(156);t.useOnResize=function(e){(0,n.useEffect)(function(){var t=function(){e(window.innerWidth)};return window.addEventListener("resize",t,{passive:!0}),function(){return window.removeEventListener("resize",t)}},[])},t.default=t.useOnResize},352:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useOnWindowFocus=void 0;var n=u(156);t.useOnWindowFocus=function(e){(0,n.useEffect)(function(){var t=function(){e&&"visible"===document.visibilityState&&e()};return window.addEventListener("visibilitychange",t,!1),function(){return window.removeEventListener("visibilitychange",t)}},[e])}},47:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useOutsideReacter=void 0;var n=u(156);t.useOutsideReacter=function(e,t){function u(u){e.current&&!e.current.contains(u.target)&&t()}(0,n.useEffect)(function(){return document.addEventListener("mousedown",u),function(){document.removeEventListener("mousedown",u)}})}},869:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useRunAfterUpdate=void 0;var n=u(156);t.useRunAfterUpdate=function(){var e=(0,n.useRef)(null);return(0,n.useEffect)(function(){e.current&&(e.current(),e.current=null)}),function(t){e.current=t}},t.default=t.useRunAfterUpdate},926:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useScrollLock=void 0;var n=u(156);t.useScrollLock=function(){return{lock:(0,n.useCallback)(function(){var e=window.scrollY+"px",t=document.body;t.style.position="fixed",t.style.top="-"+e},[]),unlock:(0,n.useCallback)(function(){var e=document.body,t=e.style.top,u=-1*parseInt(t||"0");e.style.position="",e.style.top="",u&&window.scrollTo(0,-1*parseInt(t||"0"))},[])}}},358:function(e,t,u){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useSmoothScroll=void 0;var o=u(156),r=n(u(888));t.useSmoothScroll=function(e){var t=(0,o.useRef)(null),u=e.ref,n=e.offset,i=void 0===n?0:n,a=e.speed,s=void 0===a?500:a;return(0,o.useEffect)(function(){t.current=new r.default(null,{speed:s,speedAsDuration:!0})},[]),(0,o.useCallback)(function(){u&&t.current&&t.current.animateScroll(u.current,null,{offset:function(){return i},updateURL:!1})},[i,u])}},156:function(e){e.exports=t}},u={};function n(t){var o=u[t];if(void 0!==o)return o.exports;var r=u[t]={exports:{}};return e[t].call(r.exports,r,r.exports,n),r.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(432)}())}(Qe)),Qe.exports),Xe=We(Ke),Ze={"fullscreen-root":"MobileSearch_fullscreen-root__l90DZ","combobox-container":"MobileSearch_combobox-container__UsUQ2","right-column":"MobileSearch_right-column__QT0kp","combobox-icon":"MobileSearch_combobox-icon__3syCw","combobox-label":"MobileSearch_combobox-label__mRQMF",container:"MobileSearch_container__JtL5q",input:"MobileSearch_input__Sjo1c","clear-input":"MobileSearch_clear-input__SGpE8",hasValue:"MobileSearch_hasValue__H1RPq",suggestion:"MobileSearch_suggestion__pqOkM",suggestionHighlighted:"MobileSearch_suggestionHighlighted__xpMMN",suggestionsContainerOpen:"MobileSearch_suggestionsContainerOpen__wwyZk",suggestionsList:"MobileSearch_suggestionsList__-pWWC","clear-search-history":"MobileSearch_clear-search-history__cO30c","mobile-modal-overlay":"MobileSearch_mobile-modal-overlay__bH39q","mobile-modal":"MobileSearch_mobile-modal__DFUUM","mobile-modal-content":"MobileSearch_mobile-modal-content__7q4zK"};Pe('input[type=text] {\n margin: 0;\n padding: 0;\n}\n\n.MobileSearch_fullscreen-root__l90DZ {\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\n.MobileSearch_combobox-container__UsUQ2 {\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}\n.MobileSearch_combobox-container__UsUQ2 .MobileSearch_right-column__QT0kp {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px;\n}\n\n.MobileSearch_combobox-icon__3syCw {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none;\n}\n.MobileSearch_combobox-icon__3syCw svg {\n width: 14px;\n height: 21px;\n transform: rotate(-180deg);\n}\n\n.MobileSearch_combobox-label__mRQMF {\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\n.MobileSearch_container__JtL5q {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.MobileSearch_container__JtL5q .MobileSearch_input__Sjo1c {\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 appearance: none;\n}\n.MobileSearch_container__JtL5q .MobileSearch_input__Sjo1c:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff;\n}\n\nbutton.MobileSearch_clear-input__SGpE8 {\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}\nbutton.MobileSearch_clear-input__SGpE8 svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.MobileSearch_clear-input__SGpE8:focus {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileSearch_clear-input__SGpE8:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileSearch_clear-input__SGpE8:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileSearch_hasValue__H1RPq {\n color: #333;\n}\n\n.MobileSearch_suggestion__pqOkM {\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\n.MobileSearch_suggestionHighlighted__xpMMN {\n background-color: #f2f5f7;\n}\n\n.MobileSearch_suggestionsContainerOpen__wwyZk {\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}\n.MobileSearch_suggestionsContainerOpen__wwyZk .MobileSearch_suggestionsList__-pWWC {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f2f5f7;\n}\n\n.MobileSearch_clear-search-history__cO30c {\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: #f2f5f7;\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_suggestionHighlighted__xpMMN .MobileSearch_clear-search-history__cO30c {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileSearch_mobile-modal-overlay__bH39q {\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\n.MobileSearch_mobile-modal__DFUUM {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.MobileSearch_mobile-modal__DFUUM.ReactModal__Content--after-open > div {\n transform: translateY(0);\n}\n.MobileSearch_mobile-modal__DFUUM.ReactModal__Content--before-close > div {\n transform: translateY(10%);\n}\n\n.MobileSearch_mobile-modal-content__7q4zK {\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 Je={"fullscreen-root":"MobileNoScroll_fullscreen-root__fZbOA","combobox-container":"MobileNoScroll_combobox-container__9Q02x","right-column":"MobileNoScroll_right-column__Hk-62","combobox-icon":"MobileNoScroll_combobox-icon__WlXar","combobox-label":"MobileNoScroll_combobox-label__oeVbH",container:"MobileNoScroll_container__veReP",input:"MobileNoScroll_input__zo9Gg","clear-input":"MobileNoScroll_clear-input__lQlxs",hasValue:"MobileNoScroll_hasValue__1Gx3J",suggestion:"MobileNoScroll_suggestion__hTxDr",suggestionHighlighted:"MobileNoScroll_suggestionHighlighted__zxzXj",suggestionsContainerOpen:"MobileNoScroll_suggestionsContainerOpen__sX1RA",suggestionsList:"MobileNoScroll_suggestionsList__wXJTV","clear-search-history":"MobileNoScroll_clear-search-history__vR2Xw","mobile-modal-overlay":"MobileNoScroll_mobile-modal-overlay__Qw6Np","mobile-modal":"MobileNoScroll_mobile-modal__xYuHh","mobile-modal-content":"MobileNoScroll_mobile-modal-content__0Ft4g"};function Ye(e,t){if(null==e)return{};var u,n,o=function(e,t){if(null==e)return{};var u={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;u[n]=e[n]}return u}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)u=r[n],-1===t.indexOf(u)&&{}.propertyIsEnumerable.call(e,u)&&(o[u]=e[u])}return o}Pe('input[type=text] {\n margin: 0;\n padding: 0;\n}\n\n.MobileNoScroll_fullscreen-root__fZbOA {\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\n.MobileNoScroll_combobox-container__9Q02x {\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}\n.MobileNoScroll_combobox-container__9Q02x .MobileNoScroll_right-column__Hk-62 {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px;\n}\n\n.MobileNoScroll_combobox-icon__WlXar {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none;\n}\n.MobileNoScroll_combobox-icon__WlXar svg {\n width: 14px;\n height: 21px;\n transform: rotate(-180deg);\n}\n\n.MobileNoScroll_combobox-label__oeVbH {\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\n.MobileNoScroll_container__veReP {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.MobileNoScroll_container__veReP .MobileNoScroll_input__zo9Gg {\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 appearance: none;\n}\n.MobileNoScroll_container__veReP .MobileNoScroll_input__zo9Gg:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff;\n}\n\nbutton.MobileNoScroll_clear-input__lQlxs {\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}\nbutton.MobileNoScroll_clear-input__lQlxs svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.MobileNoScroll_clear-input__lQlxs:focus {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileNoScroll_clear-input__lQlxs:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileNoScroll_clear-input__lQlxs:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileNoScroll_hasValue__1Gx3J {\n color: #333;\n}\n\n.MobileNoScroll_suggestion__hTxDr {\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\n.MobileNoScroll_suggestionHighlighted__zxzXj {\n background-color: #f2f5f7;\n}\n\n.MobileNoScroll_suggestionsContainerOpen__sX1RA {\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}\n.MobileNoScroll_suggestionsContainerOpen__sX1RA .MobileNoScroll_suggestionsList__wXJTV {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f2f5f7;\n}\n\n.MobileNoScroll_clear-search-history__vR2Xw {\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: #f2f5f7;\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_suggestionHighlighted__zxzXj .MobileNoScroll_clear-search-history__vR2Xw {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileNoScroll_mobile-modal-overlay__Qw6Np {\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\n.MobileNoScroll_mobile-modal__xYuHh {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.MobileNoScroll_mobile-modal__xYuHh.ReactModal__Content--after-open > div {\n transform: translateY(0);\n}\n.MobileNoScroll_mobile-modal__xYuHh.ReactModal__Content--before-close > div {\n transform: translateY(10%);\n}\n\n.MobileNoScroll_mobile-modal-content__0Ft4g {\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\n.MobileNoScroll_suggestionsContainerOpen__sX1RA {\n -ms-overflow-style: none; /* Internet Explorer 10+ */\n scrollbar-width: none; /* Firefox */\n}\n.MobileNoScroll_suggestionsContainerOpen__sX1RA::-webkit-scrollbar {\n display: none; /* Safari and Chrome */\n}');const et=["item","lng","getItemProps","highlightedIndex","itemIndex","styles"],tt=["suggestions","getMenuProps","getItemProps","lng","styles","hidden","renderClearHistoryButton","handleClearHistory"];function ut(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function nt(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):ut(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}function ot(e){let{item:t,lng:u,getItemProps:o,highlightedIndex:r,itemIndex:i,styles:a}=e,s=Ye(e,et);const[l]=n.useTranslation(),c="FutureRoute"===t.type?nt(nt({},t),{},{translatedText:Ue(t,u,l)}):t,d=He(t,u,l);return B.default.createElement("li",Object.assign({className:v.default(a.suggestion,r===i&&a.suggestionHighlighted)},o({index:i})),B.default.createElement(z.default,Object.assign({item:c,content:d,lng:u},s)))}const rt="production"!==process.env.NODE_ENV?_.default.shape({name:_.default.string,type:_.default.string,address:_.default.string,selectedIconId:_.default.string,iconColor:_.default.string,translatedText:_.default.string,properties:_.default.shape({layer:_.default.string,color:_.default.string,localadmin:_.default.string,mode:_.default.string,id:_.default.string,source:_.default.string,arrowClicked:_.default.bool,destination:_.default.shape({name:_.default.string,localadmin:_.default.string}),origin:_.default.shape({name:_.default.string,localadmin:_.default.string})})}):{};function it(e){let{suggestions:t,getMenuProps:u,getItemProps:o,lng:r,styles:i,hidden:a,renderClearHistoryButton:s,handleClearHistory:l}=e,c=Ye(e,tt);const[d]=n.useTranslation();return B.default.createElement("div",{className:v.default(i.suggestionsContainerOpen,i.suggestionsContainer,a&&"hidden")},B.default.createElement("ul",Object.assign({className:i.suggestionsList},u()),t.map((e,t)=>B.default.createElement(ot,Object.assign({key:`${e.type}-${e.properties.gid||e.properties.name||e.properties.gtfsId}`,getItemProps:o,itemIndex:t,item:e,lng:r,styles:i},c))),s&&B.default.createElement("li",o({index:t.length}),B.default.createElement("button",{onClick:l,type:"button",className:i["clear-search-history"]},d("clear-search-history",{lng:r})))))}"production"!==process.env.NODE_ENV&&(ot.propTypes={item:rt.isRequired,lng:_.default.string.isRequired,getItemProps:_.default.func.isRequired,highlightedIndex:_.default.number.isRequired,itemIndex:_.default.number.isRequired,styles:_.default.objectOf(_.default.string).isRequired}),"production"!==process.env.NODE_ENV&&(it.propTypes={suggestions:_.default.arrayOf(rt).isRequired,getMenuProps:_.default.func.isRequired,getItemProps:_.default.func.isRequired,lng:_.default.string.isRequired,styles:_.default.objectOf(_.default.string).isRequired,hidden:_.default.bool.isRequired,renderClearHistoryButton:_.default.bool,handleClearHistory:_.default.func}),it.defaultProps={renderClearHistoryButton:!1,handleClearHistory:()=>{}};const at=({color:e,lng:t,clearInput:u,onKeyDown:o,styles:r})=>{const[i]=n.useTranslation();return B.default.createElement("button",{type:"button",className:r["clear-input"],onClick:u,"aria-label":i("clear-button-label",{lng:t}),onKeyDown:o},B.default.createElement(P.default,{img:"close",color:e}))};function st({id:e,lng:t,value:u,placeholder:n,required:o,getInputProps:r,getLabelProps:i,clearInput:a,ariaLabel:s,inputRef:l,styles:c,renderLabel:d,isMobile:p,inputClassName:g,transportMode:f,clearButtonColor:h,autoFocus:b,inputOnBlur:E}){return B.default.createElement("div",{className:c.container},d&&B.default.createElement("label",i({className:c["sr-only"],htmlFor:e}),s),B.default.createElement("input",Object.assign({"aria-label":s,autoFocus:b,placeholder:n,required:o,type:"text",className:v.default(c.input,c[e],g,p&&f&&c.thin,u&&c.hasValue),value:u,id:e},r({ref:l,onBlur:E}))),u&&B.default.createElement(at,{lng:t,clearInput:()=>a(l),styles:c,color:h,onKeyDown:e=>qe(e)&&a(l)}))}function lt(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function ct(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):lt(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}"production"!==process.env.NODE_ENV&&(at.propTypes={color:_.default.string.isRequired,lng:_.default.string.isRequired,clearInput:_.default.func.isRequired,onKeyDown:_.default.func.isRequired,styles:_.default.objectOf(_.default.string).isRequired}),"production"!==process.env.NODE_ENV&&(st.propTypes={id:_.default.string.isRequired,lng:_.default.string.isRequired,placeholder:_.default.string.isRequired,required:_.default.bool.isRequired,value:_.default.string.isRequired,getInputProps:_.default.func.isRequired,getLabelProps:_.default.func.isRequired,clearInput:_.default.func.isRequired,ariaLabel:_.default.string.isRequired,inputRef:_.default.shape({current:_.default.oneOfType([_.default.string,_.default.object])}).isRequired,styles:_.default.objectOf(_.default.string).isRequired,renderLabel:_.default.bool,isMobile:_.default.bool.isRequired,inputClassName:_.default.string.isRequired,transportMode:_.default.string,clearButtonColor:_.default.string.isRequired,autoFocus:_.default.bool,inputOnBlur:_.default.func}),st.defaultProps={autoFocus:!1,renderLabel:!1,transportMode:void 0,inputOnBlur:()=>{}};const dt=({appElement:e,id:t,placeholder:o,clearInput:r,onSelectedItemChange:i,fontWeights:a,clearOldSearches:s,suggestionProps:l,lng:c,ariaProps:d,value:g,inputClassName:f,required:h,mobileLabel:b,showScroll:E,state:A,dispatch:m,colors:y})=>{const[F]=n.useTranslation(),{lock:D,unlock:C}=Xe.useScrollLock(),_=E?Ze:Je,v=`${t}-input`,S=`${t}-label`,[k,w]=u.useState(!1),x=B.default.useRef();u.useEffect(()=>{N.default.setAppElement(e)},[]),u.useEffect(()=>{A.renderMobile?D():C()},[A.renderMobile]);const{highlightedIndex:O,getLabelProps:j,getMenuProps:M,getInputProps:R,getItemProps:I,setHighlightedIndex:L}=p.useCombobox({items:A.suggestions,inputValue:g,isOpen:!0,onSelectedItemChange:e=>{i(e),m({type:"TOGGLE_MENU",isMobile:!0})},inputId:v,labelId:S,selectedItem:null,defaultHighlightedIndex:-1,onInputValueChange:({inputValue:e})=>A.renderMobile&&m({type:"INPUT_CHANGE",value:e}),stateReducer:(e,{changes:t,type:u})=>{switch(u){case p.useCombobox.stateChangeTypes.InputKeyDownEscape:return L(-1),m({type:"TOGGLE_MENU",isMobile:!0}),e;case p.useCombobox.stateChangeTypes.InputKeyDownEnter:return A.loading?(m({type:"PENDING_ENTER",enterPending:!0}),e):-1===e.highlightedIndex?ct(ct({},t),{},{selectedItem:A.suggestions[0]}):t;case p.useCombobox.stateChangeTypes.InputBlur:return e;default:return t}},itemToString:e=>e?Ve(e):""});j({},{suppressRefError:!0}),M({},{suppressRefError:!0}),R({},{suppressRefError:!0}),I({index:-1},{suppressRefError:!0});const{ariaRequiredText:z,SearchBarId:T,ariaCurrentSuggestion:H}=d,U=z.concat(" ").concat(T).concat(" ").concat(H);return B.default.createElement(N.default,{isOpen:A.renderMobile,className:_["mobile-modal"],overlayClassName:_["mobile-modal-overlay"],shouldReturnFocusAfterClose:!1,shouldCloseOnEsc:!0},B.default.createElement("div",{className:_["mobile-modal-content"],style:{"--color":y.primary,"--accessible-primary-color":y.accessiblePrimary,"--hover-color":y.hover,"--font-weight-medium":a.medium}},B.default.createElement("div",{className:_["combobox-container"],htmlFor:v},B.default.createElement("button",{type:"button",className:_["combobox-icon"],onClick:()=>{L(-1),m({type:"TOGGLE_MENU",isMobile:!0})},onKeyDown:e=>{qe(e)&&(L(-1),m({type:"TOGGLE_MENU",isMobile:!0}))},"aria-label":F("cancel",{lng:c}),tabIndex:0},B.default.createElement(P.default,{img:"arrow",color:y.primary})),B.default.createElement("span",{className:_["right-column"]},B.default.createElement("span",Object.assign({className:_["combobox-label"],id:S},j()),b),B.default.createElement(st,{placeholder:ze(t)?F("address-place-or-business",{lng:c}):o,id:t,lng:c,value:g,getInputProps:R,getLabelProps:j,clearInput:()=>r(x),ariaLabel:U,inputRef:x,styles:_,renderLabel:!1,clearButtonColor:y.primary,autoFocus:!0,inputClassName:f,required:h,isMobile:!0}),B.default.createElement(it,Object.assign({suggestions:A.suggestions,getMenuProps:M,getItemProps:I,highlightedIndex:O,isOpen:!0,hidden:!1,lng:c,styles:_,renderClearHistoryButton:!0,handleClearHistory:()=>w(!0)},l)))),B.default.createElement(q.default,{appElement:e,isModalOpen:k,handleClose:()=>w(!1),headerText:F("delete-old-searches-header",{lng:c}),primaryButtonText:F("delete",{lng:c}),secondaryButtonText:F("cancel",{lng:c}),primaryButtonOnClick:()=>{s(),w(!1)},secondaryButtonOnClick:()=>w(!1),colors:y,fontWeights:a,lang:c})))};function pt(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function gt(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):pt(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}"production"!==process.env.NODE_ENV&&(dt.propTypes={appElement:_.default.string.isRequired,id:_.default.string.isRequired,clearInput:_.default.func.isRequired,clearOldSearches:_.default.func.isRequired,onSelectedItemChange:_.default.func.isRequired,value:_.default.string.isRequired,colors:_.default.objectOf(_.default.string).isRequired,fontWeights:_.default.shape({medium:_.default.number.isRequired}).isRequired,suggestionProps:_.default.shape({}).isRequired,ariaProps:_.default.shape({ariaRequiredText:_.default.string.isRequired,SearchBarId:_.default.string.isRequired,ariaCurrentSuggestion:_.default.string.isRequired}).isRequired,inputClassName:_.default.string.isRequired,placeholder:_.default.string.isRequired,mobileLabel:_.default.string.isRequired,required:_.default.bool.isRequired,showScroll:_.default.bool.isRequired,lng:_.default.string.isRequired,state:_.default.shape({suggestions:_.default.arrayOf(_.default.shape({})).isRequired,renderMobile:_.default.bool.isRequired,loading:_.default.bool.isRequired}).isRequired,dispatch:_.default.func.isRequired});const ft=(e,t)=>{switch(t.type){case"INPUT_CHANGE":return gt(gt({},e),{},{value:t.value});case"FETCH_SUGGESTIONS":return gt(gt({},e),{},{loading:t.loading,suggestions:t.suggestions||e.suggestions});case"CLEAR_SUGGESTIONS":return gt(gt({},e),{},{suggestions:[]});case"RESET_SOURCES":return gt(gt({},e),{},{sources:t.sources});case"SET_SOURCES":return gt(gt({},e),{},{showOwnPlaces:t.showOwnPlaces,sources:t.sources,pendingSelection:t.pendingSelection});case"CLEAR":return gt(gt({},e),{},{value:"",isCleared:!0,suggestions:[]});case"INPUT_BLUR":return gt(gt({},e),{},{value:t.value||e.value,isCleared:!t.isMobile&&e.isCleared,pendingSelection:null,showOwnPlaces:!1});case"RESET":return t.initialState;case"PENDING_ENTER":return gt(gt({},e),{},{enterPending:t.enterPending});case"TOGGLE_MENU":return t.isMobile?e.renderMobile?gt(gt({},e),{},{renderMobile:!1,isCleared:!1}):gt(gt({},e),{},{renderMobile:!0,value:e.isCleared?"":e.value}):gt(gt({},e),{},{isMenuOpen:!e.isMenuOpen,renderMobile:t.isMobile&&!e.renderMobile});default:return e}};function ht(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function bt(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):ht(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}const Et=["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","Wybrane miejsce"];function At({appElement:e,id:t,placeholder:o,onSelect:r,icon:i,value:a,onClear:s,lang:l,getAutoSuggestIcons:c,handleViaPoints:d,focusChange:g,storeRef:f,isMobile:h,mobileLabel:b,inputClassName:E,translatedPlaceholder:A,required:m,ariaLabel:y,fontWeights:F,colors:D,modeSet:C,showScroll:_,isEmbedded:S,transportMode:k,targets:w,sources:x,geocodingSize:O,filterResults:j,searchContext:M,pathOpts:R,refPoint:I}){const[L]=n.useTranslation(),N={suggestions:[],loading:!1,sources:x,showOwnPlaces:!1,pendingSelection:null,isCleared:!1,renderMobile:!1,value:a,enterPending:!1,isMenuOpen:!1},[q,z]=u.useReducer(ft,N);u.useEffect(()=>z({type:"RESET",initialState:N}),[a]),u.useEffect(()=>z({type:"RESET_SOURCES",sources:x}),[x]);const T=u.useRef(t);u.useEffect(()=>{f&&f(T.current)},[T.current]);const H=u.useCallback(()=>{const e=!(null!=w&&w.length)||w.includes("Locations"),t=(({targets:e,isLocationSearch:t,isMobile:u,ownPlaces:n,sources:o})=>{const r=!(null!=e&&e.length);let i;return n?(i=["Locations"],(r||e.includes("Stops"))&&i.push("Stops"),(r||e.includes("Stations"))&&i.push("Stations"),(r||e.includes("VehicleRentalStations"))&&i.push("VehicleRentalStations")):r||(i=[...e],!t||u||o.length&&!o.includes("Favourite")||i.push("SelectFromOwnLocations")),i})({targets:w,isLocationSearch:e,isMobile:h,ownPlaces:q.showOwnPlaces,sources:q.sources});((e,t,u,n,o,r,i,a,s,l)=>{a(null),je(e,t,u,n,o,r,i,a,s,l)})(t,q.sources?q.sources.filter(t=>!e||"Favourite"===!t||q.showOwnPlaces||h):q.sources,k,M,j,O,{input:q.value||""},e=>{if(null==e)return void z({type:"FETCH_SUGGESTIONS",loading:!0});const t=(e.results||[]).filter(e=>"FutureRoute"!==e.type||"FutureRoute"===e.type&&e.properties.time>Date.now()/1e3).map(e=>{if("CurrentLocation"===e.type||"SelectFromMap"===e.type||"SelectFromOwnLocations"===e.type||"back"===e.type){const t=bt({},e);return t.properties.labelId=L(e.properties.labelId,{lng:l}),t}return e});z({type:"FETCH_SUGGESTIONS",loading:!1,suggestions:t})},R,I)},[q.value,q.sources,q.showOwnPlaces,w,k,M,j,O,h,l,R,I,t]),U=u.useCallback((e,u)=>{e&&(d?d(e,u):r(e,t),!g||h&&!S||g(),T.current&&T.current.blur())},[h]),V=e=>U(e.selectedItem,e.highlightedIndex),{isOpen:G,highlightedIndex:W,getLabelProps:$,getMenuProps:Q,getInputProps:K,getItemProps:X,selectItem:Z,openMenu:J,closeMenu:Y}=p.useCombobox({inputId:t,inputValue:q.value,defaultHighlightedIndex:0,onInputValueChange:({inputValue:e})=>z({type:"INPUT_CHANGE",value:e}),stateReducer:u.useCallback((e,{type:t,changes:u})=>{switch(t){case p.useCombobox.stateChangeTypes.ItemClick:case p.useCombobox.stateChangeTypes.InputKeyDownEnter:return q.loading?(z({type:"PENDING_ENTER",enterPending:!0}),e):u.selectedItem?"SelectFromOwnLocations"===u.selectedItem.type?(z({type:"SET_SOURCES",sources:["Favourite","Back"],showOwnPlaces:!0,pendingSelection:u.selectedItem.type}),e):"back"===u.selectedItem.type?(z({type:"SET_SOURCES",sources:x,showOwnPlaces:!1,pendingSelection:null}),e):u:u;case p.useCombobox.stateChangeTypes.InputClick:return Et.includes(a)?bt(bt({},u),{},{inputValue:"",isOpen:!0}):bt(bt({},u),{},{isOpen:!0});case p.useCombobox.stateChangeTypes.InputBlur:return u.selectedItem?bt(bt({},u),{},{selectedItem:e.selectItem,inputValue:e.inputValue}):u;case p.useCombobox.stateChangeTypes.InputKeyDownEscape:return bt(bt({},u),{},{inputValue:""});default:return u}},[q.loading,a,h]),items:q.suggestions,itemToString:e=>e?Ve(e):"",onSelectedItemChange:V,onIsOpenChange:e=>{e.isOpen&&!q.renderMobile&&z({type:"TOGGLE_MENU",isMobile:h})}}),ee=e=>{z({type:"CLEAR"}),s&&s(t),e.current&&e.current.focus(),J()};u.useEffect(()=>{(G||q.renderMobile)&&H(q.value)},[G,q.renderMobile,q.value,H]),u.useEffect(()=>{q.enterPending&&!q.loading&&(U(q.suggestions[0],0),Y())},[q.loading,q.pendingEnter,q.suggestions]);const te={loading:q.loading,isMobile:h,ariaFavouriteString:L("favourite",{lng:l}),fontWeights:F,getAutoSuggestIcons:c,colors:D,modeSet:C},{ariaCurrentSuggestion:ue,ariaRequiredText:ne,SearchBarId:oe,ariaLabelText:re}=(({id:e,ariaLabel:t,lng:u,t:n,isMobile:o,suggestions:r,value:i,required:a})=>{const s=e.replace("searchfield-",""),l=t||n(s,{lng:u}).replace("searchfield-","").concat("."),c=a?`${n("required",{lng:u})}.`:"",d=n(o?"search-autosuggest-label-instructions-mobile":"search-autosuggest-label-instructions-desktop",{lng:u}),p="origin"===e?n("search-autosuggest-label-move-to-destination",{lng:u}):"";return{SearchBarId:l,ariaRequiredText:c,ariaLabelText:d.concat(" ").concat(p),ariaSuggestionLen:n("search-autosuggest-len",{count:r.length,lng:u}),ariaCurrentSuggestion:Ge({suggestions:r,t:n,lng:u})||i?n("search-current-suggestion",{lng:u,selection:Ge({suggestions:r,t:n,lng:u}).toLowerCase()||i}):""}})({id:t,lng:l,t:L,isMobile:h,ariaLabel:y,suggestions:q.suggestions,value:q.value,required:m});return u.useEffect(()=>{q.renderMobile||G||z({type:"RESET",initialState:N})},[q.renderMobile,G]),B.default.createElement(B.default.Fragment,null,h&&B.default.createElement(dt,{placeholder:L(o,{lng:l}),fontWeights:F,clearOldSearches:()=>{const{context:e,clearOldSearches:t,clearFutureRoutes:u}=M;e&&t&&(t(e),u&&u(e),H(q.value))},appElement:e,mobileLabel:b||L(t,{lng:l}),ariaProps:{ariaCurrentSuggestion:ue,SearchBarId:oe,ariaRequiredText:ne},id:t,lng:l,onSelectedItemChange:V,value:q.value,clearInput:ee,suggestionProps:te,showScroll:!!_,colors:D,inputClassName:E,required:m,state:q,dispatch:z}),B.default.createElement("div",{className:v.default(Re["autosuggest-input-container"],Re[t],q.renderMobile&&"hidden"),style:{"--color":D.primary,"--hover-color":D.hover}},i&&B.default.createElement("div",{className:v.default(Re["autosuggest-input-icon"],Re[t],E&&Re[`${E}-input-icon`]),"aria-label":ne.concat(" ").concat(oe).concat(" ").concat(L("search-autosuggest-label",{lng:l}))},B.default.createElement(P.default,{img:`${i}`})),B.default.createElement(st,{inputClassName:E,ariaLabel:ue.concat(" ").concat(ne).concat(" ").concat(oe).concat(" ").concat(re),id:t,lng:l,getInputProps:K,getLabelProps:$,selectItem:Z,value:q.value,clearInput:ee,inputRef:T,styles:Re,clearButtonColor:D.primary,placeholder:A||L(o,{lng:l}),required:m,transportMode:k,isMobile:h,inputOnBlur:()=>{z({isMobile:h,value:!h&&a,type:"INPUT_BLUR"}),h||z({type:"RESET",initialState:N})}}),B.default.createElement(it,Object.assign({hidden:!G||h,highlightedIndex:W,getItemProps:X,getMenuProps:Q,suggestions:q.suggestions,lng:l,styles:Re},te))))}"production"!==process.env.NODE_ENV&&(At.propTypes={appElement:_.default.string.isRequired,icon:_.default.string,id:_.default.string.isRequired,placeholder:_.default.string.isRequired,translatedPlaceholder:_.default.string,value:_.default.string,transportMode:_.default.string,geocodingSize:_.default.number,filterResults:_.default.func,searchContext:_.default.shape({URL_PELIAS:_.default.string,context:_.default.object,clearOldSearches:_.default.func,clearFutureRoutes:_.default.func}).isRequired,sources:_.default.arrayOf(_.default.string),targets:_.default.arrayOf(_.default.string),ariaLabel:_.default.string,onSelect:_.default.func.isRequired,onClear:_.default.func,storeRef:_.default.func,handleViaPoints:_.default.func,focusChange:_.default.func,lang:_.default.string,isMobile:_.default.bool,pathOpts:_.default.shape({routesPrefix:_.default.string,stopsPrefix:_.default.string}),mobileLabel:_.default.string,refPoint:_.default.shape({address:_.default.string,lat:_.default.number,lon:_.default.number}),inputClassName:_.default.string,fontWeights:_.default.shape({medium:_.default.number}),colors:_.default.objectOf(_.default.string),getAutoSuggestIcons:_.default.objectOf(_.default.func),required:_.default.bool,modeSet:_.default.string,showScroll:_.default.bool,isEmbedded:_.default.bool}),At.defaultProps={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,pathOpts:{routesPrefix:"linjat",stopsPrefix:"pysakit"},ariaLabel:void 0,mobileLabel:void 0,inputClassName:"",translatedPlaceholder:void 0,fontWeights:{medium:500},colors:g.defaultColors,required:!1,modeSet:void 0,showScroll:!1,refPoint:{}};e.default=e=>B.default.createElement(n.I18nextProvider,{i18n:Me},B.default.createElement(At,e)),Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prop-types"),require("react"),require("react-i18next"),require("classnames"),require("lodash/debounce"),require("lodash/flatten"),require("lodash/take"),require("lodash/isString"),require("lodash/orderBy"),require("lodash/uniqWith"),require("lodash/get"),require("downshift"),require("@digitransit-component/digitransit-component-icon"),require("i18next"),require("lodash/isEqual"),require("lodash/memoize"),require("lodash/escapeRegExp"),require("lodash/cloneDeep"),require("luxon"),require("react-modal"),require("@digitransit-component/digitransit-component-dialog-modal"),require("@digitransit-component/digitransit-component-suggestion-item")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","react-i18next","classnames","lodash/debounce","lodash/flatten","lodash/take","lodash/isString","lodash/orderBy","lodash/uniqWith","lodash/get","downshift","@digitransit-component/digitransit-component-icon","i18next","lodash/isEqual","lodash/memoize","lodash/escapeRegExp","lodash/cloneDeep","luxon","react-modal","@digitransit-component/digitransit-component-dialog-modal","@digitransit-component/digitransit-component-suggestion-item"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).DTAutosuggest={},e.PropTypes,e.React,e.reactI18next,e.cx,e.debounce,e.flatten,e.take,e.isString,e.orderBy,e.uniqWith,e.get,e.downshift,e.Icon,e.i18next,e.isEqual,e.memoize,e.escapeRegExp,e.cloneDeep,e.luxon,e.ReactModal,e.DialogModal,e.SuggestionItem)}(this,function(e,t,u,n,o,r,i,a,s,l,c,d,p,g,f,h,b,E,A,m,y,F,D){"use strict";function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=C(t),v=C(u),B=C(o),S=C(r),k=C(i),w=C(a),x=C(s),O=C(l),j=C(c),M=C(d),P=C(g),R=C(b),I=C(E),L=C(A),N=C(y),q=C(F),z=C(D);function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function H(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var u=e[Symbol.toPrimitive];if(void 0!==u){var n=u.call(e,t||"default");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==T(t)?t:t+""}function U(e,t,u){return(t=H(t))in e?Object.defineProperty(e,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):e[t]=u,e}function V(e,t){return e&&t&&e===t}const W=["stop","station","favouriteStop","favouriteStation"],G=["favouriteVehicleRentalStation","bikestation"];function $(e){if(!e)return"";const t=e.split(":");return 0===t.length?"":`citybikes${t[0]}:bikestation:${t[1]}`}function Q(e,t){const u=e.properties,n=t.properties;if("FutureRoute"===e.type&&"FutureRoute"===t.type){const e=u.origin,t=u.destination,o=n.origin,r=n.destination;return`${e.name}//${e.localadmin}//${t.name}//${t.localadmin}`===`${o.name}//${o.localadmin}//${r.name}//${r.localadmin}`}if("FutureRoute"===e.type||"FutureRoute"===t.type)return!1;if(G.includes(u.layer)&&G.includes(n.layer)){return(u.gid||$(u.labelId))===(n.gid||$(n.labelId))}if(u.gtfsId&&n.gtfsId)return u.gtfsId===n.gtfsId;if(W.includes(u.layer)&&W.includes(n.layer)&&u.gid&&n.gid)return u.gid===n.gid;const o=e&&e.geometry?e.geometry.coordinates:void 0,r=t&&t.geometry?t.geometry.coordinates:void 0;return!!(o&&r&&Math.abs(o[0]-r[0])<1e-6&&Math.abs(o[1]-r[1])<1e-6&&(V(u.name,n.name)||V(u.label,n.label)||V(u.address,n.address)||V(u.address,n.label)||V(u.label,n.address)))}const K=e=>x.default(e)?e.toLowerCase():"",X=e=>e.split(/([A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{1031F}\u{1032D}-\u{10340}\u{10342}-\u{10349}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{10400}-\u{1049D}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10860}-\u{10876}\u{10880}-\u{1089E}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{10900}-\u{10915}\u{10920}-\u{10939}\u{10940}-\u{10959}\u{10980}-\u{109B7}\u{109BE}\u{109BF}\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A60}-\u{10A7C}\u{10A80}-\u{10A9C}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B60}-\u{10B72}\u{10B80}-\u{10B91}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10D00}-\u{10D23}\u{10D4A}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC7}\u{10F00}-\u{10F1C}\u{10F27}\u{10F30}-\u{10F45}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FC4}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{11103}-\u{11126}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111DA}\u{111DC}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11680}-\u{116AA}\u{116B8}\u{11700}-\u{1171A}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118DF}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DB0}-\u{11DDB}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11FB0}\u{12000}-\u{12399}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A70}-\u{16ABE}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16E40}-\u{16E7F}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF2}\u{16FF3}\u{17000}-\u{18CD5}\u{18CFF}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E4D0}-\u{1E4EB}\u{1E5D0}-\u{1E5ED}\u{1E5F0}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}\u{1E6FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E900}-\u{1E943}\u{1E94B}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B81D}\u{2B820}-\u{2CEAD}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{33479}]+)/u),Z=e=>/^[0-9]+[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{1031F}\u{1032D}-\u{10340}\u{10342}-\u{10349}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{10400}-\u{1049D}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10860}-\u{10876}\u{10880}-\u{1089E}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{10900}-\u{10915}\u{10920}-\u{10939}\u{10940}-\u{10959}\u{10980}-\u{109B7}\u{109BE}\u{109BF}\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A60}-\u{10A7C}\u{10A80}-\u{10A9C}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B60}-\u{10B72}\u{10B80}-\u{10B91}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10D00}-\u{10D23}\u{10D4A}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC7}\u{10F00}-\u{10F1C}\u{10F27}\u{10F30}-\u{10F45}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FC4}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{11103}-\u{11126}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111DA}\u{111DC}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11680}-\u{116AA}\u{116B8}\u{11700}-\u{1171A}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118DF}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DB0}-\u{11DDB}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11FB0}\u{12000}-\u{12399}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A70}-\u{16ABE}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16E40}-\u{16E7F}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF2}\u{16FF3}\u{17000}-\u{18CD5}\u{18CFF}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E4D0}-\u{1E4EB}\u{1E5D0}-\u{1E5ED}\u{1E5F0}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}\u{1E6FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E900}-\u{1E943}\u{1E94B}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B81D}\u{2B820}-\u{2CEAD}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{33479}]+$/u.test(e),J="back",Y="currentPosition",ee="favouriteStop",te="favouriteStation",ue="favouritePlace",ne="favouriteRoute",oe="favouriteVehicleRentalStation",re="futureRoute",ie="station",ae="selectFromMap",se="ownLocations",le="stop",ce="bikestation",de="carpark",pe="bikepark",ge=({layer:e,type:t})=>"stop"===e||"favouriteStop"===e||"stop"===t||"favouriteStop"===t,fe=(e,t)=>{switch(e){case Y:return 1;case J:return.9;case ae:return.8;case se:return.79;case te:case ue:case ee:case ne:case oe:return.45;case re:return.44;case ie:return x.default(t)&&0===t.indexOf("gtfs")?.43:.42;case de:case pe:case ce:return.38;case le:return.36;default:return.41}},he=(e,t,u="")=>{if(!Array.isArray(t)||!t.length)return t;const n=t=>x.default(t)&&e&&e.test(t),o=K(u),r=n(o),i=O.default(t.filter(e=>e),[e=>r&&n(K(e.properties.shortName))&&0===K(e.properties.shortName).indexOf(o)?1:0,e=>{const{confidence:t,layer:u,source:n}=e.properties;if(0===o.length)return fe(u,n);if(!t)return fe(u,n)+((e,t)=>x.default(e)&&0!==e.length?["name","label","address","shortName"].map(e=>({name:e,value:t[e]})).filter(e=>x.default(e.value)&&e.value.length>0).map(t=>{let u=K(t.value);return 0===u.indexOf(e)?("shortName"===t.name&&Z(u)&&([u]=X(u)),.5+e.length/u.length):.5*e.length/(e.length+1)}).reduce((e,t)=>t>e?t:e,0):0)(o,e.properties);switch(u){case ie:return t+(0===n.indexOf("gtfs")?.02:.01);case le:case de:case pe:return t-.05;case ce:return t-.04;default:return t}},e=>{if(e.properties.shortName)return Z(e.properties.shortName)?X(e.properties.shortName)[0]:e.properties.shortName},e=>{if(e.properties.shortName)return Z(e.properties.shortName)?X(e.properties.shortName)[1]:e.properties.shortName},"properties.longName"],["desc","desc","asc","asc","asc"]);return j.default(i,Q)},be=(e,t)=>null!=t&&-1!==e.lastIndexOf(t)?e.substring(0,e.lastIndexOf(t)-1):e;function Ee(e,t,u){if("string"==typeof t&&t.length>0){const n=t.toLowerCase().trim(),o=n.includes(" ")||n.includes(",");return e.filter(e=>{let t=[];u.forEach(u=>{let n=M.default(e,u);o||"properties.label"!==u&&"address"!==u||!n||(n=n.split(","),n.length>2?n.splice(n.length-2,2):n.length>1&&n.splice(n.length-1,1),n=n.join(",")),n&&(t=o?t.concat(n.toLowerCase()):t.concat(n.toLowerCase().replace(/,/g," ").split(" ")))});for(let e=0;e<t.length;e++)if(0===t[e].indexOf(n))return!0;return!1})}return e}function Ae(e,t){return e?Object.keys(e).map(u=>{const n=t||u,o=e[u];return"object"==typeof o?Ae(o,n):`${encodeURIComponent(n)}=${encodeURIComponent(o)}`}).join("&"):""}const me=require("axios").default;function ye(e,t){return me.get(encodeURI(e)+(t?(-1===e.search(/\?/)?"?":"&")+Ae(t):""),{timeout:1e4,method:"GET",headers:{Accept:"application/json"}}).then(e=>e.data)}function Fe(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function De(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):Fe(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}function Ce(e,t,u,n,o,r,i,a){const s=e?e.trim():null;if(null==s||s.length<1||i&&!i.test(s))return Promise.resolve([]);const l=r||"https://api.digitransit.fi/geocoding/v1/search";let c=De(De(De({text:s},t),n),{},{lang:u});if(o&&(c=De(De({},c),{},{sources:o})),a){const e=a.toString();c=De(De({},c),{},{layers:e})}return ye(l,c).then(e=>e.features)}function _e(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function ve(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):_e(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}function Be(e,t){if(!e||e.length<1)return Promise.resolve([]);let u="";const n=e.map(e=>{const t="stop"===e.type?"stop":"station";let n=`gtfs${e.gtfsId.split(":")[0].toLowerCase()}:${t}:GTFS:${e.gtfsId}`;return e.code&&(n+=`#${e.code}`),u+=`${n},`,ve(ve({},e),{},{gid:n})}).reduce(function(e,t){return e[t.gid]=t,e},{});return ye(t,{ids:u.slice(0,-1)}).then(e=>e.features.map(e=>({type:"FavouriteStop",properties:{addendum:e.properties.addendum,gid:n[e.properties.gid].gid,code:n[e.properties.gid].code,gtfsId:n[e.properties.gid].gtfsId,lastUpdated:n[e.properties.gid].lastUpdated,favouriteId:n[e.properties.gid].favouriteId,address:e.properties.label,layer:ge(e.properties)?"favouriteStop":"favouriteStation"},geometry:e.geometry})))}function Se(e,t,u){let n=Ee(e,t,["properties.name","properties.label","properties.address","properties.shortName","properties.longName"]);return u&&(n=n.filter(e=>!u.includes(e.properties.layer))),Promise.resolve(w.default(n,10).map(e=>{const t=ve(ve({},e),{},{type:"OldSearch",timetableClicked:!1,arrowClicked:!1});return delete t.properties.confidence,t}))}const ke=["route-TRAM","route-BUS","route-RAIL","route-FERRY","route-SUBWAY","route-AIRPLANE","route-FUNICULAR"],we=["venue","address","street"],xe=["carpark","bikepark"],Oe=["stop","station"];const je=S.default(function(e,t,u,n,o,r,{input:i},a,s,l){const{getPositions:c,getFavouriteLocations:d,getOldSearches:p,getFavouriteStops:g,parkingAreaSources:f,getLanguage:h,getStopAndStationsQuery:b,getFavouriteVehicleRentalStationsQuery:E,getFavouriteVehicleRentalStations:A,getFavouriteRoutesQuery:m,getFavouriteRoutes:y,getRoutesQuery:F,context:D,isPeliasLocationAware:C,minimalRegexp:_,lineRegexp:v,URL_PELIAS:B,URL_PELIAS_PLACE:S,feedIDs:x,geocodingSearchParams:O,geocodingSources:j,getFutureRoutes:M,cityBikeNetworks:P}=n,R=!e||0===e.length,I=!t||0===t.length,L=c(D),N=[],q={type:"all",term:i,results:[]},z=h(D),T=C&&null!=l&&l.lat&&null!=l&&l.lon?{"focus.point.lat":l.lat.toFixed(3),"focus.point.lon":l.lon.toFixed(3)}:{},H=u?u.split("-")[1]:void 0;if(e.includes("CurrentPosition")&&"geolocation-not-supported"!==L.status&&N.push(function(e,t){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"CurrentLocation",address:t.address,lat:t.lat,lon:t.lon,properties:{labelId:"use-own-position",layer:"currentPosition",address:t.address,lat:t.lat,lon:t.lon},geometry:{type:"Point",coordinates:[t.lon,t.lat]}}]):Promise.resolve([])}(i,L)),(R||e.includes("MapPosition"))&&N.push(function(e){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"SelectFromMap",address:"SelectFromMap",lat:null,lon:null,properties:{labelId:"select-from-map",layer:"selectFromMap",address:"SelectFromMap",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]):Promise.resolve([])}(i)),e.includes("FutureRoutes")){const e=M(D);N.push(w.default(e,3))}if(e.includes("SelectFromOwnLocations")&&function(e){const t=e.getFavouriteLocations(e.context);if((null==t?void 0:t.length)>0)return!0;const u=e.getFavouriteVehicleRentalStations(e.context);if((null==u?void 0:u.length)>0)return!0;const n=e.getFavouriteStops(e.context);return(null==n?void 0:n.length)>0}(n)&&N.push(function(e){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"SelectFromOwnLocations",address:"SelectFromOwnLocations",lat:null,lon:null,properties:{labelId:"select-from-own-locations",layer:"ownLocations",address:"selectFromOwnLocations",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]):Promise.resolve([])}(i)),R||e.includes("Locations")){const u=O;if(t.includes("Favourite")){const e=d(D);N.push(function(e,t){return Promise.resolve(Ee(e,t,["address","name"]).map(e=>({type:"FavouritePlace",properties:ve(ve({},e),{},{label:e.name,layer:"favouritePlace"}),geometry:{type:"Point",coordinates:[e.lon,e.lat]}})))}(e,i)),t.includes("Back")&&N.push(Promise.resolve([{type:"back",address:"back",lat:null,lon:null,properties:{labelId:"back",layer:"back",address:"back",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]))}if(I||t.includes("Datasource")){const t=["venue","address","street"];e.includes("Stations")&&t.push("station"),N.push(Ce(i,u,z,T,j.join(","),B,_,t))}if(I||t.includes("History")){const e=p(D,"endpoint"),t=["bikestation"];t.push(...Oe),t.push(...ke),t.push(...xe),N.push(Se(e,i,t))}}if(R||e.includes("ParkingAreas")){if(I||t.includes("Datasource")){const e=O;r&&10!==r&&(e.size=r);const t=["carpark","bikepark"],u=f?f.join(","):null;N.push(Ce(i,e,z,T,u,B,_,t).then(e=>o?o(e,H):e))}if(I||t.includes("History")){const e=p(D),t=["bikestation"];t.push(...Oe),t.push(...ke),t.push(...we),N.push(Se(e,i,t))}}const U=e.includes("Stops"),V=e.includes("Stations");if(R||U||V){if(t.includes("Favourite")){const e=g(D);let t;t=e.every(e=>"station"===e.type)?Be(e,S).then(e=>o?o(e,H):e):b(e).then(e=>Be(e,S)).then(e=>o?o(e,H):e),N.push(function(e,t,u,n){return e.then(e=>Ee(e.filter(e=>"stop"===e.type?u:n),t,["properties.name","properties.name","properties.address"]))}(t,i,U,V))}if(I||t.includes("Datasource")){const t=[];U&&t.push("stop"),V&&t.push("station");const u=r&&10!==r?{size:r}:{};O&&O["boundary.country"]&&(u["boundary.country"]=O["boundary.country"]),(R||e.includes("Locations"))&&(u.dedupestops=1);const n=x.map(e=>`gtfs${e}`).join(",");N.push(Ce(i,u,z,T,n,B,_,t).then(e=>o?o(e,H):e))}if(I||t.includes("History")){const e=p(D).filter(e=>!e.properties.gid||e.properties.gid.includes("GTFS:")),t=["bikestation"];t.push(...ke),t.push(...we),t.push(...xe),U||t.push("stop"),V||t.push("station"),u?N.push(Se(e,i,t).then(e=>o?o(e,H):e)):N.push(Se(e,i,t))}}if(R||e.includes("Routes")){if(t.includes("Favourite")){const e=y(D);N.push(m(e,i,H,s).then(e=>o?o(e,H,"Routes"):e))}if(N.push(F(i,x,u,s).then(e=>o?o(e,H,"Routes"):e)),I||t.includes("History")){const e=p(D),t=["bikestation"];u&&t.push(...ke.filter(e=>!(e===u))),t.push(...Oe),t.push(...we),t.push(...xe),N.push(Se(e,i,t).then(e=>o?o(e,H,"Routes"):e))}}if(R||e.includes("VehicleRentalStations")){if(t.includes("Favourite")){const e=A(D);N.push(E(e,i))}if(I||t.includes("Datasource")){const e=["bikestation"],t=r&&10!==r?{size:r}:{};N.push(Ce(i,t,z,T,P.join(","),B,_,e).then(e=>o?o(e,H,"VehicleRentalStations"):e))}if(I||t.includes("History")){const e=p(D),t=[...Oe];t.push(...ke),t.push(...we),t.push(...xe),N.push(Se(e,i,t))}}Promise.all(N).then(k.default).then(e=>{q.results=e}).catch(e=>{q.error=e}).then(()=>{a(ve(ve({},q),{},{results:he(v,q.results,i)}))})},300,{leading:!0}),Me=f.createInstance({fallbackLng:"fi",resources:{de:{translation:{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:{translation:{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-bikepark":"Search bike parks","stop-near-you-bus":"Search bus routes or stops","stop-near-you-carpark":"Search car parks","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:{translation:{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äpysäköinti",bus:"bussi",cancel:"Peruuta",carpark:"Liityntäpysäköinti","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-bikepark":"Hae pyöräparkkia","stop-near-you-bus":"Hae bussilinjaa tai pysäkkiä","stop-near-you-carpark":"Hae autoparkkia","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"}},pl:{translation:{address:"Adres","address-place-or-business":"Adres, miejsce lub firma","add-via-button-label":"Dodaj punkt pośredni","add-via-duration-button-label":"Wybierz czas postoju dla punktu {{index}}","add-via-duration-button-label-close":"Zamknij wybornik czasu postoju w punkcie {{index}}","add-via-duration-button-label-open":"Otwórz wybornik czasu postoju w punkcie {{index}}",airplane:"Lot",arrival:"Przyjazd",back:"Wróć",bikepark:"Parkuj i Jedź dla rowerów",bikerentalstation:"Stacja rowerowa",bus:"autobus",cancel:"Anuluj",carpark:"Parkuj i Jedź","clear-button-label":"Wyczyść","clear-search-history":"Wyczyść historię wyszukiwania",currentposition:"Obecne położenie",delete:"Usuń","delete-old-searches-header":"Czy na pewno chcesz wyczyścić historię wyszukiwania?",departure:"Odjazd",destination:"Cel","give-origin":"Wprowadź swój punkt początkowy.","give-destination":"Wprowadź swój cel",favourite:"Ulubione",ferry:"Prom","future-route":"Przyszła trasa",origin:"Początek","origin-stop-near-you":"Początek",ownlocations:"Własne miejsca",loading:"Ładowanie…","minute-short":"min.",platform:"Peron",rail:"Pociąg",required:"wymagane pole",search:"Szukaj","search-address-or-place":"Szukaj po adresie lub nazwie miejsca","search-button-label":"Szukaj","search-destination":"Szukaj celu, trasy lub przystanku","search-destination-index":"Wprowadź punkt docelowy","search-destination-results-but-no-search":"Wyświetl wyniki w sąsiedniej karcie „Cel”","search-no-results":"Brak lokalizacji","search-origin":"Wyszukaj początek, koniec lub punkt pośredni","search-origin-index":"Wprowadź punkt początkowy","search-position":"Wykryj lokalizację","search-autosuggest-label":"Miejsce, lokalizacja i przystanek.","search-autosuggest-label-instructions-desktop":"Nawiguj po liście używając strzałek i wybieraj klawiszem Enter.","search-autosuggest-label-instructions-mobile":"Wprowadź lokalizację i nawiguj po liście gestami przesuwania.","search-autosuggest-label-move-to-destination":"Po wybraniu lokalizacji początkowej, automatycznie przejdziesz do pola miejsca docelowego.","search-autosuggest-len":"Dostępna jest {{count}} propozycja","search-autosuggest-len_few":"Dostępne są {{count}} propozycje","search-autosuggest-len_other":"Dostępne jest {{count}} propozycji","search-current-suggestion":"Obecny wybór: {{selection}}",street:"Ulica",subway:"Metro",station:"Stacja",stop:"Przystanek","stop-near-you":"Szukaj przystanków i tras","stop-near-you-airplane":"Szukaj lotów i lotnisk","stop-near-you-bus":"Szukaj tras autobusowych i przystanków","stop-near-you-citybike":"Szukaj stacji rowerów miejskich","stop-near-you-rail":"Szukaj tras kolejowych i przystanków","stop-near-you-subway":"Szukaj tras metra i przystanków ","stop-near-you-tram":"Szukaj tras tramwajowych i przystanków","stop-route-station":"Wyszukiwanie autobusów i przystanków","today-at":"dziś o","tomorrow-at":"jutro o",tram:"Tramwaj",track:"Tor","use-own-position":"Użyj obecnej lokalizacji","select-from-map":"Wybierz miejsce na mapie","select-from-own-locations":"Wybierz z własnych miejsc",venue:"Miejsce","via-point":"Przez punkt",where:"Dokąd?",place:"Miejsce"}},sv:{translation:{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-bikepark":"Sök cykelparkering","stop-near-you-bus":"Sök busslinjer eller hållplatser","stop-near-you-carpark":"Sök anslutningsparkering","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"}}},defaultNS:"translation",react:{useSuspense:!0}});function Pe(e,t){void 0===t&&(t={});var u=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===u&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Me.init();var Re={container:"styles_container__CyBuz",input:"styles_input__x7Oye",favourite:"styles_favourite__xn1Du",thin:"styles_thin__ToA7-",hasValue:"styles_hasValue__qkIFF",suggestionsContainerOpen:"styles_suggestionsContainerOpen__1odqA",suggestionsContainer:"styles_suggestionsContainer__-FUbj",suggestionsList:"styles_suggestionsList__e-mac",suggestion:"styles_suggestion__oCpdb",suggestionHighlighted:"styles_suggestionHighlighted__vdJIb","autosuggest-input-container":"styles_autosuggest-input-container__C4ks3",origin:"styles_origin__J6GD2",destination:"styles_destination__yOA4k","stop-route-station":"styles_stop-route-station__ofvbR","autosuggest-input-icon":"styles_autosuggest-input-icon__-XA83","origin-stop-near-you":"styles_origin-stop-near-you__Vq9IO","clear-input":"styles_clear-input__KFeWb","sr-only":"styles_sr-only__FIitE"};Pe("input[type=text] {\n margin: 0;\n}\n\n.styles_container__CyBuz {\n display: flex;\n width: 100%;\n}\n.styles_container__CyBuz .styles_input__x7Oye.styles_favourite__xn1Du {\n padding-left: 47px;\n}\n.styles_container__CyBuz .styles_input__x7Oye.styles_thin__ToA7- {\n height: 34px;\n}\n.styles_container__CyBuz .styles_input__x7Oye {\n font-size: 16px;\n font-family: var(--font-family);\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 appearance: none;\n}\n.styles_container__CyBuz .styles_input__x7Oye:focus {\n background: #fff;\n outline: none;\n border: solid 1px var(--color);\n box-shadow: 0 0 2px 1px var(--hover-color);\n}\n@media screen and (min-width: 768px) {\n .styles_container__CyBuz .styles_input__x7Oye {\n font-size: 15px;\n height: 44px;\n padding-left: 49px;\n }\n}\n.styles_container__CyBuz .styles_input__x7Oye::-webkit-input-placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px;\n}\n.styles_container__CyBuz .styles_input__x7Oye::placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px;\n}\n\n.styles_hasValue__qkIFF {\n color: #333;\n}\n\n.styles_suggestionsContainerOpen__1odqA {\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(2.625rem + 9px);\n z-index: 20;\n}\n\n.styles_suggestionsContainer__-FUbj {\n background-color: white;\n z-index: 20;\n}\n.styles_suggestionsContainer__-FUbj .styles_suggestionsList__e-mac {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n background: white;\n}\n.styles_suggestionsContainer__-FUbj .styles_suggestionsList__e-mac li:hover {\n background: #f2f5f7;\n}\n\n.styles_suggestion__oCpdb {\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 z-index: 20;\n}\n\n.styles_suggestionHighlighted__vdJIb {\n background-color: #f2f5f7;\n}\n\n.styles_autosuggest-input-container__C4ks3 {\n position: relative;\n width: 100%;\n}\n.styles_autosuggest-input-container__C4ks3.styles_origin__J6GD2 {\n z-index: 16;\n}\n.styles_autosuggest-input-container__C4ks3.styles_destination__yOA4k {\n z-index: 10;\n}\n.styles_autosuggest-input-container__C4ks3.styles_stop-route-station__ofvbR {\n z-index: 9;\n}\n\n.styles_autosuggest-input-icon__-XA83 {\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}\n.styles_autosuggest-input-icon__-XA83 svg {\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__-XA83.styles_origin__J6GD2 svg {\n fill: #4ea700;\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__-XA83.styles_destination__yOA4k svg {\n fill: #ec5188;\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__-XA83.styles_stop-route-station__ofvbR svg, .styles_autosuggest-input-icon__-XA83.styles_favourite__xn1Du svg {\n fill: #888;\n width: 16px;\n height: 16px;\n}\n.styles_autosuggest-input-icon__-XA83.styles_origin-stop-near-you__Vq9IO svg {\n fill: #888;\n width: 16px;\n height: 16px;\n}\n\nbutton.styles_clear-input__KFeWb {\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}\nbutton.styles_clear-input__KFeWb svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.styles_clear-input__KFeWb: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}\nbutton.styles_clear-input__KFeWb:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.styles_clear-input__KFeWb:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.styles_sr-only__FIitE: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}");const Ie=e=>e.localadmin||e.localadmin||e.address&&e.address.lastIndexOf(",")<e.address.length-2&&e.address.substring(e.address.lastIndexOf(",")+2)||"",Le=({id:e,code:t})=>t||(void 0!==e&&void 0!==e.indexOf&&-1!==e.indexOf("#")?e.substring(e.indexOf("#")+1):void 0),Ne=R.default((e,t=!1)=>{switch(e.layer){case"currentPosition":return[e.labelId,e.address];case"selectFromMap":case"ownLocations":case"back":return[e.labelId];case"favouritePlace":return u=e.name,n=e.address,[u||n&&n.split(",")[0],"string"==typeof n?n.replace(new RegExp(`${I.default(u)}([ ,]|$)+`),""):""];case"favouriteVehicleRentalStation":case"bikestation":return[e.name];case"favouriteRoute":case"route-BUS":case"route-TRAM":case"route-RAIL":case"route-SUBWAY":case"route-FERRY":case"route-FUNICULAR":case"route-AIRPLANE":return!t&&e.shortName?[e.gtfsId,e.mode.toLowerCase(),e.longName]:[e.shortName,e.longName,e.agency?e.agency.name:void 0];case"venue":case"address":case"street":return[e.name,e.label.replace(new RegExp(`${I.default(e.name)}(,)?( )?`),"")];case"favouriteStop":case"stop":return t?[e.name||e.label||e.address&&e.address.split(",")[0],Ie(e)]:[e.name,e.id,Le(e),Ie(e)];default:return[e.name||e.label||e.address&&e.address.split(",")[0],Ie(e)]}var u,n},(e,t)=>{const u=L.default(e);return u.plain=t,u});const qe=e=>{const t=e&&(e.key||e.which||e.keyCode)||"";return!(!t||![13," ","Spacebar"].concat([32,"Enter"]).includes(t))&&(e.preventDefault(),!0)},ze=e=>"origin"===e||"destination"===e||"via-point"===e||"origin-stop-near-you"===e,Te=(e,t,u)=>{if(!u)return;if(!e||!e.GTFS.platform)return;const{modes:n,platform:o}=e.GTFS;return[n&&"RAIL"===n[0]?u("track",{lng:t}):u("platform",{lng:t}),o]};function He(e,t,u){if(!u)return;if("FutureRoute"!==e.type){if("SelectFromMap"===e.type)return["",u("select-from-map",{lng:t})];if("CurrentLocation"===e.type)return["",u("use-own-position",{lng:t})];if("SelectFromOwnLocations"===e.type)return["",u("select-from-own-locations",{lng:t})];let o,[r,i]=Ne(e.properties,!0);if(e.properties.layer.toLowerCase().includes("bikerental")||e.properties.layer.toLowerCase().includes("bikestation")){o=u("vehiclerentalstation",{lng:t});return[o,r,void 0,e.properties.labelId]}if("bikepark"===e.properties.layer)return o=u("bikepark",{lng:t}),[o,r,void 0,void 0];if("carpark"===e.properties.layer)return o=u("carpark",{lng:t}),[o,r,void 0,void 0];if(e.properties.mode)o=u(e.properties.mode.toLowerCase().replace("favourite",""),{lng:t});else{o=u(e.properties.layer.replace("route-","").toLowerCase().replace("favourite",""),{lng:t})}if(e.properties.id&&("stop"===e.properties.layer||"station"===e.properties.layer)){var n;const a=Le(e.properties),s=null===(n=e.properties.addendum)||void 0===n?void 0:n.GTFS.modes,l=Te(e.properties.addendum,t,u);return[o,be(r,a),i,a,s,l]}if("favouriteStop"===e.properties.layer||"favouriteStation"===e.properties.layer){const{address:u,code:n}=e.properties;return[o,u?be(u.split(",")[0],n):r,i,n,void 0,Te(e.properties.addendum,t)]}return[o,r,i]}const{origin:o,destination:r}=e.properties,i=o.locality?`, ${o.locality} foobar`:"",a=r.locality?`, ${r.locality}`:"",s=o.name,l=r.name;return[u("future-route",{lng:t}),`${u("origin",{lng:t})} ${s}${i} ${u("destination",{lng:t})} ${l}${a}`,e.translatedText]}function Ue(e,t,u){if(!u)return;const n=m.DateTime.fromSeconds(Number(e.properties.time)),o=m.DateTime.now();let r=e.properties.arriveBy?u("arrival",{lng:t}):u("departure",{lng:t});return r=n.hasSame(o,"day")?`${r} ${u("today-at")}`:n.hasSame(o.plus({days:1}),"day")?`${r} ${u("tomorrow-at",{lng:t})}`:`${r} ${n.toFormat("ccc d.L.")}`,r=`${r} ${n.toFormat("HH:mm")}`,r}const Ve=e=>"SelectFromOwnLocations"===e.type||"back"===e.type?"":function(e){const t=Ne(e,!0);switch(e.layer){case"selectFromMap":case"currentPosition":case"ownLocations":case"back":return t[1]||t[0];case"favouriteVehicleRentalStation":case"favouritePlace":return t[0];default:return t.length>1&&""!==t[1]?t.join(", "):t[1]||t[0]}}(e.properties),We=({suggestions:e,t:t,lng:u})=>{let n=[];const o=e[0];return o&&(o.type&&o.type.includes("Favourite")&&n.push(t("favourite",{lng:u})),n=n.concat(He(e[0],u))),[...new Set(n)].join(" - ")};function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $e,Qe={exports:{}};
2
+ /*! For license information please see index.js.LICENSE.txt */var Ke=($e||($e=1,function(e){var t;"undefined"!=typeof self&&self,e.exports=(t=v.default,function(){var e={888:function(e,t,u){var n,o;o=void 0!==u.g?u.g:"undefined"!=typeof window?window:this,n=function(){return function(e){var t={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},u=function(){var e={};return Array.prototype.forEach.call(arguments,function(t){for(var u in t){if(!t.hasOwnProperty(u))return;e[u]=t[u]}}),e},n=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,u=String(e),n=u.length,o=-1,r="",i=u.charCodeAt(0);++o<n;){if(0===(t=u.charCodeAt(o)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");r+=t>=1&&t<=31||127==t||0===o&&t>=48&&t<=57||1===o&&t>=48&&t<=57&&45===i?"\\"+t.toString(16)+" ":t>=128||45===t||95===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?u.charAt(o):"\\"+u.charAt(o)}return"#"+r},o=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},r=function(t){return t?(u=t,parseInt(e.getComputedStyle(u).height,10)+t.offsetTop):0;var u},i=function(t,u,n){0===t&&document.body.focus(),n||(t.focus(),document.activeElement!==t&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),e.scrollTo(0,u))},a=function(t,u,n,o){if(u.emitEvents&&"function"==typeof e.CustomEvent){var r=new CustomEvent(t,{bubbles:!0,detail:{anchor:n,toggle:o}});document.dispatchEvent(r)}};return function(s,l){var c,d,p,g,f={cancelScroll:function(e){cancelAnimationFrame(g),g=null,e||a("scrollCancel",c)},animateScroll:function(n,s,l){f.cancelScroll();var d=u(c||t,l||{}),h="[object Number]"===Object.prototype.toString.call(n),b=h||!n.tagName?null:n;if(h||b){var E=e.pageYOffset;d.header&&!p&&(p=document.querySelector(d.header));var A,m,y,F=r(p),D=h?n:function(t,u,n,r){var i=0;if(t.offsetParent)do{i+=t.offsetTop,t=t.offsetParent}while(t);return i=Math.max(i-u-n,0),r&&(i=Math.min(i,o()-e.innerHeight)),i}(b,F,parseInt("function"==typeof d.offset?d.offset(n,s):d.offset,10),d.clip),C=D-E,_=o(),v=0,B=function(e,t){var u=t.speedAsDuration?t.speed:Math.abs(e/1e3*t.speed);return t.durationMax&&u>t.durationMax?t.durationMax:t.durationMin&&u<t.durationMin?t.durationMin:parseInt(u,10)}(C,d),S=function(t){A||(A=t),v+=t-A,y=E+C*function(e,t){var u;return"easeInQuad"===e.easing&&(u=t*t),"easeOutQuad"===e.easing&&(u=t*(2-t)),"easeInOutQuad"===e.easing&&(u=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e.easing&&(u=t*t*t),"easeOutCubic"===e.easing&&(u=--t*t*t+1),"easeInOutCubic"===e.easing&&(u=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e.easing&&(u=t*t*t*t),"easeOutQuart"===e.easing&&(u=1- --t*t*t*t),"easeInOutQuart"===e.easing&&(u=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e.easing&&(u=t*t*t*t*t),"easeOutQuint"===e.easing&&(u=1+--t*t*t*t*t),"easeInOutQuint"===e.easing&&(u=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),e.customEasing&&(u=e.customEasing(t)),u||t}(d,m=(m=0===B?0:v/B)>1?1:m),e.scrollTo(0,Math.floor(y)),function(t,u){var o=e.pageYOffset;if(t==u||o==u||(E<u&&e.innerHeight+o)>=_)return f.cancelScroll(!0),i(n,u,h),a("scrollStop",d,n,s),A=null,g=null,!0}(y,D)||(g=e.requestAnimationFrame(S),A=t)};0===e.pageYOffset&&e.scrollTo(0,0),function(e,t,u){t||history.pushState&&u.updateURL&&history.pushState({smoothScroll:JSON.stringify(u),anchor:e.id},document.title,e===document.documentElement?"#top":"#"+e.id)}(n,h,d),"matchMedia"in e&&e.matchMedia("(prefers-reduced-motion)").matches?i(n,Math.floor(D),!1):(a("scrollStart",d,n,s),f.cancelScroll(!0),e.requestAnimationFrame(S))}}},h=function(t){if(!t.defaultPrevented&&!(0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey)&&"closest"in t.target&&(d=t.target.closest(s))&&"a"===d.tagName.toLowerCase()&&!t.target.closest(c.ignore)&&d.hostname===e.location.hostname&&d.pathname===e.location.pathname&&/#/.test(d.href)){var u,o;try{u=n(decodeURIComponent(d.hash))}catch(e){u=n(d.hash)}if("#"===u){if(!c.topOnEmptyHash)return;o=document.documentElement}else o=document.querySelector(u);(o=o||"#top"!==u?o:document.documentElement)&&(t.preventDefault(),function(t){if(history.replaceState&&t.updateURL&&!history.state){var u=e.location.hash;u=u||"",history.replaceState({smoothScroll:JSON.stringify(t),anchor:u||e.pageYOffset},document.title,u||e.location.href)}}(c),f.animateScroll(o,d))}},b=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(c)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(n(history.state.anchor)))||f.animateScroll(t,null,{updateURL:!1})}};return f.destroy=function(){c&&(document.removeEventListener("click",h,!1),e.removeEventListener("popstate",b,!1),f.cancelScroll(),c=null,d=null,p=null,g=null)},function(){if(!("querySelector"in document&&"addEventListener"in e&&"requestAnimationFrame"in e&&"closest"in e.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";f.destroy(),c=u(t,l||{}),p=c.header?document.querySelector(c.header):null,document.addEventListener("click",h,!1),c.updateURL&&c.popstate&&e.addEventListener("popstate",b,!1)}(),f}}(o)}.apply(t,[]),void 0===n||(e.exports=n)},432:function(e,t,u){var n=this&&this.__createBinding||(Object.create?function(e,t,u,n){void 0===n&&(n=u),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[u]}})}:function(e,t,u,n){void 0===n&&(n=u),e[n]=t[u]}),o=this&&this.__exportStar||function(e,t){for(var u in e)"default"===u||Object.prototype.hasOwnProperty.call(t,u)||n(t,e,u)};Object.defineProperty(t,"__esModule",{value:!0}),o(u(47),t),o(u(926),t),o(u(349),t),o(u(137),t),o(u(729),t),o(u(383),t),o(u(450),t),o(u(358),t),o(u(753),t),o(u(869),t),o(u(352),t),o(u(446),t),o(u(164),t),o(u(305),t),o(u(502),t)},349:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useArrowNavigation=void 0;var n=u(156);t.useArrowNavigation=function(e){var t=e.listItems,u=e.onArrowUpOrDown,o=(0,n.useState)(0),r=o[0],i=o[1],a=(0,n.useCallback)(function(e){i(e)},[t]),s=function(e){var n=e.key;if(null==t?void 0:t.length)if("ArrowUp"===n)u&&u(),e.preventDefault(),a(r>0?r-1:t.length-1);else{if("ArrowDown"!==n)return;u&&u(),e.preventDefault(),r<t.length-1?a(r+1):a(0)}};return(0,n.useEffect)(function(){return window.addEventListener("keydown",s),function(){return window.removeEventListener("keydown",s)}}),(0,n.useEffect)(function(){a(0)},[t]),{selectedIndex:r}}},446:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useDebounce=void 0;var n=u(156);t.useDebounce=function(e,t){void 0===t&&(t=300);var u=(0,n.useState)(e),o=u[0],r=u[1];return(0,n.useEffect)(function(){var u=setTimeout(function(){r(e)},t);return function(){clearTimeout(u)}},[e,t]),o}},164:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useElementSize=void 0;var n=u(156);t.useElementSize=function(){var e,t,u=(0,n.useRef)(null);return[u,{width:null===(e=null==u?void 0:u.current)||void 0===e?void 0:e.clientWidth,height:null===(t=null==u?void 0:u.current)||void 0===t?void 0:t.clientHeight}]},t.default=t.useElementSize},137:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersectionObserver=void 0;var n=u(156);t.useIntersectionObserver=function(e){var t=(0,n.useRef)(null),u=(0,n.useState)(!1),o=u[0],r=u[1],i=function(e){var t=e[0];r(t.isIntersecting)};return(0,n.useEffect)(function(){if(window&&window.IntersectionObserver){var u=new IntersectionObserver(i,e),n=t.current;return t.current&&u.observe(t.current),function(){n&&u.unobserve(n)}}r(!1)},[t,e]),{containerRef:t,isVisible:o}},t.default=t.useIntersectionObserver},729:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsBreakpoint=void 0;var n=u(156),o=u(432),r={xs:1,mobileSmall:320,mobile:375,tablet:768,tabletLarge:920,desktopSmall:1024,desktop:1260,desktopLarge:1440};t.useIsBreakpoint=function(e){var t="string"==typeof e?r[e]:e,u=(0,n.useState)(null),i=u[0],a=u[1],s=(0,n.useCallback)(function(){a(window.innerWidth)},[]);return(0,n.useEffect)(function(){s()},[]),(0,o.useOnResize)(s),i>=t},t.default=t.useIsBreakpoint},450:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsLoadingAfterError=void 0;var n=u(156);t.useIsLoadingAfterError=function(e,t){var u=(0,n.useState)(t),o=u[0],r=u[1];return(0,n.useEffect)(function(){e||r(t)},[e,t]),e&&o}},305:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsMobile=void 0;var n=u(729);t.useIsMobile=function(){return!(0,n.useIsBreakpoint)("tablet")},t.default=t.useIsMobile},383:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsomorphicLayoutEffect=void 0;var n=u(156);t.useIsomorphicLayoutEffect="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,t.default=t.useIsomorphicLayoutEffect},753:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useOnLoseFocusWithin=void 0;var n=u(156);t.useOnLoseFocusWithin=function(e){var t=e.ref,u=e.callback,o=e.watch;(0,n.useEffect)(function(){var e=function(){var e;if(o)return(null===(e=t.current)||void 0===e?void 0:e.matches(":focus-within"))?void 0:u()};return document.addEventListener("keyup",e),function(){return document.removeEventListener("keyup",e)}},[u,t,o])},t.default=t.useOnLoseFocusWithin},502:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useOnResize=void 0;var n=u(156);t.useOnResize=function(e){(0,n.useEffect)(function(){var t=function(){e(window.innerWidth)};return window.addEventListener("resize",t,{passive:!0}),function(){return window.removeEventListener("resize",t)}},[])},t.default=t.useOnResize},352:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useOnWindowFocus=void 0;var n=u(156);t.useOnWindowFocus=function(e){(0,n.useEffect)(function(){var t=function(){e&&"visible"===document.visibilityState&&e()};return window.addEventListener("visibilitychange",t,!1),function(){return window.removeEventListener("visibilitychange",t)}},[e])}},47:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useOutsideReacter=void 0;var n=u(156);t.useOutsideReacter=function(e,t){function u(u){e.current&&!e.current.contains(u.target)&&t()}(0,n.useEffect)(function(){return document.addEventListener("mousedown",u),function(){document.removeEventListener("mousedown",u)}})}},869:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useRunAfterUpdate=void 0;var n=u(156);t.useRunAfterUpdate=function(){var e=(0,n.useRef)(null);return(0,n.useEffect)(function(){e.current&&(e.current(),e.current=null)}),function(t){e.current=t}},t.default=t.useRunAfterUpdate},926:function(e,t,u){Object.defineProperty(t,"__esModule",{value:!0}),t.useScrollLock=void 0;var n=u(156);t.useScrollLock=function(){return{lock:(0,n.useCallback)(function(){var e=window.scrollY+"px",t=document.body;t.style.position="fixed",t.style.top="-"+e},[]),unlock:(0,n.useCallback)(function(){var e=document.body,t=e.style.top,u=-1*parseInt(t||"0");e.style.position="",e.style.top="",u&&window.scrollTo(0,-1*parseInt(t||"0"))},[])}}},358:function(e,t,u){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useSmoothScroll=void 0;var o=u(156),r=n(u(888));t.useSmoothScroll=function(e){var t=(0,o.useRef)(null),u=e.ref,n=e.offset,i=void 0===n?0:n,a=e.speed,s=void 0===a?500:a;return(0,o.useEffect)(function(){t.current=new r.default(null,{speed:s,speedAsDuration:!0})},[]),(0,o.useCallback)(function(){u&&t.current&&t.current.animateScroll(u.current,null,{offset:function(){return i},updateURL:!1})},[i,u])}},156:function(e){e.exports=t}},u={};function n(t){var o=u[t];if(void 0!==o)return o.exports;var r=u[t]={exports:{}};return e[t].call(r.exports,r,r.exports,n),r.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(432)}())}(Qe)),Qe.exports),Xe=Ge(Ke),Ze={"fullscreen-root":"MobileSearch_fullscreen-root__l90DZ","combobox-container":"MobileSearch_combobox-container__UsUQ2","right-column":"MobileSearch_right-column__QT0kp","combobox-icon":"MobileSearch_combobox-icon__3syCw","combobox-label":"MobileSearch_combobox-label__mRQMF",container:"MobileSearch_container__JtL5q",input:"MobileSearch_input__Sjo1c","clear-input":"MobileSearch_clear-input__SGpE8",hasValue:"MobileSearch_hasValue__H1RPq",suggestion:"MobileSearch_suggestion__pqOkM",suggestionHighlighted:"MobileSearch_suggestionHighlighted__xpMMN",suggestionsContainerOpen:"MobileSearch_suggestionsContainerOpen__wwyZk",suggestionsList:"MobileSearch_suggestionsList__-pWWC","clear-search-history":"MobileSearch_clear-search-history__cO30c","mobile-modal-overlay":"MobileSearch_mobile-modal-overlay__bH39q","mobile-modal":"MobileSearch_mobile-modal__DFUUM","mobile-modal-content":"MobileSearch_mobile-modal-content__7q4zK"};Pe("input[type=text] {\n margin: 0;\n padding: 0;\n}\n\n.MobileSearch_fullscreen-root__l90DZ {\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\n.MobileSearch_combobox-container__UsUQ2 {\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}\n.MobileSearch_combobox-container__UsUQ2 .MobileSearch_right-column__QT0kp {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px;\n}\n\n.MobileSearch_combobox-icon__3syCw {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none;\n}\n.MobileSearch_combobox-icon__3syCw svg {\n width: 14px;\n height: 21px;\n transform: rotate(-180deg);\n}\n\n.MobileSearch_combobox-label__mRQMF {\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\n.MobileSearch_container__JtL5q {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.MobileSearch_container__JtL5q .MobileSearch_input__Sjo1c {\n font-family: var(--font-family);\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 appearance: none;\n}\n.MobileSearch_container__JtL5q .MobileSearch_input__Sjo1c:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff;\n}\n\nbutton.MobileSearch_clear-input__SGpE8 {\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}\nbutton.MobileSearch_clear-input__SGpE8 svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.MobileSearch_clear-input__SGpE8:focus {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileSearch_clear-input__SGpE8:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileSearch_clear-input__SGpE8:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileSearch_hasValue__H1RPq {\n color: #333;\n}\n\n.MobileSearch_suggestion__pqOkM {\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\n.MobileSearch_suggestionHighlighted__xpMMN {\n background-color: #f2f5f7;\n}\n\n.MobileSearch_suggestionsContainerOpen__wwyZk {\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}\n.MobileSearch_suggestionsContainerOpen__wwyZk .MobileSearch_suggestionsList__-pWWC {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f2f5f7;\n}\n\n.MobileSearch_clear-search-history__cO30c {\n display: flex;\n font-family: var(--font-family);\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f2f5f7;\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_suggestionHighlighted__xpMMN .MobileSearch_clear-search-history__cO30c {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileSearch_mobile-modal-overlay__bH39q {\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\n.MobileSearch_mobile-modal__DFUUM {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.MobileSearch_mobile-modal__DFUUM.ReactModal__Content--after-open > div {\n transform: translateY(0);\n}\n.MobileSearch_mobile-modal__DFUUM.ReactModal__Content--before-close > div {\n transform: translateY(10%);\n}\n\n.MobileSearch_mobile-modal-content__7q4zK {\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 Je={"fullscreen-root":"MobileNoScroll_fullscreen-root__fZbOA","combobox-container":"MobileNoScroll_combobox-container__9Q02x","right-column":"MobileNoScroll_right-column__Hk-62","combobox-icon":"MobileNoScroll_combobox-icon__WlXar","combobox-label":"MobileNoScroll_combobox-label__oeVbH",container:"MobileNoScroll_container__veReP",input:"MobileNoScroll_input__zo9Gg","clear-input":"MobileNoScroll_clear-input__lQlxs",hasValue:"MobileNoScroll_hasValue__1Gx3J",suggestion:"MobileNoScroll_suggestion__hTxDr",suggestionHighlighted:"MobileNoScroll_suggestionHighlighted__zxzXj",suggestionsContainerOpen:"MobileNoScroll_suggestionsContainerOpen__sX1RA",suggestionsList:"MobileNoScroll_suggestionsList__wXJTV","clear-search-history":"MobileNoScroll_clear-search-history__vR2Xw","mobile-modal-overlay":"MobileNoScroll_mobile-modal-overlay__Qw6Np","mobile-modal":"MobileNoScroll_mobile-modal__xYuHh","mobile-modal-content":"MobileNoScroll_mobile-modal-content__0Ft4g"};function Ye(e,t){if(null==e)return{};var u,n,o=function(e,t){if(null==e)return{};var u={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;u[n]=e[n]}return u}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)u=r[n],-1===t.indexOf(u)&&{}.propertyIsEnumerable.call(e,u)&&(o[u]=e[u])}return o}Pe("input[type=text] {\n margin: 0;\n padding: 0;\n}\n\n.MobileNoScroll_fullscreen-root__fZbOA {\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\n.MobileNoScroll_combobox-container__9Q02x {\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}\n.MobileNoScroll_combobox-container__9Q02x .MobileNoScroll_right-column__Hk-62 {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px;\n}\n\n.MobileNoScroll_combobox-icon__WlXar {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none;\n}\n.MobileNoScroll_combobox-icon__WlXar svg {\n width: 14px;\n height: 21px;\n transform: rotate(-180deg);\n}\n\n.MobileNoScroll_combobox-label__oeVbH {\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\n.MobileNoScroll_container__veReP {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.MobileNoScroll_container__veReP .MobileNoScroll_input__zo9Gg {\n font-family: var(--font-family);\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 appearance: none;\n}\n.MobileNoScroll_container__veReP .MobileNoScroll_input__zo9Gg:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff;\n}\n\nbutton.MobileNoScroll_clear-input__lQlxs {\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}\nbutton.MobileNoScroll_clear-input__lQlxs svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.MobileNoScroll_clear-input__lQlxs:focus {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileNoScroll_clear-input__lQlxs:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileNoScroll_clear-input__lQlxs:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileNoScroll_hasValue__1Gx3J {\n color: #333;\n}\n\n.MobileNoScroll_suggestion__hTxDr {\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\n.MobileNoScroll_suggestionHighlighted__zxzXj {\n background-color: #f2f5f7;\n}\n\n.MobileNoScroll_suggestionsContainerOpen__sX1RA {\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}\n.MobileNoScroll_suggestionsContainerOpen__sX1RA .MobileNoScroll_suggestionsList__wXJTV {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f2f5f7;\n}\n\n.MobileNoScroll_clear-search-history__vR2Xw {\n display: flex;\n font-family: var(--font-family);\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f2f5f7;\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_suggestionHighlighted__zxzXj .MobileNoScroll_clear-search-history__vR2Xw {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileNoScroll_mobile-modal-overlay__Qw6Np {\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\n.MobileNoScroll_mobile-modal__xYuHh {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.MobileNoScroll_mobile-modal__xYuHh.ReactModal__Content--after-open > div {\n transform: translateY(0);\n}\n.MobileNoScroll_mobile-modal__xYuHh.ReactModal__Content--before-close > div {\n transform: translateY(10%);\n}\n\n.MobileNoScroll_mobile-modal-content__0Ft4g {\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\n.MobileNoScroll_suggestionsContainerOpen__sX1RA {\n -ms-overflow-style: none; /* Internet Explorer 10+ */\n scrollbar-width: none; /* Firefox */\n}\n.MobileNoScroll_suggestionsContainerOpen__sX1RA::-webkit-scrollbar {\n display: none; /* Safari and Chrome */\n}");const et=["item","lng","getItemProps","highlightedIndex","itemIndex","styles"],tt=["suggestions","getMenuProps","getItemProps","lng","styles","hidden","renderClearHistoryButton","handleClearHistory"];function ut(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function nt(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):ut(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}function ot(e){let{item:t,lng:u,getItemProps:o,highlightedIndex:r,itemIndex:i,styles:a}=e,s=Ye(e,et);const[l]=n.useTranslation(),c="FutureRoute"===t.type?nt(nt({},t),{},{translatedText:Ue(t,u,l)}):t,d=He(t,u,l);return v.default.createElement("li",Object.assign({className:B.default(a.suggestion,r===i&&a.suggestionHighlighted)},o({index:i})),v.default.createElement(z.default,Object.assign({item:c,content:d,lng:u},s)))}const rt="production"!==process.env.NODE_ENV?_.default.shape({name:_.default.string,type:_.default.string,address:_.default.string,selectedIconId:_.default.string,iconColor:_.default.string,translatedText:_.default.string,properties:_.default.shape({layer:_.default.string,color:_.default.string,localadmin:_.default.string,mode:_.default.string,id:_.default.string,source:_.default.string,arrowClicked:_.default.bool,destination:_.default.shape({name:_.default.string,localadmin:_.default.string}),origin:_.default.shape({name:_.default.string,localadmin:_.default.string})})}):{};function it(e){let{suggestions:t,getMenuProps:u,getItemProps:o,lng:r,styles:i,hidden:a,renderClearHistoryButton:s,handleClearHistory:l}=e,c=Ye(e,tt);const[d]=n.useTranslation();return v.default.createElement("div",{className:B.default(i.suggestionsContainerOpen,i.suggestionsContainer,a&&"hidden")},v.default.createElement("ul",Object.assign({className:i.suggestionsList},u()),t.map((e,t)=>v.default.createElement(ot,Object.assign({key:`${e.type}-${e.properties.gid||e.properties.name||e.properties.gtfsId}`,getItemProps:o,itemIndex:t,item:e,lng:r,styles:i},c))),s&&v.default.createElement("li",o({index:t.length}),v.default.createElement("button",{onClick:l,type:"button",className:i["clear-search-history"]},d("clear-search-history",{lng:r})))))}"production"!==process.env.NODE_ENV&&(ot.propTypes={item:rt.isRequired,lng:_.default.string.isRequired,getItemProps:_.default.func.isRequired,highlightedIndex:_.default.number.isRequired,itemIndex:_.default.number.isRequired,styles:_.default.objectOf(_.default.string).isRequired}),"production"!==process.env.NODE_ENV&&(it.propTypes={suggestions:_.default.arrayOf(rt).isRequired,getMenuProps:_.default.func.isRequired,getItemProps:_.default.func.isRequired,lng:_.default.string.isRequired,styles:_.default.objectOf(_.default.string).isRequired,hidden:_.default.bool.isRequired,renderClearHistoryButton:_.default.bool,handleClearHistory:_.default.func}),it.defaultProps={renderClearHistoryButton:!1,handleClearHistory:()=>{}};const at=({color:e,lng:t,clearInput:u,onKeyDown:o,styles:r})=>{const[i]=n.useTranslation();return v.default.createElement("button",{type:"button",className:r["clear-input"],onClick:u,"aria-label":i("clear-button-label",{lng:t}),onKeyDown:o},v.default.createElement(P.default,{img:"close",color:e}))};function st({id:e,lng:t,value:u,placeholder:n,required:o,getInputProps:r,getLabelProps:i,clearInput:a,ariaLabel:s,inputRef:l,styles:c,renderLabel:d,isMobile:p,inputClassName:g,transportMode:f,clearButtonColor:h,autoFocus:b,inputOnBlur:E}){return v.default.createElement("div",{className:c.container},d&&v.default.createElement("label",i({className:c["sr-only"],htmlFor:e}),s),v.default.createElement("input",Object.assign({"aria-label":s,autoFocus:b,placeholder:n,required:o,type:"text",className:B.default(c.input,c[e],g,p&&f&&c.thin,u&&c.hasValue),value:u,id:e},r({ref:l,onBlur:E}))),u&&v.default.createElement(at,{lng:t,clearInput:()=>a(l),styles:c,color:h,onKeyDown:e=>qe(e)&&a(l)}))}function lt(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function ct(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):lt(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}"production"!==process.env.NODE_ENV&&(at.propTypes={color:_.default.string.isRequired,lng:_.default.string.isRequired,clearInput:_.default.func.isRequired,onKeyDown:_.default.func.isRequired,styles:_.default.objectOf(_.default.string).isRequired}),"production"!==process.env.NODE_ENV&&(st.propTypes={id:_.default.string.isRequired,lng:_.default.string.isRequired,placeholder:_.default.string.isRequired,required:_.default.bool.isRequired,value:_.default.string.isRequired,getInputProps:_.default.func.isRequired,getLabelProps:_.default.func.isRequired,clearInput:_.default.func.isRequired,ariaLabel:_.default.string.isRequired,inputRef:_.default.shape({current:_.default.oneOfType([_.default.string,_.default.object])}).isRequired,styles:_.default.objectOf(_.default.string).isRequired,renderLabel:_.default.bool,isMobile:_.default.bool.isRequired,inputClassName:_.default.string.isRequired,transportMode:_.default.string,clearButtonColor:_.default.string.isRequired,autoFocus:_.default.bool,inputOnBlur:_.default.func}),st.defaultProps={autoFocus:!1,renderLabel:!1,transportMode:void 0,inputOnBlur:()=>{}};const dt=({appElement:e,id:t,placeholder:o,clearInput:r,onSelectedItemChange:i,fontWeights:a,clearOldSearches:s,suggestionProps:l,lng:c,ariaProps:d,value:g,inputClassName:f,required:h,mobileLabel:b,showScroll:E,state:A,dispatch:m,colors:y})=>{const[F]=n.useTranslation(),{lock:D,unlock:C}=Xe.useScrollLock(),_=E?Ze:Je,B=`${t}-input`,S=`${t}-label`,[k,w]=u.useState(!1),x=v.default.useRef();u.useEffect(()=>{N.default.setAppElement(e)},[]),u.useEffect(()=>{A.renderMobile?D():C()},[A.renderMobile]);const{highlightedIndex:O,getLabelProps:j,getMenuProps:M,getInputProps:R,getItemProps:I,setHighlightedIndex:L}=p.useCombobox({items:A.suggestions,inputValue:g,isOpen:!0,onSelectedItemChange:e=>{i(e),m({type:"TOGGLE_MENU",isMobile:!0})},inputId:B,labelId:S,selectedItem:null,defaultHighlightedIndex:-1,onInputValueChange:({inputValue:e})=>A.renderMobile&&m({type:"INPUT_CHANGE",value:e}),stateReducer:(e,{changes:t,type:u})=>{switch(u){case p.useCombobox.stateChangeTypes.InputKeyDownEscape:return L(-1),m({type:"TOGGLE_MENU",isMobile:!0}),e;case p.useCombobox.stateChangeTypes.InputKeyDownEnter:return A.loading?(m({type:"PENDING_ENTER",enterPending:!0}),e):-1===e.highlightedIndex?ct(ct({},t),{},{selectedItem:A.suggestions[0]}):t;case p.useCombobox.stateChangeTypes.InputBlur:return e;default:return t}},itemToString:e=>e?Ve(e):""});j({},{suppressRefError:!0}),M({},{suppressRefError:!0}),R({},{suppressRefError:!0}),I({index:-1},{suppressRefError:!0});const{ariaRequiredText:z,SearchBarId:T,ariaCurrentSuggestion:H}=d,U=z.concat(" ").concat(T).concat(" ").concat(H);return v.default.createElement(N.default,{isOpen:A.renderMobile,className:_["mobile-modal"],overlayClassName:_["mobile-modal-overlay"],shouldReturnFocusAfterClose:!1,shouldCloseOnEsc:!0},v.default.createElement("div",{className:_["mobile-modal-content"],style:{"--color":y.primary,"--accessible-primary-color":y.accessiblePrimary,"--hover-color":y.hover,"--font-weight-medium":a.medium}},v.default.createElement("div",{className:_["combobox-container"],htmlFor:B},v.default.createElement("button",{type:"button",className:_["combobox-icon"],onClick:()=>{L(-1),m({type:"TOGGLE_MENU",isMobile:!0})},onKeyDown:e=>{qe(e)&&(L(-1),m({type:"TOGGLE_MENU",isMobile:!0}))},"aria-label":F("cancel",{lng:c}),tabIndex:0},v.default.createElement(P.default,{img:"arrow",color:y.primary})),v.default.createElement("span",{className:_["right-column"]},v.default.createElement("span",Object.assign({className:_["combobox-label"],id:S},j()),b),v.default.createElement(st,{placeholder:ze(t)?F("address-place-or-business",{lng:c}):o,id:t,lng:c,value:g,getInputProps:R,getLabelProps:j,clearInput:()=>r(x),ariaLabel:U,inputRef:x,styles:_,renderLabel:!1,clearButtonColor:y.primary,autoFocus:!0,inputClassName:f,required:h,isMobile:!0}),v.default.createElement(it,Object.assign({suggestions:A.suggestions,getMenuProps:M,getItemProps:I,highlightedIndex:O,isOpen:!0,hidden:!1,lng:c,styles:_,renderClearHistoryButton:!0,handleClearHistory:()=>w(!0)},l)))),v.default.createElement(q.default,{appElement:e,isModalOpen:k,handleClose:()=>w(!1),headerText:F("delete-old-searches-header",{lng:c}),primaryButtonText:F("delete",{lng:c}),secondaryButtonText:F("cancel",{lng:c}),primaryButtonOnClick:()=>{s(),w(!1)},secondaryButtonOnClick:()=>w(!1),colors:y,fontWeights:a,lang:c})))};function pt(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function gt(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):pt(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}"production"!==process.env.NODE_ENV&&(dt.propTypes={appElement:_.default.string.isRequired,id:_.default.string.isRequired,clearInput:_.default.func.isRequired,clearOldSearches:_.default.func.isRequired,onSelectedItemChange:_.default.func.isRequired,value:_.default.string.isRequired,colors:_.default.objectOf(_.default.string).isRequired,fontWeights:_.default.shape({medium:_.default.number.isRequired}).isRequired,suggestionProps:_.default.shape({}).isRequired,ariaProps:_.default.shape({ariaRequiredText:_.default.string.isRequired,SearchBarId:_.default.string.isRequired,ariaCurrentSuggestion:_.default.string.isRequired}).isRequired,inputClassName:_.default.string.isRequired,placeholder:_.default.string.isRequired,mobileLabel:_.default.string.isRequired,required:_.default.bool.isRequired,showScroll:_.default.bool.isRequired,lng:_.default.string.isRequired,state:_.default.shape({suggestions:_.default.arrayOf(_.default.shape({})).isRequired,renderMobile:_.default.bool.isRequired,loading:_.default.bool.isRequired}).isRequired,dispatch:_.default.func.isRequired});const ft=(e,t)=>{switch(t.type){case"INPUT_CHANGE":return gt(gt({},e),{},{value:t.value});case"FETCH_SUGGESTIONS":return gt(gt({},e),{},{loading:t.loading,suggestions:t.suggestions||e.suggestions});case"CLEAR_SUGGESTIONS":return gt(gt({},e),{},{suggestions:[]});case"RESET_SOURCES":return gt(gt({},e),{},{sources:t.sources});case"SET_SOURCES":return gt(gt({},e),{},{showOwnPlaces:t.showOwnPlaces,sources:t.sources,pendingSelection:t.pendingSelection});case"CLEAR":return gt(gt({},e),{},{value:"",isCleared:!0,suggestions:[]});case"INPUT_BLUR":return gt(gt({},e),{},{value:t.value||e.value,isCleared:!t.isMobile&&e.isCleared,pendingSelection:null,showOwnPlaces:!1});case"RESET":return t.initialState;case"PENDING_ENTER":return gt(gt({},e),{},{enterPending:t.enterPending});case"TOGGLE_MENU":return t.isMobile?e.renderMobile?gt(gt({},e),{},{renderMobile:!1,isCleared:!1}):gt(gt({},e),{},{renderMobile:!0,value:e.isCleared?"":e.value}):gt(gt({},e),{},{isMenuOpen:!e.isMenuOpen,renderMobile:t.isMobile&&!e.renderMobile});default:return e}};function ht(e,t){var u=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),u.push.apply(u,n)}return u}function bt(e){for(var t=1;t<arguments.length;t++){var u=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(u),!0).forEach(function(t){U(e,t,u[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):ht(Object(u)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))})}return e}const Et=["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","Wybrane miejsce"];function At({appElement:e,id:t,placeholder:o,onSelect:r,icon:i,value:a,onClear:s,lang:l,getAutoSuggestIcons:c,handleViaPoints:d,focusChange:g,storeRef:f,isMobile:h,mobileLabel:b,inputClassName:E,translatedPlaceholder:A,required:m,ariaLabel:y,fontWeights:F,colors:D,modeSet:C,showScroll:_,isEmbedded:S,transportMode:k,targets:w,sources:x,geocodingSize:O,filterResults:j,searchContext:M,pathOpts:R,refPoint:I}){const[L]=n.useTranslation(),N={suggestions:[],loading:!1,sources:x,showOwnPlaces:!1,pendingSelection:null,isCleared:!1,renderMobile:!1,value:a,enterPending:!1,isMenuOpen:!1},[q,z]=u.useReducer(ft,N);u.useEffect(()=>z({type:"RESET",initialState:N}),[a]),u.useEffect(()=>z({type:"RESET_SOURCES",sources:x}),[x]);const T=u.useRef(t);u.useEffect(()=>{f&&f(T.current)},[T.current]);const H=u.useCallback(()=>{const e=!(null!=w&&w.length)||w.includes("Locations"),t=(({targets:e,isLocationSearch:t,isMobile:u,ownPlaces:n,sources:o})=>{const r=!(null!=e&&e.length);let i;return n?(i=["Locations"],(r||e.includes("Stops"))&&i.push("Stops"),(r||e.includes("Stations"))&&i.push("Stations"),(r||e.includes("VehicleRentalStations"))&&i.push("VehicleRentalStations")):r||(i=[...e],!t||u||o.length&&!o.includes("Favourite")||i.push("SelectFromOwnLocations")),i})({targets:w,isLocationSearch:e,isMobile:h,ownPlaces:q.showOwnPlaces,sources:q.sources});((e,t,u,n,o,r,i,a,s,l)=>{a(null),je(e,t,u,n,o,r,i,a,s,l)})(t,q.sources?q.sources.filter(t=>!e||"Favourite"===!t||q.showOwnPlaces||h):q.sources,k,M,j,O,{input:q.value||""},e=>{if(null==e)return void z({type:"FETCH_SUGGESTIONS",loading:!0});const t=(e.results||[]).filter(e=>"FutureRoute"!==e.type||"FutureRoute"===e.type&&e.properties.time>Date.now()/1e3).map(e=>{if("CurrentLocation"===e.type||"SelectFromMap"===e.type||"SelectFromOwnLocations"===e.type||"back"===e.type){const t=bt({},e);return t.properties.labelId=L(e.properties.labelId,{lng:l}),t}return e});z({type:"FETCH_SUGGESTIONS",loading:!1,suggestions:t})},R,I)},[q.value,q.sources,q.showOwnPlaces,w,k,M,j,O,h,l,R,I,t]),U=u.useCallback((e,u)=>{e&&(d?d(e,u):r(e,t),!g||h&&!S||g(),T.current&&T.current.blur())},[h]),V=e=>U(e.selectedItem,e.highlightedIndex),{isOpen:W,highlightedIndex:G,getLabelProps:$,getMenuProps:Q,getInputProps:K,getItemProps:X,selectItem:Z,openMenu:J,closeMenu:Y}=p.useCombobox({inputId:t,inputValue:q.value,defaultHighlightedIndex:0,onInputValueChange:({inputValue:e})=>z({type:"INPUT_CHANGE",value:e}),stateReducer:u.useCallback((e,{type:t,changes:u})=>{switch(t){case p.useCombobox.stateChangeTypes.ItemClick:case p.useCombobox.stateChangeTypes.InputKeyDownEnter:return q.loading?(z({type:"PENDING_ENTER",enterPending:!0}),e):u.selectedItem?"SelectFromOwnLocations"===u.selectedItem.type?(z({type:"SET_SOURCES",sources:["Favourite","Back"],showOwnPlaces:!0,pendingSelection:u.selectedItem.type}),e):"back"===u.selectedItem.type?(z({type:"SET_SOURCES",sources:x,showOwnPlaces:!1,pendingSelection:null}),e):u:u;case p.useCombobox.stateChangeTypes.InputClick:return Et.includes(a)?bt(bt({},u),{},{inputValue:"",isOpen:!0}):bt(bt({},u),{},{isOpen:!0});case p.useCombobox.stateChangeTypes.InputBlur:return u.selectedItem?bt(bt({},u),{},{selectedItem:e.selectItem,inputValue:e.inputValue}):u;case p.useCombobox.stateChangeTypes.InputKeyDownEscape:return bt(bt({},u),{},{inputValue:""});default:return u}},[q.loading,a,h]),items:q.suggestions,itemToString:e=>e?Ve(e):"",onSelectedItemChange:V,onIsOpenChange:e=>{e.isOpen&&!q.renderMobile&&z({type:"TOGGLE_MENU",isMobile:h})}}),ee=e=>{z({type:"CLEAR"}),s&&s(t),e.current&&e.current.focus(),J()};u.useEffect(()=>{(W||q.renderMobile)&&H(q.value)},[W,q.renderMobile,q.value,H]),u.useEffect(()=>{q.enterPending&&!q.loading&&(U(q.suggestions[0],0),Y())},[q.loading,q.pendingEnter,q.suggestions]);const te={loading:q.loading,isMobile:h,ariaFavouriteString:L("favourite",{lng:l}),fontWeights:F,getAutoSuggestIcons:c,colors:D,modeSet:C},{ariaCurrentSuggestion:ue,ariaRequiredText:ne,SearchBarId:oe,ariaLabelText:re}=(({id:e,ariaLabel:t,lng:u,t:n,isMobile:o,suggestions:r,value:i,required:a})=>{const s=e.replace("searchfield-",""),l=t||n(s,{lng:u}).replace("searchfield-","").concat("."),c=a?`${n("required",{lng:u})}.`:"",d=n(o?"search-autosuggest-label-instructions-mobile":"search-autosuggest-label-instructions-desktop",{lng:u}),p="origin"===e?n("search-autosuggest-label-move-to-destination",{lng:u}):"";return{SearchBarId:l,ariaRequiredText:c,ariaLabelText:d.concat(" ").concat(p),ariaSuggestionLen:n("search-autosuggest-len",{count:r.length,lng:u}),ariaCurrentSuggestion:We({suggestions:r,t:n,lng:u})||i?n("search-current-suggestion",{lng:u,selection:We({suggestions:r,t:n,lng:u}).toLowerCase()||i}):""}})({id:t,lng:l,t:L,isMobile:h,ariaLabel:y,suggestions:q.suggestions,value:q.value,required:m});return u.useEffect(()=>{q.renderMobile||W||z({type:"RESET",initialState:N})},[q.renderMobile,W]),v.default.createElement(v.default.Fragment,null,h&&v.default.createElement(dt,{placeholder:L(o,{lng:l}),fontWeights:F,clearOldSearches:()=>{const{context:e,clearOldSearches:t,clearFutureRoutes:u}=M;e&&t&&(t(e),u&&u(e),H(q.value))},appElement:e,mobileLabel:b||L(t,{lng:l}),ariaProps:{ariaCurrentSuggestion:ue,SearchBarId:oe,ariaRequiredText:ne},id:t,lng:l,onSelectedItemChange:V,value:q.value,clearInput:ee,suggestionProps:te,showScroll:!!_,colors:D,inputClassName:E,required:m,state:q,dispatch:z}),v.default.createElement("div",{className:B.default(Re["autosuggest-input-container"],Re[t],q.renderMobile&&"hidden"),style:{"--color":D.primary,"--hover-color":D.hover}},i&&v.default.createElement("div",{className:B.default(Re["autosuggest-input-icon"],Re[t],E&&Re[`${E}-input-icon`]),"aria-label":ne.concat(" ").concat(oe).concat(" ").concat(L("search-autosuggest-label",{lng:l}))},v.default.createElement(P.default,{img:`${i}`})),v.default.createElement(st,{inputClassName:E,ariaLabel:ue.concat(" ").concat(ne).concat(" ").concat(oe).concat(" ").concat(re),id:t,lng:l,getInputProps:K,getLabelProps:$,selectItem:Z,value:q.value,clearInput:ee,inputRef:T,styles:Re,clearButtonColor:D.primary,placeholder:A||L(o,{lng:l}),required:m,transportMode:k,isMobile:h,inputOnBlur:()=>{z({isMobile:h,value:!h&&a,type:"INPUT_BLUR"}),h||z({type:"RESET",initialState:N})}}),v.default.createElement(it,Object.assign({hidden:!W||h,highlightedIndex:G,getItemProps:X,getMenuProps:Q,suggestions:q.suggestions,lng:l,styles:Re},te))))}"production"!==process.env.NODE_ENV&&(At.propTypes={appElement:_.default.string.isRequired,icon:_.default.string,id:_.default.string.isRequired,placeholder:_.default.string.isRequired,translatedPlaceholder:_.default.string,value:_.default.string,transportMode:_.default.string,geocodingSize:_.default.number,filterResults:_.default.func,searchContext:_.default.shape({URL_PELIAS:_.default.string,context:_.default.object,clearOldSearches:_.default.func,clearFutureRoutes:_.default.func}).isRequired,sources:_.default.arrayOf(_.default.string),targets:_.default.arrayOf(_.default.string),ariaLabel:_.default.string,onSelect:_.default.func.isRequired,onClear:_.default.func,storeRef:_.default.func,handleViaPoints:_.default.func,focusChange:_.default.func,lang:_.default.string,isMobile:_.default.bool,pathOpts:_.default.shape({routesPrefix:_.default.string,stopsPrefix:_.default.string}),mobileLabel:_.default.string,refPoint:_.default.shape({address:_.default.string,lat:_.default.number,lon:_.default.number}),inputClassName:_.default.string,fontWeights:_.default.shape({medium:_.default.number}),colors:_.default.objectOf(_.default.string),getAutoSuggestIcons:_.default.objectOf(_.default.func),required:_.default.bool,modeSet:_.default.string,showScroll:_.default.bool,isEmbedded:_.default.bool}),At.defaultProps={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,pathOpts:{routesPrefix:"linjat",stopsPrefix:"pysakit"},ariaLabel:void 0,mobileLabel:void 0,inputClassName:"",translatedPlaceholder:void 0,fontWeights:{medium:500},colors:g.defaultColors,required:!1,modeSet:void 0,showScroll:!1,refPoint:{}};e.default=e=>v.default.createElement(n.I18nextProvider,{i18n:Me},v.default.createElement(At,e)),Object.defineProperty(e,"__esModule",{value:!0})});
3
3
  //# sourceMappingURL=index.js.map