@digitransit-component/digitransit-component-autosuggest-panel 8.4.3 → 9.0.1

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.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../../../node_modules/style-inject/dist/style-inject.es.js","../src/helpers/Select.js","../src/helpers/translations.js","../src/helpers/i18n.js","../src/index.js","../../../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"],"sourcesContent":["function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport React from 'react';\nimport { useSelect } from 'downshift';\nimport styles from './select.scss';\n\nconst Select = ({\n value,\n options,\n onSlackTimeSelected,\n viaPointIndex,\n id,\n label,\n icon,\n}) => {\n const labelId = `${id}-label`;\n const selectedItem = options.find(option => option.value === value);\n\n const {\n isOpen,\n getToggleButtonProps,\n getMenuProps,\n getItemProps,\n getLabelProps,\n highlightedIndex,\n } = useSelect({\n selectedItem,\n items: options,\n labelId,\n id,\n itemToString: item => item.displayName,\n onSelectedItemChange: ({ selectedItem: newItem }) => {\n onSlackTimeSelected(newItem.value, viaPointIndex);\n },\n });\n\n return (\n <div className={styles['combobox-container']}>\n <div className={styles.container}>\n <div {...getToggleButtonProps()}>\n <span className={styles['left-column']}>\n <label {...getLabelProps()} className={styles['combobox-label']}>\n {label}\n </label>\n <div className={styles.input}>\n <span>{selectedItem.displayName}</span>\n </div>\n </span>\n {icon}\n </div>\n <ul\n className={cx([styles.suggestionsContainerOpen, !isOpen && 'hidden'])}\n {...getMenuProps()}\n >\n {isOpen &&\n options.map((option, index) => (\n <li\n key={option.value}\n className={cx([\n styles.suggestion,\n index === highlightedIndex && styles.suggestionHighlighted,\n ])}\n {...getItemProps({ index })}\n >\n <span>{option.displayName}</span>\n </li>\n ))}\n </ul>\n </div>\n </div>\n );\n};\n\nSelect.propTypes = {\n value: PropTypes.number.isRequired,\n onSlackTimeSelected: PropTypes.func.isRequired,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n displayName: PropTypes.string.isRequired,\n value: PropTypes.number.isRequired,\n }).isRequired,\n ).isRequired,\n id: PropTypes.string.isRequired,\n label: PropTypes.node.isRequired,\n icon: PropTypes.node.isRequired,\n viaPointIndex: PropTypes.number.isRequired,\n};\n\nexport default Select;\n","const translations = {\n de: {\n translation: {\n 'add-via-button-label': 'Füge Zwischenziel hinzu',\n 'add-via-duration-button-label':\n 'Setze Umsteigezeit für Zwischenziel {{index}}',\n 'add-via-duration-button-label-close':\n 'Schließe Umsteigezeit-Auswahl für Zwischenziel {{index}}',\n 'add-via-duration-button-label-open':\n 'Öffne Umsteigezeit-Auswahl für Zwischenziel {{index}}',\n 'minute-short': 'min',\n 'remove-via-button-label': 'Entferne Zwischenziel {{index}}',\n 'swap-order-button-label': 'Tausche Start mit Ziel',\n 'via-point': 'Zwischenziel',\n 'via-point-index': 'Zwischenziel {{index}}',\n 'viapoint-slack-amount': 'Umsteigezeit',\n },\n },\n en: {\n translation: {\n 'add-via-button-label': 'Add via point',\n 'add-via-duration-button-label':\n 'Set stop duration at via point {{index}}',\n 'add-via-duration-button-label-close':\n 'Close stop duration selector at via point {{index}}',\n 'add-via-duration-button-label-open':\n 'Open stop duration selector at via point {{index}}',\n 'minute-short': 'min',\n 'remove-via-button-label': 'Remove via point {{index}}',\n 'swap-order-button-label': 'Reverse origin and destination',\n 'via-point': 'Via point',\n 'via-point-index': 'Via point {{index}}',\n 'viapoint-slack-amount': 'Stop duration',\n },\n },\n fi: {\n translation: {\n 'add-via-button-label': 'Lisää välipiste',\n 'add-via-duration-button-label':\n 'Aseta välipisteelle {{index}} pysähdyksen kesto',\n 'add-via-duration-button-label-close':\n 'Avaa välipisteen {{index}} pysähdyksen kesto valitsin',\n 'add-via-duration-button-label-open':\n 'Sulje välipisteen {{index}} pysähdyksen kesto valitsin',\n 'minute-short': 'min',\n 'remove-via-button-label': 'Poista välipiste {{index}}',\n 'swap-order-button-label': 'Käännä reitin suunta vastakkaiseksi',\n 'via-point': 'Välipiste',\n 'via-point-index': 'Välipiste {{index}}',\n 'viapoint-slack-amount': 'Pysähdyksen kesto',\n },\n },\n pl: {\n translation: {\n 'add-via-button-label': 'Dodaj punkt pośredni',\n 'add-via-duration-button-label':\n 'Wybierz czas postoju dla punktu {{index}}',\n 'add-via-duration-button-label-close':\n 'Zamknij wybornik czasu postoju w punkcie {{index}}',\n 'add-via-duration-button-label-open':\n 'Otwórz wybornik czasu postoju w punkcie {{index}}',\n 'minute-short': 'min.',\n 'remove-via-button-label': 'Usuń punkt pośredni {{index}}',\n 'swap-order-button-label': 'Odwróć początek i cel',\n 'via-point': 'Punkt pośredni',\n 'via-point-index': 'Punkt pośredni {{index}}',\n 'viapoint-slack-amount': 'Czas postoju',\n },\n },\n sv: {\n translation: {\n 'add-via-button-label': 'Lägg till viapunkt',\n 'add-via-duration-button-label':\n 'Ställ in varaktighet för viapunkten {{index}}',\n 'add-via-duration-button-label-close':\n 'Stäng väljaren för varaktighet vid via-punkten {{index}}',\n 'add-via-duration-button-label-open':\n 'Öppna väljaren för varaktighet vid via-punkten {{index}}',\n 'minute-short': 'min',\n 'remove-via-button-label': 'Ta bort viapunkt {{index}}',\n 'swap-order-button-label': 'Sväng ruttens riktning till den motsatta',\n 'via-point': 'Via punkt',\n 'via-point-index': 'Via punkt {{index}}',\n 'viapoint-slack-amount': 'Stoppets varaktighet',\n },\n },\n};\n\nexport default translations;\n","import { createInstance } from 'i18next';\nimport translations from './translations';\n\nconst i18n = createInstance({\n fallbackLng: 'fi',\n // debug: true,\n resources: translations,\n defaultNS: 'translation',\n react: {\n useSuspense: true,\n },\n});\n\ni18n.init();\n\nexport default i18n;\n","/* eslint-disable import/no-extraneous-dependencies */\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { I18nextProvider, withTranslation } from 'react-i18next';\nimport { ReactSortable } from 'react-sortablejs';\nimport DTAutoSuggest from '@digitransit-component/digitransit-component-autosuggest';\nimport Icon, {\n defaultColors,\n} from '@digitransit-component/digitransit-component-icon';\nimport isEmpty from 'lodash/isEmpty';\nimport Select from './helpers/Select';\nimport i18n from './helpers/i18n';\nimport styles from './helpers/styles.scss';\n\nexport const getEmptyViaPointPlaceHolder = () => ({});\n\nconst isViaPointEmpty = viaPoint => {\n if (viaPoint === undefined || isEmpty(viaPoint)) {\n return true;\n }\n const keys = Object.keys(viaPoint);\n return (\n keys.length === 1 || (keys.length === 2 && keys.includes('locationSlack'))\n );\n};\n\nconst ItinerarySearchControl = ({\n children,\n className,\n enabled,\n onClick,\n onKeyPress,\n wide,\n ...rest\n}) => (\n <div\n className={styles['itinerary-search-control']}\n style={{ '--width': wide ? '47px' : '40px' }}\n >\n {onClick && enabled && (\n <div\n {...rest}\n className={className}\n onClick={onClick}\n onKeyPress={onKeyPress}\n role=\"button\"\n tabIndex=\"0\"\n >\n {children}\n </div>\n )}\n </div>\n);\n\nconst updateViaPointSlack = (\n activeViaPointSlacks,\n updatedViaPointIndex,\n viaPointRemoved = false,\n) => {\n const foundAtIndex = activeViaPointSlacks.indexOf(updatedViaPointIndex);\n if (foundAtIndex > -1) {\n activeViaPointSlacks.splice(foundAtIndex, 1);\n }\n return viaPointRemoved\n ? activeViaPointSlacks.map(value =>\n value > updatedViaPointIndex ? value - 1 : value,\n )\n : activeViaPointSlacks;\n};\n\nconst isKeyboardSelectionEvent = event => {\n const space = [13, ' ', 'Spacebar'];\n const enter = [32, 'Enter'];\n const key = (event && (event.key || event.which || event.keyCode)) || '';\n if (!key || !space.concat(enter).includes(key)) {\n return false;\n }\n event.preventDefault();\n return true;\n};\n\nconst value = location =>\n (location && location.address) ||\n (location && location.gps && location.ready && 'Nykyinen sijainti') ||\n '';\n\nconst getLocationType = location =>\n location && location.gps === true ? 'position' : 'location';\n\nconst getSlackTimeOptions = t => {\n const timeOptions = [];\n for (let i = 0; i <= 9; i++) {\n const valueInMinutes = i * 10;\n timeOptions.push({\n displayName: `${valueInMinutes} ${t('minute-short')}`,\n value: valueInMinutes * 60,\n });\n }\n return timeOptions;\n};\n\nItinerarySearchControl.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string.isRequired,\n enabled: PropTypes.bool.isRequired,\n onClick: PropTypes.func.isRequired,\n onKeyPress: PropTypes.func.isRequired,\n wide: PropTypes.bool,\n};\n\nItinerarySearchControl.defaultProps = {\n children: undefined,\n wide: false,\n};\n\n/**\n * Panel that renders two DTAutosuggest search fields, including viapoint handling\n *\n * @example\n * const searchContext = {\n * isPeliasLocationAware: false // true / false does Let Pelias suggest based on current user location\n * minimalRegexp: undefined // used for testing min. regexp. For example: new RegExp('.{2,}'),\n * lineRegexp: undefined // identify searches for route numbers/labels: bus | train | metro. For example: new RegExp(\n * // '(^[0-9]+[a-z]?$|^[yuleapinkrtdz]$|(^m[12]?b?$))',\n * // 'i',\n * // ),\n * URL_PELIAS: '' // url for pelias searches\n * feedIDs: ['HSL', 'HSLLautta'] // FeedId's like [HSL, HSLLautta]\n * geocodingSources: ['oa','osm','nlsfi'] // sources for geocoding\n * geocodingSearchParams; {} // Searchparmas fro geocoding\n * getFavouriteLocations: () => ({}), // Function that returns array of favourite locations.\n * getFavouriteStops: () => ({}), // Function that returns array of favourite stops.\n * getLanguage: () => ({}), // Function that returns current language.\n * getFavouriteRoutes: () => ({}), // Function that returns array of favourite routes.\n * getPositions: () => ({}), // Function that returns user's geolocation.\n * getRoutesQuery: () => ({}), // Function that returns query for fetching routes.\n * getStopAndStationsQuery: () => ({}), // Function that fetches favourite stops and stations from graphql API.\n * getFavouriteRoutesQuery: () => ({}), // Function that returns query for fetching favourite routes.\n * getFavouriteVehicleRentalStations: () => ({}), // Function that returns favourite bike rental station.\n * getFavouriteVehicleRentalStationsQuery: () => ({}), // Function that returns query for fetching favourite bike rental stations.\n * startLocationWatch: () => ({}), // Function that locates users geolocation.\n * saveSearch: () => ({}), // Function that saves search to old searches store.\n * clearOldSearches: () => ({}), // Function that clears old searches store.\n * getFutureRoutes: () => ({}), // Function that return future routes\n * saveFutureRoute: () => ({}), // Function that saves a future route\n * clearFutureRoutes: () => ({}), // Function that clears future routes\n * };\n *\n * const origin = {\n * lat: 60.169196,\n * lon: 24.957674,\n * address: 'Aleksanterinkatu, Helsinki',\n * set: true,\n * ready: true,\n * }\n *\n * const destination = {\n * lat: 60.199093,\n * lon: 24.940536,\n * address: 'Opastinsilta 6, Helsinki',\n * set: true,\n * ready: true,\n * }\n * onSelect(item, id) {\n * return null; // Define what to do when a suggestion is being selected. None by default.\n * }\n * onClear(id) {\n * return null; // Define what to do when a suggestion is being selected. None by default.\n * }\n * const getAutoSuggestIcons: {\n * // Called for every city bike station rendered as a search suggestion. Should return the icon and\n * // color used for that station. Two icons are available, 'citybike-stop-digitransit' anditybike-stop-digitransit-secondary'.\n * citybikes: station => {\n * return ['citybike-stop-digitransit', '#f2b62d'];\n * }\n * }\n * const targets = ['Locations', 'Stops', 'Routes']; // Defines what you are searching. all available options are Locations, Stops, Routes, VehicleRentalStations, FutureRoutes, MapPosition and CurrentPosition. Leave empty to search all targets.\n * const sources = ['Favourite', 'History', 'Datasource'] // Defines where you are searching. all available are: Favourite, History (previously searched searches), and Datasource. Leave empty to use all sources.\n * <DTAutosuggestPanel\n * appElement={appElement} // Required. Root element's id. Needed for react-modal component.\n * origin={origin} // Selected origin point\n * destination={destination} // Selected destination point\n * originPlaceHolder={'Give origin'} // Optional Give string shown initially inside origin search field\n * destinationPlaceHolder={'Give destination'} // Optional Give string shown initally inside destination search field\n * initialViaPoints={[]} // Optional. If showViapointControl is set to true, pass initial via points to the panel. Currently no default implementation is given.\n * updateViaPoints={() => return []} // Optional. If showViapointControl is set to true, define how to update your via point list with this function. Currenlty no default implementation is given.\n * swapOrder={() => return null} // Optional. If showSwapControl is set to true, define how to swap order of your points (origin, destination, viapoints). Currently no default implementation is given.\n * searchContext={searchContext}\n * getAutoSuggestIcons={getAutoSuggestIcons}\n * onSelect={this.onSelect}\n * onClear={this.onClear}\n * lang=\"fi\" // Define language fi sv or en.\n * addAnalyticsEvent={null} // Optional. you can record an analytics event if you wish. if passed, component will pass an category, action, name parameters to addAnalyticsEvent\n * disableAutoFocus={false} // Optional. use this to disable autofocus completely from DTAutosuggestPanel\n * sources={sources}\n * targets={targets}\n * isMobile // Optional. Defaults to false. Whether to use mobile search.\n * originMobileLabel=\"Origin label\" // Optional. Custom label text for origin field on mobile.\n * destinationMobileLabel=\"Destination label\" // Optional. Custom label text for destination field on mobile.\n * handleFocusChange={() => {}} // Optional. If defined overrides default onFocusChange behaviour\n * showSwapControl={false} // Optional.\n * showViapointControl={false} // Optional.\n */\n\nconst locationShape = PropTypes.shape({\n address: PropTypes.string,\n lat: PropTypes.number,\n lon: PropTypes.number,\n locationSlack: PropTypes.number,\n});\n\nclass DTAutosuggestPanel extends React.Component {\n static propTypes = {\n appElement: PropTypes.string.isRequired,\n origin: locationShape,\n destination: locationShape,\n originPlaceHolder: PropTypes.string,\n destinationPlaceHolder: PropTypes.string,\n viaPoints: PropTypes.arrayOf(locationShape),\n updateViaPoints: PropTypes.func,\n handleViaPointLocationSelected: PropTypes.func,\n swapOrder: PropTypes.func,\n searchPanelText: PropTypes.string,\n searchContext: PropTypes.shape({\n URL_PELIAS: PropTypes.string,\n }).isRequired,\n onSelect: PropTypes.func.isRequired,\n onClear: PropTypes.func,\n addAnalyticsEvent: PropTypes.func,\n lang: PropTypes.string.isRequired,\n disableAutoFocus: PropTypes.bool,\n sources: PropTypes.arrayOf(PropTypes.string),\n targets: PropTypes.arrayOf(PropTypes.string),\n filterResults: PropTypes.func,\n isMobile: PropTypes.bool,\n originMobileLabel: PropTypes.string,\n destinationMobileLabel: PropTypes.string,\n refPoint: locationShape,\n modeSet: PropTypes.string,\n colors: PropTypes.objectOf(PropTypes.string),\n getAutoSuggestIcons: PropTypes.objectOf(PropTypes.func),\n fontWeights: PropTypes.shape({\n medium: PropTypes.number,\n }),\n showScroll: PropTypes.bool,\n onFocusChange: PropTypes.func,\n isEmbedded: PropTypes.bool,\n showSwapControl: PropTypes.bool,\n showViapointControl: PropTypes.bool,\n showSlackControl: PropTypes.bool,\n t: PropTypes.func.isRequired,\n };\n\n static defaultProps = {\n origin: undefined,\n destination: undefined,\n viaPoints: [],\n originPlaceHolder: 'give-origin',\n destinationPlaceHolder: 'give-destination',\n swapOrder: undefined,\n updateViaPoints: () => {},\n searchPanelText: undefined,\n sources: [],\n targets: [],\n filterResults: undefined,\n onClear: undefined,\n getAutoSuggestIcons: undefined,\n refPoint: undefined,\n addAnalyticsEvent: undefined,\n disableAutoFocus: false,\n isMobile: false,\n handleViaPointLocationSelected: undefined,\n originMobileLabel: null,\n destinationMobileLabel: null,\n modeSet: undefined,\n colors: defaultColors,\n fontWeights: {\n medium: 500,\n },\n showScroll: false,\n onFocusChange: undefined,\n isEmbedded: false,\n showSwapControl: false,\n showViapointControl: false,\n showSlackControl: false,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n activeSlackInputs: [],\n refs: [],\n };\n }\n\n storeReference = ref => {\n this.setState(prevState => ({ refs: [...prevState.refs, ref] }));\n };\n\n handleFocusChange = () => {\n const { destination } = this.props;\n if (!destination || !destination.lat) {\n this.state.refs[1].focus();\n }\n };\n\n updateViaPoints = viaPoints => {\n if (viaPoints.length === 0) {\n this.props.updateViaPoints([]);\n return;\n }\n this.props.updateViaPoints(viaPoints.filter(vp => !isViaPointEmpty(vp)));\n };\n\n handleToggleViaPointSlackClick = viaPointIndex => {\n const { activeSlackInputs } = this.state;\n this.setState({\n activeSlackInputs: activeSlackInputs.includes(viaPointIndex)\n ? updateViaPointSlack(activeSlackInputs, viaPointIndex)\n : activeSlackInputs.concat([viaPointIndex]),\n });\n };\n\n handleViaPointSlackTimeSelected = (slackTimeInSeconds, i) => {\n if (this.props.addAnalyticsEvent) {\n this.props.addAnalyticsEvent({\n action: 'EditViaPointStopDuration',\n category: 'ItinerarySettings',\n name: slackTimeInSeconds / 60,\n });\n }\n const { viaPoints } = this.props;\n viaPoints[i].locationSlack = Number.parseInt(slackTimeInSeconds, 10);\n this.updateViaPoints(viaPoints);\n };\n\n handleViaPointLocationSelected = (viaPointLocation, i) => {\n this.props.handleViaPointLocationSelected(viaPointLocation, i);\n };\n\n handleRemoveViaPointClick = viaPointIndex => {\n if (this.props.addAnalyticsEvent) {\n this.props.addAnalyticsEvent({\n action: 'RemoveJourneyViaPoint',\n category: 'ItinerarySettings',\n name: null,\n });\n }\n const { activeSlackInputs } = this.state;\n const { viaPoints } = this.props;\n viaPoints.splice(viaPointIndex, 1);\n this.setState(\n {\n activeSlackInputs: updateViaPointSlack(\n activeSlackInputs,\n viaPointIndex,\n true,\n ),\n },\n () => this.updateViaPoints(viaPoints),\n );\n };\n\n handleAddViaPointClick = () => {\n if (this.props.addAnalyticsEvent) {\n this.props.addAnalyticsEvent({\n action: 'AddJourneyViaPoint',\n category: 'ItinerarySettings',\n name: 'QuickSettingsButton',\n });\n }\n const { viaPoints } = this.props;\n viaPoints.push(getEmptyViaPointPlaceHolder());\n // We need to update the state so that placeHolder will show up in panel.\n // eslint-disable-next-line react/no-access-state-in-setstate\n this.setState(this.state);\n };\n\n handleSwapOrderClick = () => {\n if (this.props.addAnalyticsEvent) {\n this.props.addAnalyticsEvent({\n action: 'SwitchJourneyStartAndEndPointOrder',\n category: 'ItinerarySettings',\n name: null,\n });\n }\n const { viaPoints } = this.props;\n viaPoints.reverse();\n this.props.swapOrder();\n };\n\n getSlackDisplay = slackInSeconds =>\n `${slackInSeconds / 60} ${this.props.t('minute-short', {\n lng: this.props.lang,\n })}`;\n\n render() {\n const {\n origin,\n searchPanelText,\n searchContext,\n disableAutoFocus,\n viaPoints,\n originMobileLabel,\n destinationMobileLabel,\n fontWeights,\n onFocusChange,\n showSwapControl,\n showViapointControl,\n t,\n lang: lng,\n } = this.props;\n const { primary } = this.props.colors;\n const { activeSlackInputs } = this.state;\n const slackTime = getSlackTimeOptions(t);\n const defaultSlackTimeValue = 0;\n const getViaPointSlackTimeOrDefault = (\n viaPoint,\n defaultValue = defaultSlackTimeValue,\n ) => (viaPoint && viaPoint.locationSlack) || defaultValue;\n const isViaPointSlackTimeInputActive = index =>\n activeSlackInputs.includes(index);\n return (\n <div\n className={cx([\n styles['autosuggest-panel'],\n {\n small: this.props.isMobile,\n },\n ])}\n style={{\n '--color': primary,\n '--font-weight-medium': fontWeights.medium,\n }}\n >\n {' '}\n {searchPanelText ? (\n <div>\n <h1 className={styles['autosuggest-searchpanel-text']}>\n {' '}\n {searchPanelText}\n </h1>\n </div>\n ) : null}\n <div className={styles['origin-input-container']}>\n <DTAutoSuggest\n appElement={this.props.appElement}\n icon=\"originEllipse\"\n id=\"origin\"\n autoFocus={\n disableAutoFocus === true\n ? false\n : !this.props.isMobile && !origin?.lat\n }\n storeRef={this.storeReference}\n refPoint={this.props.refPoint}\n className={getLocationType(origin)}\n placeholder={this.props.originPlaceHolder}\n value={value(origin)}\n searchContext={searchContext}\n getAutoSuggestIcons={this.props.getAutoSuggestIcons}\n onSelect={this.props.onSelect}\n onClear={this.props.onClear}\n focusChange={onFocusChange || this.handleFocusChange}\n lang={this.props.lang}\n sources={this.props.sources}\n targets={this.props.targets}\n filterResults={this.props.filterResults}\n isMobile={this.props.isMobile}\n colors={this.props.colors}\n mobileLabel={originMobileLabel}\n fontWeights={this.props.fontWeights}\n modeSet={this.props.modeSet}\n showScroll={this.props.showScroll}\n isEmbedded={this.props.isEmbedded}\n />\n {(showSwapControl || showViapointControl) && (\n <ItinerarySearchControl\n className={styles.opposite}\n enabled={showSwapControl}\n onClick={() => this.handleSwapOrderClick()}\n onKeyPress={e =>\n isKeyboardSelectionEvent(e) && this.handleSwapOrderClick()\n }\n aria-label={t('swap-order-button-label', { lng })}\n >\n <Icon img=\"opposite\" color={primary} />\n </ItinerarySearchControl>\n )}\n </div>\n {viaPoints.length === 0 && (\n <div className={styles['rectangle-container']}>\n <div className={styles.rectangle} />\n </div>\n )}\n <ReactSortable\n className={styles['viapoints-container']}\n list={viaPoints}\n handle={`.${styles['viapoint-before']}`}\n animation={200}\n disabled={viaPoints.length <= 1}\n setList={items => {\n const newViaPoints = items.filter(vp => !isViaPointEmpty(vp));\n if (newViaPoints.length > 0) {\n this.props.updateViaPoints(newViaPoints);\n }\n }}\n >\n {viaPoints.map((o, i) => (\n <div\n className={cx(styles['viapoint-container'])}\n key={`viapoint-${i}`} // eslint-disable-line\n >\n <div className={styles['light-gray-background']}>\n <div className={styles.row}>\n <div\n className={styles['viapoint-before']}\n style={viaPoints.length > 1 ? { cursor: 'move' } : {}}\n >\n {viaPoints.length > 1 && (\n <Icon img=\"ellipsis\" rotate={90} color={primary} />\n )}\n </div>\n <div\n className={cx(\n `${styles['viapoint-input-container']} ${\n styles[`viapoint-${i + 1}`]\n }`,\n )}\n >\n <DTAutoSuggest\n appElement={this.props.appElement}\n icon=\"mapMarker\"\n id=\"via-point\"\n ariaLabel={t('via-point-index', {\n index: i + 1,\n lng,\n })}\n autoFocus={\n disableAutoFocus === true ? false : !this.props.isMobile\n }\n placeholder=\"via-point\"\n className=\"viapoint\"\n searchContext={searchContext}\n refPoint={this.props.refPoint}\n value={(o && o.address) || ''}\n onSelect={this.props.onSelect}\n onClear={this.props.onClear}\n handleViaPoints={item =>\n this.handleViaPointLocationSelected(item, i)\n }\n lang={this.props.lang}\n sources={this.props.sources}\n targets={this.props.targets}\n filterResults={this.props.filterResults}\n getAutoSuggestIcons={this.props.getAutoSuggestIcons}\n isMobile={this.props.isMobile}\n fontWeights={this.props.fontWeights}\n modeSet={this.props.modeSet}\n colors={this.props.colors}\n showScroll={this.props.showScroll}\n />\n </div>\n {this.props.showSlackControl && (\n <ItinerarySearchControl\n className={styles['add-via-point-slack']}\n enabled={this.props.showViapointControl}\n onClick={() => this.handleToggleViaPointSlackClick(i)}\n onKeyPress={e =>\n isKeyboardSelectionEvent(e) &&\n this.handleToggleViaPointSlackClick(i)\n }\n aria-label={t(\n isViaPointSlackTimeInputActive(i)\n ? 'add-via-duration-button-label-open'\n : 'add-via-duration-button-label-close',\n { index: i + 1, lng },\n )}\n wide\n >\n <Icon img=\"time\" color={primary} />\n </ItinerarySearchControl>\n )}\n </div>\n {!isViaPointSlackTimeInputActive(i) &&\n viaPoints[i] &&\n viaPoints[i].locationSlack > 0 && (\n <span className={styles['viapoint-slack-time']}>{`${t(\n 'viapoint-slack-amount',\n {\n lng,\n },\n )}: ${this.getSlackDisplay(\n viaPoints[i].locationSlack,\n )}`}</span>\n )}\n <div\n className={cx(styles['input-viapoint-slack-container'], {\n collapsed: !isViaPointSlackTimeInputActive(i),\n })}\n >\n <div className={styles['select-wrapper']}>\n <Select\n id={`viapoint-slack-${i}`}\n label={t('viapoint-slack-amount', { lng })}\n options={slackTime}\n value={getViaPointSlackTimeOrDefault(viaPoints[i])}\n viaPointIndex={i}\n icon={\n <span\n className={`${styles['combobox-icon']} ${styles['time-input-icon']}`}\n >\n <Icon img=\"time\" color={primary} />\n </span>\n }\n onSlackTimeSelected={this.handleViaPointSlackTimeSelected}\n />\n </div>\n </div>\n </div>\n <ItinerarySearchControl\n className={styles['remove-via-point']}\n enabled={this.props.showViapointControl}\n onClick={() => this.handleRemoveViaPointClick(i)}\n onKeyPress={e =>\n isKeyboardSelectionEvent(e) &&\n this.handleRemoveViaPointClick(i)\n }\n aria-label={t('remove-via-button-label', {\n index: i + 1,\n lng,\n })}\n >\n <Icon img=\"trash\" color={primary} />\n </ItinerarySearchControl>\n </div>\n ))}\n </ReactSortable>\n <div className={styles['destination-input-container']}>\n <DTAutoSuggest\n appElement={this.props.appElement}\n icon=\"mapMarker\"\n id=\"destination\"\n autoFocus={\n disableAutoFocus === true\n ? false\n : !this.props.isMobile && !Number.isNaN(origin?.lat)\n }\n storeRef={this.storeReference}\n placeholder={this.props.destinationPlaceHolder}\n className={getLocationType(this.props.destination)}\n getAutoSuggestIcons={this.props.getAutoSuggestIcons}\n searchContext={searchContext}\n onSelect={this.props.onSelect}\n onClear={this.props.onClear}\n refPoint={this.props.refPoint}\n value={value(this.props.destination)}\n lang={this.props.lang}\n sources={this.props.sources}\n targets={this.props.targets}\n filterResults={this.props.filterResults}\n isMobile={this.props.isMobile}\n mobileLabel={destinationMobileLabel}\n fontWeights={this.props.fontWeights}\n modeSet={this.props.modeSet}\n colors={this.props.colors}\n showScroll={this.props.showScroll}\n isEmbedded={this.props.isEmbedded}\n />\n {(showSwapControl || showViapointControl) && (\n <ItinerarySearchControl\n className={cx(styles['add-via-point'], styles.more, {\n collapsed: viaPoints.length > 4,\n })}\n enabled={showViapointControl && viaPoints.length === 0}\n onClick={() => this.handleAddViaPointClick()}\n onKeyPress={e =>\n isKeyboardSelectionEvent(e) && this.handleAddViaPointClick()\n }\n aria-label={t('add-via-button-label', { lng })}\n >\n <Icon\n img=\"viapoint\"\n width={1.25}\n height={1.375}\n color={primary}\n />\n </ItinerarySearchControl>\n )}\n </div>\n </div>\n );\n }\n}\n\nconst DTAutosuggestPanelWithTranslation = withTranslation()(DTAutosuggestPanel);\n\nexport default props => {\n return (\n <I18nextProvider i18n={i18n}>\n <DTAutosuggestPanelWithTranslation {...props} />\n </I18nextProvider>\n );\n};\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nexport { _objectWithoutProperties as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","toPropertyKey","t","i","r","e","toPrimitive","call","TypeError","String","Number","_defineProperty","Object","defineProperty","value","enumerable","configurable","writable","styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Select","options","onSlackTimeSelected","viaPointIndex","id","label","icon","labelId","selectedItem","find","option","isOpen","getToggleButtonProps","getMenuProps","getItemProps","getLabelProps","highlightedIndex","useSelect","items","itemToString","item","displayName","onSelectedItemChange","newItem","React","className","styles","assign","cx","map","index","key","process","env","NODE_ENV","propTypes","PropTypes","number","isRequired","func","arrayOf","shape","string","node","i18n","createInstance","fallbackLng","resources","de","translation","en","fi","pl","sv","defaultNS","react","useSuspense","init","getEmptyViaPointPlaceHolder","isViaPointEmpty","viaPoint","undefined","isEmpty","keys","length","includes","ItinerarySearchControl","_ref","children","enabled","onClick","onKeyPress","wide","rest","n","hasOwnProperty","indexOf","objectWithoutPropertiesLoose","getOwnPropertySymbols","propertyIsEnumerable","_objectWithoutProperties","_excluded","role","tabIndex","updateViaPointSlack","activeViaPointSlacks","updatedViaPointIndex","viaPointRemoved","foundAtIndex","splice","isKeyboardSelectionEvent","event","which","keyCode","concat","preventDefault","location","address","gps","ready","getLocationType","bool","defaultProps","locationShape","lat","lon","locationSlack","DTAutosuggestPanel","Component","props","super","this","setState","prevState","refs","destination","state","focus","viaPoints","updateViaPoints","filter","vp","activeSlackInputs","slackTimeInSeconds","addAnalyticsEvent","action","category","name","parseInt","viaPointLocation","handleViaPointLocationSelected","push","reverse","swapOrder","slackInSeconds","lng","lang","render","origin","searchPanelText","searchContext","disableAutoFocus","originMobileLabel","destinationMobileLabel","fontWeights","onFocusChange","showSwapControl","showViapointControl","primary","colors","slackTime","timeOptions","valueInMinutes","getSlackTimeOptions","getViaPointSlackTimeOrDefault","defaultValue","isViaPointSlackTimeInputActive","isMobile","medium","DTAutoSuggest","appElement","autoFocus","storeRef","storeReference","refPoint","placeholder","originPlaceHolder","getAutoSuggestIcons","onSelect","onClear","focusChange","handleFocusChange","sources","targets","filterResults","mobileLabel","modeSet","showScroll","isEmbedded","opposite","handleSwapOrderClick","Icon","img","color","rectangle","ReactSortable","list","handle","animation","disabled","setList","newViaPoints","row","cursor","rotate","ariaLabel","handleViaPoints","showSlackControl","handleToggleViaPointSlackClick","getSlackDisplay","handleViaPointSlackTimeSelected","handleRemoveViaPointClick","isNaN","destinationPlaceHolder","more","handleAddViaPointClick","width","height","defaultColors","URL_PELIAS","objectOf","DTAutosuggestPanelWithTranslation","withTranslation","I18nextProvider"],"mappings":"8hCAAA,SAASA,EAAQC,GAGf,OAAOD,EAAU,mBAAqBE,QAAU,iBAAmBA,OAAOC,SAAW,SAAUF,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAK,mBAAqBC,QAAUD,EAAEG,cAAgBF,QAAUD,IAAMC,OAAOG,UAAY,gBAAkBJ,CACpH,EAAGD,EAAQC,EACb,CCNA,SAASK,EAAcC,GACrB,IAAIC,ECFN,SAAqBD,EAAGE,GACtB,GAAI,UAAYT,EAAQO,KAAOA,EAAG,OAAOA,EACzC,IAAIG,EAAIH,EAAEL,OAAOS,aACjB,QAAI,IAAWD,EAAG,CAChB,IAAIF,EAAIE,EAAEE,KAAKL,EAAGE,GAClB,GAAI,UAAYT,EAAQQ,GAAI,OAAOA,EACnC,MAAM,IAAIK,UAAU,+CACtB,CACA,OAAQ,WAAaJ,EAAIK,OAASC,QAAQR,EAC5C,CDPUI,CAAYJ,EAAG,UACvB,MAAO,UAAYP,EAAQQ,GAAKA,EAAIA,EAAI,EAC1C,CEJA,SAASQ,EAAgBN,EAAGD,EAAGF,GAC7B,OAAQE,EAAIH,EAAcG,MAAOC,EAAIO,OAAOC,eAAeR,EAAGD,EAAG,CAC/DU,MAAOZ,EACPa,YAAY,EACZC,cAAc,EACdC,UAAU,IACPZ,EAAED,GAAKF,EAAGG,CACjB,CCRA,SAASa,EAAYC,EAAKC,YAC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,EAAAA,QAAUM,QACrCoI,cAAe1I,EAAAA,QAAUG,KACzBsH,SAAUzH,EAAAA,QAAUiE,KACpByC,kBAAmB1G,EAAAA,QAAUM,OAC7BqG,uBAAwB3G,EAAAA,QAAUM,OAClC0H,SAAU7D,EACVyE,QAAS5I,EAAAA,QAAUM,OACnB2G,OAAQjH,EAAAA,QAAU8K,SAAS9K,EAAAA,QAAUM,QACrC6H,oBAAqBnI,EAAAA,QAAU8K,SAAS9K,EAAAA,QAAUG,MAClDyG,YAAa5G,EAAAA,QAAUK,MAAM,CAC3BqH,OAAQ1H,EAAAA,QAAUC,SAEpB4I,WAAY7I,EAAAA,QAAUiE,KACtB4C,cAAe7G,EAAAA,QAAUG,KACzB2I,WAAY9I,EAAAA,QAAUiE,KACtB6C,gBAAiB9G,EAAAA,QAAUiE,KAC3B8C,oBAAqB/G,EAAAA,QAAUiE,KAC/BgG,iBAAkBjK,EAAAA,QAAUiE,KAC5BrI,EAAGoE,EAAAA,QAAUG,KAAKD,aA6btB,MAAM6K,EAAoCC,EAAAA,iBAAAA,CAAkBzG,aAE7CE,GAEXrF,EAAAA,QAAAhC,cAAC6N,kBAAe,CAACzK,KAAMA,GACrBpB,UAAAhC,cAAC2N,EAAsCtG","x_google_ignoreList":[0,1,2,3,4,9,10]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../../../node_modules/style-inject/dist/style-inject.es.js","../src/helpers/Select.jsx","../src/helpers/translations.js","../src/helpers/i18n.js","../src/index.jsx","../../../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"],"sourcesContent":["function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport React from 'react';\nimport { useSelect } from 'downshift';\nimport styles from './select.scss';\n\nconst Select = ({\n value,\n options,\n onSlackTimeSelected,\n viaPointIndex,\n id,\n label,\n icon,\n}) => {\n const labelId = `${id}-label`;\n const selectedItem = options.find(option => option.value === value);\n\n const {\n isOpen,\n getToggleButtonProps,\n getMenuProps,\n getItemProps,\n getLabelProps,\n highlightedIndex,\n } = useSelect({\n selectedItem,\n items: options,\n labelId,\n id,\n itemToString: item => item.displayName,\n onSelectedItemChange: ({ selectedItem: newItem }) => {\n onSlackTimeSelected(newItem.value, viaPointIndex);\n },\n });\n\n return (\n <div className={styles['combobox-container']}>\n <div className={styles.container}>\n <div {...getToggleButtonProps()}>\n <span className={styles['left-column']}>\n <label {...getLabelProps()} className={styles['combobox-label']}>\n {label}\n </label>\n <div className={styles.input}>\n <span>{selectedItem.displayName}</span>\n </div>\n </span>\n {icon}\n </div>\n <ul\n className={cx([styles.suggestionsContainerOpen, !isOpen && 'hidden'])}\n {...getMenuProps()}\n >\n {isOpen &&\n options.map((option, index) => (\n <li\n key={option.value}\n className={cx([\n styles.suggestion,\n index === highlightedIndex && styles.suggestionHighlighted,\n ])}\n {...getItemProps({ index })}\n >\n <span>{option.displayName}</span>\n </li>\n ))}\n </ul>\n </div>\n </div>\n );\n};\n\nSelect.propTypes = {\n value: PropTypes.number.isRequired,\n onSlackTimeSelected: PropTypes.func.isRequired,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n displayName: PropTypes.string.isRequired,\n value: PropTypes.number.isRequired,\n }).isRequired,\n ).isRequired,\n id: PropTypes.string.isRequired,\n label: PropTypes.node.isRequired,\n icon: PropTypes.node.isRequired,\n viaPointIndex: PropTypes.number.isRequired,\n};\n\nexport default Select;\n","const translations = {\n de: {\n translation: {\n 'add-via-button-label': 'Füge Zwischenziel hinzu',\n 'add-via-duration-button-label':\n 'Setze Umsteigezeit für Zwischenziel {{index}}',\n 'add-via-duration-button-label-close':\n 'Schließe Umsteigezeit-Auswahl für Zwischenziel {{index}}',\n 'add-via-duration-button-label-open':\n 'Öffne Umsteigezeit-Auswahl für Zwischenziel {{index}}',\n 'minute-short': 'min',\n 'remove-via-button-label': 'Entferne Zwischenziel {{index}}',\n 'swap-order-button-label': 'Tausche Start mit Ziel',\n 'via-point': 'Zwischenziel',\n 'via-point-index': 'Zwischenziel {{index}}',\n 'viapoint-slack-amount': 'Umsteigezeit',\n },\n },\n en: {\n translation: {\n 'add-via-button-label': 'Add via point',\n 'add-via-duration-button-label':\n 'Set stop duration at via point {{index}}',\n 'add-via-duration-button-label-close':\n 'Close stop duration selector at via point {{index}}',\n 'add-via-duration-button-label-open':\n 'Open stop duration selector at via point {{index}}',\n 'minute-short': 'min',\n 'remove-via-button-label': 'Remove via point {{index}}',\n 'swap-order-button-label': 'Reverse origin and destination',\n 'via-point': 'Via point',\n 'via-point-index': 'Via point {{index}}',\n 'viapoint-slack-amount': 'Stop duration',\n },\n },\n fi: {\n translation: {\n 'add-via-button-label': 'Lisää välipiste',\n 'add-via-duration-button-label':\n 'Aseta välipisteelle {{index}} pysähdyksen kesto',\n 'add-via-duration-button-label-close':\n 'Avaa välipisteen {{index}} pysähdyksen kesto valitsin',\n 'add-via-duration-button-label-open':\n 'Sulje välipisteen {{index}} pysähdyksen kesto valitsin',\n 'minute-short': 'min',\n 'remove-via-button-label': 'Poista välipiste {{index}}',\n 'swap-order-button-label': 'Käännä reitin suunta vastakkaiseksi',\n 'via-point': 'Välipiste',\n 'via-point-index': 'Välipiste {{index}}',\n 'viapoint-slack-amount': 'Pysähdyksen kesto',\n },\n },\n pl: {\n translation: {\n 'add-via-button-label': 'Dodaj punkt pośredni',\n 'add-via-duration-button-label':\n 'Wybierz czas postoju dla punktu {{index}}',\n 'add-via-duration-button-label-close':\n 'Zamknij wybornik czasu postoju w punkcie {{index}}',\n 'add-via-duration-button-label-open':\n 'Otwórz wybornik czasu postoju w punkcie {{index}}',\n 'minute-short': 'min.',\n 'remove-via-button-label': 'Usuń punkt pośredni {{index}}',\n 'swap-order-button-label': 'Odwróć początek i cel',\n 'via-point': 'Punkt pośredni',\n 'via-point-index': 'Punkt pośredni {{index}}',\n 'viapoint-slack-amount': 'Czas postoju',\n },\n },\n sv: {\n translation: {\n 'add-via-button-label': 'Lägg till viapunkt',\n 'add-via-duration-button-label':\n 'Ställ in varaktighet för viapunkten {{index}}',\n 'add-via-duration-button-label-close':\n 'Stäng väljaren för varaktighet vid via-punkten {{index}}',\n 'add-via-duration-button-label-open':\n 'Öppna väljaren för varaktighet vid via-punkten {{index}}',\n 'minute-short': 'min',\n 'remove-via-button-label': 'Ta bort viapunkt {{index}}',\n 'swap-order-button-label': 'Sväng ruttens riktning till den motsatta',\n 'via-point': 'Via punkt',\n 'via-point-index': 'Via punkt {{index}}',\n 'viapoint-slack-amount': 'Stoppets varaktighet',\n },\n },\n};\n\nexport default translations;\n","import { createInstance } from 'i18next';\nimport translations from './translations';\n\nconst i18n = createInstance({\n fallbackLng: 'fi',\n // debug: true,\n resources: translations,\n defaultNS: 'translation',\n react: {\n useSuspense: true,\n },\n});\n\ni18n.init();\n\nexport default i18n;\n","/* eslint-disable import/no-extraneous-dependencies */\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { I18nextProvider, withTranslation } from 'react-i18next';\nimport { ReactSortable } from 'react-sortablejs';\nimport DTAutoSuggest from '@digitransit-component/digitransit-component-autosuggest';\nimport Icon, {\n defaultColors,\n} from '@digitransit-component/digitransit-component-icon';\nimport isEmpty from 'lodash/isEmpty';\nimport Select from './helpers/Select';\nimport i18n from './helpers/i18n';\nimport styles from './helpers/styles.scss';\n\nexport const getEmptyViaPointPlaceHolder = () => ({});\n\nconst isViaPointEmpty = viaPoint => {\n if (viaPoint === undefined || isEmpty(viaPoint)) {\n return true;\n }\n const keys = Object.keys(viaPoint);\n return (\n keys.length === 1 || (keys.length === 2 && keys.includes('locationSlack'))\n );\n};\n\nconst ItinerarySearchControl = ({\n children,\n className,\n enabled,\n onClick,\n onKeyPress,\n wide,\n ...rest\n}) => (\n <div\n className={styles['itinerary-search-control']}\n style={{ '--width': wide ? '47px' : '40px' }}\n >\n {onClick && enabled && (\n <div\n {...rest}\n className={className}\n onClick={onClick}\n onKeyPress={onKeyPress}\n role=\"button\"\n tabIndex=\"0\"\n >\n {children}\n </div>\n )}\n </div>\n);\n\nconst updateViaPointSlack = (\n activeViaPointSlacks,\n updatedViaPointIndex,\n viaPointRemoved = false,\n) => {\n const foundAtIndex = activeViaPointSlacks.indexOf(updatedViaPointIndex);\n if (foundAtIndex > -1) {\n activeViaPointSlacks.splice(foundAtIndex, 1);\n }\n return viaPointRemoved\n ? activeViaPointSlacks.map(value =>\n value > updatedViaPointIndex ? value - 1 : value,\n )\n : activeViaPointSlacks;\n};\n\nconst isKeyboardSelectionEvent = event => {\n const space = [13, ' ', 'Spacebar'];\n const enter = [32, 'Enter'];\n const key = (event && (event.key || event.which || event.keyCode)) || '';\n if (!key || !space.concat(enter).includes(key)) {\n return false;\n }\n event.preventDefault();\n return true;\n};\n\nconst value = location =>\n (location && location.address) ||\n (location && location.gps && location.ready && 'Nykyinen sijainti') ||\n '';\n\nconst getLocationType = location =>\n location && location.gps === true ? 'position' : 'location';\n\nconst getSlackTimeOptions = t => {\n const timeOptions = [];\n for (let i = 0; i <= 9; i++) {\n const valueInMinutes = i * 10;\n timeOptions.push({\n displayName: `${valueInMinutes} ${t('minute-short')}`,\n value: valueInMinutes * 60,\n });\n }\n return timeOptions;\n};\n\nItinerarySearchControl.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string.isRequired,\n enabled: PropTypes.bool.isRequired,\n onClick: PropTypes.func.isRequired,\n onKeyPress: PropTypes.func.isRequired,\n wide: PropTypes.bool,\n};\n\nItinerarySearchControl.defaultProps = {\n children: undefined,\n wide: false,\n};\n\n/**\n * Panel that renders two DTAutosuggest search fields, including viapoint handling\n *\n * @example\n * const searchContext = {\n * isPeliasLocationAware: false // true / false does Let Pelias suggest based on current user location\n * minimalRegexp: undefined // used for testing min. regexp. For example: new RegExp('.{2,}'),\n * lineRegexp: undefined // identify searches for route numbers/labels: bus | train | metro. For example: new RegExp(\n * // '(^[0-9]+[a-z]?$|^[yuleapinkrtdz]$|(^m[12]?b?$))',\n * // 'i',\n * // ),\n * URL_PELIAS: '' // url for pelias searches\n * feedIDs: ['HSL', 'HSLLautta'] // FeedId's like [HSL, HSLLautta]\n * geocodingSources: ['oa','osm','nlsfi'] // sources for geocoding\n * geocodingSearchParams; {} // Searchparmas fro geocoding\n * getFavouriteLocations: () => ({}), // Function that returns array of favourite locations.\n * getFavouriteStops: () => ({}), // Function that returns array of favourite stops.\n * getLanguage: () => ({}), // Function that returns current language.\n * getFavouriteRoutes: () => ({}), // Function that returns array of favourite routes.\n * getPositions: () => ({}), // Function that returns user's geolocation.\n * getRoutesQuery: () => ({}), // Function that returns query for fetching routes.\n * getStopAndStationsQuery: () => ({}), // Function that fetches favourite stops and stations from graphql API.\n * getFavouriteRoutesQuery: () => ({}), // Function that returns query for fetching favourite routes.\n * getFavouriteVehicleRentalStations: () => ({}), // Function that returns favourite bike rental station.\n * getFavouriteVehicleRentalStationsQuery: () => ({}), // Function that returns query for fetching favourite bike rental stations.\n * startLocationWatch: () => ({}), // Function that locates users geolocation.\n * saveSearch: () => ({}), // Function that saves search to old searches store.\n * clearOldSearches: () => ({}), // Function that clears old searches store.\n * getFutureRoutes: () => ({}), // Function that return future routes\n * saveFutureRoute: () => ({}), // Function that saves a future route\n * clearFutureRoutes: () => ({}), // Function that clears future routes\n * };\n *\n * const origin = {\n * lat: 60.169196,\n * lon: 24.957674,\n * address: 'Aleksanterinkatu, Helsinki',\n * set: true,\n * ready: true,\n * }\n *\n * const destination = {\n * lat: 60.199093,\n * lon: 24.940536,\n * address: 'Opastinsilta 6, Helsinki',\n * set: true,\n * ready: true,\n * }\n * onSelect(item, id) {\n * return null; // Define what to do when a suggestion is being selected. None by default.\n * }\n * onClear(id) {\n * return null; // Define what to do when a suggestion is being selected. None by default.\n * }\n * const getAutoSuggestIcons: {\n * // Called for every city bike station rendered as a search suggestion. Should return the icon and\n * // color used for that station. Two icons are available, 'citybike-stop-digitransit' anditybike-stop-digitransit-secondary'.\n * citybikes: station => {\n * return ['citybike-stop-digitransit', '#f2b62d'];\n * }\n * }\n * const targets = ['Locations', 'Stops', 'Routes']; // Defines what you are searching. all available options are Locations, Stops, Routes, VehicleRentalStations, FutureRoutes, MapPosition and CurrentPosition. Leave empty to search all targets.\n * const sources = ['Favourite', 'History', 'Datasource'] // Defines where you are searching. all available are: Favourite, History (previously searched searches), and Datasource. Leave empty to use all sources.\n * <DTAutosuggestPanel\n * appElement={appElement} // Required. Root element's id. Needed for react-modal component.\n * origin={origin} // Selected origin point\n * destination={destination} // Selected destination point\n * originPlaceHolder={'Give origin'} // Optional Give string shown initially inside origin search field\n * destinationPlaceHolder={'Give destination'} // Optional Give string shown initally inside destination search field\n * initialViaPoints={[]} // Optional. If showViapointControl is set to true, pass initial via points to the panel. Currently no default implementation is given.\n * updateViaPoints={() => return []} // Optional. If showViapointControl is set to true, define how to update your via point list with this function. Currenlty no default implementation is given.\n * swapOrder={() => return null} // Optional. If showSwapControl is set to true, define how to swap order of your points (origin, destination, viapoints). Currently no default implementation is given.\n * searchContext={searchContext}\n * getAutoSuggestIcons={getAutoSuggestIcons}\n * onSelect={this.onSelect}\n * onClear={this.onClear}\n * lang=\"fi\" // Define language fi sv or en.\n * addAnalyticsEvent={null} // Optional. you can record an analytics event if you wish. if passed, component will pass an category, action, name parameters to addAnalyticsEvent\n * disableAutoFocus={false} // Optional. use this to disable autofocus completely from DTAutosuggestPanel\n * sources={sources}\n * targets={targets}\n * isMobile // Optional. Defaults to false. Whether to use mobile search.\n * originMobileLabel=\"Origin label\" // Optional. Custom label text for origin field on mobile.\n * destinationMobileLabel=\"Destination label\" // Optional. Custom label text for destination field on mobile.\n * handleFocusChange={() => {}} // Optional. If defined overrides default onFocusChange behaviour\n * showSwapControl={false} // Optional.\n * showViapointControl={false} // Optional.\n */\n\nconst locationShape = PropTypes.shape({\n address: PropTypes.string,\n lat: PropTypes.number,\n lon: PropTypes.number,\n locationSlack: PropTypes.number,\n});\n\nclass DTAutosuggestPanel extends React.Component {\n static propTypes = {\n appElement: PropTypes.string.isRequired,\n origin: locationShape,\n destination: locationShape,\n originPlaceHolder: PropTypes.string,\n destinationPlaceHolder: PropTypes.string,\n viaPoints: PropTypes.arrayOf(locationShape),\n updateViaPoints: PropTypes.func,\n handleViaPointLocationSelected: PropTypes.func,\n swapOrder: PropTypes.func,\n searchPanelText: PropTypes.string,\n searchContext: PropTypes.shape({\n URL_PELIAS: PropTypes.string,\n }).isRequired,\n onSelect: PropTypes.func.isRequired,\n onClear: PropTypes.func,\n addAnalyticsEvent: PropTypes.func,\n lang: PropTypes.string.isRequired,\n disableAutoFocus: PropTypes.bool,\n sources: PropTypes.arrayOf(PropTypes.string),\n targets: PropTypes.arrayOf(PropTypes.string),\n filterResults: PropTypes.func,\n isMobile: PropTypes.bool,\n originMobileLabel: PropTypes.string,\n destinationMobileLabel: PropTypes.string,\n refPoint: locationShape,\n modeSet: PropTypes.string,\n colors: PropTypes.objectOf(PropTypes.string),\n getAutoSuggestIcons: PropTypes.objectOf(PropTypes.func),\n fontWeights: PropTypes.shape({\n medium: PropTypes.number,\n }),\n showScroll: PropTypes.bool,\n onFocusChange: PropTypes.func,\n isEmbedded: PropTypes.bool,\n showSwapControl: PropTypes.bool,\n showViapointControl: PropTypes.bool,\n showSlackControl: PropTypes.bool,\n t: PropTypes.func.isRequired,\n };\n\n static defaultProps = {\n origin: undefined,\n destination: undefined,\n viaPoints: [],\n originPlaceHolder: 'give-origin',\n destinationPlaceHolder: 'give-destination',\n swapOrder: undefined,\n updateViaPoints: () => {},\n searchPanelText: undefined,\n sources: [],\n targets: [],\n filterResults: undefined,\n onClear: undefined,\n getAutoSuggestIcons: undefined,\n refPoint: undefined,\n addAnalyticsEvent: undefined,\n disableAutoFocus: false,\n isMobile: false,\n handleViaPointLocationSelected: undefined,\n originMobileLabel: null,\n destinationMobileLabel: null,\n modeSet: undefined,\n colors: defaultColors,\n fontWeights: {\n medium: 500,\n },\n showScroll: false,\n onFocusChange: undefined,\n isEmbedded: false,\n showSwapControl: false,\n showViapointControl: false,\n showSlackControl: false,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n activeSlackInputs: [],\n refs: [],\n };\n }\n\n storeReference = ref => {\n this.setState(prevState => ({ refs: [...prevState.refs, ref] }));\n };\n\n handleFocusChange = () => {\n const { destination } = this.props;\n if (!destination || !destination.lat) {\n this.state.refs[1].focus();\n }\n };\n\n updateViaPoints = viaPoints => {\n if (viaPoints.length === 0) {\n this.props.updateViaPoints([]);\n return;\n }\n this.props.updateViaPoints(viaPoints.filter(vp => !isViaPointEmpty(vp)));\n };\n\n handleToggleViaPointSlackClick = viaPointIndex => {\n const { activeSlackInputs } = this.state;\n this.setState({\n activeSlackInputs: activeSlackInputs.includes(viaPointIndex)\n ? updateViaPointSlack(activeSlackInputs, viaPointIndex)\n : activeSlackInputs.concat([viaPointIndex]),\n });\n };\n\n handleViaPointSlackTimeSelected = (slackTimeInSeconds, i) => {\n if (this.props.addAnalyticsEvent) {\n this.props.addAnalyticsEvent({\n action: 'EditViaPointStopDuration',\n category: 'ItinerarySettings',\n name: slackTimeInSeconds / 60,\n });\n }\n const { viaPoints } = this.props;\n viaPoints[i].locationSlack = Number.parseInt(slackTimeInSeconds, 10);\n this.updateViaPoints(viaPoints);\n };\n\n handleViaPointLocationSelected = (viaPointLocation, i) => {\n this.props.handleViaPointLocationSelected(viaPointLocation, i);\n };\n\n handleRemoveViaPointClick = viaPointIndex => {\n if (this.props.addAnalyticsEvent) {\n this.props.addAnalyticsEvent({\n action: 'RemoveJourneyViaPoint',\n category: 'ItinerarySettings',\n name: null,\n });\n }\n const { activeSlackInputs } = this.state;\n const { viaPoints } = this.props;\n viaPoints.splice(viaPointIndex, 1);\n this.setState(\n {\n activeSlackInputs: updateViaPointSlack(\n activeSlackInputs,\n viaPointIndex,\n true,\n ),\n },\n () => this.updateViaPoints(viaPoints),\n );\n };\n\n handleAddViaPointClick = () => {\n if (this.props.addAnalyticsEvent) {\n this.props.addAnalyticsEvent({\n action: 'AddJourneyViaPoint',\n category: 'ItinerarySettings',\n name: 'QuickSettingsButton',\n });\n }\n const { viaPoints } = this.props;\n viaPoints.push(getEmptyViaPointPlaceHolder());\n // We need to update the state so that placeHolder will show up in panel.\n // eslint-disable-next-line react/no-access-state-in-setstate\n this.setState(this.state);\n };\n\n handleSwapOrderClick = () => {\n if (this.props.addAnalyticsEvent) {\n this.props.addAnalyticsEvent({\n action: 'SwitchJourneyStartAndEndPointOrder',\n category: 'ItinerarySettings',\n name: null,\n });\n }\n const { viaPoints } = this.props;\n viaPoints.reverse();\n this.props.swapOrder();\n };\n\n getSlackDisplay = slackInSeconds =>\n `${slackInSeconds / 60} ${this.props.t('minute-short', {\n lng: this.props.lang,\n })}`;\n\n render() {\n const {\n origin,\n searchPanelText,\n searchContext,\n disableAutoFocus,\n viaPoints,\n originMobileLabel,\n destinationMobileLabel,\n fontWeights,\n onFocusChange,\n showSwapControl,\n showViapointControl,\n t,\n lang: lng,\n } = this.props;\n const { primary } = this.props.colors;\n const { activeSlackInputs } = this.state;\n const slackTime = getSlackTimeOptions(t);\n const defaultSlackTimeValue = 0;\n const getViaPointSlackTimeOrDefault = (\n viaPoint,\n defaultValue = defaultSlackTimeValue,\n ) => (viaPoint && viaPoint.locationSlack) || defaultValue;\n const isViaPointSlackTimeInputActive = index =>\n activeSlackInputs.includes(index);\n return (\n <div\n className={cx([\n styles['autosuggest-panel'],\n {\n small: this.props.isMobile,\n },\n ])}\n style={{\n '--color': primary,\n '--font-weight-medium': fontWeights.medium,\n }}\n >\n {' '}\n {searchPanelText ? (\n <div>\n <h1 className={styles['autosuggest-searchpanel-text']}>\n {' '}\n {searchPanelText}\n </h1>\n </div>\n ) : null}\n <div className={styles['origin-input-container']}>\n <DTAutoSuggest\n appElement={this.props.appElement}\n icon=\"originEllipse\"\n id=\"origin\"\n autoFocus={\n disableAutoFocus === true\n ? false\n : !this.props.isMobile && !origin?.lat\n }\n storeRef={this.storeReference}\n refPoint={this.props.refPoint}\n className={getLocationType(origin)}\n placeholder={this.props.originPlaceHolder}\n value={value(origin)}\n searchContext={searchContext}\n getAutoSuggestIcons={this.props.getAutoSuggestIcons}\n onSelect={this.props.onSelect}\n onClear={this.props.onClear}\n focusChange={onFocusChange || this.handleFocusChange}\n lang={this.props.lang}\n sources={this.props.sources}\n targets={this.props.targets}\n filterResults={this.props.filterResults}\n isMobile={this.props.isMobile}\n colors={this.props.colors}\n mobileLabel={originMobileLabel}\n fontWeights={this.props.fontWeights}\n modeSet={this.props.modeSet}\n showScroll={this.props.showScroll}\n isEmbedded={this.props.isEmbedded}\n />\n {(showSwapControl || showViapointControl) && (\n <ItinerarySearchControl\n className={styles.opposite}\n enabled={showSwapControl}\n onClick={() => this.handleSwapOrderClick()}\n onKeyPress={e =>\n isKeyboardSelectionEvent(e) && this.handleSwapOrderClick()\n }\n aria-label={t('swap-order-button-label', { lng })}\n >\n <Icon img=\"opposite\" color={primary} />\n </ItinerarySearchControl>\n )}\n </div>\n {viaPoints.length === 0 && (\n <div className={styles['rectangle-container']}>\n <div className={styles.rectangle} />\n </div>\n )}\n <ReactSortable\n className={styles['viapoints-container']}\n list={viaPoints}\n handle={`.${styles['viapoint-before']}`}\n animation={200}\n disabled={viaPoints.length <= 1}\n setList={items => {\n const newViaPoints = items.filter(vp => !isViaPointEmpty(vp));\n if (newViaPoints.length > 0) {\n this.props.updateViaPoints(newViaPoints);\n }\n }}\n >\n {viaPoints.map((o, i) => (\n <div\n className={cx(styles['viapoint-container'])}\n key={`viapoint-${i}`} // eslint-disable-line\n >\n <div className={styles['light-gray-background']}>\n <div className={styles.row}>\n <div\n className={styles['viapoint-before']}\n style={viaPoints.length > 1 ? { cursor: 'move' } : {}}\n >\n {viaPoints.length > 1 && (\n <Icon img=\"ellipsis\" rotate={90} color={primary} />\n )}\n </div>\n <div\n className={cx(\n `${styles['viapoint-input-container']} ${\n styles[`viapoint-${i + 1}`]\n }`,\n )}\n >\n <DTAutoSuggest\n appElement={this.props.appElement}\n icon=\"mapMarker\"\n id=\"via-point\"\n ariaLabel={t('via-point-index', {\n index: i + 1,\n lng,\n })}\n autoFocus={\n disableAutoFocus === true ? false : !this.props.isMobile\n }\n placeholder=\"via-point\"\n className=\"viapoint\"\n searchContext={searchContext}\n refPoint={this.props.refPoint}\n value={(o && o.address) || ''}\n onSelect={this.props.onSelect}\n onClear={this.props.onClear}\n handleViaPoints={item =>\n this.handleViaPointLocationSelected(item, i)\n }\n lang={this.props.lang}\n sources={this.props.sources}\n targets={this.props.targets}\n filterResults={this.props.filterResults}\n getAutoSuggestIcons={this.props.getAutoSuggestIcons}\n isMobile={this.props.isMobile}\n fontWeights={this.props.fontWeights}\n modeSet={this.props.modeSet}\n colors={this.props.colors}\n showScroll={this.props.showScroll}\n />\n </div>\n {this.props.showSlackControl && (\n <ItinerarySearchControl\n className={styles['add-via-point-slack']}\n enabled={this.props.showViapointControl}\n onClick={() => this.handleToggleViaPointSlackClick(i)}\n onKeyPress={e =>\n isKeyboardSelectionEvent(e) &&\n this.handleToggleViaPointSlackClick(i)\n }\n aria-label={t(\n isViaPointSlackTimeInputActive(i)\n ? 'add-via-duration-button-label-open'\n : 'add-via-duration-button-label-close',\n { index: i + 1, lng },\n )}\n wide\n >\n <Icon img=\"time\" color={primary} />\n </ItinerarySearchControl>\n )}\n </div>\n {!isViaPointSlackTimeInputActive(i) &&\n viaPoints[i] &&\n viaPoints[i].locationSlack > 0 && (\n <span className={styles['viapoint-slack-time']}>{`${t(\n 'viapoint-slack-amount',\n {\n lng,\n },\n )}: ${this.getSlackDisplay(\n viaPoints[i].locationSlack,\n )}`}</span>\n )}\n <div\n className={cx(styles['input-viapoint-slack-container'], {\n collapsed: !isViaPointSlackTimeInputActive(i),\n })}\n >\n <div className={styles['select-wrapper']}>\n <Select\n id={`viapoint-slack-${i}`}\n label={t('viapoint-slack-amount', { lng })}\n options={slackTime}\n value={getViaPointSlackTimeOrDefault(viaPoints[i])}\n viaPointIndex={i}\n icon={\n <span\n className={`${styles['combobox-icon']} ${styles['time-input-icon']}`}\n >\n <Icon img=\"time\" color={primary} />\n </span>\n }\n onSlackTimeSelected={this.handleViaPointSlackTimeSelected}\n />\n </div>\n </div>\n </div>\n <ItinerarySearchControl\n className={styles['remove-via-point']}\n enabled={this.props.showViapointControl}\n onClick={() => this.handleRemoveViaPointClick(i)}\n onKeyPress={e =>\n isKeyboardSelectionEvent(e) &&\n this.handleRemoveViaPointClick(i)\n }\n aria-label={t('remove-via-button-label', {\n index: i + 1,\n lng,\n })}\n >\n <Icon img=\"trash\" color={primary} />\n </ItinerarySearchControl>\n </div>\n ))}\n </ReactSortable>\n <div className={styles['destination-input-container']}>\n <DTAutoSuggest\n appElement={this.props.appElement}\n icon=\"mapMarker\"\n id=\"destination\"\n autoFocus={\n disableAutoFocus === true\n ? false\n : !this.props.isMobile && !Number.isNaN(origin?.lat)\n }\n storeRef={this.storeReference}\n placeholder={this.props.destinationPlaceHolder}\n className={getLocationType(this.props.destination)}\n getAutoSuggestIcons={this.props.getAutoSuggestIcons}\n searchContext={searchContext}\n onSelect={this.props.onSelect}\n onClear={this.props.onClear}\n refPoint={this.props.refPoint}\n value={value(this.props.destination)}\n lang={this.props.lang}\n sources={this.props.sources}\n targets={this.props.targets}\n filterResults={this.props.filterResults}\n isMobile={this.props.isMobile}\n mobileLabel={destinationMobileLabel}\n fontWeights={this.props.fontWeights}\n modeSet={this.props.modeSet}\n colors={this.props.colors}\n showScroll={this.props.showScroll}\n isEmbedded={this.props.isEmbedded}\n />\n {(showSwapControl || showViapointControl) && (\n <ItinerarySearchControl\n className={cx(styles['add-via-point'], styles.more, {\n collapsed: viaPoints.length > 4,\n })}\n enabled={showViapointControl && viaPoints.length === 0}\n onClick={() => this.handleAddViaPointClick()}\n onKeyPress={e =>\n isKeyboardSelectionEvent(e) && this.handleAddViaPointClick()\n }\n aria-label={t('add-via-button-label', { lng })}\n >\n <Icon\n img=\"viapoint\"\n width={1.25}\n height={1.375}\n color={primary}\n />\n </ItinerarySearchControl>\n )}\n </div>\n </div>\n );\n }\n}\n\nconst DTAutosuggestPanelWithTranslation = withTranslation()(DTAutosuggestPanel);\n\nexport default props => {\n return (\n <I18nextProvider i18n={i18n}>\n <DTAutosuggestPanelWithTranslation {...props} />\n </I18nextProvider>\n );\n};\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nexport { _objectWithoutProperties as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","toPropertyKey","t","i","r","e","toPrimitive","call","TypeError","String","Number","_defineProperty","Object","defineProperty","value","enumerable","configurable","writable","styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Select","options","onSlackTimeSelected","viaPointIndex","id","label","icon","labelId","selectedItem","find","option","isOpen","getToggleButtonProps","getMenuProps","getItemProps","getLabelProps","highlightedIndex","useSelect","items","itemToString","item","displayName","onSelectedItemChange","newItem","React","className","styles","assign","cx","map","index","key","process","env","NODE_ENV","propTypes","PropTypes","number","isRequired","func","arrayOf","shape","string","node","i18n","createInstance","fallbackLng","resources","de","translation","en","fi","pl","sv","defaultNS","react","useSuspense","init","getEmptyViaPointPlaceHolder","isViaPointEmpty","viaPoint","undefined","isEmpty","keys","length","includes","ItinerarySearchControl","_ref","children","enabled","onClick","onKeyPress","wide","rest","n","hasOwnProperty","indexOf","objectWithoutPropertiesLoose","getOwnPropertySymbols","propertyIsEnumerable","_objectWithoutProperties","_excluded","role","tabIndex","updateViaPointSlack","activeViaPointSlacks","updatedViaPointIndex","viaPointRemoved","foundAtIndex","splice","isKeyboardSelectionEvent","event","which","keyCode","concat","preventDefault","location","address","gps","ready","getLocationType","bool","defaultProps","locationShape","lat","lon","locationSlack","DTAutosuggestPanel","Component","props","super","this","setState","prevState","refs","destination","state","focus","viaPoints","updateViaPoints","filter","vp","activeSlackInputs","slackTimeInSeconds","addAnalyticsEvent","action","category","name","parseInt","viaPointLocation","handleViaPointLocationSelected","push","reverse","swapOrder","slackInSeconds","lng","lang","render","origin","searchPanelText","searchContext","disableAutoFocus","originMobileLabel","destinationMobileLabel","fontWeights","onFocusChange","showSwapControl","showViapointControl","primary","colors","slackTime","timeOptions","valueInMinutes","getSlackTimeOptions","getViaPointSlackTimeOrDefault","defaultValue","isViaPointSlackTimeInputActive","isMobile","medium","DTAutoSuggest","appElement","autoFocus","storeRef","storeReference","refPoint","placeholder","originPlaceHolder","getAutoSuggestIcons","onSelect","onClear","focusChange","handleFocusChange","sources","targets","filterResults","mobileLabel","modeSet","showScroll","isEmbedded","opposite","handleSwapOrderClick","Icon","img","color","rectangle","ReactSortable","list","handle","animation","disabled","setList","newViaPoints","row","cursor","rotate","ariaLabel","handleViaPoints","showSlackControl","handleToggleViaPointSlackClick","getSlackDisplay","handleViaPointSlackTimeSelected","handleRemoveViaPointClick","isNaN","destinationPlaceHolder","more","handleAddViaPointClick","width","height","defaultColors","URL_PELIAS","objectOf","DTAutosuggestPanelWithTranslation","withTranslation","I18nextProvider"],"mappings":"8hCAAA,SAASA,EAAQC,GAGf,OAAOD,EAAU,mBAAqBE,QAAU,iBAAmBA,OAAOC,SAAW,SAAUF,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAK,mBAAqBC,QAAUD,EAAEG,cAAgBF,QAAUD,IAAMC,OAAOG,UAAY,gBAAkBJ,CACpH,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