diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 7c7c703b1..000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: Question -about: Ask a question about OSRM -labels: question ---- diff --git a/.github/workflows/osrm-backend.yml b/.github/workflows/osrm-backend.yml index fb29e5cb8..f338e05fb 100644 --- a/.github/workflows/osrm-backend.yml +++ b/.github/workflows/osrm-backend.yml @@ -34,7 +34,7 @@ jobs: - run: cmake --version - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - run: node --version - run: npm --version - name: Prepare environment @@ -71,13 +71,13 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} format-taginfo-docs: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Enable Node.js cache uses: actions/cache@v3 with: @@ -88,7 +88,7 @@ jobs: - name: Prepare environment run: | npm ci --ignore-scripts - clang-format-10 --version + clang-format-15 --version - name: Run checks run: | ./scripts/check_taginfo.py taginfo.json profiles/car.lua @@ -147,7 +147,7 @@ jobs: include: - name: gcc-9-debug-cov continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Debug @@ -158,7 +158,7 @@ jobs: - name: gcc-9-debug-asan-ubsan continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Debug @@ -172,7 +172,7 @@ jobs: - name: clang-6.0-debug continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Debug @@ -182,7 +182,7 @@ jobs: - name: clang-15.0-debug-clang-tidy continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-22.04 BUILD_TOOLS: ON BUILD_TYPE: Debug @@ -193,7 +193,7 @@ jobs: - name: conan-linux-debug-asan-ubsan continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Release @@ -204,7 +204,7 @@ jobs: - name: conan-linux-release continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Release @@ -214,7 +214,7 @@ jobs: - name: gcc-12-release continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-22.04 BUILD_TOOLS: ON BUILD_TYPE: Release @@ -225,7 +225,7 @@ jobs: - name: gcc-11-release continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Release @@ -235,7 +235,7 @@ jobs: - name: gcc-10-release continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Release @@ -244,7 +244,7 @@ jobs: - name: gcc-9-release continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Release @@ -254,7 +254,7 @@ jobs: - name: gcc-9-conan-release-i686 continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Release @@ -267,7 +267,7 @@ jobs: - name: gcc-8-release continue-on-error: false - node: 16 + node: 18 runs-on: ubuntu-20.04 BUILD_TOOLS: ON BUILD_TYPE: Release @@ -278,7 +278,7 @@ jobs: - name: conan-linux-release-node build_node_package: true continue-on-error: false - node: 18 + node: 20 runs-on: ubuntu-20.04 BUILD_TYPE: Release CCOMPILER: clang-6.0 @@ -289,7 +289,7 @@ jobs: - name: conan-linux-debug-node build_node_package: true continue-on-error: false - node: 18 + node: 20 runs-on: ubuntu-20.04 BUILD_TYPE: Debug CCOMPILER: clang-6.0 @@ -300,7 +300,7 @@ jobs: - name: conan-macos-x64-release-node build_node_package: true continue-on-error: true - node: 18 + node: 20 runs-on: macos-11 BUILD_TYPE: Release CCOMPILER: clang @@ -312,7 +312,7 @@ jobs: - name: conan-macos-arm64-release-node build_node_package: true continue-on-error: true - node: 18 + node: 20 runs-on: macos-11 BUILD_TYPE: Release CCOMPILER: clang @@ -369,9 +369,9 @@ jobs: uses: actions/cache@v3 with: path: ~/.conan - key: v6-conan-${{ matrix.name }}-${{ github.sha }} + key: v7-conan-${{ matrix.name }}-${{ github.sha }} restore-keys: | - v6-conan-${{ matrix.name }}- + v7-conan-${{ matrix.name }}- - name: Enable test cache uses: actions/cache@v3 with: @@ -462,6 +462,12 @@ jobs: fi echo "CC=${CCOMPILER}" >> $GITHUB_ENV echo "CXX=${CXXCOMPILER}" >> $GITHUB_ENV + if [[ "${RUNNER_OS}" == "macOS" ]]; then + # missing from GCC path, needed for conan builds of libiconv, for example. + sudo xcode-select --switch /Library/Developer/CommandLineTools + echo "LIBRARY_PATH=${LIBRARY_PATH}:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" >> $GITHUB_ENV + echo "CPATH=${CPATH}:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" >> $GITHUB_ENV + fi - name: Build and install OSRM run: | @@ -541,16 +547,6 @@ jobs: ./src/benchmarks/rtree-bench ../test/data/monaco.osrm.ramIndex ../test/data/monaco.osrm.fileIndex ../test/data/monaco.osrm.nbg_nodes popd - - name: Use Node 16 - if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' && matrix.ENABLE_APPLE_SILICON != 'ON' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: Run Node package tests on Node 16 - if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' && matrix.ENABLE_APPLE_SILICON != 'ON' }} - run: | - node --version - npm run nodejs-tests - name: Use Node 18 if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' && matrix.ENABLE_APPLE_SILICON != 'ON' }} uses: actions/setup-node@v3 @@ -561,6 +557,16 @@ jobs: run: | node --version npm run nodejs-tests + - name: Use Node 20 + if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' && matrix.ENABLE_APPLE_SILICON != 'ON' }} + uses: actions/setup-node@v3 + with: + node-version: 20 + - name: Run Node package tests on Node 20 + if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' && matrix.ENABLE_APPLE_SILICON != 'ON' }} + run: | + node --version + npm run nodejs-tests - name: Use Node latest if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' && matrix.ENABLE_APPLE_SILICON != 'ON' }} uses: actions/setup-node@v3 @@ -585,15 +591,16 @@ jobs: lcov --directory . --capture --output-file coverage.info # capture coverage info lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system lcov --list coverage.info #debug info - # Uploading report to CodeCov - - name: Upload code coverage - if: ${{ matrix.ENABLE_COVERAGE == 'ON' }} - uses: codecov/codecov-action@v1 - with: - files: coverage.info - name: codecov-osrm-backend - fail_ci_if_error: true - verbose: true + + # # Uploading report to CodeCov + # - name: Upload code coverage + # if: ${{ matrix.ENABLE_COVERAGE == 'ON' }} + # uses: codecov/codecov-action@v1 + # with: + # files: coverage.info + # name: codecov-osrm-backend + # fail_ci_if_error: true + # verbose: true - name: Check Apple Silicon binary if: ${{ matrix.ENABLE_APPLE_SILICON == 'ON' }} run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a4430434..8d0e2ceba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,27 @@ # Unreleased - Changes from 5.27.1 - Features + - ADDED: Add support for a keepalive_timeout flag. [#6674](https://github.com/Project-OSRM/osrm-backend/pull/6674) - ADDED: Add support for a default_radius flag. [#6575](https://github.com/Project-OSRM/osrm-backend/pull/6575) + - ADDED: Add support for disabling feature datasets. [#6666](https://github.com/Project-OSRM/osrm-backend/pull/6666) + - ADDED: Add support for opposite approach request parameter. [#6842](https://github.com/Project-OSRM/osrm-backend/pull/6842) + - ADDED: Add support for accessing edge flags in `process_segment` [#6658](https://github.com/Project-OSRM/osrm-backend/pull/6658) - Build: - ADDED: Add CI job which builds OSRM with gcc 12. [#6455](https://github.com/Project-OSRM/osrm-backend/pull/6455) - CHANGED: Upgrade to clang-tidy 15. [#6439](https://github.com/Project-OSRM/osrm-backend/pull/6439) - CHANGED: Update actions/cache to v3. [#6420](https://github.com/Project-OSRM/osrm-backend/pull/6420) - REMOVED: Drop support of Node 12 & 14. [#6431](https://github.com/Project-OSRM/osrm-backend/pull/6431) + - ADDED: Add 'load directly' mode to default Cucumber test suite. [#6663](https://github.com/Project-OSRM/osrm-backend/pull/6663) + - CHANGED: Drop support for Node 16 [#6855](https://github.com/Project-OSRM/osrm-backend/pull/6855) + - REMOVED: Remove unused AppVeyor files [#6860](https://github.com/Project-OSRM/osrm-backend/pull/6860) + - CHANGED: Upgrade clang-format to version 15 [#6859](https://github.com/Project-OSRM/osrm-backend/pull/6859) - NodeJS: - CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452) - Misc: - FIXED: Partial fix migration from boost::optional to std::optional [#6551](https://github.com/Project-OSRM/osrm-backend/issues/6551), see also [#6592](https://github.com/Project-OSRM/osrm-backend/issues/6592) + - FIXED: Fix an error in a RouteParameters AnnotationsType operator overload. [#6646](https://github.com/Project-OSRM/osrm-backend/pull/6646) + - ADDED: Add support for "unlimited" to be passed as a value for the default-radius and max-matching-radius flags. [#6599](https://github.com/Project-OSRM/osrm-backend/pull/6599) + - CHANGED: Allow -1.0 as unlimited for default_radius value. [#6599](https://github.com/Project-OSRM/osrm-backend/pull/6599) - CHANGED: keep libosrm* in the docker image for downstream linking [#6602](https://github.com/Project-OSRM/osrm-backend/pull/6602) - CHANGED: Move vector in CSVFilesParser instead copying it. [#6470](https://github.com/Project-OSRM/osrm-backend/pull/6470) - REMOVED: Get rid of unused functions in util/json_util.hpp. [#6446](https://github.com/Project-OSRM/osrm-backend/pull/6446) @@ -24,8 +35,19 @@ - CHANGED: Replace boost::string_ref with std::string_view [#6433](https://github.com/Project-OSRM/osrm-backend/pull/6433) - ADDED: Print tracebacks for Lua runtime errors [#6564](https://github.com/Project-OSRM/osrm-backend/pull/6564) - FIXED: Added a variable to preprocessor guard in file osrm-backend/include/util/range_table.hpp to solve build error. [#6596](https://github.com/Project-OSRM/osrm-backend/pull/6596) + - FIXED: Ensure required file check in osrm-routed is correctly enforced. [#6655](https://github.com/Project-OSRM/osrm-backend/pull/6655) + - FIXED: Correct HTTP docs to reflect summary output dependency on steps parameter. [#6655](https://github.com/Project-OSRM/osrm-backend/pull/6655) + - ADDED: Extract prerelease/build information from package semver [#6839](https://github.com/Project-OSRM/osrm-backend/pull/6839) + - Profiles: + - FIXED: Bicycle and foot profiles now don't route on proposed ways [#6615](https://github.com/Project-OSRM/osrm-backend/pull/6615) - Routing: - FIXED: Fix adding traffic signal penalties during compression [#6419](https://github.com/Project-OSRM/osrm-backend/pull/6419) + - FIXED: Correctly handle compressed traffic signals. [#6724](https://github.com/Project-OSRM/osrm-backend/pull/6724) + - FIXED: Fix bug when searching for maneuver overrides [#6739](https://github.com/Project-OSRM/osrm-backend/pull/6739) + - FIXED: Remove force-loop checks for routes with u-turns [#6858](https://github.com/Project-OSRM/osrm-backend/pull/6858) + - Debug tiles: + - FIXED: Ensure speed layer features have unique ids. [#6726](https://github.com/Project-OSRM/osrm-backend/pull/6726) + # 5.27.1 - Changes from 5.27.0 - Misc: diff --git a/CMakeLists.txt b/CMakeLists.txt index 64658d988..cc495639c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,9 +49,6 @@ endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # be compatible with version handling before cmake 3.x -if (POLICY CMP0048) - cmake_policy(SET CMP0048 OLD) -endif() if (POLICY CMP0057) cmake_policy(SET CMP0057 NEW) endif() @@ -73,14 +70,17 @@ include(JSONParser) file(READ "package.json" packagejsonraw) sbeParseJson(packagejson packagejsonraw) -if (packagejson.version MATCHES "^([0-9]+)\.([0-9]+)\.([0-9]+)") - set(OSRM_VERSION_MAJOR ${CMAKE_MATCH_1}) - set(OSRM_VERSION_MINOR ${CMAKE_MATCH_2}) - set(OSRM_VERSION_PATCH ${CMAKE_MATCH_3}) +# This regex is not strict enough, but the correct one is too complicated for cmake matching. +# https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string +if (packagejson.version MATCHES "^([0-9]+)\.([0-9]+)\.([0-9]+)([-+][0-9a-zA-Z.-]+)?$") + set(OSRM_VERSION_MAJOR ${CMAKE_MATCH_1}) + set(OSRM_VERSION_MINOR ${CMAKE_MATCH_2}) + set(OSRM_VERSION_PATCH ${CMAKE_MATCH_3}) + set(OSRM_VERSION_PRERELEASE_BUILD ${CMAKE_MATCH_4}) - set(OSRM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}") + set(OSRM_VERSION packagejson.version) else() - message(FATAL_ERROR "Version from package.json cannot be parsed, expected semver compatible X.Y.Z, but found ${packagejson.version}") + message(FATAL_ERROR "Version from package.json cannot be parsed, expected semver compatible label, but found ${packagejson.version}") endif() if (MSVC) @@ -151,7 +151,7 @@ add_library(UPDATER OBJECT ${UpdaterGlob}) add_library(STORAGE OBJECT ${StorageGlob}) add_library(ENGINE OBJECT ${EngineGlob}) -if (BUILD_ROUTED) +if (BUILD_ROUTED) add_library(SERVER OBJECT ${ServerGlob}) add_executable(osrm-routed src/tools/routed.cpp $ $) endif() @@ -275,7 +275,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") endif() if(UNIX AND NOT APPLE) - set(MAYBE_RT_LIBRARY -lrt) + find_library(RT_LIB rt) + if (RT_LIB) + set(MAYBE_RT_LIBRARY -lrt) + endif() endif() find_package(Threads REQUIRED) @@ -309,7 +312,7 @@ add_subdirectory(${FLATBUFFERS_SRC_DIR} set(FMT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/fmt-9.1.0/include") add_compile_definitions(FMT_HEADER_ONLY) include_directories(SYSTEM ${FMT_INCLUDE_DIR}) - + # see https://stackoverflow.com/questions/70898030/boost-link-error-using-conan-find-package if (MSVC) @@ -319,22 +322,24 @@ endif() if(ENABLE_CONAN) message(STATUS "Installing dependencies via Conan") - # Conan will generate Find*.cmake files to build directory, so we use them with the highest priority + # Conan will generate Find*.cmake files to build directory, so we use them with the highest priority list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_BINARY_DIR}) list(INSERT CMAKE_PREFIX_PATH 0 ${CMAKE_BINARY_DIR}) include(${CMAKE_CURRENT_LIST_DIR}/cmake/conan.cmake) - set(CONAN_BOOST_VERSION "1.79.0#96e4902111a2e343a8ba0aa95391bb58") - set(CONAN_BZIP2_VERSION "1.0.8#d1b2d5816f25865acf978501dff1f897") - set(CONAN_EXPAT_VERSION "2.2.10#916908d4a570ad839edd25322c3268cd") - set(CONAN_LUA_VERSION "5.4.4#3ec62efc37cd0a5d80b9e5cb35277360") - set(CONAN_TBB_VERSION "2021.3.0#507ec17cbd51a84167e143b20d170eea") - + conan_check(REQUIRED) + + set(CONAN_BOOST_VERSION "1.79.0@#96e4902111a2e343a8ba0aa95391bb58") + set(CONAN_BZIP2_VERSION "1.0.8@#d1b2d5816f25865acf978501dff1f897") + set(CONAN_EXPAT_VERSION "2.2.10@#916908d4a570ad839edd25322c3268cd") + set(CONAN_LUA_VERSION "5.4.4@#3ec62efc37cd0a5d80b9e5cb35277360") + set(CONAN_TBB_VERSION "2021.3.0@#507ec17cbd51a84167e143b20d170eea") + set(CONAN_SYSTEM_INCLUDES ON) - # TODO: - # if we link TBB dynamically osrm-extract.exe finishes on the first access to any TBB symbol + # TODO: + # if we link TBB dynamically osrm-extract.exe finishes on the first access to any TBB symbol # with exit code = -1073741515, which means that program cannot load required DLL. if (MSVC) set(TBB_SHARED False) @@ -342,14 +347,14 @@ if(ENABLE_CONAN) set(TBB_SHARED True) endif() - set(CONAN_ARGS - REQUIRES + set(CONAN_ARGS + REQUIRES "boost/${CONAN_BOOST_VERSION}" "bzip2/${CONAN_BZIP2_VERSION}" "expat/${CONAN_EXPAT_VERSION}" "lua/${CONAN_LUA_VERSION}" "onetbb/${CONAN_TBB_VERSION}" - BASIC_SETUP + BASIC_SETUP GENERATORS cmake_find_package json # json generator generates a conanbuildinfo.json in the build folder so (non-CMake) projects can easily parse OSRM's dependencies KEEP_RPATHS NO_OUTPUT_DIRS @@ -358,6 +363,13 @@ if(ENABLE_CONAN) boost:without_stacktrace=True # Apple Silicon cross-compilation fails without it BUILD missing ) + + # Enable revisions in the conan config + execute_process(COMMAND ${CONAN_CMD} config set general.revisions_enabled=1 RESULT_VARIABLE RET_CODE) + if(NOT "${RET_CODE}" STREQUAL "0") + message(FATAL_ERROR "Error setting revisions for Conan: '${RET_CODE}'") + endif() + # explicitly say Conan to use x86 dependencies if build for x86 platforms (https://github.com/conan-io/cmake-conan/issues/141) if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) conan_cmake_run("${CONAN_ARGS};ARCH;x86") @@ -386,7 +398,7 @@ if(ENABLE_CONAN) set(Boost_ZLIB_LIBRARY "${Boost_zlib_LIB_TARGETS}") set(Boost_REGEX_LIBRARY "${Boost_regex_LIB_TARGETS}") set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY "${Boost_unit_test_framework_LIB_TARGETS}") - + find_package(BZip2 REQUIRED) find_package(EXPAT REQUIRED) @@ -459,6 +471,9 @@ add_dependency_defines(-DBOOST_SPIRIT_USE_PHOENIX_V3) add_dependency_defines(-DBOOST_RESULT_OF_USE_DECLTYPE) add_dependency_defines(-DBOOST_FILESYSTEM_NO_DEPRECATED) +# Workaround for https://github.com/boostorg/phoenix/issues/111 +add_dependency_defines(-DBOOST_PHOENIX_STL_TUPLE_H_) + add_definitions(${OSRM_DEFINES}) include_directories(SYSTEM ${DEPENDENCIES_INCLUDE_DIRS}) @@ -636,6 +651,10 @@ install(TARGETS osrm_guidance DESTINATION lib) set(DefaultProfilesDir profiles) install(DIRECTORY ${DefaultProfilesDir} DESTINATION share/osrm) +# Install data geojson files to /usr/local/share/osrm/data by default +set(DefaultProfilesDir data) +install(DIRECTORY ${DefaultProfilesDir} DESTINATION share/osrm) + # Setup exporting variables for pkgconfig and subproject # @@ -730,23 +749,23 @@ if (ENABLE_FUZZING) add_subdirectory(fuzz) endif () -# add headers sanity check target that includes all headers independently -set(check_headers_dir "${PROJECT_BINARY_DIR}/check-headers") -file(GLOB_RECURSE headers_to_check - ${PROJECT_BINARY_DIR}/*.hpp - ${PROJECT_SOURCE_DIR}/include/*.hpp) -foreach(header ${headers_to_check}) +# add headers sanity check target that includes all headers independently +set(check_headers_dir "${PROJECT_BINARY_DIR}/check-headers") +file(GLOB_RECURSE headers_to_check + ${PROJECT_BINARY_DIR}/*.hpp + ${PROJECT_SOURCE_DIR}/include/*.hpp) +foreach(header ${headers_to_check}) if ("${header}" MATCHES ".*/include/nodejs/.*") # we do not check NodeJS bindings headers continue() endif() - get_filename_component(filename ${header} NAME_WE) - set(filename "${check_headers_dir}/${filename}.cpp") - if (NOT EXISTS ${filename}) - file(WRITE ${filename} "#include \"${header}\"\n") - endif() - list(APPEND sources ${filename}) -endforeach() -add_library(check-headers STATIC EXCLUDE_FROM_ALL ${sources}) -set_target_properties(check-headers PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${check_headers_dir}) + get_filename_component(filename ${header} NAME_WE) + set(filename "${check_headers_dir}/${filename}.cpp") + if (NOT EXISTS ${filename}) + file(WRITE ${filename} "#include \"${header}\"\n") + endif() + list(APPEND sources ${filename}) +endforeach() +add_library(check-headers STATIC EXCLUDE_FROM_ALL ${sources}) +set_target_properties(check-headers PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${check_headers_dir}) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 30b697e55..2b01a4a77 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ You can add a :+1: emoji reaction to the issue if you want to express interest i # Developer -We use `clang-format` version `3.8` to consistently format the code base. There is a helper script under `scripts/format.sh`. +We use `clang-format` version `15` to consistently format the code base. There is a helper script under `scripts/format.sh`. The format is automatically checked by the `mason-linux-release` job of a Travis CI build. To save development time a local hook `.git/hooks/pre-push` ``` diff --git a/README.md b/README.md index 801130ca9..afe4940c0 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ For a quick introduction about how the road network is represented in OpenStreet Related [Project-OSRM](https://github.com/Project-OSRM) repositories: - [osrm-frontend](https://github.com/Project-OSRM/osrm-frontend) - User-facing frontend with map. The demo server runs this on top of the backend - [osrm-text-instructions](https://github.com/Project-OSRM/osrm-text-instructions) - Text instructions from OSRM route response -- [osrm-backend-docker](https://hub.docker.com/r/osrm/osrm-backend/) - Ready to use Docker images +- [osrm-backend-docker](https://github.com/project-osrm/osrm-backend/pkgs/container/osrm-backend) - Ready to use Docker images ## Documentation @@ -58,12 +58,12 @@ Download OpenStreetMap extracts for example from [Geofabrik](http://download.geo Pre-process the extract with the car profile and start a routing engine HTTP server on port 5000 - docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf || "osrm-extract failed" + docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf || echo "osrm-extract failed" The flag `-v "${PWD}:/data"` creates the directory `/data` inside the docker container and makes the current working directory `"${PWD}"` available there. The file `/data/berlin-latest.osm.pbf` inside the container is referring to `"${PWD}/berlin-latest.osm.pbf"` on the host. - docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-partition /data/berlin-latest.osrm || "osrm-partition failed" - docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-customize /data/berlin-latest.osrm || "osrm-customize failed" + docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-partition /data/berlin-latest.osrm || echo "osrm-partition failed" + docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-customize /data/berlin-latest.osrm || echo "osrm-customize failed" Note there is no `berlin-latest.osrm` file, but multiple `berlin-latest.osrm.*` files, i.e. `berlin-latest.osrm` is not file path, but "base" path referring to set of files and there is an option to omit this `.osrm` suffix completely(e.g. `osrm-partition /data/berlin-latest`). diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index a1849a9e7..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,15 +0,0 @@ -os: Visual Studio 2019 - -# clone directory -clone_folder: c:\projects\osrm - -platform: x64 - -# no-op for the time being until someone with access to GitHub checks settings will remove integration with AppVeyor -# https://github.com/Project-OSRM/osrm-backend/pull/6312#issuecomment-1217237055 -build_script: - - EXIT 0 - -branches: - only: - - master diff --git a/build-local.bat b/build-local.bat deleted file mode 100644 index dad1d25c5..000000000 --- a/build-local.bat +++ /dev/null @@ -1,32 +0,0 @@ -@ECHO OFF -SETLOCAL -SET EL=0 - -ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -SET PLATFORM=x64 -SET CONFIGURATION=Release -::SET LOCAL_DEV=1 - -FOR /F "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do SET APPVEYOR_REPO_BRANCH=%%i -ECHO APPVEYOR_REPO_BRANCH^: %APPVEYOR_REPO_BRANCH% - -SET PATH=C:\Program Files\7-Zip;%PATH% - -powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force -IF %ERRORLEVEL% NEQ 0 GOTO ERROR -CALL appveyor-build.bat -IF %ERRORLEVEL% NEQ 0 GOTO ERROR - -GOTO DONE - - -:ERROR -ECHO ~~~~~~~~~~~~~~~~~~~~~~ ERROR %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -ECHO ERRORLEVEL^: %ERRORLEVEL% -SET EL=%ERRORLEVEL% - -:DONE -ECHO ~~~~~~~~~~~~~~~~~~~~~~ DONE %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -EXIT /b %EL% diff --git a/cucumber.js b/cucumber.js index 288e3ba5a..9cec41175 100644 --- a/cucumber.js +++ b/cucumber.js @@ -1,6 +1,6 @@ module.exports = { - default: '--strict --tags ~@stress --tags ~@todo --tags ~@mld-only --require features/support --require features/step_definitions', - verify: '--strict --tags ~@stress --tags ~@todo --tags ~@mld-only -f progress --require features/support --require features/step_definitions', + default: '--strict --tags ~@stress --tags ~@todo --tags ~@mld --require features/support --require features/step_definitions', + ch: '--strict --tags ~@stress --tags ~@todo --tags ~@mld -f progress --require features/support --require features/step_definitions', todo: '--strict --tags @todo --require features/support --require features/step_definitions', all: '--strict --require features/support --require features/step_definitions', mld: '--strict --tags ~@stress --tags ~@todo --tags ~@ch --require features/support --require features/step_definitions -f progress' diff --git a/docs/http.md b/docs/http.md index 07acc968a..9e6649d73 100644 --- a/docs/http.md +++ b/docs/http.md @@ -35,7 +35,7 @@ To pass parameters to each location some options support an array-like encoding: |radiuses |`{radius};{radius}[;{radius} ...]` |Limits the search to given radius in meters. | |generate\_hints |`true` (default), `false` |Adds a Hint to the response which can be used in subsequent requests, see `hints` parameter. | |hints |`{hint};{hint}[;{hint} ...]` |Hint from previous request to derive position in street network. | -|approaches |`{approach};{approach}[;{approach} ...]` |Keep waypoints on curbside. | +|approaches |`{approach};{approach}[;{approach} ...]` |Restrict the direction on the road network at a waypoint, relative to the input coordinate. | |exclude |`{class}[,{class}]` |Additive list of classes to avoid, the order does not matter. | |snapping |`default` (default), `any` |Default snapping avoids is_startpoint (see profile) edges, `any` will snap to any edge in the graph | |skip_waypoints |`true`, `false` (default) |Removes waypoints from the response. Waypoints are still calculated, but not serialized. Could be useful in case you are interested in some other part of the response and do not want to transfer waste data. | @@ -47,7 +47,7 @@ Where the elements follow the following format: |bearing |`{value},{range}` `integer 0 .. 360,integer 0 .. 180` | |radius |`double >= 0` or `unlimited` (default) | |hint |Base64 `string` | -|approach |`curb` or `unrestricted` (default) | +|approach |`curb`, `opposite` or `unrestricted` (default) | |class |A class name determined by the profile or `none`. | ``` @@ -88,10 +88,11 @@ Every response object has a `code` property containing one of the strings below | `InvalidService` | Service name is invalid. | | `InvalidVersion` | Version is not found. | | `InvalidOptions` | Options are invalid. | -| `InvalidQuery` | The query string is syntactically malformed. | +| `InvalidQuery` | The query string is syntactically malformed. | | `InvalidValue` | The successfully parsed query parameters are invalid. | -| `NoSegment` | One of the supplied input coordinates could not snap to the street segment. | +| `NoSegment` | One of the supplied input coordinates could not snap to the street segment. | | `TooBig` | The request size violates one of the service-specific request size restrictions. | +| `DisabledDataset` | The request tried to access a disabled dataset. | - `message` is a **optional** human-readable error message. All other status types are service-dependent. - In case of an error the HTTP status code will be `400`. Otherwise, the HTTP status code will be `200` and `code` will be `Ok`. @@ -130,7 +131,7 @@ In addition to the [general options](#general-options) the following options are |number |`integer >= 1` (default `1`) |Number of nearest segments that should be returned. | As `waypoints` is a single thing, returned by that service, using it with the option `skip_waypoints` set to `true` is quite useless, but still -possible. In that case, only the `code` field will be returned. +possible. In that case, only the `code` field will be returned. **Response** @@ -648,12 +649,12 @@ Represents a route between two waypoints. - `distance`: The distance traveled by this route leg, in `float` meters. - `duration`: The estimated travel time, in `float` number of seconds. - `weight`: The calculated weight of the route leg. -- `summary`: Summary of the route taken as `string`. Depends on the `summary` parameter: +- `summary`: Summary of the route taken as `string`. Depends on the `steps` parameter: -| summary | | -|--------------|-----------------------------------------------------------------------| -| true | Names of the two major roads used. Can be empty if the route is too short.| -| false | empty `string` | +| steps | | +|-------|-----------------------------------------------------------------------| +| true | Names of the two major roads used. Can be empty if the route is too short.| +| false | empty `string` | - `steps`: Depends on the `steps` parameter. @@ -953,11 +954,11 @@ The object is used to describe the waypoint on a route. ## Flatbuffers format -The default response format is `json`, but OSRM supports binary [`flatbuffers`](https://google.github.io/flatbuffers/) format, which +The default response format is `json`, but OSRM supports binary [`flatbuffers`](https://google.github.io/flatbuffers/) format, which is much faster in serialization/deserialization, comparing to `json`. The format itself is described in message descriptors, located at `include/engine/api/flatbuffers` directory. Those descriptors could -be compiled to provide protocol parsers in Go/Javascript/Typescript/Java/Dart/C#/Python/Lobster/Lua/Rust/PHP/Kotlin. Precompiled +be compiled to provide protocol parsers in Go/Javascript/Typescript/Java/Dart/C#/Python/Lobster/Lua/Rust/PHP/Kotlin. Precompiled protocol parser for C++ is supplied with OSRM. `Flatbuffers` format provides exactly the same data, as `json` format with a slightly different layout, which was optimized to minimize @@ -971,7 +972,7 @@ Root object is the only object, available from a 'raw' `flatbuffers` buffer. It **Properties** -- `error`: `bool` Marks response as erroneous. An erroneous response should include the `code` fieldset, all the other fields may not be present. +- `error`: `bool` Marks response as erroneous. An erroneous response should include the `code` fieldset, all the other fields may not be present. - `code`: `Error` Error description object, only present, when `error` is `true` - `waypoints`: `[Waypoint]` Array of `Waypoint` objects. Should present for every service call, unless `skip_waypoints` is set to `true`. Table service will put `sources` array here. - `routes`: `[RouteObject]` Array of `RouteObject` objects. May be empty or absent. Should present for Route/Trip/Match services call. @@ -983,21 +984,21 @@ Contains error information. **Properties** -- `code`: `string` Error code +- `code`: `string` Error code - `message`: `string` Detailed error message ### Waypoint object Almost the same as `json` Waypoint object. The following properties differ: -- `location`: `Position` Same as `json` location field, but different format. +- `location`: `Position` Same as `json` location field, but different format. - `nodes`: `Uint64Pair` Same as `json` nodes field, but different format. ### RouteObject object Almost the same as `json` Route object. The following properties differ: -- `polyline`: `string` Same as `json` geometry.polyline or geometry.polyline6 fields. One field for both formats. +- `polyline`: `string` Same as `json` geometry.polyline or geometry.polyline6 fields. One field for both formats. - `coordinates`: `[Position]` Same as `json` geometry.coordinates field, but different format. - `legs`: `[Leg]` Array of `Leg` objects. @@ -1012,7 +1013,7 @@ Almost the same as `json` Leg object. The following properties differ: Almost the same as `json` Step object. The following properties differ: -- `polyline`: `string` Same as `json` geometry.polyline or geometry.polyline6 fields. One field for both formats. +- `polyline`: `string` Same as `json` geometry.polyline or geometry.polyline6 fields. One field for both formats. - `coordinates`: `[Position]` Same as `json` geometry.coordinates field, but different format. - `maneuver`: `StepManeuver` Same as `json` maneuver field, but different format. @@ -1035,7 +1036,7 @@ Almost the same as `json` Step object. The following properties differ: | `ExitRoundabout` | Describes a maneuver exiting a roundabout (usually preceded by a `roundabout` instruction) | | `ExitRotary` | Describes the maneuver exiting a rotary (large named roundabout) | -- `driving_side`: `bool` Ttrue stands for the left side driving. +- `driving_side`: `bool` Ttrue stands for the left side driving. - `intersections`: `[Intersection]` Same as `json` intersections field, but different format. ### Intersection object @@ -1049,7 +1050,7 @@ Almost the same as `json` Intersection object. The following properties differ: Almost the same as `json` Lane object. The following properties differ: -- `indications`: `Turn` Array of `Turn` enum values. +- `indications`: `Turn` Array of `Turn` enum values. | `value` | Description | |------------------------|---------------------------------------------------------------------------------------------------------------------------| @@ -1089,16 +1090,16 @@ Almost the same as `json` StepManeuver object. The following properties differ: | `ExitRoundabout` | Describes a maneuver exiting a roundabout (usually preceded by a `roundabout` instruction) | | `ExitRotary` | Describes the maneuver exiting a rotary (large named roundabout) | -- `modifier`: `Turn` Maneuver turn (enum) +- `modifier`: `Turn` Maneuver turn (enum) ### Annotation object -Exactly the same as `json` annotation object. +Exactly the same as `json` annotation object. ### Position object -A point on Earth. +A point on Earth. ***Properties*** - `longitute`: `float` Point's longitude diff --git a/docs/nodejs/api.md b/docs/nodejs/api.md index b24800210..9dbfe912c 100644 --- a/docs/nodejs/api.md +++ b/docs/nodejs/api.md @@ -31,6 +31,7 @@ var osrm = new OSRM('network.osrm'); Old behaviour: Path to a file on disk to store the memory using mmap. Current behaviour: setting this value is the same as setting `mmap_memory: true`. - `options.mmap_memory` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Map on-disk files to virtual memory addresses (mmap), rather than loading into RAM. - `options.path` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true. + - `options.disable_feature_dataset` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Disables a feature dataset from being loaded into memory if not needed. Options: `ROUTE_STEPS`, `ROUTE_GEOMETRY`. - `options.max_locations_trip` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in trip query (default: unlimited). - `options.max_locations_viaroute` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in viaroute query (default: unlimited). - `options.max_locations_distance_table` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in distance table query (default: unlimited). @@ -62,7 +63,7 @@ Returns the fastest route between two or more coordinates while visiting the way - `options.geometries` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`) - `options.overview` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`) - `options.continue_straight` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile. - - `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`. + - `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb` or `opposite`. `null`/`true`/`false` - `options.waypoints` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Indices to coordinates to treat as waypoints. If not supplied, all coordinates are waypoints. Must include first and last coordinate index. - `options.format` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which output format to use, either `json`, or [`flatbuffers`](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api/flatbuffers). @@ -100,7 +101,7 @@ Note: `coordinates` in the general options only supports a single `{longitude},{ - `options.generate_hints` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not adds a Hint to the response which can be used in subsequent requests. (optional, default `true`) - `options.number` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of nearest segments that should be returned. Must be an integer greater than or equal to `1`. (optional, default `1`) - - `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`. + - `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb` or `opposite`. - `options.format` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which output format to use, either `json`, or [`flatbuffers`](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api/flatbuffers). - `options.snapping` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph. - `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** @@ -140,7 +141,7 @@ Optionally returns distance table. - `options.sources` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** An array of `index` elements (`0 <= integer < #coordinates`) to use location with given index as source. Default is to use all. - `options.destinations` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** An array of `index` elements (`0 <= integer < #coordinates`) to use location with given index as destination. Default is to use all. - - `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`. + - `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Restrict the direction on the road network at a waypoint, relative to the input coordinate.. Can be `null` (unrestricted, default), `curb` or `opposite`. - `options.fallback_speed` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Replace `null` responses in result with as-the-crow-flies estimates based on `fallback_speed`. Value is in metres/second. - `options.fallback_coordinate` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Either `input` (default) or `snapped`. If using a `fallback_speed`, use either the user-supplied coordinate (`input`), or the snapped coordinate (`snapped`) for calculating the as-the-crow-flies distance between two points. - `options.scale_factor` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Multiply the table duration values in the table by this number for more controlled input into a route optimization solver. @@ -297,7 +298,7 @@ Right now, the following combinations are possible: - `options.roundtrip` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route is a roundtrip. (optional, default `true`) - `options.source` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Return route starts at `any` or `first` coordinate. (optional, default `any`) - `options.destination` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Return route ends at `any` or `last` coordinate. (optional, default `any`) - - `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`. + - `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb` or `opposite`. - `options.snapping` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph. - `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** diff --git a/features/bicycle/pushing.feature b/features/bicycle/pushing.feature index 5cd41c541..5423859ad 100644 --- a/features/bicycle/pushing.feature +++ b/features/bicycle/pushing.feature @@ -78,6 +78,15 @@ Feature: Bike - Accessability of different way types | construction | yes | | | | construction | | yes | | + @proposed + Scenario: Bike - Don't allow routing on ways still being proposed + Then routability should be + | highway | foot | bicycle | proposed | bothw | + | primary | | | | x | + | proposed | | | | | + | proposed | yes | | yes | | + | proposed | | yes | yes | | + @roundabout Scenario: Bike - Don't push bikes against oneway flow on roundabouts Then routability should be diff --git a/features/car/traffic_light_penalties.feature b/features/car/traffic_light_penalties.feature index 048c25f4f..2a5ded5f0 100644 --- a/features/car/traffic_light_penalties.feature +++ b/features/car/traffic_light_penalties.feature @@ -32,14 +32,14 @@ Feature: Car - Handle traffic lights | l | traffic_signals | When I route I should get - | from | to | time | # | + | from | to | time | # | | 1 | 2 | 11.1s | no turn with no traffic light | | 3 | 4 | 13.1s | no turn with traffic light | | g | j | 18.7s | turn with no traffic light | | k | n | 20.7s | turn with traffic light | - Scenario: Car - Traffic signal direction + Scenario: Car - Traffic signal direction straight Given the node map """ a-1-b-2-c @@ -112,14 +112,14 @@ Feature: Car - Handle traffic lights - Scenario: Car - Encounters a traffic light + Scenario: Car - Encounters a traffic light direction Given the node map """ - a f k - | | | - b-c-d h-g-i l-m-n - | | | - e j o + a f k p + | | | | + b-c-d h-g-i l-m-n q-r-s + | | | | + e j o t """ @@ -131,53 +131,70 @@ Feature: Car - Handle traffic lights | fgj | primary | | lmn | primary | | kmo | primary | + | qrs | primary | + | prt | primary | And the nodes | node | highway | traffic_signals:direction | - | g | traffic_signals | forward | - | m | traffic_signals | backward | + | g | traffic_signals | | + | m | traffic_signals | forward | + | r | traffic_signals | backward | When I route I should get + # Base case | from | to | time | # | - | a | d | 21.9s | no turn with no traffic light | - | a | e | 22.2s | no turn with traffic light | | a | b | 18.7s | turn with no traffic light | - | e | b | 21.9s | no turn with no traffic light | - | e | a | 22.2s | no turn with traffic light | + | a | e | 22.2s | no turn with no traffic light | + | a | d | 21.9s | turn with no traffic light | + | e | b | 21.9s | turn with no traffic light | + | e | a | 22.2s | no turn with no traffic light | | e | d | 18.7s | turn with no traffic light | - | d | e | 21.9s | no turn with no traffic light | - | d | b | 11s | no turn with traffic light | + | d | e | 21.9s | turn with no traffic light | + | d | b | 11s | no turn with no traffic light | | d | a | 18.7s | turn with no traffic light | - | b | a | 21.9s | no turn with no traffic light | - | b | d | 11s | no turn with traffic light | + | b | a | 21.9s | turn with no traffic light | + | b | d | 11s | no turn with no traffic light | | b | e | 18.7s | turn with no traffic light | - - | f | i | 23.9s | no turn with no traffic light | + # All have traffic lights - 2s penalty + | f | h | 20.7s | turn with traffic light | | f | j | 24.2s | no turn with traffic light | - | f | h | 20.7s | turn with no traffic light | - | j | h | 21.9s | no turn with no traffic light | - | j | f | 22.2s | no turn with traffic light | - | j | i | 18.7s | turn with no traffic light | - | i | j | 21.9s | no turn with no traffic light | - | i | h | 11s | no turn with traffic light | - | i | f | 18.7s | turn with no traffic light | - | h | f | 23.9s | no turn with no traffic light | + | f | i | 23.9s | turn with traffic light | + | j | h | 23.9s | turn with traffic light | + | j | f | 24.2s | no turn with traffic light | + | j | i | 20.7s | turn with traffic light | + | i | j | 23.9s | turn with traffic light | + | i | h | 13s | no turn with traffic light | + | i | f | 20.7s | turn with traffic light | + | h | f | 23.9s | turn with traffic light | | h | i | 13s | no turn with traffic light | - | h | j | 20.7s | turn with no traffic light | - - | k | n | 21.9s | no turn with no traffic light | - | k | o | 22.2s | no turn with traffic light | - | k | l | 18.7s | turn with no traffic light | - | o | l | 23.9s | no turn with no traffic light | - | o | k | 24.2s | no turn with traffic light | - | o | n | 20.7s | turn with no traffic light | - | n | o | 23.9s | no turn with no traffic light | - | n | l | 13s | no turn with traffic light | - | n | k | 20.7s | turn with no traffic light | - | l | k | 21.9s | no turn with no traffic light | - | l | n | 11s | no turn with traffic light | - | l | o | 18.7s | turn with no traffic light | + | h | j | 20.7s | turn with traffic light | + # Front direction have traffic lights - 2s penalty + | k | l | 20.7s | turn with traffic light | + | k | o | 24.2s | no turn with traffic light | + | k | n | 23.9s | turn with traffic light | + | o | l | 21.9s | turn with no traffic light | + | o | k | 22.2s | no turn with no traffic light | + | o | n | 18.7s | turn with no traffic light | + | n | o | 21.9s | turn with no traffic light | + | n | l | 11s | no turn with no traffic light | + | n | k | 18.7s | turn with no traffic light | + | l | k | 23.9s | turn with traffic light | + | l | n | 13s | no turn with traffic light | + | l | o | 20.7s | turn with traffic light | + # Reverse direction have traffic lights - 2s penalty + | p | q | 18.7s | turn with no traffic light | + | p | t | 22.2s | no turn with no traffic light | + | p | s | 21.9s | turn with no traffic light | + | t | q | 23.9s | turn with traffic light | + | t | p | 24.2s | no turn with traffic light | + | t | s | 20.7s | turn with traffic light | + | s | t | 23.9s | turn with traffic light | + | s | q | 13s | no turn with traffic light | + | s | p | 20.7s | turn with traffic light | + | q | p | 21.9s | turn with no traffic light | + | q | s | 11s | no turn with no traffic light | + | q | t | 18.7s | turn with no traffic light | Scenario: Traffic Signal Geometry @@ -343,3 +360,106 @@ Feature: Car - Handle traffic lights | from | to | route | speed | weights | time | distances | a:datasources | a:nodes | a:speed | a:duration | a:weight | | a | c | abc,abc | 65 km/h | 22.2,0 | 22.2s | 400m,0m | 1:0 | 1:2:3 | 18:18 | 11.1:11.1 | 11.1:11.1 | | c | a | abc,abc | 60 km/h | 24.2,0 | 24.2s | 400m,0m | 0:1 | 3:2:1 | 18:18 | 11.1:11.1 | 11.1:11.1 | + + + Scenario: Car - Traffic signal straight direction with edge compression + Given the node map + """ + a-1-b - c - d-2-e + + """ + + And the ways + | nodes | highway | + | abcde | primary | + + And the nodes + | node | highway | traffic_signals:direction | + | c | traffic_signals | forward | + + When I route I should get + | from | to | time | weight | # | + | 1 | 2 | 35.3s | 35.3 | no turn with traffic light | + | 2 | 1 | 33.3s | 33.3 | no turn with no traffic light | + + + Scenario: Car - Traffic signal turn direction with edge compression + Given the node map + """ + d + | + 2 + | + a-1-b - c - f + | + e + + j + | + 4 + | + g-3-h - i - k + | + l + + """ + + And the ways + | nodes | highway | + | abc | primary | + | cf | primary | + | fd | primary | + | fe | primary | + | ghi | primary | + | ik | primary | + | kj | primary | + | kl | primary | + + And the nodes + | node | highway | traffic_signals:direction | + | k | traffic_signals | forward | + + When I route I should get + | from | to | time | weight | # | + | 1 | 2 | 44.2s | 44.2 | turn with no traffic light | + | 2 | 1 | 41s | 41 | turn with no traffic light | + | 3 | 4 | 46.2s | 46.2 | turn with traffic light | + | 4 | 3 | 41s | 41 | turn with no traffic light | + + + Scenario: Car - Traffic signal turn direction with turn restriction + Given the node map + """ + d + | + 2 + | + a-1-b - c - f + | + e + + """ + + And the ways + | nodes | highway | + | abc | primary | + | cf | primary | + | fd | primary | + | fe | primary | + + And the nodes + | node | highway | traffic_signals:direction | + | f | traffic_signals | forward | + + And the relations + | type | way:from | way:to | way:via | restriction | + | restriction | abc | fe | cf | no_right_turn | + + And the relations + | type | way:from | way:to | node:via | restriction | + | restriction | df | fc | f | right_turn_only | + + When I route I should get + | from | to | time | weight | # | + | 1 | 2 | 46.2s | 46.2 | turn with traffic light | + | 2 | 1 | 41s | 41 | turn with no traffic light | diff --git a/features/foot/way.feature b/features/foot/way.feature index ff3314f1c..6916adece 100644 --- a/features/foot/way.feature +++ b/features/foot/way.feature @@ -36,3 +36,9 @@ Feature: Foot - Accessability of different way types | highway | leisure | forw | | (nil) | track | x | + Scenario: Foot - Proposed ways + Then routability should be + | highway | foot | proposed | forw | + | footway | | | x | + | proposed | | | | + | proposed | yes | yes | | diff --git a/features/lib/osrm_loader.js b/features/lib/osrm_loader.js index 9d409f3d6..4e7de8cd1 100644 --- a/features/lib/osrm_loader.js +++ b/features/lib/osrm_loader.js @@ -68,8 +68,9 @@ class OSRMDirectLoader extends OSRMBaseLoader { super(scope); } - load (inputFile, callback) { - this.inputFile = inputFile; + load (ctx, callback) { + this.inputFile = ctx.inputFile; + this.loaderArgs = ctx.loaderArgs; this.shutdown(() => { this.launch(callback); }); @@ -78,7 +79,7 @@ class OSRMDirectLoader extends OSRMBaseLoader { osrmUp (callback) { if (this.osrmIsRunning()) return callback(new Error("osrm-routed already running!")); - const command_arguments = util.format('%s -p %d -i %s -a %s', this.inputFile, this.scope.OSRM_PORT, this.scope.OSRM_IP, this.scope.ROUTING_ALGORITHM); + const command_arguments = util.format('%s -p %d -i %s -a %s %s', this.inputFile, this.scope.OSRM_PORT, this.scope.OSRM_IP, this.scope.ROUTING_ALGORITHM, this.loaderArgs); this.child = this.scope.runBin('osrm-routed', command_arguments, this.scope.environment, (err) => { if (err && err.signal !== 'SIGINT') { this.child = null; @@ -101,8 +102,9 @@ class OSRMmmapLoader extends OSRMBaseLoader { super(scope); } - load (inputFile, callback) { - this.inputFile = inputFile; + load (ctx, callback) { + this.inputFile = ctx.inputFile; + this.loaderArgs = ctx.loaderArgs; this.shutdown(() => { this.launch(callback); }); @@ -111,7 +113,7 @@ class OSRMmmapLoader extends OSRMBaseLoader { osrmUp (callback) { if (this.osrmIsRunning()) return callback(new Error("osrm-routed already running!")); - const command_arguments = util.format('%s -p %d -i %s -a %s --mmap', this.inputFile, this.scope.OSRM_PORT, this.scope.OSRM_IP, this.scope.ROUTING_ALGORITHM); + const command_arguments = util.format('%s -p %d -i %s -a %s --mmap %s', this.inputFile, this.scope.OSRM_PORT, this.scope.OSRM_IP, this.scope.ROUTING_ALGORITHM, this.loaderArgs); this.child = this.scope.runBin('osrm-routed', command_arguments, this.scope.environment, (err) => { if (err && err.signal !== 'SIGINT') { this.child = null; @@ -134,8 +136,9 @@ class OSRMDatastoreLoader extends OSRMBaseLoader { super(scope); } - load (inputFile, callback) { - this.inputFile = inputFile; + load (ctx, callback) { + this.inputFile = ctx.inputFile; + this.loaderArgs = ctx.loaderArgs; this.loadData((err) => { if (err) return callback(err); @@ -148,7 +151,7 @@ class OSRMDatastoreLoader extends OSRMBaseLoader { } loadData (callback) { - const command_arguments = util.format('--dataset-name=%s %s', this.scope.DATASET_NAME, this.inputFile); + const command_arguments = util.format('--dataset-name=%s %s %s', this.scope.DATASET_NAME, this.inputFile, this.loaderArgs); this.scope.runBin('osrm-datastore', command_arguments, this.scope.environment, (err) => { if (err) return callback(new Error('*** osrm-datastore exited with ' + err.code + ': ' + err)); callback(); diff --git a/features/options/data/disabled_dataset.feature b/features/options/data/disabled_dataset.feature new file mode 100644 index 000000000..0df408394 --- /dev/null +++ b/features/options/data/disabled_dataset.feature @@ -0,0 +1,141 @@ +@routing @disable-feature-dataset +Feature: disable-feature-dataset command line options + Background: + Given the profile "testbot" + And the node map + """ + 0 + a b c + """ + And the ways + | nodes | + | ab | + | bc | + + Scenario: disable-feature-dataset - geometry disabled error + Given the data load extra arguments "--disable-feature-dataset ROUTE_GEOMETRY" + + # The default values + And the query options + | overview | simplified | + | annotations | false | + | steps | false | + | skip_waypoints | false | + + When I route I should get + | from | to | code | + | a | c | DisabledDataset | + + When I plan a trip I should get + | waypoints | code | + | a,b,c | DisabledDataset | + + When I match I should get + | trace | code | + | abc | DisabledDataset | + + Scenario: disable-feature-dataset - geometry disabled error table + Given the data load extra arguments "--disable-feature-dataset ROUTE_GEOMETRY" + + When I request nearest I should get + | in | code | + | 0 | DisabledDataset | + + When I request a travel time matrix with these waypoints I should get the response code + | waypoints | code | + | a,b,c | DisabledDataset | + + + Scenario: disable-feature-dataset - geometry disabled success + Given the data load extra arguments "--disable-feature-dataset ROUTE_GEOMETRY" + + # No geometry values returned + And the query options + | overview | false | + | annotations | false | + | steps | false | + | skip_waypoints | true | + + When I route I should get + | from | to | code | + | a | c | Ok | + + When I plan a trip I should get + | waypoints | code | + | a,b,c | Ok | + + When I match I should get + | trace | code | + | abc | Ok | + + Scenario: disable-feature-dataset - geometry disabled error table + Given the data load extra arguments "--disable-feature-dataset ROUTE_GEOMETRY" + + And the query options + | skip_waypoints | true | + + # You would never do this, but just to prove the point. + When I request nearest I should get + | in | code | + | 0 | Ok | + + When I request a travel time matrix with these waypoints I should get the response code + | waypoints | code | + | a,b,c | Ok | + + + Scenario: disable-feature-dataset - steps disabled error + Given the data load extra arguments "--disable-feature-dataset ROUTE_STEPS" + + # Default + annotations, steps + And the query options + | overview | simplified | + | annotations | true | + | steps | true | + + When I route I should get + | from | to | code | + | a | c | DisabledDataset | + + When I plan a trip I should get + | waypoints | code | + | a,b,c | DisabledDataset | + + When I match I should get + | trace | code | + | abc | DisabledDataset | + + + Scenario: disable-feature-dataset - geometry disabled error table + Given the data load extra arguments "--disable-feature-dataset ROUTE_STEPS" + + When I request nearest I should get + | in | code | + | 0 | Ok | + + When I request a travel time matrix with these waypoints I should get the response code + | waypoints | code | + | a,b,c | Ok | + + + Scenario: disable-feature-dataset - steps disabled success + Given the data load extra arguments "--disable-feature-dataset ROUTE_STEPS" + + # Default + steps + And the query options + | overview | simplified | + | annotations | true | + | steps | false | + + When I route I should get + | from | to | code | + | a | c | Ok | + + When I plan a trip I should get + | waypoints | code | + | a,b,c | Ok | + + When I match I should get + | trace | code | + | abc | Ok | + diff --git a/features/options/extract/lua.feature b/features/options/extract/lua.feature index c238cde61..e886d7102 100644 --- a/features/options/extract/lua.feature +++ b/features/options/extract/lua.feature @@ -154,3 +154,27 @@ Feature: osrm-extract lua ways:get_nodes() Then it should exit successfully And stdout should contain "node 42" And stdout should contain "way 42" + + Scenario: osrm-extract flags accessible in process_segment function + Given the profile file + """ + functions = require('testbot') + + functions.process_segment = function (profile, segment) + print('segment forward ' .. tostring(segment.flags.forward) .. ' backward ' .. tostring(segment.flags.backward)) + end + + return functions + """ + + And the node map + """ + a b + """ + And the ways + | nodes | oneway | + | ab | yes | + And the data has been saved to disk + When I run "osrm-extract --profile {profile_file} {osm_file}" + Then it should exit successfully + And stdout should contain "segment forward true backward false" diff --git a/features/options/routed/help.feature b/features/options/routed/help.feature index 401a5ba4f..fc3741078 100644 --- a/features/options/routed/help.feature +++ b/features/options/routed/help.feature @@ -23,6 +23,7 @@ Feature: osrm-routed command line options: help And stdout should contain "--max-table-size" And stdout should contain "--max-matching-size" And stdout should contain "--default-radius" + And stdout should contain "--keepalive-timeout" And it should exit successfully Scenario: osrm-routed - Help, short @@ -44,6 +45,7 @@ Feature: osrm-routed command line options: help And stdout should contain "--max-table-size" And stdout should contain "--max-matching-size" And stdout should contain "--default-radius" + And stdout should contain "--keepalive-timeout" And it should exit successfully Scenario: osrm-routed - Help, long @@ -65,4 +67,5 @@ Feature: osrm-routed command line options: help And stdout should contain "--max-table-size" And stdout should contain "--max-matching-size" And stdout should contain "--default-radius" + And stdout should contain "--keepalive-timeout" And it should exit successfully diff --git a/features/step_definitions/data.js b/features/step_definitions/data.js index 0d9b76e8a..7f2e8fc8e 100644 --- a/features/step_definitions/data.js +++ b/features/step_definitions/data.js @@ -33,6 +33,11 @@ module.exports = function () { callback(); }); + this.Given(/^the data load extra arguments "(.*?)"$/, (args, callback) => { + this.loaderArgs = this.expandOptions(args); + callback(); + }); + this.Given(/^a grid size of ([0-9.]+) meters$/, (meters, callback) => { this.setGridSize(meters); callback(); diff --git a/features/step_definitions/distance_matrix.js b/features/step_definitions/distance_matrix.js index 37de07a26..6702d05c3 100644 --- a/features/step_definitions/distance_matrix.js +++ b/features/step_definitions/distance_matrix.js @@ -5,6 +5,7 @@ var FBResult = require('../support/fbresult_generated').osrm.engine.api.fbresult module.exports = function () { const durationsRegex = new RegExp(/^I request a travel time matrix I should get$/); + const durationsCodeOnlyRegex = new RegExp(/^I request a travel time matrix with these waypoints I should get the response code$/); const distancesRegex = new RegExp(/^I request a travel distance matrix I should get$/); const estimatesRegex = new RegExp(/^I request a travel time matrix I should get estimates for$/); const durationsRegexFb = new RegExp(/^I request a travel time matrix with flatbuffers I should get$/); @@ -17,6 +18,7 @@ module.exports = function () { const FORMAT_FB = 'flatbuffers'; this.When(durationsRegex, function(table, callback) {tableParse.call(this, table, DURATIONS_NO_ROUTE, 'durations', FORMAT_JSON, callback);}.bind(this)); + this.When(durationsCodeOnlyRegex, function(table, callback) {tableCodeOnlyParse.call(this, table, 'durations', FORMAT_JSON, callback);}.bind(this)); this.When(distancesRegex, function(table, callback) {tableParse.call(this, table, DISTANCES_NO_ROUTE, 'distances', FORMAT_JSON, callback);}.bind(this)); this.When(estimatesRegex, function(table, callback) {tableParse.call(this, table, DISTANCES_NO_ROUTE, 'fallback_speed_cells', FORMAT_JSON, callback);}.bind(this)); this.When(durationsRegexFb, function(table, callback) {tableParse.call(this, table, DURATIONS_NO_ROUTE, 'durations', FORMAT_FB, callback);}.bind(this)); @@ -27,6 +29,64 @@ const durationsParse = function(v) { return isNaN(parseInt(v)); }; const distancesParse = function(v) { return isNaN(parseFloat(v)); }; const estimatesParse = function(v) { return isNaN(parseFloat(v)); }; +function tableCodeOnlyParse(table, annotation, format, callback) { + + const params = this.queryParams; + params.annotations = ['durations','fallback_speed_cells'].indexOf(annotation) !== -1 ? 'duration' : 'distance'; + params.output = format; + + var got; + + this.reprocessAndLoadData((e) => { + if (e) return callback(e); + var testRow = (row, ri, cb) => { + var afterRequest = (err, res) => { + if (err) return cb(err); + + for (var k in row) { + var match = k.match(/param:(.*)/); + if (match) { + if (row[k] === '(nil)') { + params[match[1]] = null; + } else if (row[k]) { + params[match[1]] = [row[k]]; + } + got[k] = row[k]; + } + } + + var json; + got.code = 'unknown'; + if (res.body.length) { + json = JSON.parse(res.body); + got.code = json.code; + } + + cb(null, got); + }; + + var params = this.queryParams, + waypoints = []; + if (row.waypoints) { + row.waypoints.split(',').forEach((n) => { + var node = this.findNodeByName(n); + if (!node) throw new Error(util.format('*** unknown waypoint node "%s"', n.trim())); + waypoints.push({ coord: node, type: 'loc' }); + + }); + got = { waypoints: row.waypoints }; + + this.requestTable(waypoints, params, afterRequest); + } else { + throw new Error('*** no waypoints'); + } + }; + + this.processRowsAndDiff(table, testRow, callback); + }); + +} + function tableParse(table, noRoute, annotation, format, callback) { const parse = annotation == 'distances' ? distancesParse : (annotation == 'durations' ? durationsParse : estimatesParse); @@ -62,9 +122,6 @@ function tableParse(table, noRoute, annotation, format, callback) { }); } - var actual = []; - actual.push(table.headers); - this.reprocessAndLoadData((e) => { if (e) return callback(e); // compute matrix diff --git a/features/step_definitions/nearest.js b/features/step_definitions/nearest.js index 49ec0775d..925ad7da1 100644 --- a/features/step_definitions/nearest.js +++ b/features/step_definitions/nearest.js @@ -12,35 +12,43 @@ module.exports = function () { var inNode = this.findNodeByName(row.in); if (!inNode) throw new Error(util.format('*** unknown in-node "%s"', row.in)); - var outNode = this.findNodeByName(row.out); - if (!outNode) throw new Error(util.format('*** unknown out-node "%s"', row.out)); - this.requestNearest(inNode, this.queryParams, (err, response) => { if (err) return cb(err); var coord; var headers = new Set(table.raw()[0]); - if (response.statusCode === 200 && response.body.length) { + var got = { in: row.in}; + + if (response.body.length) { var json = JSON.parse(response.body); + got.code = json.code; - coord = json.waypoints[0].location; + if (response.statusCode === 200) { - var got = { in: row.in, out: row.out }; - - if (headers.has('data_version')) { - got.data_version = json.data_version || ''; - } - - Object.keys(row).forEach((key) => { - if (key === 'out') { - if (this.FuzzyMatch.matchLocation(coord, outNode)) { - got[key] = row[key]; - } else { - row[key] = util.format('%s [%d,%d]', row[key], outNode.lat, outNode.lon); - } + if (headers.has('data_version')) { + got.data_version = json.data_version || ''; } - }); + if (json.waypoints && json.waypoints.length && row.out) { + coord = json.waypoints[0].location; + + got.out = row.out; + + var outNode = this.findNodeByName(row.out); + if (!outNode) throw new Error(util.format('*** unknown out-node "%s"', row.out)); + + Object.keys(row).forEach((key) => { + if (key === 'out') { + if (this.FuzzyMatch.matchLocation(coord, outNode)) { + got[key] = row[key]; + } else { + row[key] = util.format('%s [%d,%d]', row[key], outNode.lat, outNode.lon); + } + } + }); + } + + } cb(null, got); } else { diff --git a/features/step_definitions/trip.js b/features/step_definitions/trip.js index 0efbc2259..a88f94823 100644 --- a/features/step_definitions/trip.js +++ b/features/step_definitions/trip.js @@ -91,7 +91,7 @@ module.exports = function () { var encodedResult = ''; - if (json.trips) row.trips.split(',').forEach((sub, si) => { + if (json.trips && row.trips) row.trips.split(',').forEach((sub, si) => { if (si >= subTrips.length) { ok = false; } else { @@ -134,7 +134,6 @@ module.exports = function () { } else { var params = this.queryParams, waypoints = []; - params['steps'] = 'true'; if (row.from && row.to) { var fromNode = this.findNodeByName(row.from); if (!fromNode) throw new Error(util.format('*** unknown from-node "%s"', row.from)); diff --git a/features/support/data.js b/features/support/data.js index 6dd5fc545..27353e7a5 100644 --- a/features/support/data.js +++ b/features/support/data.js @@ -280,10 +280,11 @@ module.exports = function () { }; this.reprocessAndLoadData = (callback) => { + let p = {loaderArgs: this.loaderArgs, inputFile: this.processedCacheFile}; let queue = d3.queue(1); queue.defer(this.writeAndLinkOSM.bind(this)); queue.defer(this.extractContractPartitionAndCustomize.bind(this)); - queue.defer(this.osrmLoader.load.bind(this.osrmLoader), this.processedCacheFile); + queue.defer(this.osrmLoader.load.bind(this.osrmLoader), p); queue.awaitAll(callback); }; diff --git a/features/support/env.js b/features/support/env.js index eaa25fbc5..85b7b4383 100644 --- a/features/support/env.js +++ b/features/support/env.js @@ -27,7 +27,8 @@ module.exports = function () { this.DEFAULT_ENVIRONMENT = process.env; this.DEFAULT_PROFILE = 'bicycle'; this.DEFAULT_INPUT_FORMAT = 'osm'; - this.DEFAULT_LOAD_METHOD = process.argv[process.argv.indexOf('-m') +1].match('mmap') ? 'mmap' : 'datastore'; + let loadMethod = process.argv[process.argv.indexOf('-m') +1]; + this.DEFAULT_LOAD_METHOD = loadMethod.match('mmap') ? 'mmap' : loadMethod.match('directly') ? 'directly' : 'datastore'; this.DEFAULT_ORIGIN = [1,1]; this.OSM_USER = 'osrm'; this.OSM_UID = 1; @@ -42,7 +43,7 @@ module.exports = function () { this.OSRM_IP = process.env.OSRM_IP || '127.0.0.1'; this.OSRM_CONNECTION_RETRIES = process.env.OSRM_CONNECTION_RETRIES && parseInt(process.env.OSRM_CONNECTION_RETRIES) || 10; this.OSRM_CONNECTION_EXP_BACKOFF_COEF = process.env.OSRM_CONNECTION_EXP_BACKOFF_COEF && parseFloat(process.env.OSRM_CONNECTION_EXP_BACKOFF_COEF) || 1.0; - + this.HOST = `http://${this.OSRM_IP}:${this.OSRM_PORT}`; this.OSRM_PROFILE = process.env.OSRM_PROFILE; diff --git a/features/support/hooks.js b/features/support/hooks.js index 01c2e6e89..22e29d5bb 100644 --- a/features/support/hooks.js +++ b/features/support/hooks.js @@ -37,6 +37,7 @@ module.exports = function () { this.contractArgs = ''; this.partitionArgs = ''; this.customizeArgs = ''; + this.loaderArgs = ''; this.environment = Object.assign(this.DEFAULT_ENVIRONMENT); this.resetOSM(); diff --git a/features/support/route.js b/features/support/route.js index cd713372d..a01e47b78 100644 --- a/features/support/route.js +++ b/features/support/route.js @@ -101,7 +101,8 @@ module.exports = function () { this.requestTrip = (waypoints, userParams, callback) => { var defaults = { - output: 'json' + output: 'json', + steps: 'true' }, params = this.overwriteParams(defaults, userParams); diff --git a/features/testbot/alternative_loop.feature b/features/testbot/alternative_loop.feature index 182137969..1e2925f18 100644 --- a/features/testbot/alternative_loop.feature +++ b/features/testbot/alternative_loop.feature @@ -40,7 +40,7 @@ Feature: Alternative route | 7 | 8 | ca,ab,bd,dc,ca,ca | | - @mld-only + @mld Scenario: Alternative loop paths on a single node with an asymmetric circle # The test checks only MLD implementation, alternatives results are unpredictable for CH on windows (#4691, #4693) Given a grid size of 10 meters diff --git a/features/testbot/approaches.feature b/features/testbot/approaches.feature index d3e0c4630..fb3f00861 100644 --- a/features/testbot/approaches.feature +++ b/features/testbot/approaches.feature @@ -38,7 +38,41 @@ Feature: Approach parameter | from | to | approaches | route | | s | e | unrestricted curb | ab,bc,bc | - Scenario: Start End opposite approach, option unrestricted for Start and End + Scenario: Start End same approach, option unrestricted for Start and opposite for End + Given the profile "testbot" + And the node map + """ + s e + a------b------c + """ + + And the ways + | nodes | + | ab | + | bc | + + When I route I should get + | from | to | approaches | route | + | s | e | unrestricted opposite | ab,bc | + + Scenario: Start End same approach, option opposite for Start and curb for End + Given the profile "testbot" + And the node map + """ + s e + a------b------c + """ + + And the ways + | nodes | + | ab | + | bc | + + When I route I should get + | from | to | approaches | route | + | s | e | opposite curb | ab,bc,bc | + + Scenario: Start End different approach, option unrestricted for Start and End Given the profile "testbot" And the node map """ @@ -56,7 +90,7 @@ Feature: Approach parameter | from | to | approaches | route | | s | e | unrestricted unrestricted | ab,bc | - Scenario: Start End opposite approach, option unrestricted for Start and curb for End + Scenario: Start End different approach, option unrestricted for Start and curb for End Given the profile "testbot" And the node map """ @@ -74,6 +108,43 @@ Feature: Approach parameter | from | to | approaches | route | | s | e | unrestricted curb | ab,bc | + Scenario: Start End different approach, option unrestricted for Start and opposite for End + Given the profile "testbot" + And the node map + """ + s + a------b------c + e + """ + + And the ways + | nodes | + | ab | + | bc | + + When I route I should get + | from | to | approaches | route | + | s | e | unrestricted opposite | ab,bc,bc | + + Scenario: Start End different approach, option curb for Start and opposite for End + Given the profile "testbot" + And the node map + """ + e + a------b------c-----------d + s + """ + + And the ways + | nodes | + | ab | + | bc | + | cd | + + When I route I should get + | from | to | approaches | route | + | s | e | curb opposite | cd,cd,ab,ab | + ############### # Oneway Test # @@ -111,10 +182,44 @@ Feature: Approach parameter | bc | yes | When I route I should get - | from | to | approaches | route | + | from | to | approaches | route | | s | e | unrestricted curb | ab,bc | - Scenario: Test on oneway segment, Start End opposite approach, option unrestricted for Start and End + Scenario: Test on oneway segment, Start End same approach, option unrestricted for Start and opposite for End + Given the profile "testbot" + And the node map + """ + s e + a------b------c + """ + + And the ways + | nodes | oneway | + | ab | yes | + | bc | yes | + + When I route I should get + | from | to | approaches | route | + | s | e | unrestricted opposite | ab,bc | + + Scenario: Test on oneway segment, Start End same approach, option opposite for Start and curb for End + Given the profile "testbot" + And the node map + """ + s e + a------b------c + """ + + And the ways + | nodes | oneway | + | ab | yes | + | bc | yes | + + When I route I should get + | from | to | approaches | route | + | s | e | opposite curb | ab,bc | + + Scenario: Test on oneway segment, Start End different approach, option unrestricted for Start and End Given the profile "testbot" And the node map """ @@ -132,7 +237,7 @@ Feature: Approach parameter | from | to | approaches | route | | s | e | unrestricted unrestricted | ab,bc | - Scenario: Test on oneway segment, Start End opposite approach, option unrestricted for Start and curb for End + Scenario: Test on oneway segment, Start End different approach, option unrestricted for Start and curb for End Given the profile "testbot" And the node map """ @@ -150,6 +255,42 @@ Feature: Approach parameter | from | to | approaches | route | | s | e | unrestricted curb | ab,bc | + Scenario: Test on oneway segment, Start End different approach, option unrestricted for Start and opposite for End + Given the profile "testbot" + And the node map + """ + s + a------b------c + e + """ + + And the ways + | nodes | oneway | + | ab | yes | + | bc | yes | + + When I route I should get + | from | to | approaches | route | + | s | e | unrestricted opposite | ab,bc | + + Scenario: Test on oneway segment, Start End different approach, option curb for Start and opposite for End + Given the profile "testbot" + And the node map + """ + s + a------b------c + e + """ + + And the ways + | nodes | oneway | + | ab | yes | + | bc | yes | + + When I route I should get + | from | to | approaches | route | + | s | e | curb opposite | ab,bc | + ############## # UTurn Test # ############## @@ -175,6 +316,27 @@ Feature: Approach parameter | from | to | approaches | route | | s | e | unrestricted curb | | + Scenario: UTurn test, router can find a route because uturn authorized to reach opposite side + Given the profile "testbot" + And the node map + """ + e s + a------b------c + """ + + And the ways + | nodes | + | ab | + | bc | + + And the relations + | type | way:from | way:to | node:via | restriction | + | restriction | bc | bc | c | no_u_turn | + + When I route I should get + | from | to | approaches | route | + | s | e | curb opposite | bc,ab,ab | + Scenario: UTurn test, router can find a route because he can use the roundabout Given the profile "testbot" @@ -198,8 +360,9 @@ Feature: Approach parameter | restriction | bc | bc | c | no_u_turn | When I route I should get - | from | to | approaches | route | - | s | e | unrestricted curb | ab,bc,bc | + | from | to | approaches | route | + | s | e | unrestricted curb | ab,bc,bc | + | s | e | opposite curb | ab,bc,bc | Scenario: Start End same approach, option unrestricted for Start and curb for End, left-hand driving @@ -228,6 +391,32 @@ Feature: Approach parameter | from | to | approaches | route | | s | e | unrestricted curb | ab,bc | + Scenario: Start End same approach, option unrestricted for Start and opposite for End, left-hand driving + Given the profile file + """ + local functions = require('testbot') + local testbot_process_way = functions.process_way + functions.process_way = function(profile, way, result) + testbot_process_way(profile, way, result) + result.is_left_hand_driving = true + end + return functions + """ + And the node map + """ + s e + a------b------c + """ + + And the ways + | nodes | + | ab | + | bc | + + When I route I should get + | from | to | approaches | route | + | s | e | unrestricted opposite | ab,bc,bc | + ####################### # Left-side countries # @@ -260,9 +449,8 @@ Feature: Approach parameter """ And the node map """ - s + s e a------b------c - e """ And the ways @@ -271,10 +459,50 @@ Feature: Approach parameter | bc | When I route I should get - | from | to | approaches | route | - | s | e | unrestricted curb | ab,bc,bc | + | from | to | approaches | route | + | s | e | unrestricted curb | ab,bc | - Scenario: [Left-hand-side] Start End opposite approach, option unrestricted for Start and End + Scenario: [Left-hand-side] Start End same approach, option unrestricted for Start and opposite for End + Given the profile file "car" initialized with + """ + profile.properties.left_hand_driving = true + """ + And the node map + """ + s e + a------b------c + """ + + And the ways + | nodes | + | ab | + | bc | + + When I route I should get + | from | to | approaches | route | + | s | e | unrestricted opposite | ab,bc,bc | + + Scenario: [Left-hand-side] Start End same approach, option opposite for Start and curb for End + Given the profile file "car" initialized with + """ + profile.properties.left_hand_driving = true + """ + And the node map + """ + e s + a------b------c + """ + + And the ways + | nodes | + | ab | + | bc | + + When I route I should get + | from | to | approaches | route | + | s | e | opposite curb | bc,ab,ab | + + Scenario: [Left-hand-side] Start End different approach, option unrestricted for Start and End Given the profile file "car" initialized with """ profile.properties.left_hand_driving = true @@ -295,15 +523,16 @@ Feature: Approach parameter | from | to | approaches | route | | s | e | unrestricted unrestricted | ab,bc | - Scenario: [Left-hand-side] Start End opposite approach, option unrestricted for Start and curb for End + Scenario: [Left-hand-side] Start End different approach, option unrestricted for Start and curb for End Given the profile file "car" initialized with """ profile.properties.left_hand_driving = true """ And the node map """ - s e + s a------b------c + e """ And the ways @@ -312,5 +541,122 @@ Feature: Approach parameter | bc | When I route I should get - | from | to | approaches | route | - | s | e | unrestricted curb | ab,bc | \ No newline at end of file + | from | to | approaches | route | + | s | e | unrestricted curb | ab,bc,bc | + + Scenario: [Left-hand-side] Start End different approach, option unrestricted for Start and opposite for End + Given the profile file "car" initialized with + """ + profile.properties.left_hand_driving = true + """ + And the node map + """ + s + a------b------c + e + """ + + And the ways + | nodes | + | ab | + | bc | + + When I route I should get + | from | to | approaches | route | + | s | e | unrestricted opposite | ab,bc | + + Scenario: [Left-hand-side] Start End different approach, option curb for Start and opposite for End + Given the profile file "car" initialized with + """ + profile.properties.left_hand_driving = true + """ + And the node map + """ + s + a------b------c + e + """ + + And the ways + | nodes | + | ab | + | bc | + + When I route I should get + | from | to | approaches | route | + | s | e | curb opposite | ab,bc | + + + + Scenario: Routes with more than two waypoints - uturns allowed + Given the profile "testbot" + And the node map + """ + 2 1 + a------b------c-----------d + | + 3 | 4 + e------f------g-----------h + | + | + i + + """ + + And the ways + | nodes | + | ab | + | bc | + | cd | + | bf | + | ef | + | fg | + | gh | + | ei | + + And the query options + | continue_straight | false | + + When I route I should get + | waypoints | approaches | locations | # | + | 1,2,3,4 | curb curb curb curb | _,_,_,a,b,f,_,_,i,h,_ | 1,2,2,a,b,f,3,3,i,h,4 (Only u-turn at end of roads) | + | 1,2,3,4 | curb unrestricted unrestricted curb | _,_,_,b,f,_,_,h,_ | 1,2,2,b,f,3,3,h,4 (Can u-turn at 2 and 3) | + | 1,2,3,4 | opposite opposite opposite opposite | _,d,a,_,_,b,f,i,_,_,_ | 1,d,a,2,2,b,f,i,3,3,4 (Only u-turn at end of roads) | + | 1,2,3,4 | opposite unrestricted unrestricted opposite | _,d,_,_,b,f,_,_,_ | 1,d,2,2,b,f,3,3,4 (Can u-turn at 2 and 3) | + + + Scenario: Routes with more than two waypoints - uturns forbidden + Given the profile "testbot" + And the node map + """ + 2 1 + a------b------c-----------d + | + 3 | 4 + e------f------g-----------h + | + | + i + + """ + + And the ways + | nodes | + | ab | + | bc | + | cd | + | bf | + | ef | + | fg | + | gh | + | ei | + + And the query options + | continue_straight | true | + + When I route I should get + | waypoints | approaches | locations | # | + | 1,2,3,4 | curb curb curb curb | _,_,_,a,b,f,_,_,i,h,_ | 1,2,2,a,b,f,3,3,i,h,4 (Only u-turn at end of roads) | + | 1,2,3,4 | curb opposite opposite curb | _,a,_,_,b,f,i,_,_,h,_ | 1,a,2,2,b,f,i,3,3,h,4 (switches stops with u-turns) | + | 1,2,3,4 | opposite opposite opposite opposite | _,d,a,_,_,b,f,i,_,_,_ | 1,d,a,2,2,b,f,i,3,3,4 (Only u-turn at end of roads) | + | 1,2,3,4 | opposite curb curb opposite | _,d,_,_,a,b,f,_,_,i,_ | 1,d,2,2,a,b,f,3,3,i,4 (switches stops with u-turns) | diff --git a/include/contractor/contract_excludable_graph.hpp b/include/contractor/contract_excludable_graph.hpp index f6a34fc4a..75e3aceda 100644 --- a/include/contractor/contract_excludable_graph.hpp +++ b/include/contractor/contract_excludable_graph.hpp @@ -61,10 +61,12 @@ inline auto contractExcludableGraph(ContractorGraph contractor_graph_, // Add all non-core edges to container { auto non_core_edges = toEdges(contractor_graph); - auto new_end = - std::remove_if(non_core_edges.begin(), non_core_edges.end(), [&](const auto &edge) { - return is_shared_core[edge.source] && is_shared_core[edge.target]; - }); + auto new_end = std::remove_if(non_core_edges.begin(), + non_core_edges.end(), + [&](const auto &edge) { + return is_shared_core[edge.source] && + is_shared_core[edge.target]; + }); non_core_edges.resize(new_end - non_core_edges.begin()); edge_container.Insert(std::move(non_core_edges)); @@ -75,8 +77,8 @@ inline auto contractExcludableGraph(ContractorGraph contractor_graph_, } // Extract core graph for further contraction - shared_core_graph = contractor_graph.Filter( - [&is_shared_core](const NodeID node) { return is_shared_core[node]; }); + shared_core_graph = contractor_graph.Filter([&is_shared_core](const NodeID node) + { return is_shared_core[node]; }); } for (const auto &filter : filters) diff --git a/include/contractor/contracted_edge_container.hpp b/include/contractor/contracted_edge_container.hpp index 4dec3be62..c7fe48fb6 100644 --- a/include/contractor/contracted_edge_container.hpp +++ b/include/contractor/contracted_edge_container.hpp @@ -89,37 +89,40 @@ struct ContractedEdgeContainer // Remove all edges that are contained in the old set of edges and set the appropriate flag. auto new_end = - std::remove_if(new_edges.begin(), new_edges.end(), [&](const QueryEdge &edge) { - // check if the new edge would be sorted before the currend old edge - // if so it is not contained yet in the set of old edges - if (edge_iter == edge_end || mergeCompare(edge, *edge_iter)) - { - return false; - } + std::remove_if(new_edges.begin(), + new_edges.end(), + [&](const QueryEdge &edge) + { + // check if the new edge would be sorted before the currend old edge + // if so it is not contained yet in the set of old edges + if (edge_iter == edge_end || mergeCompare(edge, *edge_iter)) + { + return false; + } - // find the first old edge that is equal or greater then the new edge - while (edge_iter != edge_end && mergeCompare(*edge_iter, edge)) - { - BOOST_ASSERT(flags_iter != flags.end()); - edge_iter++; - flags_iter++; - } + // find the first old edge that is equal or greater then the new edge + while (edge_iter != edge_end && mergeCompare(*edge_iter, edge)) + { + BOOST_ASSERT(flags_iter != flags.end()); + edge_iter++; + flags_iter++; + } - // all new edges will be sorted after the old edges - if (edge_iter == edge_end) - { - return false; - } + // all new edges will be sorted after the old edges + if (edge_iter == edge_end) + { + return false; + } - BOOST_ASSERT(edge_iter != edge_end); - if (mergable(edge, *edge_iter)) - { - *flags_iter = *flags_iter | flag; - return true; - } - BOOST_ASSERT(mergeCompare(edge, *edge_iter)); - return false; - }); + BOOST_ASSERT(edge_iter != edge_end); + if (mergable(edge, *edge_iter)) + { + *flags_iter = *flags_iter | flag; + return true; + } + BOOST_ASSERT(mergeCompare(edge, *edge_iter)); + return false; + }); // append new edges edges.insert(edges.end(), new_edges.begin(), new_end); @@ -132,10 +135,10 @@ struct ContractedEdgeContainer // enforce sorting for next merge step std::vector ordering(edges_size); std::iota(ordering.begin(), ordering.end(), 0); - tbb::parallel_sort( - ordering.begin(), ordering.end(), [&](const auto lhs_idx, const auto rhs_idx) { - return mergeCompare(edges[lhs_idx], edges[rhs_idx]); - }); + tbb::parallel_sort(ordering.begin(), + ordering.end(), + [&](const auto lhs_idx, const auto rhs_idx) + { return mergeCompare(edges[lhs_idx], edges[rhs_idx]); }); auto permutation = util::orderingToPermutation(ordering); util::inplacePermutation(edges.begin(), edges.end(), permutation); diff --git a/include/customizer/cell_customizer.hpp b/include/customizer/cell_customizer.hpp index bf625fa9b..00d03163a 100644 --- a/include/customizer/cell_customizer.hpp +++ b/include/customizer/cell_customizer.hpp @@ -122,7 +122,8 @@ class CellCustomizer for (std::size_t level = 1; level < partition.GetNumberOfLevels(); ++level) { tbb::parallel_for(tbb::blocked_range(0, partition.GetNumberOfCells(level)), - [&](const tbb::blocked_range &range) { + [&](const tbb::blocked_range &range) + { auto &heap = heaps.local(); for (auto id = range.begin(), end = range.end(); id != end; ++id) { diff --git a/include/engine/api/base_api.hpp b/include/engine/api/base_api.hpp index a2acfcfbc..344f6499a 100644 --- a/include/engine/api/base_api.hpp +++ b/include/engine/api/base_api.hpp @@ -40,10 +40,10 @@ class BaseAPI util::json::Array waypoints; waypoints.values.resize(parameters.coordinates.size()); - boost::range::transform( - waypoint_candidates, - waypoints.values.begin(), - [this](const PhantomNodeCandidates &candidates) { return MakeWaypoint(candidates); }); + boost::range::transform(waypoint_candidates, + waypoints.values.begin(), + [this](const PhantomNodeCandidates &candidates) + { return MakeWaypoint(candidates); }); return waypoints; } @@ -104,9 +104,8 @@ class BaseAPI std::transform(waypoint_candidates.begin(), waypoint_candidates.end(), waypoints.begin(), - [this, builder](const PhantomNodeCandidates &candidates) { - return MakeWaypoint(builder, candidates)->Finish(); - }); + [this, builder](const PhantomNodeCandidates &candidates) + { return MakeWaypoint(builder, candidates)->Finish(); }); return builder->CreateVector(waypoints); } diff --git a/include/engine/api/base_parameters.hpp b/include/engine/api/base_parameters.hpp index 9cc13ae01..d7422566f 100644 --- a/include/engine/api/base_parameters.hpp +++ b/include/engine/api/base_parameters.hpp @@ -52,7 +52,8 @@ namespace osrm::engine::api * optional per coordinate * - bearings: limits the search for segments in the road network to given bearing(s) in degree * towards true north in clockwise direction, optional per coordinate - * - approaches: force the phantom node to start towards the node with the road country side. + * - approaches: force the phantom node to start towards the node with the road country side or + * its opposite * * \see OSRM, Coordinate, Hint, Bearing, RouteParameters, TableParameters, * NearestParameters, TripParameters, MatchParameters and TileParameters @@ -111,7 +112,8 @@ struct BaseParameters (approaches.empty() || approaches.size() == coordinates.size()) && std::all_of(bearings.begin(), bearings.end(), - [](const boost::optional &bearing_and_range) { + [](const boost::optional &bearing_and_range) + { if (bearing_and_range) { return bearing_and_range->IsValid(); diff --git a/include/engine/api/match_api.hpp b/include/engine/api/match_api.hpp index 20034e75b..1a6172abf 100644 --- a/include/engine/api/match_api.hpp +++ b/include/engine/api/match_api.hpp @@ -52,9 +52,10 @@ class MatchAPI final : public RouteAPI data_version_string = fb_result.CreateString(data_timestamp); } - auto response = MakeFBResponse(sub_routes, fb_result, [this, &fb_result, &sub_matchings]() { - return MakeTracepoints(fb_result, sub_matchings); - }); + auto response = MakeFBResponse(sub_routes, + fb_result, + [this, &fb_result, &sub_matchings]() + { return MakeTracepoints(fb_result, sub_matchings); }); if (!data_timestamp.empty()) { diff --git a/include/engine/api/match_parameters.hpp b/include/engine/api/match_parameters.hpp index 52fc64c1e..abc93a650 100644 --- a/include/engine/api/match_parameters.hpp +++ b/include/engine/api/match_parameters.hpp @@ -67,7 +67,7 @@ struct MatchParameters : public RouteParameters MatchParameters(const std::vector ×tamps_, GapsType gaps_, bool tidy_, - Args &&... args_) + Args &&...args_) : MatchParameters(timestamps_, gaps_, tidy_, {}, std::forward(args_)...) { } @@ -77,7 +77,7 @@ struct MatchParameters : public RouteParameters GapsType gaps_, bool tidy_, const std::vector &waypoints_, - Args &&... args_) + Args &&...args_) : RouteParameters{std::forward(args_)..., waypoints_}, timestamps{std::move( timestamps_)}, gaps(gaps_), tidy(tidy_) diff --git a/include/engine/api/nearest_api.hpp b/include/engine/api/nearest_api.hpp index bc1d4e04f..53ea1fd43 100644 --- a/include/engine/api/nearest_api.hpp +++ b/include/engine/api/nearest_api.hpp @@ -57,20 +57,20 @@ class NearestAPI final : public BaseAPI { std::vector> waypoints; waypoints.resize(phantom_nodes.front().size()); - std::transform( - phantom_nodes.front().begin(), - phantom_nodes.front().end(), - waypoints.begin(), - [this, &fb_result](const PhantomNodeWithDistance &phantom_with_distance) { - auto &phantom_node = phantom_with_distance.phantom_node; + std::transform(phantom_nodes.front().begin(), + phantom_nodes.front().end(), + waypoints.begin(), + [this, &fb_result](const PhantomNodeWithDistance &phantom_with_distance) + { + auto &phantom_node = phantom_with_distance.phantom_node; - auto node_values = MakeNodes(phantom_node); - fbresult::Uint64Pair nodes{node_values.first, node_values.second}; + auto node_values = MakeNodes(phantom_node); + fbresult::Uint64Pair nodes{node_values.first, node_values.second}; - auto waypoint = MakeWaypoint(&fb_result, {phantom_node}); - waypoint->add_nodes(&nodes); - return waypoint->Finish(); - }); + auto waypoint = MakeWaypoint(&fb_result, {phantom_node}); + waypoint->add_nodes(&nodes); + return waypoint->Finish(); + }); waypoints_vector = fb_result.CreateVector(waypoints); } @@ -94,7 +94,8 @@ class NearestAPI final : public BaseAPI std::transform(phantom_nodes.front().begin(), phantom_nodes.front().end(), waypoints.values.begin(), - [this](const PhantomNodeWithDistance &phantom_with_distance) { + [this](const PhantomNodeWithDistance &phantom_with_distance) + { auto &phantom_node = phantom_with_distance.phantom_node; auto waypoint = MakeWaypoint({phantom_node}); diff --git a/include/engine/api/route_api.hpp b/include/engine/api/route_api.hpp index 088235e54..cbff9ce3b 100644 --- a/include/engine/api/route_api.hpp +++ b/include/engine/api/route_api.hpp @@ -77,9 +77,10 @@ class RouteAPI : public BaseAPI } auto response = - MakeFBResponse(raw_routes, fb_result, [this, &waypoint_candidates, &fb_result]() { - return BaseAPI::MakeWaypoints(&fb_result, waypoint_candidates); - }); + MakeFBResponse(raw_routes, + fb_result, + [this, &waypoint_candidates, &fb_result]() + { return BaseAPI::MakeWaypoints(&fb_result, waypoint_candidates); }); if (!data_timestamp.empty()) { @@ -171,10 +172,15 @@ class RouteAPI : public BaseAPI } std::vector coordinates; coordinates.resize(std::distance(begin, end)); - std::transform(begin, end, coordinates.begin(), [](const Coordinate &c) { - return fbresult::Position{static_cast(util::toFloating(c.lon).__value), - static_cast(util::toFloating(c.lat).__value)}; - }); + std::transform(begin, + end, + coordinates.begin(), + [](const Coordinate &c) + { + return fbresult::Position{ + static_cast(util::toFloating(c.lon).__value), + static_cast(util::toFloating(c.lat).__value)}; + }); return builder.CreateVectorOfStructs(coordinates); } @@ -354,9 +360,8 @@ class RouteAPI : public BaseAPI std::transform(leg.steps.begin(), leg.steps.end(), legSteps.begin(), - [this, &fb_result, &leg_geometry](auto &step) { - return this->MakeFBStep(fb_result, leg_geometry, step); - }); + [this, &fb_result, &leg_geometry](auto &step) + { return this->MakeFBStep(fb_result, leg_geometry, step); }); } auto steps_vector = fb_result.CreateVector(legSteps); @@ -441,7 +446,8 @@ class RouteAPI : public BaseAPI speed = GetAnnotations(fb_result, leg_geometry, - [&prev_speed](const guidance::LegGeometry::Annotation &anno) { + [&prev_speed](const guidance::LegGeometry::Annotation &anno) + { if (anno.duration < std::numeric_limits::min()) { return prev_speed; @@ -459,37 +465,37 @@ class RouteAPI : public BaseAPI flatbuffers::Offset> duration; if (requested_annotations & RouteParameters::AnnotationsType::Duration) { - duration = GetAnnotations( - fb_result, leg_geometry, [](const guidance::LegGeometry::Annotation &anno) { - return anno.duration; - }); + duration = GetAnnotations(fb_result, + leg_geometry, + [](const guidance::LegGeometry::Annotation &anno) + { return anno.duration; }); } flatbuffers::Offset> distance; if (requested_annotations & RouteParameters::AnnotationsType::Distance) { - distance = GetAnnotations( - fb_result, leg_geometry, [](const guidance::LegGeometry::Annotation &anno) { - return anno.distance; - }); + distance = GetAnnotations(fb_result, + leg_geometry, + [](const guidance::LegGeometry::Annotation &anno) + { return anno.distance; }); } flatbuffers::Offset> weight; if (requested_annotations & RouteParameters::AnnotationsType::Weight) { - weight = GetAnnotations( - fb_result, leg_geometry, [](const guidance::LegGeometry::Annotation &anno) { - return anno.weight; - }); + weight = GetAnnotations(fb_result, + leg_geometry, + [](const guidance::LegGeometry::Annotation &anno) + { return anno.weight; }); } flatbuffers::Offset> datasources; if (requested_annotations & RouteParameters::AnnotationsType::Datasources) { - datasources = GetAnnotations( - fb_result, leg_geometry, [](const guidance::LegGeometry::Annotation &anno) { - return anno.datasource; - }); + datasources = GetAnnotations(fb_result, + leg_geometry, + [](const guidance::LegGeometry::Annotation &anno) + { return anno.datasource; }); } std::vector nodes; if (requested_annotations & RouteParameters::AnnotationsType::Nodes) @@ -653,7 +659,8 @@ class RouteAPI : public BaseAPI step.intersections.begin(), step.intersections.end(), intersections.begin(), - [&fb_result, this](const guidance::IntermediateIntersection &intersection) { + [&fb_result, this](const guidance::IntermediateIntersection &intersection) + { std::vector> lanes; if (json::detail::hasValidLanes(intersection)) { @@ -681,11 +688,11 @@ class RouteAPI : public BaseAPI auto bearings_vector = fb_result.CreateVector(intersection.bearings); std::vector> classes; classes.resize(intersection.classes.size()); - std::transform( - intersection.classes.begin(), - intersection.classes.end(), - classes.begin(), - [&fb_result](const std::string &cls) { return fb_result.CreateString(cls); }); + std::transform(intersection.classes.begin(), + intersection.classes.end(), + classes.begin(), + [&fb_result](const std::string &cls) + { return fb_result.CreateString(cls); }); auto classes_vector = fb_result.CreateVector(classes); auto entry_vector = fb_result.CreateVector(intersection.entry); @@ -720,9 +727,10 @@ class RouteAPI : public BaseAPI std::vector step_geometries; const auto total_step_count = - std::accumulate(legs.begin(), legs.end(), 0, [](const auto &v, const auto &leg) { - return v + leg.steps.size(); - }); + std::accumulate(legs.begin(), + legs.end(), + 0, + [](const auto &v, const auto &leg) { return v + leg.steps.size(); }); step_geometries.reserve(total_step_count); for (const auto idx : util::irange(0UL, legs.size())) @@ -733,7 +741,8 @@ class RouteAPI : public BaseAPI legs[idx].steps.begin(), legs[idx].steps.end(), std::back_inserter(step_geometries), - [this, &leg_geometry](const guidance::RouteStep &step) { + [this, &leg_geometry](const guidance::RouteStep &step) + { if (parameters.geometries == RouteParameters::GeometriesType::Polyline) { return static_cast(json::makePolyline<100000>( @@ -778,7 +787,9 @@ class RouteAPI : public BaseAPI { double prev_speed = 0; annotation.values["speed"] = GetAnnotations( - leg_geometry, [&prev_speed](const guidance::LegGeometry::Annotation &anno) { + leg_geometry, + [&prev_speed](const guidance::LegGeometry::Annotation &anno) + { if (anno.duration < std::numeric_limits::min()) { return prev_speed; @@ -794,17 +805,17 @@ class RouteAPI : public BaseAPI if (requested_annotations & RouteParameters::AnnotationsType::Duration) { - annotation.values["duration"] = GetAnnotations( - leg_geometry, [](const guidance::LegGeometry::Annotation &anno) { - return anno.duration; - }); + annotation.values["duration"] = + GetAnnotations(leg_geometry, + [](const guidance::LegGeometry::Annotation &anno) + { return anno.duration; }); } if (requested_annotations & RouteParameters::AnnotationsType::Distance) { - annotation.values["distance"] = GetAnnotations( - leg_geometry, [](const guidance::LegGeometry::Annotation &anno) { - return anno.distance; - }); + annotation.values["distance"] = + GetAnnotations(leg_geometry, + [](const guidance::LegGeometry::Annotation &anno) + { return anno.distance; }); } if (requested_annotations & RouteParameters::AnnotationsType::Weight) { @@ -814,10 +825,10 @@ class RouteAPI : public BaseAPI } if (requested_annotations & RouteParameters::AnnotationsType::Datasources) { - annotation.values["datasources"] = GetAnnotations( - leg_geometry, [](const guidance::LegGeometry::Annotation &anno) { - return anno.datasource; - }); + annotation.values["datasources"] = + GetAnnotations(leg_geometry, + [](const guidance::LegGeometry::Annotation &anno) + { return anno.datasource; }); } if (requested_annotations & RouteParameters::AnnotationsType::Nodes) { diff --git a/include/engine/api/route_parameters.hpp b/include/engine/api/route_parameters.hpp index fe121a06d..267058a46 100644 --- a/include/engine/api/route_parameters.hpp +++ b/include/engine/api/route_parameters.hpp @@ -83,7 +83,7 @@ struct RouteParameters : public BaseParameters const GeometriesType geometries_, const OverviewType overview_, const boost::optional continue_straight_, - Args &&... args_) + Args &&...args_) // Once we perfectly-forward `args` (see #2990) this constructor can delegate to the one // below. : BaseParameters{std::forward(args_)...}, steps{steps_}, alternatives{alternatives_}, @@ -101,7 +101,7 @@ struct RouteParameters : public BaseParameters const GeometriesType geometries_, const OverviewType overview_, const boost::optional continue_straight_, - Args &&... args_) + Args &&...args_) : BaseParameters{std::forward(args_)...}, steps{steps_}, alternatives{alternatives_}, number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_}, annotations_type{annotations_ ? AnnotationsType::All : AnnotationsType::None}, @@ -119,7 +119,7 @@ struct RouteParameters : public BaseParameters const GeometriesType geometries_, const OverviewType overview_, const boost::optional continue_straight_, - Args &&... args_) + Args &&...args_) : BaseParameters{std::forward(args_)...}, steps{steps_}, alternatives{alternatives_}, number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_ != AnnotationsType::None}, annotations_type{annotations_}, @@ -137,7 +137,7 @@ struct RouteParameters : public BaseParameters const OverviewType overview_, const boost::optional continue_straight_, std::vector waypoints_, - const Args &&... args_) + const Args &&...args_) : BaseParameters{std::forward(args_)...}, steps{steps_}, alternatives{alternatives_}, number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_}, annotations_type{annotations_ ? AnnotationsType::All : AnnotationsType::None}, @@ -155,7 +155,7 @@ struct RouteParameters : public BaseParameters const OverviewType overview_, const boost::optional continue_straight_, std::vector waypoints_, - Args &&... args_) + Args &&...args_) : BaseParameters{std::forward(args_)...}, steps{steps_}, alternatives{alternatives_}, number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_ != AnnotationsType::None}, @@ -180,9 +180,9 @@ struct RouteParameters : public BaseParameters const auto coordinates_ok = coordinates.size() >= 2; const auto base_params_ok = BaseParameters::IsValid(); const auto valid_waypoints = - std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) { - return w < coordinates.size(); - }); + std::all_of(waypoints.begin(), + waypoints.end(), + [this](const auto &w) { return w < coordinates.size(); }); return coordinates_ok && base_params_ok && valid_waypoints; } }; @@ -202,8 +202,8 @@ inline RouteParameters::AnnotationsType operator|(RouteParameters::AnnotationsTy static_cast>(rhs)); } -inline RouteParameters::AnnotationsType operator|=(RouteParameters::AnnotationsType lhs, - RouteParameters::AnnotationsType rhs) +inline RouteParameters::AnnotationsType &operator|=(RouteParameters::AnnotationsType &lhs, + RouteParameters::AnnotationsType rhs) { return lhs = lhs | rhs; } diff --git a/include/engine/api/table_api.hpp b/include/engine/api/table_api.hpp index af4e692e3..20d6a4a23 100644 --- a/include/engine/api/table_api.hpp +++ b/include/engine/api/table_api.hpp @@ -245,9 +245,8 @@ class TableAPI final : public BaseAPI boost::range::transform(candidates, std::back_inserter(waypoints), - [this, &builder](const PhantomNodeCandidates &candidates) { - return BaseAPI::MakeWaypoint(&builder, candidates)->Finish(); - }); + [this, &builder](const PhantomNodeCandidates &candidates) + { return BaseAPI::MakeWaypoint(&builder, candidates)->Finish(); }); return builder.CreateVector(waypoints); } @@ -261,7 +260,8 @@ class TableAPI final : public BaseAPI boost::range::transform( indices, std::back_inserter(waypoints), - [this, &builder, &candidates](const std::size_t idx) { + [this, &builder, &candidates](const std::size_t idx) + { BOOST_ASSERT(idx < candidates.size()); return BaseAPI::MakeWaypoint(&builder, candidates[idx])->Finish(); }); @@ -274,14 +274,17 @@ class TableAPI final : public BaseAPI { std::vector distance_table; distance_table.resize(values.size()); - std::transform( - values.begin(), values.end(), distance_table.begin(), [](const EdgeDuration duration) { - if (duration == MAXIMAL_EDGE_DURATION) - { - return 0.; - } - return from_alias(duration) / 10.; - }); + std::transform(values.begin(), + values.end(), + distance_table.begin(), + [](const EdgeDuration duration) + { + if (duration == MAXIMAL_EDGE_DURATION) + { + return 0.; + } + return from_alias(duration) / 10.; + }); return builder.CreateVector(distance_table); } @@ -291,14 +294,17 @@ class TableAPI final : public BaseAPI { std::vector duration_table; duration_table.resize(values.size()); - std::transform( - values.begin(), values.end(), duration_table.begin(), [](const EdgeDistance distance) { - if (distance == INVALID_EDGE_DISTANCE) - { - return 0.; - } - return std::round(from_alias(distance) * 10) / 10.; - }); + std::transform(values.begin(), + values.end(), + duration_table.begin(), + [](const EdgeDistance distance) + { + if (distance == INVALID_EDGE_DISTANCE) + { + return 0.; + } + return std::round(from_alias(distance) * 10) / 10.; + }); return builder.CreateVector(duration_table); } @@ -308,11 +314,13 @@ class TableAPI final : public BaseAPI { std::vector fb_table; fb_table.reserve(fallback_speed_cells.size()); - std::for_each( - fallback_speed_cells.begin(), fallback_speed_cells.end(), [&](const auto &cell) { - fb_table.push_back(cell.row); - fb_table.push_back(cell.column); - }); + std::for_each(fallback_speed_cells.begin(), + fallback_speed_cells.end(), + [&](const auto &cell) + { + fb_table.push_back(cell.row); + fb_table.push_back(cell.column); + }); return builder.CreateVector(fb_table); } @@ -325,9 +333,8 @@ class TableAPI final : public BaseAPI boost::range::transform(candidates, std::back_inserter(json_waypoints.values), - [this](const PhantomNodeCandidates &candidates) { - return BaseAPI::MakeWaypoint(candidates); - }); + [this](const PhantomNodeCandidates &candidates) + { return BaseAPI::MakeWaypoint(candidates); }); return json_waypoints; } @@ -338,7 +345,8 @@ class TableAPI final : public BaseAPI json_waypoints.values.reserve(indices.size()); boost::range::transform(indices, std::back_inserter(json_waypoints.values), - [this, &candidates](const std::size_t idx) { + [this, &candidates](const std::size_t idx) + { BOOST_ASSERT(idx < candidates.size()); return BaseAPI::MakeWaypoint(candidates[idx]); }); @@ -359,7 +367,8 @@ class TableAPI final : public BaseAPI std::transform(row_begin_iterator, row_end_iterator, json_row.values.begin(), - [](const EdgeDuration duration) { + [](const EdgeDuration duration) + { if (duration == MAXIMAL_EDGE_DURATION) { return util::json::Value(util::json::Null()); @@ -387,7 +396,8 @@ class TableAPI final : public BaseAPI std::transform(row_begin_iterator, row_end_iterator, json_row.values.begin(), - [](const EdgeDistance distance) { + [](const EdgeDistance distance) + { if (distance == INVALID_EDGE_DISTANCE) { return util::json::Value(util::json::Null()); @@ -405,13 +415,15 @@ class TableAPI final : public BaseAPI MakeEstimatesTable(const std::vector &fallback_speed_cells) const { util::json::Array json_table; - std::for_each( - fallback_speed_cells.begin(), fallback_speed_cells.end(), [&](const auto &cell) { - util::json::Array row; - row.values.push_back(util::json::Number(cell.row)); - row.values.push_back(util::json::Number(cell.column)); - json_table.values.push_back(std::move(row)); - }); + std::for_each(fallback_speed_cells.begin(), + fallback_speed_cells.end(), + [&](const auto &cell) + { + util::json::Array row; + row.values.push_back(util::json::Number(cell.row)); + row.values.push_back(util::json::Number(cell.column)); + json_table.values.push_back(std::move(row)); + }); return json_table; } diff --git a/include/engine/api/table_parameters.hpp b/include/engine/api/table_parameters.hpp index be65b9a77..bbc76b6b9 100644 --- a/include/engine/api/table_parameters.hpp +++ b/include/engine/api/table_parameters.hpp @@ -81,7 +81,7 @@ struct TableParameters : public BaseParameters template TableParameters(std::vector sources_, std::vector destinations_, - Args &&... args_) + Args &&...args_) : BaseParameters{std::forward(args_)...}, sources{std::move(sources_)}, destinations{std::move(destinations_)} { @@ -91,7 +91,7 @@ struct TableParameters : public BaseParameters TableParameters(std::vector sources_, std::vector destinations_, const AnnotationsType annotations_, - Args &&... args_) + Args &&...args_) : BaseParameters{std::forward(args_)...}, sources{std::move(sources_)}, destinations{std::move(destinations_)}, annotations{annotations_} { @@ -104,7 +104,7 @@ struct TableParameters : public BaseParameters double fallback_speed_, FallbackCoordinateType fallback_coordinate_type_, double scale_factor_, - Args &&... args_) + Args &&...args_) : BaseParameters{std::forward(args_)...}, sources{std::move(sources_)}, destinations{std::move(destinations_)}, fallback_speed{fallback_speed_}, fallback_coordinate_type{fallback_coordinate_type_}, annotations{annotations_}, diff --git a/include/engine/api/trip_api.hpp b/include/engine/api/trip_api.hpp index f15d21422..d7a4ab69c 100644 --- a/include/engine/api/trip_api.hpp +++ b/include/engine/api/trip_api.hpp @@ -50,10 +50,10 @@ class TripAPI final : public RouteAPI data_version_string = fb_result.CreateString(data_timestamp); } - auto response = - MakeFBResponse(sub_routes, fb_result, [this, &fb_result, &sub_trips, &candidates]() { - return MakeWaypoints(fb_result, sub_trips, candidates); - }); + auto response = MakeFBResponse(sub_routes, + fb_result, + [this, &fb_result, &sub_trips, &candidates]() + { return MakeWaypoints(fb_result, sub_trips, candidates); }); if (!data_timestamp.empty()) { diff --git a/include/engine/api/trip_parameters.hpp b/include/engine/api/trip_parameters.hpp index 6cfffd295..7ad785ac0 100644 --- a/include/engine/api/trip_parameters.hpp +++ b/include/engine/api/trip_parameters.hpp @@ -60,7 +60,7 @@ struct TripParameters : public RouteParameters TripParameters(SourceType source_, DestinationType destination_, bool roundtrip_, - Args &&... args_) + Args &&...args_) : RouteParameters{std::forward(args_)...}, source{source_}, destination{destination_}, roundtrip{roundtrip_} { diff --git a/include/engine/approach.hpp b/include/engine/approach.hpp index 185dcfcf5..60fd68a46 100644 --- a/include/engine/approach.hpp +++ b/include/engine/approach.hpp @@ -36,7 +36,8 @@ namespace osrm::engine enum class Approach : std::uint8_t { CURB = 0, - UNRESTRICTED = 1 + UNRESTRICTED = 1, + OPPOSITE = 2 }; } // namespace osrm::engine diff --git a/include/engine/datafacade/contiguous_internalmem_datafacade.hpp b/include/engine/datafacade/contiguous_internalmem_datafacade.hpp index 1f584870a..9b35989e1 100644 --- a/include/engine/datafacade/contiguous_internalmem_datafacade.hpp +++ b/include/engine/datafacade/contiguous_internalmem_datafacade.hpp @@ -31,6 +31,26 @@ namespace osrm::engine::datafacade { +static const std::string DATASET_TURN_DATA = "TurnData"; +static const std::string DATASET_TURN_LANE_DATA = "NameLaneData"; +static const std::string DATASET_NAME_DATA = "NameData"; +static const std::string DATASET_INTERSECTION_BEARINGS = "IntersectionBearings"; +static const std::string DATASET_ENTRY_CLASS = "EntryClass"; + +/** + * Macro is not ideal. But without it we either have to: + * a) Write this boiler-plate for every usage of an optional dataset. + * b) Convert to a function and add lots of polluting NOLINT(bugprone-unchecked-optional-access) + * comments. This macro keeps the API code readable. + */ +#define CHECK_DATASET_DISABLED(val, dataset) \ + { \ + if (!(val)) \ + { \ + throw osrm::util::DisabledDatasetException((dataset)); \ + } \ + } + template class ContiguousInternalMemoryAlgorithmDataFacade; template <> @@ -141,18 +161,15 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade std::string_view m_data_timestamp; util::vector_view m_coordinate_list; extractor::PackedOSMIDsView m_osmnodeid_list; - util::vector_view m_lane_description_offsets; - util::vector_view m_lane_description_masks; + std::optional> m_lane_description_offsets; + std::optional> m_lane_description_masks; util::vector_view m_turn_weight_penalties; util::vector_view m_turn_duration_penalties; extractor::SegmentDataView segment_data; extractor::EdgeBasedNodeDataView edge_based_node_data; - guidance::TurnDataView turn_data; + std::optional turn_data; - util::vector_view m_datasource_name_data; - util::vector_view m_datasource_name_offsets; - util::vector_view m_datasource_name_lengths; - util::vector_view m_lane_tupel_id_pairs; + std::optional> m_lane_tuple_id_pairs; util::vector_view m_maneuver_overrides; util::vector_view m_maneuver_override_node_sequences; @@ -161,16 +178,24 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade std::unique_ptr m_geospatial_query; boost::filesystem::path file_index_path; - extractor::IntersectionBearingsView intersection_bearings_view; + std::optional intersection_bearings_view; - extractor::NameTableView m_name_table; + std::optional m_name_table; // the look-up table for entry classes. An entry class lists the possibility of entry for all // available turns. Such a class id is stored with every edge. - util::vector_view m_entry_class_table; + std::optional> m_entry_class_table; // allocator that keeps the allocation data std::shared_ptr allocator; + bool isIndexed(const storage::SharedDataIndex &index, const std::string &name) + { + bool result = false; + index.List(name, + boost::make_function_output_iterator([&](const auto &) { result = true; })); + return result; + } + void InitializeInternalPointers(const storage::SharedDataIndex &index, const std::string &metric_name, const std::size_t exclude_index) @@ -183,7 +208,17 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade exclude_mask = m_profile_properties->excludable_classes[exclude_index]; - m_check_sum = *index.GetBlockPtr("/common/connectivity_checksum"); + // We no longer use "/common/connectivity_checksum", as osrm.edges is an optional dataset. + // Instead, we load the value from the MLD or CH graph, whichever is loaded. + if (isIndexed(index, "/mld/connectivity_checksum")) + { + m_check_sum = *index.GetBlockPtr("/mld/connectivity_checksum"); + } + else + { + BOOST_ASSERT(isIndexed(index, "/ch/connectivity_checksum")); + m_check_sum = *index.GetBlockPtr("/ch/connectivity_checksum"); + } m_data_timestamp = make_timestamp_view(index, "/common/timestamp"); @@ -196,13 +231,23 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade edge_based_node_data = make_ebn_data_view(index, "/common/ebg_node_data"); - turn_data = make_turn_data_view(index, "/common/turn_data"); + if (isIndexed(index, "/common/turn_data")) + { + turn_data = make_turn_data_view(index, "/common/turn_data"); + } - m_name_table = make_name_table_view(index, "/common/names"); + if (isIndexed(index, "/common/names")) + { + m_name_table = make_name_table_view(index, "/common/names"); + } - std::tie(m_lane_description_offsets, m_lane_description_masks) = - make_turn_lane_description_views(index, "/common/turn_lanes"); - m_lane_tupel_id_pairs = make_lane_data_view(index, "/common/turn_lanes"); + if (isIndexed(index, "/common/turn_lanes")) + { + std::tie(m_lane_description_offsets, m_lane_description_masks) = + make_turn_lane_description_views(index, "/common/turn_lanes"); + + m_lane_tuple_id_pairs = make_lane_data_view(index, "/common/turn_lanes"); + } m_turn_weight_penalties = make_turn_weight_view(index, "/common/turn_penalty"); m_turn_duration_penalties = make_turn_duration_view(index, "/common/turn_penalty"); @@ -211,10 +256,12 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade m_datasources = index.GetBlockPtr("/common/data_sources_names"); - intersection_bearings_view = - make_intersection_bearings_view(index, "/common/intersection_bearings"); - - m_entry_class_table = make_entry_classes_view(index, "/common/entry_classes"); + if (isIndexed(index, "/common/intersection_bearings")) + { + intersection_bearings_view = + make_intersection_bearings_view(index, "/common/intersection_bearings"); + m_entry_class_table = make_entry_classes_view(index, "/common/entry_classes"); + } std::tie(m_maneuver_overrides, m_maneuver_override_node_sequences) = make_maneuver_overrides_views(index, "/common/maneuver_overrides"); @@ -305,7 +352,8 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade osrm::guidance::TurnInstruction GetTurnInstructionForEdgeID(const EdgeID edge_based_edge_id) const override final { - return turn_data.GetTurnInstruction(edge_based_edge_id); + CHECK_DATASET_DISABLED(turn_data, DATASET_TURN_DATA); + return turn_data->GetTurnInstruction(edge_based_edge_id); } std::vector GetEdgesInBox(const util::Coordinate south_west, @@ -392,9 +440,11 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade { auto indexes = extractor::getClassIndexes(class_data); std::vector classes(indexes.size()); - std::transform(indexes.begin(), indexes.end(), classes.begin(), [this](const auto index) { - return m_profile_properties->GetClassName(index); - }); + std::transform(indexes.begin(), + indexes.end(), + classes.begin(), + [this](const auto index) + { return m_profile_properties->GetClassName(index); }); return classes; } @@ -406,27 +456,32 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade std::string_view GetNameForID(const NameID id) const override final { - return m_name_table.GetNameForID(id); + CHECK_DATASET_DISABLED(m_name_table, DATASET_NAME_DATA); + return m_name_table->GetNameForID(id); } std::string_view GetRefForID(const NameID id) const override final { - return m_name_table.GetRefForID(id); + CHECK_DATASET_DISABLED(m_name_table, DATASET_NAME_DATA); + return m_name_table->GetRefForID(id); } std::string_view GetPronunciationForID(const NameID id) const override final { - return m_name_table.GetPronunciationForID(id); + CHECK_DATASET_DISABLED(m_name_table, DATASET_NAME_DATA); + return m_name_table->GetPronunciationForID(id); } std::string_view GetDestinationsForID(const NameID id) const override final { - return m_name_table.GetDestinationsForID(id); + CHECK_DATASET_DISABLED(m_name_table, DATASET_NAME_DATA); + return m_name_table->GetDestinationsForID(id); } std::string_view GetExitsForID(const NameID id) const override final { - return m_name_table.GetExitsForID(id); + CHECK_DATASET_DISABLED(m_name_table, DATASET_NAME_DATA); + return m_name_table->GetExitsForID(id); } std::string_view GetDatasourceName(const DatasourceID id) const override final @@ -459,46 +514,60 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade util::guidance::BearingClass GetBearingClass(const NodeID node_based_node_id) const override final { - return intersection_bearings_view.GetBearingClass(node_based_node_id); + CHECK_DATASET_DISABLED(intersection_bearings_view, DATASET_INTERSECTION_BEARINGS); + return intersection_bearings_view->GetBearingClass(node_based_node_id); } guidance::TurnBearing PreTurnBearing(const EdgeID edge_based_edge_id) const override final { - return turn_data.GetPreTurnBearing(edge_based_edge_id); + CHECK_DATASET_DISABLED(turn_data, DATASET_TURN_DATA); + return turn_data->GetPreTurnBearing(edge_based_edge_id); } guidance::TurnBearing PostTurnBearing(const EdgeID edge_based_edge_id) const override final { - return turn_data.GetPostTurnBearing(edge_based_edge_id); + CHECK_DATASET_DISABLED(turn_data, DATASET_TURN_DATA); + return turn_data->GetPostTurnBearing(edge_based_edge_id); } util::guidance::EntryClass GetEntryClass(const EdgeID edge_based_edge_id) const override final { - auto entry_class_id = turn_data.GetEntryClassID(edge_based_edge_id); - return m_entry_class_table.at(entry_class_id); + CHECK_DATASET_DISABLED(m_entry_class_table, DATASET_ENTRY_CLASS); + CHECK_DATASET_DISABLED(turn_data, DATASET_TURN_DATA); + + auto entry_class_id = turn_data->GetEntryClassID(edge_based_edge_id); + return m_entry_class_table->at(entry_class_id); } bool HasLaneData(const EdgeID edge_based_edge_id) const override final { - return turn_data.HasLaneData(edge_based_edge_id); + CHECK_DATASET_DISABLED(turn_data, DATASET_TURN_DATA); + return turn_data->HasLaneData(edge_based_edge_id); } util::guidance::LaneTupleIdPair GetLaneData(const EdgeID edge_based_edge_id) const override final { + CHECK_DATASET_DISABLED(turn_data, DATASET_TURN_DATA); + CHECK_DATASET_DISABLED(m_lane_tuple_id_pairs, DATASET_TURN_LANE_DATA); + BOOST_ASSERT(HasLaneData(edge_based_edge_id)); - return m_lane_tupel_id_pairs.at(turn_data.GetLaneDataID(edge_based_edge_id)); + return m_lane_tuple_id_pairs->at(turn_data->GetLaneDataID(edge_based_edge_id)); } extractor::TurnLaneDescription GetTurnDescription(const LaneDescriptionID lane_description_id) const override final { + CHECK_DATASET_DISABLED(m_lane_description_offsets, DATASET_TURN_LANE_DATA); + CHECK_DATASET_DISABLED(m_lane_description_masks, DATASET_TURN_LANE_DATA); + if (lane_description_id == INVALID_LANE_DESCRIPTIONID) return {}; else return extractor::TurnLaneDescription( - m_lane_description_masks.begin() + m_lane_description_offsets[lane_description_id], - m_lane_description_masks.begin() + - m_lane_description_offsets[lane_description_id + 1]); + m_lane_description_masks->begin() + + m_lane_description_offsets->at(lane_description_id), + m_lane_description_masks->begin() + + m_lane_description_offsets->at(lane_description_id + 1)); } bool IsLeftHandDriving(const NodeID edge_based_node_id) const override final @@ -533,15 +602,19 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade auto found_range = std::equal_range( m_maneuver_overrides.begin(), m_maneuver_overrides.end(), edge_based_node_id, Comp{}); - std::for_each(found_range.first, found_range.second, [&](const auto &override) { - std::vector sequence( - m_maneuver_override_node_sequences.begin() + override.node_sequence_offset_begin, - m_maneuver_override_node_sequences.begin() + override.node_sequence_offset_end); - results.push_back(extractor::ManeuverOverride{std::move(sequence), - override.instruction_node, - override.override_type, - override.direction}); - }); + std::for_each(found_range.first, + found_range.second, + [&](const auto &override) + { + std::vector sequence(m_maneuver_override_node_sequences.begin() + + override.node_sequence_offset_begin, + m_maneuver_override_node_sequences.begin() + + override.node_sequence_offset_end); + results.push_back(extractor::ManeuverOverride{std::move(sequence), + override.instruction_node, + override.override_type, + override.direction}); + }); return results; } }; diff --git a/include/engine/engine_config.hpp b/include/engine/engine_config.hpp index 5ca54ba1c..c7c7eb06f 100644 --- a/include/engine/engine_config.hpp +++ b/include/engine/engine_config.hpp @@ -29,9 +29,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define ENGINE_CONFIG_HPP #include "storage/storage_config.hpp" +#include "osrm/datasets.hpp" #include +#include #include namespace osrm::engine @@ -83,12 +85,13 @@ struct EngineConfig final int max_locations_map_matching = -1; double max_radius_map_matching = -1.0; int max_results_nearest = -1; - boost::optional default_radius; + boost::optional default_radius = -1.0; int max_alternatives = 3; // set an arbitrary upper bound; can be adjusted by user bool use_shared_memory = true; boost::filesystem::path memory_file; bool use_mmap = true; Algorithm algorithm = Algorithm::CH; + std::vector disable_feature_dataset; std::string verbosity; std::string dataset_name; }; diff --git a/include/engine/geospatial_query.hpp b/include/engine/geospatial_query.hpp index 8388e9294..b8e43b637 100644 --- a/include/engine/geospatial_query.hpp +++ b/include/engine/geospatial_query.hpp @@ -60,7 +60,8 @@ template class GeospatialQuery auto results = rtree.Nearest( input_coordinate, [this, approach, &input_coordinate, &bearing_with_range, &use_all_edges]( - const CandidateSegment &segment) { + const CandidateSegment &segment) + { auto valid = CheckSegmentExclude(segment) && CheckApproach(input_coordinate, segment, approach) && (use_all_edges ? HasValidEdge(segment, *use_all_edges) @@ -70,9 +71,10 @@ template class GeospatialQuery return valid; }, [this, &max_distance, &max_results, input_coordinate](const std::size_t num_results, - const CandidateSegment &segment) { + const CandidateSegment &segment) + { return (max_results && num_results >= *max_results) || - (max_distance && + (max_distance && max_distance != -1.0 && CheckSegmentDistance(input_coordinate, segment, *max_distance)); }); @@ -107,7 +109,8 @@ template class GeospatialQuery &big_component_coord, &big_component_distance, &use_all_edges, - &bearing_with_range](const CandidateSegment &segment) { + &bearing_with_range](const CandidateSegment &segment) + { auto is_big_component = !IsTinyComponent(segment); auto not_nearest = has_nearest && segment.fixed_projected_coordinate != nearest_coord; @@ -159,11 +162,13 @@ template class GeospatialQuery return use_candidate; }, [this, &has_big_component, &max_distance, input_coordinate, &big_component_distance]( - const std::size_t /*num_results*/, const CandidateSegment &segment) { + const std::size_t /*num_results*/, const CandidateSegment &segment) + { auto distance = GetSegmentDistance(input_coordinate, segment); auto further_than_big_component = distance > big_component_distance; auto no_more_candidates = has_big_component && further_than_big_component; - auto too_far_away = max_distance && distance > *max_distance; + auto too_far_away = + max_distance && max_distance != -1.0 && distance > *max_distance; // Time to terminate the search when: // 1. We've found a node from a big component and the next candidate is further away @@ -189,13 +194,17 @@ template class GeospatialQuery PhantomNodeCandidates nearest_phantoms; PhantomNodeCandidates big_component_phantoms; - const auto add_to_candidates = [this, &input_coordinate](PhantomNodeCandidates &candidates, - const EdgeData data) { + const auto add_to_candidates = + [this, &input_coordinate](PhantomNodeCandidates &candidates, const EdgeData data) + { auto candidate_it = - std::find_if(candidates.begin(), candidates.end(), [&](const PhantomNode &node) { - return data.forward_segment_id.id == node.forward_segment_id.id && - data.reverse_segment_id.id == node.reverse_segment_id.id; - }); + std::find_if(candidates.begin(), + candidates.end(), + [&](const PhantomNode &node) + { + return data.forward_segment_id.id == node.forward_segment_id.id && + data.reverse_segment_id.id == node.reverse_segment_id.id; + }); if (candidate_it == candidates.end()) { // First candidate from this segment @@ -258,17 +267,20 @@ template class GeospatialQuery } }; - std::for_each(results.begin(), results.end(), [&](const CandidateSegment &segment) { - if (segment.fixed_projected_coordinate == nearest_coord) - { - add_to_candidates(nearest_phantoms, segment.data); - } - else - { - // Can only be from a big component for the alternative candidates - add_to_candidates(big_component_phantoms, segment.data); - } - }); + std::for_each(results.begin(), + results.end(), + [&](const CandidateSegment &segment) + { + if (segment.fixed_projected_coordinate == nearest_coord) + { + add_to_candidates(nearest_phantoms, segment.data); + } + else + { + // Can only be from a big component for the alternative candidates + add_to_candidates(big_component_phantoms, segment.data); + } + }); return std::make_pair(std::move(nearest_phantoms), std::move(big_component_phantoms)); } @@ -280,9 +292,8 @@ template class GeospatialQuery std::transform(results.begin(), results.end(), distance_and_phantoms.begin(), - [this, &input_coordinate](const CandidateSegment &segment) { - return MakePhantomNode(input_coordinate, segment.data); - }); + [this, &input_coordinate](const CandidateSegment &segment) + { return MakePhantomNode(input_coordinate, segment.data); }); return distance_and_phantoms; } @@ -399,9 +410,8 @@ template class GeospatialQuery } // check phantom node segments validity - auto areSegmentsValid = [](auto first, auto last) -> bool { - return std::find(first, last, INVALID_SEGMENT_WEIGHT) == last; - }; + auto areSegmentsValid = [](auto first, auto last) -> bool + { return std::find(first, last, INVALID_SEGMENT_WEIGHT) == last; }; bool is_forward_valid_source = areSegmentsValid(forward_weights.begin(), forward_weights.end()); bool is_forward_valid_target = areSegmentsValid( @@ -557,7 +567,7 @@ template class GeospatialQuery { bool isOnewaySegment = !(segment.data.forward_segment_id.enabled && segment.data.reverse_segment_id.enabled); - if (!isOnewaySegment && approach == Approach::CURB) + if (!isOnewaySegment && (approach == Approach::CURB || approach == Approach::OPPOSITE)) { // Check the counter clockwise // @@ -572,6 +582,9 @@ template class GeospatialQuery if (datafacade.IsLeftHandDriving(segment.data.forward_segment_id.id)) input_coordinate_is_at_right = !input_coordinate_is_at_right; + if (approach == Approach::OPPOSITE) + input_coordinate_is_at_right = !input_coordinate_is_at_right; + return std::make_pair(input_coordinate_is_at_right, (!input_coordinate_is_at_right)); } return std::make_pair(true, true); diff --git a/include/engine/guidance/assemble_leg.hpp b/include/engine/guidance/assemble_leg.hpp index 31dfc7027..1906ae50f 100644 --- a/include/engine/guidance/assemble_leg.hpp +++ b/include/engine/guidance/assemble_leg.hpp @@ -43,7 +43,8 @@ std::array summarizeRoute(const datafacade::BaseDa const bool target_traversed_in_reverse) { // merges segments with same name id - const auto collapse_segments = [](std::vector &segments) { + const auto collapse_segments = [](std::vector &segments) + { auto out = segments.begin(); auto end = segments.end(); @@ -75,7 +76,8 @@ std::array summarizeRoute(const datafacade::BaseDa std::transform(route_data.begin(), route_data.end(), segments.begin(), - [&index, &facade](const PathData &point) { + [&index, &facade](const PathData &point) + { return NamedSegment{point.duration_until_turn, index++, facade.GetNameIndex(point.from_edge_based_node)}; @@ -87,33 +89,37 @@ std::array summarizeRoute(const datafacade::BaseDa if (target_duration > EdgeDuration{1}) segments.push_back({target_duration, index++, facade.GetNameIndex(target_node_id)}); // this makes sure that the segment with the lowest position comes first - std::sort( - segments.begin(), segments.end(), [](const NamedSegment &lhs, const NamedSegment &rhs) { - return lhs.name_id < rhs.name_id || - (lhs.name_id == rhs.name_id && lhs.position < rhs.position); - }); + std::sort(segments.begin(), + segments.end(), + [](const NamedSegment &lhs, const NamedSegment &rhs) + { + return lhs.name_id < rhs.name_id || + (lhs.name_id == rhs.name_id && lhs.position < rhs.position); + }); auto new_end = collapse_segments(segments); segments.resize(new_end - segments.begin()); // Filter out segments with an empty name (name_id == 0) - new_end = std::remove_if(segments.begin(), segments.end(), [](const NamedSegment &segment) { - return segment.name_id == 0; - }); + new_end = std::remove_if(segments.begin(), + segments.end(), + [](const NamedSegment &segment) { return segment.name_id == 0; }); segments.resize(new_end - segments.begin()); // sort descending - std::sort( - segments.begin(), segments.end(), [](const NamedSegment &lhs, const NamedSegment &rhs) { - return lhs.duration > rhs.duration || - (lhs.duration == rhs.duration && lhs.position < rhs.position); - }); + std::sort(segments.begin(), + segments.end(), + [](const NamedSegment &lhs, const NamedSegment &rhs) + { + return lhs.duration > rhs.duration || + (lhs.duration == rhs.duration && lhs.position < rhs.position); + }); // make sure the segments are sorted by position segments.resize(std::min(segments.size(), SegmentNumber)); - std::sort( - segments.begin(), segments.end(), [](const NamedSegment &lhs, const NamedSegment &rhs) { - return lhs.position < rhs.position; - }); + std::sort(segments.begin(), + segments.end(), + [](const NamedSegment &lhs, const NamedSegment &rhs) + { return lhs.position < rhs.position; }); std::array summary; std::fill(summary.begin(), summary.end(), EMPTY_NAMEID); @@ -138,7 +144,8 @@ inline std::string assembleSummary(const datafacade::BaseDataFacade &facade, // transform a name_id into a string containing either the name, or -if the name is empty- // the reference. - const auto name_id_to_string = [&](const NameID name_id) { + const auto name_id_to_string = [&](const NameID name_id) + { const auto name = facade.GetNameForID(name_id); if (!name.empty()) return std::string(name); @@ -178,14 +185,16 @@ inline RouteLeg assembleLeg(const datafacade::BaseDataFacade &facade, const auto target_weight = (target_traversed_in_reverse ? target_node.reverse_weight : target_node.forward_weight); - auto duration = std::accumulate( - route_data.begin(), route_data.end(), 0, [](const double sum, const PathData &data) { - return sum + from_alias(data.duration_until_turn); - }); - auto weight = std::accumulate( - route_data.begin(), route_data.end(), 0, [](const double sum, const PathData &data) { - return sum + from_alias(data.weight_until_turn); - }); + auto duration = std::accumulate(route_data.begin(), + route_data.end(), + 0, + [](const double sum, const PathData &data) + { return sum + from_alias(data.duration_until_turn); }); + auto weight = std::accumulate(route_data.begin(), + route_data.end(), + 0, + [](const double sum, const PathData &data) + { return sum + from_alias(data.weight_until_turn); }); // s // | diff --git a/include/engine/guidance/collapse_scenario_detection.hpp b/include/engine/guidance/collapse_scenario_detection.hpp index b072627c7..47ab9fbf9 100644 --- a/include/engine/guidance/collapse_scenario_detection.hpp +++ b/include/engine/guidance/collapse_scenario_detection.hpp @@ -16,7 +16,7 @@ bool basicCollapsePreconditions(const RouteStepIterator first, // Staggered intersection are very short zig-zags of a few meters. // We do not want to announce these short left-rights or right-lefts: -//  +//   // * -> b a -> * // | or | becomes a -> b // a -> * * -> b @@ -26,7 +26,7 @@ bool isStaggeredIntersection(const RouteStepIterator step_prior_to_intersection, // Two two turns following close after another, we can announce them as a U-Turn if both end up // involving the same (segregated) road. -//  +//   // b < - y // | will be represented by at x, turn around instead of turn left at x, turn left at y // a - > x @@ -42,11 +42,11 @@ bool isNameOszillation(const RouteStepIterator step_prior_to_intersection, // Sometimes, segments names don't match the perceived turns. We try to detect these additional // name changes and issue a combined turn. -//  +//   // | e | // a - b - c // d -//  +//   // can have `a-b` as one name, `b-c-d` as a second. At `b` we would issue a new name, even though // the road turns right after. The offset would only be there due to the broad road at `e` bool maneuverPreceededByNameChange(const RouteStepIterator step_prior_to_intersection, @@ -73,11 +73,11 @@ bool doubleChoiceless(const RouteStepIterator step_entering_intersection, // Due to obvious detection, sometimes we can have straight turns followed by a different turn right // next to each other. We combine both turns into one, if the second turn is without choice -//  -//  e +//   +//   e // a - b - c // ' d -//  +//   // with a main road `abd`, the turn `continue straight` at `b` and `turn left at `c` will become a // `turn left` at `b` bool straightTurnFollowedByChoiceless(const RouteStepIterator step_entering_intersection, diff --git a/include/engine/guidance/collapsing_utility.hpp b/include/engine/guidance/collapsing_utility.hpp index 8d990e194..c0a012198 100644 --- a/include/engine/guidance/collapsing_utility.hpp +++ b/include/engine/guidance/collapsing_utility.hpp @@ -122,9 +122,8 @@ inline bool haveSameMode(const RouteStep &first, const RouteStep &second, const // alias for readability inline bool haveSameName(const RouteStep &lhs, const RouteStep &rhs) { - const auto has_name_or_ref = [](auto const &step) { - return !step.name.empty() || !step.ref.empty(); - }; + const auto has_name_or_ref = [](auto const &step) + { return !step.name.empty() || !step.ref.empty(); }; // make sure empty is not involved if (!has_name_or_ref(lhs) || !has_name_or_ref(rhs)) @@ -151,12 +150,14 @@ inline bool haveSameName(const RouteStep &lhs, const RouteStep &rhs) // alias for readability, both turn right | left inline bool areSameSide(const RouteStep &lhs, const RouteStep &rhs) { - const auto is_left = [](const RouteStep &step) { + const auto is_left = [](const RouteStep &step) + { return hasModifier(step, osrm::guidance::DirectionModifier::Straight) || hasLeftModifier(step.maneuver.instruction); }; - const auto is_right = [](const RouteStep &step) { + const auto is_right = [](const RouteStep &step) + { return hasModifier(step, osrm::guidance::DirectionModifier::Straight) || hasRightModifier(step.maneuver.instruction); }; @@ -174,7 +175,8 @@ inline std::vector removeNoTurnInstructions(std::vector st // Two valid NO_TURNs exist in each leg in the form of Depart/Arrive // keep valid instructions - const auto not_is_valid = [](const RouteStep &step) { + const auto not_is_valid = [](const RouteStep &step) + { return step.maneuver.instruction == osrm::guidance::TurnInstruction::NO_TURN() && step.maneuver.waypoint_type == WaypointType::None; }; @@ -225,7 +227,8 @@ inline double totalTurnAngle(const RouteStep &entry_step, const RouteStep &exit_ inline bool bearingsAreReversed(const double bearing_in, const double bearing_out) { // Nearly perfectly reversed angles have a difference close to 180 degrees (straight) - const double left_turn_angle = [&]() { + const double left_turn_angle = [&]() + { if (0 <= bearing_out && bearing_out <= bearing_in) return bearing_in - bearing_out; return bearing_in + 360 - bearing_out; diff --git a/include/engine/guidance/postprocessing_toolkit.hpp b/include/engine/guidance/postprocessing_toolkit.hpp index f861ed3c3..0dda0e4e5 100644 --- a/include/engine/guidance/postprocessing_toolkit.hpp +++ b/include/engine/guidance/postprocessing_toolkit.hpp @@ -20,14 +20,16 @@ template inline Fn forEachRoundabout(Iter first, It { while (first != last) { - const auto enter = std::find_if(first, last, [](const RouteStep &step) { - return entersRoundabout(step.maneuver.instruction); - }); + const auto enter = std::find_if(first, + last, + [](const RouteStep &step) + { return entersRoundabout(step.maneuver.instruction); }); // enter has to come before leave, otherwise: faulty data / partial roundabout, skip those - const auto leave = std::find_if(enter, last, [](const RouteStep &step) { - return leavesRoundabout(step.maneuver.instruction); - }); + const auto leave = std::find_if(enter, + last, + [](const RouteStep &step) + { return leavesRoundabout(step.maneuver.instruction); }); // No roundabouts, or partial one (like start / end inside a roundabout) if (enter == last || leave == last) diff --git a/include/engine/phantom_node.hpp b/include/engine/phantom_node.hpp index 19bdde520..c7d0c0bf2 100644 --- a/include/engine/phantom_node.hpp +++ b/include/engine/phantom_node.hpp @@ -259,10 +259,10 @@ inline util::Coordinate candidatesInputLocation(const PhantomNodeCandidates &can inline bool candidatesHaveComponent(const PhantomNodeCandidates &candidates, uint32_t component_id) { - return std::any_of( - candidates.begin(), candidates.end(), [component_id](const PhantomNode &node) { - return node.component.id == component_id; - }); + return std::any_of(candidates.begin(), + candidates.end(), + [component_id](const PhantomNode &node) + { return node.component.id == component_id; }); } struct PhantomEndpoints diff --git a/include/engine/plugins/plugin_base.hpp b/include/engine/plugins/plugin_base.hpp index 375456897..5fb0ffc58 100644 --- a/include/engine/plugins/plugin_base.hpp +++ b/include/engine/plugins/plugin_base.hpp @@ -33,10 +33,10 @@ class BasePlugin bool CheckAllCoordinates(const std::vector &coordinates) const { - return !std::any_of( - std::begin(coordinates), std::end(coordinates), [](const util::Coordinate coordinate) { - return !coordinate.IsValid(); - }); + return !std::any_of(std::begin(coordinates), + std::end(coordinates), + [](const util::Coordinate coordinate) + { return !coordinate.IsValid(); }); } bool CheckAlgorithms(const api::BaseParameters ¶ms, @@ -105,45 +105,45 @@ class BasePlugin { // are all phantoms from a tiny cc? const auto all_in_same_tiny_component = - [](const std::vector &alts_list) { - return std::any_of( - alts_list.front().first.begin(), - alts_list.front().first.end(), - // For each of the first possible phantoms, check if all other - // positions in the list have a phantom from the same small component. - [&](const PhantomNode &phantom) { - if (!phantom.component.is_tiny) - { - return false; - } - const auto component_id = phantom.component.id; - return std::all_of( - std::next(alts_list.begin()), - std::end(alts_list), - [component_id](const PhantomCandidateAlternatives &alternatives) { - return candidatesHaveComponent(alternatives.first, component_id); - }); - }); - }; + [](const std::vector &alts_list) + { + return std::any_of( + alts_list.front().first.begin(), + alts_list.front().first.end(), + // For each of the first possible phantoms, check if all other + // positions in the list have a phantom from the same small component. + [&](const PhantomNode &phantom) + { + if (!phantom.component.is_tiny) + { + return false; + } + const auto component_id = phantom.component.id; + return std::all_of( + std::next(alts_list.begin()), + std::end(alts_list), + [component_id](const PhantomCandidateAlternatives &alternatives) + { return candidatesHaveComponent(alternatives.first, component_id); }); + }); + }; // Move the alternative into the final list - const auto fallback_to_big_component = [](PhantomCandidateAlternatives &alternatives) { + const auto fallback_to_big_component = [](PhantomCandidateAlternatives &alternatives) + { auto no_big_alternative = alternatives.second.empty(); return no_big_alternative ? std::move(alternatives.first) : std::move(alternatives.second); }; // Move the alternative into the final list - const auto use_closed_phantom = [](PhantomCandidateAlternatives &alternatives) { - return std::move(alternatives.first); - }; + const auto use_closed_phantom = [](PhantomCandidateAlternatives &alternatives) + { return std::move(alternatives.first); }; const auto no_alternatives = std::all_of(alternatives_list.begin(), alternatives_list.end(), - [](const PhantomCandidateAlternatives &alternatives) { - return alternatives.second.empty(); - }); + [](const PhantomCandidateAlternatives &alternatives) + { return alternatives.second.empty(); }); std::vector snapped_phantoms; snapped_phantoms.reserve(alternatives_list.size()); @@ -313,12 +313,12 @@ class BasePlugin alternatives.end(), coordinates.begin(), coordinates.end(), - [](const auto &candidates_pair, const auto &coordinate) { + [](const auto &candidates_pair, const auto &coordinate) + { return std::any_of(candidates_pair.first.begin(), candidates_pair.first.end(), - [&](const auto &phantom) { - return phantom.input_location == coordinate; - }); + [&](const auto &phantom) + { return phantom.input_location == coordinate; }); }); std::size_t missing_index = std::distance(alternatives.begin(), mismatch.first); return std::string("Could not find a matching segment for coordinate ") + diff --git a/include/engine/polyline_compressor.hpp b/include/engine/polyline_compressor.hpp index f313ccfe5..b2a505764 100644 --- a/include/engine/polyline_compressor.hpp +++ b/include/engine/polyline_compressor.hpp @@ -39,7 +39,8 @@ std::string encodePolyline(CoordVectorForwardIter begin, CoordVectorForwardIter begin, end, [&delta_numbers, ¤t_lat, ¤t_lon, coordinate_to_polyline]( - const util::Coordinate loc) { + const util::Coordinate loc) + { const int lat_diff = std::round(static_cast(loc.lat) * coordinate_to_polyline) - current_lat; const int lon_diff = diff --git a/include/engine/routing_algorithms/routing_base.hpp b/include/engine/routing_algorithms/routing_base.hpp index 4d56f86d6..15c5ea55a 100644 --- a/include/engine/routing_algorithms/routing_base.hpp +++ b/include/engine/routing_algorithms/routing_base.hpp @@ -190,8 +190,10 @@ void annotatePath(const FacadeT &facade, std::vector duration_vector; std::vector datasource_vector; - const auto get_segment_geometry = [&](const auto geometry_index) { - const auto copy = [](auto &vector, const auto range) { + const auto get_segment_geometry = [&](const auto geometry_index) + { + const auto copy = [](auto &vector, const auto range) + { vector.resize(range.size()); std::copy(range.begin(), range.end(), vector.begin()); }; diff --git a/include/engine/routing_algorithms/routing_base_ch.hpp b/include/engine/routing_algorithms/routing_base_ch.hpp index 7ac0530d8..2714e025b 100644 --- a/include/engine/routing_algorithms/routing_base_ch.hpp +++ b/include/engine/routing_algorithms/routing_base_ch.hpp @@ -294,9 +294,9 @@ EdgeDistance calculateEBGNodeAnnotations(const DataFacade &facade, // Look for an edge on the forward CH graph (.forward) EdgeID smaller_edge_id = - facade.FindSmallestEdge(std::get<0>(edge), std::get<1>(edge), [](const auto &data) { - return data.forward; - }); + facade.FindSmallestEdge(std::get<0>(edge), + std::get<1>(edge), + [](const auto &data) { return data.forward; }); // If we didn't find one there, the we might be looking at a part of the path that // was found using the backward search. Here, we flip the node order (.second, @@ -381,7 +381,8 @@ void unpackPath(const FacadeT &facade, unpackPath(facade, packed_path_begin, packed_path_end, - [&](std::pair &edge, const auto &edge_id) { + [&](std::pair &edge, const auto &edge_id) + { BOOST_ASSERT(edge.first == unpacked_nodes.back()); unpacked_nodes.push_back(edge.second); unpacked_edges.push_back(edge_id); diff --git a/include/engine/routing_algorithms/routing_base_mld.hpp b/include/engine/routing_algorithms/routing_base_mld.hpp index 39e93c5df..c577c3be3 100644 --- a/include/engine/routing_algorithms/routing_base_mld.hpp +++ b/include/engine/routing_algorithms/routing_base_mld.hpp @@ -30,7 +30,8 @@ inline LevelID getNodeQueryLevel(const MultiLevelPartition &partition, const PhantomNode &source, const PhantomNode &target) { - auto level = [&partition, node](const SegmentID &source, const SegmentID &target) { + auto level = [&partition, node](const SegmentID &source, const SegmentID &target) + { if (source.enabled && target.enabled) return partition.GetQueryLevel(source.id, target.id, node); return INVALID_LEVEL_ID; @@ -59,7 +60,8 @@ inline LevelID getNodeQueryLevel(const MultiLevelPartition &partition, endpoint_candidates.source_phantoms.begin(), endpoint_candidates.source_phantoms.end(), INVALID_LEVEL_ID, - [&](LevelID current_level, const PhantomNode &source) { + [&](LevelID current_level, const PhantomNode &source) + { return std::min( current_level, getNodeQueryLevel(partition, node, source, endpoint_candidates.target_phantom)); @@ -76,7 +78,8 @@ inline LevelID getNodeQueryLevel(const MultiLevelPartition &partition, endpoint_candidates.source_phantoms.begin(), endpoint_candidates.source_phantoms.end(), INVALID_LEVEL_ID, - [&](LevelID level_1, const PhantomNode &source) { + [&](LevelID level_1, const PhantomNode &source) + { return std::min( level_1, std::accumulate(endpoint_candidates.target_phantoms.begin(), @@ -119,7 +122,8 @@ inline LevelID getNodeQueryLevel(const MultiLevelPartition &partition, const NodeID node, const PhantomNodeCandidates &candidates) { - auto highest_different_level = [&partition, node](const SegmentID &segment) { + auto highest_different_level = [&partition, node](const SegmentID &segment) + { return segment.enabled ? partition.GetHighestDifferentLevel(segment.id, node) : INVALID_LEVEL_ID; }; @@ -128,7 +132,8 @@ inline LevelID getNodeQueryLevel(const MultiLevelPartition &partition, std::accumulate(candidates.begin(), candidates.end(), INVALID_LEVEL_ID, - [&](LevelID current_level, const PhantomNode &phantom_node) { + [&](LevelID current_level, const PhantomNode &phantom_node) + { auto highest_level = std::min(highest_different_level(phantom_node.forward_segment_id), highest_different_level(phantom_node.reverse_segment_id)); @@ -151,9 +156,11 @@ inline LevelID getNodeQueryLevel(const MultiLevelPartition &partition, // This is equivalent to min_{∀ source, target} partition.GetQueryLevel(source, node, target) auto init = getNodeQueryLevel(partition, node, candidates_list[phantom_index]); auto result = std::accumulate( - phantom_indices.begin(), phantom_indices.end(), init, [&](LevelID level, size_t index) { - return std::min(level, getNodeQueryLevel(partition, node, candidates_list[index])); - }); + phantom_indices.begin(), + phantom_indices.end(), + init, + [&](LevelID level, size_t index) + { return std::min(level, getNodeQueryLevel(partition, node, candidates_list[index])); }); return result; } } // namespace @@ -266,7 +273,7 @@ template void relaxOutgoingEdges(const DataFacade &facade, typename SearchEngineData::QueryHeap &forward_heap, const typename SearchEngineData::QueryHeap::HeapNode &heapNode, - const Args &... args) + const Args &...args) { const auto &partition = facade.GetMultiLevelPartition(); const auto &cells = facade.GetCellStorage(); @@ -384,7 +391,7 @@ void routingStep(const DataFacade &facade, EdgeWeight &path_upper_bound, const std::vector &force_loop_forward_nodes, const std::vector &force_loop_reverse_nodes, - const Args &... args) + const Args &...args) { const auto heapNode = forward_heap.DeleteMinGetHeapNode(); const auto weight = heapNode.weight; @@ -434,7 +441,7 @@ UnpackedPath search(SearchEngineData &engine_working_data, const std::vector &force_loop_forward_nodes, const std::vector &force_loop_reverse_nodes, EdgeWeight weight_upper_bound, - const Args &... args) + const Args &...args) { if (forward_heap.Empty() || reverse_heap.Empty()) { @@ -601,7 +608,8 @@ void unpackPath(const FacadeT &facade, util::for_each_pair( packed_path_begin, packed_path_end, - [&facade, &unpacked_nodes, &unpacked_edges](const auto from, const auto to) { + [&facade, &unpacked_nodes, &unpacked_edges](const auto from, const auto to) + { unpacked_nodes.push_back(to); unpacked_edges.push_back(facade.FindEdge(from, to)); }); diff --git a/include/engine/routing_algorithms/shortest_path_impl.hpp b/include/engine/routing_algorithms/shortest_path_impl.hpp index f23ae7654..c21295236 100644 --- a/include/engine/routing_algorithms/shortest_path_impl.hpp +++ b/include/engine/routing_algorithms/shortest_path_impl.hpp @@ -19,8 +19,7 @@ void searchWithUTurn(SearchEngineData &engine_working_data, typename SearchEngineData::QueryHeap &forward_heap, typename SearchEngineData::QueryHeap &reverse_heap, const PhantomEndpointCandidates &candidates, - const EdgeWeight &total_weight, - EdgeWeight &new_total_weight, + EdgeWeight &leg_weight, std::vector &leg_packed_path) { forward_heap.Clear(); @@ -31,14 +30,14 @@ void searchWithUTurn(SearchEngineData &engine_working_data, if (source.IsValidForwardSource()) { forward_heap.Insert(source.forward_segment_id.id, - total_weight - source.GetForwardWeightPlusOffset(), + EdgeWeight{0} - source.GetForwardWeightPlusOffset(), source.forward_segment_id.id); } if (source.IsValidReverseSource()) { forward_heap.Insert(source.reverse_segment_id.id, - total_weight - source.GetReverseWeightPlusOffset(), + EdgeWeight{0} - source.GetReverseWeightPlusOffset(), source.reverse_segment_id.id); } } @@ -62,10 +61,10 @@ void searchWithUTurn(SearchEngineData &engine_working_data, facade, forward_heap, reverse_heap, - new_total_weight, + leg_weight, leg_packed_path, - getForwardLoopNodes(candidates), - getBackwardLoopNodes(candidates), + {}, + {}, candidates); } @@ -248,7 +247,8 @@ constructRouteResult(const DataFacade &facade, auto source_it = std::find_if(source_candidates.begin(), source_candidates.end(), - [&start_node](const auto &source_phantom) { + [&start_node](const auto &source_phantom) + { return (start_node == source_phantom.forward_segment_id.id || start_node == source_phantom.reverse_segment_id.id); }); @@ -257,7 +257,8 @@ constructRouteResult(const DataFacade &facade, auto target_it = std::find_if(target_candidates.begin(), target_candidates.end(), - [&end_node](const auto &target_phantom) { + [&end_node](const auto &target_phantom) + { return (end_node == target_phantom.forward_segment_id.id || end_node == target_phantom.reverse_segment_id.id); }); @@ -302,7 +303,7 @@ shortestPathWithWaypointUTurns(SearchEngineData &engine_working_data, PhantomEndpointCandidates search_candidates{waypoint_candidates[i], waypoint_candidates[i + 1]}; std::vector packed_leg; - EdgeWeight new_total_weight = INVALID_EDGE_WEIGHT; + EdgeWeight leg_weight = INVALID_EDGE_WEIGHT; // We have a valid path up to this leg BOOST_ASSERT(total_weight != INVALID_EDGE_WEIGHT); @@ -311,16 +312,15 @@ shortestPathWithWaypointUTurns(SearchEngineData &engine_working_data, forward_heap, reverse_heap, search_candidates, - total_weight, - new_total_weight, + leg_weight, packed_leg); - if (new_total_weight == INVALID_EDGE_WEIGHT) + if (leg_weight == INVALID_EDGE_WEIGHT) return {}; packed_leg_begin.push_back(total_packed_path.size()); total_packed_path.insert(total_packed_path.end(), packed_leg.begin(), packed_leg.end()); - total_weight = new_total_weight; + total_weight += leg_weight; }; // Add sentinel @@ -466,16 +466,16 @@ struct route_state last.total_weight_to_forward.resize(init_candidates.size(), {0}); last.total_weight_to_reverse.resize(init_candidates.size(), {0}); // Initialize routability from source validity. - std::transform( - init_candidates.begin(), - init_candidates.end(), - std::back_inserter(last.reached_forward_node_target), - [](const PhantomNode &phantom_node) { return phantom_node.IsValidForwardSource(); }); - std::transform( - init_candidates.begin(), - init_candidates.end(), - std::back_inserter(last.reached_reverse_node_target), - [](const PhantomNode &phantom_node) { return phantom_node.IsValidReverseSource(); }); + std::transform(init_candidates.begin(), + init_candidates.end(), + std::back_inserter(last.reached_forward_node_target), + [](const PhantomNode &phantom_node) + { return phantom_node.IsValidForwardSource(); }); + std::transform(init_candidates.begin(), + init_candidates.end(), + std::back_inserter(last.reached_reverse_node_target), + [](const PhantomNode &phantom_node) + { return phantom_node.IsValidReverseSource(); }); } bool completeLeg() @@ -613,15 +613,21 @@ struct route_state { // Find the segment from final leg with the shortest path auto forward_range = util::irange(0UL, last.total_weight_to_forward.size()); - auto forward_min = - std::min_element(forward_range.begin(), forward_range.end(), [&](size_t a, size_t b) { + auto forward_min = std::min_element( + forward_range.begin(), + forward_range.end(), + [&](size_t a, size_t b) + { return (last.total_weight_to_forward[a] < last.total_weight_to_forward[b] || (last.total_weight_to_forward[a] == last.total_weight_to_forward[b] && last.total_nodes_to_forward[a] < last.total_nodes_to_forward[b])); }); auto reverse_range = util::irange(0UL, last.total_weight_to_reverse.size()); - auto reverse_min = - std::min_element(reverse_range.begin(), reverse_range.end(), [&](size_t a, size_t b) { + auto reverse_min = std::min_element( + reverse_range.begin(), + reverse_range.end(), + [&](size_t a, size_t b) + { return (last.total_weight_to_reverse[a] < last.total_weight_to_reverse[b] || (last.total_weight_to_reverse[a] == last.total_weight_to_reverse[b] && last.total_nodes_to_reverse[a] < last.total_nodes_to_reverse[b])); diff --git a/include/extractor/class_data.hpp b/include/extractor/class_data.hpp index 99cb02e03..87945a0b0 100644 --- a/include/extractor/class_data.hpp +++ b/include/extractor/class_data.hpp @@ -27,9 +27,9 @@ inline auto getClassData(const std::size_t index) inline bool isValidClassName(const std::string &name) { - return std::find_if_not(name.begin(), name.end(), [](const auto c) { - return std::isalnum(c); - }) == name.end(); + return std::find_if_not(name.begin(), + name.end(), + [](const auto c) { return std::isalnum(c); }) == name.end(); } } // namespace osrm::extractor diff --git a/include/extractor/extraction_helper_functions.hpp b/include/extractor/extraction_helper_functions.hpp index 8156e4718..94b52db15 100644 --- a/include/extractor/extraction_helper_functions.hpp +++ b/include/extractor/extraction_helper_functions.hpp @@ -125,9 +125,8 @@ inline std::string canonicalizeStringList(std::string strlist, const std::string // collapse spaces; this is needed in case we expand "; X" => "; X" above // but also makes sense to do irregardless of the fact - canonicalizing strings. - const auto spaces = [](unsigned char lhs, unsigned char rhs) { - return ::isspace(lhs) && ::isspace(rhs); - }; + const auto spaces = [](unsigned char lhs, unsigned char rhs) + { return ::isspace(lhs) && ::isspace(rhs); }; auto it = std::unique(begin(strlist), end(strlist), spaces); strlist.erase(it, end(strlist)); diff --git a/include/extractor/extraction_relation.hpp b/include/extractor/extraction_relation.hpp index 0e3332951..94012b6e0 100644 --- a/include/extractor/extraction_relation.hpp +++ b/include/extractor/extraction_relation.hpp @@ -133,7 +133,8 @@ class ExtractionRelationContainer (void)res; // prevent unused warning in release } - auto MergeRefMap = [&](RelationRefMap &source, RelationRefMap &target) { + auto MergeRefMap = [&](RelationRefMap &source, RelationRefMap &target) + { for (auto it : source) { auto &v = target[it.first]; @@ -151,7 +152,8 @@ class ExtractionRelationContainer const RelationIDList &GetRelations(const OsmIDTyped &member_id) const { auto getFromMap = [this](std::uint64_t id, - const RelationRefMap &map) -> const RelationIDList & { + const RelationRefMap &map) -> const RelationIDList & + { auto it = map.find(id); if (it != map.end()) return it->second; diff --git a/include/extractor/extraction_segment.hpp b/include/extractor/extraction_segment.hpp index f6bda5e48..ce646685e 100644 --- a/include/extractor/extraction_segment.hpp +++ b/include/extractor/extraction_segment.hpp @@ -1,6 +1,7 @@ #ifndef OSRM_EXTRACTION_SEGMENT_HPP #define OSRM_EXTRACTION_SEGMENT_HPP +#include #include namespace osrm::extractor @@ -12,9 +13,10 @@ struct ExtractionSegment const osrm::util::Coordinate target_, double distance_, double weight_, - double duration_) + double duration_, + const NodeBasedEdgeClassification flags_) : source(source_), target(target_), distance(distance_), weight(weight_), - duration(duration_) + duration(duration_), flags(flags_) { } @@ -23,6 +25,7 @@ struct ExtractionSegment const double distance; double weight; double duration; + const NodeBasedEdgeClassification flags; }; } // namespace osrm::extractor diff --git a/include/extractor/files.hpp b/include/extractor/files.hpp index f3f759470..bb4a4a2bd 100644 --- a/include/extractor/files.hpp +++ b/include/extractor/files.hpp @@ -453,7 +453,8 @@ void readRawNBGraph(const boost::filesystem::path &path, coordinates.resize(number_of_nodes); osm_node_ids.reserve(number_of_nodes); auto index = 0; - auto decode = [&](const auto ¤t_node) { + auto decode = [&](const auto ¤t_node) + { coordinates[index].lon = current_node.lon; coordinates[index].lat = current_node.lat; osm_node_ids.push_back(current_node.node_id); diff --git a/include/extractor/graph_compressor.hpp b/include/extractor/graph_compressor.hpp index ba518e210..960bd64ff 100644 --- a/include/extractor/graph_compressor.hpp +++ b/include/extractor/graph_compressor.hpp @@ -24,7 +24,7 @@ class GraphCompressor public: void Compress(const std::unordered_set &barrier_nodes, - const TrafficSignals &traffic_signals, + TrafficSignals &traffic_signals, ScriptingEnvironment &scripting_environment, std::vector &turn_restrictions, std::vector &maneuver_overrides, diff --git a/include/extractor/intersection/intersection_view.hpp b/include/extractor/intersection/intersection_view.hpp index 2da17db6a..c1517c65f 100644 --- a/include/extractor/intersection/intersection_view.hpp +++ b/include/extractor/intersection/intersection_view.hpp @@ -26,16 +26,14 @@ namespace osrm::extractor::intersection inline auto makeCompareAngularDeviation(const double angle) { - return [angle](const auto &lhs, const auto &rhs) { - return util::angularDeviation(lhs.angle, angle) < util::angularDeviation(rhs.angle, angle); - }; + return [angle](const auto &lhs, const auto &rhs) + { return util::angularDeviation(lhs.angle, angle) < util::angularDeviation(rhs.angle, angle); }; } inline auto makeExtractLanesForRoad(const util::NodeBasedDynamicGraph &node_based_graph) { - return [&node_based_graph](const auto &road) { - return node_based_graph.GetEdgeData(road.eid).road_classification.GetNumberOfLanes(); - }; + return [&node_based_graph](const auto &road) + { return node_based_graph.GetEdgeData(road.eid).road_classification.GetNumberOfLanes(); }; } // When viewing an intersection from an incoming edge, we can transform a shape into a view which @@ -63,7 +61,10 @@ template struct EnableShapeOps auto FindClosestBearing(double base_bearing) const { return std::min_element( - self()->begin(), self()->end(), [base_bearing](const auto &lhs, const auto &rhs) { + self()->begin(), + self()->end(), + [base_bearing](const auto &lhs, const auto &rhs) + { return util::angularDeviation(lhs.perceived_bearing, base_bearing) < util::angularDeviation(rhs.perceived_bearing, base_bearing); }); @@ -81,7 +82,8 @@ template struct EnableShapeOps BOOST_ASSERT(!self()->empty()); auto initial = converter(self()->front()); - const auto extract_maximal_value = [&initial, converter](const auto &road) { + const auto extract_maximal_value = [&initial, converter](const auto &road) + { initial = std::max(initial, converter(road)); return false; }; @@ -191,8 +193,10 @@ template struct EnableIntersectionOps auto findClosestTurn(const double angle, const UnaryPredicate filter) const { BOOST_ASSERT(!self()->empty()); - const auto candidate = - boost::range::min_element(*self(), [angle, &filter](const auto &lhs, const auto &rhs) { + const auto candidate = boost::range::min_element( + *self(), + [angle, &filter](const auto &lhs, const auto &rhs) + { const auto filtered_lhs = filter(lhs), filtered_rhs = filter(rhs); const auto deviation_lhs = util::angularDeviation(lhs.angle, angle), deviation_rhs = util::angularDeviation(rhs.angle, angle); diff --git a/include/extractor/node_based_graph_factory.hpp b/include/extractor/node_based_graph_factory.hpp index 29cc25ac4..c69842d3c 100644 --- a/include/extractor/node_based_graph_factory.hpp +++ b/include/extractor/node_based_graph_factory.hpp @@ -39,7 +39,7 @@ class NodeBasedGraphFactory NodeBasedGraphFactory(ScriptingEnvironment &scripting_environment, std::vector &turn_restrictions, std::vector &maneuver_overrides, - const TrafficSignals &traffic_signals, + TrafficSignals &traffic_signals, std::unordered_set &&barriers, std::vector &&coordinates, extractor::PackedOSMIDs &&osm_node_ids, @@ -71,7 +71,7 @@ class NodeBasedGraphFactory void Compress(ScriptingEnvironment &scripting_environment, std::vector &turn_restrictions, std::vector &maneuver_overrides, - const TrafficSignals &traffic_signals); + TrafficSignals &traffic_signals); // Most ways are bidirectional, making the geometry in forward and backward direction the same, // except for reversal. We make use of this fact by keeping only one representation of the diff --git a/include/extractor/node_restriction_map.hpp b/include/extractor/node_restriction_map.hpp index 1a0b7303a..6c65a6592 100644 --- a/include/extractor/node_restriction_map.hpp +++ b/include/extractor/node_restriction_map.hpp @@ -32,9 +32,8 @@ template class NodeRestrictionMap // Find all restrictions applicable to (from,via,to) turns auto Restrictions(NodeID from, NodeID via, NodeID to) const { - const auto turnFilter = [this, to](const auto &restriction) { - return index_filter(restriction) && restriction->IsTurnRestricted(to); - }; + const auto turnFilter = [this, to](const auto &restriction) + { return index_filter(restriction) && restriction->IsTurnRestricted(to); }; return getRange(from, via) | boost::adaptors::filtered(turnFilter); }; diff --git a/include/extractor/traffic_signals.hpp b/include/extractor/traffic_signals.hpp index a70d67d54..739b57bcb 100644 --- a/include/extractor/traffic_signals.hpp +++ b/include/extractor/traffic_signals.hpp @@ -19,6 +19,21 @@ struct TrafficSignals { return bidirectional_nodes.count(to) > 0 || unidirectional_segments.count({from, to}) > 0; } + + void Compress(NodeID from, NodeID via, NodeID to) + { + bidirectional_nodes.erase(via); + if (unidirectional_segments.count({via, to})) + { + unidirectional_segments.erase({via, to}); + unidirectional_segments.insert({from, to}); + } + if (unidirectional_segments.count({via, from})) + { + unidirectional_segments.erase({via, from}); + unidirectional_segments.insert({to, from}); + } + } }; } // namespace osrm::extractor diff --git a/include/guidance/intersection_handler.hpp b/include/guidance/intersection_handler.hpp index 2c922510b..5a7068e40 100644 --- a/include/guidance/intersection_handler.hpp +++ b/include/guidance/intersection_handler.hpp @@ -186,11 +186,11 @@ IntersectionHandler::IsDistinctNarrowTurn(const EdgeID via_edge, node_data_container.GetAnnotation(candidate_data.annotation_data); auto const candidate_deviation = util::angularDeviation(candidate->angle, STRAIGHT_ANGLE); - auto const num_lanes = [](auto const &data) { - return data.flags.road_classification.GetNumberOfLanes(); - }; + auto const num_lanes = [](auto const &data) + { return data.flags.road_classification.GetNumberOfLanes(); }; - auto const lanes_number_equal = [&](auto const &compare_data) { + auto const lanes_number_equal = [&](auto const &compare_data) + { // Check if the lanes number is the same going from the inbound edge to the compare road return num_lanes(compare_data) > 0 && num_lanes(compare_data) == num_lanes(via_edge_data); }; @@ -209,7 +209,8 @@ IntersectionHandler::IsDistinctNarrowTurn(const EdgeID via_edge, // check if there are other narrow turns are not considered passing a low category or simply // a link of the same type as the potentially obvious turn - auto const is_similar_turn = [&](auto const &road) { + auto const is_similar_turn = [&](auto const &road) + { // 1. Skip the candidate road if (road.eid == candidate->eid) { @@ -404,7 +405,8 @@ IntersectionHandler::IsDistinctWideTurn(const EdgeID via_edge, // Deviation is larger than NARROW_TURN_ANGLE0 here for the candidate // check if there is any turn, that might look just as obvious, even though it might not // be allowed. Entry-allowed isn't considered a valid distinction criterion here - auto const is_similar_turn = [&](auto const &road) { + auto const is_similar_turn = [&](auto const &road) + { // 1. Skip over our candidate if (road.eid == candidate->eid) return false; @@ -502,7 +504,8 @@ std::size_t IntersectionHandler::findObviousTurn(const EdgeID via_edge, node_data_container.GetAnnotation(via_edge_data.annotation_data); // implement a filter, taking out all roads of lower class or different names - auto const continues_on_name_with_higher_class = [&](auto const &road) { + auto const continues_on_name_with_higher_class = [&](auto const &road) + { // it needs to be possible to enter the road if (!road.entry_allowed) return true; @@ -549,7 +552,8 @@ std::size_t IntersectionHandler::findObviousTurn(const EdgeID via_edge, // this check is not part of the main conditions, so that if the turn looks obvious from all // other perspectives, a mode change will not result in different classification - auto const to_index_if_valid = [&](auto const iterator) -> std::size_t { + auto const to_index_if_valid = [&](auto const iterator) -> std::size_t + { auto const &from_data = node_based_graph.GetEdgeData(via_edge); auto const &to_data = node_based_graph.GetEdgeData(iterator->eid); @@ -576,7 +580,8 @@ std::size_t IntersectionHandler::findObviousTurn(const EdgeID via_edge, // opposed to before, we do not care about name changes, again: this is a filter, so internal // false/true will be negated for selection - auto const valid_of_higher_or_same_category = [&](auto const &road) { + auto const valid_of_higher_or_same_category = [&](auto const &road) + { if (!road.entry_allowed) return true; @@ -639,7 +644,8 @@ std::size_t IntersectionHandler::findObviousTurn(const EdgeID via_edge, const auto all_roads_have_same_name = std::all_of(intersection.begin(), intersection.end(), - [id = via_edge_annotation.name_id, this](auto const &road) { + [id = via_edge_annotation.name_id, this](auto const &road) + { auto const data_id = node_based_graph.GetEdgeData(road.eid).annotation_data; auto const name_id = node_data_container.GetAnnotation(data_id).name_id; return (name_id != EMPTY_NAMEID) && (name_id == id); diff --git a/include/nodejs/node_osrm_support.hpp b/include/nodejs/node_osrm_support.hpp index 5296dc4ed..24af5f1b1 100644 --- a/include/nodejs/node_osrm_support.hpp +++ b/include/nodejs/node_osrm_support.hpp @@ -205,9 +205,50 @@ inline engine_config_ptr argumentsToEngineConfig(const Napi::CallbackInfo &args) } } + auto disable_feature_dataset = params.Get("disable_feature_dataset"); + if (disable_feature_dataset.IsArray()) + { + Napi::Array datasets = disable_feature_dataset.As(); + for (uint32_t i = 0; i < datasets.Length(); ++i) + { + Napi::Value dataset = datasets.Get(i); + if (!dataset.IsString()) + { + ThrowError(args.Env(), "disable_feature_dataset list option must be a string"); + return engine_config_ptr(); + } + auto dataset_str = dataset.ToString().Utf8Value(); + if (dataset_str == "ROUTE_GEOMETRY") + { + engine_config->disable_feature_dataset.push_back( + osrm::storage::FeatureDataset::ROUTE_GEOMETRY); + } + else if (dataset_str == "ROUTE_STEPS") + { + engine_config->disable_feature_dataset.push_back( + osrm::storage::FeatureDataset::ROUTE_STEPS); + } + else + { + ThrowError( + args.Env(), + "disable_feature_dataset array can include 'ROUTE_GEOMETRY', 'ROUTE_STEPS'."); + return engine_config_ptr(); + } + } + } + else if (!disable_feature_dataset.IsUndefined()) + { + ThrowError(args.Env(), + "disable_feature_dataset option must be an array and can include the string " + "values 'ROUTE_GEOMETRY', 'ROUTE_STEPS'."); + return engine_config_ptr(); + } + if (!path.IsUndefined()) { - engine_config->storage_config = osrm::StorageConfig(path.ToString().Utf8Value()); + engine_config->storage_config = osrm::StorageConfig(path.ToString().Utf8Value(), + engine_config->disable_feature_dataset); engine_config->use_shared_memory = false; } @@ -317,9 +358,16 @@ inline engine_config_ptr argumentsToEngineConfig(const Napi::CallbackInfo &args) ThrowError(args.Env(), "max_alternatives must be an integral number"); return engine_config_ptr(); } - if (!default_radius.IsUndefined() && !default_radius.IsNumber()) + if (!max_radius_map_matching.IsUndefined() && max_radius_map_matching.IsString() && + max_radius_map_matching.ToString().Utf8Value() != "unlimited") { - ThrowError(args.Env(), "default_radius must be an integral number"); + ThrowError(args.Env(), "max_radius_map_matching must be unlimited or an integral number"); + return engine_config_ptr(); + } + if (!default_radius.IsUndefined() && default_radius.IsString() && + default_radius.ToString().Utf8Value() != "unlimited") + { + ThrowError(args.Env(), "default_radius must be unlimited or an integral number"); return engine_config_ptr(); } @@ -337,10 +385,17 @@ inline engine_config_ptr argumentsToEngineConfig(const Napi::CallbackInfo &args) engine_config->max_results_nearest = max_results_nearest.ToNumber().Int32Value(); if (max_alternatives.IsNumber()) engine_config->max_alternatives = max_alternatives.ToNumber().Int32Value(); + if (max_radius_map_matching.IsNumber()) engine_config->max_radius_map_matching = max_radius_map_matching.ToNumber().DoubleValue(); + else if (max_radius_map_matching.IsString() && + max_radius_map_matching.ToString().Utf8Value() == "unlimited") + engine_config->max_radius_map_matching = -1.0; + if (default_radius.IsNumber()) engine_config->default_radius = default_radius.ToNumber().DoubleValue(); + else if (default_radius.IsString() && default_radius.ToString().Utf8Value() == "unlimited") + engine_config->default_radius = -1.0; return engine_config; } @@ -505,6 +560,10 @@ inline bool argumentsToParameter(const Napi::CallbackInfo &args, { params->approaches.push_back(osrm::Approach::CURB); } + else if (approach_str == "opposite") + { + params->approaches.push_back(osrm::Approach::OPPOSITE); + } else if (approach_str == "unrestricted") { params->approaches.push_back(osrm::Approach::UNRESTRICTED); @@ -512,13 +571,14 @@ inline bool argumentsToParameter(const Napi::CallbackInfo &args, else { ThrowError(args.Env(), - "'approaches' param must be one of [curb, unrestricted]"); + "'approaches' param must be one of [curb, opposite, unrestricted]"); return false; } } else { - ThrowError(args.Env(), "Approach must be a string: [curb, unrestricted] or null"); + ThrowError(args.Env(), + "Approach must be a string: [curb, opposite, unrestricted] or null"); return false; } } diff --git a/include/osrm/datasets.hpp b/include/osrm/datasets.hpp new file mode 100644 index 000000000..dfa63525d --- /dev/null +++ b/include/osrm/datasets.hpp @@ -0,0 +1,15 @@ +#ifndef DATASETS_HPP +#define DATASETS_HPP + +namespace osrm::storage +{ + +enum class FeatureDataset +{ + ROUTE_STEPS, + ROUTE_GEOMETRY, +}; + +} // namespace osrm::storage + +#endif diff --git a/include/osrm/error_codes.hpp b/include/osrm/error_codes.hpp index 531966fd5..476b98309 100644 --- a/include/osrm/error_codes.hpp +++ b/include/osrm/error_codes.hpp @@ -23,7 +23,8 @@ enum ErrorCode FileIOError, UnexpectedEndOfFile, IncompatibleDataset, - UnknownAlgorithm + UnknownAlgorithm, + UnknownFeatureDataset #ifndef NDEBUG // Leave this at the end. In debug mode, we assert that the size of // this enum matches the number of messages we have documented, and __ENDMARKER__ diff --git a/include/partitioner/bisection_graph.hpp b/include/partitioner/bisection_graph.hpp index e6d18530d..52139a85c 100644 --- a/include/partitioner/bisection_graph.hpp +++ b/include/partitioner/bisection_graph.hpp @@ -65,8 +65,8 @@ inline BisectionGraph makeBisectionGraph(const std::vector &co result_edges.reserve(edges.size()); // find the end of edges that belong to node_id - const auto advance_edge_itr = [&edges, &result_edges](const std::size_t node_id, - auto edge_itr) { + const auto advance_edge_itr = [&edges, &result_edges](const std::size_t node_id, auto edge_itr) + { while (edge_itr != edges.end() && edge_itr->source == node_id) { result_edges.push_back(edge_itr->Reduce()); @@ -76,9 +76,9 @@ inline BisectionGraph makeBisectionGraph(const std::vector &co }; // create a bisection node, requires the ID of the node as well as the lower bound to its edges - const auto make_bisection_node = [&edges, &coordinates](const std::size_t node_id, - const auto begin_itr, - const auto end_itr) { + const auto make_bisection_node = + [&edges, &coordinates](const std::size_t node_id, const auto begin_itr, const auto end_itr) + { std::size_t range_begin = std::distance(edges.begin(), begin_itr); std::size_t range_end = std::distance(edges.begin(), end_itr); return BisectionGraph::NodeT(range_begin, range_end, coordinates[node_id], node_id); @@ -102,9 +102,12 @@ std::vector adaptToBisectionEdge(std::vector edge std::vector result; result.reserve(edges.size()); - std::transform(begin(edges), end(edges), std::back_inserter(result), [](const auto &edge) { - return BisectionInputEdge{edge.source, edge.target}; - }); + std::transform(begin(edges), + end(edges), + std::back_inserter(result), + [](const auto &edge) { + return BisectionInputEdge{edge.source, edge.target}; + }); return result; } diff --git a/include/partitioner/cell_storage.hpp b/include/partitioner/cell_storage.hpp index 6229b6b79..e0d315b6a 100644 --- a/include/partitioner/cell_storage.hpp +++ b/include/partitioner/cell_storage.hpp @@ -298,7 +298,8 @@ template class CellStorageImpl auto set_num_nodes_fn, auto set_boundary_offset_fn, auto begin, - auto end) { + auto end) + { BOOST_ASSERT(std::distance(begin, end) > 0); const auto cell_id = begin->first; @@ -316,7 +317,8 @@ template class CellStorageImpl util::for_each_range( level_source_boundary.begin(), level_source_boundary.end(), - [this, insert_cell_boundary](auto begin, auto end) { + [this, insert_cell_boundary](auto begin, auto end) + { insert_cell_boundary( source_boundary, [](auto &cell, auto value) { cell.num_source_nodes = value; }, @@ -327,7 +329,8 @@ template class CellStorageImpl util::for_each_range( level_destination_boundary.begin(), level_destination_boundary.end(), - [this, insert_cell_boundary](auto begin, auto end) { + [this, insert_cell_boundary](auto begin, auto end) + { insert_cell_boundary( destination_boundary, [](auto &cell, auto value) { cell.num_destination_nodes = value; }, diff --git a/include/partitioner/edge_based_graph_reader.hpp b/include/partitioner/edge_based_graph_reader.hpp index 669035682..06b8b6ae9 100644 --- a/include/partitioner/edge_based_graph_reader.hpp +++ b/include/partitioner/edge_based_graph_reader.hpp @@ -64,10 +64,13 @@ std::vector prepareEdgesForUsageInGraph(std::vector output_edges; output_edges.reserve(edges.size()); @@ -77,10 +80,11 @@ std::vector prepareEdgesForUsageInGraph(std::vectorsource; const NodeID target = begin_interval->target; - auto end_interval = - std::find_if_not(begin_interval, edges.end(), [source, target](const auto &edge) { - return std::tie(edge.source, edge.target) == std::tie(source, target); - }); + auto end_interval = std::find_if_not( + begin_interval, + edges.end(), + [source, target](const auto &edge) + { return std::tie(edge.source, edge.target) == std::tie(source, target); }); BOOST_ASSERT(begin_interval != end_interval); // remove eigenloops @@ -144,7 +148,8 @@ graphToEdges(const DynamicEdgeBasedGraph &edge_based_graph) auto max_turn_id = tbb::parallel_reduce( range, NodeID{0}, - [&edge_based_graph](const auto range, NodeID initial) { + [&edge_based_graph](const auto range, NodeID initial) + { NodeID max_turn_id = initial; for (auto node = range.begin(); node < range.end(); ++node) { @@ -159,26 +164,29 @@ graphToEdges(const DynamicEdgeBasedGraph &edge_based_graph) [](const NodeID lhs, const NodeID rhs) { return std::max(lhs, rhs); }); std::vector edges(max_turn_id + 1); - tbb::parallel_for(range, [&](const auto range) { - for (auto node = range.begin(); node < range.end(); ++node) + tbb::parallel_for( + range, + [&](const auto range) { - for (auto edge : edge_based_graph.GetAdjacentEdgeRange(node)) + for (auto node = range.begin(); node < range.end(); ++node) { - const auto &data = edge_based_graph.GetEdgeData(edge); - // we only need to save the forward edges, since the read method will - // convert from forward to bi-directional edges again - if (data.forward) + for (auto edge : edge_based_graph.GetAdjacentEdgeRange(node)) { - auto target = edge_based_graph.GetTarget(edge); - BOOST_ASSERT(data.turn_id <= max_turn_id); - edges[data.turn_id] = extractor::EdgeBasedEdge{node, target, data}; - // only save the forward edge - edges[data.turn_id].data.forward = true; - edges[data.turn_id].data.backward = false; + const auto &data = edge_based_graph.GetEdgeData(edge); + // we only need to save the forward edges, since the read method will + // convert from forward to bi-directional edges again + if (data.forward) + { + auto target = edge_based_graph.GetTarget(edge); + BOOST_ASSERT(data.turn_id <= max_turn_id); + edges[data.turn_id] = extractor::EdgeBasedEdge{node, target, data}; + // only save the forward edge + edges[data.turn_id].data.forward = true; + edges[data.turn_id].data.backward = false; + } } } - } - }); + }); return edges; } diff --git a/include/partitioner/multi_level_graph.hpp b/include/partitioner/multi_level_graph.hpp index 288663b88..0c1c8d75d 100644 --- a/include/partitioner/multi_level_graph.hpp +++ b/include/partitioner/multi_level_graph.hpp @@ -159,10 +159,11 @@ class MultiLevelGraph : public util::StaticGraph auto GetHighestBorderLevel(const MultiLevelPartition &mlp, const ContainerT &edges) const { std::vector highest_border_level(edges.size()); - std::transform( - edges.begin(), edges.end(), highest_border_level.begin(), [&mlp](const auto &edge) { - return mlp.GetHighestDifferentLevel(edge.source, edge.target); - }); + std::transform(edges.begin(), + edges.end(), + highest_border_level.begin(), + [&mlp](const auto &edge) + { return mlp.GetHighestDifferentLevel(edge.source, edge.target); }); return highest_border_level; } @@ -175,7 +176,8 @@ class MultiLevelGraph : public util::StaticGraph tbb::parallel_sort( permutation.begin(), permutation.end(), - [&edges, &highest_border_level](const auto &lhs, const auto &rhs) { + [&edges, &highest_border_level](const auto &lhs, const auto &rhs) + { // sort by source node and then by level in ascending order return std::tie(edges[lhs].source, highest_border_level[lhs], edges[lhs].target) < std::tie(edges[rhs].source, highest_border_level[rhs], edges[rhs].target); @@ -201,11 +203,12 @@ class MultiLevelGraph : public util::StaticGraph auto level_begin = iter; for (auto level : util::irange(0, mlp.GetNumberOfLevels())) { - iter = std::find_if( - iter, edge_and_level_end, [node, level](const auto &edge_and_level) { - return boost::get<0>(edge_and_level).source != node || - boost::get<1>(edge_and_level) != level; - }); + iter = std::find_if(iter, + edge_and_level_end, + [node, level](const auto &edge_and_level) { + return boost::get<0>(edge_and_level).source != node || + boost::get<1>(edge_and_level) != level; + }); EdgeOffset offset = std::distance(level_begin, iter); node_to_edge_offset.push_back(offset); } diff --git a/include/partitioner/multi_level_partition.hpp b/include/partitioner/multi_level_partition.hpp index afdde0b6d..2373ec30e 100644 --- a/include/partitioner/multi_level_partition.hpp +++ b/include/partitioner/multi_level_partition.hpp @@ -207,7 +207,8 @@ template class MultiLevelPartitionImpl final auto lidx = 0UL; util::for_each_pair(level_offsets.begin(), level_offsets.begin() + num_level, - [&](const auto offset, const auto next_offset) { + [&](const auto offset, const auto next_offset) + { // create mask that has `bits` ones at its LSBs. // 000011 BOOST_ASSERT(offset <= NUM_PARTITION_BITS); @@ -274,9 +275,8 @@ template class MultiLevelPartitionImpl final { std::stable_sort(permutation.begin(), permutation.end(), - [&partition](const auto lhs, const auto rhs) { - return partition[lhs] < partition[rhs]; - }); + [&partition](const auto lhs, const auto rhs) + { return partition[lhs] < partition[rhs]; }); } // top down assign new cell ids diff --git a/include/partitioner/partition_graph.hpp b/include/partitioner/partition_graph.hpp index f425a3520..86b3a546d 100644 --- a/include/partitioner/partition_graph.hpp +++ b/include/partitioner/partition_graph.hpp @@ -21,7 +21,7 @@ template class NodeEntryWrapper : public Base { public: template - NodeEntryWrapper(std::size_t edges_begin_, std::size_t edges_end_, Args &&... args) + NodeEntryWrapper(std::size_t edges_begin_, std::size_t edges_end_, Args &&...args) : Base(std::forward(args)...), edges_begin(edges_begin_), edges_end(edges_end_) { } @@ -41,7 +41,7 @@ template class GraphConstructionWrapper : public Base { public: template - GraphConstructionWrapper(const NodeID source_, Args &&... args) + GraphConstructionWrapper(const NodeID source_, Args &&...args) : Base(std::forward(args)...), source(source_) { } diff --git a/include/partitioner/remove_unconnected.hpp b/include/partitioner/remove_unconnected.hpp index c3ad1e521..1b0c9963f 100644 --- a/include/partitioner/remove_unconnected.hpp +++ b/include/partitioner/remove_unconnected.hpp @@ -59,11 +59,13 @@ std::size_t removeUnconnectedBoundaryNodes(const GraphT &edge_based_graph, if (level_index < static_cast(partitions.size() - 1)) { - auto new_end = std::remove_if( - witnesses.begin(), witnesses.end(), [&](const auto &witness) { - return partitions[level_index + 1][node] != - partitions[level_index + 1][witness.id]; - }); + auto new_end = + std::remove_if(witnesses.begin(), + witnesses.end(), + [&](const auto &witness) { + return partitions[level_index + 1][node] != + partitions[level_index + 1][witness.id]; + }); witnesses.resize(new_end - witnesses.begin()); } if (witnesses.size() == 0) @@ -87,10 +89,12 @@ std::size_t removeUnconnectedBoundaryNodes(const GraphT &edge_based_graph, } } - auto best_witness = std::min_element( - witnesses.begin(), witnesses.end(), [](const auto &lhs, const auto &rhs) { - return lhs.induced_border_edges < rhs.induced_border_edges; - }); + auto best_witness = + std::min_element(witnesses.begin(), + witnesses.end(), + [](const auto &lhs, const auto &rhs) { + return lhs.induced_border_edges < rhs.induced_border_edges; + }); BOOST_ASSERT(best_witness != witnesses.end()); // assign `node` to same subcells as `best_witness` diff --git a/include/partitioner/reorder_first_last.hpp b/include/partitioner/reorder_first_last.hpp index b5e5b7798..a5d2b3258 100644 --- a/include/partitioner/reorder_first_last.hpp +++ b/include/partitioner/reorder_first_last.hpp @@ -30,10 +30,10 @@ void reorderFirstLast(RandomIt first, RandomIt last, std::size_t n, Comparator c // requirements. std::reverse_iterator rfirst{last}, rlast{first + n}; - const auto flipped = [](auto fn) { - return [fn](auto &&lhs, auto &&rhs) { - return fn(std::forward(rhs), std::forward(lhs)); - }; + const auto flipped = [](auto fn) + { + return [fn](auto &&lhs, auto &&rhs) + { return fn(std::forward(rhs), std::forward(lhs)); }; }; std::nth_element(rfirst, rfirst + (n - 1), rlast, flipped(comp)); diff --git a/include/server/api/base_parameters_grammar.hpp b/include/server/api/base_parameters_grammar.hpp index dfc99c037..80fda760b 100644 --- a/include/server/api/base_parameters_grammar.hpp +++ b/include/server/api/base_parameters_grammar.hpp @@ -74,16 +74,16 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar : BaseParametersGrammar::base_type(root_rule) { const auto add_hint = [](engine::api::BaseParameters &base_parameters, - const std::vector &hint_strings) { + const std::vector &hint_strings) + { if (!hint_strings.empty()) { std::vector location_hints(hint_strings.size()); std::transform(hint_strings.begin(), hint_strings.end(), location_hints.begin(), - [](const auto &hint_string) { - return engine::SegmentHint::FromBase64(hint_string); - }); + [](const auto &hint_string) + { return engine::SegmentHint::FromBase64(hint_string); }); base_parameters.hints.push_back(engine::Hint{std::move(location_hints)}); } else @@ -94,15 +94,16 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar const auto add_bearing = [](engine::api::BaseParameters &base_parameters, - boost::optional> bearing_range) { - boost::optional bearing; - if (bearing_range) - { - bearing = engine::Bearing{boost::fusion::at_c<0>(*bearing_range), - boost::fusion::at_c<1>(*bearing_range)}; - } - base_parameters.bearings.push_back(std::move(bearing)); - }; + boost::optional> bearing_range) + { + boost::optional bearing; + if (bearing_range) + { + bearing = engine::Bearing{boost::fusion::at_c<0>(*bearing_range), + boost::fusion::at_c<1>(*bearing_range)}; + } + base_parameters.bearings.push_back(std::move(bearing)); + }; polyline_chars = qi::char_("a-zA-Z0-9_.--[]{}@?|\\%~`^"); base64_char = qi::char_("a-zA-Z0-9--_="); @@ -118,7 +119,8 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar location_rule = (double_ > qi::lit(',') > double_)[qi::_val = ph::bind( - [](double lon, double lat) { + [](double lon, double lat) + { return util::Coordinate( util::toFixed(util::UnsafeFloatLongitude{lon}), util::toFixed(util::UnsafeFloatLatitude{lat})); @@ -126,19 +128,17 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar qi::_1, qi::_2)]; - polyline_rule = qi::as_string[qi::lit("polyline(") > +polyline_chars > ')'] - [qi::_val = ph::bind( - [](const std::string &polyline) { - return engine::decodePolyline(polyline); - }, - qi::_1)]; + polyline_rule = + qi::as_string[qi::lit("polyline(") > +polyline_chars > ')'] + [qi::_val = ph::bind([](const std::string &polyline) + { return engine::decodePolyline(polyline); }, + qi::_1)]; - polyline6_rule = qi::as_string[qi::lit("polyline6(") > +polyline_chars > ')'] - [qi::_val = ph::bind( - [](const std::string &polyline) { - return engine::decodePolyline<1000000>(polyline); - }, - qi::_1)]; + polyline6_rule = + qi::as_string[qi::lit("polyline6(") > +polyline_chars > ')'] + [qi::_val = ph::bind([](const std::string &polyline) + { return engine::decodePolyline<1000000>(polyline); }, + qi::_1)]; query_rule = ((location_rule % ';') | polyline_rule | @@ -166,8 +166,9 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar qi::lit("bearings=") > (-(qi::short_ > ',' > qi::short_))[ph::bind(add_bearing, qi::_r1, qi::_1)] % ';'; - approach_type.add("unrestricted", engine::Approach::UNRESTRICTED)("curb", - engine::Approach::CURB); + approach_type.add("unrestricted", engine::Approach::UNRESTRICTED)( + "curb", engine::Approach::CURB)("opposite", engine::Approach::OPPOSITE); + approach_rule = qi::lit("approaches=") > (-approach_type % ';')[ph::bind(&engine::api::BaseParameters::approaches, qi::_r1) = qi::_1]; diff --git a/include/server/api/route_parameters_grammar.hpp b/include/server/api/route_parameters_grammar.hpp index f6cfa0c34..5ef668e6c 100644 --- a/include/server/api/route_parameters_grammar.hpp +++ b/include/server/api/route_parameters_grammar.hpp @@ -54,8 +54,9 @@ struct RouteParametersGrammar : public BaseParametersGrammar { public: - explicit Connection(boost::asio::io_context &io_context, RequestHandler &handler); + explicit Connection(boost::asio::io_context &io_context, + RequestHandler &handler, + short keepalive_timeout); Connection(const Connection &) = delete; Connection &operator=(const Connection &) = delete; diff --git a/include/server/server.hpp b/include/server/server.hpp index 992092484..34b8982e6 100644 --- a/include/server/server.hpp +++ b/include/server/server.hpp @@ -31,18 +31,24 @@ class Server { public: // Note: returns a shared instead of a unique ptr as it is captured in a lambda somewhere else - static std::shared_ptr - CreateServer(std::string &ip_address, int ip_port, unsigned requested_num_threads) + static std::shared_ptr CreateServer(std::string &ip_address, + int ip_port, + unsigned requested_num_threads, + short keepalive_timeout) { util::Log() << "http 1.1 compression handled by zlib version " << zlibVersion(); const unsigned hardware_threads = std::max(1u, std::thread::hardware_concurrency()); const unsigned real_num_threads = std::min(hardware_threads, requested_num_threads); - return std::make_shared(ip_address, ip_port, real_num_threads); + return std::make_shared(ip_address, ip_port, real_num_threads, keepalive_timeout); } - explicit Server(const std::string &address, const int port, const unsigned thread_pool_size) - : thread_pool_size(thread_pool_size), acceptor(io_context), - new_connection(std::make_shared(io_context, request_handler)) + explicit Server(const std::string &address, + const int port, + const unsigned thread_pool_size, + const short keepalive_timeout) + : thread_pool_size(thread_pool_size), keepalive_timeout(keepalive_timeout), + acceptor(io_context), new_connection(std::make_shared( + io_context, request_handler, keepalive_timeout)) { const auto port_string = std::to_string(port); @@ -94,7 +100,8 @@ class Server if (!e) { new_connection->start(); - new_connection = std::make_shared(io_context, request_handler); + new_connection = + std::make_shared(io_context, request_handler, keepalive_timeout); acceptor.async_accept( new_connection->socket(), boost::bind(&Server::HandleAccept, this, boost::asio::placeholders::error)); @@ -107,6 +114,7 @@ class Server RequestHandler request_handler; unsigned thread_pool_size; + short keepalive_timeout; boost::asio::io_context io_context; boost::asio::ip::tcp::acceptor acceptor; std::shared_ptr new_connection; diff --git a/include/storage/io_config.hpp b/include/storage/io_config.hpp index 5f4be92ed..ee6478638 100644 --- a/include/storage/io_config.hpp +++ b/include/storage/io_config.hpp @@ -35,6 +35,11 @@ struct IOConfig return {base_path.string() + fileName}; } + bool IsRequiredConfiguredInput(const std::string &fileName) const + { + return IsConfigured(fileName, required_input_files); + } + boost::filesystem::path base_path; protected: diff --git a/include/storage/serialization.hpp b/include/storage/serialization.hpp index 8fd831d7d..16965638e 100644 --- a/include/storage/serialization.hpp +++ b/include/storage/serialization.hpp @@ -66,7 +66,8 @@ void readBoolVector(tar::FileReader &reader, const std::string &name, VectorT &d using BlockType = std::uint64_t; constexpr std::uint64_t BLOCK_BITS = CHAR_BIT * sizeof(BlockType); - const auto decode = [&](const BlockType block) { + const auto decode = [&](const BlockType block) + { auto read_size = std::min(count - index, BLOCK_BITS); unpackBits(data, index, read_size, block); index += BLOCK_BITS; @@ -87,7 +88,8 @@ void writeBoolVector(tar::FileWriter &writer, const std::string &name, const Vec // FIXME on old boost version the function_input_iterator does not work with lambdas // so we need to wrap it in a function here. - const std::function encode_function = [&]() -> BlockType { + const std::function encode_function = [&]() -> BlockType + { auto write_size = std::min(count - index, BLOCK_BITS); auto packed = packBits(data, index, write_size); index += BLOCK_BITS; diff --git a/include/storage/shared_data_index.hpp b/include/storage/shared_data_index.hpp index fb156f988..fc8212f50 100644 --- a/include/storage/shared_data_index.hpp +++ b/include/storage/shared_data_index.hpp @@ -28,10 +28,10 @@ class SharedDataIndex // Build mapping from block name to region for (auto index : util::irange(0, regions.size())) { - regions[index].layout->List("", - boost::make_function_output_iterator([&](const auto &name) { - block_to_region[name] = index; - })); + regions[index].layout->List( + "", + boost::make_function_output_iterator([&](const auto &name) + { block_to_region[name] = index; })); } } diff --git a/include/storage/shared_datatype.hpp b/include/storage/shared_datatype.hpp index 82d185cec..fae3989a2 100644 --- a/include/storage/shared_datatype.hpp +++ b/include/storage/shared_datatype.hpp @@ -223,9 +223,12 @@ struct SharedRegionRegister // Returns the key of the region with the given name RegionID Find(const std::string &name) const { - auto iter = std::find_if(regions.begin(), regions.end(), [&](const auto ®ion) { - return std::strncmp(region.name, name.c_str(), SharedRegion::MAX_NAME_LENGTH) == 0; - }); + auto iter = std::find_if( + regions.begin(), + regions.end(), + [&](const auto ®ion) { + return std::strncmp(region.name, name.c_str(), SharedRegion::MAX_NAME_LENGTH) == 0; + }); if (iter == regions.end()) { diff --git a/include/storage/shared_memory.hpp b/include/storage/shared_memory.hpp index d5a661bd4..76a385b88 100644 --- a/include/storage/shared_memory.hpp +++ b/include/storage/shared_memory.hpp @@ -113,7 +113,8 @@ class SharedMemory { auto shmid = shm.get_shmid(); ::shmid_ds xsi_ds; - const auto errorToMessage = [](int error) -> std::string { + const auto errorToMessage = [](int error) -> std::string + { switch (error) { case EPERM: diff --git a/include/storage/storage_config.hpp b/include/storage/storage_config.hpp index 012f7784a..3059cddd0 100644 --- a/include/storage/storage_config.hpp +++ b/include/storage/storage_config.hpp @@ -31,10 +31,61 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include "storage/io_config.hpp" +#include "osrm/datasets.hpp" + +#include namespace osrm::storage { +std::istream &operator>>(std::istream &in, FeatureDataset &datasets); + +static std::vector +GetRequiredFiles(const std::vector &disabled_feature_dataset) +{ + std::set required{ + ".osrm.datasource_names", + ".osrm.ebg_nodes", + ".osrm.edges", + ".osrm.fileIndex", + ".osrm.geometry", + ".osrm.icd", + ".osrm.maneuver_overrides", + ".osrm.names", + ".osrm.nbg_nodes", + ".osrm.properties", + ".osrm.ramIndex", + ".osrm.timestamp", + ".osrm.tld", + ".osrm.tls", + ".osrm.turn_duration_penalties", + ".osrm.turn_weight_penalties", + }; + + for (const auto &to_disable : disabled_feature_dataset) + { + switch (to_disable) + { + case FeatureDataset::ROUTE_STEPS: + for (const auto &dataset : {".osrm.icd", ".osrm.tld", ".osrm.tls"}) + { + required.erase(dataset); + } + break; + case FeatureDataset::ROUTE_GEOMETRY: + for (const auto &dataset : + {".osrm.edges", ".osrm.icd", ".osrm.names", ".osrm.tld", ".osrm.tls"}) + { + required.erase(dataset); + } + break; + } + } + + return std::vector(required.begin(), required.end()); + ; +} + /** * Configures OSRM's file storage paths. * @@ -42,34 +93,19 @@ namespace osrm::storage */ struct StorageConfig final : IOConfig { - StorageConfig(const boost::filesystem::path &base) : StorageConfig() + + StorageConfig(const boost::filesystem::path &base, + const std::vector &disabled_feature_datasets_ = {}) + : StorageConfig(disabled_feature_datasets_) { IOConfig::UseDefaultOutputNames(base); } - StorageConfig() - : IOConfig({".osrm.ramIndex", - ".osrm.fileIndex", - ".osrm.edges", - ".osrm.geometry", - ".osrm.turn_weight_penalties", - ".osrm.turn_duration_penalties", - ".osrm.datasource_names", - ".osrm.names", - ".osrm.timestamp", - ".osrm.properties", - ".osrm.icd", - ".osrm.maneuver_overrides"}, - {".osrm.hsgr", - ".osrm.nbg_nodes", - ".osrm.ebg_nodes", - ".osrm.cells", - ".osrm.cell_metrics", - ".osrm.mldgr", - ".osrm.tld", - ".osrm.tls", - ".osrm.partition"}, - {}) + StorageConfig(const std::vector &disabled_feature_datasets_ = {}) + : IOConfig( + GetRequiredFiles(disabled_feature_datasets_), + {".osrm.hsgr", ".osrm.cells", ".osrm.cell_metrics", ".osrm.mldgr", ".osrm.partition"}, + {}) { } }; diff --git a/include/storage/view_factory.hpp b/include/storage/view_factory.hpp index 8279f84c5..88e99e8e8 100644 --- a/include/storage/view_factory.hpp +++ b/include/storage/view_factory.hpp @@ -241,9 +241,9 @@ inline auto make_contracted_metric_view(const SharedDataIndex &index, const std: std::vector> edge_filter; index.List(name + "/exclude", - boost::make_function_output_iterator([&](const auto &filter_name) { - edge_filter.push_back(make_vector_view(index, filter_name)); - })); + boost::make_function_output_iterator( + [&](const auto &filter_name) + { edge_filter.push_back(make_vector_view(index, filter_name)); })); return contractor::ContractedMetricView{{node_list, edge_list}, std::move(edge_filter)}; } diff --git a/include/updater/csv_file_parser.hpp b/include/updater/csv_file_parser.hpp index d51ada156..c8d5d4cde 100644 --- a/include/updater/csv_file_parser.hpp +++ b/include/updater/csv_file_parser.hpp @@ -46,31 +46,36 @@ template struct CSVFilesParser { tbb::spin_mutex mutex; std::vector> lookup; - tbb::parallel_for(std::size_t{0}, csv_filenames.size(), [&](const std::size_t idx) { - auto local = ParseCSVFile(csv_filenames[idx], start_index + idx); + tbb::parallel_for(std::size_t{0}, + csv_filenames.size(), + [&](const std::size_t idx) + { + auto local = ParseCSVFile(csv_filenames[idx], start_index + idx); - { // Merge local CSV results into a flat global vector - tbb::spin_mutex::scoped_lock _{mutex}; - lookup.insert(end(lookup), - std::make_move_iterator(begin(local)), - std::make_move_iterator(end(local))); - } - }); + { // Merge local CSV results into a flat global vector + tbb::spin_mutex::scoped_lock _{mutex}; + lookup.insert(end(lookup), + std::make_move_iterator(begin(local)), + std::make_move_iterator(end(local))); + } + }); // With flattened map-ish view of all the files, make a stable sort on key and source // and unique them on key to keep only the value with the largest file index // and the largest line number in a file. // The operands order is swapped to make descending ordering on (key, source) - tbb::parallel_sort(begin(lookup), end(lookup), [](const auto &lhs, const auto &rhs) { - return std::tie(rhs.first, rhs.second.source) < - std::tie(lhs.first, lhs.second.source); - }); + tbb::parallel_sort(begin(lookup), + end(lookup), + [](const auto &lhs, const auto &rhs) { + return std::tie(rhs.first, rhs.second.source) < + std::tie(lhs.first, lhs.second.source); + }); // Unique only on key to take the source precedence into account and remove duplicates. - const auto it = - std::unique(begin(lookup), end(lookup), [](const auto &lhs, const auto &rhs) { - return lhs.first == rhs.first; - }); + const auto it = std::unique(begin(lookup), + end(lookup), + [](const auto &lhs, const auto &rhs) + { return lhs.first == rhs.first; }); lookup.erase(it, end(lookup)); util::Log() << "In total loaded " << csv_filenames.size() << " file(s) with a total of " diff --git a/include/updater/source.hpp b/include/updater/source.hpp index e97df9bd0..de692363b 100644 --- a/include/updater/source.hpp +++ b/include/updater/source.hpp @@ -14,10 +14,12 @@ template struct LookupTable std::optional operator()(const Key &key) const { using Result = std::optional; - const auto it = std::lower_bound( - lookup.begin(), lookup.end(), key, [](const auto &lhs, const auto &rhs) { - return rhs < lhs.first; - }); + using Result = boost::optional; + const auto it = + std::lower_bound(lookup.begin(), + lookup.end(), + key, + [](const auto &lhs, const auto &rhs) { return rhs < lhs.first; }); return it != std::end(lookup) && !(it->first < key) ? Result(it->second) : Result(); } diff --git a/include/util/alias.hpp b/include/util/alias.hpp index 6a109ffdd..f335f4742 100644 --- a/include/util/alias.hpp +++ b/include/util/alias.hpp @@ -46,7 +46,7 @@ template struct Alias final static_assert(std::is_arithmetic::value, "Needs to be based on an arithmetic type"); From __value; - friend std::ostream &operator<<(std::ostream &stream, const Alias &inst); + friend std::ostream &operator<< (std::ostream &stream, const Alias &inst); explicit operator From &() { return __value; } explicit operator From() const { return __value; } diff --git a/include/util/coordinate.hpp b/include/util/coordinate.hpp index bb03c9107..e19a1bc5e 100644 --- a/include/util/coordinate.hpp +++ b/include/util/coordinate.hpp @@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include #include //for std::ostream #include #include @@ -71,12 +72,20 @@ using FloatLongitude = Alias; // range checks on these (toFixed/toFloat, etc) using UnsafeFloatLatitude = Alias; using UnsafeFloatLongitude = Alias; -static_assert(std::is_pod(), "FixedLatitude is not a valid alias"); -static_assert(std::is_pod(), "FixedLongitude is not a valid alias"); -static_assert(std::is_pod(), "FloatLatitude is not a valid alias"); -static_assert(std::is_pod(), "FloatLongitude is not a valid alias"); -static_assert(std::is_pod(), "UnsafeFloatLatitude is not a valid alias"); -static_assert(std::is_pod(), "UnsafeFloatLongitude is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "FixedLatitude is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "FixedLongitude is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "FloatLatitude is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "FloatLongitude is not a valid alias"); +static_assert(std::is_standard_layout() && + std::is_trivial(), + "UnsafeFloatLatitude is not a valid alias"); +static_assert(std::is_standard_layout() && + std::is_trivial(), + "UnsafeFloatLongitude is not a valid alias"); /** * Converts a typed latitude from floating to fixed representation. diff --git a/include/util/coordinate_calculation.hpp b/include/util/coordinate_calculation.hpp index 53c803a19..e5d79b9c5 100644 --- a/include/util/coordinate_calculation.hpp +++ b/include/util/coordinate_calculation.hpp @@ -179,12 +179,14 @@ template double getLength(iterator_type begin, const iterator_type end, BinaryOperation op) { double result = 0; - const auto functor = [&result, op](const Coordinate lhs, const Coordinate rhs) { + const auto functor = [&result, op](const Coordinate lhs, const Coordinate rhs) + { result += op(lhs, rhs); return false; }; // side-effect find adding up distances - std::adjacent_find(begin, end, functor); + // Ignore return value, we are only interested in the side-effect + [[maybe_unused]] auto _ = std::adjacent_find(begin, end, functor); return result; } @@ -196,13 +198,15 @@ findClosestDistance(const Coordinate coordinate, const iterator_type begin, cons double current_min = std::numeric_limits::max(); // comparator updating current_min without ever finding an element - const auto compute_minimum_distance = [¤t_min, coordinate](const Coordinate lhs, - const Coordinate rhs) { + const auto compute_minimum_distance = + [¤t_min, coordinate](const Coordinate lhs, const Coordinate rhs) + { current_min = std::min(current_min, findClosestDistance(coordinate, lhs, rhs)); return false; }; - std::adjacent_find(begin, end, compute_minimum_distance); + // Ignore return value, we are only interested in the side-effect + [[maybe_unused]] auto _ = std::adjacent_find(begin, end, compute_minimum_distance); return current_min; } @@ -214,8 +218,9 @@ double findClosestDistance(const iterator_type lhs_begin, { double current_min = std::numeric_limits::max(); - const auto compute_minimum_distance_in_rhs = [¤t_min, rhs_begin, rhs_end]( - const Coordinate coordinate) { + const auto compute_minimum_distance_in_rhs = + [¤t_min, rhs_begin, rhs_end](const Coordinate coordinate) + { current_min = std::min(current_min, findClosestDistance(coordinate, rhs_begin, rhs_end)); return false; }; @@ -231,13 +236,11 @@ std::pair leastSquareRegression(const iterator_type begi // following the formulas of https://faculty.elgin.edu/dkernler/statistics/ch04/4-2.html const auto number_of_coordinates = std::distance(begin, end); BOOST_ASSERT(number_of_coordinates >= 2); - const auto extract_lon = [](const Coordinate coordinate) { - return static_cast(toFloating(coordinate.lon)); - }; + const auto extract_lon = [](const Coordinate coordinate) + { return static_cast(toFloating(coordinate.lon)); }; - const auto extract_lat = [](const Coordinate coordinate) { - return static_cast(toFloating(coordinate.lat)); - }; + const auto extract_lat = [](const Coordinate coordinate) + { return static_cast(toFloating(coordinate.lat)); }; double min_lon = extract_lon(*begin); double max_lon = extract_lon(*begin); @@ -260,19 +263,21 @@ std::pair leastSquareRegression(const iterator_type begi { std::vector rotated_coordinates(number_of_coordinates); // rotate all coordinates to the right - std::transform(begin, end, rotated_coordinates.begin(), [](const auto coordinate) { - return rotateCCWAroundZero(coordinate, detail::degToRad(-90)); - }); + std::transform(begin, + end, + rotated_coordinates.begin(), + [](const auto coordinate) + { return rotateCCWAroundZero(coordinate, detail::degToRad(-90)); }); const auto rotated_regression = leastSquareRegression(rotated_coordinates.begin(), rotated_coordinates.end()); return {rotateCCWAroundZero(rotated_regression.first, detail::degToRad(90)), rotateCCWAroundZero(rotated_regression.second, detail::degToRad(90))}; } - const auto make_accumulate = [](const auto extraction_function) { - return [extraction_function](const double sum_so_far, const Coordinate coordinate) { - return sum_so_far + extraction_function(coordinate); - }; + const auto make_accumulate = [](const auto extraction_function) + { + return [extraction_function](const double sum_so_far, const Coordinate coordinate) + { return sum_so_far + extraction_function(coordinate); }; }; const auto accumulated_lon = std::accumulate(begin, end, 0., make_accumulate(extract_lon)); @@ -281,8 +286,10 @@ std::pair leastSquareRegression(const iterator_type begi const auto mean_lon = accumulated_lon / number_of_coordinates; const auto mean_lat = accumulated_lat / number_of_coordinates; - const auto make_variance = [](const auto mean, const auto extraction_function) { - return [extraction_function, mean](const double sum_so_far, const Coordinate coordinate) { + const auto make_variance = [](const auto mean, const auto extraction_function) + { + return [extraction_function, mean](const double sum_so_far, const Coordinate coordinate) + { const auto difference = extraction_function(coordinate) - mean; return sum_so_far + difference * difference; }; @@ -310,7 +317,8 @@ std::pair leastSquareRegression(const iterator_type begi std::accumulate(begin, end, 0., - [&](const auto sum_so_far, const auto current_coordinate) { + [&](const auto sum_so_far, const auto current_coordinate) + { return sum_so_far + (extract_lon(current_coordinate) - mean_lon) * (extract_lat(current_coordinate) - mean_lat) / (sample_variance_lon * sample_variance_lat); @@ -321,9 +329,8 @@ std::pair leastSquareRegression(const iterator_type begi const auto intercept = mean_lat - slope * mean_lon; const auto GetLatAtLon = [intercept, - slope](const util::FloatLongitude longitude) -> util::FloatLatitude { - return {intercept + slope * static_cast((longitude))}; - }; + slope](const util::FloatLongitude longitude) -> util::FloatLatitude + { return {intercept + slope * static_cast((longitude))}; }; const double offset = 0.00001; const Coordinate regression_first = { @@ -357,7 +364,8 @@ bool areParallel(const iterator_type lhs_begin, const auto rotation_angle_radians = detail::degToRad(bearing_lhs - 90); const auto rotated_difference_rhs = rotateCCWAroundZero(difference_rhs, rotation_angle_radians); - const auto get_slope = [](const Coordinate from, const Coordinate to) { + const auto get_slope = [](const Coordinate from, const Coordinate to) + { const auto diff_lat = static_cast(from.lat) - static_cast(to.lat); const auto diff_lon = static_cast(from.lon) - static_cast(to.lon); if (diff_lon == 0) diff --git a/include/util/deallocating_vector.hpp b/include/util/deallocating_vector.hpp index f5f3d1c7d..9cb5641e3 100644 --- a/include/util/deallocating_vector.hpp +++ b/include/util/deallocating_vector.hpp @@ -254,7 +254,7 @@ template class DeallocatingVector ++current_size; } - template void emplace_back(Ts &&... element) + template void emplace_back(Ts &&...element) { const std::size_t current_capacity = capacity(); if (current_size == current_capacity) diff --git a/include/util/dynamic_graph.hpp b/include/util/dynamic_graph.hpp index bbb67a45a..9efbf1402 100644 --- a/include/util/dynamic_graph.hpp +++ b/include/util/dynamic_graph.hpp @@ -68,7 +68,7 @@ template class DynamicGraph } template - InputEdge(NodeIterator source, NodeIterator target, Ts &&... data) + InputEdge(NodeIterator source, NodeIterator target, Ts &&...data) : source(source), target(target), data(std::forward(data)...) { } @@ -189,25 +189,28 @@ template class DynamicGraph other.node_array.resize(node_array.size()); NodeID node_id = 0; - std::transform( - node_array.begin(), node_array.end(), other.node_array.begin(), [&](const Node &node) { - const EdgeIterator first_edge = other.edge_list.size(); + std::transform(node_array.begin(), + node_array.end(), + other.node_array.begin(), + [&](const Node &node) + { + const EdgeIterator first_edge = other.edge_list.size(); - BOOST_ASSERT(node_id < number_of_nodes); - if (filter(node_id++)) - { - std::copy_if(edge_list.begin() + node.first_edge, - edge_list.begin() + node.first_edge + node.edges, - std::back_inserter(other.edge_list), - [&](const auto &edge) { return filter(edge.target); }); - const unsigned num_edges = other.edge_list.size() - first_edge; - return Node{first_edge, num_edges}; - } - else - { - return Node{first_edge, 0}; - } - }); + BOOST_ASSERT(node_id < number_of_nodes); + if (filter(node_id++)) + { + std::copy_if(edge_list.begin() + node.first_edge, + edge_list.begin() + node.first_edge + node.edges, + std::back_inserter(other.edge_list), + [&](const auto &edge) { return filter(edge.target); }); + const unsigned num_edges = other.edge_list.size() - first_edge; + return Node{first_edge, num_edges}; + } + else + { + return Node{first_edge, 0}; + } + }); return other; } diff --git a/include/util/exception.hpp b/include/util/exception.hpp index 702602039..83800563f 100644 --- a/include/util/exception.hpp +++ b/include/util/exception.hpp @@ -62,7 +62,7 @@ class exception : public std::exception * user supplied bad data, etc). */ -constexpr const std::array ErrorDescriptions = {{ +constexpr const std::array ErrorDescriptions = {{ "", // Dummy - ErrorCode values start at 2 "", // Dummy - ErrorCode values start at 2 "Fingerprint did not match the expected value", // InvalidFingerprint @@ -75,7 +75,8 @@ constexpr const std::array ErrorDescriptions = {{ // NOLINTNEXTLINE(bugprone-suspicious-missing-comma) "The dataset you are trying to load is not " // IncompatibleDataset "compatible with the routing algorithm you want to use.", // ...continued... - "Incompatible algorithm" // IncompatibleAlgorithm + "Incompatible algorithm", // IncompatibleAlgorithm + "Unknown feature dataset" // UnknownFeatureDataset }}; #ifndef NDEBUG @@ -84,6 +85,32 @@ static_assert(ErrorDescriptions.size() == ErrorCode::__ENDMARKER__, "ErrorCode list and ErrorDescription lists are different sizes"); #endif +class DisabledDatasetException : public exception +{ + public: + explicit DisabledDatasetException(const std::string &dataset_) + : exception(BuildMessage(dataset_)), dataset(dataset_) + { + } + + const std::string &Dataset() const { return dataset; } + + private: + // This function exists to 'anchor' the class, and stop the compiler from + // copying vtable and RTTI info into every object file that includes + // this header. (Caught by -Wweak-vtables under Clang.) + virtual void anchor() const override; + const std::string dataset; + + static std::string BuildMessage(const std::string &dataset) + { + return "DisabledDatasetException: Your query tried to access the disabled dataset " + + dataset + + ". Please check your configuration: " + "https://github.com/Project-OSRM/osrm-backend/wiki/Disabled-Datasets"; + } +}; + class RuntimeError : public exception { using Base = exception; diff --git a/include/util/filtered_graph.hpp b/include/util/filtered_graph.hpp index cfab67102..2da008fad 100644 --- a/include/util/filtered_graph.hpp +++ b/include/util/filtered_graph.hpp @@ -37,9 +37,9 @@ class FilteredGraphImpl, Ownership> unsigned GetOutDegree(const NodeIterator n) const { auto range = graph.GetAdjacentEdgeRange(n); - return std::count_if(range.begin(), range.end(), [this](const EdgeIterator edge) { - return edge_filter[edge]; - }); + return std::count_if(range.begin(), + range.end(), + [this](const EdgeIterator edge) { return edge_filter[edge]; }); } inline NodeIterator GetTarget(const EdgeIterator e) const diff --git a/include/util/fingerprint.hpp b/include/util/fingerprint.hpp index 7e9d0c825..d28264a53 100644 --- a/include/util/fingerprint.hpp +++ b/include/util/fingerprint.hpp @@ -33,7 +33,8 @@ struct FingerPrint static_assert(sizeof(FingerPrint) == 8, "FingerPrint has unexpected size"); static_assert(std::is_trivial::value, "FingerPrint needs to be trivial."); -static_assert(std::is_pod::value, "FingerPrint needs to be a POD."); +static_assert(std::is_standard_layout::value, + "FingerPrint needs have a standard layout."); } // namespace osrm::util #endif /* FingerPrint_H */ diff --git a/include/util/geojson_debug_logger.hpp b/include/util/geojson_debug_logger.hpp index 9d35803fa..ea86535d5 100644 --- a/include/util/geojson_debug_logger.hpp +++ b/include/util/geojson_debug_logger.hpp @@ -58,7 +58,7 @@ class GeojsonLogger } // writes a single feature into the Geojson file - template static bool Write(Args &&... args) + template static bool Write(Args &&...args) { // make sure to syncronize logging output, our writing should be sequential std::lock_guard guard(lock); @@ -146,7 +146,7 @@ class ScopedGeojsonLoggerGuard { public: template - ScopedGeojsonLoggerGuard(const std::string &logfile, Args &&... args) + ScopedGeojsonLoggerGuard(const std::string &logfile, Args &&...args) : policy(std::forward(args)...) { GeojsonLogger::Open(logfile); @@ -159,7 +159,7 @@ class ScopedGeojsonLoggerGuard GeojsonLogger::SetPolicy(nullptr); } - template static bool Write(Args &&... args) + template static bool Write(Args &&...args) { return GeojsonLogger::Write( std::forward(args)...); diff --git a/include/util/guidance/name_announcements.hpp b/include/util/guidance/name_announcements.hpp index a3b1094e2..52f435750 100644 --- a/include/util/guidance/name_announcements.hpp +++ b/include/util/guidance/name_announcements.hpp @@ -63,14 +63,16 @@ template inline auto decompose(const StringView &lhs, cons auto const lcs = longest_common_substring(lhs, rhs); // trim spaces, transform to lower - const auto trim = [](StringView view) { + const auto trim = [](StringView view) + { // we compare suffixes based on this value, it might break UTF chars, but as long as we are // consistent in handling, we do not create bad results std::string str; str.reserve(view.size()); - std::transform(view.begin(), view.end(), std::back_inserter(str), [](unsigned char c) { - return std::tolower(c); - }); + std::transform(view.begin(), + view.end(), + std::back_inserter(str), + [](unsigned char c) { return std::tolower(c); }); auto front = str.find_first_not_of(' '); if (front == std::string::npos) @@ -131,13 +133,13 @@ inline bool requiresNameAnnounced(const StringView &from_name, const auto checkForPrefixOrSuffixChange = [](const std::string_view first, const std::string_view second, - const SuffixTable &suffix_table) { + const SuffixTable &suffix_table) + { std::string first_prefix, first_suffix, second_prefix, second_suffix; std::tie(first_prefix, first_suffix, second_prefix, second_suffix) = decompose(first, second); - const auto checkTable = [&](const std::string &str) { - return str.empty() || suffix_table.isSuffix(str); - }; + const auto checkTable = [&](const std::string &str) + { return str.empty() || suffix_table.isSuffix(str); }; return checkTable(first_prefix) && checkTable(first_suffix) && checkTable(second_prefix) && checkTable(second_suffix); diff --git a/include/util/indexed_data.hpp b/include/util/indexed_data.hpp index 486c68334..edc2e7a47 100644 --- a/include/util/indexed_data.hpp +++ b/include/util/indexed_data.hpp @@ -315,9 +315,8 @@ template struct Indexe values_byte_iter = block.WriteBlockPrefix(curr, next, values_byte_iter); std::advance(next, std::min(1, std::distance(next, sentinel))); - auto to_bytes = [&](const auto &data) { - values_byte_iter = std::copy_n(&data, sizeof(ValueType), values_byte_iter); - }; + auto to_bytes = [&](const auto &data) + { values_byte_iter = std::copy_n(&data, sizeof(ValueType), values_byte_iter); }; std::copy(data + *curr, data + *next, boost::make_function_output_iterator(std::cref(to_bytes))); diff --git a/include/util/integer_range.hpp b/include/util/integer_range.hpp index 20089708a..973197b7f 100644 --- a/include/util/integer_range.hpp +++ b/include/util/integer_range.hpp @@ -43,11 +43,10 @@ class integer_iterator : public boost::iterator_facade difference_type distance_to(const integer_iterator &other) const { - return std::is_signed::value - ? (other.m_value - m_value) - : (other.m_value >= m_value) - ? static_cast(other.m_value - m_value) - : -static_cast(m_value - other.m_value); + return std::is_signed::value ? (other.m_value - m_value) + : (other.m_value >= m_value) + ? static_cast(other.m_value - m_value) + : -static_cast(m_value - other.m_value); } friend class ::boost::iterator_core_access; diff --git a/include/util/node_based_graph.hpp b/include/util/node_based_graph.hpp index 6f2760928..b45358fee 100644 --- a/include/util/node_based_graph.hpp +++ b/include/util/node_based_graph.hpp @@ -79,7 +79,8 @@ NodeBasedDynamicGraphFromEdges(NodeID number_of_nodes, auto edges_list = directedEdgesFromCompressed( input_edge_list, [](NodeBasedDynamicGraph::InputEdge &output_edge, - const extractor::NodeBasedEdge &input_edge) { + const extractor::NodeBasedEdge &input_edge) + { output_edge.data.weight = input_edge.weight; output_edge.data.duration = input_edge.duration; output_edge.data.distance = input_edge.distance; diff --git a/include/util/opening_hours.hpp b/include/util/opening_hours.hpp index 07b18836a..90e25f9ca 100644 --- a/include/util/opening_hours.hpp +++ b/include/util/opening_hours.hpp @@ -3,6 +3,7 @@ #include +#include #include #include @@ -192,23 +193,20 @@ struct OpeningHours && (times.empty() || std::any_of(times.begin(), times.end(), - [&time, &use_curr_day, &use_next_day](const auto &x) { - return x.IsInRange(time, use_curr_day, use_next_day); - })) + [&time, &use_curr_day, &use_next_day](const auto &x) + { return x.IsInRange(time, use_curr_day, use_next_day); })) // .. and if weekdays are not specified or matches weekdays range && (weekdays.empty() || std::any_of(weekdays.begin(), weekdays.end(), - [&time, use_curr_day, use_next_day](const auto &x) { - return x.IsInRange(time, use_curr_day, use_next_day); - })) + [&time, use_curr_day, use_next_day](const auto &x) + { return x.IsInRange(time, use_curr_day, use_next_day); })) // .. and if month-day ranges are not specified or is in any month-day range && (monthdays.empty() || std::any_of(monthdays.begin(), monthdays.end(), - [&time, use_curr_day, use_next_day](const auto &x) { - return x.IsInRange(time, use_curr_day, use_next_day); - })); + [&time, use_curr_day, use_next_day](const auto &x) + { return x.IsInRange(time, use_curr_day, use_next_day); })); } std::vector times; diff --git a/include/util/query_heap.hpp b/include/util/query_heap.hpp index f481a78f0..c9f1fc6c5 100644 --- a/include/util/query_heap.hpp +++ b/include/util/query_heap.hpp @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -344,9 +345,9 @@ class QueryHeap void DeleteAll() { auto const none_handle = heap.s_handle_from_iterator(heap.end()); - std::for_each(inserted_nodes.begin(), inserted_nodes.end(), [&none_handle](auto &node) { - node.handle = none_handle; - }); + std::for_each(inserted_nodes.begin(), + inserted_nodes.end(), + [&none_handle](auto &node) { node.handle = none_handle; }); heap.clear(); } diff --git a/include/util/range_table.hpp b/include/util/range_table.hpp index 757462570..2808f6c18 100644 --- a/include/util/range_table.hpp +++ b/include/util/range_table.hpp @@ -64,7 +64,8 @@ template class RangeTable // construct table from length vector template explicit RangeTable(const VectorT &lengths) { - const unsigned number_of_blocks = [&lengths]() { + const unsigned number_of_blocks = [&lengths]() + { unsigned num = (lengths.size() + 1) / (BLOCK_SIZE + 1); if ((lengths.size() + 1) % (BLOCK_SIZE + 1) != 0) { diff --git a/include/util/static_graph.hpp b/include/util/static_graph.hpp index be713a1cd..c010471ea 100644 --- a/include/util/static_graph.hpp +++ b/include/util/static_graph.hpp @@ -94,7 +94,7 @@ template struct SortableEdgeWithData : SortableEdgeWithData SortableEdgeWithData() = default; template - SortableEdgeWithData(NodeIterator source, NodeIterator target, Ts &&... data) + SortableEdgeWithData(NodeIterator source, NodeIterator target, Ts &&...data) : Base{source, target}, data{std::forward(data)...} { } @@ -304,10 +304,14 @@ class StaticGraph BOOST_ASSERT(node_array.size() == number_of_nodes + 1); edge_array.resize(number_of_edges); - std::transform(begin, end, edge_array.begin(), [](const auto &from) { - return static_graph_details::edgeToEntry( - from, traits::HasDataMember{}); - }); + std::transform(begin, + end, + edge_array.begin(), + [](const auto &from) + { + return static_graph_details::edgeToEntry( + from, traits::HasDataMember{}); + }); } protected: diff --git a/include/util/static_rtree.hpp b/include/util/static_rtree.hpp index 291c35f4d..d39d8454d 100644 --- a/include/util/static_rtree.hpp +++ b/include/util/static_rtree.hpp @@ -281,7 +281,8 @@ class StaticRTree tbb::parallel_for( tbb::blocked_range(0, element_count), [&input_data_vector, &input_wrapper_vector, this]( - const tbb::blocked_range &range) { + const tbb::blocked_range &range) + { for (uint64_t element_counter = range.begin(), end = range.end(); element_counter != end; ++element_counter) @@ -560,9 +561,8 @@ class StaticRTree return Nearest( input_coordinate, [](const CandidateSegment &) { return std::make_pair(true, true); }, - [max_results](const std::size_t num_results, const CandidateSegment &) { - return num_results >= max_results; - }); + [max_results](const std::size_t num_results, const CandidateSegment &) + { return num_results >= max_results; }); } // Return edges in distance order with the coordinate of the closest point on the edge. diff --git a/include/util/std_hash.hpp b/include/util/std_hash.hpp index b4010f439..16bf278dc 100644 --- a/include/util/std_hash.hpp +++ b/include/util/std_hash.hpp @@ -14,13 +14,13 @@ template void hash_combine(std::size_t &seed, const T &val) template void hash_val(std::size_t &seed, const T &val) { hash_combine(seed, val); } template -void hash_val(std::size_t &seed, const T &val, const Types &... args) +void hash_val(std::size_t &seed, const T &val, const Types &...args) { hash_combine(seed, val); hash_val(seed, args...); } -template std::size_t hash_val(const Types &... args) +template std::size_t hash_val(const Types &...args) { std::size_t seed = 0; hash_val(seed, args...); diff --git a/include/util/string_util.hpp b/include/util/string_util.hpp index 6133b2618..ae881c514 100644 --- a/include/util/string_util.hpp +++ b/include/util/string_util.hpp @@ -18,7 +18,8 @@ template char *printInt(char *buffer, int value) static_assert(length > 0, "length must be positive"); static_assert(precision > 0, "precision must be positive"); - const bool minus = [&value] { + const bool minus = [&value] + { if (value >= 0) { value = -value; diff --git a/include/util/timed_histogram.hpp b/include/util/timed_histogram.hpp index cd2b82235..933815446 100644 --- a/include/util/timed_histogram.hpp +++ b/include/util/timed_histogram.hpp @@ -51,16 +51,20 @@ template class { std::stringstream out; - const auto print_bins = [&out](auto frame_index, auto begin, auto end) { + const auto print_bins = [&out](auto frame_index, auto begin, auto end) + { auto bin_index = 0; - std::for_each(begin, end, [&](const auto count) { - if (count > 0) - { - out << (frame_index * TimeBinSize) << "," << (bin_index * IndexBinSize) << "," - << count << std::endl; - } - bin_index++; - }); + std::for_each(begin, + end, + [&](const auto count) + { + if (count > 0) + { + out << (frame_index * TimeBinSize) << "," + << (bin_index * IndexBinSize) << "," << count << std::endl; + } + bin_index++; + }); }; if (frame_offsets.size() == 0) diff --git a/include/util/typedefs.hpp b/include/util/typedefs.hpp index 46b2807f3..a5c4af2d3 100644 --- a/include/util/typedefs.hpp +++ b/include/util/typedefs.hpp @@ -71,10 +71,12 @@ struct turn_penalty using OSMNodeID = osrm::Alias; // clang-tidy fires `bugprone-throw-keyword-missing` here for unknown reason // NOLINTNEXTLINE(bugprone-throw-keyword-missing) -static_assert(std::is_pod(), "OSMNodeID is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "OSMNodeID is not a valid alias"); using OSMWayID = osrm::Alias; // NOLINTNEXTLINE(bugprone-throw-keyword-missing) -static_assert(std::is_pod(), "OSMWayID is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "OSMWayID is not a valid alias"); using DuplicatedNodeID = std::uint64_t; using RestrictionID = std::uint64_t; diff --git a/include/util/version.hpp.in b/include/util/version.hpp.in index 7f830bb3b..67b0b4fc7 100644 --- a/include/util/version.hpp.in +++ b/include/util/version.hpp.in @@ -1,12 +1,13 @@ #ifndef VERSION_HPP #define VERSION_HPP -#define OSRM_VERSION_MAJOR @OSRM_VERSION_MAJOR@ -#define OSRM_VERSION_MINOR @OSRM_VERSION_MINOR@ -#define OSRM_VERSION_PATCH @OSRM_VERSION_PATCH@ +#define OSRM_VERSION_MAJOR @OSRM_VERSION_MAJOR@ +#define OSRM_VERSION_MINOR @OSRM_VERSION_MINOR@ +#define OSRM_VERSION_PATCH @OSRM_VERSION_PATCH@ +#define OSRM_VERSION_PRERELEASE_BUILD "@OSRM_VERSION_PRERELEASE_BUILD@" -#define OSRM_VERSION__(A,B,C) "v" #A "." #B "." #C -#define OSRM_VERSION_(A,B,C) OSRM_VERSION__(A,B,C) -#define OSRM_VERSION OSRM_VERSION_(OSRM_VERSION_MAJOR, OSRM_VERSION_MINOR, OSRM_VERSION_PATCH) +#define OSRM_VERSION__(A,B,C,D) "v" #A "." #B "." #C D +#define OSRM_VERSION_(A,B,C,D) OSRM_VERSION__(A,B,C,D) +#define OSRM_VERSION OSRM_VERSION_(OSRM_VERSION_MAJOR, OSRM_VERSION_MINOR, OSRM_VERSION_PATCH, OSRM_VERSION_PRERELEASE_BUILD) #endif // VERSION_HPP diff --git a/package-lock.json b/package-lock.json index 457213005..c5efc04e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "BSD-2-Clause", "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.10" + "@mapbox/node-pre-gyp": "^1.0.11" }, "devDependencies": { "@babel/cli": "^7.18.10", @@ -19,7 +19,6 @@ "@babel/preset-react": "^7.18.6", "acorn": "^8.8.0", "ansi-escape-sequences": "^5.1.2", - "aws-sdk": "~2.0.31", "babel-plugin-transform-class-properties": "^6.24.1", "babelify": "^10.0.0", "browserify": "^17.0.0", @@ -48,7 +47,7 @@ "xmlbuilder": "^4.2.1" }, "engines": { - "node": ">=4.0.0" + "node": ">=18.0.0" } }, "node_modules/@ampproject/remapping": { @@ -122,25 +121,14 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@babel/cli/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -212,9 +200,9 @@ } }, "node_modules/@babel/core/node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -230,22 +218,23 @@ "dev": true }, "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", - "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", + "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", "dev": true, "dependencies": { - "@babel/types": "^7.18.13", - "@jridgewell/gen-mapping": "^0.3.2", + "@babel/types": "^7.24.5", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -253,14 +242,14 @@ } }, "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -322,9 +311,9 @@ } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -452,18 +441,18 @@ "dev": true }, "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -482,25 +471,25 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -549,15 +538,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-optimise-call-expression": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", @@ -638,31 +618,34 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/helper-validator-option": { "version": "7.18.6", @@ -703,28 +686,20 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", + "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.24.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -770,9 +745,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz", - "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1555,15 +1530,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-systemjs/node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/plugin-transform-modules-umd": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", @@ -1959,9 +1925,9 @@ } }, "node_modules/@babel/preset-env/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -2022,34 +1988,34 @@ "dev": true }, "node_modules/@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", - "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", + "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.13", - "@babel/types": "^7.18.13", - "debug": "^4.1.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/types": "^7.24.5", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -2089,28 +2055,19 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", - "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/types/node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -2143,9 +2100,9 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" @@ -2158,19 +2115,19 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", - "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", "dependencies": { "detect-libc": "^2.0.0", "https-proxy-agent": "^5.0.0", @@ -2220,24 +2177,13 @@ } }, "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -2253,9 +2199,9 @@ } }, "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -2458,7 +2404,7 @@ "node_modules/ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "integrity": "sha512-JoAxEa1DfP9m2xfB/y2r/aKcwXNlltr4+0QSBC4TrLfcxyvepX2Pv0t/xpgGV5bGsDzCYV8SzjWgyCW0T9yYbA==", "dev": true, "engines": [ "node >= 0.8.0" @@ -2728,15 +2674,14 @@ } }, "node_modules/asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "dev": true, "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" + "minimalistic-assert": "^1.0.0" } }, "node_modules/asn1.js/node_modules/bn.js": { @@ -2824,7 +2769,7 @@ "node_modules/autoprefixer": { "version": "6.7.7", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", - "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "integrity": "sha512-WKExI/eSGgGAkWAO+wMVdFObZV7hQen54UpD1kCCTN3tvlL3W1jL4+lPP/M7MwoP7Q4RHzKtO3JQ4HxYEcd+xQ==", "dev": true, "dependencies": { "browserslist": "^1.7.6", @@ -2861,28 +2806,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sdk": { - "version": "2.0.31", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.0.31.tgz", - "integrity": "sha1-5yzx/caQFb2f0r3z07iMFlB9Jo4=", - "dev": true, - "dependencies": { - "xml2js": "0.2.6", - "xmlbuilder": "0.4.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/aws-sdk/node_modules/xmlbuilder": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.4.2.tgz", - "integrity": "sha1-F3bWXz/brUcKCNhgTN6xxOVA/4M=", - "dev": true, - "engines": { - "node": ">=0.2.0" - } - }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -2898,6 +2821,219 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, + "node_modules/babel-cli": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", + "integrity": "sha512-wau+BDtQfuSBGQ9PzzFL3REvR9Sxnd4LKwtcHAiPjhugA7K/80vpHXafj+O5bAqJOuSefjOx5ZJnNSR2J1Qw6Q==", + "dev": true, + "dependencies": { + "babel-core": "^6.26.0", + "babel-polyfill": "^6.26.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "commander": "^2.11.0", + "convert-source-map": "^1.5.0", + "fs-readdir-recursive": "^1.0.0", + "glob": "^7.1.2", + "lodash": "^4.17.4", + "output-file-sync": "^1.1.2", + "path-is-absolute": "^1.0.1", + "slash": "^1.0.0", + "source-map": "^0.5.6", + "v8flags": "^2.1.1" + }, + "bin": { + "babel": "bin/babel.js", + "babel-doctor": "bin/babel-doctor.js", + "babel-external-helpers": "bin/babel-external-helpers.js", + "babel-node": "bin/babel-node.js" + }, + "optionalDependencies": { + "chokidar": "^1.6.1" + } + }, + "node_modules/babel-cli/node_modules/anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "optional": true, + "dependencies": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "node_modules/babel-cli/node_modules/arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha512-dtXTVMkh6VkEEA7OhXnN1Ecb8aAGFdZ1LFxtOCoqj4qkyOJMt7+qs6Ahdy6p/NQCPYsRSXXivhSB/J5E9jmYKA==", + "dev": true, + "optional": true, + "dependencies": { + "arr-flatten": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-cli/node_modules/array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha512-G2n5bG5fSUCpnsXz4+8FUkYsGPkNfLn9YvS66U5qbTIXI2Ynnlo4Bi42bWv+omKUCqz+ejzfClwne0alJWJPhg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-cli/node_modules/braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==", + "dev": true, + "optional": true, + "dependencies": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-cli/node_modules/chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha512-mk8fAWcRUOxY7btlLtitj3A45jOwSAxH4tOFOoEGbVsl6cL6pPMWUy7dwZ/canfj3QEdP6FHSnf/l1c6/WkzVg==", + "deprecated": "Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.", + "dev": true, + "optional": true, + "dependencies": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + }, + "optionalDependencies": { + "fsevents": "^1.0.0" + } + }, + "node_modules/babel-cli/node_modules/expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha512-hxx03P2dJxss6ceIeri9cmYOT4SRs3Zk3afZwWpOsRqLqprhTR8u++SlC+sFGsQr7WGFPdMF7Gjc1njDLDK6UA==", + "dev": true, + "optional": true, + "dependencies": { + "is-posix-bracket": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-cli/node_modules/extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha512-1FOj1LOwn42TMrruOHGt18HemVnbwAmAak7krWk+wa93KXxGbK+2jpezm+ytJYDaBX0/SPLZFHKM7m+tKobWGg==", + "dev": true, + "optional": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-cli/node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/babel-cli/node_modules/glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==", + "dev": true, + "optional": true, + "dependencies": { + "is-glob": "^2.0.0" + } + }, + "node_modules/babel-cli/node_modules/is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-cli/node_modules/is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==", + "dev": true, + "optional": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-cli/node_modules/micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==", + "dev": true, + "optional": true, + "dependencies": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-cli/node_modules/slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -3214,7 +3350,7 @@ "node_modules/babel-helper-bindify-decorators": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", - "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", + "integrity": "sha512-TYX2QQATKA6Wssp6j7jqlw4QLmABDN1olRdEHndYvBXdaXM5dcx6j5rN0+nd+aVL+Th40fAEYvvw/Xxd/LETuQ==", "dev": true, "dependencies": { "babel-runtime": "^6.22.0", @@ -3225,7 +3361,7 @@ "node_modules/babel-helper-builder-binary-assignment-operator-visitor": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "integrity": "sha512-gCtfYORSG1fUMX4kKraymq607FWgMWg+j42IFPc18kFQEsmtaibP4UrqsXt8FlEJle25HUd4tsoDR7H2wDhe9Q==", "dev": true, "dependencies": { "babel-helper-explode-assignable-expression": "^6.24.1", @@ -3247,7 +3383,7 @@ "node_modules/babel-helper-call-delegate": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "integrity": "sha512-RL8n2NiEj+kKztlrVJM9JT1cXzzAdvWFh76xh/H1I4nKwunzE4INBXn8ieCZ+wh4zWszZk7NBS1s/8HR5jDkzQ==", "dev": true, "dependencies": { "babel-helper-hoist-variables": "^6.24.1", @@ -3259,7 +3395,7 @@ "node_modules/babel-helper-define-map": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "integrity": "sha512-bHkmjcC9lM1kmZcVpA5t2om2nzT/xiZpo6TJq7UlZ3wqKfzia4veeXbIhKvJXAMzhhEBd3cR1IElL5AenWEUpA==", "dev": true, "dependencies": { "babel-helper-function-name": "^6.24.1", @@ -3271,7 +3407,7 @@ "node_modules/babel-helper-explode-assignable-expression": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "integrity": "sha512-qe5csbhbvq6ccry9G7tkXbzNtcDiH4r51rrPUbwwoTzZ18AqxWYRZT6AOmxrpxKnQBW0pYlBI/8vh73Z//78nQ==", "dev": true, "dependencies": { "babel-runtime": "^6.22.0", @@ -3282,7 +3418,7 @@ "node_modules/babel-helper-explode-class": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", - "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", + "integrity": "sha512-SFbWewr0/0U4AiRzsHqwsbOQeLXVa9T1ELdqEa2efcQB5KopTnunAqoj07TuHlN2lfTQNPGO/rJR4FMln5fVcA==", "dev": true, "dependencies": { "babel-helper-bindify-decorators": "^6.24.1", @@ -3294,7 +3430,7 @@ "node_modules/babel-helper-function-name": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "integrity": "sha512-Oo6+e2iX+o9eVvJ9Y5eKL5iryeRdsIkwRYheCuhYdVHsdEQysbc2z2QkqCLIYnNxkT5Ss3ggrHdXiDI7Dhrn4Q==", "dev": true, "dependencies": { "babel-helper-get-function-arity": "^6.24.1", @@ -3348,7 +3484,7 @@ "node_modules/babel-helper-remap-async-to-generator": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "integrity": "sha512-RYqaPD0mQyQIFRu7Ho5wE2yvA/5jxqCIj/Lv4BXNq23mHYu/vxikOy2JueLiBxQknwapwrJeNCesvY0ZcfnlHg==", "dev": true, "dependencies": { "babel-helper-function-name": "^6.24.1", @@ -3361,7 +3497,7 @@ "node_modules/babel-helper-replace-supers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "integrity": "sha512-sLI+u7sXJh6+ToqDr57Bv973kCepItDhMou0xCP2YPVmR1jkHSCY+p1no8xErbV1Siz5QE8qKT1WIwybSWlqjw==", "dev": true, "dependencies": { "babel-helper-optimise-call-expression": "^6.24.1", @@ -3375,7 +3511,7 @@ "node_modules/babel-helpers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "integrity": "sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ==", "dev": true, "dependencies": { "babel-runtime": "^6.22.0", @@ -3424,9 +3560,9 @@ } }, "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -3553,7 +3689,7 @@ "node_modules/babel-plugin-transform-async-generator-functions": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", - "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", + "integrity": "sha512-uT7eovUxtXe8Q2ufcjRuJIOL0hg6VAUJhiWJBLxH/evYAw+aqoJLcYTR8hqx13iOx/FfbCMHgBmXWZjukbkyPg==", "dev": true, "dependencies": { "babel-helper-remap-async-to-generator": "^6.24.1", @@ -3564,7 +3700,7 @@ "node_modules/babel-plugin-transform-async-to-generator": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "integrity": "sha512-7BgYJujNCg0Ti3x0c/DL3tStvnKS6ktIYOmo9wginv/dfZOrbSZ+qG4IRRHMBOzZ5Awb1skTiAsQXg/+IWkZYw==", "dev": true, "dependencies": { "babel-helper-remap-async-to-generator": "^6.24.1", @@ -3575,7 +3711,7 @@ "node_modules/babel-plugin-transform-class-constructor-call": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz", - "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", + "integrity": "sha512-RvYukT1Nh7njz8P8326ztpQUGCKwmjgu6aRIx1lkvylWITYcskg29vy1Kp8WXIq7FvhXsz0Crf2kS94bjB690A==", "dev": true, "dependencies": { "babel-plugin-syntax-class-constructor-call": "^6.18.0", @@ -3586,7 +3722,7 @@ "node_modules/babel-plugin-transform-class-properties": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", - "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "integrity": "sha512-n4jtBA3OYBdvG5PRMKsMXJXHfLYw/ZOmtxCLOOwz6Ro5XlrColkStLnz1AS1L2yfPA9BKJ1ZNlmVCLjAL9DSIg==", "dev": true, "dependencies": { "babel-helper-function-name": "^6.24.1", @@ -3598,7 +3734,7 @@ "node_modules/babel-plugin-transform-decorators": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", - "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", + "integrity": "sha512-skQ2CImwDkCHu0mkWvCOlBCpBIHW4/49IZWVwV4A/EnWjL9bB6UBvLyMNe3Td5XDStSZNhe69j4bfEW8dvUbew==", "dev": true, "dependencies": { "babel-helper-explode-class": "^6.24.1", @@ -3650,7 +3786,7 @@ "node_modules/babel-plugin-transform-es2015-block-scoping": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "integrity": "sha512-YiN6sFAQ5lML8JjCmr7uerS5Yc/EMbgg9G8ZNmk2E3nYX4ckHR01wrkeeMijEf5WHNK5TW0Sl0Uu3pv3EdOJWw==", "dev": true, "dependencies": { "babel-runtime": "^6.26.0", @@ -3663,7 +3799,7 @@ "node_modules/babel-plugin-transform-es2015-classes": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "integrity": "sha512-5Dy7ZbRinGrNtmWpquZKZ3EGY8sDgIVB4CU8Om8q8tnMLrD/m94cKglVcHps0BCTdZ0TJeeAWOq2TK9MIY6cag==", "dev": true, "dependencies": { "babel-helper-define-map": "^6.24.1", @@ -3680,7 +3816,7 @@ "node_modules/babel-plugin-transform-es2015-computed-properties": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "integrity": "sha512-C/uAv4ktFP/Hmh01gMTvYvICrKze0XVX9f2PdIXuriCSvUmV9j+u+BB9f5fJK3+878yMK6dkdcq+Ymr9mrcLzw==", "dev": true, "dependencies": { "babel-runtime": "^6.22.0", @@ -3718,7 +3854,7 @@ "node_modules/babel-plugin-transform-es2015-function-name": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "integrity": "sha512-iFp5KIcorf11iBqu/y/a7DK3MN5di3pNCzto61FqCNnUX4qeBwcV1SLqe10oXNnCaxBUImX3SckX2/o1nsrTcg==", "dev": true, "dependencies": { "babel-helper-function-name": "^6.24.1", @@ -3738,7 +3874,7 @@ "node_modules/babel-plugin-transform-es2015-modules-amd": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "integrity": "sha512-LnIIdGWIKdw7zwckqx+eGjcS8/cl8D74A3BpJbGjKTFFNJSMrjN4bIh22HY1AlkUbeLG6X6OZj56BDvWD+OeFA==", "dev": true, "dependencies": { "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", @@ -3761,7 +3897,7 @@ "node_modules/babel-plugin-transform-es2015-modules-systemjs": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "integrity": "sha512-ONFIPsq8y4bls5PPsAWYXH/21Hqv64TBxdje0FvU3MhIV6QM2j5YS7KvAzg/nTIVLot2D2fmFQrFWCbgHlFEjg==", "dev": true, "dependencies": { "babel-helper-hoist-variables": "^6.24.1", @@ -3772,7 +3908,7 @@ "node_modules/babel-plugin-transform-es2015-modules-umd": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "integrity": "sha512-LpVbiT9CLsuAIp3IG0tfbVo81QIhn6pE8xBJ7XSeCtFlMltuar5VuBV6y6Q45tpui9QWcy5i0vLQfCfrnF7Kiw==", "dev": true, "dependencies": { "babel-plugin-transform-es2015-modules-amd": "^6.24.1", @@ -3783,7 +3919,7 @@ "node_modules/babel-plugin-transform-es2015-object-super": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "integrity": "sha512-8G5hpZMecb53vpD3mjs64NhI1au24TAmokQ4B+TBFBjN9cVoGoOvotdrMMRmHvVZUEvqGUPWL514woru1ChZMA==", "dev": true, "dependencies": { "babel-helper-replace-supers": "^6.24.1", @@ -3793,7 +3929,7 @@ "node_modules/babel-plugin-transform-es2015-parameters": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "integrity": "sha512-8HxlW+BB5HqniD+nLkQ4xSAVq3bR/pcYW9IigY+2y0dI+Y7INFeTbfAQr+63T3E4UDsZGjyb+l9txUnABWxlOQ==", "dev": true, "dependencies": { "babel-helper-call-delegate": "^6.24.1", @@ -3866,7 +4002,7 @@ "node_modules/babel-plugin-transform-exponentiation-operator": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "integrity": "sha512-LzXDmbMkklvNhprr20//RStKVcT8Cu+SQtX18eMHLhjHf2yFzwtQ0S2f0jQ+89rokoNdmwoSqYzAhq86FxlLSQ==", "dev": true, "dependencies": { "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", @@ -3993,7 +4129,7 @@ "node_modules/babel-preset-es2015": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", - "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "integrity": "sha512-XfwUqG1Ry6R43m4Wfob+vHbIVBIqTg/TJY4Snku1iIzeH7mUnwHA8Vagmv+ZQbPwhS8HgsdQvy28Py3k5zpoFQ==", "deprecated": "🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!", "dev": true, "dependencies": { @@ -4049,7 +4185,7 @@ "node_modules/babel-preset-stage-0": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz", - "integrity": "sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo=", + "integrity": "sha512-MJD+xBbpsApbKlzAX0sOBF+VeFaUmv5s8FSOO7SSZpes1QgphCjq/UIGRFWSmQ/0i5bqQjLGCTXGGXqcLQ9JDA==", "dev": true, "dependencies": { "babel-plugin-transform-do-expressions": "^6.22.0", @@ -4060,7 +4196,7 @@ "node_modules/babel-preset-stage-1": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", - "integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=", + "integrity": "sha512-rn+UOcd7BHDniq1SVxv2/AVVSVI1NK+hfS0I/iR6m6KbOi/aeBRcqBilqO73pd9VUpRXF2HFtlDuC9F2BEQqmg==", "dev": true, "dependencies": { "babel-plugin-transform-class-constructor-call": "^6.24.1", @@ -4071,7 +4207,7 @@ "node_modules/babel-preset-stage-2": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", - "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", + "integrity": "sha512-9F+nquz+37PrlTSBdpeQBKnQfAMNBnryXw+m4qBh35FNbJPfzZz+sjN2G5Uf1CRedU9PH7fJkTbYijxmkLX8Og==", "dev": true, "dependencies": { "babel-plugin-syntax-dynamic-import": "^6.18.0", @@ -4083,7 +4219,7 @@ "node_modules/babel-preset-stage-3": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", - "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "integrity": "sha512-eCbEOF8uN0KypFXJmZXn2sTk7bPV9uM5xov7G/7BM08TbQEObsVs0cEWfy6NQySlfk7JBi/t+XJP1JkruYfthA==", "dev": true, "dependencies": { "babel-plugin-syntax-trailing-function-commas": "^6.22.0", @@ -4096,7 +4232,7 @@ "node_modules/babel-register": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "integrity": "sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A==", "dev": true, "dependencies": { "babel-core": "^6.26.0", @@ -4121,7 +4257,7 @@ "node_modules/babel-template": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", "dev": true, "dependencies": { "babel-runtime": "^6.26.0", @@ -4134,7 +4270,7 @@ "node_modules/babel-traverse": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", "dev": true, "dependencies": { "babel-code-frame": "^6.26.0", @@ -4264,15 +4400,6 @@ "node": ">=0.10.0" } }, - "node_modules/base/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4337,9 +4464,9 @@ "dev": true }, "node_modules/bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, "node_modules/body": { @@ -4585,20 +4712,37 @@ } }, "node_modules/browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.3.tgz", + "integrity": "sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==", "dev": true, "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", + "elliptic": "^6.5.5", + "hash-base": "~3.0", "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "parse-asn1": "^5.1.7", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/browserify-sign/node_modules/hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": ">=4" } }, "node_modules/browserify-sign/node_modules/inherits": { @@ -4607,20 +4751,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/browserify-sign/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/browserify-sign/node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -4641,15 +4771,6 @@ } ] }, - "node_modules/browserify-sign/node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/browserify-zlib": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", @@ -4744,9 +4865,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", - "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "dev": true, "funding": [ { @@ -4756,13 +4877,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001370", - "electron-to-chromium": "^1.4.202", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.5" + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" @@ -4771,12 +4896,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/browserslist/node_modules/electron-to-chromium": { - "version": "1.4.230", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.230.tgz", - "integrity": "sha512-3pwjAK0qHSDN9+YAF4fJknsSruP7mpjdWzUSruIJD/JCH77pEh0SorEyb3xVaKkfwk2tzjOt2D8scJ0KAdfXLA==", - "dev": true - }, "node_modules/buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", @@ -4855,19 +4974,10 @@ "node": ">=0.10.0" } }, - "node_modules/cache-base/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/cached-path-relative": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", - "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", + "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", "dev": true }, "node_modules/call-bind": { @@ -4962,9 +5072,9 @@ "dev": true }, "node_modules/caniuse-lite": { - "version": "1.0.30001383", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001383.tgz", - "integrity": "sha512-swMpEoTp5vDoGBZsYZX7L7nXHe6dsHxi9o6/LKf/f0LukVtnrxly5GVb/fWdCDTqi/yw6Km6tiJ0pmBacm0gbg==", + "version": "1.0.30001516", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz", + "integrity": "sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==", "dev": true, "funding": [ { @@ -4974,6 +5084,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -5238,15 +5352,6 @@ "node": ">=0.10.0" } }, - "node_modules/class-utils/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -5338,30 +5443,6 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "node_modules/cloneable-readable/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/cloneable-readable/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -5418,7 +5499,7 @@ "node_modules/color": { "version": "0.11.4", "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", - "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "integrity": "sha512-Ajpjd8asqZ6EdxQeqGzU5WBhhTfJ/0cA4Wlbre7e5vXfmDSmda7Ov6jeKoru+b0vHcb1CqvuroTHp5zIWzhVMA==", "dev": true, "dependencies": { "clone": "^1.0.2", @@ -5444,7 +5525,7 @@ "node_modules/color-string": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", - "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "integrity": "sha512-sz29j1bmSDfoAxKIEU6zwoIZXN6BrFbAMIhfYCNyiZXBDuU/aiHlN84lp/xDzL2ubyFhLDobHIlU1X70XRrMDA==", "dev": true, "dependencies": { "color-name": "^1.0.0" @@ -5470,7 +5551,7 @@ "node_modules/colormin": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", - "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "integrity": "sha512-XSEQUUQUR/lXqGyddiNH3XYFUPYlYr1vXy9rTFMsSOw+J7Q6EQkdlQIrTlYn4TccpsOaUE1PYQNjBn20gwCdgQ==", "dev": true, "dependencies": { "color": "^0.11.0", @@ -5601,15 +5682,6 @@ "node": ">=4" } }, - "node_modules/command-line-usage/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/command-line-usage/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -5711,28 +5783,18 @@ "dev": true }, "node_modules/core-js-compat": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.25.0.tgz", - "integrity": "sha512-extKQM0g8/3GjFx9US12FAgx8KJawB7RCQ5y8ipYLbmfzEzmFRWdDjIlxDx82g7ygcNG85qMVUSRyABouELdow==", + "version": "3.31.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.1.tgz", + "integrity": "sha512-wIDWd2s5/5aJSdpOJHfSibxNODxoGoWOBHt8JSPB41NOE94M7kuTPZCYLOlTtuoXTsBPKobpJ6T+y0SSy5L9SA==", "dev": true, "dependencies": { - "browserslist": "^4.21.3", - "semver": "7.0.0" + "browserslist": "^4.21.9" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" } }, - "node_modules/core-js-compat/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -5853,7 +5915,7 @@ "node_modules/cssnano": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", - "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "integrity": "sha512-0o0IMQE0Ezo4b41Yrm8U6Rp9/Ag81vNXY1gZMnT1XhO4DpjEf2utKERqWJbOoz3g1Wdc1d3QSta/cIuJ1wSTEg==", "dev": true, "dependencies": { "autoprefixer": "^6.3.1", @@ -5997,9 +6059,9 @@ } }, "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true, "engines": { "node": ">=0.10" @@ -6089,15 +6151,6 @@ "node": ">=0.10.0" } }, - "node_modules/define-property/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/define-property/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -6210,7 +6263,7 @@ "node_modules/diff": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", + "integrity": "sha512-VzVc42hMZbYU9Sx/ltb7KYuQ6pqAw+cbFWVy4XKdkuEL2CFaRLGEnISPs7YdzaUGpi+CpIqvRmu7hPQ4T7EQ5w==", "dev": true, "engines": { "node": ">=0.3.1" @@ -6236,7 +6289,7 @@ "node_modules/disparity": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/disparity/-/disparity-2.0.0.tgz", - "integrity": "sha1-V92stHMkrl9Y0swNqIbbTOnutxg=", + "integrity": "sha512-caMA9oIQbDeobWc9MVUF0+o1APVo0UZnfD482x0RaLLAzpAc6Dla2mk5ef7onsG91tziIRr41rj4sVt3BOLLZw==", "dev": true, "dependencies": { "ansi-styles": "^2.0.1", @@ -6295,9 +6348,9 @@ } }, "node_modules/docbox/node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true, "engines": { "node": ">=4" @@ -6315,71 +6368,6 @@ "node": ">=4" } }, - "node_modules/docbox/node_modules/anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "optional": true, - "dependencies": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "node_modules/docbox/node_modules/arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "optional": true, - "dependencies": { - "arr-flatten": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/docbox/node_modules/array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/docbox/node_modules/babel-cli": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", - "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", - "dev": true, - "dependencies": { - "babel-core": "^6.26.0", - "babel-polyfill": "^6.26.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "commander": "^2.11.0", - "convert-source-map": "^1.5.0", - "fs-readdir-recursive": "^1.0.0", - "glob": "^7.1.2", - "lodash": "^4.17.4", - "output-file-sync": "^1.1.2", - "path-is-absolute": "^1.0.1", - "slash": "^1.0.0", - "source-map": "^0.5.6", - "v8flags": "^2.1.1" - }, - "bin": { - "babel": "bin/babel.js", - "babel-doctor": "bin/babel-doctor.js", - "babel-external-helpers": "bin/babel-external-helpers.js", - "babel-node": "bin/babel-node.js" - }, - "optionalDependencies": { - "chokidar": "^1.6.1" - } - }, "node_modules/docbox/node_modules/babelify": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/babelify/-/babelify-8.0.0.tgz", @@ -6389,21 +6377,6 @@ "babel-core": "6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc" } }, - "node_modules/docbox/node_modules/braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "optional": true, - "dependencies": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/docbox/node_modules/browser-resolve": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", @@ -6489,27 +6462,6 @@ "node": ">=4" } }, - "node_modules/docbox/node_modules/chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "deprecated": "Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.", - "dev": true, - "optional": true, - "dependencies": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - }, - "optionalDependencies": { - "fsevents": "^1.0.0" - } - }, "node_modules/docbox/node_modules/debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", @@ -6610,61 +6562,6 @@ "node": ">=0.4.x" } }, - "node_modules/docbox/node_modules/expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "optional": true, - "dependencies": { - "is-posix-bracket": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/docbox/node_modules/extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "optional": true, - "dependencies": { - "is-extglob": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/docbox/node_modules/fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "dependencies": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/docbox/node_modules/glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "optional": true, - "dependencies": { - "is-glob": "^2.0.0" - } - }, "node_modules/docbox/node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -6674,29 +6571,6 @@ "node": ">=4" } }, - "node_modules/docbox/node_modules/is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/docbox/node_modules/is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "optional": true, - "dependencies": { - "is-extglob": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/docbox/node_modules/mdast-util-to-hast": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-3.0.4.tgz", @@ -6716,31 +6590,6 @@ "xtend": "^4.0.1" } }, - "node_modules/docbox/node_modules/micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "optional": true, - "dependencies": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/docbox/node_modules/module-deps": { "version": "6.2.3", "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", @@ -6825,15 +6674,6 @@ } ] }, - "node_modules/docbox/node_modules/slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/docbox/node_modules/stream-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", @@ -6914,7 +6754,7 @@ "node_modules/documentation": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/documentation/-/documentation-4.0.0.tgz", - "integrity": "sha1-moqajjiWm/1J008137J/HHW2R8A=", + "integrity": "sha512-Iv7zUuiWUnapAC1loC7bubrO2oINAQrgjXxszl9QqlPXpvVkLWgmDi8SnrDQam/qYHCgpy7fXR2K3+4mc2knrA==", "dev": true, "dependencies": { "ansi-html": "^0.0.7", @@ -6999,7 +6839,7 @@ "node_modules/documentation/node_modules/anymatch/node_modules/micromatch": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==", "dev": true, "dependencies": { "arr-diff": "^2.0.0", @@ -7044,7 +6884,7 @@ "node_modules/documentation/node_modules/babelify": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", - "integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=", + "integrity": "sha512-vID8Fz6pPN5pJMdlUnNFSfrlcx5MUule4k9aKs/zbZPyXxMTcRrB0M4Tarw22L8afr8eYSWxDPYCob3TdrqtlA==", "dev": true, "dependencies": { "babel-core": "^6.0.14", @@ -7054,7 +6894,7 @@ "node_modules/documentation/node_modules/braces": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==", "dev": true, "dependencies": { "expand-range": "^1.8.1", @@ -7082,7 +6922,7 @@ "node_modules/documentation/node_modules/chokidar": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "integrity": "sha512-mk8fAWcRUOxY7btlLtitj3A45jOwSAxH4tOFOoEGbVsl6cL6pPMWUy7dwZ/canfj3QEdP6FHSnf/l1c6/WkzVg==", "deprecated": "Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.", "dev": true, "dependencies": { @@ -7157,7 +6997,7 @@ "node_modules/documentation/node_modules/glob-parent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "integrity": "sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==", "dev": true, "dependencies": { "is-glob": "^2.0.0" @@ -7289,7 +7129,7 @@ "node_modules/documentation/node_modules/yargs": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "integrity": "sha512-6/QWTdisjnu5UHUzQGst+UOEuEVwIzFVGBjq3jMTFNs5WJQsH/X6nMURSaScIdF5txylr1Ao9bvbWiKi2yXbwA==", "dev": true, "dependencies": { "camelcase": "^3.0.0", @@ -7310,7 +7150,7 @@ "node_modules/documentation/node_modules/yargs-parser": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "integrity": "sha512-+QQWqC2xeL0N5/TE+TY6OGEqyNRM+g2/r712PDNYgiCdXYCApXf1vzfmDSLBxfGRwV+moTq/V8FnMI24JCm2Yg==", "dev": true, "dependencies": { "camelcase": "^3.0.0" @@ -7483,15 +7323,15 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.3.752", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.752.tgz", - "integrity": "sha512-2Tg+7jSl3oPxgsBsWKh5H83QazTkmWG/cnNwJplmyZc7KcN61+I10oUgaXSVk/NwfvN3BdkKDR4FYuRBQQ2v0A==", + "version": "1.4.462", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.462.tgz", + "integrity": "sha512-ux2LqN9JKRBDKXMT+78jtiBLPiXf+rLtYlsrOg5Qn7uv6Cbg7+9JyIalE3wcqkOdB2wPCUYNWAuL7suKRMHe9w==", "dev": true }, "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz", + "integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==", "dev": true, "dependencies": { "bn.js": "^4.11.9", @@ -7634,44 +7474,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-abstract/node_modules/is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-abstract/node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-abstract/node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -7689,46 +7491,44 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-to-primitive/node_modules/is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/es5-ext": { - "version": "0.10.30", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.30.tgz", - "integrity": "sha1-cUGhaDZpfbq/qq7uQUlc4p9SyTk=", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "dev": true, + "hasInstallScript": true, "dependencies": { - "es6-iterator": "2", - "es6-symbol": "~3.1" + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" } }, "node_modules/es6-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", - "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", "dev": true, "dependencies": { "d": "1", - "es5-ext": "^0.10.14", - "es6-symbol": "^3.1" + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, "node_modules/es6-iterator/node_modules/d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", "dev": true, "dependencies": { - "es5-ext": "^0.10.9" + "es5-ext": "^0.10.64", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.12" } }, "node_modules/es6-promise": { @@ -7738,22 +7538,29 @@ "dev": true }, "node_modules/es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", "dev": true, "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "^1.0.2", + "ext": "^1.7.0" + }, + "engines": { + "node": ">=0.12" } }, "node_modules/es6-symbol/node_modules/d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", "dev": true, "dependencies": { - "es5-ext": "^0.10.9" + "es5-ext": "^0.10.64", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.12" } }, "node_modules/escalade": { @@ -7962,26 +7769,6 @@ "node": ">=4" } }, - "node_modules/eslint/node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/eslint/node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/eslint/node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -7998,19 +7785,10 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/eslint/node_modules/ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint/node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true, "engines": { "node": ">=4" @@ -8112,19 +7890,6 @@ "node": ">=4.0.0" } }, - "node_modules/eslint/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint/node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -8192,15 +7957,6 @@ "node": ">=4" } }, - "node_modules/eslint/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint/node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -8235,20 +7991,14 @@ } }, "node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "engines": { "node": ">=6" } }, - "node_modules/eslint/node_modules/inquirer/node_modules/lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, "node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -8270,25 +8020,6 @@ "node": ">=4" } }, - "node_modules/eslint/node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/eslint/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -8342,15 +8073,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/eslint/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/eslint/node_modules/slice-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", @@ -8418,20 +8140,14 @@ } }, "node_modules/eslint/node_modules/table/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "engines": { "node": ">=6" } }, - "node_modules/eslint/node_modules/table/node_modules/lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, "node_modules/eslint/node_modules/table/node_modules/string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -8470,6 +8186,34 @@ "node": ">=4" } }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.64", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/espree": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", @@ -8543,15 +8287,6 @@ "node": ">=0.10.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/estraverse": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", @@ -8570,6 +8305,29 @@ "node": ">=0.10.0" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/event-emitter/node_modules/d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.64", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -8683,6 +8441,15 @@ "node": ">=0.10.0" } }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "dependencies": { + "type": "^2.7.2" + } + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -8887,7 +8654,7 @@ "node_modules/faucet": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/faucet/-/faucet-0.0.1.tgz", - "integrity": "sha1-WX3PHSGJosBiMhtZHo8VHtIDnZw=", + "integrity": "sha512-2I/5frATNZRdagYuS5u5UfZKCo2V40c++KY7cLBWmBalJZoUwEbVxAQcyu3+k/6bcztSBPBEyk2ama426f53GA==", "dev": true, "dependencies": { "defined": "0.0.0", @@ -8917,7 +8684,7 @@ "node_modules/faucet/node_modules/minimist": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", - "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=", + "integrity": "sha512-rSJ0cdmCj3qmKdObcnMcWgPVOyaOWlazLhZAJW0s6G6lx1ZEuFkraWmEH5LTvX90btkfHPclQBjvjU7A/kYRFg==", "dev": true }, "node_modules/faucet/node_modules/object-keys": { @@ -8996,9 +8763,9 @@ } }, "node_modules/fbjs": { - "version": "0.8.17", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", - "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "version": "0.8.18", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.18.tgz", + "integrity": "sha512-EQaWFK+fEPSoibjNy8IxUtaFOMXcWsY0JaVrQoZR9zC8N2Ygf9iDITPWjUTVIax95b6I742JFLqASHfsag/vKA==", "dev": true, "dependencies": { "core-js": "^1.0.0", @@ -9007,7 +8774,7 @@ "object-assign": "^4.1.0", "promise": "^7.1.1", "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.18" + "ua-parser-js": "^0.7.30" } }, "node_modules/fbjs/node_modules/core-js": { @@ -9635,18 +9402,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-intrinsic/node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/get-port": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", @@ -9739,7 +9494,7 @@ "node_modules/git-url-parse": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-6.2.2.tgz", - "integrity": "sha1-vkkCThS4SHVTQ2tFcri0OVMvqHE=", + "integrity": "sha512-9JDB1XJiwv0a9G8hg7yNmE/QJnNxaK3xqqgeyFgKxiOh9Saw0HTcggHfyFWWqk3mIRNTTYUF95jHrf32H9+HbA==", "dev": true, "dependencies": { "git-up": "^2.0.0" @@ -9774,7 +9529,7 @@ "node_modules/glob-base": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "integrity": "sha512-ab1S1g1EbO7YzauaJLkgLp7DZVAqj9M/dvKlTt8DkXA2tiOIcSMrlVI2J1RZyB5iJVccEscjGn+kpOG9788MHA==", "dev": true, "dependencies": { "glob-parent": "^2.0.0", @@ -9787,7 +9542,7 @@ "node_modules/glob-base/node_modules/glob-parent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "integrity": "sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==", "dev": true, "dependencies": { "is-glob": "^2.0.0" @@ -9830,7 +9585,7 @@ "node_modules/glob-stream": { "version": "5.3.5", "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", - "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "integrity": "sha512-piN8XVAO2sNxwVLokL4PswgJvK/uQ6+awwXUVRTGF+rRfgCZpn4hOqxiRuTEbU/k3qgKl0DACYQ/0Sge54UMQg==", "dev": true, "dependencies": { "extend": "^3.0.0", @@ -9870,7 +9625,7 @@ "node_modules/glob-stream/node_modules/braces": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==", "dev": true, "dependencies": { "expand-range": "^1.8.1", @@ -9933,7 +9688,7 @@ "node_modules/glob-stream/node_modules/glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", "dev": true, "dependencies": { "is-glob": "^3.1.0", @@ -9961,7 +9716,7 @@ "node_modules/glob-stream/node_modules/micromatch": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==", "dev": true, "dependencies": { "arr-diff": "^2.0.0", @@ -10292,15 +10047,6 @@ "node": ">=0.10.0" } }, - "node_modules/has-value/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has-values": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", @@ -10314,30 +10060,6 @@ "node": ">=0.10.0" } }, - "node_modules/has-values/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has-values/node_modules/kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", @@ -10513,9 +10235,9 @@ } }, "node_modules/hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "node_modules/html-comment-regex": { @@ -10743,9 +10465,9 @@ } }, "node_modules/inquirer/node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true, "engines": { "node": ">=4" @@ -11278,15 +11000,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-plain-object/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-posix-bracket": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", @@ -11555,7 +11268,7 @@ "node_modules/isomorphic-fetch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "integrity": "sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==", "dev": true, "dependencies": { "node-fetch": "^1.0.1", @@ -11632,9 +11345,9 @@ } }, "node_modules/json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "node_modules/json-schema-traverse": { @@ -11667,7 +11380,7 @@ "node_modules/json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -11741,18 +11454,18 @@ } }, "node_modules/jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, - "engines": [ - "node >=0.6.0" - ], "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" } }, "node_modules/jsts": { @@ -11896,9 +11609,9 @@ } }, "node_modules/lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "node_modules/lodash.assign": { @@ -12051,15 +11764,6 @@ "node": ">=6" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -12178,7 +11882,7 @@ "node_modules/mdast-util-to-hast": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-2.5.0.tgz", - "integrity": "sha1-8IeETSVcdUDzaQbaMLoQbA7l7i8=", + "integrity": "sha512-TWcl+BAK3ksLcm2No8n95hsdq1DdGByGqIzG07kXMBdS4h3+qN06mVD07HQHCHZMglBG1R6I5iasSL/rpK7qPA==", "dev": true, "dependencies": { "collapse-white-space": "^1.0.0", @@ -12444,10 +12148,9 @@ "dev": true }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -12456,10 +12159,13 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minipass": { "version": "3.3.4", @@ -12537,12 +12243,6 @@ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true }, - "node_modules/mkdirp/node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, "node_modules/module-deps-sortable": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/module-deps-sortable/-/module-deps-sortable-4.0.6.tgz", @@ -12669,24 +12369,6 @@ "node": ">=0.10.0" } }, - "node_modules/nanomatch/node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/nanomatch/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -12702,6 +12384,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -12773,9 +12461,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "node_modules/node-timeout": { @@ -12972,15 +12660,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-visit/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -12999,27 +12678,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.assign/node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign/node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object.entries": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.4.tgz", @@ -13077,15 +12735,6 @@ "node": ">=0.10.0" } }, - "node_modules/object.pick/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.values": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", @@ -13276,18 +12925,55 @@ } }, "node_modules/parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.7.tgz", + "integrity": "sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==", "dev": true, "dependencies": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" + "asn1.js": "^4.10.1", + "browserify-aes": "^1.2.0", + "evp_bytestokey": "^1.0.3", + "hash-base": "~3.0", + "pbkdf2": "^3.1.2", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" } }, + "node_modules/parse-asn1/node_modules/hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/parse-asn1/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/parse-entities": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz", @@ -13331,7 +13017,7 @@ "node_modules/parse-glob": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "integrity": "sha512-FC5TeK0AwXzq3tUBFtH74naWkPQCEWs4K+xMxWZBlKDWu0bVHXGZa+KKqxKidd7xwhdZ19ZNuF2uO1M/r196HA==", "dev": true, "dependencies": { "glob-base": "^0.3.0", @@ -13389,7 +13075,7 @@ "node_modules/parse-url": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-3.0.2.tgz", - "integrity": "sha1-YCeHpwY6eV1yuGcxl1BecvYGEL4=", + "integrity": "sha512-+KQY4Eu9mGvZtagWyd4HlJfc2O4t8pIKjNN1ahahnNTUpQ/7YA/taVrJoJVmClhBM8Qq0Dwbn3MSCbl5J9rQgQ==", "dev": true, "dependencies": { "is-ssh": "^1.3.0", @@ -13621,7 +13307,7 @@ "node_modules/postcss-calc": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", - "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "integrity": "sha512-iBcptYFq+QUh9gzP7ta2btw50o40s4uLI4UDVgd5yRAZtUDWc5APdl5yQDd2h/TyiZNbJrv0HiYhT102CMgN7Q==", "dev": true, "dependencies": { "postcss": "^5.0.2", @@ -13632,7 +13318,7 @@ "node_modules/postcss-colormin": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", - "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "integrity": "sha512-XXitQe+jNNPf+vxvQXIQ1+pvdQKWKgkx8zlJNltcMEmLma1ypDRDQwlLt+6cP26fBreihNhZxohh1rcgCH2W5w==", "dev": true, "dependencies": { "colormin": "^1.0.5", @@ -13643,7 +13329,7 @@ "node_modules/postcss-convert-values": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", - "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "integrity": "sha512-SE7mf25D3ORUEXpu3WUqQqy0nCbMuM5BEny+ULE/FXdS/0UMA58OdzwvzuHJRpIFlk1uojt16JhaEogtP6W2oA==", "dev": true, "dependencies": { "postcss": "^5.0.11", @@ -13653,7 +13339,7 @@ "node_modules/postcss-discard-comments": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", - "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "integrity": "sha512-yGbyBDo5FxsImE90LD8C87vgnNlweQkODMkUZlDVM/CBgLr9C5RasLGJxxh9GjVOBeG8NcCMatoqI1pXg8JNXg==", "dev": true, "dependencies": { "postcss": "^5.0.14" @@ -13662,7 +13348,7 @@ "node_modules/postcss-discard-duplicates": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", - "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "integrity": "sha512-+lk5W1uqO8qIUTET+UETgj9GWykLC3LOldr7EehmymV0Wu36kyoHimC4cILrAAYpHQ+fr4ypKcWcVNaGzm0reA==", "dev": true, "dependencies": { "postcss": "^5.0.4" @@ -13671,7 +13357,7 @@ "node_modules/postcss-discard-empty": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", - "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "integrity": "sha512-IBFoyrwk52dhF+5z/ZAbzq5Jy7Wq0aLUsOn69JNS+7YeuyHaNzJwBIYE0QlUH/p5d3L+OON72Fsexyb7OK/3og==", "dev": true, "dependencies": { "postcss": "^5.0.14" @@ -13680,7 +13366,7 @@ "node_modules/postcss-discard-overridden": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", - "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "integrity": "sha512-IyKoDL8QNObOiUc6eBw8kMxBHCfxUaERYTUe2QF8k7j/xiirayDzzkmlR6lMQjrAM1p1DDRTvWrS7Aa8lp6/uA==", "dev": true, "dependencies": { "postcss": "^5.0.16" @@ -13689,7 +13375,7 @@ "node_modules/postcss-discard-unused": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", - "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "integrity": "sha512-nCbFNfqYAbKCw9J6PSJubpN9asnrwVLkRDFc4KCwyUEdOtM5XDE/eTW3OpqHrYY1L4fZxgan7LLRAAYYBzwzrg==", "dev": true, "dependencies": { "postcss": "^5.0.14", @@ -13708,7 +13394,7 @@ "node_modules/postcss-merge-idents": { "version": "2.1.7", "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", - "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "integrity": "sha512-9DHmfCZ7/hNHhIKnNkz4CU0ejtGen5BbTRJc13Z2uHfCedeCUsK2WEQoAJRBL+phs68iWK6Qf8Jze71anuysWA==", "dev": true, "dependencies": { "has": "^1.0.1", @@ -13719,7 +13405,7 @@ "node_modules/postcss-merge-longhand": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", - "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "integrity": "sha512-ma7YvxjdLQdifnc1HFsW/AW6fVfubGyR+X4bE3FOSdBVMY9bZjKVdklHT+odknKBB7FSCfKIHC3yHK7RUAqRPg==", "dev": true, "dependencies": { "postcss": "^5.0.4" @@ -13728,7 +13414,7 @@ "node_modules/postcss-merge-rules": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", - "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "integrity": "sha512-Wgg2FS6W3AYBl+5L9poL6ZUISi5YzL+sDCJfM7zNw/Q1qsyVQXXZ2cbVui6mu2cYJpt1hOKCGj1xA4mq/obz/Q==", "dev": true, "dependencies": { "browserslist": "^1.5.2", @@ -13761,7 +13447,7 @@ "node_modules/postcss-minify-font-values": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", - "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "integrity": "sha512-vFSPzrJhNe6/8McOLU13XIsERohBJiIFFuC1PolgajOZdRWqRgKITP/A4Z/n4GQhEmtbxmO9NDw3QLaFfE1dFQ==", "dev": true, "dependencies": { "object-assign": "^4.0.1", @@ -13772,7 +13458,7 @@ "node_modules/postcss-minify-gradients": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", - "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "integrity": "sha512-DZhT0OE+RbVqVyGsTIKx84rU/5cury1jmwPa19bViqYPQu499ZU831yMzzsyC8EhiZVd73+h5Z9xb/DdaBpw7Q==", "dev": true, "dependencies": { "postcss": "^5.0.12", @@ -13782,7 +13468,7 @@ "node_modules/postcss-minify-params": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", - "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "integrity": "sha512-hhJdMVgP8vasrHbkKAk+ab28vEmPYgyuDzRl31V3BEB3QOR3L5TTIVEWLDNnZZ3+fiTi9d6Ker8GM8S1h8p2Ow==", "dev": true, "dependencies": { "alphanum-sort": "^1.0.1", @@ -13794,7 +13480,7 @@ "node_modules/postcss-minify-selectors": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", - "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "integrity": "sha512-e13vxPBSo3ZaPne43KVgM+UETkx3Bs4/Qvm6yXI9HQpQp4nyb7HZ0gKpkF+Wn2x+/dbQ+swNpCdZSbMOT7+TIA==", "dev": true, "dependencies": { "alphanum-sort": "^1.0.2", @@ -13806,7 +13492,7 @@ "node_modules/postcss-normalize-charset": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", - "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "integrity": "sha512-RKgjEks83l8w4yEhztOwNZ+nLSrJ+NvPNhpS+mVDzoaiRHZQVoG7NF2TP5qjwnaN9YswUhj6m1E0S0Z+WDCgEQ==", "dev": true, "dependencies": { "postcss": "^5.0.5" @@ -13815,7 +13501,7 @@ "node_modules/postcss-normalize-url": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", - "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "integrity": "sha512-WqtWG6GV2nELsQEFES0RzfL2ebVwmGl/M8VmMbshKto/UClBo+mznX8Zi4/hkThdqx7ijwv+O8HWPdpK7nH/Ig==", "dev": true, "dependencies": { "is-absolute-url": "^2.0.0", @@ -13827,7 +13513,7 @@ "node_modules/postcss-ordered-values": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", - "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "integrity": "sha512-5RB1IUZhkxDCfa5fx/ogp/A82mtq+r7USqS+7zt0e428HJ7+BHCxyeY39ClmkkUtxdOd3mk8gD6d9bjH2BECMg==", "dev": true, "dependencies": { "postcss": "^5.0.4", @@ -13837,7 +13523,7 @@ "node_modules/postcss-reduce-idents": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", - "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", + "integrity": "sha512-0+Ow9e8JLtffjumJJFPqvN4qAvokVbdQPnijUDSOX8tfTwrILLP4ETvrZcXZxAtpFLh/U0c+q8oRMJLr1Kiu4w==", "dev": true, "dependencies": { "postcss": "^5.0.4", @@ -13847,7 +13533,7 @@ "node_modules/postcss-reduce-initial": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", - "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "integrity": "sha512-jJFrV1vWOPCQsIVitawGesRgMgunbclERQ/IRGW7r93uHrVzNQQmHQ7znsOIjJPZ4yWMzs5A8NFhp3AkPHPbDA==", "dev": true, "dependencies": { "postcss": "^5.0.4" @@ -13856,7 +13542,7 @@ "node_modules/postcss-reduce-transforms": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", - "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "integrity": "sha512-lGgRqnSuAR5i5uUg1TA33r9UngfTadWxOyL2qx1KuPoCQzfmtaHjp9PuwX7yVyRxG3BWBzeFUaS5uV9eVgnEgQ==", "dev": true, "dependencies": { "has": "^1.0.1", @@ -13878,7 +13564,7 @@ "node_modules/postcss-svgo": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", - "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "integrity": "sha512-y5AdQdgBoF4rbpdbeWAJuxE953g/ylRfVNp6mvAi61VCN/Y25Tu9p5mh3CyI42WbTRIiwR9a1GdFtmDnNPeskQ==", "dev": true, "dependencies": { "is-svg": "^2.0.0", @@ -13890,7 +13576,7 @@ "node_modules/postcss-unique-selectors": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", - "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "integrity": "sha512-WZX8r1M0+IyljoJOJleg3kYm10hxNYF9scqAT7v/xeSX1IdehutOM85SNO0gP9K+bgs86XERr7Ud5u3ch4+D8g==", "dev": true, "dependencies": { "alphanum-sort": "^1.0.1", @@ -13907,7 +13593,7 @@ "node_modules/postcss-zindex": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", - "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "integrity": "sha512-uhRZ2hRgj0lorxm9cr62B01YzpUe63h0RXMXQ4gWW3oa2rpJh+FJAiEAytaFCPU/VgaBS+uW2SJ1XKyDNz1h4w==", "dev": true, "dependencies": { "has": "^1.0.1", @@ -14109,9 +13795,9 @@ } }, "node_modules/qs": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", - "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", "dev": true, "dependencies": { "side-channel": "^1.0.4" @@ -14313,20 +13999,26 @@ } }, "node_modules/readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", + "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", - "string_decoder": "~1.0.3", + "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, + "node_modules/readable-stream/node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "node_modules/readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -14464,27 +14156,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexp.prototype.flags/node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/regexp.prototype.flags/node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/regexpp": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", @@ -14546,7 +14217,7 @@ "node_modules/remark-html": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-6.0.1.tgz", - "integrity": "sha1-UJTSxx95Qf2yroZbrHZid1fOCcE=", + "integrity": "sha512-2V/0PVyZmHNrOJbkdooG/ULL3q4xRJfu/HfVwFGhr5SsA4uqwGuKbEcuhXtCH0K2NzQIhrf+8lhV69Ww2dKSIQ==", "dev": true, "dependencies": { "hast-util-sanitize": "^1.0.0", @@ -14710,16 +14381,10 @@ "node": ">= 6" } }, - "node_modules/request/node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, "node_modules/request/node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, "engines": { "node": ">=0.6" @@ -14987,16 +14652,10 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "devOptional": true }, - "node_modules/sax": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.4.2.tgz", - "integrity": "sha1-OfO2AXM9a+yXEFskKipA/Wl4rDw=", - "dev": true - }, "node_modules/semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -15100,15 +14759,18 @@ } }, "node_modules/shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", - "dev": true + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/shelljs": { "version": "0.7.8", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "integrity": "sha512-/YF5Uk8hcwi7ima04ppkbA4RaRMdPMBfwAvAf8sufYOxsJRtbdoBsT8vGvlb+799BrlGdYrd+oczIA2eN2JdWA==", "dev": true, "dependencies": { "glob": "^7.0.0", @@ -15291,15 +14953,6 @@ "node": ">=0.10.0" } }, - "node_modules/snapdragon-node/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/snapdragon-node/node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -15843,9 +15496,9 @@ } }, "node_modules/string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { "safe-buffer": "~5.1.0" @@ -16566,7 +16219,7 @@ "node_modules/svgo": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", - "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "integrity": "sha512-jT/g9FFMoe9lu2IT6HtAxTA7RR2XOrmcrmCtGnyB/+GQnV6ZjNn+KOHZbZ35yL81+1F/aB6OeEsJztzBQ2EEwA==", "deprecated": "This SVGO version is no longer supported. Upgrade to v2.x.x.", "dev": true, "dependencies": { @@ -16601,7 +16254,7 @@ "node_modules/svgo/node_modules/js-yaml": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", - "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "integrity": "sha512-eIlkGty7HGmntbV6P/ZlAsoncFLGsNoM27lkTzS+oneY/EiNhj+geqD9ezg/ip+SW6Var0BJU2JtV0vEUZpWVQ==", "dev": true, "dependencies": { "argparse": "^1.0.7", @@ -16657,9 +16310,9 @@ } }, "node_modules/table/node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true, "engines": { "node": ">=4" @@ -16868,24 +16521,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tape/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tape/node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, "node_modules/tape/node_modules/object-inspect": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", @@ -16913,19 +16548,27 @@ } }, "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "engines": { - "node": ">= 10" + "node": ">=10" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" } }, "node_modules/tar/node_modules/mkdirp": { @@ -16976,36 +16619,6 @@ "xtend": "~4.0.0" } }, - "node_modules/through2/node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/through2/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/through2/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/timers-browserify": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", @@ -17182,7 +16795,8 @@ "node_modules/trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", + "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==", + "deprecated": "Use String.prototype.trim() instead", "dev": true }, "node_modules/trim-lines": { @@ -17714,12 +17328,6 @@ "turf-inside": "^3.0.12" } }, - "node_modules/turf-point/node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "node_modules/turf-random": { "version": "3.0.12", "resolved": "https://registry.npmjs.org/turf-random/-/turf-random-3.0.12.tgz", @@ -17853,6 +17461,12 @@ "integrity": "sha1-MdPzIjnk9zHsqd+RVeKyl/AIq2Q=", "dev": true }, + "node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + }, "node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -17878,9 +17492,9 @@ "dev": true }, "node_modules/ua-parser-js": { - "version": "0.7.28", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz", - "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==", + "version": "0.7.35", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz", + "integrity": "sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==", "dev": true, "funding": [ { @@ -18154,7 +17768,7 @@ "node_modules/unist-util-select": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-1.5.0.tgz", - "integrity": "sha1-qTwr6MD2U4J4A7gTMa3sKqJM2TM=", + "integrity": "sha512-/Ukg/X76ljCVYbisAGJm0HOgy3MfYmjAdVOYUfBleuTtOmRZVzbW7+ZAQqJQi6ObITtcpRv7uNwoUG1RF7vJ9Q==", "dev": true, "dependencies": { "css-selector-parser": "^1.1.0", @@ -18234,19 +17848,10 @@ "node": ">=0.10.0" } }, - "node_modules/unset-value/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/update-browserslist-db": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz", - "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "dev": true, "funding": [ { @@ -18256,6 +17861,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { @@ -18263,7 +17872,7 @@ "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -18806,15 +18415,6 @@ "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=", "dev": true }, - "node_modules/xml2js": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.2.6.tgz", - "integrity": "sha1-0gnE5N2h/JxFIUHvQcB39a399sQ=", - "dev": true, - "dependencies": { - "sax": "0.4.2" - } - }, "node_modules/xmlbuilder": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", @@ -18837,9 +18437,9 @@ } }, "node_modules/y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", "dev": true }, "node_modules/yallist": { @@ -18927,25 +18527,17 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } } } }, "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" } }, "@babel/compat-data": { @@ -18996,9 +18588,9 @@ } }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "ms": { @@ -19008,33 +18600,34 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, "@babel/generator": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", - "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", + "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", "dev": true, "requires": { - "@babel/types": "^7.18.13", - "@jridgewell/gen-mapping": "^0.3.2", + "@babel/types": "^7.24.5", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "dependencies": { "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" } }, "jsesc": { @@ -19077,9 +18670,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -19176,17 +18769,17 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-explode-assignable-expression": { @@ -19199,22 +18792,22 @@ } }, "@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-member-expression-to-functions": { @@ -19249,14 +18842,6 @@ "@babel/template": "^7.18.6", "@babel/traverse": "^7.18.9", "@babel/types": "^7.18.9" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true - } } }, "@babel/helper-optimise-call-expression": { @@ -19318,24 +18903,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.24.5" } }, "@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "dev": true }, "@babel/helper-validator-option": { @@ -19368,22 +18953,17 @@ } }, "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", + "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.24.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true - }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -19422,9 +19002,9 @@ } }, "@babel/parser": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz", - "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { @@ -19931,14 +19511,6 @@ "@babel/helper-plugin-utils": "^7.18.9", "@babel/helper-validator-identifier": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true - } } }, "@babel/plugin-transform-modules-umd": { @@ -20218,9 +19790,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -20270,31 +19842,31 @@ } }, "@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" } }, "@babel/traverse": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", - "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", + "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.13", - "@babel/types": "^7.18.13", - "debug": "^4.1.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/types": "^7.24.5", + "debug": "^4.3.1", "globals": "^11.1.0" }, "dependencies": { @@ -20322,22 +19894,16 @@ } }, "@babel/types": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", - "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true - }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -20363,9 +19929,9 @@ "dev": true }, "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true }, "@jridgewell/sourcemap-codec": { @@ -20375,19 +19941,19 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@mapbox/node-pre-gyp": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", - "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", "requires": { "detect-libc": "^2.0.0", "https-proxy-agent": "^5.0.0", @@ -20422,20 +19988,12 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -20445,9 +20003,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } @@ -20608,7 +20166,7 @@ "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "integrity": "sha512-JoAxEa1DfP9m2xfB/y2r/aKcwXNlltr4+0QSBC4TrLfcxyvepX2Pv0t/xpgGV5bGsDzCYV8SzjWgyCW0T9yYbA==", "dev": true }, "ansi-regex": { @@ -20804,15 +20362,14 @@ } }, "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "dev": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" + "minimalistic-assert": "^1.0.0" }, "dependencies": { "bn.js": { @@ -20889,7 +20446,7 @@ "autoprefixer": { "version": "6.7.7", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", - "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "integrity": "sha512-WKExI/eSGgGAkWAO+wMVdFObZV7hQen54UpD1kCCTN3tvlL3W1jL4+lPP/M7MwoP7Q4RHzKtO3JQ4HxYEcd+xQ==", "dev": true, "requires": { "browserslist": "^1.7.6", @@ -20918,24 +20475,6 @@ "integrity": "sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA==", "dev": true }, - "aws-sdk": { - "version": "2.0.31", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.0.31.tgz", - "integrity": "sha1-5yzx/caQFb2f0r3z07iMFlB9Jo4=", - "dev": true, - "requires": { - "xml2js": "0.2.6", - "xmlbuilder": "0.4.2" - }, - "dependencies": { - "xmlbuilder": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.4.2.tgz", - "integrity": "sha1-F3bWXz/brUcKCNhgTN6xxOVA/4M=", - "dev": true - } - } - }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -20948,6 +20487,175 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, + "babel-cli": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", + "integrity": "sha512-wau+BDtQfuSBGQ9PzzFL3REvR9Sxnd4LKwtcHAiPjhugA7K/80vpHXafj+O5bAqJOuSefjOx5ZJnNSR2J1Qw6Q==", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-polyfill": "^6.26.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "chokidar": "^1.6.1", + "commander": "^2.11.0", + "convert-source-map": "^1.5.0", + "fs-readdir-recursive": "^1.0.0", + "glob": "^7.1.2", + "lodash": "^4.17.4", + "output-file-sync": "^1.1.2", + "path-is-absolute": "^1.0.1", + "slash": "^1.0.0", + "source-map": "^0.5.6", + "v8flags": "^2.1.1" + }, + "dependencies": { + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha512-dtXTVMkh6VkEEA7OhXnN1Ecb8aAGFdZ1LFxtOCoqj4qkyOJMt7+qs6Ahdy6p/NQCPYsRSXXivhSB/J5E9jmYKA==", + "dev": true, + "optional": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha512-G2n5bG5fSUCpnsXz4+8FUkYsGPkNfLn9YvS66U5qbTIXI2Ynnlo4Bi42bWv+omKUCqz+ejzfClwne0alJWJPhg==", + "dev": true, + "optional": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==", + "dev": true, + "optional": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha512-mk8fAWcRUOxY7btlLtitj3A45jOwSAxH4tOFOoEGbVsl6cL6pPMWUy7dwZ/canfj3QEdP6FHSnf/l1c6/WkzVg==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha512-hxx03P2dJxss6ceIeri9cmYOT4SRs3Zk3afZwWpOsRqLqprhTR8u++SlC+sFGsQr7WGFPdMF7Gjc1njDLDK6UA==", + "dev": true, + "optional": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha512-1FOj1LOwn42TMrruOHGt18HemVnbwAmAak7krWk+wa93KXxGbK+2jpezm+ytJYDaBX0/SPLZFHKM7m+tKobWGg==", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==", + "dev": true, + "optional": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==", + "dev": true, + "optional": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", + "dev": true + } + } + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -21231,7 +20939,7 @@ "babel-helper-bindify-decorators": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", - "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", + "integrity": "sha512-TYX2QQATKA6Wssp6j7jqlw4QLmABDN1olRdEHndYvBXdaXM5dcx6j5rN0+nd+aVL+Th40fAEYvvw/Xxd/LETuQ==", "dev": true, "requires": { "babel-runtime": "^6.22.0", @@ -21242,7 +20950,7 @@ "babel-helper-builder-binary-assignment-operator-visitor": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "integrity": "sha512-gCtfYORSG1fUMX4kKraymq607FWgMWg+j42IFPc18kFQEsmtaibP4UrqsXt8FlEJle25HUd4tsoDR7H2wDhe9Q==", "dev": true, "requires": { "babel-helper-explode-assignable-expression": "^6.24.1", @@ -21264,7 +20972,7 @@ "babel-helper-call-delegate": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "integrity": "sha512-RL8n2NiEj+kKztlrVJM9JT1cXzzAdvWFh76xh/H1I4nKwunzE4INBXn8ieCZ+wh4zWszZk7NBS1s/8HR5jDkzQ==", "dev": true, "requires": { "babel-helper-hoist-variables": "^6.24.1", @@ -21276,7 +20984,7 @@ "babel-helper-define-map": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "integrity": "sha512-bHkmjcC9lM1kmZcVpA5t2om2nzT/xiZpo6TJq7UlZ3wqKfzia4veeXbIhKvJXAMzhhEBd3cR1IElL5AenWEUpA==", "dev": true, "requires": { "babel-helper-function-name": "^6.24.1", @@ -21288,7 +20996,7 @@ "babel-helper-explode-assignable-expression": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "integrity": "sha512-qe5csbhbvq6ccry9G7tkXbzNtcDiH4r51rrPUbwwoTzZ18AqxWYRZT6AOmxrpxKnQBW0pYlBI/8vh73Z//78nQ==", "dev": true, "requires": { "babel-runtime": "^6.22.0", @@ -21299,7 +21007,7 @@ "babel-helper-explode-class": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", - "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", + "integrity": "sha512-SFbWewr0/0U4AiRzsHqwsbOQeLXVa9T1ELdqEa2efcQB5KopTnunAqoj07TuHlN2lfTQNPGO/rJR4FMln5fVcA==", "dev": true, "requires": { "babel-helper-bindify-decorators": "^6.24.1", @@ -21311,7 +21019,7 @@ "babel-helper-function-name": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "integrity": "sha512-Oo6+e2iX+o9eVvJ9Y5eKL5iryeRdsIkwRYheCuhYdVHsdEQysbc2z2QkqCLIYnNxkT5Ss3ggrHdXiDI7Dhrn4Q==", "dev": true, "requires": { "babel-helper-get-function-arity": "^6.24.1", @@ -21365,7 +21073,7 @@ "babel-helper-remap-async-to-generator": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "integrity": "sha512-RYqaPD0mQyQIFRu7Ho5wE2yvA/5jxqCIj/Lv4BXNq23mHYu/vxikOy2JueLiBxQknwapwrJeNCesvY0ZcfnlHg==", "dev": true, "requires": { "babel-helper-function-name": "^6.24.1", @@ -21378,7 +21086,7 @@ "babel-helper-replace-supers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "integrity": "sha512-sLI+u7sXJh6+ToqDr57Bv973kCepItDhMou0xCP2YPVmR1jkHSCY+p1no8xErbV1Siz5QE8qKT1WIwybSWlqjw==", "dev": true, "requires": { "babel-helper-optimise-call-expression": "^6.24.1", @@ -21392,7 +21100,7 @@ "babel-helpers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "integrity": "sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ==", "dev": true, "requires": { "babel-runtime": "^6.22.0", @@ -21438,9 +21146,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -21560,7 +21268,7 @@ "babel-plugin-transform-async-generator-functions": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", - "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", + "integrity": "sha512-uT7eovUxtXe8Q2ufcjRuJIOL0hg6VAUJhiWJBLxH/evYAw+aqoJLcYTR8hqx13iOx/FfbCMHgBmXWZjukbkyPg==", "dev": true, "requires": { "babel-helper-remap-async-to-generator": "^6.24.1", @@ -21571,7 +21279,7 @@ "babel-plugin-transform-async-to-generator": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "integrity": "sha512-7BgYJujNCg0Ti3x0c/DL3tStvnKS6ktIYOmo9wginv/dfZOrbSZ+qG4IRRHMBOzZ5Awb1skTiAsQXg/+IWkZYw==", "dev": true, "requires": { "babel-helper-remap-async-to-generator": "^6.24.1", @@ -21582,7 +21290,7 @@ "babel-plugin-transform-class-constructor-call": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz", - "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", + "integrity": "sha512-RvYukT1Nh7njz8P8326ztpQUGCKwmjgu6aRIx1lkvylWITYcskg29vy1Kp8WXIq7FvhXsz0Crf2kS94bjB690A==", "dev": true, "requires": { "babel-plugin-syntax-class-constructor-call": "^6.18.0", @@ -21593,7 +21301,7 @@ "babel-plugin-transform-class-properties": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", - "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "integrity": "sha512-n4jtBA3OYBdvG5PRMKsMXJXHfLYw/ZOmtxCLOOwz6Ro5XlrColkStLnz1AS1L2yfPA9BKJ1ZNlmVCLjAL9DSIg==", "dev": true, "requires": { "babel-helper-function-name": "^6.24.1", @@ -21605,7 +21313,7 @@ "babel-plugin-transform-decorators": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", - "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", + "integrity": "sha512-skQ2CImwDkCHu0mkWvCOlBCpBIHW4/49IZWVwV4A/EnWjL9bB6UBvLyMNe3Td5XDStSZNhe69j4bfEW8dvUbew==", "dev": true, "requires": { "babel-helper-explode-class": "^6.24.1", @@ -21657,7 +21365,7 @@ "babel-plugin-transform-es2015-block-scoping": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "integrity": "sha512-YiN6sFAQ5lML8JjCmr7uerS5Yc/EMbgg9G8ZNmk2E3nYX4ckHR01wrkeeMijEf5WHNK5TW0Sl0Uu3pv3EdOJWw==", "dev": true, "requires": { "babel-runtime": "^6.26.0", @@ -21670,7 +21378,7 @@ "babel-plugin-transform-es2015-classes": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "integrity": "sha512-5Dy7ZbRinGrNtmWpquZKZ3EGY8sDgIVB4CU8Om8q8tnMLrD/m94cKglVcHps0BCTdZ0TJeeAWOq2TK9MIY6cag==", "dev": true, "requires": { "babel-helper-define-map": "^6.24.1", @@ -21687,7 +21395,7 @@ "babel-plugin-transform-es2015-computed-properties": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "integrity": "sha512-C/uAv4ktFP/Hmh01gMTvYvICrKze0XVX9f2PdIXuriCSvUmV9j+u+BB9f5fJK3+878yMK6dkdcq+Ymr9mrcLzw==", "dev": true, "requires": { "babel-runtime": "^6.22.0", @@ -21725,7 +21433,7 @@ "babel-plugin-transform-es2015-function-name": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "integrity": "sha512-iFp5KIcorf11iBqu/y/a7DK3MN5di3pNCzto61FqCNnUX4qeBwcV1SLqe10oXNnCaxBUImX3SckX2/o1nsrTcg==", "dev": true, "requires": { "babel-helper-function-name": "^6.24.1", @@ -21745,7 +21453,7 @@ "babel-plugin-transform-es2015-modules-amd": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "integrity": "sha512-LnIIdGWIKdw7zwckqx+eGjcS8/cl8D74A3BpJbGjKTFFNJSMrjN4bIh22HY1AlkUbeLG6X6OZj56BDvWD+OeFA==", "dev": true, "requires": { "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", @@ -21768,7 +21476,7 @@ "babel-plugin-transform-es2015-modules-systemjs": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "integrity": "sha512-ONFIPsq8y4bls5PPsAWYXH/21Hqv64TBxdje0FvU3MhIV6QM2j5YS7KvAzg/nTIVLot2D2fmFQrFWCbgHlFEjg==", "dev": true, "requires": { "babel-helper-hoist-variables": "^6.24.1", @@ -21779,7 +21487,7 @@ "babel-plugin-transform-es2015-modules-umd": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "integrity": "sha512-LpVbiT9CLsuAIp3IG0tfbVo81QIhn6pE8xBJ7XSeCtFlMltuar5VuBV6y6Q45tpui9QWcy5i0vLQfCfrnF7Kiw==", "dev": true, "requires": { "babel-plugin-transform-es2015-modules-amd": "^6.24.1", @@ -21790,7 +21498,7 @@ "babel-plugin-transform-es2015-object-super": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "integrity": "sha512-8G5hpZMecb53vpD3mjs64NhI1au24TAmokQ4B+TBFBjN9cVoGoOvotdrMMRmHvVZUEvqGUPWL514woru1ChZMA==", "dev": true, "requires": { "babel-helper-replace-supers": "^6.24.1", @@ -21800,7 +21508,7 @@ "babel-plugin-transform-es2015-parameters": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "integrity": "sha512-8HxlW+BB5HqniD+nLkQ4xSAVq3bR/pcYW9IigY+2y0dI+Y7INFeTbfAQr+63T3E4UDsZGjyb+l9txUnABWxlOQ==", "dev": true, "requires": { "babel-helper-call-delegate": "^6.24.1", @@ -21873,7 +21581,7 @@ "babel-plugin-transform-exponentiation-operator": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "integrity": "sha512-LzXDmbMkklvNhprr20//RStKVcT8Cu+SQtX18eMHLhjHf2yFzwtQ0S2f0jQ+89rokoNdmwoSqYzAhq86FxlLSQ==", "dev": true, "requires": { "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", @@ -22002,7 +21710,7 @@ "babel-preset-es2015": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", - "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "integrity": "sha512-XfwUqG1Ry6R43m4Wfob+vHbIVBIqTg/TJY4Snku1iIzeH7mUnwHA8Vagmv+ZQbPwhS8HgsdQvy28Py3k5zpoFQ==", "dev": true, "requires": { "babel-plugin-check-es2015-constants": "^6.22.0", @@ -22057,7 +21765,7 @@ "babel-preset-stage-0": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz", - "integrity": "sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo=", + "integrity": "sha512-MJD+xBbpsApbKlzAX0sOBF+VeFaUmv5s8FSOO7SSZpes1QgphCjq/UIGRFWSmQ/0i5bqQjLGCTXGGXqcLQ9JDA==", "dev": true, "requires": { "babel-plugin-transform-do-expressions": "^6.22.0", @@ -22068,7 +21776,7 @@ "babel-preset-stage-1": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", - "integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=", + "integrity": "sha512-rn+UOcd7BHDniq1SVxv2/AVVSVI1NK+hfS0I/iR6m6KbOi/aeBRcqBilqO73pd9VUpRXF2HFtlDuC9F2BEQqmg==", "dev": true, "requires": { "babel-plugin-transform-class-constructor-call": "^6.24.1", @@ -22079,7 +21787,7 @@ "babel-preset-stage-2": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", - "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", + "integrity": "sha512-9F+nquz+37PrlTSBdpeQBKnQfAMNBnryXw+m4qBh35FNbJPfzZz+sjN2G5Uf1CRedU9PH7fJkTbYijxmkLX8Og==", "dev": true, "requires": { "babel-plugin-syntax-dynamic-import": "^6.18.0", @@ -22091,7 +21799,7 @@ "babel-preset-stage-3": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", - "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "integrity": "sha512-eCbEOF8uN0KypFXJmZXn2sTk7bPV9uM5xov7G/7BM08TbQEObsVs0cEWfy6NQySlfk7JBi/t+XJP1JkruYfthA==", "dev": true, "requires": { "babel-plugin-syntax-trailing-function-commas": "^6.22.0", @@ -22104,7 +21812,7 @@ "babel-register": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "integrity": "sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A==", "dev": true, "requires": { "babel-core": "^6.26.0", @@ -22129,7 +21837,7 @@ "babel-template": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", "dev": true, "requires": { "babel-runtime": "^6.26.0", @@ -22142,7 +21850,7 @@ "babel-traverse": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", "dev": true, "requires": { "babel-code-frame": "^6.26.0", @@ -22245,12 +21953,6 @@ "kind-of": "^6.0.2" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -22297,9 +21999,9 @@ "dev": true }, "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, "body": { @@ -22579,53 +22281,44 @@ } }, "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.3.tgz", + "integrity": "sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==", "dev": true, "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", + "elliptic": "^6.5.5", + "hash-base": "~3.0", "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "parse-asn1": "^5.1.7", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1" }, "dependencies": { + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } } } }, @@ -22639,23 +22332,15 @@ } }, "browserslist": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", - "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001370", - "electron-to-chromium": "^1.4.202", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.5" - }, - "dependencies": { - "electron-to-chromium": { - "version": "1.4.230", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.230.tgz", - "integrity": "sha512-3pwjAK0qHSDN9+YAF4fJknsSruP7mpjdWzUSruIJD/JCH77pEh0SorEyb3xVaKkfwk2tzjOt2D8scJ0KAdfXLA==", - "dev": true - } + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" } }, "buffer": { @@ -22725,20 +22410,12 @@ "to-object-path": "^0.3.0", "union-value": "^1.0.0", "unset-value": "^1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "cached-path-relative": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", - "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", + "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", "dev": true }, "call-bind": { @@ -22819,9 +22496,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001383", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001383.tgz", - "integrity": "sha512-swMpEoTp5vDoGBZsYZX7L7nXHe6dsHxi9o6/LKf/f0LukVtnrxly5GVb/fWdCDTqi/yw6Km6tiJ0pmBacm0gbg==", + "version": "1.0.30001516", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz", + "integrity": "sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==", "dev": true }, "caseless": { @@ -23018,12 +22695,6 @@ "requires": { "is-descriptor": "^0.1.0" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true } } }, @@ -23104,30 +22775,6 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } } } }, @@ -23170,7 +22817,7 @@ "color": { "version": "0.11.4", "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", - "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "integrity": "sha512-Ajpjd8asqZ6EdxQeqGzU5WBhhTfJ/0cA4Wlbre7e5vXfmDSmda7Ov6jeKoru+b0vHcb1CqvuroTHp5zIWzhVMA==", "dev": true, "requires": { "clone": "^1.0.2", @@ -23204,7 +22851,7 @@ "color-string": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", - "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "integrity": "sha512-sz29j1bmSDfoAxKIEU6zwoIZXN6BrFbAMIhfYCNyiZXBDuU/aiHlN84lp/xDzL2ubyFhLDobHIlU1X70XRrMDA==", "dev": true, "requires": { "color-name": "^1.0.0" @@ -23218,7 +22865,7 @@ "colormin": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", - "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "integrity": "sha512-XSEQUUQUR/lXqGyddiNH3XYFUPYlYr1vXy9rTFMsSOw+J7Q6EQkdlQIrTlYn4TccpsOaUE1PYQNjBn20gwCdgQ==", "dev": true, "requires": { "color": "^0.11.0", @@ -23325,12 +22972,6 @@ "supports-color": "^5.3.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -23424,21 +23065,12 @@ "dev": true }, "core-js-compat": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.25.0.tgz", - "integrity": "sha512-extKQM0g8/3GjFx9US12FAgx8KJawB7RCQ5y8ipYLbmfzEzmFRWdDjIlxDx82g7ygcNG85qMVUSRyABouELdow==", + "version": "3.31.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.1.tgz", + "integrity": "sha512-wIDWd2s5/5aJSdpOJHfSibxNODxoGoWOBHt8JSPB41NOE94M7kuTPZCYLOlTtuoXTsBPKobpJ6T+y0SSy5L9SA==", "dev": true, "requires": { - "browserslist": "^4.21.3", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } + "browserslist": "^4.21.9" } }, "core-util-is": { @@ -23559,7 +23191,7 @@ "cssnano": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", - "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "integrity": "sha512-0o0IMQE0Ezo4b41Yrm8U6Rp9/Ag81vNXY1gZMnT1XhO4DpjEf2utKERqWJbOoz3g1Wdc1d3QSta/cIuJ1wSTEg==", "dev": true, "requires": { "autoprefixer": "^6.3.1", @@ -23682,9 +23314,9 @@ "dev": true }, "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true }, "deep-equal": { @@ -23753,12 +23385,6 @@ "kind-of": "^6.0.2" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -23850,7 +23476,7 @@ "diff": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", + "integrity": "sha512-VzVc42hMZbYU9Sx/ltb7KYuQ6pqAw+cbFWVy4XKdkuEL2CFaRLGEnISPs7YdzaUGpi+CpIqvRmu7hPQ4T7EQ5w==", "dev": true }, "diffie-hellman": { @@ -23875,7 +23501,7 @@ "disparity": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/disparity/-/disparity-2.0.0.tgz", - "integrity": "sha1-V92stHMkrl9Y0swNqIbbTOnutxg=", + "integrity": "sha512-caMA9oIQbDeobWc9MVUF0+o1APVo0UZnfD482x0RaLLAzpAc6Dla2mk5ef7onsG91tziIRr41rj4sVt3BOLLZw==", "dev": true, "requires": { "ansi-styles": "^2.0.1", @@ -23925,9 +23551,9 @@ "dev": true }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true }, "ansi-styles": { @@ -23939,57 +23565,6 @@ "color-convert": "^1.9.0" } }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "optional": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "optional": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true, - "optional": true - }, - "babel-cli": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", - "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-polyfill": "^6.26.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "chokidar": "^1.6.1", - "commander": "^2.11.0", - "convert-source-map": "^1.5.0", - "fs-readdir-recursive": "^1.0.0", - "glob": "^7.1.2", - "lodash": "^4.17.4", - "output-file-sync": "^1.1.2", - "path-is-absolute": "^1.0.1", - "slash": "^1.0.0", - "source-map": "^0.5.6", - "v8flags": "^2.1.1" - } - }, "babelify": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/babelify/-/babelify-8.0.0.tgz", @@ -23997,18 +23572,6 @@ "dev": true, "requires": {} }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "optional": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, "browser-resolve": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", @@ -24085,24 +23648,6 @@ "supports-color": "^5.3.0" } }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "optional": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, "debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", @@ -24185,70 +23730,12 @@ "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", "dev": true }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "optional": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "optional": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "optional": true, - "requires": { - "is-glob": "^2.0.0" - } - }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true, - "optional": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "optional": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, "mdast-util-to-hast": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-3.0.4.tgz", @@ -24268,28 +23755,6 @@ "xtend": "^4.0.1" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "optional": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, "module-deps": { "version": "6.2.3", "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", @@ -24354,12 +23819,6 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, "stream-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", @@ -24430,7 +23889,7 @@ "documentation": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/documentation/-/documentation-4.0.0.tgz", - "integrity": "sha1-moqajjiWm/1J008137J/HHW2R8A=", + "integrity": "sha512-Iv7zUuiWUnapAC1loC7bubrO2oINAQrgjXxszl9QqlPXpvVkLWgmDi8SnrDQam/qYHCgpy7fXR2K3+4mc2knrA==", "dev": true, "requires": { "ansi-html": "^0.0.7", @@ -24506,7 +23965,7 @@ "micromatch": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==", "dev": true, "requires": { "arr-diff": "^2.0.0", @@ -24544,7 +24003,7 @@ "babelify": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", - "integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=", + "integrity": "sha512-vID8Fz6pPN5pJMdlUnNFSfrlcx5MUule4k9aKs/zbZPyXxMTcRrB0M4Tarw22L8afr8eYSWxDPYCob3TdrqtlA==", "dev": true, "requires": { "babel-core": "^6.0.14", @@ -24554,7 +24013,7 @@ "braces": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==", "dev": true, "requires": { "expand-range": "^1.8.1", @@ -24576,7 +24035,7 @@ "chokidar": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "integrity": "sha512-mk8fAWcRUOxY7btlLtitj3A45jOwSAxH4tOFOoEGbVsl6cL6pPMWUy7dwZ/canfj3QEdP6FHSnf/l1c6/WkzVg==", "dev": true, "requires": { "anymatch": "^1.3.0", @@ -24631,7 +24090,7 @@ "glob-parent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "integrity": "sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==", "dev": true, "requires": { "is-glob": "^2.0.0" @@ -24734,7 +24193,7 @@ "yargs": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "integrity": "sha512-6/QWTdisjnu5UHUzQGst+UOEuEVwIzFVGBjq3jMTFNs5WJQsH/X6nMURSaScIdF5txylr1Ao9bvbWiKi2yXbwA==", "dev": true, "requires": { "camelcase": "^3.0.0", @@ -24827,7 +24286,7 @@ "yargs-parser": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "integrity": "sha512-+QQWqC2xeL0N5/TE+TY6OGEqyNRM+g2/r712PDNYgiCdXYCApXf1vzfmDSLBxfGRwV+moTq/V8FnMI24JCm2Yg==", "dev": true, "requires": { "camelcase": "^3.0.0" @@ -24904,15 +24363,15 @@ } }, "electron-to-chromium": { - "version": "1.3.752", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.752.tgz", - "integrity": "sha512-2Tg+7jSl3oPxgsBsWKh5H83QazTkmWG/cnNwJplmyZc7KcN61+I10oUgaXSVk/NwfvN3BdkKDR4FYuRBQQ2v0A==", + "version": "1.4.462", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.462.tgz", + "integrity": "sha512-ux2LqN9JKRBDKXMT+78jtiBLPiXf+rLtYlsrOg5Qn7uv6Cbg7+9JyIalE3wcqkOdB2wPCUYNWAuL7suKRMHe9w==", "dev": true }, "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz", + "integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==", "dev": true, "requires": { "bn.js": "^4.11.9", @@ -25040,32 +24499,6 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true - }, - "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", - "dev": true - }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } } } }, @@ -25078,44 +24511,39 @@ "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" - }, - "dependencies": { - "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", - "dev": true - } } }, "es5-ext": { - "version": "0.10.30", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.30.tgz", - "integrity": "sha1-cUGhaDZpfbq/qq7uQUlc4p9SyTk=", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "dev": true, "requires": { - "es6-iterator": "2", - "es6-symbol": "~3.1" + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" } }, "es6-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", - "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", "dev": true, "requires": { "d": "1", - "es5-ext": "^0.10.14", - "es6-symbol": "^3.1" + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" }, "dependencies": { "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", "dev": true, "requires": { - "es5-ext": "^0.10.9" + "es5-ext": "^0.10.64", + "type": "^2.7.2" } } } @@ -25127,22 +24555,23 @@ "dev": true }, "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "^1.0.2", + "ext": "^1.7.0" }, "dependencies": { "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", "dev": true, "requires": { - "es5-ext": "^0.10.9" + "es5-ext": "^0.10.64", + "type": "^2.7.2" } } } @@ -25225,26 +24654,6 @@ "text-table": "^0.2.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -25257,16 +24666,10 @@ "uri-js": "^4.2.2" } }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true }, "ansi-styles": { @@ -25342,12 +24745,6 @@ "estraverse": "^4.1.1" } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -25400,12 +24797,6 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -25434,15 +24825,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "strip-ansi": { @@ -25462,22 +24847,6 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -25521,12 +24890,6 @@ } } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "slice-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", @@ -25579,15 +24942,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "string-width": { @@ -25703,6 +25060,30 @@ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, + "esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "dependencies": { + "d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "dev": true, + "requires": { + "es5-ext": "^0.10.64", + "type": "^2.7.2" + } + } + } + }, "espree": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", @@ -25752,14 +25133,6 @@ "requires": { "estraverse": "^4.1.0", "object-assign": "^4.0.1" - }, - "dependencies": { - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - } } }, "estraverse": { @@ -25774,6 +25147,28 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + }, + "dependencies": { + "d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "dev": true, + "requires": { + "es5-ext": "^0.10.64", + "type": "^2.7.2" + } + } + } + }, "events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -25867,6 +25262,15 @@ } } }, + "ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "requires": { + "type": "^2.7.2" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -26035,7 +25439,7 @@ "faucet": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/faucet/-/faucet-0.0.1.tgz", - "integrity": "sha1-WX3PHSGJosBiMhtZHo8VHtIDnZw=", + "integrity": "sha512-2I/5frATNZRdagYuS5u5UfZKCo2V40c++KY7cLBWmBalJZoUwEbVxAQcyu3+k/6bcztSBPBEyk2ama426f53GA==", "dev": true, "requires": { "defined": "0.0.0", @@ -26062,7 +25466,7 @@ "minimist": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", - "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=", + "integrity": "sha512-rSJ0cdmCj3qmKdObcnMcWgPVOyaOWlazLhZAJW0s6G6lx1ZEuFkraWmEH5LTvX90btkfHPclQBjvjU7A/kYRFg==", "dev": true }, "object-keys": { @@ -26134,9 +25538,9 @@ } }, "fbjs": { - "version": "0.8.17", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", - "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "version": "0.8.18", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.18.tgz", + "integrity": "sha512-EQaWFK+fEPSoibjNy8IxUtaFOMXcWsY0JaVrQoZR9zC8N2Ygf9iDITPWjUTVIax95b6I742JFLqASHfsag/vKA==", "dev": true, "requires": { "core-js": "^1.0.0", @@ -26145,7 +25549,7 @@ "object-assign": "^4.1.0", "promise": "^7.1.1", "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.18" + "ua-parser-js": "^0.7.30" }, "dependencies": { "core-js": { @@ -26631,17 +26035,6 @@ "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1" - }, - "dependencies": { - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - } } }, "get-port": { @@ -26713,7 +26106,7 @@ "git-url-parse": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-6.2.2.tgz", - "integrity": "sha1-vkkCThS4SHVTQ2tFcri0OVMvqHE=", + "integrity": "sha512-9JDB1XJiwv0a9G8hg7yNmE/QJnNxaK3xqqgeyFgKxiOh9Saw0HTcggHfyFWWqk3mIRNTTYUF95jHrf32H9+HbA==", "dev": true, "requires": { "git-up": "^2.0.0" @@ -26745,7 +26138,7 @@ "glob-base": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "integrity": "sha512-ab1S1g1EbO7YzauaJLkgLp7DZVAqj9M/dvKlTt8DkXA2tiOIcSMrlVI2J1RZyB5iJVccEscjGn+kpOG9788MHA==", "dev": true, "requires": { "glob-parent": "^2.0.0", @@ -26755,7 +26148,7 @@ "glob-parent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "integrity": "sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==", "dev": true, "requires": { "is-glob": "^2.0.0" @@ -26791,7 +26184,7 @@ "glob-stream": { "version": "5.3.5", "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", - "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "integrity": "sha512-piN8XVAO2sNxwVLokL4PswgJvK/uQ6+awwXUVRTGF+rRfgCZpn4hOqxiRuTEbU/k3qgKl0DACYQ/0Sge54UMQg==", "dev": true, "requires": { "extend": "^3.0.0", @@ -26822,7 +26215,7 @@ "braces": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==", "dev": true, "requires": { "expand-range": "^1.8.1", @@ -26872,7 +26265,7 @@ "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", "dev": true, "requires": { "is-glob": "^3.1.0", @@ -26897,7 +26290,7 @@ "micromatch": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==", "dev": true, "requires": { "arr-diff": "^2.0.0", @@ -27161,14 +26554,6 @@ "get-value": "^2.0.6", "has-values": "^1.0.0", "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "has-values": { @@ -27181,26 +26566,6 @@ "kind-of": "^4.0.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", @@ -27343,9 +26708,9 @@ } }, "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "html-comment-regex": { @@ -27526,9 +26891,9 @@ }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true }, "ansi-styles": { @@ -27905,14 +27270,6 @@ "dev": true, "requires": { "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "is-posix-bracket": { @@ -28110,7 +27467,7 @@ "isomorphic-fetch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "integrity": "sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==", "dev": true, "requires": { "node-fetch": "^1.0.1", @@ -28178,9 +27535,9 @@ "dev": true }, "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "json-schema-traverse": { @@ -28213,7 +27570,7 @@ "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", "dev": true }, "jsonify": { @@ -28267,14 +27624,14 @@ } }, "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" } }, @@ -28391,9 +27748,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash.assign": { @@ -28528,12 +27885,6 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true } } }, @@ -28625,7 +27976,7 @@ "mdast-util-to-hast": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-2.5.0.tgz", - "integrity": "sha1-8IeETSVcdUDzaQbaMLoQbA7l7i8=", + "integrity": "sha512-TWcl+BAK3ksLcm2No8n95hsdq1DdGByGqIzG07kXMBdS4h3+qN06mVD07HQHCHZMglBG1R6I5iasSL/rpK7qPA==", "dev": true, "requires": { "collapse-white-space": "^1.0.0", @@ -28846,18 +28197,17 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, "minipass": { @@ -28919,14 +28269,6 @@ "dev": true, "requires": { "minimist": "^1.2.6" - }, - "dependencies": { - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - } } }, "mkdirp-classic": { @@ -29050,18 +28392,6 @@ "to-regex": "^3.0.1" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -29076,6 +28406,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -29135,9 +28471,9 @@ } }, "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "node-timeout": { @@ -29289,14 +28625,6 @@ "dev": true, "requires": { "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "object.assign": { @@ -29309,23 +28637,6 @@ "define-properties": "^1.1.3", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" - }, - "dependencies": { - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - } } }, "object.entries": { @@ -29368,14 +28679,6 @@ "dev": true, "requires": { "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "object.values": { @@ -29531,16 +28834,35 @@ } }, "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.7.tgz", + "integrity": "sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==", "dev": true, "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" + "asn1.js": "^4.10.1", + "browserify-aes": "^1.2.0", + "evp_bytestokey": "^1.0.3", + "hash-base": "~3.0", + "pbkdf2": "^3.1.2", + "safe-buffer": "^5.2.1" + }, + "dependencies": { + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } } }, "parse-entities": { @@ -29580,7 +28902,7 @@ "parse-glob": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "integrity": "sha512-FC5TeK0AwXzq3tUBFtH74naWkPQCEWs4K+xMxWZBlKDWu0bVHXGZa+KKqxKidd7xwhdZ19ZNuF2uO1M/r196HA==", "dev": true, "requires": { "glob-base": "^0.3.0", @@ -29628,7 +28950,7 @@ "parse-url": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-3.0.2.tgz", - "integrity": "sha1-YCeHpwY6eV1yuGcxl1BecvYGEL4=", + "integrity": "sha512-+KQY4Eu9mGvZtagWyd4HlJfc2O4t8pIKjNN1ahahnNTUpQ/7YA/taVrJoJVmClhBM8Qq0Dwbn3MSCbl5J9rQgQ==", "dev": true, "requires": { "is-ssh": "^1.3.0", @@ -29822,7 +29144,7 @@ "postcss-calc": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", - "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "integrity": "sha512-iBcptYFq+QUh9gzP7ta2btw50o40s4uLI4UDVgd5yRAZtUDWc5APdl5yQDd2h/TyiZNbJrv0HiYhT102CMgN7Q==", "dev": true, "requires": { "postcss": "^5.0.2", @@ -29833,7 +29155,7 @@ "postcss-colormin": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", - "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "integrity": "sha512-XXitQe+jNNPf+vxvQXIQ1+pvdQKWKgkx8zlJNltcMEmLma1ypDRDQwlLt+6cP26fBreihNhZxohh1rcgCH2W5w==", "dev": true, "requires": { "colormin": "^1.0.5", @@ -29844,7 +29166,7 @@ "postcss-convert-values": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", - "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "integrity": "sha512-SE7mf25D3ORUEXpu3WUqQqy0nCbMuM5BEny+ULE/FXdS/0UMA58OdzwvzuHJRpIFlk1uojt16JhaEogtP6W2oA==", "dev": true, "requires": { "postcss": "^5.0.11", @@ -29854,7 +29176,7 @@ "postcss-discard-comments": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", - "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "integrity": "sha512-yGbyBDo5FxsImE90LD8C87vgnNlweQkODMkUZlDVM/CBgLr9C5RasLGJxxh9GjVOBeG8NcCMatoqI1pXg8JNXg==", "dev": true, "requires": { "postcss": "^5.0.14" @@ -29863,7 +29185,7 @@ "postcss-discard-duplicates": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", - "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "integrity": "sha512-+lk5W1uqO8qIUTET+UETgj9GWykLC3LOldr7EehmymV0Wu36kyoHimC4cILrAAYpHQ+fr4ypKcWcVNaGzm0reA==", "dev": true, "requires": { "postcss": "^5.0.4" @@ -29872,7 +29194,7 @@ "postcss-discard-empty": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", - "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "integrity": "sha512-IBFoyrwk52dhF+5z/ZAbzq5Jy7Wq0aLUsOn69JNS+7YeuyHaNzJwBIYE0QlUH/p5d3L+OON72Fsexyb7OK/3og==", "dev": true, "requires": { "postcss": "^5.0.14" @@ -29881,7 +29203,7 @@ "postcss-discard-overridden": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", - "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "integrity": "sha512-IyKoDL8QNObOiUc6eBw8kMxBHCfxUaERYTUe2QF8k7j/xiirayDzzkmlR6lMQjrAM1p1DDRTvWrS7Aa8lp6/uA==", "dev": true, "requires": { "postcss": "^5.0.16" @@ -29890,7 +29212,7 @@ "postcss-discard-unused": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", - "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "integrity": "sha512-nCbFNfqYAbKCw9J6PSJubpN9asnrwVLkRDFc4KCwyUEdOtM5XDE/eTW3OpqHrYY1L4fZxgan7LLRAAYYBzwzrg==", "dev": true, "requires": { "postcss": "^5.0.14", @@ -29909,7 +29231,7 @@ "postcss-merge-idents": { "version": "2.1.7", "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", - "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "integrity": "sha512-9DHmfCZ7/hNHhIKnNkz4CU0ejtGen5BbTRJc13Z2uHfCedeCUsK2WEQoAJRBL+phs68iWK6Qf8Jze71anuysWA==", "dev": true, "requires": { "has": "^1.0.1", @@ -29920,7 +29242,7 @@ "postcss-merge-longhand": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", - "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "integrity": "sha512-ma7YvxjdLQdifnc1HFsW/AW6fVfubGyR+X4bE3FOSdBVMY9bZjKVdklHT+odknKBB7FSCfKIHC3yHK7RUAqRPg==", "dev": true, "requires": { "postcss": "^5.0.4" @@ -29929,7 +29251,7 @@ "postcss-merge-rules": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", - "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "integrity": "sha512-Wgg2FS6W3AYBl+5L9poL6ZUISi5YzL+sDCJfM7zNw/Q1qsyVQXXZ2cbVui6mu2cYJpt1hOKCGj1xA4mq/obz/Q==", "dev": true, "requires": { "browserslist": "^1.5.2", @@ -29960,7 +29282,7 @@ "postcss-minify-font-values": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", - "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "integrity": "sha512-vFSPzrJhNe6/8McOLU13XIsERohBJiIFFuC1PolgajOZdRWqRgKITP/A4Z/n4GQhEmtbxmO9NDw3QLaFfE1dFQ==", "dev": true, "requires": { "object-assign": "^4.0.1", @@ -29971,7 +29293,7 @@ "postcss-minify-gradients": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", - "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "integrity": "sha512-DZhT0OE+RbVqVyGsTIKx84rU/5cury1jmwPa19bViqYPQu499ZU831yMzzsyC8EhiZVd73+h5Z9xb/DdaBpw7Q==", "dev": true, "requires": { "postcss": "^5.0.12", @@ -29981,7 +29303,7 @@ "postcss-minify-params": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", - "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "integrity": "sha512-hhJdMVgP8vasrHbkKAk+ab28vEmPYgyuDzRl31V3BEB3QOR3L5TTIVEWLDNnZZ3+fiTi9d6Ker8GM8S1h8p2Ow==", "dev": true, "requires": { "alphanum-sort": "^1.0.1", @@ -29993,7 +29315,7 @@ "postcss-minify-selectors": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", - "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "integrity": "sha512-e13vxPBSo3ZaPne43KVgM+UETkx3Bs4/Qvm6yXI9HQpQp4nyb7HZ0gKpkF+Wn2x+/dbQ+swNpCdZSbMOT7+TIA==", "dev": true, "requires": { "alphanum-sort": "^1.0.2", @@ -30005,7 +29327,7 @@ "postcss-normalize-charset": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", - "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "integrity": "sha512-RKgjEks83l8w4yEhztOwNZ+nLSrJ+NvPNhpS+mVDzoaiRHZQVoG7NF2TP5qjwnaN9YswUhj6m1E0S0Z+WDCgEQ==", "dev": true, "requires": { "postcss": "^5.0.5" @@ -30014,7 +29336,7 @@ "postcss-normalize-url": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", - "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "integrity": "sha512-WqtWG6GV2nELsQEFES0RzfL2ebVwmGl/M8VmMbshKto/UClBo+mznX8Zi4/hkThdqx7ijwv+O8HWPdpK7nH/Ig==", "dev": true, "requires": { "is-absolute-url": "^2.0.0", @@ -30026,7 +29348,7 @@ "postcss-ordered-values": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", - "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "integrity": "sha512-5RB1IUZhkxDCfa5fx/ogp/A82mtq+r7USqS+7zt0e428HJ7+BHCxyeY39ClmkkUtxdOd3mk8gD6d9bjH2BECMg==", "dev": true, "requires": { "postcss": "^5.0.4", @@ -30036,7 +29358,7 @@ "postcss-reduce-idents": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", - "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", + "integrity": "sha512-0+Ow9e8JLtffjumJJFPqvN4qAvokVbdQPnijUDSOX8tfTwrILLP4ETvrZcXZxAtpFLh/U0c+q8oRMJLr1Kiu4w==", "dev": true, "requires": { "postcss": "^5.0.4", @@ -30046,7 +29368,7 @@ "postcss-reduce-initial": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", - "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "integrity": "sha512-jJFrV1vWOPCQsIVitawGesRgMgunbclERQ/IRGW7r93uHrVzNQQmHQ7znsOIjJPZ4yWMzs5A8NFhp3AkPHPbDA==", "dev": true, "requires": { "postcss": "^5.0.4" @@ -30055,7 +29377,7 @@ "postcss-reduce-transforms": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", - "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "integrity": "sha512-lGgRqnSuAR5i5uUg1TA33r9UngfTadWxOyL2qx1KuPoCQzfmtaHjp9PuwX7yVyRxG3BWBzeFUaS5uV9eVgnEgQ==", "dev": true, "requires": { "has": "^1.0.1", @@ -30077,7 +29399,7 @@ "postcss-svgo": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", - "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "integrity": "sha512-y5AdQdgBoF4rbpdbeWAJuxE953g/ylRfVNp6mvAi61VCN/Y25Tu9p5mh3CyI42WbTRIiwR9a1GdFtmDnNPeskQ==", "dev": true, "requires": { "is-svg": "^2.0.0", @@ -30089,7 +29411,7 @@ "postcss-unique-selectors": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", - "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "integrity": "sha512-WZX8r1M0+IyljoJOJleg3kYm10hxNYF9scqAT7v/xeSX1IdehutOM85SNO0gP9K+bgs86XERr7Ud5u3ch4+D8g==", "dev": true, "requires": { "alphanum-sort": "^1.0.1", @@ -30106,7 +29428,7 @@ "postcss-zindex": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", - "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "integrity": "sha512-uhRZ2hRgj0lorxm9cr62B01YzpUe63h0RXMXQ4gWW3oa2rpJh+FJAiEAytaFCPU/VgaBS+uW2SJ1XKyDNz1h4w==", "dev": true, "requires": { "has": "^1.0.1", @@ -30252,9 +29574,9 @@ "dev": true }, "qs": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", - "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", "dev": true, "requires": { "side-channel": "^1.0.4" @@ -30417,18 +29739,26 @@ } }, "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", + "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", - "string_decoder": "~1.0.3", + "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" + }, + "dependencies": { + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + } } }, "readdirp": { @@ -30544,23 +29874,6 @@ "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" - }, - "dependencies": { - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - } } }, "regexpp": { @@ -30617,7 +29930,7 @@ "remark-html": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-6.0.1.tgz", - "integrity": "sha1-UJTSxx95Qf2yroZbrHZid1fOCcE=", + "integrity": "sha512-2V/0PVyZmHNrOJbkdooG/ULL3q4xRJfu/HfVwFGhr5SsA4uqwGuKbEcuhXtCH0K2NzQIhrf+8lhV69Ww2dKSIQ==", "dev": true, "requires": { "hast-util-sanitize": "^1.0.0", @@ -30762,16 +30075,10 @@ "uuid": "^3.3.2" }, "dependencies": { - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, "safe-buffer": { @@ -30989,16 +30296,10 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "devOptional": true }, - "sax": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.4.2.tgz", - "integrity": "sha1-OfO2AXM9a+yXEFskKipA/Wl4rDw=", - "dev": true - }, "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "set-blocking": { @@ -31086,15 +30387,15 @@ "dev": true }, "shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", "dev": true }, "shelljs": { "version": "0.7.8", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "integrity": "sha512-/YF5Uk8hcwi7ima04ppkbA4RaRMdPMBfwAvAf8sufYOxsJRtbdoBsT8vGvlb+799BrlGdYrd+oczIA2eN2JdWA==", "dev": true, "requires": { "glob": "^7.0.0", @@ -31248,12 +30549,6 @@ "kind-of": "^6.0.2" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -31687,9 +30982,9 @@ "dev": true }, "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -32208,7 +31503,7 @@ "svgo": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", - "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "integrity": "sha512-jT/g9FFMoe9lu2IT6HtAxTA7RR2XOrmcrmCtGnyB/+GQnV6ZjNn+KOHZbZ35yL81+1F/aB6OeEsJztzBQ2EEwA==", "dev": true, "requires": { "coa": "~1.0.1", @@ -32229,7 +31524,7 @@ "js-yaml": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", - "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "integrity": "sha512-eIlkGty7HGmntbV6P/ZlAsoncFLGsNoM27lkTzS+oneY/EiNhj+geqD9ezg/ip+SW6Var0BJU2JtV0vEUZpWVQ==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -32268,9 +31563,9 @@ }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true }, "ansi-styles": { @@ -32454,21 +31749,6 @@ "has-tostringtag": "^1.0.0" } }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, "object-inspect": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", @@ -32489,18 +31769,23 @@ } }, "tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "dependencies": { + "minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -32533,38 +31818,6 @@ "requires": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" - }, - "dependencies": { - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } } }, "through2-filter": { @@ -32728,7 +31981,7 @@ "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", + "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==", "dev": true }, "trim-lines": { @@ -33165,14 +32418,6 @@ "dev": true, "requires": { "minimist": "^1.1.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } } }, "turf-point-grid": { @@ -33332,6 +32577,12 @@ "integrity": "sha1-MdPzIjnk9zHsqd+RVeKyl/AIq2Q=", "dev": true }, + "type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -33354,9 +32605,9 @@ "dev": true }, "ua-parser-js": { - "version": "0.7.28", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz", - "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==", + "version": "0.7.35", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz", + "integrity": "sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==", "dev": true }, "uglify-js": { @@ -33566,7 +32817,7 @@ "unist-util-select": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-1.5.0.tgz", - "integrity": "sha1-qTwr6MD2U4J4A7gTMa3sKqJM2TM=", + "integrity": "sha512-/Ukg/X76ljCVYbisAGJm0HOgy3MfYmjAdVOYUfBleuTtOmRZVzbW7+ZAQqJQi6ObITtcpRv7uNwoUG1RF7vJ9Q==", "dev": true, "requires": { "css-selector-parser": "^1.1.0", @@ -33635,19 +32886,13 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true } } }, "update-browserslist-db": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz", - "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "dev": true, "requires": { "escalade": "^3.1.1", @@ -34091,15 +33336,6 @@ "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=", "dev": true }, - "xml2js": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.2.6.tgz", - "integrity": "sha1-0gnE5N2h/JxFIUHvQcB39a399sQ=", - "dev": true, - "requires": { - "sax": "0.4.2" - } - }, "xmlbuilder": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", @@ -34116,9 +33352,9 @@ "dev": true }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", "dev": true }, "yallist": { diff --git a/package.json b/package.json index 6e464a71a..02eee8430 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": false, "description": "The Open Source Routing Machine is a high performance routing engine written in C++ designed to run on OpenStreetMap data.", "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.10" + "@mapbox/node-pre-gyp": "^1.0.11" }, "browserify": { "transform": [ @@ -14,7 +14,7 @@ }, "scripts": { "lint": "node ./node_modules/eslint/bin/eslint.js -c ./.eslintrc features/step_definitions/ features/support/", - "test": "npm run lint && node ./node_modules/cucumber/bin/cucumber.js features/ -p verify && node ./node_modules/cucumber/bin/cucumber.js features/ -p verify -m mmap && node ./node_modules/cucumber/bin/cucumber.js features/ -p mld && node ./node_modules/cucumber/bin/cucumber.js features/ -p mld -m mmap", + "test": "npm run lint && ./scripts/cucumber_test_matrix.sh", "clean": "rm -rf test/cache", "docs": "./scripts/build_api_docs.sh", "install": "node-pre-gyp install --fallback-to-build=false || ./scripts/node_install.sh", @@ -31,7 +31,7 @@ }, "homepage": "https://github.com/Project-OSRM/osrm-backend", "engines": { - "node": ">=4.0.0" + "node": ">=18.0.0" }, "devDependencies": { "@babel/cli": "^7.18.10", @@ -40,7 +40,6 @@ "@babel/preset-react": "^7.18.6", "acorn": "^8.8.0", "ansi-escape-sequences": "^5.1.2", - "aws-sdk": "~2.0.31", "babel-plugin-transform-class-properties": "^6.24.1", "babelify": "^10.0.0", "browserify": "^17.0.0", diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 374cb4fa2..19202768e 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -216,7 +216,8 @@ function setup() avoid = Set { 'impassable', - 'construction' + 'construction', + 'proposed' } } end diff --git a/profiles/car.lua b/profiles/car.lua index 95052d0ec..076a93ee1 100644 --- a/profiles/car.lua +++ b/profiles/car.lua @@ -274,6 +274,7 @@ function setup() ["be-bru:rural"] = 70, ["be-bru:urban"] = 30, ["be-vlg:rural"] = 70, + ["bg:motorway"] = 140, ["by:urban"] = 60, ["by:motorway"] = 110, ["ca-on:rural"] = 80, @@ -295,6 +296,9 @@ function setup() ["nl:trunk"] = 100, ['no:rural'] = 80, ['no:motorway'] = 110, + ['ph:urban'] = 40, + ['ph:rural'] = 80, + ['ph:motorway'] = 100, ['pl:rural'] = 100, ['pl:trunk'] = 120, ['pl:motorway'] = 140, diff --git a/profiles/debug_way.lua b/profiles/debug_way.lua index 7c577e9a0..0b7e2e9af 100644 --- a/profiles/debug_way.lua +++ b/profiles/debug_way.lua @@ -21,7 +21,7 @@ local https = require('ssl.https') Debug.load_profile(arg[1]) -- load way from the OSM API -local url = 'https://www.openstreetmap.org/api/0.6/way/'..arg[2] +local url = 'https://api.openstreetmap.org/api/0.6/way/'..arg[2] local body, statusCode, headers, statusText = https.request(url) -- parse way tags diff --git a/profiles/foot.lua b/profiles/foot.lua index 978648954..1b16e092c 100644 --- a/profiles/foot.lua +++ b/profiles/foot.lua @@ -69,7 +69,8 @@ function setup() }, avoid = Set { - 'impassable' + 'impassable', + 'proposed' }, speeds = Sequence { diff --git a/scripts/ci/windows-build.bat b/scripts/ci/windows-build.bat index 714f19387..71c9bfc71 100644 --- a/scripts/ci/windows-build.bat +++ b/scripts/ci/windows-build.bat @@ -21,7 +21,7 @@ msbuild OSRM.sln ^ /p:BuildInParallel=true ^ /m:%NUMBER_OF_PROCESSORS% ^ /toolsversion:Current ^ -/clp:Verbosity=normal ^ +/clp:Verbosity=quiet ^ /nologo IF %ERRORLEVEL% NEQ 0 GOTO ERROR diff --git a/scripts/cucumber_test_matrix.sh b/scripts/cucumber_test_matrix.sh new file mode 100755 index 000000000..4d5c0457f --- /dev/null +++ b/scripts/cucumber_test_matrix.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -o errexit +set -o pipefail +set -o nounset + +loadmethods=(datastore mmap directly) +profiles=(ch mld) + +for profile in "${profiles[@]}" +do + for loadmethod in "${loadmethods[@]}" + do + set -x + node ./node_modules/cucumber/bin/cucumber.js features/ -p $profile -m $loadmethod + { set +x; } 2>/dev/null + done +done diff --git a/scripts/format.sh b/scripts/format.sh index 03ffcaba1..93e6a50f9 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -19,18 +19,18 @@ elif [[ ${OS} = "Darwin" ]] ; then fi # Discover clang-format -if type clang-format-10 2> /dev/null ; then - CLANG_FORMAT=clang-format-10 +if type clang-format-15 2> /dev/null ; then + CLANG_FORMAT=clang-format-15 elif type clang-format 2> /dev/null ; then # Clang format found, but need to check version CLANG_FORMAT=clang-format V=$(clang-format --version) - if [[ $V != *10.0* ]] ; then - echo "clang-format is not 10.0 (returned ${V})" + if [[ $V != *15.0* ]] ; then + echo "clang-format is not 15.0 (returned ${V})" #exit 1 fi else - echo "No appropriate clang-format found (expected clang-format-10, or clang-format)" + echo "No appropriate clang-format found (expected clang-format-15, or clang-format)" exit 1 fi diff --git a/src/benchmarks/static_rtree.cpp b/src/benchmarks/static_rtree.cpp index fae84bb0f..d2dd08fe5 100644 --- a/src/benchmarks/static_rtree.cpp +++ b/src/benchmarks/static_rtree.cpp @@ -65,12 +65,12 @@ void benchmark(BenchStaticRTree &rtree, unsigned num_queries) util::FixedLatitude{lat_udist(mt_rand)}); } - benchmarkQuery(queries, "raw RTree queries (1 result)", [&rtree](const util::Coordinate &q) { - return rtree.Nearest(q, 1); - }); - benchmarkQuery(queries, "raw RTree queries (10 results)", [&rtree](const util::Coordinate &q) { - return rtree.Nearest(q, 10); - }); + benchmarkQuery(queries, + "raw RTree queries (1 result)", + [&rtree](const util::Coordinate &q) { return rtree.Nearest(q, 1); }); + benchmarkQuery(queries, + "raw RTree queries (10 results)", + [&rtree](const util::Coordinate &q) { return rtree.Nearest(q, 10); }); } } // namespace osrm::benchmarks diff --git a/src/contractor/graph_contractor.cpp b/src/contractor/graph_contractor.cpp index 0e02101fe..9bee894b2 100644 --- a/src/contractor/graph_contractor.cpp +++ b/src/contractor/graph_contractor.cpp @@ -619,7 +619,8 @@ std::vector contractGraph(ContractorGraph &graph, util::UnbufferedLog log; log << "initializing node priorities..."; tbb::parallel_for(tbb::blocked_range(0, remaining_nodes.size(), PQGrainSize), - [&](const auto &range) { + [&](const auto &range) + { ContractorThreadData *data = thread_data_list.GetThreadData(); for (auto x = range.begin(), end = range.end(); x != end; ++x) { @@ -656,7 +657,8 @@ std::vector contractGraph(ContractorGraph &graph, tbb::parallel_for( tbb::blocked_range(0, remaining_nodes.size(), IndependentGrainSize), - [&](const auto &range) { + [&](const auto &range) + { ContractorThreadData *data = thread_data_list.GetThreadData(); // determine independent node set for (auto i = range.begin(), end = range.end(); i != end; ++i) @@ -669,9 +671,9 @@ std::vector contractGraph(ContractorGraph &graph, // sort all remaining nodes to the beginning of the sequence const auto begin_independent_nodes = std::stable_partition( - remaining_nodes.begin(), remaining_nodes.end(), [](RemainingNodeData node_data) { - return !node_data.is_independent; - }); + remaining_nodes.begin(), + remaining_nodes.end(), + [](RemainingNodeData node_data) { return !node_data.is_independent; }); auto begin_independent_nodes_idx = std::distance(remaining_nodes.begin(), begin_independent_nodes); auto end_independent_nodes_idx = remaining_nodes.size(); @@ -680,7 +682,8 @@ std::vector contractGraph(ContractorGraph &graph, tbb::parallel_for( tbb::blocked_range( begin_independent_nodes_idx, end_independent_nodes_idx, ContractGrainSize), - [&](const auto &range) { + [&](const auto &range) + { ContractorThreadData *data = thread_data_list.GetThreadData(); for (auto position = range.begin(), end = range.end(); position != end; ++position) { @@ -699,7 +702,8 @@ std::vector contractGraph(ContractorGraph &graph, tbb::parallel_for( tbb::blocked_range( begin_independent_nodes_idx, end_independent_nodes_idx, DeleteGrainSize), - [&](const auto &range) { + [&](const auto &range) + { ContractorThreadData *data = thread_data_list.GetThreadData(); for (auto position = range.begin(), end = range.end(); position != end; ++position) { @@ -709,10 +713,13 @@ std::vector contractGraph(ContractorGraph &graph, }); // make sure we really sort each block - tbb::parallel_for(thread_data_list.data.range(), [&](const auto &range) { - for (auto &data : range) - tbb::parallel_sort(data->inserted_edges.begin(), data->inserted_edges.end()); - }); + tbb::parallel_for(thread_data_list.data.range(), + [&](const auto &range) + { + for (auto &data : range) + tbb::parallel_sort(data->inserted_edges.begin(), + data->inserted_edges.end()); + }); // insert new edges for (auto &data : thread_data_list.data) @@ -743,7 +750,8 @@ std::vector contractGraph(ContractorGraph &graph, tbb::parallel_for( tbb::blocked_range( begin_independent_nodes_idx, end_independent_nodes_idx, NeighboursGrainSize), - [&](const auto &range) { + [&](const auto &range) + { ContractorThreadData *data = thread_data_list.GetThreadData(); for (auto position = range.begin(), end = range.end(); position != end; ++position) { diff --git a/src/customize/customizer.cpp b/src/customize/customizer.cpp index e9a3b08e5..6a0ec102a 100644 --- a/src/customize/customizer.cpp +++ b/src/customize/customizer.cpp @@ -47,17 +47,18 @@ void printUnreachableStatistics(const Partition &partition, for (auto node : cell.GetSourceNodes()) { const auto &weights = cell.GetOutWeight(node); - invalid_sources += std::all_of(weights.begin(), weights.end(), [](auto weight) { - return weight == INVALID_EDGE_WEIGHT; - }); + invalid_sources += + std::all_of(weights.begin(), + weights.end(), + [](auto weight) { return weight == INVALID_EDGE_WEIGHT; }); } for (auto node : cell.GetDestinationNodes()) { const auto &weights = cell.GetInWeight(node); invalid_destinations += - std::all_of(weights.begin(), weights.end(), [](auto weight) { - return weight == INVALID_EDGE_WEIGHT; - }); + std::all_of(weights.begin(), + weights.end(), + [](auto weight) { return weight == INVALID_EDGE_WEIGHT; }); } } diff --git a/src/engine/api/json_factory.cpp b/src/engine/api/json_factory.cpp index 960bd13e3..988ca08e8 100644 --- a/src/engine/api/json_factory.cpp +++ b/src/engine/api/json_factory.cpp @@ -129,7 +129,8 @@ util::json::Object makeIntersection(const guidance::IntermediateIntersection &in std::transform(intersection.entry.begin(), intersection.entry.end(), std::back_inserter(entry.values), - [](const bool has_entry) -> util::json::Value { + [](const bool has_entry) -> util::json::Value + { if (has_entry) return util::json::True(); else @@ -151,11 +152,11 @@ util::json::Object makeIntersection(const guidance::IntermediateIntersection &in { util::json::Array classes; classes.values.reserve(intersection.classes.size()); - std::transform( - intersection.classes.begin(), - intersection.classes.end(), - std::back_inserter(classes.values), - [](const std::string &class_name) { return util::json::String{class_name}; }); + std::transform(intersection.classes.begin(), + intersection.classes.end(), + std::back_inserter(classes.values), + [](const std::string &class_name) + { return util::json::String{class_name}; }); result.values["classes"] = std::move(classes); } diff --git a/src/engine/douglas_peucker.cpp b/src/engine/douglas_peucker.cpp index 75a6f121b..2daefe295 100644 --- a/src/engine/douglas_peucker.cpp +++ b/src/engine/douglas_peucker.cpp @@ -43,9 +43,11 @@ std::vector douglasPeucker(std::vector::cons } std::vector projected_coordinates(size); - std::transform(begin, end, projected_coordinates.begin(), [](const util::Coordinate coord) { - return util::web_mercator::fromWGS84(coord); - }); + std::transform(begin, + end, + projected_coordinates.begin(), + [](const util::Coordinate coord) + { return util::web_mercator::fromWGS84(coord); }); std::vector is_necessary(size, false); BOOST_ASSERT(is_necessary.size() >= 2); diff --git a/src/engine/engine_config.cpp b/src/engine/engine_config.cpp index 23a5c5b5b..bfe92841c 100644 --- a/src/engine/engine_config.cpp +++ b/src/engine/engine_config.cpp @@ -9,17 +9,18 @@ bool EngineConfig::IsValid() const // leads to an empty path const bool all_path_are_empty = storage_config.GetPath("").empty(); - const auto unlimited_or_more_than = [](const auto v, const auto limit) { - return v == -1 || v > limit; - }; + const auto unlimited_or_more_than = [](const auto v, const auto limit) + { return v == -1 || v > limit; }; - const bool limits_valid = unlimited_or_more_than(max_locations_distance_table, 2) && - unlimited_or_more_than(max_locations_map_matching, 2) && - unlimited_or_more_than(max_radius_map_matching, 0) && - unlimited_or_more_than(max_locations_trip, 2) && - unlimited_or_more_than(max_locations_viaroute, 2) && - unlimited_or_more_than(max_results_nearest, 0) && - max_alternatives >= 0; + const bool limits_valid = + unlimited_or_more_than(max_locations_distance_table, 2) && + unlimited_or_more_than(max_locations_map_matching, 2) && + unlimited_or_more_than(max_radius_map_matching, 0) && + unlimited_or_more_than(max_locations_trip, 2) && + unlimited_or_more_than(max_locations_viaroute, 2) && + unlimited_or_more_than(max_results_nearest, 0) && + (!default_radius.has_value() || unlimited_or_more_than(*default_radius, 0)) && + max_alternatives >= 0; return ((use_shared_memory && all_path_are_empty) || (use_mmap && storage_config.IsValid()) || storage_config.IsValid()) && diff --git a/src/engine/guidance/assemble_overview.cpp b/src/engine/guidance/assemble_overview.cpp index 0f02c15cf..9ee768865 100644 --- a/src/engine/guidance/assemble_overview.cpp +++ b/src/engine/guidance/assemble_overview.cpp @@ -40,22 +40,21 @@ unsigned calculateOverviewZoomLevel(const std::vector &leg_geometri std::vector assembleOverview(const std::vector &leg_geometries, const bool use_simplification) { - auto overview_size = - std::accumulate(leg_geometries.begin(), - leg_geometries.end(), - 0, - [](const std::size_t sum, const LegGeometry &leg_geometry) { - return sum + leg_geometry.locations.size(); - }) - - leg_geometries.size() + 1; + auto overview_size = std::accumulate(leg_geometries.begin(), + leg_geometries.end(), + 0, + [](const std::size_t sum, const LegGeometry &leg_geometry) + { return sum + leg_geometry.locations.size(); }) - + leg_geometries.size() + 1; std::vector overview_geometry; overview_geometry.reserve(overview_size); using GeometryIter = decltype(overview_geometry)::const_iterator; auto leg_reverse_index = leg_geometries.size(); - const auto insert_without_overlap = [&leg_reverse_index, &overview_geometry](GeometryIter begin, - GeometryIter end) { + const auto insert_without_overlap = + [&leg_reverse_index, &overview_geometry](GeometryIter begin, GeometryIter end) + { // not the last leg if (leg_reverse_index > 1) { diff --git a/src/engine/guidance/assemble_route.cpp b/src/engine/guidance/assemble_route.cpp index a5f7abef1..ec4a4197d 100644 --- a/src/engine/guidance/assemble_route.cpp +++ b/src/engine/guidance/assemble_route.cpp @@ -7,18 +7,21 @@ namespace osrm::engine::guidance Route assembleRoute(const std::vector &route_legs) { - auto distance = std::accumulate( - route_legs.begin(), route_legs.end(), 0., [](const double sum, const RouteLeg &leg) { - return sum + leg.distance; - }); - auto duration = std::accumulate( - route_legs.begin(), route_legs.end(), 0., [](const double sum, const RouteLeg &leg) { - return sum + leg.duration; - }); - auto weight = std::accumulate( - route_legs.begin(), route_legs.end(), 0., [](const double sum, const RouteLeg &leg) { - return sum + leg.weight; - }); + auto distance = + std::accumulate(route_legs.begin(), + route_legs.end(), + 0., + [](const double sum, const RouteLeg &leg) { return sum + leg.distance; }); + auto duration = + std::accumulate(route_legs.begin(), + route_legs.end(), + 0., + [](const double sum, const RouteLeg &leg) { return sum + leg.duration; }); + auto weight = + std::accumulate(route_legs.begin(), + route_legs.end(), + 0., + [](const double sum, const RouteLeg &leg) { return sum + leg.weight; }); return Route{distance, duration, weight}; } diff --git a/src/engine/guidance/collapse_scenario_detection.cpp b/src/engine/guidance/collapse_scenario_detection.cpp index 6b8517466..e9c00c940 100644 --- a/src/engine/guidance/collapse_scenario_detection.cpp +++ b/src/engine/guidance/collapse_scenario_detection.cpp @@ -102,7 +102,8 @@ bool isStaggeredIntersection(const RouteStepIterator step_prior_to_intersection, // If adjusted, make sure to check validity of the is_right/is_left classification below const constexpr auto MAX_STAGGERED_DISTANCE = 3; // debatable, but keep short to be on safe side - const auto angle = [](const RouteStep &step) { + const auto angle = [](const RouteStep &step) + { const auto &intersection = step.intersections.front(); const auto entry_bearing = util::bearing::reverse(intersection.bearings[intersection.in]); const auto exit_bearing = intersection.bearings[intersection.out]; diff --git a/src/engine/guidance/collapse_turns.cpp b/src/engine/guidance/collapse_turns.cpp index e15047fb2..7f40c7c51 100644 --- a/src/engine/guidance/collapse_turns.cpp +++ b/src/engine/guidance/collapse_turns.cpp @@ -59,7 +59,8 @@ double findTotalTurnAngle(const RouteStep &entry_step, const RouteStep &exit_ste // c // | // d - const auto use_total_angle = [&]() { + const auto use_total_angle = [&]() + { // only consider actual turns in combination: if (angularDeviation(total_angle, 180) < 0.5 * NARROW_TURN_ANGLE) return false; @@ -99,7 +100,8 @@ inline void handleSliproad(RouteStepIterator sliproad_step) { // find the next step after the sliproad step itself (this is not necessarily the next step, // since we might have to skip over traffic lights/node penalties) - auto next_step = [&sliproad_step]() { + auto next_step = [&sliproad_step]() + { auto next_step = findNextTurn(sliproad_step); while (isTrafficLightStep(*next_step)) { @@ -196,7 +198,8 @@ void AdjustToCombinedTurnStrategy::operator()(RouteStep &step_at_turn_location, : getTurnDirection(angle); // a turn that is a new name or straight (turn/continue) - const auto is_non_turn = [](const RouteStep &step) { + const auto is_non_turn = [](const RouteStep &step) + { return hasTurnType(step, TurnType::NewName) || (hasTurnType(step, TurnType::Turn) && hasModifier(step, DirectionModifier::Straight)) || @@ -307,7 +310,8 @@ void SegregatedTurnStrategy::operator()(RouteStep &step_at_turn_location, // Used to control updating of the modifier based on turn direction bool update_modifier_for_turn_direction = true; - const auto calculate_turn_angle = [](const RouteStep &entry_step, const RouteStep &exit_step) { + const auto calculate_turn_angle = [](const RouteStep &entry_step, const RouteStep &exit_step) + { return util::bearing::angleBetween(entry_step.maneuver.bearing_before, exit_step.maneuver.bearing_after); }; @@ -316,7 +320,8 @@ void SegregatedTurnStrategy::operator()(RouteStep &step_at_turn_location, const auto turn_angle = calculate_turn_angle(step_at_turn_location, transfer_from_step); const auto turn_direction = getTurnDirection(turn_angle); - const auto is_straight_step = [](const RouteStep &step) { + const auto is_straight_step = [](const RouteStep &step) + { return ((hasTurnType(step, TurnType::NewName) || hasTurnType(step, TurnType::Continue) || hasTurnType(step, TurnType::Suppressed) || hasTurnType(step, TurnType::Turn)) && (hasModifier(step, DirectionModifier::Straight) || @@ -324,7 +329,8 @@ void SegregatedTurnStrategy::operator()(RouteStep &step_at_turn_location, hasModifier(step, DirectionModifier::SlightRight))); }; - const auto is_turn_step = [](const RouteStep &step) { + const auto is_turn_step = [](const RouteStep &step) + { return (hasTurnType(step, TurnType::Turn) || hasTurnType(step, TurnType::Continue) || hasTurnType(step, TurnType::NewName) || hasTurnType(step, TurnType::Suppressed)); }; diff --git a/src/engine/guidance/lane_processing.cpp b/src/engine/guidance/lane_processing.cpp index 105b3d53a..fb2aadfb1 100644 --- a/src/engine/guidance/lane_processing.cpp +++ b/src/engine/guidance/lane_processing.cpp @@ -17,7 +17,8 @@ std::vector anticipateLaneChange(std::vector steps, const double min_distance_needed_for_lane_change) { // Lane anticipation works on contiguous ranges of short steps that have lane information - const auto is_short_has_lanes = [&](const RouteStep &step) { + const auto is_short_has_lanes = [&](const RouteStep &step) + { const auto has_lanes = step.intersections.front().lanes.lanes_in_turn > 0; if (!has_lanes) @@ -45,7 +46,8 @@ std::vector anticipateLaneChange(std::vector steps, std::vector quick_lanes_ranges; - const auto range_back_inserter = [&](StepIterRange range) { + const auto range_back_inserter = [&](StepIterRange range) + { if (std::distance(range.first, range.second) > 1) quick_lanes_ranges.push_back(std::move(range)); }; @@ -58,7 +60,8 @@ std::vector anticipateLaneChange(std::vector steps, // Walk backwards over all turns, constraining possible turn lanes. // Later turn lanes constrain earlier ones: we have to anticipate lane changes. - const auto constrain_lanes = [&](const StepIterRange &turns) { + const auto constrain_lanes = [&](const StepIterRange &turns) + { const std::reverse_iterator rev_first{turns.second}; const std::reverse_iterator rev_last{turns.first}; @@ -74,127 +77,135 @@ std::vector anticipateLaneChange(std::vector steps, // segment for a lane switch, but the total distance shouldn't be unlimited. double distance_to_constrained = 0.0; - util::for_each_pair(rev_first, rev_last, [&](RouteStep ¤t, RouteStep &previous) { - const auto current_inst = current.maneuver.instruction; - const auto current_lanes = current.intersections.front().lanes; - - // Constrain the previous turn's lanes - auto &previous_lanes = previous.intersections.front().lanes; - const auto previous_inst = previous.maneuver.instruction; - - // Lane mapping (N:M) from previous lanes (N) to current lanes (M), with: - // N > M, N > 1 fan-in situation, constrain N lanes to min(N,M) shared lanes - // otherwise nothing to constrain - const bool lanes_to_constrain = previous_lanes.lanes_in_turn > 1; - const bool lanes_fan_in = previous_lanes.lanes_in_turn > current_lanes.lanes_in_turn; - - // only prevent use lanes due to making all turns. don't make turns during curvy - // segments - if (previous_inst.type == TurnType::Suppressed) - distance_to_constrained += previous.distance; - else - distance_to_constrained = 0.; - - const auto lane_delta = previous_lanes.lanes_in_turn - current_lanes.lanes_in_turn; - const auto can_make_all_turns = - distance_to_constrained > lane_delta * min_distance_needed_for_lane_change; - - if (!lanes_to_constrain || !lanes_fan_in || can_make_all_turns) - return; - - // We do not have a mapping from lanes to lanes. All we have is the lanes in the turn - // and all the lanes at that situation. To perfectly handle lane anticipation in cases - // where lanes in the turn fan in but for example the overall lanes at that location - // fan out, we would have to know the asymmetric mapping of lanes. This is currently - // not possible at the moment. In the following we implement a heuristic instead. - const LaneID current_num_lanes_right_of_turn = current.NumLanesToTheRight(); - const LaneID current_num_lanes_left_of_turn = current.NumLanesToTheLeft(); - - // 0/ Tag keep straight with the next turn's direction if available - const auto previous_is_straight = - !isLeftTurn(previous_inst) && !isRightTurn(previous_inst); - - if (previous_is_straight) + util::for_each_pair( + rev_first, + rev_last, + [&](RouteStep ¤t, RouteStep &previous) { - if (isLeftTurn(current_inst) || is_straight_left.count(¤t) > 0) - is_straight_left.insert(&previous); - else if (isRightTurn(current_inst) || is_straight_right.count(¤t) > 0) - is_straight_right.insert(&previous); - } + const auto current_inst = current.maneuver.instruction; + const auto current_lanes = current.intersections.front().lanes; - // 1/ How to anticipate left, right: - const auto anticipate_for_left_turn = [&] { - // Current turn is left turn, already keep left during previous turn. - // This implies constraining the rightmost lanes in previous step. - LaneID new_first_lane_from_the_right = - previous_lanes.first_lane_from_the_right // start from rightmost lane - + previous_lanes.lanes_in_turn // one past leftmost lane - - current_lanes.lanes_in_turn; // back number of new lanes + // Constrain the previous turn's lanes + auto &previous_lanes = previous.intersections.front().lanes; + const auto previous_inst = previous.maneuver.instruction; - // The leftmost target lanes might not be involved in the turn. Figure out - // how many lanes are to the left and not in the turn. - new_first_lane_from_the_right -= - std::min(current_num_lanes_left_of_turn, current_lanes.lanes_in_turn); + // Lane mapping (N:M) from previous lanes (N) to current lanes (M), with: + // N > M, N > 1 fan-in situation, constrain N lanes to min(N,M) shared lanes + // otherwise nothing to constrain + const bool lanes_to_constrain = previous_lanes.lanes_in_turn > 1; + const bool lanes_fan_in = + previous_lanes.lanes_in_turn > current_lanes.lanes_in_turn; - previous_lanes = {current_lanes.lanes_in_turn, new_first_lane_from_the_right}; - }; + // only prevent use lanes due to making all turns. don't make turns during curvy + // segments + if (previous_inst.type == TurnType::Suppressed) + distance_to_constrained += previous.distance; + else + distance_to_constrained = 0.; - const auto anticipate_for_right_turn = [&] { - // Current turn is right turn, already keep right during the previous turn. - // This implies constraining the leftmost lanes in the previous turn step. - LaneID new_first_lane_from_the_right = previous_lanes.first_lane_from_the_right; + const auto lane_delta = previous_lanes.lanes_in_turn - current_lanes.lanes_in_turn; + const auto can_make_all_turns = + distance_to_constrained > lane_delta * min_distance_needed_for_lane_change; - // The rightmost target lanes might not be involved in the turn. Figure out - // how many lanes are to the right and not in the turn. - new_first_lane_from_the_right += - std::min(current_num_lanes_right_of_turn, current_lanes.lanes_in_turn); + if (!lanes_to_constrain || !lanes_fan_in || can_make_all_turns) + return; - previous_lanes = {current_lanes.lanes_in_turn, new_first_lane_from_the_right}; - }; + // We do not have a mapping from lanes to lanes. All we have is the lanes in the + // turn and all the lanes at that situation. To perfectly handle lane anticipation + // in cases where lanes in the turn fan in but for example the overall lanes at that + // location fan out, we would have to know the asymmetric mapping of lanes. This is + // currently not possible at the moment. In the following we implement a heuristic + // instead. + const LaneID current_num_lanes_right_of_turn = current.NumLanesToTheRight(); + const LaneID current_num_lanes_left_of_turn = current.NumLanesToTheLeft(); - // 2/ When to anticipate a left, right turn - if (isLeftTurn(current_inst)) - anticipate_for_left_turn(); - else if (isRightTurn(current_inst)) - anticipate_for_right_turn(); - else // keepStraight - { - // Heuristic: we do not have a from-lanes -> to-lanes mapping. What we use - // here instead in addition is the number of all lanes (not only the lanes - // in a turn): - // - // -v-v v-v- straight follows - // | | | | - // <- v v -> keep straight here - // | | - // <-| |-> - // - // A route from the top left to the bottom right here goes over a keep - // straight. If we handle all keep straights as right turns (in right-sided - // driving), we wrongly guide the user to the rightmost lanes in the first turn. - // Not only is this wrong but the opposite of what we expect. - // - // The following implements a heuristic to determine a keep straight's - // direction in relation to the next step. In the above example we would get: - // - // coming from right, going to left (in direction of way) -> handle as left turn + // 0/ Tag keep straight with the next turn's direction if available + const auto previous_is_straight = + !isLeftTurn(previous_inst) && !isRightTurn(previous_inst); - if (is_straight_left.count(¤t) > 0) + if (previous_is_straight) + { + if (isLeftTurn(current_inst) || is_straight_left.count(¤t) > 0) + is_straight_left.insert(&previous); + else if (isRightTurn(current_inst) || is_straight_right.count(¤t) > 0) + is_straight_right.insert(&previous); + } + + // 1/ How to anticipate left, right: + const auto anticipate_for_left_turn = [&] + { + // Current turn is left turn, already keep left during previous turn. + // This implies constraining the rightmost lanes in previous step. + LaneID new_first_lane_from_the_right = + previous_lanes.first_lane_from_the_right // start from rightmost lane + + previous_lanes.lanes_in_turn // one past leftmost lane + - current_lanes.lanes_in_turn; // back number of new lanes + + // The leftmost target lanes might not be involved in the turn. Figure out + // how many lanes are to the left and not in the turn. + new_first_lane_from_the_right -= + std::min(current_num_lanes_left_of_turn, current_lanes.lanes_in_turn); + + previous_lanes = {current_lanes.lanes_in_turn, new_first_lane_from_the_right}; + }; + + const auto anticipate_for_right_turn = [&] + { + // Current turn is right turn, already keep right during the previous turn. + // This implies constraining the leftmost lanes in the previous turn step. + LaneID new_first_lane_from_the_right = previous_lanes.first_lane_from_the_right; + + // The rightmost target lanes might not be involved in the turn. Figure out + // how many lanes are to the right and not in the turn. + new_first_lane_from_the_right += + std::min(current_num_lanes_right_of_turn, current_lanes.lanes_in_turn); + + previous_lanes = {current_lanes.lanes_in_turn, new_first_lane_from_the_right}; + }; + + // 2/ When to anticipate a left, right turn + if (isLeftTurn(current_inst)) anticipate_for_left_turn(); - else if (is_straight_right.count(¤t) > 0) + else if (isRightTurn(current_inst)) anticipate_for_right_turn(); - else // FIXME: right-sided driving - anticipate_for_right_turn(); - } + else // keepStraight + { + // Heuristic: we do not have a from-lanes -> to-lanes mapping. What we use + // here instead in addition is the number of all lanes (not only the lanes + // in a turn): + // + // -v-v v-v- straight follows + // | | | | + // <- v v -> keep straight here + // | | + // <-| |-> + // + // A route from the top left to the bottom right here goes over a keep + // straight. If we handle all keep straights as right turns (in right-sided + // driving), we wrongly guide the user to the rightmost lanes in the first turn. + // Not only is this wrong but the opposite of what we expect. + // + // The following implements a heuristic to determine a keep straight's + // direction in relation to the next step. In the above example we would get: + // + // coming from right, going to left (in direction of way) -> handle as left turn - if (previous_inst.type == TurnType::Suppressed && - current_inst.type == TurnType::Suppressed && previous.mode == current.mode && - previous_lanes == current_lanes) - { - previous.ElongateBy(current); - current.Invalidate(); - } - }); + if (is_straight_left.count(¤t) > 0) + anticipate_for_left_turn(); + else if (is_straight_right.count(¤t) > 0) + anticipate_for_right_turn(); + else // FIXME: right-sided driving + anticipate_for_right_turn(); + } + + if (previous_inst.type == TurnType::Suppressed && + current_inst.type == TurnType::Suppressed && previous.mode == current.mode && + previous_lanes == current_lanes) + { + previous.ElongateBy(current); + current.Invalidate(); + } + }); }; std::for_each(begin(quick_lanes_ranges), end(quick_lanes_ranges), constrain_lanes); diff --git a/src/engine/guidance/post_processing.cpp b/src/engine/guidance/post_processing.cpp index 0e29b2e0c..1e1abcf65 100644 --- a/src/engine/guidance/post_processing.cpp +++ b/src/engine/guidance/post_processing.cpp @@ -77,7 +77,8 @@ void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterat return; } - const auto passes_exit_or_leaves_roundabout = [](auto const &step) { + const auto passes_exit_or_leaves_roundabout = [](auto const &step) + { return staysOnRoundabout(step.maneuver.instruction) || leavesRoundabout(step.maneuver.instruction); }; @@ -142,9 +143,8 @@ void processRoundaboutExits(const RouteStepIterator begin, const RouteStepIterat // instructions in between void processRoundaboutGroups(const std::pair &range) { - const auto leaves_roundabout = [](auto const &step) { - return leavesRoundabout(step.maneuver.instruction); - }; + const auto leaves_roundabout = [](auto const &step) + { return leavesRoundabout(step.maneuver.instruction); }; auto itr = range.first; while (itr != range.second) @@ -174,9 +174,8 @@ void processRoundaboutGroups(const std::pair handleRoundabouts(std::vector steps) { // check if a step has roundabout type - const auto has_roundabout_type = [](auto const &step) { - return hasRoundaboutType(step.maneuver.instruction); - }; + const auto has_roundabout_type = [](auto const &step) + { return hasRoundaboutType(step.maneuver.instruction); }; const auto first_roundabout_type = std::find_if(steps.begin(), steps.end(), has_roundabout_type); @@ -193,7 +192,8 @@ std::vector handleRoundabouts(std::vector steps) // this group by paradigm does might contain intermediate roundabout instructions, when they are // directly connected. Otherwise it will be a sequence containing everything from enter to exit. // If we already start on the roundabout, the first valid place will be steps.begin(). - const auto is_on_roundabout = [¤tly_on_roundabout](const auto &step) { + const auto is_on_roundabout = [¤tly_on_roundabout](const auto &step) + { if (currently_on_roundabout) { if (leavesRoundabout(step.maneuver.instruction)) @@ -327,10 +327,13 @@ void trimShortSegments(std::vector &steps, LegGeometry &geometry) } // and update the leg geometry indices for the removed entry - std::for_each(steps.begin(), steps.end(), [offset](RouteStep &step) { - step.geometry_begin -= offset; - step.geometry_end -= offset; - }); + std::for_each(steps.begin(), + steps.end(), + [offset](RouteStep &step) + { + step.geometry_begin -= offset; + step.geometry_end -= offset; + }); auto &first_step = steps.front(); auto bearing = first_bearing; @@ -645,16 +648,18 @@ void applyOverrides(const datafacade::BaseDataFacade &facade, auto step_to_update = std::find_if( current_step_it, route_iter, - [&leg_geometry, &via_node_coords](const auto &step) { + [&leg_geometry, &via_node_coords](const auto &step) + { util::Log(logDEBUG) << "Leg geom from " << step.geometry_begin << " to " << step.geometry_end << std::endl; // iterators over geometry of current step auto begin = leg_geometry.locations.begin() + step.geometry_begin; auto end = leg_geometry.locations.begin() + step.geometry_end; - auto via_match = std::find_if(begin, end, [&](const auto &location) { - return location == via_node_coords; - }); + auto via_match = std::find_if(begin, + end, + [&](const auto &location) + { return location == via_node_coords; }); if (via_match != end) { util::Log(logDEBUG) diff --git a/src/engine/guidance/verbosity_reduction.cpp b/src/engine/guidance/verbosity_reduction.cpp index a138524eb..761910b7f 100644 --- a/src/engine/guidance/verbosity_reduction.cpp +++ b/src/engine/guidance/verbosity_reduction.cpp @@ -15,19 +15,20 @@ std::vector suppressShortNameSegments(std::vector steps) return steps; // we remove only name changes that don't offer additional information - const auto name_change_without_lanes = [](const RouteStep &step) { - return hasTurnType(step, TurnType::NewName) && !hasLanes(step); - }; + const auto name_change_without_lanes = [](const RouteStep &step) + { return hasTurnType(step, TurnType::NewName) && !hasLanes(step); }; // check if the next step is not important enough to announce - const auto can_be_extended_to = [](const RouteStep &step) { + const auto can_be_extended_to = [](const RouteStep &step) + { const auto is_not_arrive = !hasWaypointType(step); const auto is_silent = !hasTurnType(step) || hasTurnType(step, TurnType::Suppressed); return is_not_arrive && is_silent; }; - const auto suppress = [](RouteStep &from_step, RouteStep &onto_step) { + const auto suppress = [](RouteStep &from_step, RouteStep &onto_step) + { from_step.ElongateBy(onto_step); onto_step.Invalidate(); }; @@ -36,28 +37,29 @@ std::vector suppressShortNameSegments(std::vector steps) // only available for a very short time const auto reduce_verbosity_if_possible = [suppress, can_be_extended_to](RouteStepIterator ¤t_turn_itr, - RouteStepIterator &previous_turn_itr) { - if (haveSameName(*previous_turn_itr, *current_turn_itr)) + RouteStepIterator &previous_turn_itr) + { + if (haveSameName(*previous_turn_itr, *current_turn_itr)) + suppress(*previous_turn_itr, *current_turn_itr); + else + { + // remember the location of the name change so we can advance the previous turn + const auto location_of_name_change = current_turn_itr; + auto distance = current_turn_itr->distance; + // sum up all distances that can be relevant to the name change + while (can_be_extended_to(*(current_turn_itr + 1)) && + distance < NAME_SEGMENT_CUTOFF_LENGTH) + { + ++current_turn_itr; + distance += current_turn_itr->distance; + } + + if (distance < NAME_SEGMENT_CUTOFF_LENGTH) suppress(*previous_turn_itr, *current_turn_itr); else - { - // remember the location of the name change so we can advance the previous turn - const auto location_of_name_change = current_turn_itr; - auto distance = current_turn_itr->distance; - // sum up all distances that can be relevant to the name change - while (can_be_extended_to(*(current_turn_itr + 1)) && - distance < NAME_SEGMENT_CUTOFF_LENGTH) - { - ++current_turn_itr; - distance += current_turn_itr->distance; - } - - if (distance < NAME_SEGMENT_CUTOFF_LENGTH) - suppress(*previous_turn_itr, *current_turn_itr); - else - previous_turn_itr = location_of_name_change; - } - }; + previous_turn_itr = location_of_name_change; + } + }; BOOST_ASSERT(!hasTurnType(steps.back()) && hasWaypointType(steps.back())); for (auto previous_turn_itr = steps.begin(), current_turn_itr = std::next(previous_turn_itr); diff --git a/src/engine/hint.cpp b/src/engine/hint.cpp index 16677a765..cce3ebe68 100644 --- a/src/engine/hint.cpp +++ b/src/engine/hint.cpp @@ -93,10 +93,10 @@ Hint Hint::FromBase64(const std::string &base64Hint) bool Hint::IsValid(const util::Coordinate new_input_coordinates, const datafacade::BaseDataFacade &facade) const { - const auto all_valid = - std::all_of(segment_hints.begin(), segment_hints.end(), [&](const auto &seg_hint) { - return seg_hint.IsValid(new_input_coordinates, facade); - }); + const auto all_valid = std::all_of(segment_hints.begin(), + segment_hints.end(), + [&](const auto &seg_hint) + { return seg_hint.IsValid(new_input_coordinates, facade); }); if (!all_valid) { return false; diff --git a/src/engine/plugins/match.cpp b/src/engine/plugins/match.cpp index 90517df18..fef9aac4e 100644 --- a/src/engine/plugins/match.cpp +++ b/src/engine/plugins/match.cpp @@ -50,7 +50,8 @@ void filterCandidates(const std::vector &coordinates, // sort by forward id, then by reverse id and then by distance std::sort(candidates.begin(), candidates.end(), - [](const PhantomNodeWithDistance &lhs, const PhantomNodeWithDistance &rhs) { + [](const PhantomNodeWithDistance &lhs, const PhantomNodeWithDistance &rhs) + { return lhs.phantom_node.forward_segment_id.id < rhs.phantom_node.forward_segment_id.id || (lhs.phantom_node.forward_segment_id.id == @@ -65,7 +66,8 @@ void filterCandidates(const std::vector &coordinates, auto new_end = std::unique(candidates.begin(), candidates.end(), - [](const PhantomNodeWithDistance &lhs, const PhantomNodeWithDistance &rhs) { + [](const PhantomNodeWithDistance &lhs, const PhantomNodeWithDistance &rhs) + { return lhs.phantom_node.forward_segment_id.id == rhs.phantom_node.forward_segment_id.id && lhs.phantom_node.reverse_segment_id.id == @@ -95,9 +97,8 @@ void filterCandidates(const std::vector &coordinates, // sort by distance to make pruning effective std::sort(candidates.begin(), candidates.end(), - [](const PhantomNodeWithDistance &lhs, const PhantomNodeWithDistance &rhs) { - return lhs.distance < rhs.distance; - }); + [](const PhantomNodeWithDistance &lhs, const PhantomNodeWithDistance &rhs) + { return lhs.distance < rhs.distance; }); } } @@ -133,7 +134,8 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms, if (max_radius_map_matching > 0 && std::any_of(parameters.radiuses.begin(), parameters.radiuses.end(), - [&](const auto &radius) { + [&](const auto &radius) + { if (!radius) return false; return *radius > max_radius_map_matching; @@ -181,7 +183,7 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms, if (tidied.parameters.radiuses.empty()) { search_radiuses.resize(tidied.parameters.coordinates.size(), - default_radius.has_value() + default_radius.has_value() && *default_radius != -1.0 ? *default_radius : routing_algorithms::DEFAULT_GPS_PRECISION * RADIUS_MULTIPLIER); } @@ -192,14 +194,15 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms, tidied.parameters.radiuses.begin(), tidied.parameters.radiuses.end(), search_radiuses.begin(), - [default_radius = this->default_radius](const boost::optional &maybe_radius) { + [default_radius = this->default_radius](const boost::optional &maybe_radius) + { if (maybe_radius) { return *maybe_radius * RADIUS_MULTIPLIER; } else { - return default_radius.has_value() + return default_radius.has_value() && *default_radius != -1.0 ? *default_radius : routing_algorithms::DEFAULT_GPS_PRECISION * RADIUS_MULTIPLIER; } @@ -212,9 +215,8 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms, filterCandidates(tidied.parameters.coordinates, candidates_lists); if (std::all_of(candidates_lists.begin(), candidates_lists.end(), - [](const std::vector &candidates) { - return candidates.empty(); - })) + [](const std::vector &candidates) + { return candidates.empty(); })) { return Error("NoSegment", std::string("Could not find a matching segment for any coordinate."), diff --git a/src/engine/plugins/tile.cpp b/src/engine/plugins/tile.cpp index 3ed573798..17f896b6d 100644 --- a/src/engine/plugins/tile.cpp +++ b/src/engine/plugins/tile.cpp @@ -251,7 +251,8 @@ std::vector getEdgeIndex(const std::vector &edges) // as the sort condition std::sort(sorted_edge_indexes.begin(), sorted_edge_indexes.end(), - [&edges](const std::size_t &left, const std::size_t &right) -> bool { + [&edges](const std::size_t &left, const std::size_t &right) -> bool + { return (edges[left].u != edges[right].u) ? edges[left].u < edges[right].u : edges[left].v < edges[right].v; }); @@ -430,9 +431,8 @@ void encodeVectorTile(const DataFacadeBase &facade, { vtzero::tile_builder tile; - const auto get_geometry_id = [&facade](auto edge) { - return facade.GetGeometryIndex(edge.forward_segment_id.id).id; - }; + const auto get_geometry_id = [&facade](auto edge) + { return facade.GetGeometryIndex(edge.forward_segment_id.id).id; }; // Convert tile coordinates into mercator coordinates double min_mercator_lon, min_mercator_lat, max_mercator_lon, max_mercator_lat; @@ -508,7 +508,7 @@ void encodeVectorTile(const DataFacadeBase &facade, auto tile_line = coordinatesToTileLine(a, b, tile_bbox); if (!tile_line.empty()) { - SpeedLayerFeatureBuilder fbuilder{speeds_layer, id}; + SpeedLayerFeatureBuilder fbuilder{speeds_layer, id++}; fbuilder.add_linestring_from_container(tile_line); fbuilder.set_speed(speed_kmh_idx); @@ -542,7 +542,7 @@ void encodeVectorTile(const DataFacadeBase &facade, auto tile_line = coordinatesToTileLine(b, a, tile_bbox); if (!tile_line.empty()) { - SpeedLayerFeatureBuilder fbuilder{speeds_layer, id}; + SpeedLayerFeatureBuilder fbuilder{speeds_layer, id++}; fbuilder.add_linestring_from_container(tile_line); fbuilder.set_speed(speed_kmh_idx); diff --git a/src/engine/plugins/viaroute.cpp b/src/engine/plugins/viaroute.cpp index fe0727936..a8a1b2ee6 100644 --- a/src/engine/plugins/viaroute.cpp +++ b/src/engine/plugins/viaroute.cpp @@ -137,7 +137,8 @@ Status ViaRoutePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithm std::vector waypoint_legs(route_parameters.coordinates.size(), false); std::for_each(route_parameters.waypoints.begin(), route_parameters.waypoints.end(), - [&](const std::size_t waypoint_index) { + [&](const std::size_t waypoint_index) + { BOOST_ASSERT(waypoint_index < waypoint_legs.size()); waypoint_legs[waypoint_index] = true; }); @@ -156,22 +157,23 @@ Status ViaRoutePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithm else { const auto all_in_same_component = - [](const std::vector &waypoint_candidates) { - return std::any_of(waypoint_candidates.front().begin(), - waypoint_candidates.front().end(), - // For each of the first possible phantoms, check if all other - // positions in the list have a phantom from the same component. - [&](const PhantomNode &phantom) { - const auto component_id = phantom.component.id; - return std::all_of( - std::next(waypoint_candidates.begin()), - std::end(waypoint_candidates), - [component_id](const PhantomNodeCandidates &candidates) { - return candidatesHaveComponent(candidates, - component_id); - }); - }); - }; + [](const std::vector &waypoint_candidates) + { + return std::any_of(waypoint_candidates.front().begin(), + waypoint_candidates.front().end(), + // For each of the first possible phantoms, check if all other + // positions in the list have a phantom from the same component. + [&](const PhantomNode &phantom) + { + const auto component_id = phantom.component.id; + return std::all_of( + std::next(waypoint_candidates.begin()), + std::end(waypoint_candidates), + [component_id](const PhantomNodeCandidates &candidates) { + return candidatesHaveComponent(candidates, component_id); + }); + }); + }; if (!all_in_same_component(snapped_phantoms)) { diff --git a/src/engine/routing_algorithms/alternative_path_mld.cpp b/src/engine/routing_algorithms/alternative_path_mld.cpp index cffd325a2..945aa15fe 100644 --- a/src/engine/routing_algorithms/alternative_path_mld.cpp +++ b/src/engine/routing_algorithms/alternative_path_mld.cpp @@ -223,9 +223,8 @@ RandIt filterViaCandidatesByStretch(RandIt first, const auto stretch_weight_limit = (1. + parameters.kAtMostLongerBy) * from_alias(weight); - const auto over_weight_limit = [=](const auto via) { - return from_alias(via.weight) > stretch_weight_limit; - }; + const auto over_weight_limit = [=](const auto via) + { return from_alias(via.weight) > stretch_weight_limit; }; return std::remove_if(first, last, over_weight_limit); } @@ -298,13 +297,15 @@ RandIt filterPackedPathsByCellSharing(RandIt first, for (const auto &edge : shortest_path.path) cells.insert(get_cell(std::get<1>(edge))); - const auto over_sharing_limit = [&](const auto &packed) { + const auto over_sharing_limit = [&](const auto &packed) + { if (packed.path.empty()) { // don't remove routes with single-node (empty) path return false; } - const auto not_seen = [&](const PackedEdge edge) { + const auto not_seen = [&](const PackedEdge edge) + { const auto source_cell = get_cell(std::get<0>(edge)); const auto target_cell = get_cell(std::get<1>(edge)); return cells.count(source_cell) < 1 && cells.count(target_cell) < 1; @@ -364,7 +365,8 @@ RandIt filterPackedPathsByLocalOptimality(const WeightedViaNodePackedPath &path, BOOST_ASSERT(path.via.weight != INVALID_EDGE_WEIGHT); // node == parent_in_main_heap(parent_in_side_heap(v)) -> plateaux at `node` - const auto has_plateaux_at_node = [&](const NodeID node, const Heap &fst, const Heap &snd) { + const auto has_plateaux_at_node = [&](const NodeID node, const Heap &fst, const Heap &snd) + { BOOST_ASSERT(fst.WasInserted(node)); auto const parent = fst.GetData(node).parent; return snd.WasInserted(parent) && snd.GetData(parent).parent == node; @@ -374,7 +376,8 @@ RandIt filterPackedPathsByLocalOptimality(const WeightedViaNodePackedPath &path, // tree from t overlap. An edge is part of such a plateaux around `v` if: // v == parent_in_reverse_search(parent_in_forward_search(v)). // Here we calculate the last node on the plateaux in either direction. - const auto plateaux_end = [&](NodeID node, const Heap &fst, const Heap &snd) { + const auto plateaux_end = [&](NodeID node, const Heap &fst, const Heap &snd) + { BOOST_ASSERT(node != SPECIAL_NODEID); BOOST_ASSERT(fst.WasInserted(node)); BOOST_ASSERT(snd.WasInserted(node)); @@ -388,7 +391,8 @@ RandIt filterPackedPathsByLocalOptimality(const WeightedViaNodePackedPath &path, return node; }; - const auto is_not_locally_optimal = [&](const auto &packed) { + const auto is_not_locally_optimal = [&](const auto &packed) + { BOOST_ASSERT(packed.via.node != path.via.node); BOOST_ASSERT(packed.via.weight != INVALID_EDGE_WEIGHT); BOOST_ASSERT(packed.via.node != SPECIAL_NODEID); @@ -475,14 +479,16 @@ RandIt filterUnpackedPathsBySharing(RandIt first, nodes.insert(begin(shortest_path.nodes), end(shortest_path.nodes)); - const auto over_sharing_limit = [&](auto &unpacked) { + const auto over_sharing_limit = [&](auto &unpacked) + { if (unpacked.edges.empty()) { // don't remove routes with single-node (empty) path return false; } EdgeDuration total_duration = {0}; - const auto add_if_seen = [&](const EdgeDuration duration, const NodeID node) { + const auto add_if_seen = [&](const EdgeDuration duration, const NodeID node) + { auto node_duration = facade.GetNodeDuration(node); total_duration += node_duration; if (nodes.count(node) > 0) @@ -533,9 +539,8 @@ RandIt filterAnnotatedRoutesByStretch(RandIt first, const auto stretch_duration_limit = (1. + parameters.kAtMostLongerBy) * from_alias(shortest_route_duration); - const auto over_duration_limit = [=](const auto &route) { - return from_alias(route.duration()) > stretch_duration_limit; - }; + const auto over_duration_limit = [=](const auto &route) + { return from_alias(route.duration()) > stretch_duration_limit; }; return std::remove_if(first, last, over_duration_limit); } @@ -837,9 +842,9 @@ InternalManyRoutesResult alternativePathSearch(SearchEngineData &sear it = filterViaCandidatesByStretch(begin(candidate_vias), it, shortest_path_weight, parameters); // Pre-rank by weight; sharing filtering below then discards by similarity. - std::sort(begin(candidate_vias), it, [](const auto lhs, const auto rhs) { - return lhs.weight < rhs.weight; - }); + std::sort(begin(candidate_vias), + it, + [](const auto lhs, const auto rhs) { return lhs.weight < rhs.weight; }); // Filtered and ranked candidate range const auto candidate_vias_first = begin(candidate_vias); @@ -850,7 +855,8 @@ InternalManyRoutesResult alternativePathSearch(SearchEngineData &sear // The recursive path unpacking below destructs heaps. // We need to save all packed paths from the heaps upfront. - const auto extract_packed_path_from_heaps = [&](WeightedViaNode via) { + const auto extract_packed_path_from_heaps = [&](WeightedViaNode via) + { auto packed_path = retrievePackedPathFromHeap(forward_heap, reverse_heap, via.node); return WeightedViaNodePackedPath{via, std::move(packed_path)}; @@ -928,9 +934,8 @@ InternalManyRoutesResult alternativePathSearch(SearchEngineData &sear std::vector routes; routes.reserve(number_of_unpacked_paths); - const auto unpacked_path_to_route = [&](const WeightedViaNodeUnpackedPath &path) { - return extractRoute(facade, path.via.weight, endpoint_candidates, path.nodes, path.edges); - }; + const auto unpacked_path_to_route = [&](const WeightedViaNodeUnpackedPath &path) + { return extractRoute(facade, path.via.weight, endpoint_candidates, path.nodes, path.edges); }; std::transform(unpacked_paths_first, unpacked_paths_last, diff --git a/src/engine/routing_algorithms/direct_shortest_path.cpp b/src/engine/routing_algorithms/direct_shortest_path.cpp index 598bd4449..923c6e4f7 100644 --- a/src/engine/routing_algorithms/direct_shortest_path.cpp +++ b/src/engine/routing_algorithms/direct_shortest_path.cpp @@ -45,15 +45,16 @@ InternalRouteResult directShortestPathSearch(SearchEngineData &en unpacked_nodes.reserve(packed_leg.size()); unpacked_edges.reserve(packed_leg.size()); unpacked_nodes.push_back(packed_leg.front()); - ch::unpackPath(facade, - packed_leg.begin(), - packed_leg.end(), - [&unpacked_nodes, &unpacked_edges](std::pair &edge, - const auto &edge_id) { - BOOST_ASSERT(edge.first == unpacked_nodes.back()); - unpacked_nodes.push_back(edge.second); - unpacked_edges.push_back(edge_id); - }); + ch::unpackPath( + facade, + packed_leg.begin(), + packed_leg.end(), + [&unpacked_nodes, &unpacked_edges](std::pair &edge, const auto &edge_id) + { + BOOST_ASSERT(edge.first == unpacked_nodes.back()); + unpacked_nodes.push_back(edge.second); + unpacked_edges.push_back(edge_id); + }); } return extractRoute(facade, weight, endpoint_candidates, unpacked_nodes, unpacked_edges); diff --git a/src/engine/routing_algorithms/many_to_many_mld.cpp b/src/engine/routing_algorithms/many_to_many_mld.cpp index 500b7d2f4..e40c889ba 100644 --- a/src/engine/routing_algorithms/many_to_many_mld.cpp +++ b/src/engine/routing_algorithms/many_to_many_mld.cpp @@ -95,7 +95,7 @@ void relaxOutgoingEdges( const DataFacade &facade, const typename SearchEngineData::ManyToManyQueryHeap::HeapNode &heapNode, typename SearchEngineData::ManyToManyQueryHeap &query_heap, - const Args &... args) + const Args &...args) { BOOST_ASSERT(!facade.ExcludeNode(heapNode.node)); @@ -280,49 +280,51 @@ oneToManySearch(SearchEngineData &engine_working_data, // Check if node is in the destinations list and update weights/durations auto update_values = - [&](NodeID node, EdgeWeight weight, EdgeDuration duration, EdgeDistance distance) { - auto candidates = target_nodes_index.equal_range(node); - for (auto it = candidates.first; it != candidates.second;) + [&](NodeID node, EdgeWeight weight, EdgeDuration duration, EdgeDistance distance) + { + auto candidates = target_nodes_index.equal_range(node); + for (auto it = candidates.first; it != candidates.second;) + { + std::size_t index; + EdgeWeight target_weight; + EdgeDuration target_duration; + EdgeDistance target_distance; + std::tie(index, target_weight, target_duration, target_distance) = it->second; + + const auto path_weight = weight + target_weight; + if (path_weight >= EdgeWeight{0}) { - std::size_t index; - EdgeWeight target_weight; - EdgeDuration target_duration; - EdgeDistance target_distance; - std::tie(index, target_weight, target_duration, target_distance) = it->second; + const auto path_duration = duration + target_duration; + const auto path_distance = distance + target_distance; - const auto path_weight = weight + target_weight; - if (path_weight >= EdgeWeight{0}) + EdgeDistance nulldistance = {0}; + auto ¤t_distance = + distances_table.empty() ? nulldistance : distances_table[index]; + + if (std::tie(path_weight, path_duration, path_distance) < + std::tie(weights_table[index], durations_table[index], current_distance)) { - const auto path_duration = duration + target_duration; - const auto path_distance = distance + target_distance; - - EdgeDistance nulldistance = {0}; - auto ¤t_distance = - distances_table.empty() ? nulldistance : distances_table[index]; - - if (std::tie(path_weight, path_duration, path_distance) < - std::tie(weights_table[index], durations_table[index], current_distance)) - { - weights_table[index] = path_weight; - durations_table[index] = path_duration; - current_distance = path_distance; - middle_nodes_table[index] = node; - } - - // Remove node from destinations list - it = target_nodes_index.erase(it); - } - else - { - ++it; + weights_table[index] = path_weight; + durations_table[index] = path_duration; + current_distance = path_distance; + middle_nodes_table[index] = node; } + + // Remove node from destinations list + it = target_nodes_index.erase(it); } - }; + else + { + ++it; + } + } + }; auto insert_node = [&](NodeID node, EdgeWeight initial_weight, EdgeDuration initial_duration, - EdgeDistance initial_distance) { + EdgeDistance initial_distance) + { if (target_nodes_index.count(node)) { // Source and target on the same edge node. If target is not reachable directly via diff --git a/src/engine/routing_algorithms/map_matching.cpp b/src/engine/routing_algorithms/map_matching.cpp index 32d71b9ad..3bbf96c22 100644 --- a/src/engine/routing_algorithms/map_matching.cpp +++ b/src/engine/routing_algorithms/map_matching.cpp @@ -83,7 +83,8 @@ SubMatchingList mapMatching(SearchEngineData &engine_working_data, const bool use_timestamps = trace_timestamps.size() > 1; - const auto median_sample_time = [&] { + const auto median_sample_time = [&] + { if (use_timestamps) { return std::max(1u, getMedianSampleTime(trace_timestamps)); @@ -104,9 +105,8 @@ SubMatchingList mapMatching(SearchEngineData &engine_working_data, std::transform(candidates_list[t].begin(), candidates_list[t].end(), emission_log_probabilities[t].begin(), - [&](const PhantomNodeWithDistance &candidate) { - return default_emission_log_probability(candidate.distance); - }); + [&](const PhantomNodeWithDistance &candidate) + { return default_emission_log_probability(candidate.distance); }); } } else @@ -118,22 +118,19 @@ SubMatchingList mapMatching(SearchEngineData &engine_working_data, { map_matching::EmissionLogProbability emission_log_probability( *trace_gps_precision[t]); - std::transform( - candidates_list[t].begin(), - candidates_list[t].end(), - emission_log_probabilities[t].begin(), - [&emission_log_probability](const PhantomNodeWithDistance &candidate) { - return emission_log_probability(candidate.distance); - }); + std::transform(candidates_list[t].begin(), + candidates_list[t].end(), + emission_log_probabilities[t].begin(), + [&emission_log_probability](const PhantomNodeWithDistance &candidate) + { return emission_log_probability(candidate.distance); }); } else { std::transform(candidates_list[t].begin(), candidates_list[t].end(), emission_log_probabilities[t].begin(), - [&](const PhantomNodeWithDistance &candidate) { - return default_emission_log_probability(candidate.distance); - }); + [&](const PhantomNodeWithDistance &candidate) + { return default_emission_log_probability(candidate.distance); }); } } } @@ -158,7 +155,8 @@ SubMatchingList mapMatching(SearchEngineData &engine_working_data, for (auto t = initial_timestamp + 1; t < candidates_list.size(); ++t) { - const auto step_time = [&] { + const auto step_time = [&] + { if (use_timestamps) { return trace_timestamps[t] - trace_timestamps[prev_unbroken_timestamps.back()]; @@ -169,7 +167,8 @@ SubMatchingList mapMatching(SearchEngineData &engine_working_data, } }(); - const auto max_distance_delta = [&] { + const auto max_distance_delta = [&] + { if (use_timestamps) { return step_time * facade.GetMapMatchingMaxSpeed(); @@ -180,7 +179,8 @@ SubMatchingList mapMatching(SearchEngineData &engine_working_data, } }(); - const bool gap_in_trace = [&]() { + const bool gap_in_trace = [&]() + { // use temporal information if available to determine a split // but do not determine split by timestamps if wasn't asked about it if (use_timestamps && allow_splitting) @@ -419,7 +419,8 @@ SubMatchingList mapMatching(SearchEngineData &engine_working_data, util::for_each_pair( reconstructed_indices, [&trace_distance, &trace_coordinates](const std::pair &prev, - const std::pair &curr) { + const std::pair &curr) + { trace_distance += util::coordinate_calculation::greatCircleDistance( trace_coordinates[prev.first], trace_coordinates[curr.first]); }); diff --git a/src/engine/routing_algorithms/routing_base.cpp b/src/engine/routing_algorithms/routing_base.cpp index 6d5eec88f..29dec6bd4 100644 --- a/src/engine/routing_algorithms/routing_base.cpp +++ b/src/engine/routing_algorithms/routing_base.cpp @@ -25,9 +25,8 @@ std::vector getForwardLoopNodes(const PhantomEndpointCandidates &endpoin auto requires_loop = std::any_of(endpoint_candidates.target_phantoms.begin(), endpoint_candidates.target_phantoms.end(), - [&](const auto &target_phantom) { - return requiresForwardLoop(source_phantom, target_phantom); - }); + [&](const auto &target_phantom) + { return requiresForwardLoop(source_phantom, target_phantom); }); if (requires_loop) { res.push_back(source_phantom.forward_segment_id.id); @@ -57,9 +56,8 @@ std::vector getBackwardLoopNodes(const PhantomEndpointCandidates &endpoi auto requires_loop = std::any_of(endpoint_candidates.target_phantoms.begin(), endpoint_candidates.target_phantoms.end(), - [&](const auto &target_phantom) { - return requiresBackwardLoop(source_phantom, target_phantom); - }); + [&](const auto &target_phantom) + { return requiresBackwardLoop(source_phantom, target_phantom); }); if (requires_loop) { res.push_back(source_phantom.reverse_segment_id.id); @@ -86,7 +84,8 @@ PhantomEndpoints endpointsFromCandidates(const PhantomEndpointCandidates &candid { auto source_it = std::find_if(candidates.source_phantoms.begin(), candidates.source_phantoms.end(), - [&path](const auto &source_phantom) { + [&path](const auto &source_phantom) + { return path.front() == source_phantom.forward_segment_id.id || path.front() == source_phantom.reverse_segment_id.id; }); @@ -94,7 +93,8 @@ PhantomEndpoints endpointsFromCandidates(const PhantomEndpointCandidates &candid auto target_it = std::find_if(candidates.target_phantoms.begin(), candidates.target_phantoms.end(), - [&path](const auto &target_phantom) { + [&path](const auto &target_phantom) + { return path.back() == target_phantom.forward_segment_id.id || path.back() == target_phantom.reverse_segment_id.id; }); diff --git a/src/engine/routing_algorithms/routing_base_ch.cpp b/src/engine/routing_algorithms/routing_base_ch.cpp index a882dab20..304fce630 100644 --- a/src/engine/routing_algorithms/routing_base_ch.cpp +++ b/src/engine/routing_algorithms/routing_base_ch.cpp @@ -19,9 +19,8 @@ void unpackEdge(const DataFacade &facade, unpackPath(facade, path.begin(), path.end(), - [&unpacked_path](const std::pair &edge, const auto & /* data */) { - unpacked_path.emplace_back(edge.first); - }); + [&unpacked_path](const std::pair &edge, const auto & /* data */) + { unpacked_path.emplace_back(edge.first); }); unpacked_path.emplace_back(to); } diff --git a/src/engine/routing_algorithms/tile_turns.cpp b/src/engine/routing_algorithms/tile_turns.cpp index 8171f7e7b..e2d133930 100644 --- a/src/engine/routing_algorithms/tile_turns.cpp +++ b/src/engine/routing_algorithms/tile_turns.cpp @@ -35,9 +35,8 @@ std::vector generateTurns(const datafacade &facade, // it saves us a bunch of re-allocations during iteration. directed_graph.reserve(edges.size() * 2); - const auto get_geometry_id = [&facade](auto edge) { - return facade.GetGeometryIndex(edge.forward_segment_id.id).id; - }; + const auto get_geometry_id = [&facade](auto edge) + { return facade.GetGeometryIndex(edge.forward_segment_id.id).id; }; // To build a tile, we can only rely on the r-tree to quickly find all data visible within the // tile itself. The Rtree returns a series of segments that may or may not offer turns @@ -215,10 +214,10 @@ std::vector getTileTurns(const DataFacade &facade, // // would offer a backward edge at `b` to `a` (due to the oneway from a to b) // but could also offer a shortcut (b-c-a) from `b` to `a` which is longer. - EdgeID edge_id = facade.FindSmallestEdge( - approach_node, exit_node, [](const contractor::QueryEdge::EdgeData &data) { - return data.forward && !data.shortcut; - }); + EdgeID edge_id = facade.FindSmallestEdge(approach_node, + exit_node, + [](const contractor::QueryEdge::EdgeData &data) + { return data.forward && !data.shortcut; }); // Depending on how the graph is constructed, we might have to look for // a backwards edge instead. They're equivalent, just one is available for @@ -227,10 +226,10 @@ std::vector getTileTurns(const DataFacade &facade, // If we didn't find a forward edge, try for a backward one if (SPECIAL_EDGEID == edge_id) { - edge_id = facade.FindSmallestEdge( - exit_node, approach_node, [](const contractor::QueryEdge::EdgeData &data) { - return data.backward && !data.shortcut; - }); + edge_id = facade.FindSmallestEdge(exit_node, + approach_node, + [](const contractor::QueryEdge::EdgeData &data) + { return data.backward && !data.shortcut; }); } BOOST_ASSERT_MSG(edge_id == SPECIAL_EDGEID || !facade.GetEdgeData(edge_id).shortcut, diff --git a/src/extractor/edge_based_graph_factory.cpp b/src/extractor/edge_based_graph_factory.cpp index 0e44276f2..a84fdbebe 100644 --- a/src/extractor/edge_based_graph_factory.cpp +++ b/src/extractor/edge_based_graph_factory.cpp @@ -151,7 +151,8 @@ NBGToEBG EdgeBasedGraphFactory::InsertEdgeBasedNode(const NodeID node_u, const N NodeID current_edge_source_coordinate_id = node_u; - const auto edge_id_to_segment_id = [](const NodeID edge_based_node_id) { + const auto edge_id_to_segment_id = [](const NodeID edge_based_node_id) + { if (edge_based_node_id == SPECIAL_NODEID) { return SegmentID{SPECIAL_SEGMENTID, false}; @@ -409,7 +410,8 @@ EdgeBasedGraphFactory::GenerateEdgeExpandedNodes(const WayRestrictionMap &way_re NodeID current_edge_source_coordinate_id = node_u; const EdgeData &forward_data = m_node_based_graph.GetEdgeData(eid); - const auto edge_id_to_segment_id = [](const NodeID edge_based_node_id) { + const auto edge_id_to_segment_id = [](const NodeID edge_based_node_id) + { if (edge_based_node_id == SPECIAL_NODEID) { return SegmentID{SPECIAL_SEGMENTID, false}; @@ -532,7 +534,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( TurnPenalty turn_duration_penalty; }; - auto const transfer_data = [&](const EdgeWithData &edge_with_data) { + auto const transfer_data = [&](const EdgeWithData &edge_with_data) + { m_edge_based_edge_list.push_back(edge_with_data.edge); turn_weight_penalties.push_back(edge_with_data.turn_weight_penalty); turn_duration_penalties.push_back(edge_with_data.turn_duration_penalty); @@ -568,7 +571,9 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( // First part of the pipeline generates iterator ranges of IDs in sets of GRAINSIZE tbb::filter> generator_stage( - tbb::filter_mode::serial_in_order, [&](tbb::flow_control &fc) { + tbb::filter_mode::serial_in_order, + [&](tbb::flow_control &fc) + { if (current_node < node_count) { auto next_node = std::min(current_node + GRAINSIZE, node_count); @@ -599,7 +604,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( const auto &turn_angle, const auto &road_legs_on_the_right, const auto &road_legs_on_the_left, - const auto &edge_geometries) { + const auto &edge_geometries) + { const auto &edge_data1 = m_node_based_graph.GetEdgeData(node_based_edge_from); const auto &edge_data2 = m_node_based_graph.GetEdgeData(node_based_edge_to); @@ -608,26 +614,12 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( BOOST_ASSERT(!edge_data1.reversed); BOOST_ASSERT(!edge_data2.reversed); - // We write out the mapping between the edge-expanded edges and the original nodes. - // Since each edge represents a possible maneuver, external programs can use this to - // quickly perform updates to edge weights in order to penalize certain turns. - - // If this edge is 'trivial' -- where the compressed edge corresponds exactly to an - // original OSM segment -- we can pull the turn's preceding node ID directly with - // `node_along_road_entering`; - // otherwise, we need to look up the node immediately preceding the turn from the - // compressed edge container. - const bool isTrivial = m_compressed_edge_container.IsTrivial(node_based_edge_from); - - const auto &from_node = - isTrivial ? node_along_road_entering - : m_compressed_edge_container.GetLastEdgeSourceID(node_based_edge_from); - // compute weight and duration penalties // In theory we shouldn't get a directed traffic light on a turn, as it indicates that // the traffic signal direction was potentially ambiguously annotated on the junction // node But we'll check anyway. - const auto is_traffic_light = m_traffic_signals.HasSignal(from_node, intersection_node); + const auto is_traffic_light = + m_traffic_signals.HasSignal(node_along_road_entering, intersection_node); const auto is_uturn = guidance::getTurnDirection(turn_angle) == guidance::DirectionModifier::UTurn; @@ -694,6 +686,21 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( true, false}; + // We write out the mapping between the edge-expanded edges and the original nodes. + // Since each edge represents a possible maneuver, external programs can use this to + // quickly perform updates to edge weights in order to penalize certain turns. + + // If this edge is 'trivial' -- where the compressed edge corresponds exactly to an + // original OSM segment -- we can pull the turn's preceding node ID directly with + // `node_along_road_entering`; + // otherwise, we need to look up the node immediately preceding the turn from the + // compressed edge container. + const bool isTrivial = m_compressed_edge_container.IsTrivial(node_based_edge_from); + + const auto &from_node = + isTrivial ? node_along_road_entering + : m_compressed_edge_container.GetLastEdgeSourceID(node_based_edge_from); + const auto &to_node = m_compressed_edge_container.GetFirstEdgeTargetID(node_based_edge_to); @@ -709,7 +716,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( // tbb::filter, EdgesPipelineBufferPtr> processor_stage( tbb::filter_mode::parallel, - [&](const tbb::blocked_range &intersection_node_range) { + [&](const tbb::blocked_range &intersection_node_range) + { auto buffer = std::make_shared(); buffer->nodes_processed = intersection_node_range.size(); @@ -794,16 +802,16 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( const auto turn = std::find_if(connected_roads.begin(), connected_roads.end(), - [edge = outgoing_edge.edge](const auto &road) { - return road.eid == edge; - }); + [edge = outgoing_edge.edge](const auto &road) + { return road.eid == edge; }); OSRM_ASSERT(turn != connected_roads.end(), m_coordinates[intersection_node]); std::vector road_legs_on_the_right; std::vector road_legs_on_the_left; - auto get_connected_road_info = [&](const auto &connected_edge) { + auto get_connected_road_info = [&](const auto &connected_edge) + { const auto &edge_data = m_node_based_graph.GetEdgeData(connected_edge.eid); @@ -1011,9 +1019,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( auto const has_unconditional = std::any_of(restrictions.begin(), restrictions.end(), - [](const auto &restriction) { - return restriction->IsUnconditional(); - }); + [](const auto &restriction) + { return restriction->IsUnconditional(); }); if (has_unconditional) continue; @@ -1119,7 +1126,9 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( util::Percent routing_progress(log, node_count); std::vector delayed_data; tbb::filter output_stage( - tbb::filter_mode::serial_in_order, [&](auto buffer) { + tbb::filter_mode::serial_in_order, + [&](auto buffer) + { routing_progress.PrintAddition(buffer->nodes_processed); m_connectivity_checksum = buffer->checksum.update_checksum(m_connectivity_checksum); @@ -1139,7 +1148,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( std::for_each(buffer->turn_to_ebn_map.begin(), buffer->turn_to_ebn_map.end(), - [&global_turn_to_ebn_map](const auto &p) { + [&global_turn_to_ebn_map](const auto &p) + { // TODO: log conflicts here global_turn_to_ebn_map.insert(p); }); @@ -1177,26 +1187,32 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( return std::vector{turn_edges.second.first, turn_edges.second.second}; }); - std::for_each(std::next(turns.begin()), turns.end(), [&](const auto &turn) { - std::vector> next_node_sequences; - const auto next_turn_edges = global_turn_to_ebn_map.equal_range(turn); - for (auto &node_sequence : node_sequences) - { - const auto found_it = std::find_if( - next_turn_edges.first, next_turn_edges.second, [&](const auto &turn_edges) { - const auto pre_turn_edge = turn_edges.second.first; - return (node_sequence.back() == pre_turn_edge); - }); + std::for_each(std::next(turns.begin()), + turns.end(), + [&](const auto &turn) + { + std::vector> next_node_sequences; + const auto next_turn_edges = global_turn_to_ebn_map.equal_range(turn); + for (auto &node_sequence : node_sequences) + { + const auto found_it = std::find_if( + next_turn_edges.first, + next_turn_edges.second, + [&](const auto &turn_edges) + { + const auto pre_turn_edge = turn_edges.second.first; + return (node_sequence.back() == pre_turn_edge); + }); - if (found_it != next_turn_edges.second) - { - const auto post_turn_edge = found_it->second.second; - node_sequence.push_back(post_turn_edge); - next_node_sequences.push_back(std::move(node_sequence)); - } - } - node_sequences = std::move(next_node_sequences); - }); + if (found_it != next_turn_edges.second) + { + const auto post_turn_edge = found_it->second.second; + node_sequence.push_back(post_turn_edge); + next_node_sequences.push_back(std::move(node_sequence)); + } + } + node_sequences = std::move(next_node_sequences); + }); for (const auto &node_sequence : node_sequences) { @@ -1236,7 +1252,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges( // Now, update the turn_id property on every EdgeBasedEdge - it will equal the position in the // m_edge_based_edge_list array for each object. tbb::parallel_for(tbb::blocked_range(0, m_edge_based_edge_list.size()), - [this](const tbb::blocked_range &range) { + [this](const tbb::blocked_range &range) + { for (auto x = range.begin(), end = range.end(); x != end; ++x) { m_edge_based_edge_list[x].data.turn_id = x; diff --git a/src/extractor/extraction_containers.cpp b/src/extractor/extraction_containers.cpp index d75122d48..bea449390 100644 --- a/src/extractor/extraction_containers.cpp +++ b/src/extractor/extraction_containers.cpp @@ -460,10 +460,10 @@ void ExtractionContainers::PrepareNodes() util::UnbufferedLog log; log << "Sorting all nodes ... " << std::flush; TIMER_START(sorting_nodes); - tbb::parallel_sort( - all_nodes_list.begin(), all_nodes_list.end(), [](const auto &left, const auto &right) { - return left.node_id < right.node_id; - }); + tbb::parallel_sort(all_nodes_list.begin(), + all_nodes_list.end(), + [](const auto &left, const auto &right) + { return left.node_id < right.node_id; }); TIMER_STOP(sorting_nodes); log << "ok, after " << TIMER_SEC(sorting_nodes) << "s"; } @@ -629,7 +629,8 @@ void ExtractionContainers::PrepareEdges(ScriptingEnvironment &scripting_environm // Remove all remaining edges. They are invalid because there are no corresponding nodes for // them. This happens when using osmosis with bbox or polygon to extract smaller areas. - auto markSourcesInvalid = [](InternalExtractorEdge &edge) { + auto markSourcesInvalid = [](InternalExtractorEdge &edge) + { util::Log(logDEBUG) << "Found invalid node reference " << edge.result.source; edge.result.source = SPECIAL_NODEID; edge.result.osm_source_id = SPECIAL_OSM_NODEID; @@ -706,7 +707,12 @@ void ExtractionContainers::PrepareEdges(ScriptingEnvironment &scripting_environm const auto accurate_distance = util::coordinate_calculation::greatCircleDistance(source_coord, target_coord); - ExtractionSegment segment(source_coord, target_coord, distance, weight, duration); + ExtractionSegment segment(source_coord, + target_coord, + distance, + weight, + duration, + edge_iterator->result.flags); scripting_environment.ProcessSegment(segment); auto &edge = edge_iterator->result; @@ -738,7 +744,8 @@ void ExtractionContainers::PrepareEdges(ScriptingEnvironment &scripting_environm // Remove all remaining edges. They are invalid because there are no corresponding nodes for // them. This happens when using osmosis with bbox or polygon to extract smaller areas. - auto markTargetsInvalid = [](InternalExtractorEdge &edge) { + auto markTargetsInvalid = [](InternalExtractorEdge &edge) + { util::Log(logDEBUG) << "Found invalid node reference " << edge.result.target; edge.result.target = SPECIAL_NODEID; }; @@ -893,7 +900,8 @@ ExtractionContainers::ReferencedWays ExtractionContainers::IdentifyManeuverOverr << " maneuver overrides..."; TIMER_START(identify_maneuver_override_ways); - const auto mark_ids = [&](auto const &external_maneuver_override) { + const auto mark_ids = [&](auto const &external_maneuver_override) + { NodesOfWay dummy_segment{MAX_OSM_WAYID, {MAX_OSM_NODEID, MAX_OSM_NODEID}}; const auto &turn_path = external_maneuver_override.turn_path; maneuver_override_ways[turn_path.From()] = dummy_segment; @@ -913,7 +921,8 @@ ExtractionContainers::ReferencedWays ExtractionContainers::IdentifyManeuverOverr std::for_each( external_maneuver_overrides_list.begin(), external_maneuver_overrides_list.end(), mark_ids); - const auto set_ids = [&](size_t way_list_idx, auto const &way_id) { + const auto set_ids = [&](size_t way_list_idx, auto const &way_id) + { auto itr = maneuver_override_ways.find(way_id); if (itr != maneuver_override_ways.end()) { @@ -979,7 +988,8 @@ void ExtractionContainers::PrepareTrafficSignals( void ExtractionContainers::PrepareManeuverOverrides(const ReferencedWays &maneuver_override_ways) { - auto const osm_node_to_internal_nbn = [&](auto const osm_node) { + auto const osm_node_to_internal_nbn = [&](auto const osm_node) + { auto internal = mapExternalToInternalNodeID( used_node_id_list.begin(), used_node_id_list.end(), osm_node); if (internal == SPECIAL_NODEID) @@ -989,8 +999,9 @@ void ExtractionContainers::PrepareManeuverOverrides(const ReferencedWays &maneuv return internal; }; - const auto strings_to_turn_type_and_direction = [](const std::string &turn_string, - const std::string &direction_string) { + const auto strings_to_turn_type_and_direction = + [](const std::string &turn_string, const std::string &direction_string) + { auto result = std::make_pair(guidance::TurnType::MaxTurnType, guidance::DirectionModifier::MaxDirectionModifier); @@ -1054,7 +1065,8 @@ void ExtractionContainers::PrepareManeuverOverrides(const ReferencedWays &maneuv // Returns true on successful transformation, false in case of invalid references. // Later, the UnresolvedManeuverOverride will be converted into a final ManeuverOverride // once the edge-based-node IDs are generated by the edge-based-graph-factory - const auto transform = [&](const auto &external_type, auto &internal_type) { + const auto transform = [&](const auto &external_type, auto &internal_type) + { if (external_type.turn_path.Type() == TurnPathType::VIA_WAY_TURN_PATH) { auto const &external = external_type.turn_path.AsViaWayPath(); @@ -1087,11 +1099,12 @@ void ExtractionContainers::PrepareManeuverOverrides(const ReferencedWays &maneuv }; const auto transform_into_internal_types = - [&](const InputManeuverOverride &external_maneuver_override) { - UnresolvedManeuverOverride internal_maneuver_override; - if (transform(external_maneuver_override, internal_maneuver_override)) - internal_maneuver_overrides.push_back(std::move(internal_maneuver_override)); - }; + [&](const InputManeuverOverride &external_maneuver_override) + { + UnresolvedManeuverOverride internal_maneuver_override; + if (transform(external_maneuver_override, internal_maneuver_override)) + internal_maneuver_overrides.push_back(std::move(internal_maneuver_override)); + }; // Transforming the overrides into the dedicated internal types { @@ -1119,7 +1132,8 @@ ExtractionContainers::ReferencedWays ExtractionContainers::IdentifyRestrictionWa // Enter invalid IDs into the map to indicate that we want to find out about // nodes of these ways. - const auto mark_ids = [&](auto const &turn_restriction) { + const auto mark_ids = [&](auto const &turn_restriction) + { NodesOfWay dummy_segment{MAX_OSM_WAYID, {MAX_OSM_NODEID, MAX_OSM_NODEID}}; const auto &turn_path = turn_restriction.turn_path; restriction_ways[turn_path.From()] = dummy_segment; @@ -1137,7 +1151,8 @@ ExtractionContainers::ReferencedWays ExtractionContainers::IdentifyRestrictionWa std::for_each(restrictions_list.begin(), restrictions_list.end(), mark_ids); // Update the values for all ways already sporting SPECIAL_NODEID - const auto set_ids = [&](const size_t way_list_idx, auto const &way_id) { + const auto set_ids = [&](const size_t way_list_idx, auto const &way_id) + { auto itr = restriction_ways.find(way_id); if (itr != restriction_ways.end()) { @@ -1173,7 +1188,8 @@ ExtractionContainers::ReferencedTrafficSignals ExtractionContainers::IdentifyTra std::unordered_set bidirectional_signals; - const auto mark_signals = [&](auto const &traffic_signal) { + const auto mark_signals = [&](auto const &traffic_signal) + { if (traffic_signal.second == TrafficLightClass::DIRECTION_FORWARD || traffic_signal.second == TrafficLightClass::DIRECTION_REVERSE) { @@ -1188,7 +1204,8 @@ ExtractionContainers::ReferencedTrafficSignals ExtractionContainers::IdentifyTra std::for_each(external_traffic_signals.begin(), external_traffic_signals.end(), mark_signals); // Extract all the segments that lead up to unidirectional traffic signals. - const auto set_segments = [&](const size_t way_list_idx, auto const & /*unused*/) { + const auto set_segments = [&](const size_t way_list_idx, auto const & /*unused*/) + { const auto node_start_offset = used_node_id_list.begin() + way_node_id_offsets[way_list_idx]; const auto node_end_offset = @@ -1222,7 +1239,9 @@ ExtractionContainers::ReferencedTrafficSignals ExtractionContainers::IdentifyTra util::for_each_indexed(ways_list.cbegin(), ways_list.cend(), set_segments); util::for_each_pair( - signal_segments, [](const auto pair_a, const auto pair_b) { + signal_segments, + [](const auto pair_a, const auto pair_b) + { if (pair_a.first == pair_b.first) { // If a node is appearing multiple times in this map, then it's ambiguous. @@ -1247,7 +1266,8 @@ ExtractionContainers::ReferencedTrafficSignals ExtractionContainers::IdentifyTra void ExtractionContainers::PrepareRestrictions(const ReferencedWays &restriction_ways) { - auto const to_internal = [&](auto const osm_node) { + auto const to_internal = [&](auto const osm_node) + { auto internal = mapExternalToInternalNodeID( used_node_id_list.begin(), used_node_id_list.end(), osm_node); if (internal == SPECIAL_NODEID) @@ -1259,7 +1279,8 @@ void ExtractionContainers::PrepareRestrictions(const ReferencedWays &restriction // Transform an OSMRestriction (based on WayIDs) into an OSRM restriction (base on NodeIDs). // Returns true on successful transformation, false in case of invalid references. - const auto transform = [&](const auto &external_type, auto &internal_type) { + const auto transform = [&](const auto &external_type, auto &internal_type) + { if (external_type.turn_path.Type() == TurnPathType::VIA_WAY_TURN_PATH) { auto const &external = external_type.turn_path.AsViaWayPath(); @@ -1288,7 +1309,8 @@ void ExtractionContainers::PrepareRestrictions(const ReferencedWays &restriction return internal_type.Valid(); }; - const auto transform_into_internal_types = [&](InputTurnRestriction &external_restriction) { + const auto transform_into_internal_types = [&](InputTurnRestriction &external_restriction) + { TurnRestriction restriction; if (transform(external_restriction, restriction)) { diff --git a/src/extractor/extractor.cpp b/src/extractor/extractor.cpp index a48ffdb02..634395457 100644 --- a/src/extractor/extractor.cpp +++ b/src/extractor/extractor.cpp @@ -442,9 +442,12 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(ScriptingEnvironment &scripting ExtractionRelationContainer relations; - const auto buffer_reader = [](osmium::io::Reader &reader) { + const auto buffer_reader = [](osmium::io::Reader &reader) + { return tbb::filter( - tbb::filter_mode::serial_in_order, [&reader](tbb::flow_control &fc) { + tbb::filter_mode::serial_in_order, + [&reader](tbb::flow_control &fc) + { if (auto buffer = reader.read()) { return std::make_shared(std::move(buffer)); @@ -466,7 +469,9 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(ScriptingEnvironment &scripting osmium_location_handler_type location_handler(location_cache); tbb::filter location_cacher( - tbb::filter_mode::serial_in_order, [&location_handler](SharedBuffer buffer) { + tbb::filter_mode::serial_in_order, + [&location_handler](SharedBuffer buffer) + { osmium::apply(buffer->begin(), buffer->end(), location_handler); return buffer; }); @@ -475,7 +480,8 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(ScriptingEnvironment &scripting tbb::filter buffer_transformer( tbb::filter_mode::parallel, // NOLINTNEXTLINE(performance-unnecessary-value-param) - [&](const SharedBuffer buffer) { + [&](const SharedBuffer buffer) + { ParsedBuffer parsed_buffer; parsed_buffer.buffer = buffer; scripting_environment.ProcessElements(*buffer, @@ -495,7 +501,9 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(ScriptingEnvironment &scripting unsigned number_of_restrictions = 0; unsigned number_of_maneuver_overrides = 0; tbb::filter buffer_storage( - tbb::filter_mode::serial_in_order, [&](const ParsedBuffer &parsed_buffer) { + tbb::filter_mode::serial_in_order, + [&](const ParsedBuffer &parsed_buffer) + { number_of_nodes += parsed_buffer.resulting_nodes.size(); // put parsed objects thru extractor callbacks for (const auto &result : parsed_buffer.resulting_nodes) @@ -524,7 +532,8 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(ScriptingEnvironment &scripting tbb::filter> buffer_relation_cache( tbb::filter_mode::parallel, // NOLINTNEXTLINE(performance-unnecessary-value-param) - [&](const SharedBuffer buffer) { + [&](const SharedBuffer buffer) + { if (!buffer) return std::shared_ptr{}; @@ -562,7 +571,8 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(ScriptingEnvironment &scripting tbb::filter, void> buffer_storage_relation( tbb::filter_mode::serial_in_order, // NOLINTNEXTLINE(performance-unnecessary-value-param) - [&](const std::shared_ptr parsed_relations) { + [&](const std::shared_ptr parsed_relations) + { number_of_relations += parsed_relations->GetRelationsNum(); relations.Merge(std::move(*parsed_relations)); }); @@ -749,7 +759,8 @@ EdgeID Extractor::BuildEdgeExpandedGraph( segregated_edges, turn_lane_map); - const auto create_edge_based_edges = [&]() { + const auto create_edge_based_edges = [&]() + { // scoped to release intermediate data structures right after the call RestrictionMap unconditional_node_restriction_map(restriction_graph); ConditionalRestrictionMap conditional_node_restriction_map(restriction_graph); @@ -795,9 +806,8 @@ void Extractor::BuildRTree(std::vector edge_based_node_seg auto start_point_count = std::accumulate(edge_based_node_segments.begin(), edge_based_node_segments.end(), 0, - [](const size_t so_far, const auto &segment) { - return so_far + (segment.is_startpoint ? 1 : 0); - }); + [](const size_t so_far, const auto &segment) + { return so_far + (segment.is_startpoint ? 1 : 0); }); if (start_point_count == 0) { throw util::exception("There are no snappable edges left after processing. Are you " diff --git a/src/extractor/extractor_callbacks.cpp b/src/extractor/extractor_callbacks.cpp index 3601fc402..cfbd64933 100644 --- a/src/extractor/extractor_callbacks.cpp +++ b/src/extractor/extractor_callbacks.cpp @@ -140,7 +140,8 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti InternalExtractorEdge::WeightData forward_weight_data; InternalExtractorEdge::WeightData backward_weight_data; - const auto toValueByEdgeOrByMeter = [&nodes](const double by_way, const double by_meter) { + const auto toValueByEdgeOrByMeter = [&nodes](const double by_way, const double by_meter) + { using Value = detail::ByEdgeOrByMeterValue; // get value by weight per edge if (by_way >= 0) @@ -194,7 +195,8 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti } } - const auto classStringToMask = [this](const std::string &class_name) { + const auto classStringToMask = [this](const std::string &class_name) + { auto iter = classes_map.find(class_name); if (iter == classes_map.end()) { @@ -212,7 +214,8 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti return iter->second; } }; - const auto classesToMask = [&](const auto &classes) { + const auto classesToMask = [&](const auto &classes) + { ClassData mask = 0; for (const auto &name_and_flag : classes) { @@ -232,7 +235,8 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti const ClassData forward_classes = classesToMask(parsed_way.forward_classes); const ClassData backward_classes = classesToMask(parsed_way.backward_classes); - const auto laneStringToDescription = [](const std::string &lane_string) -> TurnLaneDescription { + const auto laneStringToDescription = [](const std::string &lane_string) -> TurnLaneDescription + { if (lane_string.empty()) return {}; @@ -332,7 +336,8 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti road_classification.SetNumberOfLanes(std::max(road_deduced_num_lanes, // len(turn:lanes) road_classification.GetNumberOfLanes())); - const auto GetNameID = [this, &parsed_way](bool is_forward) -> NameID { + const auto GetNameID = [this, &parsed_way](bool is_forward) -> NameID + { const std::string &ref = is_forward ? parsed_way.forward_ref : parsed_way.backward_ref; // Get the unique identifier for the street name, destination, and ref const auto name_iterator = string_map.find(MapKey(parsed_way.name, @@ -418,30 +423,31 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti forward_classes, parsed_way.forward_travel_mode, parsed_way.is_left_hand_driving}); - util::for_each_pair( - nodes, [&](const osmium::NodeRef &first_node, const osmium::NodeRef &last_node) { - NodeBasedEdgeWithOSM edge = { - OSMNodeID{static_cast(first_node.ref())}, - OSMNodeID{static_cast(last_node.ref())}, - {0}, // weight - {0}, // duration - {0}, // distance - {}, // geometry id - static_cast(annotation_data_id), - {true, - in_backward_direction && !split_edge, - split_edge, - parsed_way.roundabout, - parsed_way.circular, - parsed_way.is_startpoint, - parsed_way.forward_restricted, - road_classification, - parsed_way.highway_turn_classification, - parsed_way.access_turn_classification}}; + util::for_each_pair(nodes, + [&](const osmium::NodeRef &first_node, const osmium::NodeRef &last_node) + { + NodeBasedEdgeWithOSM edge = { + OSMNodeID{static_cast(first_node.ref())}, + OSMNodeID{static_cast(last_node.ref())}, + {0}, // weight + {0}, // duration + {0}, // distance + {}, // geometry id + static_cast(annotation_data_id), + {true, + in_backward_direction && !split_edge, + split_edge, + parsed_way.roundabout, + parsed_way.circular, + parsed_way.is_startpoint, + parsed_way.forward_restricted, + road_classification, + parsed_way.highway_turn_classification, + parsed_way.access_turn_classification}}; - external_memory.all_edges_list.push_back( - InternalExtractorEdge(edge, forward_weight_data, forward_duration_data, {})); - }); + external_memory.all_edges_list.push_back(InternalExtractorEdge( + edge, forward_weight_data, forward_duration_data, {})); + }); } if (in_backward_direction && (!in_forward_direction || split_edge)) @@ -452,38 +458,38 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti backward_classes, parsed_way.backward_travel_mode, parsed_way.is_left_hand_driving}); - util::for_each_pair( - nodes, [&](const osmium::NodeRef &first_node, const osmium::NodeRef &last_node) { - NodeBasedEdgeWithOSM edge = { - OSMNodeID{static_cast(first_node.ref())}, - OSMNodeID{static_cast(last_node.ref())}, - {0}, // weight - {0}, // duration - {0}, // distance - {}, // geometry id - static_cast(annotation_data_id), - {false, - true, - split_edge, - parsed_way.roundabout, - parsed_way.circular, - parsed_way.is_startpoint, - parsed_way.backward_restricted, - road_classification, - parsed_way.highway_turn_classification, - parsed_way.access_turn_classification}}; + util::for_each_pair(nodes, + [&](const osmium::NodeRef &first_node, const osmium::NodeRef &last_node) + { + NodeBasedEdgeWithOSM edge = { + OSMNodeID{static_cast(first_node.ref())}, + OSMNodeID{static_cast(last_node.ref())}, + {0}, // weight + {0}, // duration + {0}, // distance + {}, // geometry id + static_cast(annotation_data_id), + {false, + true, + split_edge, + parsed_way.roundabout, + parsed_way.circular, + parsed_way.is_startpoint, + parsed_way.backward_restricted, + road_classification, + parsed_way.highway_turn_classification, + parsed_way.access_turn_classification}}; - external_memory.all_edges_list.push_back( - InternalExtractorEdge(edge, backward_weight_data, backward_duration_data, {})); - }); + external_memory.all_edges_list.push_back(InternalExtractorEdge( + edge, backward_weight_data, backward_duration_data, {})); + }); } std::transform(nodes.begin(), nodes.end(), std::back_inserter(external_memory.used_node_id_list), - [](const osmium::NodeRef &ref) { - return OSMNodeID{static_cast(ref.ref())}; - }); + [](const osmium::NodeRef &ref) + { return OSMNodeID{static_cast(ref.ref())}; }); auto way_id = OSMWayID{static_cast(input_way.id())}; external_memory.ways_list.push_back(way_id); diff --git a/src/extractor/graph_compressor.cpp b/src/extractor/graph_compressor.cpp index 9c933ef4f..ba1e8bebc 100644 --- a/src/extractor/graph_compressor.cpp +++ b/src/extractor/graph_compressor.cpp @@ -20,7 +20,7 @@ namespace osrm::extractor static constexpr int SECOND_TO_DECISECOND = 10; void GraphCompressor::Compress(const std::unordered_set &barrier_nodes, - const TrafficSignals &traffic_signals, + TrafficSignals &traffic_signals, ScriptingEnvironment &scripting_environment, std::vector &turn_restrictions, std::vector &maneuver_overrides, @@ -37,7 +37,8 @@ void GraphCompressor::Compress(const std::unordered_set &barrier_nodes, // restriction path. std::unordered_set incompressible_via_nodes; - const auto remember_via_nodes = [&](const auto &restriction) { + const auto remember_via_nodes = [&](const auto &restriction) + { if (restriction.turn_path.Type() == TurnPathType::VIA_NODE_TURN_PATH) { incompressible_via_nodes.insert(restriction.turn_path.AsViaNodePath().via); @@ -186,16 +187,17 @@ void GraphCompressor::Compress(const std::unordered_set &barrier_nodes, */ const auto selectAnnotation = [&node_data_container](const AnnotationID front_annotation, - const AnnotationID back_annotation) { - // A lane has tags: u - (front) - v - (back) - w - // During contraction, we keep only one of the tags. Usually the one closer - // to the intersection is preferred. If its empty, however, we keep the - // non-empty one - if (node_data_container[back_annotation].lane_description_id == - INVALID_LANE_DESCRIPTIONID) - return front_annotation; - return back_annotation; - }; + const AnnotationID back_annotation) + { + // A lane has tags: u - (front) - v - (back) - w + // During contraction, we keep only one of the tags. Usually the one closer + // to the intersection is preferred. If its empty, however, we keep the + // non-empty one + if (node_data_container[back_annotation].lane_description_id == + INVALID_LANE_DESCRIPTIONID) + return front_annotation; + return back_annotation; + }; graph.GetEdgeData(forward_e1).annotation_data = selectAnnotation( fwd_edge_data1.annotation_data, fwd_edge_data2.annotation_data); @@ -250,10 +252,10 @@ void GraphCompressor::Compress(const std::unordered_set &barrier_nodes, roads_on_the_left); scripting_environment.ProcessTurn(extraction_turn); - auto update_direction_penalty = [&extraction_turn, weight_multiplier]( - bool signal, - EdgeDuration &duration_penalty, - EdgeWeight &weight_penalty) { + auto update_direction_penalty = + [&extraction_turn, weight_multiplier]( + bool signal, EdgeDuration &duration_penalty, EdgeWeight &weight_penalty) + { if (signal) { duration_penalty = to_alias(extraction_turn.duration * @@ -303,7 +305,8 @@ void GraphCompressor::Compress(const std::unordered_set &barrier_nodes, auto apply_e2_to_e1 = [&graph](EdgeID edge1, EdgeID edge2, EdgeWeight &weight_penalty, - EdgeDuration &duration_penalty) { + EdgeDuration &duration_penalty) + { auto &edge1_data = graph.GetEdgeData(edge1); const auto &edge2_data = graph.GetEdgeData(edge2); edge1_data.weight += edge2_data.weight; @@ -338,11 +341,15 @@ void GraphCompressor::Compress(const std::unordered_set &barrier_nodes, // update any involved turn relations turn_path_compressor.Compress(node_u, node_v, node_w); + // Update traffic signal paths containing compressed node. + traffic_signals.Compress(node_u, node_v, node_w); + // Forward and reversed compressed edge lengths need to match. // Set a dummy empty penalty weight if opposite value exists. auto set_dummy_penalty = [](EdgeWeight &weight_penalty, EdgeDuration &duration_penalty, - EdgeWeight &other_weight_penalty) { + EdgeWeight &other_weight_penalty) + { if (weight_penalty == INVALID_EDGE_WEIGHT && other_weight_penalty != INVALID_EDGE_WEIGHT) { diff --git a/src/extractor/intersection/coordinate_extractor.cpp b/src/extractor/intersection/coordinate_extractor.cpp index c84272363..fa71031aa 100644 --- a/src/extractor/intersection/coordinate_extractor.cpp +++ b/src/extractor/intersection/coordinate_extractor.cpp @@ -88,9 +88,8 @@ util::Coordinate CoordinateExtractor::ExtractRepresentativeCoordinate( std::vector coordinates) const { // check if the coordinate is equal to the interseciton coordinate - const auto not_same_as_start = [&](const util::Coordinate coordinate) { - return node_coordinates[traversed_in_reverse ? to_node : intersection_node] != coordinate; - }; + const auto not_same_as_start = [&](const util::Coordinate coordinate) + { return node_coordinates[traversed_in_reverse ? to_node : intersection_node] != coordinate; }; // this is only used for debug purposes in assertions. We don't want warnings about it (void)not_same_as_start; @@ -176,7 +175,8 @@ util::Coordinate CoordinateExtractor::ExtractRepresentativeCoordinate( * information on the very first turn angle (requires knowledge about previous road) and the * respective lane widths. */ - const bool first_coordinate_is_far_away = [&first_distance, considered_lanes]() { + const bool first_coordinate_is_far_away = [&first_distance, considered_lanes]() + { const auto required_distance = considered_lanes * ASSUMED_LANE_WIDTH + LOOKAHEAD_DISTANCE_WITHOUT_LANES; return first_distance > required_distance; @@ -256,7 +256,8 @@ util::Coordinate CoordinateExtractor::ExtractRepresentativeCoordinate( * possible negative: * http://www.openstreetmap.org/search?query=52.514503%2013.32252#map=19/52.51450/13.32252 */ - const auto straight_distance_and_index = [&]() { + const auto straight_distance_and_index = [&]() + { auto straight_distance = segment_distances[1]; std::size_t index; @@ -276,7 +277,8 @@ util::Coordinate CoordinateExtractor::ExtractRepresentativeCoordinate( const auto straight_distance = straight_distance_and_index.second; const auto straight_index = straight_distance_and_index.first; - const bool starts_of_without_turn = [&]() { + const bool starts_of_without_turn = [&]() + { return straight_distance >= considered_lanes * ASSUMED_LANE_WIDTH + LOOKAHEAD_DISTANCE_WITHOUT_LANES; }(); @@ -435,7 +437,8 @@ CoordinateExtractor::ExtractCoordinateAtLength(const double distance, auto length_cache_itr = length_cache.begin() + 1; // find the end of the segment containing the coordinate which is at least distance away const auto find_coordinate_at_distance = [distance, &accumulated_distance, &length_cache_itr]( - const util::Coordinate /*coordinate*/) mutable { + const util::Coordinate /*coordinate*/) mutable + { const auto result = (accumulated_distance + *length_cache_itr) >= distance; if (!result) { @@ -468,18 +471,19 @@ util::Coordinate CoordinateExtractor::ExtractCoordinateAtLength( // checks (via its state) for an accumulated distance const auto coordinate_at_distance = [distance, &accumulated_distance, last_coordinate = coordinates.front()]( - const util::Coordinate coordinate) mutable { - const double segment_distance = - util::coordinate_calculation::greatCircleDistance(last_coordinate, coordinate); - const auto result = (accumulated_distance + segment_distance) >= distance; - if (!result) - { - accumulated_distance += segment_distance; - last_coordinate = coordinate; - } + const util::Coordinate coordinate) mutable + { + const double segment_distance = + util::coordinate_calculation::greatCircleDistance(last_coordinate, coordinate); + const auto result = (accumulated_distance + segment_distance) >= distance; + if (!result) + { + accumulated_distance += segment_distance; + last_coordinate = coordinate; + } - return result; - }; + return result; + }; // find the begin of the segment containing the coordinate const auto coordinate_after = @@ -514,9 +518,8 @@ util::Coordinate CoordinateExtractor::GetCoordinateCloseToTurn(const NodeID from // the compressed edges contain node ids, we transfer them to coordinates accessing the // node_coordinates array const auto compressedGeometryToCoordinate = - [this](const CompressedEdgeContainer::OnewayCompressedEdge &compressed_edge) { - return node_coordinates[compressed_edge.node_id]; - }; + [this](const CompressedEdgeContainer::OnewayCompressedEdge &compressed_edge) + { return node_coordinates[compressed_edge.node_id]; }; // return the first coordinate that is reasonably far away from the start node const util::Coordinate start_coordinate = node_coordinates[start_node]; @@ -526,10 +529,11 @@ util::Coordinate CoordinateExtractor::GetCoordinateCloseToTurn(const NodeID from // away from the first entry const auto far_enough_away = [start_coordinate, compressedGeometryToCoordinate]( - const CompressedEdgeContainer::OnewayCompressedEdge &compressed_edge) { - return util::coordinate_calculation::greatCircleDistance( - compressedGeometryToCoordinate(compressed_edge), start_coordinate) > 1; - }; + const CompressedEdgeContainer::OnewayCompressedEdge &compressed_edge) + { + return util::coordinate_calculation::greatCircleDistance( + compressedGeometryToCoordinate(compressed_edge), start_coordinate) > 1; + }; // find the first coordinate, that is at least unequal to the begin of the edge if (traversed_in_reverse) @@ -614,7 +618,8 @@ CoordinateExtractor::GetMaxDeviation(std::vector::const_iterat const util::Coordinate straight_end) const { // compute the deviation of a single coordinate from a straight line - auto get_single_deviation = [&](const util::Coordinate coordinate) { + auto get_single_deviation = [&](const util::Coordinate coordinate) + { // find the projected coordinate auto coord_between = util::coordinate_calculation::projectPointOnSegment( straight_begin, straight_end, coordinate) @@ -626,10 +631,11 @@ CoordinateExtractor::GetMaxDeviation(std::vector::const_iterat // note: we don't accumulate here but rather compute the maximum. The functor passed here is not // summing up anything. - return std::accumulate( - range_begin, range_end, 0.0, [&](const double current, const util::Coordinate coordinate) { - return std::max(current, get_single_deviation(coordinate)); - }); + return std::accumulate(range_begin, + range_end, + 0.0, + [&](const double current, const util::Coordinate coordinate) + { return std::max(current, get_single_deviation(coordinate)); }); } bool CoordinateExtractor::IsCurve(const std::vector &coordinates, @@ -645,7 +651,8 @@ bool CoordinateExtractor::IsCurve(const std::vector &coordinat return true; // TODO we might have to fix this to better compensate for errors due to repeated coordinates - const bool takes_an_actual_turn = [&coordinates]() { + const bool takes_an_actual_turn = [&coordinates]() + { const auto begin_bearing = util::coordinate_calculation::bearing(coordinates[0], coordinates[1]); const auto end_bearing = util::coordinate_calculation::bearing( @@ -660,7 +667,8 @@ bool CoordinateExtractor::IsCurve(const std::vector &coordinat const auto get_deviation = [](const util::Coordinate line_start, const util::Coordinate line_end, - const util::Coordinate point) { + const util::Coordinate point) + { // find the projected coordinate auto coord_between = util::coordinate_calculation::projectPointOnSegment(line_start, line_end, point).second; @@ -669,19 +677,22 @@ bool CoordinateExtractor::IsCurve(const std::vector &coordinat }; // a curve needs to be on one side of the coordinate array - const bool all_same_side = [&]() { + const bool all_same_side = [&]() + { if (coordinates.size() <= 3) return true; const bool ccw = util::coordinate_calculation::isCCW( coordinates.front(), coordinates.back(), coordinates[1]); - return std::all_of( - coordinates.begin() + 2, coordinates.end() - 1, [&](const util::Coordinate coordinate) { - const bool compare_ccw = util::coordinate_calculation::isCCW( - coordinates.front(), coordinates.back(), coordinate); - return ccw == compare_ccw; - }); + return std::all_of(coordinates.begin() + 2, + coordinates.end() - 1, + [&](const util::Coordinate coordinate) + { + const bool compare_ccw = util::coordinate_calculation::isCCW( + coordinates.front(), coordinates.back(), coordinate); + return ccw == compare_ccw; + }); }(); if (!all_same_side) @@ -694,13 +705,16 @@ bool CoordinateExtractor::IsCurve(const std::vector &coordinat double maximum_deviation = 0; std::tie(has_up_down_deviation, maximum_deviation_index, maximum_deviation) = - [&coordinates, get_deviation]() -> std::tuple { - const auto increasing = [&](const util::Coordinate lhs, const util::Coordinate rhs) { + [&coordinates, get_deviation]() -> std::tuple + { + const auto increasing = [&](const util::Coordinate lhs, const util::Coordinate rhs) + { return get_deviation(coordinates.front(), coordinates.back(), lhs) < get_deviation(coordinates.front(), coordinates.back(), rhs); }; - const auto decreasing = [&](const util::Coordinate lhs, const util::Coordinate rhs) { + const auto decreasing = [&](const util::Coordinate lhs, const util::Coordinate rhs) + { return get_deviation(coordinates.front(), coordinates.back(), lhs) > get_deviation(coordinates.front(), coordinates.back(), rhs); }; @@ -744,7 +758,8 @@ bool CoordinateExtractor::IsCurve(const std::vector &coordinat BOOST_ASSERT(coordinates.size() >= 3); // Compute all turn angles along the road - const auto turn_angles = [coordinates]() { + const auto turn_angles = [coordinates]() + { std::vector turn_angles; turn_angles.reserve(coordinates.size() - 2); for (std::size_t index = 0; index + 2 < coordinates.size(); ++index) @@ -755,10 +770,9 @@ bool CoordinateExtractor::IsCurve(const std::vector &coordinat return turn_angles; }(); - const bool curve_is_valid = [&turn_angles, - &segment_distances, - &segment_length, - &considered_lane_width]() { + const bool curve_is_valid = + [&turn_angles, &segment_distances, &segment_length, &considered_lane_width]() + { // internal state for our lamdae bool last_was_straight = false; // a turn angle represents two segments between three coordinates. We initialize the @@ -769,8 +783,9 @@ bool CoordinateExtractor::IsCurve(const std::vector &coordinat // every call to the lamda requires a call to the distances. They need to be aligned BOOST_ASSERT(segment_distances.size() == turn_angles.size() + 2); - const auto detect_invalid_curve = [&](const double previous_angle, - const double current_angle) { + const auto detect_invalid_curve = + [&](const double previous_angle, const double current_angle) + { const auto both_actually_turn = (util::angularDeviation(previous_angle, STRAIGHT_ANGLE) > FUZZY_ANGLE_DIFFERENCE) && (util::angularDeviation(current_angle, STRAIGHT_ANGLE) > FUZZY_ANGLE_DIFFERENCE); @@ -822,7 +837,8 @@ bool CoordinateExtractor::IsDirectOffset(const std::vector &co const std::uint8_t considered_lanes) const { // check if a given length is with half a lane of the assumed lane offset - const auto IsCloseToLaneDistance = [considered_lanes](const double width) { + const auto IsCloseToLaneDistance = [considered_lanes](const double width) + { // a road usually is connected to the middle of the lanes. So the lane-offset has to // consider half to road const auto lane_offset = 0.5 * considered_lanes * ASSUMED_LANE_WIDTH; @@ -856,7 +872,8 @@ bool CoordinateExtractor::IsDirectOffset(const std::vector &co const auto segment_offset_past_thirty_meters = std::find_if(segment_distances.begin() + offset_index, segment_distances.end(), - [accumulated_distance = 0.](const auto value) mutable { + [accumulated_distance = 0.](const auto value) mutable + { accumulated_distance += value; return value >= 30; }); @@ -887,19 +904,22 @@ CoordinateExtractor::PrepareLengthCache(const std::vector &coo segment_distances.push_back(0); // sentinel // NOLINTNEXTLINE(bugprone-unused-return-value) - std::find_if(std::next(std::begin(coordinates)), - std::end(coordinates), - [last_coordinate = coordinates.front(), - limit, - &segment_distances, - accumulated_distance = 0.](const util::Coordinate current_coordinate) mutable { - const auto distance = util::coordinate_calculation::greatCircleDistance( - last_coordinate, current_coordinate); - accumulated_distance += distance; - last_coordinate = current_coordinate; - segment_distances.push_back(distance); - return accumulated_distance >= limit; - }); + // We're only interested in the side effect of the lambda, not the return value + [[maybe_unused]] auto _ = + std::find_if(std::next(std::begin(coordinates)), + std::end(coordinates), + [last_coordinate = coordinates.front(), + limit, + &segment_distances, + accumulated_distance = 0.](const util::Coordinate current_coordinate) mutable + { + const auto distance = util::coordinate_calculation::greatCircleDistance( + last_coordinate, current_coordinate); + accumulated_distance += distance; + last_coordinate = current_coordinate; + segment_distances.push_back(distance); + return accumulated_distance >= limit; + }); return segment_distances; } @@ -914,19 +934,18 @@ CoordinateExtractor::TrimCoordinatesToLength(std::vector coord double distance_to_current_coordinate = 0; std::size_t coordinate_index = 0; - const auto compute_length = - [&coordinate_index, &distance_to_current_coordinate, &coordinates]() { - const auto new_distance = - distance_to_current_coordinate + - util::coordinate_calculation::greatCircleDistance(coordinates[coordinate_index - 1], - coordinates[coordinate_index]); - return new_distance; - }; - - const auto read_length_from_cache = [&length_cache, &coordinate_index]() { - return length_cache[coordinate_index]; + const auto compute_length = [&coordinate_index, &distance_to_current_coordinate, &coordinates]() + { + const auto new_distance = + distance_to_current_coordinate + + util::coordinate_calculation::greatCircleDistance(coordinates[coordinate_index - 1], + coordinates[coordinate_index]); + return new_distance; }; + const auto read_length_from_cache = [&length_cache, &coordinate_index]() + { return length_cache[coordinate_index]; }; + bool use_cache = !length_cache.empty(); if (use_cache && length_cache.back() < desired_length && coordinates.size() >= 2) @@ -1042,8 +1061,9 @@ CoordinateExtractor::SampleCoordinates(const std::vector &coor double carry_length = 0., total_length = 0.; // interpolate coordinates as long as we are not past the desired length - const auto add_samples_until_length_limit = [&](const util::Coordinate previous_coordinate, - const util::Coordinate current_coordinate) { + const auto add_samples_until_length_limit = + [&](const util::Coordinate previous_coordinate, const util::Coordinate current_coordinate) + { // pretend to have found an element and stop the sampling if (total_length > max_sample_length) return true; @@ -1090,7 +1110,8 @@ CoordinateExtractor::SampleCoordinates(const std::vector &coor }; // misuse of adjacent_find. Loop over coordinates, until a total sample length is reached - std::adjacent_find(coordinates.begin(), coordinates.end(), add_samples_until_length_limit); + [[maybe_unused]] auto _ = + std::adjacent_find(coordinates.begin(), coordinates.end(), add_samples_until_length_limit); return sampled_coordinates; } diff --git a/src/extractor/intersection/intersection_analysis.cpp b/src/extractor/intersection/intersection_analysis.cpp index e73b90d1d..98c8ef8a7 100644 --- a/src/extractor/intersection/intersection_analysis.cpp +++ b/src/extractor/intersection/intersection_analysis.cpp @@ -67,9 +67,8 @@ getEdgeCoordinates(const extractor::CompressedEdgeContainer &compressed_geometri std::transform(geometry.begin(), geometry.end(), std::back_inserter(result), - [&node_coordinates](const auto &compressed_edge) { - return node_coordinates[compressed_edge.node_id]; - }); + [&node_coordinates](const auto &compressed_edge) + { return node_coordinates[compressed_edge.node_id]; }); // filter duplicated coordinates result.erase(std::unique(result.begin(), result.end()), result.end()); @@ -95,7 +94,8 @@ double findClosestOppositeBearing(const IntersectionEdgeGeometries &edge_geometr const auto min = std::min_element( edge_geometries.begin(), edge_geometries.end(), - [bearing = util::bearing::reverse(bearing)](const auto &lhs, const auto &rhs) { + [bearing = util::bearing::reverse(bearing)](const auto &lhs, const auto &rhs) + { return util::angularDeviation(lhs.perceived_bearing, bearing) < util::angularDeviation(rhs.perceived_bearing, bearing); }); @@ -128,7 +128,7 @@ std::pair findMergedBearing(const util::NodeBasedDynamicGraph &gra { // In some intersections, turning roads can introduce artificial turns if we merge here. // Consider a scenario like: - //  + //   // a . g - f // | . // | . @@ -136,7 +136,7 @@ std::pair findMergedBearing(const util::NodeBasedDynamicGraph &gra // d-b--------e // | // c - //  + //   // Merging `bgf` and `be` would introduce an angle, even though d-b-e is perfectly straight // We don't change the angle, if such an opposite road exists return {false, entry.perceived_bearing}; @@ -239,9 +239,10 @@ getIntersectionOutgoingGeometries(const util::NodeBasedDynamicGraph &graph, } // Sort edges in the clockwise bearings order - std::sort(edge_geometries.begin(), edge_geometries.end(), [](const auto &lhs, const auto &rhs) { - return lhs.perceived_bearing < rhs.perceived_bearing; - }); + std::sort(edge_geometries.begin(), + edge_geometries.end(), + [](const auto &lhs, const auto &rhs) + { return lhs.perceived_bearing < rhs.perceived_bearing; }); return edge_geometries; } } // namespace @@ -317,9 +318,8 @@ getIntersectionGeometries(const util::NodeBasedDynamicGraph &graph, neighbor_geometries.begin(), std::find_if(neighbor_geometries.begin(), neighbor_geometries.end(), - [&graph, &intersection_node](const auto &road) { - return graph.GetTarget(road.eid) == intersection_node; - })); + [&graph, &intersection_node](const auto &road) + { return graph.GetTarget(road.eid) == intersection_node; })); BOOST_ASSERT(static_cast(neighbor_curr) != neighbor_geometries.size()); const auto neighbor_prev = (neighbor_curr + neighbor_edges - 1) % neighbor_edges; const auto neighbor_next = (neighbor_curr + 1) % neighbor_edges; @@ -403,10 +403,11 @@ getIntersectionGeometries(const util::NodeBasedDynamicGraph &graph, inline auto findEdge(const IntersectionEdgeGeometries &geometries, const EdgeID &edge) { - const auto it = std::lower_bound( - geometries.begin(), geometries.end(), edge, [](const auto &geometry, const auto edge) { - return geometry.eid < edge; - }); + const auto it = + std::lower_bound(geometries.begin(), + geometries.end(), + edge, + [](const auto &geometry, const auto edge) { return geometry.eid < edge; }); BOOST_ASSERT(it != geometries.end() && it->eid == edge); return it; } @@ -425,9 +426,10 @@ template bool isTurnRestricted(const RestrictionsRange &restrictions, const NodeID to) { // Check if any of the restrictions would prevent a turn to 'to' - return std::any_of(restrictions.begin(), restrictions.end(), [&to](const auto &restriction) { - return restriction->IsTurnRestricted(to); - }); + return std::any_of(restrictions.begin(), + restrictions.end(), + [&to](const auto &restriction) + { return restriction->IsTurnRestricted(to); }); } bool isTurnAllowed(const util::NodeBasedDynamicGraph &graph, @@ -614,9 +616,8 @@ IntersectionView convertToIntersectionView(const util::NodeBasedDynamicGraph &gr IntersectionViewData uturn{{SPECIAL_EDGEID, 0., 0., 0.}, false, 0.}; std::size_t allowed_uturns_number = 0; - const auto is_uturn = [](const auto angle) { - return std::fabs(angle) < std::numeric_limits::epsilon(); - }; + const auto is_uturn = [](const auto angle) + { return std::fabs(angle) < std::numeric_limits::epsilon(); }; for (const auto &outgoing_edge : outgoing_edges) { @@ -665,9 +666,9 @@ IntersectionView convertToIntersectionView(const util::NodeBasedDynamicGraph &gr // 2) use turn angle if the smallest arc between turn and initial angles passes 0° const auto use_turn_angle = (turn_angle > 270 && initial_angle < 90) || (turn_angle < 90 && initial_angle > 270); - const auto adjusted_angle = is_uturn(initial_angle) - ? (turn_angle > 180. ? 360. : 0.) - : use_turn_angle ? turn_angle : initial_angle; + const auto adjusted_angle = is_uturn(initial_angle) ? (turn_angle > 180. ? 360. : 0.) + : use_turn_angle ? turn_angle + : initial_angle; pre_intersection_view.push_back({road, adjusted_angle}); } } @@ -680,12 +681,11 @@ IntersectionView convertToIntersectionView(const util::NodeBasedDynamicGraph &gr } // Order roads in counter-clockwise order starting from the U-turn edge in the OSM order - std::stable_sort(pre_intersection_view.begin(), - pre_intersection_view.end(), - [](const auto &lhs, const auto &rhs) { - return std::tie(lhs.second, lhs.first.angle) < - std::tie(rhs.second, rhs.first.angle); - }); + std::stable_sort( + pre_intersection_view.begin(), + pre_intersection_view.end(), + [](const auto &lhs, const auto &rhs) + { return std::tie(lhs.second, lhs.first.angle) < std::tie(rhs.second, rhs.first.angle); }); // Adjust perceived bearings to keep the initial OSM order with respect to the first edge for (auto curr = pre_intersection_view.begin(), next = std::next(curr); @@ -706,9 +706,8 @@ IntersectionView convertToIntersectionView(const util::NodeBasedDynamicGraph &gr auto no_uturn = std::none_of(pre_intersection_view.begin(), pre_intersection_view.end(), - [&is_uturn](const IntersectionViewDataWithAngle &road) { - return is_uturn(road.first.angle); - }); + [&is_uturn](const IntersectionViewDataWithAngle &road) + { return is_uturn(road.first.angle); }); // After all of this, if we now don't have a u-turn, let's add one to the intersection. // This is a hack to fix the triggered assertion ( see: // https://github.com/Project-OSRM/osrm-backend/issues/6218 ). Ideally we would fix this more diff --git a/src/extractor/intersection/mergable_road_detector.cpp b/src/extractor/intersection/mergable_road_detector.cpp index eba2319df..449a15e9e 100644 --- a/src/extractor/intersection/mergable_road_detector.cpp +++ b/src/extractor/intersection/mergable_road_detector.cpp @@ -27,7 +27,8 @@ inline auto makeCheckRoadForName(const NameID name_id, const SuffixTable &suffix_table) { return [name_id, &node_based_graph, &node_data_container, &name_table, &suffix_table]( - const MergableRoadDetector::MergableRoadData &road) { + const MergableRoadDetector::MergableRoadData &road) + { // since we filter here, we don't want any other name than the one we are looking for const auto road_name_id = node_data_container @@ -89,9 +90,8 @@ bool MergableRoadDetector::CanMergeRoad(const NodeID intersection_node, * / -- \ * a ---- b - - / */ - const auto road_target = [this](const MergableRoadData &road) { - return node_based_graph.GetTarget(road.eid); - }; + const auto road_target = [this](const MergableRoadData &road) + { return node_based_graph.GetTarget(road.eid); }; // TODO might have to skip over trivial intersections if (road_target(lhs) == intersection_node || road_target(rhs) == intersection_node) @@ -262,7 +262,8 @@ bool MergableRoadDetector::IsNarrowTriangle(const NodeID intersection_node, if (angularDeviation(connector_turn->angle, ORTHOGONAL_ANGLE) > NARROW_TURN_ANGLE) return false; - const auto num_lanes = [this](const MergableRoadData &road) { + const auto num_lanes = [this](const MergableRoadData &road) + { return std::max( node_based_graph.GetEdgeData(road.eid).flags.road_classification.GetNumberOfLanes(), 1); }; @@ -308,7 +309,8 @@ bool MergableRoadDetector::IsCircularShape(const NodeID intersection_node, node_restriction_map, barrier_nodes, turn_lanes_data); - const auto getCoordinatesAlongWay = [&](const EdgeID edge_id, const double max_length) { + const auto getCoordinatesAlongWay = [&](const EdgeID edge_id, const double max_length) + { LengthLimitedCoordinateAccumulator accumulator(coordinate_extractor, max_length); SelectStraightmostRoadByNameAndOnlyChoice selector( node_data_container.GetAnnotation(node_based_graph.GetEdgeData(edge_id).annotation_data) @@ -380,7 +382,8 @@ bool MergableRoadDetector::HaveSameDirection(const NodeID intersection_node, node_restriction_map, barrier_nodes, turn_lanes_data); - const auto getCoordinatesAlongWay = [&](const EdgeID edge_id, const double max_length) { + const auto getCoordinatesAlongWay = [&](const EdgeID edge_id, const double max_length) + { LengthLimitedCoordinateAccumulator accumulator(coordinate_extractor, max_length); SelectStraightmostRoadByNameAndOnlyChoice selector( node_data_container.GetAnnotation(node_based_graph.GetEdgeData(edge_id).annotation_data) @@ -424,7 +427,8 @@ bool MergableRoadDetector::HaveSameDirection(const NodeID intersection_node, /* extract the number of lanes for a road * restricts a vector to the last two thirds of the length */ - const auto prune = [](auto &data_vector) { + const auto prune = [](auto &data_vector) + { BOOST_ASSERT(data_vector.size() >= 3); // erase the first third of the vector data_vector.erase(data_vector.begin(), data_vector.begin() + data_vector.size() / 3); @@ -493,7 +497,8 @@ bool MergableRoadDetector::IsTrafficIsland(const NodeID intersection_node, return false; // check if all entries at the destination or at the source are the same - const auto all_same_name_and_degree_three = [this](const NodeID nid) { + const auto all_same_name_and_degree_three = [this](const NodeID nid) + { // check if the intersection found has degree three if (node_based_graph.GetOutDegree(nid) != 3) return false; @@ -505,7 +510,8 @@ bool MergableRoadDetector::IsTrafficIsland(const NodeID intersection_node, .GetAnnotation(node_based_graph.GetEdgeData(range.front()).annotation_data) .name_id; - const auto has_required_name = [this, required_name_id](const auto edge_id) { + const auto has_required_name = [this, required_name_id](const auto edge_id) + { const auto road_name_id = node_data_container .GetAnnotation(node_based_graph.GetEdgeData(edge_id).annotation_data) @@ -562,7 +568,8 @@ bool MergableRoadDetector::IsLinkRoad(const NodeID intersection_node, barrier_nodes, turn_lanes_data, next_intersection_parameters); - const auto extract_name_id = [this](const MergableRoadData &road) { + const auto extract_name_id = [this](const MergableRoadData &road) + { return node_data_container .GetAnnotation(node_based_graph.GetEdgeData(road.eid).annotation_data) .name_id; diff --git a/src/extractor/intersection/node_based_graph_walker.cpp b/src/extractor/intersection/node_based_graph_walker.cpp index 46208fb2b..c1ee0fc64 100644 --- a/src/extractor/intersection/node_based_graph_walker.cpp +++ b/src/extractor/intersection/node_based_graph_walker.cpp @@ -74,10 +74,12 @@ std::optional SelectRoadByNameOnlyChoiceAndStraightness::operator()( const EdgeBasedNodeDataContainer &node_data_container) const { BOOST_ASSERT(!intersection.empty()); - const auto comparator = [&](const IntersectionViewData &lhs, const IntersectionViewData &rhs) { + const auto comparator = [&](const IntersectionViewData &lhs, const IntersectionViewData &rhs) + { // the score of an elemnt results in an ranking preferring valid entries, if required over // invalid requested name_ids over non-requested narrow deviations over non-narrow - const auto score = [&](const IntersectionViewData &road) { + const auto score = [&](const IntersectionViewData &road) + { double result_score = 0; // since angular deviation is limited by 0-180, we add 360 for invalid if (requires_entry && !road.entry_allowed) @@ -127,10 +129,12 @@ std::optional SelectStraightmostRoadByNameAndOnlyChoice::operator()( if (intersection.size() == 1) return {}; - const auto comparator = [&](const IntersectionViewData &lhs, const IntersectionViewData &rhs) { + const auto comparator = [&](const IntersectionViewData &lhs, const IntersectionViewData &rhs) + { // the score of an elemnt results in an ranking preferring valid entries, if required over // invalid requested name_ids over non-requested narrow deviations over non-narrow - const auto score = [&](const IntersectionViewData &road) { + const auto score = [&](const IntersectionViewData &road) + { double result_score = 0; // since angular deviation is limited by 0-180, we add 360 for invalid if (requires_entry && !road.entry_allowed) @@ -149,8 +153,11 @@ std::optional SelectStraightmostRoadByNameAndOnlyChoice::operator()( return score(lhs) < score(rhs); }; - const auto count_desired_name = - std::count_if(std::begin(intersection), std::end(intersection), [&](const auto &road) { + const auto count_desired_name = std::count_if( + std::begin(intersection), + std::end(intersection), + [&](const auto &road) + { return node_data_container .GetAnnotation(node_based_graph.GetEdgeData(road.eid).annotation_data) .name_id == desired_name_id; diff --git a/src/extractor/location_dependent_data.cpp b/src/extractor/location_dependent_data.cpp index fe80e0b5f..475f15f20 100644 --- a/src/extractor/location_dependent_data.cpp +++ b/src/extractor/location_dependent_data.cpp @@ -65,7 +65,8 @@ void LocationDependentData::loadLocationDependentData( const auto &features_array = geojson["features"].GetArray(); - auto convert_value = [](const auto &property) -> property_t { + auto convert_value = [](const auto &property) -> property_t + { if (property.IsString()) return std::string(property.GetString()); if (property.IsNumber()) @@ -75,7 +76,8 @@ void LocationDependentData::loadLocationDependentData( return {}; }; - auto collect_properties = [this, &convert_value](const auto &object) -> std::size_t { + auto collect_properties = [this, &convert_value](const auto &object) -> std::size_t + { properties_t object_properties; for (const auto &property : object) { @@ -86,18 +88,21 @@ void LocationDependentData::loadLocationDependentData( return index; }; - auto index_polygon = [this, &bounding_boxes](const auto &rings, auto properties_index) { + auto index_polygon = [this, &bounding_boxes](const auto &rings, auto properties_index) + { // At least an outer ring in polygon https://tools.ietf.org/html/rfc7946#section-3.1.6 BOOST_ASSERT(rings.Size() > 0); - auto to_point = [](const auto &json) -> point_t { + auto to_point = [](const auto &json) -> point_t + { util::validateCoordinate(json); const auto &coords = json.GetArray(); return {coords[0].GetDouble(), coords[1].GetDouble()}; }; std::vector segments; - auto append_ring_segments = [&segments, &to_point](const auto &coordinates_array) -> box_t { + auto append_ring_segments = [&segments, &to_point](const auto &coordinates_array) -> box_t + { using coord_t = boost::geometry::traits::coordinate_type::type; auto x_min = std::numeric_limits::max(); auto y_min = std::numeric_limits::max(); @@ -208,68 +213,72 @@ LocationDependentData::FindByKey(const std::vector &property_indexe std::vector LocationDependentData::GetPropertyIndexes(const point_t &point) const { std::vector result; - auto inserter = [this, &result](const rtree_t::value_type &rtree_entry) { + auto inserter = [this, &result](const rtree_t::value_type &rtree_entry) + { const auto properties_index = polygons[rtree_entry.second].second; result.push_back(properties_index); }; // Search the R-tree and collect a Lua table of tags that correspond to the location - rtree.query(boost::geometry::index::intersects(point) && - boost::geometry::index::satisfies([this, &point](const rtree_t::value_type &v) { - // Simple point-in-polygon algorithm adapted from - // https://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html + rtree.query( + boost::geometry::index::intersects(point) && + boost::geometry::index::satisfies( + [this, &point](const rtree_t::value_type &v) + { + // Simple point-in-polygon algorithm adapted from + // https://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html - const auto &envelop = v.first; - const auto &bands = polygons[v.second].first; + const auto &envelop = v.first; + const auto &bands = polygons[v.second].first; - const auto y_min = envelop.min_corner().y(); - const auto y_max = envelop.max_corner().y(); - const auto dy = (y_max - y_min) / bands.size(); + const auto y_min = envelop.min_corner().y(); + const auto y_max = envelop.max_corner().y(); + const auto dy = (y_max - y_min) / bands.size(); - std::size_t band = (point.y() - y_min) / dy; - if (band >= bands.size()) - { - band = bands.size() - 1; + std::size_t band = (point.y() - y_min) / dy; + if (band >= bands.size()) + { + band = bands.size() - 1; + } + + bool inside = false; + + for (const auto &segment : bands[band]) + { + const auto point_x = point.x(), point_y = point.y(); + const auto from_x = segment.first.x(), from_y = segment.first.y(); + const auto to_x = segment.second.x(), to_y = segment.second.y(); + + if (to_y == from_y) + { // handle horizontal segments: check if on boundary or skip + if ((to_y == point_y) && + (from_x == point_x || (to_x > point_x) != (from_x > point_x))) + return true; + continue; } - bool inside = false; - - for (const auto &segment : bands[band]) + if ((to_y > point_y) != (from_y > point_y)) { - const auto point_x = point.x(), point_y = point.y(); - const auto from_x = segment.first.x(), from_y = segment.first.y(); - const auto to_x = segment.second.x(), to_y = segment.second.y(); + const auto ax = to_x - from_x; + const auto ay = to_y - from_y; + const auto tx = point_x - from_x; + const auto ty = point_y - from_y; - if (to_y == from_y) - { // handle horizontal segments: check if on boundary or skip - if ((to_y == point_y) && - (from_x == point_x || (to_x > point_x) != (from_x > point_x))) - return true; - continue; - } + const auto cross_product = tx * ay - ax * ty; - if ((to_y > point_y) != (from_y > point_y)) + if (cross_product == 0) + return true; + + if ((ay > 0) == (cross_product > 0)) { - const auto ax = to_x - from_x; - const auto ay = to_y - from_y; - const auto tx = point_x - from_x; - const auto ty = point_y - from_y; - - const auto cross_product = tx * ay - ax * ty; - - if (cross_product == 0) - return true; - - if ((ay > 0) == (cross_product > 0)) - { - inside = !inside; - } + inside = !inside; } } + } - return inside; - }), - boost::make_function_output_iterator(std::ref(inserter))); + return inside; + }), + boost::make_function_output_iterator(std::ref(inserter))); return result; } diff --git a/src/extractor/node_based_graph_factory.cpp b/src/extractor/node_based_graph_factory.cpp index 9819a9778..9fb50149d 100644 --- a/src/extractor/node_based_graph_factory.cpp +++ b/src/extractor/node_based_graph_factory.cpp @@ -17,7 +17,7 @@ NodeBasedGraphFactory::NodeBasedGraphFactory( ScriptingEnvironment &scripting_environment, std::vector &turn_restrictions, std::vector &maneuver_overrides, - const TrafficSignals &traffic_signals, + TrafficSignals &traffic_signals, std::unordered_set &&barriers, std::vector &&coordinates, extractor::PackedOSMIDs &&osm_node_ids, @@ -46,33 +46,37 @@ void NodeBasedGraphFactory::BuildCompressedOutputGraph(const std::vector &turn_restrictions, std::vector &maneuver_overrides, - const TrafficSignals &traffic_signals) + TrafficSignals &traffic_signals) { GraphCompressor graph_compressor; graph_compressor.Compress(barriers, @@ -208,13 +212,15 @@ void NodeBasedGraphFactory::CompressAnnotationData() } // remove unreferenced entries, shifting other entries to the front - const auto new_end = - std::remove_if(annotation_data.begin(), annotation_data.end(), [&](auto const &data) { - // both elements are considered equal (to remove the second - // one) if the annotation mapping of the second one is - // invalid - return data.name_id == INVALID_NAMEID; - }); + const auto new_end = std::remove_if(annotation_data.begin(), + annotation_data.end(), + [&](auto const &data) + { + // both elements are considered equal (to remove the + // second one) if the annotation mapping of the second + // one is invalid + return data.name_id == INVALID_NAMEID; + }); const auto old_size = annotation_data.size(); // remove all remaining elements diff --git a/src/extractor/restriction_graph.cpp b/src/extractor/restriction_graph.cpp index 041a0d9ad..6b931f78c 100644 --- a/src/extractor/restriction_graph.cpp +++ b/src/extractor/restriction_graph.cpp @@ -123,9 +123,10 @@ struct transferBuilder for (const auto &suffix_node : suffix_nodes) { const auto &edges = rg.GetEdges(suffix_node); - const auto edge_it = std::find_if(edges.begin(), edges.end(), [&to](const auto &edge) { - return edge.node_based_to == to && !edge.is_transfer; - }); + const auto edge_it = std::find_if( + edges.begin(), + edges.end(), + [&to](const auto &edge) { return edge.node_based_to == to && !edge.is_transfer; }); if (edge_it != edges.end()) { *(new_suffix_it++) = edge_it->target; @@ -154,18 +155,22 @@ struct transferBuilder // the transfer const auto &restrictions = rg.GetRestrictions(cur_node); const auto is_restricted = - std::any_of(restrictions.begin(), restrictions.end(), [&](const auto &restriction) { - return restriction->IsTurnRestricted(suffix_edge.node_based_to) && - restriction->IsUnconditional(); - }); + std::any_of(restrictions.begin(), + restrictions.end(), + [&](const auto &restriction) + { + return restriction->IsTurnRestricted(suffix_edge.node_based_to) && + restriction->IsUnconditional(); + }); if (is_restricted) continue; const auto &edges = rg.GetEdges(cur_node); // Check that the suffix edge is not a next edge along the current path. - const auto can_transfer = std::none_of(edges.begin(), edges.end(), [&](auto &edge) { - return edge.node_based_to == suffix_edge.node_based_to; - }); + const auto can_transfer = std::none_of( + edges.begin(), + edges.end(), + [&](auto &edge) { return edge.node_based_to == suffix_edge.node_based_to; }); if (can_transfer) { insertEdge(rg, @@ -186,9 +191,9 @@ struct transferBuilder this->next_suffixes(from, to); - std::for_each(suffix_nodes.begin(), suffix_nodes.end(), [&](const auto &suffix_node) { - this->add_suffix_transfer(suffix_node); - }); + std::for_each(suffix_nodes.begin(), + suffix_nodes.end(), + [&](const auto &suffix_node) { this->add_suffix_transfer(suffix_node); }); for (const auto &suffix_node : suffix_nodes) { @@ -207,7 +212,8 @@ struct transferBuilder template void buildGraph(RestrictionGraph &rg, const std::vector &restrictions) { - const auto run_builder = [&](const auto &restriction) { + const auto run_builder = [&](const auto &restriction) + { builder_type builder(rg); builder.start(restriction.turn_path.From(), restriction.turn_path.FirstVia()); @@ -248,9 +254,9 @@ RestrictionGraph constructRestrictionGraph(const std::vector &t // Start renumbering const auto permutation = util::orderingToPermutation(ordering); util::inplacePermutation(rg.nodes.begin(), rg.nodes.end(), permutation); - std::for_each(rg.edges.begin(), rg.edges.end(), [&](auto &edge) { - edge.target = permutation[edge.target]; - }); + std::for_each(rg.edges.begin(), + rg.edges.end(), + [&](auto &edge) { edge.target = permutation[edge.target]; }); rg.num_via_nodes = std::count(is_via_node.begin(), is_via_node.end(), true); for (auto &entry : rg.via_edge_to_node) { diff --git a/src/extractor/scripting_environment_lua.cpp b/src/extractor/scripting_environment_lua.cpp index 9576cc18b..f73c16eed 100644 --- a/src/extractor/scripting_environment_lua.cpp +++ b/src/extractor/scripting_environment_lua.cpp @@ -245,7 +245,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) "valid", &osmium::Location::valid); - auto get_location_tag = [](auto &context, const auto &location, const char *key) { + auto get_location_tag = [](auto &context, const auto &location, const char *key) + { if (context.location_dependent_data.empty()) return sol::object(context.state); @@ -272,7 +273,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) "get_nodes", [](const osmium::Way &way) { return sol::as_table(&way.nodes()); }, "get_location_tag", - [&context, &get_location_tag](const osmium::Way &way, const char *key) { + [&context, &get_location_tag](const osmium::Way &way, const char *key) + { // HEURISTIC: use a single node (last) of the way to localize the way // For more complicated scenarios a proper merging of multiple tags // at one or many locations must be provided @@ -292,9 +294,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) "version", &osmium::Node::version, "get_location_tag", - [&context, &get_location_tag](const osmium::Node &node, const char *key) { - return get_location_tag(context, node.location(), key); - }); + [&context, &get_location_tag](const osmium::Node &node, const char *key) + { return get_location_tag(context, node.location(), key); }); context.state.new_enum("traffic_lights", "none", @@ -310,7 +311,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) "ResultNode", "traffic_lights", sol::property([](const ExtractionNode &node) { return node.traffic_lights; }, - [](ExtractionNode &node, const sol::object &obj) { + [](ExtractionNode &node, const sol::object &obj) + { if (obj.is()) { // The old approach of assigning a boolean traffic light @@ -361,7 +363,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) sol::property(&ExtractionWay::GetName, &ExtractionWay::SetName), "ref", // backward compatibility sol::property(&ExtractionWay::GetForwardRef, - [](ExtractionWay &way, const char *ref) { + [](ExtractionWay &way, const char *ref) + { way.SetForwardRef(ref); way.SetBackwardRef(ref); }), @@ -420,7 +423,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) sol::property([](const ExtractionWay &way) { return way.access_turn_classification; }, [](ExtractionWay &way, int flag) { way.access_turn_classification = flag; })); - auto getTypedRefBySol = [](const sol::object &obj) -> ExtractionRelation::OsmIDTyped { + auto getTypedRefBySol = [](const sol::object &obj) -> ExtractionRelation::OsmIDTyped + { if (obj.is()) { osmium::Way *way = obj.as(); @@ -456,20 +460,46 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) "get_value_by_key", [](ExtractionRelation &rel, const char *key) -> const char * { return rel.GetAttr(key); }, "get_role", - [&getTypedRefBySol](ExtractionRelation &rel, const sol::object &obj) -> const char * { - return rel.GetRole(getTypedRefBySol(obj)); - }); + [&getTypedRefBySol](ExtractionRelation &rel, const sol::object &obj) -> const char * + { return rel.GetRole(getTypedRefBySol(obj)); }); context.state.new_usertype( "ExtractionRelationContainer", "get_relations", [&getTypedRefBySol](ExtractionRelationContainer &cont, const sol::object &obj) - -> const ExtractionRelationContainer::RelationIDList & { - return cont.GetRelations(getTypedRefBySol(obj)); - }, + -> const ExtractionRelationContainer::RelationIDList & + { return cont.GetRelations(getTypedRefBySol(obj)); }, "relation", - [](ExtractionRelationContainer &cont, const ExtractionRelation::OsmIDTyped &rel_id) - -> const ExtractionRelation & { return cont.GetRelationData(rel_id); }); + [](ExtractionRelationContainer &cont, + const ExtractionRelation::OsmIDTyped &rel_id) -> const ExtractionRelation & + { return cont.GetRelationData(rel_id); }); + + context.state.new_usertype( + "NodeBasedEdgeClassification", + "forward", + // can't just do &NodeBasedEdgeClassification::forward with bitfields + sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.forward; }), + "backward", + sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.backward; }), + "is_split", + sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.is_split; }), + "roundabout", + sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.roundabout; }), + "circular", + sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.circular; }), + "startpoint", + sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.startpoint; }), + "restricted", + sol::property([](NodeBasedEdgeClassification &c) -> bool { return c.restricted; }), + "road_classification", + sol::property([](NodeBasedEdgeClassification &c) -> RoadClassification + { return c.road_classification; }), + "highway_turn_classification", + sol::property([](NodeBasedEdgeClassification &c) -> uint8_t + { return c.highway_turn_classification; }), + "access_turn_classification", + sol::property([](NodeBasedEdgeClassification &c) -> uint8_t + { return c.access_turn_classification; })); context.state.new_usertype("ExtractionSegment", "source", @@ -481,14 +511,18 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) "weight", &ExtractionSegment::weight, "duration", - &ExtractionSegment::duration); + &ExtractionSegment::duration, + "flags", + &ExtractionSegment::flags); // Keep in mind .location is available only if .pbf is preprocessed to set the location with the // ref using osmium command "osmium add-locations-to-ways" - context.state.new_usertype( - "NodeRef", "id", &osmium::NodeRef::ref, "location", [](const osmium::NodeRef &nref) { - return nref.location(); - }); + context.state.new_usertype("NodeRef", + "id", + &osmium::NodeRef::ref, + "location", + [](const osmium::NodeRef &nref) + { return nref.location(); }); context.state.new_usertype("EdgeSource", "source_coordinate", @@ -544,7 +578,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) util::Log() << "Using profile api version " << context.api_version; // version-dependent parts of the api - auto initV2Context = [&]() { + auto initV2Context = [&]() + { // clear global not used in v2 context.state["properties"] = sol::nullopt; @@ -635,26 +670,31 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context) } }; - auto initialize_V3_extraction_turn = [&]() { + auto initialize_V3_extraction_turn = [&]() + { context.state.new_usertype( "ExtractionTurn", "angle", &ExtractionTurn::angle, "turn_type", - sol::property([](const ExtractionTurn &turn) { - if (turn.number_of_roads > 2 || turn.source_mode != turn.target_mode || - turn.is_u_turn) - return osrm::guidance::TurnType::Turn; - else - return osrm::guidance::TurnType::NoTurn; - }), + sol::property( + [](const ExtractionTurn &turn) + { + if (turn.number_of_roads > 2 || turn.source_mode != turn.target_mode || + turn.is_u_turn) + return osrm::guidance::TurnType::Turn; + else + return osrm::guidance::TurnType::NoTurn; + }), "direction_modifier", - sol::property([](const ExtractionTurn &turn) { - if (turn.is_u_turn) - return osrm::guidance::DirectionModifier::UTurn; - else - return osrm::guidance::DirectionModifier::Straight; - }), + sol::property( + [](const ExtractionTurn &turn) + { + if (turn.is_u_turn) + return osrm::guidance::DirectionModifier::UTurn; + else + return osrm::guidance::DirectionModifier::Straight; + }), "has_traffic_light", &ExtractionTurn::has_traffic_light, "weight", diff --git a/src/extractor/turn_path_compressor.cpp b/src/extractor/turn_path_compressor.cpp index f46b07718..223950ab7 100644 --- a/src/extractor/turn_path_compressor.cpp +++ b/src/extractor/turn_path_compressor.cpp @@ -12,7 +12,8 @@ TurnPathCompressor::TurnPathCompressor(std::vector &restriction std::vector &maneuver_overrides) { // Track all turn paths by their respective start/via/end nodes. - auto index = [&](auto &element) { + auto index = [&](auto &element) + { starts.insert({element.From(), &element}); ends.insert({element.To(), &element}); if (element.Type() == TurnPathType::VIA_WAY_TURN_PATH) @@ -44,7 +45,8 @@ void TurnPathCompressor::Compress(const NodeID from, const NodeID via, const Nod std::back_inserter(start_ptrs), [](const auto pair) { return pair.second; }); - const auto update_start = [&](auto ptr) { + const auto update_start = [&](auto ptr) + { if (ptr->Type() == TurnPathType::VIA_NODE_TURN_PATH) { @@ -97,7 +99,8 @@ void TurnPathCompressor::Compress(const NodeID from, const NodeID via, const Nod std::back_inserter(end_ptrs), [](const auto pair) { return pair.second; }); - const auto update_end = [&](auto ptr) { + const auto update_end = [&](auto ptr) + { if (ptr->Type() == TurnPathType::VIA_NODE_TURN_PATH) { auto &node_ptr = ptr->AsViaNodePath(); @@ -145,7 +148,8 @@ void TurnPathCompressor::Compress(const NodeID from, const NodeID via, const Nod // remove compressed node from all via paths auto all_vias_range = vias.equal_range(via); - const auto update_via = [&](auto restriction_pair) { + const auto update_via = [&](auto restriction_pair) + { BOOST_ASSERT(restriction_pair.second->Type() == TurnPathType::VIA_WAY_TURN_PATH); auto &way_ptr = restriction_pair.second->AsViaWayPath(); BOOST_ASSERT(std::find(way_ptr.via.begin(), way_ptr.via.end(), via) != way_ptr.via.end()); diff --git a/src/extractor/turn_path_filter.cpp b/src/extractor/turn_path_filter.cpp index 190fec514..6285656de 100644 --- a/src/extractor/turn_path_filter.cpp +++ b/src/extractor/turn_path_filter.cpp @@ -18,7 +18,8 @@ std::vector removeInvalidTurnPaths(std::vector turn_relations, log << "Removing invalid " << T::Name() << "s..."; TIMER_START(remove_invalid_turn_paths); - const auto is_valid_edge = [&node_based_graph](const auto from, const auto to) { + const auto is_valid_edge = [&node_based_graph](const auto from, const auto to) + { const auto eid = node_based_graph.FindEdge(from, to); if (eid == SPECIAL_EDGEID) { @@ -35,26 +36,29 @@ std::vector removeInvalidTurnPaths(std::vector turn_relations, return true; }; - const auto is_valid_node = [is_valid_edge](const auto &via_node_path) { + const auto is_valid_node = [is_valid_edge](const auto &via_node_path) + { return is_valid_edge(via_node_path.from, via_node_path.via) && is_valid_edge(via_node_path.via, via_node_path.to); }; - const auto is_valid_way = [is_valid_edge](const auto &via_way_path) { + const auto is_valid_way = [is_valid_edge](const auto &via_way_path) + { if (!is_valid_edge(via_way_path.from, via_way_path.via.front())) return false; - const auto invalid_it = std::adjacent_find( - via_way_path.via.begin(), via_way_path.via.end(), [&](auto via_from, auto via_to) { - return !is_valid_edge(via_from, via_to); - }); + const auto invalid_it = std::adjacent_find(via_way_path.via.begin(), + via_way_path.via.end(), + [&](auto via_from, auto via_to) + { return !is_valid_edge(via_from, via_to); }); if (invalid_it != via_way_path.via.end()) return false; return is_valid_edge(via_way_path.via.back(), via_way_path.to); }; - const auto is_invalid = [is_valid_way, is_valid_node](const auto &turn_relation) { + const auto is_invalid = [is_valid_way, is_valid_node](const auto &turn_relation) + { if (turn_relation.turn_path.Type() == TurnPathType::VIA_NODE_TURN_PATH) { return !is_valid_node(turn_relation.turn_path.AsViaNodePath()); diff --git a/src/extractor/way_restriction_map.cpp b/src/extractor/way_restriction_map.cpp index 98ebf19df..d49bec87b 100644 --- a/src/extractor/way_restriction_map.cpp +++ b/src/extractor/way_restriction_map.cpp @@ -38,9 +38,10 @@ bool WayRestrictionMap::IsRestricted(DuplicatedNodeID duplicated_node, const Nod // Checks if a turn to 'to' is restricted BOOST_ASSERT(duplicated_node < restriction_graph.num_via_nodes); const auto &restrictions = restriction_graph.GetRestrictions(duplicated_node); - return std::any_of(restrictions.begin(), restrictions.end(), [&to](const auto &restriction) { - return restriction->IsTurnRestricted(to); - }); + return std::any_of(restrictions.begin(), + restrictions.end(), + [&to](const auto &restriction) + { return restriction->IsTurnRestricted(to); }); } std::vector diff --git a/src/guidance/driveway_handler.cpp b/src/guidance/driveway_handler.cpp index 58f07600d..5e781a9bb 100644 --- a/src/guidance/driveway_handler.cpp +++ b/src/guidance/driveway_handler.cpp @@ -43,10 +43,13 @@ bool DrivewayHandler::canProcess(const NodeID /*nid*/, return false; auto low_priority_count = - std::count_if(intersection.begin(), intersection.end(), [this](const auto &road) { - return node_based_graph.GetEdgeData(road.eid) - .flags.road_classification.IsLowPriorityRoadClass(); - }); + std::count_if(intersection.begin(), + intersection.end(), + [this](const auto &road) + { + return node_based_graph.GetEdgeData(road.eid) + .flags.road_classification.IsLowPriorityRoadClass(); + }); // Process intersection if it has two edges with normal priority and one is the entry edge, // and also has at least one edge with lower priority @@ -57,11 +60,13 @@ Intersection DrivewayHandler::operator()(const NodeID nid, const EdgeID source_edge_id, Intersection intersection) const { - auto road = - std::find_if(intersection.begin() + 1, intersection.end(), [this](const auto &road) { - return !node_based_graph.GetEdgeData(road.eid) - .flags.road_classification.IsLowPriorityRoadClass(); - }); + auto road = std::find_if(intersection.begin() + 1, + intersection.end(), + [this](const auto &road) + { + return !node_based_graph.GetEdgeData(road.eid) + .flags.road_classification.IsLowPriorityRoadClass(); + }); (void)nid; OSRM_ASSERT(road != intersection.end(), node_coordinates[nid]); @@ -76,14 +81,22 @@ Intersection DrivewayHandler::operator()(const NodeID nid, if (road->instruction.direction_modifier == DirectionModifier::Straight) { - std::for_each(intersection.begin() + 1, road, [](auto &side_road) { - if (side_road.instruction.direction_modifier == DirectionModifier::Straight) - side_road.instruction.direction_modifier = DirectionModifier::SlightRight; - }); - std::for_each(road + 1, intersection.end(), [](auto &side_road) { - if (side_road.instruction.direction_modifier == DirectionModifier::Straight) - side_road.instruction.direction_modifier = DirectionModifier::SlightLeft; - }); + std::for_each( + intersection.begin() + 1, + road, + [](auto &side_road) + { + if (side_road.instruction.direction_modifier == DirectionModifier::Straight) + side_road.instruction.direction_modifier = DirectionModifier::SlightRight; + }); + std::for_each( + road + 1, + intersection.end(), + [](auto &side_road) + { + if (side_road.instruction.direction_modifier == DirectionModifier::Straight) + side_road.instruction.direction_modifier = DirectionModifier::SlightLeft; + }); } return intersection; diff --git a/src/guidance/guidance_processing.cpp b/src/guidance/guidance_processing.cpp index 0c510b54b..2debabb04 100644 --- a/src/guidance/guidance_processing.cpp +++ b/src/guidance/guidance_processing.cpp @@ -96,7 +96,9 @@ void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph, // First part of the pipeline generates iterator ranges of IDs in sets of GRAINSIZE tbb::filter> generator_stage( - tbb::filter_mode::serial_in_order, [&](tbb::flow_control &fc) { + tbb::filter_mode::serial_in_order, + [&](tbb::flow_control &fc) + { if (current_node < node_count) { auto next_node = std::min(current_node + GRAINSIZE, node_count); @@ -116,7 +118,8 @@ void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph, // tbb::filter, TurnsPipelineBufferPtr> guidance_stage( tbb::filter_mode::parallel, - [&](const tbb::blocked_range &intersection_node_range) { + [&](const tbb::blocked_range &intersection_node_range) + { auto buffer = std::make_shared(); buffer->nodes_processed = intersection_node_range.size(); @@ -224,9 +227,8 @@ void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph, const auto turn = std::find_if(intersection.begin(), intersection.end(), - [edge = outgoing_edge.edge](const auto &road) { - return road.eid == edge; - }); + [edge = outgoing_edge.edge](const auto &road) + { return road.eid == edge; }); OSRM_ASSERT(turn != intersection.end(), node_coordinates[intersection_node]); @@ -267,9 +269,8 @@ void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph, auto has_unconditional = std::any_of(restrictions.begin(), restrictions.end(), - [](const auto &restriction) { - return restriction->IsUnconditional(); - }); + [](const auto &restriction) + { return restriction->IsUnconditional(); }); if (has_unconditional) continue; @@ -307,7 +308,9 @@ void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph, std::vector delayed_turn_data; tbb::filter guidance_output_stage( - tbb::filter_mode::serial_in_order, [&](auto buffer) { + tbb::filter_mode::serial_in_order, + [&](auto buffer) + { guidance_progress.PrintAddition(buffer->nodes_processed); connectivity_checksum = buffer->checksum.update_checksum(connectivity_checksum); @@ -315,9 +318,8 @@ void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph, // Guidance data std::for_each(buffer->continuous_turn_data.begin(), buffer->continuous_turn_data.end(), - [&turn_data_container](const auto &turn_data) { - turn_data_container.push_back(turn_data); - }); + [&turn_data_container](const auto &turn_data) + { turn_data_container.push_back(turn_data); }); // Copy via-way restrictions delayed data delayed_turn_data.insert(delayed_turn_data.end(), @@ -336,9 +338,8 @@ void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph, // NOTE: EBG edges delayed_data and turns delayed_turn_data have the same index std::for_each(delayed_turn_data.begin(), delayed_turn_data.end(), - [&turn_data_container](const auto &turn_data) { - turn_data_container.push_back(turn_data); - }); + [&turn_data_container](const auto &turn_data) + { turn_data_container.push_back(turn_data); }); } util::Log() << "done."; diff --git a/src/guidance/intersection_handler.cpp b/src/guidance/intersection_handler.cpp index 197f28014..d08cbcdbc 100644 --- a/src/guidance/intersection_handler.cpp +++ b/src/guidance/intersection_handler.cpp @@ -356,7 +356,8 @@ void IntersectionHandler::assignFork(const EdgeID via_edge, ConnectedRoad &right) const { // TODO handle low priority road classes in a reasonable way - const auto suppressed_type = [&](const ConnectedRoad &road) { + const auto suppressed_type = [&](const ConnectedRoad &road) + { const auto in_mode = node_data_container .GetAnnotation(node_based_graph.GetEdgeData(via_edge).annotation_data) diff --git a/src/guidance/motorway_handler.cpp b/src/guidance/motorway_handler.cpp index f2138c813..5c85e2edf 100644 --- a/src/guidance/motorway_handler.cpp +++ b/src/guidance/motorway_handler.cpp @@ -96,10 +96,13 @@ MotorwayHandler::operator()(const NodeID, const EdgeID via_eid, Intersection int if (isMotorwayClass(via_eid, node_based_graph)) { intersection = fromMotorway(via_eid, std::move(intersection)); - std::for_each(intersection.begin(), intersection.end(), [](ConnectedRoad &road) { - if (road.instruction.type == TurnType::OnRamp) - road.instruction.type = TurnType::OffRamp; - }); + std::for_each(intersection.begin(), + intersection.end(), + [](ConnectedRoad &road) + { + if (road.instruction.type == TurnType::OnRamp) + road.instruction.type = TurnType::OffRamp; + }); return intersection; } else // coming from a ramp @@ -116,7 +119,8 @@ Intersection MotorwayHandler::fromMotorway(const EdgeID via_eid, Intersection in BOOST_ASSERT(isMotorwayClass(via_eid, node_based_graph)); // find the angle that continues on our current highway - const auto getContinueAngle = [this, in_data](const Intersection &intersection) { + const auto getContinueAngle = [this, in_data](const Intersection &intersection) + { for (const auto &road : intersection) { if (!road.entry_allowed) @@ -136,7 +140,8 @@ Intersection MotorwayHandler::fromMotorway(const EdgeID via_eid, Intersection in return intersection[0].angle; }; - const auto getMostLikelyContinue = [this](const Intersection &intersection) { + const auto getMostLikelyContinue = [this](const Intersection &intersection) + { double angle = intersection[0].angle; double best = 180; for (const auto &road : intersection) @@ -151,7 +156,8 @@ Intersection MotorwayHandler::fromMotorway(const EdgeID via_eid, Intersection in return angle; }; - const auto findBestContinue = [&]() { + const auto findBestContinue = [&]() + { const double continue_angle = getContinueAngle(intersection); if (continue_angle != intersection[0].angle) return continue_angle; @@ -209,10 +215,11 @@ Intersection MotorwayHandler::fromMotorway(const EdgeID via_eid, Intersection in const auto valid_exits = std::count_if(intersection.begin(), intersection.end(), [](const auto &road) { return road.entry_allowed; }); - const auto exiting_motorways = - std::count_if(intersection.begin(), intersection.end(), [this](const auto &road) { - return road.entry_allowed && isMotorwayClass(road.eid, node_based_graph); - }); + const auto exiting_motorways = std::count_if( + intersection.begin(), + intersection.end(), + [this](const auto &road) + { return road.entry_allowed && isMotorwayClass(road.eid, node_based_graph); }); if (exiting_motorways == 0) { diff --git a/src/guidance/roundabout_handler.cpp b/src/guidance/roundabout_handler.cpp index 99fcfc1c7..29f7173f5 100644 --- a/src/guidance/roundabout_handler.cpp +++ b/src/guidance/roundabout_handler.cpp @@ -119,11 +119,11 @@ bool RoundaboutHandler::qualifiesAsRoundaboutIntersection( if (!has_limited_size) return false; - const bool simple_exits = - roundabout_nodes.end() == - std::find_if(roundabout_nodes.begin(), roundabout_nodes.end(), [this](const NodeID node) { - return (node_based_graph.GetOutDegree(node) > 3); - }); + const bool simple_exits = roundabout_nodes.end() == + std::find_if(roundabout_nodes.begin(), + roundabout_nodes.end(), + [this](const NodeID node) + { return (node_based_graph.GetOutDegree(node) > 3); }); if (!simple_exits) return false; @@ -131,7 +131,8 @@ bool RoundaboutHandler::qualifiesAsRoundaboutIntersection( // Find all exit bearings. Only if they are well distinct (at least 60 degrees between // them), we allow a roundabout turn - const auto exit_bearings = [this, &roundabout_nodes]() { + const auto exit_bearings = [this, &roundabout_nodes]() + { std::vector result; for (const auto node : roundabout_nodes) { @@ -151,7 +152,8 @@ bool RoundaboutHandler::qualifiesAsRoundaboutIntersection( edge_range.begin(), edge_range.end(), std::uint8_t{0}, - [this](const auto current_max, const auto current_eid) { + [this](const auto current_max, const auto current_eid) + { return std::max(current_max, node_based_graph.GetEdgeData(current_eid) .flags.road_classification.GetNumberOfLanes()); @@ -187,7 +189,8 @@ bool RoundaboutHandler::qualifiesAsRoundaboutIntersection( return result; }(); - const bool well_distinct_bearings = [](const std::vector &bearings) { + const bool well_distinct_bearings = [](const std::vector &bearings) + { for (std::size_t bearing_index = 0; bearing_index < bearings.size(); ++bearing_index) { const double difference = @@ -207,10 +210,10 @@ RoundaboutType RoundaboutHandler::getRoundaboutType(const NodeID nid) const std::unordered_set roundabout_name_ids; std::unordered_set connected_names; - const auto getNextOnRoundabout = [this, &roundabout_name_ids, &connected_names]( - const NodeID node, - const bool roundabout, - const bool circular) { + const auto getNextOnRoundabout = + [this, &roundabout_name_ids, &connected_names]( + const NodeID node, const bool roundabout, const bool circular) + { BOOST_ASSERT(roundabout != circular); EdgeID continue_edge = SPECIAL_EDGEID; for (const auto edge_id : node_based_graph.GetAdjacentEdgeRange(node)) @@ -230,7 +233,8 @@ RoundaboutType RoundaboutHandler::getRoundaboutType(const NodeID nid) const if (!edge_name_empty) { - const auto announce = [&](unsigned id) { + const auto announce = [&](unsigned id) + { return util::guidance::requiresNameAnnounced( id, edge_data.name_id, name_table, street_name_suffix_table); }; @@ -250,7 +254,8 @@ RoundaboutType RoundaboutHandler::getRoundaboutType(const NodeID nid) const }; // this value is a hard abort to deal with potential self-loops - const auto countRoundaboutFlags = [&](const NodeID at_node) { + const auto countRoundaboutFlags = [&](const NodeID at_node) + { // FIXME: this would be nicer as boost::count_if, but our integer range does not support // these range based handlers std::size_t count = 0; @@ -263,7 +268,8 @@ RoundaboutType RoundaboutHandler::getRoundaboutType(const NodeID nid) const return count; }; - const auto getEdgeLength = [&](const NodeID source_node, EdgeID eid) { + const auto getEdgeLength = [&](const NodeID source_node, EdgeID eid) + { double length = 0.; auto last_coord = node_coordinates[source_node]; const auto &edge_bucket = compressed_geometries.GetBucketReference(eid); @@ -404,7 +410,8 @@ Intersection RoundaboutHandler::handleRoundabouts(const RoundaboutType roundabou else { // Check if there is a non-service exit - const auto has_non_ignorable_exit = [&]() { + const auto has_non_ignorable_exit = [&]() + { for (const auto eid : node_based_graph.GetAdjacentEdgeRange(node_at_center_of_intersection)) { diff --git a/src/guidance/segregated_intersection_classification.cpp b/src/guidance/segregated_intersection_classification.cpp index bee364bb4..7a9ad4a47 100644 --- a/src/guidance/segregated_intersection_classification.cpp +++ b/src/guidance/segregated_intersection_classification.cpp @@ -46,7 +46,8 @@ std::unordered_set findSegregatedNodes(const extractor::NodeBasedGraphFa extractor::intersection::CoordinateExtractor coordExtractor( graph, factory.GetCompressedEdges(), coordinates); - auto const get_edge_length = [&](NodeID from_node, EdgeID edge_id, NodeID to_node) { + auto const get_edge_length = [&](NodeID from_node, EdgeID edge_id, NodeID to_node) + { auto const geom = coordExtractor.GetCoordinatesAlongRoad(from_node, edge_id, false, to_node); double length = 0.0; @@ -58,7 +59,8 @@ std::unordered_set findSegregatedNodes(const extractor::NodeBasedGraphFa }; // Returns an angle between edges from from_edge_id to to_edge_id - auto const get_angle = [&](NodeID from_node, EdgeID from_edge_id, EdgeID to_edge_id) { + auto const get_angle = [&](NodeID from_node, EdgeID from_edge_id, EdgeID to_edge_id) + { auto intersection_node = graph.GetTarget(from_edge_id); auto from_edge_id_outgoing = graph.FindEdge(intersection_node, from_node); auto to_node = graph.GetTarget(to_edge_id); @@ -70,7 +72,8 @@ std::unordered_set findSegregatedNodes(const extractor::NodeBasedGraphFa node_from, coordinates[intersection_node], node_to); }; - auto const get_edge_info = [&](EdgeID edge_id, NodeID node, auto const &edge_data) -> EdgeInfo { + auto const get_edge_info = [&](EdgeID edge_id, NodeID node, auto const &edge_data) -> EdgeInfo + { /// @todo Make string normalization/lowercase/trim for comparison ... auto const id = annotation[edge_data.annotation_data].name_id; @@ -84,22 +87,24 @@ std::unordered_set findSegregatedNodes(const extractor::NodeBasedGraphFa edge_data.flags}; }; - auto is_bidirectional = [](auto flags) { - return flags.is_split || (!flags.is_split && flags.forward && flags.backward); - }; + auto is_bidirectional = [](auto flags) + { return flags.is_split || (!flags.is_split && flags.forward && flags.backward); }; - auto is_internal_straight = [](auto const turn_degree) { + auto is_internal_straight = [](auto const turn_degree) + { return (turn_degree > INTERNAL_STRAIGHT_LOWER_BOUND && turn_degree < INTERNAL_STRAIGHT_UPPER_BOUND); }; // Lambda to check if the turn set includes a right turn type - const auto has_turn_right = [](std::set &turn_types) { + const auto has_turn_right = [](std::set &turn_types) + { return turn_types.find(guidance::DirectionModifier::Right) != turn_types.end() || turn_types.find(guidance::DirectionModifier::SharpRight) != turn_types.end(); }; // Lambda to check if the turn set includes a left turn type - const auto has_turn_left = [](std::set &turn_types) { + const auto has_turn_left = [](std::set &turn_types) + { return turn_types.find(guidance::DirectionModifier::Left) != turn_types.end() || turn_types.find(guidance::DirectionModifier::SharpLeft) != turn_types.end(); }; @@ -108,7 +113,8 @@ std::unordered_set findSegregatedNodes(const extractor::NodeBasedGraphFa const std::vector &v1, const std::vector &v2, EdgeInfo const ¤t, - double edge_length) { + double edge_length) + { // Internal intersection edges must be short and cannot be a roundabout. // Also they must be a road use (not footway, cycleway, etc.) // TODO - consider whether alleys, cul-de-sacs, and other road uses @@ -219,7 +225,8 @@ std::unordered_set findSegregatedNodes(const extractor::NodeBasedGraphFa return true; }; - auto const collect_edge_info_fn = [&](auto const &edges1, NodeID node2) { + auto const collect_edge_info_fn = [&](auto const &edges1, NodeID node2) + { std::vector info; for (auto e : edges1) @@ -234,15 +241,15 @@ std::unordered_set findSegregatedNodes(const extractor::NodeBasedGraphFa if (info.empty()) return info; - std::sort(info.begin(), info.end(), [](EdgeInfo const &e1, EdgeInfo const &e2) { - return e1.node < e2.node; - }); + std::sort(info.begin(), + info.end(), + [](EdgeInfo const &e1, EdgeInfo const &e2) { return e1.node < e2.node; }); - info.erase( - std::unique(info.begin(), - info.end(), - [](EdgeInfo const &e1, EdgeInfo const &e2) { return e1.node == e2.node; }), - info.end()); + info.erase(std::unique(info.begin(), + info.end(), + [](EdgeInfo const &e1, EdgeInfo const &e2) + { return e1.node == e2.node; }), + info.end()); return info; }; @@ -253,7 +260,8 @@ std::unordered_set findSegregatedNodes(const extractor::NodeBasedGraphFa NodeID node1, auto const &edges2, NodeID node2, - double edge_length) { + double edge_length) + { return isSegregated(node1, collect_edge_info_fn(edges1, node2), collect_edge_info_fn(edges2, node1), diff --git a/src/guidance/sliproad_handler.cpp b/src/guidance/sliproad_handler.cpp index 0d0d6695e..ae4baf4b7 100644 --- a/src/guidance/sliproad_handler.cpp +++ b/src/guidance/sliproad_handler.cpp @@ -91,7 +91,8 @@ Intersection SliproadHandler::operator()(const NodeID /*nid*/, } // Link-check for (bc) and later on (cd) which both are getting shortcutted by Sliproad - const auto is_potential_link = [this, main_road](const ConnectedRoad &road) { + const auto is_potential_link = [this, main_road](const ConnectedRoad &road) + { if (!road.entry_allowed) { return false; @@ -188,7 +189,8 @@ Intersection SliproadHandler::operator()(const NodeID /*nid*/, const auto is_left_sliproad_turn = road_index > *obvious; // Road at the intersection the main road leads onto which the sliproad arrives onto - const auto crossing_road = [&] { + const auto crossing_road = [&] + { if (is_left_sliproad_turn) return main_road_intersection->intersection.getLeftmostRoad(); @@ -266,7 +268,8 @@ Intersection SliproadHandler::operator()(const NodeID /*nid*/, if (target_intersection.isDeadEnd()) continue; - const auto find_valid = [](const extractor::intersection::IntersectionView &view) { + const auto find_valid = [](const extractor::intersection::IntersectionView &view) + { // according to our current sliproad idea, there should only be one valid turn auto itr = std::find_if( view.begin(), view.end(), [](const auto &road) { return road.entry_allowed; }); @@ -326,16 +329,19 @@ Intersection SliproadHandler::operator()(const NodeID /*nid*/, is_left_sliproad_turn ? main_road_intersection->intersection.size() - 2 : 2; auto next_to_crossing_road = main_road_intersection->intersection[next_to_crossing_idx]; auto next_to_crossing_node = node_based_graph.GetTarget(next_to_crossing_road.eid); - auto found_common_node = std::find_if( - begin(target_intersection), end(target_intersection), [&](const auto &road) { - if (next_to_crossing_node == node_based_graph.GetTarget(road.eid)) - { - auto direction = getTurnDirection(road.angle); - return direction == DirectionModifier::SharpRight || - direction == DirectionModifier::SharpLeft; - } - return false; - }); + auto found_common_node = + std::find_if(begin(target_intersection), + end(target_intersection), + [&](const auto &road) + { + if (next_to_crossing_node == node_based_graph.GetTarget(road.eid)) + { + auto direction = getTurnDirection(road.angle); + return direction == DirectionModifier::SharpRight || + direction == DirectionModifier::SharpLeft; + } + return false; + }); if (found_common_node == target_intersection.end()) continue; } @@ -499,7 +505,8 @@ Intersection SliproadHandler::operator()(const NodeID /*nid*/, node_based_graph.GetEdgeData(candidate_road.eid).annotation_data); // Name mismatch: check roads at `c` and `d` for same name - const auto name_mismatch = [&](const NameID road_name_id) { + const auto name_mismatch = [&](const NameID road_name_id) + { return util::guidance::requiresNameAnnounced(road_name_id, // candidate_data.name_id, // name_table, // diff --git a/src/guidance/suppress_mode_handler.cpp b/src/guidance/suppress_mode_handler.cpp index b808abc6e..e1356de6b 100644 --- a/src/guidance/suppress_mode_handler.cpp +++ b/src/guidance/suppress_mode_handler.cpp @@ -50,11 +50,15 @@ bool SuppressModeHandler::canProcess(const NodeID, const auto first = begin(intersection); const auto last = end(intersection); - const auto all_share_mode = std::all_of(first, last, [this, &in_mode](const auto &road) { - return node_data_container - .GetAnnotation(node_based_graph.GetEdgeData(road.eid).annotation_data) - .travel_mode == in_mode; - }); + const auto all_share_mode = std::all_of( + first, + last, + [this, &in_mode](const auto &road) + { + return node_data_container + .GetAnnotation(node_based_graph.GetEdgeData(road.eid).annotation_data) + .travel_mode == in_mode; + }); return (suppress_in_mode != end(suppressed)) && all_share_mode; } @@ -65,13 +69,16 @@ SuppressModeHandler::operator()(const NodeID, const EdgeID, Intersection interse const auto first = begin(intersection); const auto last = end(intersection); - std::for_each(first, last, [&](auto &road) { - const auto modifier = road.instruction.direction_modifier; - // use NoTurn, to not even have it as an IntermediateIntersection - const auto type = TurnType::NoTurn; + std::for_each(first, + last, + [&](auto &road) + { + const auto modifier = road.instruction.direction_modifier; + // use NoTurn, to not even have it as an IntermediateIntersection + const auto type = TurnType::NoTurn; - road.instruction = {type, modifier}; - }); + road.instruction = {type, modifier}; + }); return intersection; } diff --git a/src/guidance/turn_analysis.cpp b/src/guidance/turn_analysis.cpp index ca50f203f..414b6fdd3 100644 --- a/src/guidance/turn_analysis.cpp +++ b/src/guidance/turn_analysis.cpp @@ -105,7 +105,8 @@ Intersection TurnAnalysis::AssignTurnTypes( std::transform(intersection_view.begin(), intersection_view.end(), std::back_inserter(intersection), - [&](const extractor::intersection::IntersectionViewData &data) { + [&](const extractor::intersection::IntersectionViewData &data) + { return ConnectedRoad(data, {TurnType::Invalid, DirectionModifier::UTurn}, INVALID_LANE_DATAID); @@ -161,10 +162,13 @@ Intersection TurnAnalysis::AssignTurnTypes( // Turn On Ramps Into Off Ramps, if we come from a motorway-like road if (node_based_graph.GetEdgeData(entering_via_edge).flags.road_classification.IsMotorwayClass()) { - std::for_each(intersection.begin(), intersection.end(), [](ConnectedRoad &road) { - if (road.instruction.type == TurnType::OnRamp) - road.instruction.type = TurnType::OffRamp; - }); + std::for_each(intersection.begin(), + intersection.end(), + [](ConnectedRoad &road) + { + if (road.instruction.type == TurnType::OnRamp) + road.instruction.type = TurnType::OffRamp; + }); } // After we ran all handlers and determined instruction type diff --git a/src/guidance/turn_classification.cpp b/src/guidance/turn_classification.cpp index c191b65e0..f6d26cfef 100644 --- a/src/guidance/turn_classification.cpp +++ b/src/guidance/turn_classification.cpp @@ -17,14 +17,14 @@ classifyIntersection(Intersection intersection, const osrm::util::Coordinate &lo std::sort(intersection.begin(), intersection.end(), - [](const ConnectedRoad &left, const ConnectedRoad &right) { - return left.perceived_bearing < right.perceived_bearing; - }); + [](const ConnectedRoad &left, const ConnectedRoad &right) + { return left.perceived_bearing < right.perceived_bearing; }); util::guidance::EntryClass entry_class; util::guidance::BearingClass bearing_class; - const bool canBeDiscretized = [&]() { + const bool canBeDiscretized = [&]() + { if (intersection.size() <= 1) return true; diff --git a/src/guidance/turn_discovery.cpp b/src/guidance/turn_discovery.cpp index 20005dd12..57b66f8a7 100644 --- a/src/guidance/turn_discovery.cpp +++ b/src/guidance/turn_discovery.cpp @@ -127,9 +127,8 @@ bool findPreviousIntersection(const NodeID node_v, result_intersection.end() != std::find_if(result_intersection.begin(), result_intersection.end(), - [via_edge](const extractor::intersection::IntersectionViewData &road) { - return road.eid == via_edge; - }); + [via_edge](const extractor::intersection::IntersectionViewData &road) + { return road.eid == via_edge; }); if (!check_via_edge) { diff --git a/src/guidance/turn_handler.cpp b/src/guidance/turn_handler.cpp index 10038ba21..8fd5c43d0 100644 --- a/src/guidance/turn_handler.cpp +++ b/src/guidance/turn_handler.cpp @@ -223,10 +223,12 @@ bool TurnHandler::isObviousOfTwo(const EdgeID via_edge, bool TurnHandler::hasObvious(const EdgeID &via_edge, const Fork &fork) const { - auto obvious_road = - std::adjacent_find(fork.begin, fork.end, [&, this](const auto &a, const auto &b) { - return this->isObviousOfTwo(via_edge, a, b) || this->isObviousOfTwo(via_edge, b, a); - }); + auto obvious_road = std::adjacent_find(fork.begin, + fork.end, + [&, this](const auto &a, const auto &b) { + return this->isObviousOfTwo(via_edge, a, b) || + this->isObviousOfTwo(via_edge, b, a); + }); // return whether an obvious road was found return obvious_road != fork.end; } @@ -246,10 +248,11 @@ Intersection TurnHandler::handleThreeWayTurn(const EdgeID via_edge, Intersection OOOOOOO */ - const auto all_links = - std::all_of(intersection.begin(), intersection.end(), [this](const auto &road) { - return node_based_graph.GetEdgeData(road.eid).flags.road_classification.IsLinkClass(); - }); + const auto all_links = std::all_of( + intersection.begin(), + intersection.end(), + [this](const auto &road) + { return node_based_graph.GetEdgeData(road.eid).flags.road_classification.IsLinkClass(); }); auto fork = findFork(via_edge, intersection); if (fork && (all_links || obvious_index == 0)) @@ -438,7 +441,8 @@ Intersection TurnHandler::assignLeftTurns(const EdgeID via_edge, const std::size_t starting_at) const { BOOST_ASSERT(starting_at < intersection.size()); - const auto switch_left_and_right = [](Intersection &intersection) { + const auto switch_left_and_right = [](Intersection &intersection) + { BOOST_ASSERT(!intersection.empty()); for (auto &road : intersection) @@ -462,7 +466,8 @@ Intersection TurnHandler::assignRightTurns(const EdgeID via_edge, const std::size_t up_to) const { BOOST_ASSERT(up_to <= intersection.size()); - const auto count_valid = [&intersection, up_to]() { + const auto count_valid = [&intersection, up_to]() + { std::size_t count = 0; for (std::size_t i = 1; i < up_to; ++i) if (intersection[i].entry_allowed) @@ -656,24 +661,36 @@ bool TurnHandler::isCompatibleByRoadClass(const Intersection &intersection, cons // except if rightmost fork candidate is also a link road const auto is_right_link_class = node_based_graph.GetEdgeData(fork.getRight().eid).flags.road_classification.IsLinkClass(); - if (!std::all_of(fork.begin + 1, fork.end, [&](ConnectedRoad &road) { - return is_right_link_class == - node_based_graph.GetEdgeData(road.eid).flags.road_classification.IsLinkClass(); - })) + if (!std::all_of(fork.begin + 1, + fork.end, + [&](ConnectedRoad &road) + { + return is_right_link_class == node_based_graph.GetEdgeData(road.eid) + .flags.road_classification.IsLinkClass(); + })) { return false; } - return std::all_of(fork.begin, fork.end, [&](ConnectedRoad &base) { - const auto base_class = node_based_graph.GetEdgeData(base.eid).flags.road_classification; - // check that there is no turn obvious == check that all turns are non-onvious - return std::all_of(fork.begin, fork.end, [&](ConnectedRoad &compare) { - const auto compare_class = - node_based_graph.GetEdgeData(compare.eid).flags.road_classification; - return compare.eid == base.eid || - !(obviousByRoadClass(via_class, base_class, compare_class)); + return std::all_of( + fork.begin, + fork.end, + [&](ConnectedRoad &base) + { + const auto base_class = + node_based_graph.GetEdgeData(base.eid).flags.road_classification; + // check that there is no turn obvious == check that all turns are non-onvious + return std::all_of( + fork.begin, + fork.end, + [&](ConnectedRoad &compare) + { + const auto compare_class = + node_based_graph.GetEdgeData(compare.eid).flags.road_classification; + return compare.eid == base.eid || + !(obviousByRoadClass(via_class, base_class, compare_class)); + }); }); - }); } // Checks whether a three-way-intersection coming from `via_edge` is a fork @@ -703,8 +720,11 @@ std::optional TurnHandler::findFork(const EdgeID via_edge, // check if all entries in the fork range allow entry const bool only_valid_entries = intersection.hasAllValidEntries(fork->begin, fork->end); - const auto has_compatible_modes = - std::all_of(fork->begin, fork->end, [&](const auto &road) { + const auto has_compatible_modes = std::all_of( + fork->begin, + fork->end, + [&](const auto &road) + { return node_data_container .GetAnnotation(node_based_graph.GetEdgeData(road.eid).annotation_data) .travel_mode == diff --git a/src/guidance/turn_lane_augmentation.cpp b/src/guidance/turn_lane_augmentation.cpp index 862f9c35e..3977d0abe 100644 --- a/src/guidance/turn_lane_augmentation.cpp +++ b/src/guidance/turn_lane_augmentation.cpp @@ -26,9 +26,9 @@ const constexpr extractor::TurnLaneType::Mask tag_by_modifier[] = { std::size_t getNumberOfTurns(const Intersection &intersection) { - return std::count_if(intersection.begin(), intersection.end(), [](const ConnectedRoad &road) { - return road.entry_allowed; - }); + return std::count_if(intersection.begin(), + intersection.end(), + [](const ConnectedRoad &road) { return road.entry_allowed; }); } LaneDataVector augmentMultiple(const std::size_t none_index, @@ -41,7 +41,8 @@ LaneDataVector augmentMultiple(const std::size_t none_index, // entries? // looking at the left side first - const auto range = [&]() { + const auto range = [&]() + { if (none_index == 0) { // find first connection_count - lane_data.size() valid turns @@ -106,17 +107,18 @@ LaneDataVector augmentMultiple(const std::size_t none_index, const auto intersection_range_first = intersection.begin() + range.first; const auto intersection_range_end = intersection.begin() + range.second; const auto allowed_in_range = - std::count_if(intersection_range_first, intersection_range_end, [](const auto &road) { - return road.entry_allowed; - }); + std::count_if(intersection_range_first, + intersection_range_end, + [](const auto &road) { return road.entry_allowed; }); if (allowed_in_range > 1 && lane_data[none_index].to - lane_data[none_index].from >= 1) { // check if there is a straight turn - auto straight_itr = - std::find_if(intersection_range_first, intersection_range_end, [](const auto &road) { - return road.instruction.direction_modifier == DirectionModifier::Straight; - }); + auto straight_itr = std::find_if( + intersection_range_first, + intersection_range_end, + [](const auto &road) + { return road.instruction.direction_modifier == DirectionModifier::Straight; }); // we have a straight turn? if (straight_itr != intersection_range_end) diff --git a/src/guidance/turn_lane_data.cpp b/src/guidance/turn_lane_data.cpp index 3be149442..952d788d7 100644 --- a/src/guidance/turn_lane_data.cpp +++ b/src/guidance/turn_lane_data.cpp @@ -67,26 +67,26 @@ LaneDataVector laneDataFromDescription(const TurnLaneDescription &turn_lane_desc const auto num_lanes = boost::numeric_cast(turn_lane_description.size()); const auto setLaneData = - [&](LaneMap &map, TurnLaneType::Mask full_mask, const LaneID current_lane) { - const auto isSet = [&](const TurnLaneType::Mask test_mask) -> bool { - return (test_mask & full_mask) == test_mask; - }; + [&](LaneMap &map, TurnLaneType::Mask full_mask, const LaneID current_lane) + { + const auto isSet = [&](const TurnLaneType::Mask test_mask) -> bool + { return (test_mask & full_mask) == test_mask; }; - for (const auto shift : util::irange(0, TurnLaneType::NUM_TYPES)) + for (const auto shift : util::irange(0, TurnLaneType::NUM_TYPES)) + { + TurnLaneType::Mask mask = 1 << shift; + if (isSet(mask)) { - TurnLaneType::Mask mask = 1 << shift; - if (isSet(mask)) + auto map_iterator = map.find(mask); + if (map_iterator == map.end()) + map[mask] = std::make_pair(current_lane, current_lane); + else { - auto map_iterator = map.find(mask); - if (map_iterator == map.end()) - map[mask] = std::make_pair(current_lane, current_lane); - else - { - map_iterator->second.first = current_lane; - } + map_iterator->second.first = current_lane; } } - }; + } + }; LaneMap lane_map; LaneID lane_nr = num_lanes - 1; @@ -108,7 +108,8 @@ LaneDataVector laneDataFromDescription(const TurnLaneDescription &turn_lane_desc std::sort(lane_data.begin(), lane_data.end()); // check whether a given turn lane string resulted in valid lane data - const auto hasValidOverlaps = [](const LaneDataVector &lane_data) { + const auto hasValidOverlaps = [](const LaneDataVector &lane_data) + { // Allow an overlap of at most one. Larger overlaps would result in crossing another turn, // which is invalid for (std::size_t index = 1; index < lane_data.size(); ++index) @@ -134,15 +135,17 @@ LaneDataVector laneDataFromDescription(const TurnLaneDescription &turn_lane_desc LaneDataVector::iterator findTag(const TurnLaneType::Mask tag, LaneDataVector &data) { - return std::find_if(data.begin(), data.end(), [&](const TurnLaneData &lane_data) { - return (tag & lane_data.tag) != TurnLaneType::empty; - }); + return std::find_if(data.begin(), + data.end(), + [&](const TurnLaneData &lane_data) + { return (tag & lane_data.tag) != TurnLaneType::empty; }); } LaneDataVector::const_iterator findTag(const TurnLaneType::Mask tag, const LaneDataVector &data) { - return std::find_if(data.cbegin(), data.cend(), [&](const TurnLaneData &lane_data) { - return (tag & lane_data.tag) != TurnLaneType::empty; - }); + return std::find_if(data.cbegin(), + data.cend(), + [&](const TurnLaneData &lane_data) + { return (tag & lane_data.tag) != TurnLaneType::empty; }); } bool hasTag(const TurnLaneType::Mask tag, const LaneDataVector &data) diff --git a/src/guidance/turn_lane_handler.cpp b/src/guidance/turn_lane_handler.cpp index e9891c861..98938525d 100644 --- a/src/guidance/turn_lane_handler.cpp +++ b/src/guidance/turn_lane_handler.cpp @@ -24,9 +24,9 @@ namespace { std::size_t getNumberOfTurns(const Intersection &intersection) { - return std::count_if(intersection.begin(), intersection.end(), [](const ConnectedRoad &road) { - return road.entry_allowed; - }); + return std::count_if(intersection.begin(), + intersection.end(), + [](const ConnectedRoad &road) { return road.entry_allowed; }); } } // namespace @@ -158,10 +158,10 @@ TurnLaneScenario TurnLaneHandler::deduceScenario(const NodeID at, return TurnLaneScenario::NONE; // really don't touch roundabouts (#2626) - if (intersection.end() != - std::find_if(intersection.begin(), intersection.end(), [](const auto &road) { - return hasRoundaboutType(road.instruction); - })) + if (intersection.end() != std::find_if(intersection.begin(), + intersection.end(), + [](const auto &road) + { return hasRoundaboutType(road.instruction); })) return TurnLaneScenario::NONE; // if only a uturn exists, there is nothing we can do @@ -233,7 +233,8 @@ TurnLaneScenario TurnLaneHandler::deduceScenario(const NodeID at, if (via_edge == road.eid) return TurnLaneScenario::SLIPROAD; - const auto &closest_road = [&]() { + const auto &closest_road = [&]() + { if (road_index + 1 == previous_intersection.size()) { BOOST_ASSERT(road_index > 1); @@ -419,7 +420,8 @@ bool TurnLaneHandler::isSimpleIntersection(const LaneDataVector &lane_data, return std::count_if( lane_data.begin(), lane_data.end(), - [](const TurnLaneData &data) { + [](const TurnLaneData &data) + { return ((data.tag & TurnLaneType::merge_to_left) != TurnLaneType::empty) || ((data.tag & TurnLaneType::merge_to_right) != TurnLaneType::empty); }) + @@ -429,7 +431,8 @@ bool TurnLaneHandler::isSimpleIntersection(const LaneDataVector &lane_data, // in case an intersection offers far more lane data items than actual turns, some of them // have to be for another intersection. A single additional item can be for an invalid bus lane. - const auto num_turns = [&]() { + const auto num_turns = [&]() + { auto count = getNumberOfTurns(intersection); if (count < lane_data.size() && !intersection[0].entry_allowed && lane_data.back().tag == TurnLaneType::uturn) @@ -453,10 +456,10 @@ bool TurnLaneHandler::isSimpleIntersection(const LaneDataVector &lane_data, // more turns than lane data if (num_turns > lane_data.size() && - lane_data.end() == - std::find_if(lane_data.begin(), lane_data.end(), [](const TurnLaneData &data) { - return data.tag == TurnLaneType::none; - })) + lane_data.end() == std::find_if(lane_data.begin(), + lane_data.end(), + [](const TurnLaneData &data) + { return data.tag == TurnLaneType::none; })) { return false; } @@ -485,7 +488,8 @@ bool TurnLaneHandler::isSimpleIntersection(const LaneDataVector &lane_data, // u-turn tags are at the outside of the lane-tags and require special handling, since // locating their best match requires knowledge on the neighboring tag. (see documentation // on findBestMatch/findBestMatchForReverse - const auto best_match = [&]() { + const auto best_match = [&]() + { // normal tag or u-turn as only choice (no other tag present) if (data.tag != TurnLaneType::uturn || lane_data.size() == 1) return findBestMatch(data.tag, intersection); @@ -644,7 +648,8 @@ std::pair TurnLaneHandler::partitionLaneData( matched_at_second[none_index] = true; } - const auto augmentEntry = [&](TurnLaneData &data) { + const auto augmentEntry = [&](TurnLaneData &data) + { for (std::size_t lane = 0; lane < turn_lane_data.size(); ++lane) if (matched_at_second[lane]) { @@ -713,15 +718,15 @@ Intersection TurnLaneHandler::handleSliproadTurn(Intersection intersection, std::distance(previous_intersection.begin(), std::find_if(previous_intersection.begin(), previous_intersection.end(), - [](const ConnectedRoad &road) { - return road.instruction.type == TurnType::Sliproad; - })); + [](const ConnectedRoad &road) + { return road.instruction.type == TurnType::Sliproad; })); BOOST_ASSERT(sliproad_index <= previous_intersection.size()); const auto &sliproad = previous_intersection[sliproad_index]; // code duplicatino with deduceScenario: TODO refactor - const auto &main_road = [&]() { + const auto &main_road = [&]() + { if (sliproad_index + 1 == previous_intersection.size()) { BOOST_ASSERT(sliproad_index > 1); diff --git a/src/guidance/turn_lane_matcher.cpp b/src/guidance/turn_lane_matcher.cpp index ede330426..31bc1df57 100644 --- a/src/guidance/turn_lane_matcher.cpp +++ b/src/guidance/turn_lane_matcher.cpp @@ -49,9 +49,8 @@ DirectionModifier::Enum getMatchingModifier(const TurnLaneType::Mask tag) // check whether a match of a given tag and a turn instruction can be seen as valid bool isValidMatch(const TurnLaneType::Mask tag, const TurnInstruction instruction) { - const auto isMirroredModifier = [](const TurnInstruction instruction) { - return instruction.type == TurnType::Merge; - }; + const auto isMirroredModifier = [](const TurnInstruction instruction) + { return instruction.type == TurnType::Merge; }; if (tag == TurnLaneType::uturn) { @@ -114,7 +113,8 @@ typename Intersection::const_iterator findBestMatch(const TurnLaneType::Mask tag { return std::min_element(intersection.begin(), intersection.end(), - [tag](const ConnectedRoad &lhs, const ConnectedRoad &rhs) { + [tag](const ConnectedRoad &lhs, const ConnectedRoad &rhs) + { // prefer valid matches if (isValidMatch(tag, lhs.instruction) != isValidMatch(tag, rhs.instruction)) @@ -144,7 +144,8 @@ typename Intersection::const_iterator findBestMatchForReverse(const TurnLaneType return std::min_element( intersection.begin() + std::distance(intersection.begin(), neighbor_itr), intersection.end(), - [](const ConnectedRoad &lhs, const ConnectedRoad &rhs) { + [](const ConnectedRoad &lhs, const ConnectedRoad &rhs) + { const TurnLaneType::Mask tag = TurnLaneType::uturn; // prefer valid matches if (isValidMatch(tag, lhs.instruction) != isValidMatch(tag, rhs.instruction)) @@ -197,7 +198,8 @@ Intersection triviallyMatchLanesToTurns(Intersection intersection, { std::size_t road_index = 1, lane = 0; - const auto matchRoad = [&](ConnectedRoad &road, const TurnLaneData &data) { + const auto matchRoad = [&](ConnectedRoad &road, const TurnLaneData &data) + { util::guidance::LaneTupleIdPair key{{LaneID(data.to - data.from + 1), data.from}, lane_string_id}; diff --git a/src/nodejs/node_osrm.cpp b/src/nodejs/node_osrm.cpp index 5d5bb916f..320aaa849 100644 --- a/src/nodejs/node_osrm.cpp +++ b/src/nodejs/node_osrm.cpp @@ -74,6 +74,7 @@ Napi::Object Engine::Init(Napi::Env env, Napi::Object exports) * Old behaviour: Path to a file on disk to store the memory using mmap. Current behaviour: setting this value is the same as setting `mmap_memory: true`. * @param {Boolean} [options.mmap_memory] Map on-disk files to virtual memory addresses (mmap), rather than loading into RAM. * @param {String} [options.path] The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true. + * @param {Array} [options.disable_feature_dataset] Disables a feature dataset from being loaded into memory if not needed. Options: `ROUTE_STEPS`, `ROUTE_GEOMETRY`. * @param {Number} [options.max_locations_trip] Max. locations supported in trip query (default: unlimited). * @param {Number} [options.max_locations_viaroute] Max. locations supported in viaroute query (default: unlimited). * @param {Number} [options.max_locations_distance_table] Max. locations supported in distance table query (default: unlimited). @@ -291,7 +292,7 @@ inline void asyncForTiles(const Napi::CallbackInfo &info, * @param {String} [options.geometries=polyline] Returned route geometry format (influences overview and per step). Can also be `geojson`. * @param {String} [options.overview=simplified] Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). * @param {Boolean} [options.continue_straight] Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile. - * @param {Array} [options.approaches] Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`. + * @param {Array} [options.approaches] Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb` or `opposite`. * `null`/`true`/`false` * @param {Array} [options.waypoints] Indices to coordinates to treat as waypoints. If not supplied, all coordinates are waypoints. Must include first and last coordinate index. * @param {String} [options.format] Which output format to use, either `json`, or [`flatbuffers`](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api/flatbuffers). @@ -336,7 +337,7 @@ Napi::Value Engine::route(const Napi::CallbackInfo &info) * @param {Boolean} [options.generate_hints=true] Whether or not adds a Hint to the response which can be used in subsequent requests. * @param {Number} [options.number=1] Number of nearest segments that should be returned. * Must be an integer greater than or equal to `1`. - * @param {Array} [options.approaches] Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`. + * @param {Array} [options.approaches] Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb` or `opposite`. * @param {String} [options.format] Which output format to use, either `json`, or [`flatbuffers`](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api/flatbuffers). * @param {String} [options.snapping] Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph. * @param {Function} callback @@ -383,7 +384,7 @@ Napi::Value Engine::nearest(const Napi::CallbackInfo &info) * @param {Array} [options.sources] An array of `index` elements (`0 <= integer < #coordinates`) to use * location with given index as source. Default is to use all. * @param {Array} [options.destinations] An array of `index` elements (`0 <= integer < #coordinates`) to use location with given index as destination. Default is to use all. - * @param {Array} [options.approaches] Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`. + * @param {Array} [options.approaches] Restrict the direction on the road network at a waypoint, relative to the input coordinate.. Can be `null` (unrestricted, default), `curb` or `opposite`. * @param {Number} [options.fallback_speed] Replace `null` responses in result with as-the-crow-flies estimates based on `fallback_speed`. Value is in metres/second. * @param {String} [options.fallback_coordinate] Either `input` (default) or `snapped`. If using a `fallback_speed`, use either the user-supplied coordinate (`input`), or the snapped coordinate (`snapped`) for calculating the as-the-crow-flies distance between two points. * @param {Number} [options.scale_factor] Multiply the table duration values in the table by this number for more controlled input into a route optimization solver. @@ -564,7 +565,7 @@ Napi::Value Engine::match(const Napi::CallbackInfo &info) * @param {Boolean} [options.roundtrip=true] Return route is a roundtrip. * @param {String} [options.source=any] Return route starts at `any` or `first` coordinate. * @param {String} [options.destination=any] Return route ends at `any` or `last` coordinate. - * @param {Array} [options.approaches] Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`. + * @param {Array} [options.approaches] Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb` or `opposite`. * @param {String} [options.snapping] Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph. * * @returns {Object} containing `waypoints` and `trips`. diff --git a/src/partitioner/bisection_to_partition.cpp b/src/partitioner/bisection_to_partition.cpp index a567dc524..9cf5276cf 100644 --- a/src/partitioner/bisection_to_partition.cpp +++ b/src/partitioner/bisection_to_partition.cpp @@ -64,9 +64,8 @@ void partitionLevel(const std::vector &node_to_bisection_id, std::accumulate(permutation.begin() + cell.begin, permutation.begin() + cell.end, BisectionID{0}, - [&node_to_bisection_id](const BisectionID lhs, const NodeID rhs) { - return lhs | node_to_bisection_id[rhs]; - }); + [&node_to_bisection_id](const BisectionID lhs, const NodeID rhs) + { return lhs | node_to_bisection_id[rhs]; }); // masks all bit strictly higher then cell.bit BOOST_ASSERT(sizeof(unsigned long long) * CHAR_BIT > sizeof(BisectionID) * CHAR_BIT); const BisectionID mask = (1ULL << (cell.bit + 1)) - 1; @@ -88,9 +87,8 @@ void partitionLevel(const std::vector &node_to_bisection_id, std::uint32_t middle = std::partition(permutation.begin() + cell.begin, permutation.begin() + cell.end, - [is_left_mask, &node_to_bisection_id](const auto node_id) { - return node_to_bisection_id[node_id] & is_left_mask; - }) - + [is_left_mask, &node_to_bisection_id](const auto node_id) + { return node_to_bisection_id[node_id] & is_left_mask; }) - permutation.begin(); if (bit > 0) diff --git a/src/partitioner/dinic_max_flow.cpp b/src/partitioner/dinic_max_flow.cpp index ad96f6605..ae1765b6d 100644 --- a/src/partitioner/dinic_max_flow.cpp +++ b/src/partitioner/dinic_max_flow.cpp @@ -19,10 +19,10 @@ const auto constexpr INVALID_LEVEL = std::numeric_limits::m auto makeHasNeighborNotInCheck(const DinicMaxFlow::SourceSinkNodes &set, const BisectionGraphView &view) { - return [&](const NodeID nid) { - const auto is_not_contained = [&set](const BisectionEdge &edge) { - return set.count(edge.target) == 0; - }; + return [&](const NodeID nid) + { + const auto is_not_contained = [&set](const BisectionEdge &edge) + { return set.count(edge.target) == 0; }; return view.EndEdges(nid) != std::find_if(view.BeginEdges(nid), view.EndEdges(nid), is_not_contained); }; @@ -132,12 +132,12 @@ DinicMaxFlow::ComputeLevelGraph(const BisectionGraphView &view, levels[edge.target] = 0; } // check if there is flow present on an edge - const auto has_flow = [&](const NodeID from, const NodeID to) { - return flow[from].find(to) != flow[from].end(); - }; + const auto has_flow = [&](const NodeID from, const NodeID to) + { return flow[from].find(to) != flow[from].end(); }; // perform a relaxation step in the BFS algorithm - const auto relax_node = [&](const NodeID node_id) { + const auto relax_node = [&](const NodeID node_id) + { // don't relax sink nodes if (sink_nodes.count(node_id)) return; @@ -180,9 +180,11 @@ std::size_t DinicMaxFlow::BlockingFlow(FlowEdges &flow, std::size_t flow_increase = 0; // augment the flow along a path in the level graph - const auto augment_flow = [&flow](const std::vector &path) { + const auto augment_flow = [&flow](const std::vector &path) + { // add/remove flow edges from the current residual graph - const auto augment_one = [&flow](const NodeID from, const NodeID to) { + const auto augment_one = [&flow](const NodeID from, const NodeID to) + { // check if there is flow in the opposite direction auto existing_edge = flow[to].find(from); if (existing_edge != flow[to].end()) @@ -195,10 +197,13 @@ std::size_t DinicMaxFlow::BlockingFlow(FlowEdges &flow, }; // augment all adjacent edges - std::adjacent_find(path.begin(), path.end(), augment_one); + // We're only interested in the side-effect of the augment_one function, the return + // value is ignored + [[maybe_unused]] auto _ = std::adjacent_find(path.begin(), path.end(), augment_one); }; - const auto augment_all_paths = [&](const NodeID sink_node_id) { + const auto augment_all_paths = [&](const NodeID sink_node_id) + { // only augment sinks if (levels[sink_node_id] == INVALID_LEVEL) return; @@ -293,10 +298,10 @@ bool DinicMaxFlow::Validate(const BisectionGraphView &view, const SourceSinkNodes &sink_nodes) const { // sink and source cannot share a common node - const auto separated = - std::find_if(source_nodes.begin(), source_nodes.end(), [&sink_nodes](const auto node) { - return sink_nodes.count(node); - }) == source_nodes.end(); + const auto separated = std::find_if(source_nodes.begin(), + source_nodes.end(), + [&sink_nodes](const auto node) + { return sink_nodes.count(node); }) == source_nodes.end(); const auto invalid_id = [&view](const NodeID nid) { return nid >= view.NumberOfNodes(); }; const auto in_range_source = diff --git a/src/partitioner/inertial_flow.cpp b/src/partitioner/inertial_flow.cpp index 6bc5cf1b7..04805faaa 100644 --- a/src/partitioner/inertial_flow.cpp +++ b/src/partitioner/inertial_flow.cpp @@ -53,21 +53,25 @@ makeSpatialOrder(const BisectionGraphView &view, const double ratio, const doubl // adress of the very first node const auto node_zero = &(*view.Begin()); - std::transform(view.Begin(), view.End(), std::back_inserter(embedding), [&](const auto &node) { - const auto node_id = static_cast(&node - node_zero); - return NodeWithCoordinate{node_id, node.coordinate}; - }); + std::transform(view.Begin(), + view.End(), + std::back_inserter(embedding), + [&](const auto &node) + { + const auto node_id = static_cast(&node - node_zero); + return NodeWithCoordinate{node_id, node.coordinate}; + }); - const auto project = [slope](const auto &each) { + const auto project = [slope](const auto &each) + { auto lon = static_cast(each.coordinate.lon); auto lat = static_cast(each.coordinate.lat); return slope * lon + (1. - std::fabs(slope)) * lat; }; - const auto spatially = [&](const auto &lhs, const auto &rhs) { - return project(lhs) < project(rhs); - }; + const auto spatially = [&](const auto &lhs, const auto &rhs) + { return project(lhs) < project(rhs); }; const std::size_t n = ratio * embedding.size(); @@ -96,7 +100,8 @@ DinicMaxFlow::MinCut bestMinCut(const BisectionGraphView &view, DinicMaxFlow::MinCut best; best.num_edges = -1; - const auto get_balance = [&view, balance](const auto num_nodes_source) { + const auto get_balance = [&view, balance](const auto num_nodes_source) + { const auto perfect_balance = view.NumberOfNodes() / 2; const auto allowed_balance = balance * perfect_balance; const auto bigger_side = @@ -114,36 +119,41 @@ DinicMaxFlow::MinCut bestMinCut(const BisectionGraphView &view, tbb::blocked_range range{0, n, 1}; - const auto balance_delta = [&view](const auto num_nodes_source) { + const auto balance_delta = [&view](const auto num_nodes_source) + { const std::int64_t difference = static_cast(view.NumberOfNodes()) / 2 - num_nodes_source; return std::abs(difference); }; - tbb::parallel_for(range, [&](const auto &chunk) { - for (auto round = chunk.begin(), end = chunk.end(); round != end; ++round) - { - const auto slope = -1. + round * (2. / n); + tbb::parallel_for(range, + [&](const auto &chunk) + { + for (auto round = chunk.begin(), end = chunk.end(); round != end; ++round) + { + const auto slope = -1. + round * (2. / n); - auto order = makeSpatialOrder(view, ratio, slope); - auto cut = DinicMaxFlow()(view, order.sources, order.sinks); - auto cut_balance = get_balance(cut.num_nodes_source); + auto order = makeSpatialOrder(view, ratio, slope); + auto cut = DinicMaxFlow()(view, order.sources, order.sinks); + auto cut_balance = get_balance(cut.num_nodes_source); - { - std::lock_guard guard{lock}; + { + std::lock_guard guard{lock}; - // Swap to keep the destruction of the old object outside of critical section. - if (cut.num_edges * cut_balance < best.num_edges * best_balance || - (cut.num_edges == best.num_edges && - balance_delta(cut.num_nodes_source) < balance_delta(best.num_nodes_source))) - { - best_balance = cut_balance; - std::swap(best, cut); - } - } - // cut gets destroyed here - } - }); + // Swap to keep the destruction of the old object outside of + // critical section. + if (cut.num_edges * cut_balance < best.num_edges * best_balance || + (cut.num_edges == best.num_edges && + balance_delta(cut.num_nodes_source) < + balance_delta(best.num_nodes_source))) + { + best_balance = cut_balance; + std::swap(best, cut); + } + } + // cut gets destroyed here + } + }); return best; } diff --git a/src/partitioner/partitioner.cpp b/src/partitioner/partitioner.cpp index 636bd290e..e8544bf64 100644 --- a/src/partitioner/partitioner.cpp +++ b/src/partitioner/partitioner.cpp @@ -162,6 +162,14 @@ int Partitioner::Run(const PartitionerConfig &config) extractor::files::readManeuverOverrides(filename, maneuver_overrides, node_sequences); renumber(maneuver_overrides, permutation); renumber(node_sequences, permutation); + + // Although the vector is already sorted, the rename function changes the identifiers, so + // the order is not sorted now. So we sort by `from_node` again, so that later lookups can + // be done with a binary search. + std::sort(maneuver_overrides.begin(), + maneuver_overrides.end(), + [](const auto &a, const auto &b) { return a.start_node < b.start_node; }); + extractor::files::writeManeuverOverrides(filename, maneuver_overrides, node_sequences); } if (boost::filesystem::exists(config.GetPath(".osrm.hsgr"))) diff --git a/src/partitioner/recursive_bisection.cpp b/src/partitioner/recursive_bisection.cpp index de9e509d9..63b3a39fd 100644 --- a/src/partitioner/recursive_bisection.cpp +++ b/src/partitioner/recursive_bisection.cpp @@ -58,40 +58,48 @@ RecursiveBisection::RecursiveBisection(BisectionGraph &bisection_graph_, std::vector forest; forest.reserve(last - first); - std::transform(first, last, std::back_inserter(forest), [this](auto graph) { - return TreeNode{std::move(graph), internal_state.SCCDepth()}; - }); + std::transform(first, + last, + std::back_inserter(forest), + [this](auto graph) { + return TreeNode{std::move(graph), internal_state.SCCDepth()}; + }); using Feeder = tbb::feeder; TIMER_START(bisection); // Bisect graph into two parts. Get partition point and recurse left and right in parallel. - tbb::parallel_for_each(begin(forest), end(forest), [&](const TreeNode &node, Feeder &feeder) { - const auto cut = - computeInertialFlowCut(node.graph, num_optimizing_cuts, balance, boundary_factor); - const auto center = internal_state.ApplyBisection( - node.graph.Begin(), node.graph.End(), node.depth, cut.flags); + tbb::parallel_for_each( + begin(forest), + end(forest), + [&](const TreeNode &node, Feeder &feeder) + { + const auto cut = + computeInertialFlowCut(node.graph, num_optimizing_cuts, balance, boundary_factor); + const auto center = internal_state.ApplyBisection( + node.graph.Begin(), node.graph.End(), node.depth, cut.flags); - const auto terminal = [&](const auto &node) { - const auto maximum_depth = sizeof(BisectionID) * CHAR_BIT; - const auto too_small = node.graph.NumberOfNodes() < maximum_cell_size; - const auto too_deep = node.depth >= maximum_depth; - return too_small || too_deep; - }; + const auto terminal = [&](const auto &node) + { + const auto maximum_depth = sizeof(BisectionID) * CHAR_BIT; + const auto too_small = node.graph.NumberOfNodes() < maximum_cell_size; + const auto too_deep = node.depth >= maximum_depth; + return too_small || too_deep; + }; - BisectionGraphView left_graph{bisection_graph, node.graph.Begin(), center}; - TreeNode left_node{std::move(left_graph), node.depth + 1}; + BisectionGraphView left_graph{bisection_graph, node.graph.Begin(), center}; + TreeNode left_node{std::move(left_graph), node.depth + 1}; - if (!terminal(left_node)) - feeder.add(left_node); + if (!terminal(left_node)) + feeder.add(left_node); - BisectionGraphView right_graph{bisection_graph, center, node.graph.End()}; - TreeNode right_node{std::move(right_graph), node.depth + 1}; + BisectionGraphView right_graph{bisection_graph, center, node.graph.End()}; + TreeNode right_node{std::move(right_graph), node.depth + 1}; - if (!terminal(right_node)) - feeder.add(right_node); - }); + if (!terminal(right_node)) + feeder.add(right_node); + }); TIMER_STOP(bisection); diff --git a/src/partitioner/recursive_bisection_state.cpp b/src/partitioner/recursive_bisection_state.cpp index f6581674c..21acf142b 100644 --- a/src/partitioner/recursive_bisection_state.cpp +++ b/src/partitioner/recursive_bisection_state.cpp @@ -45,9 +45,8 @@ RecursiveBisectionState::ApplyBisection(const NodeIterator const_begin, } // Keep items with `0` as partition id to the left, move other to the right - auto by_flag_bit = [this, flag](const auto &node) { - return BisectionID{0} == (bisection_ids[node.original_id] & flag); - }; + auto by_flag_bit = [this, flag](const auto &node) + { return BisectionID{0} == (bisection_ids[node.original_id] & flag); }; auto begin = bisection_graph.Begin() + std::distance(bisection_graph.CBegin(), const_begin); const auto end = begin + std::distance(const_begin, const_end); @@ -59,26 +58,34 @@ RecursiveBisectionState::ApplyBisection(const NodeIterator const_begin, std::transform(const_begin, const_end, mapping.begin(), - [by_flag_bit, &lesser_id, &upper_id](const auto &node) { - return by_flag_bit(node) ? lesser_id++ : upper_id++; - }); + [by_flag_bit, &lesser_id, &upper_id](const auto &node) + { return by_flag_bit(node) ? lesser_id++ : upper_id++; }); // erase all edges that point into different partitions - std::for_each(begin, end, [&](auto &node) { - const auto node_flag = by_flag_bit(node); - bisection_graph.RemoveEdges(node, [&](const BisectionGraph::EdgeT &edge) { - const auto target_flag = by_flag_bit(*(const_begin + edge.target)); - return (node_flag != target_flag); - }); - }); + std::for_each(begin, + end, + [&](auto &node) + { + const auto node_flag = by_flag_bit(node); + bisection_graph.RemoveEdges(node, + [&](const BisectionGraph::EdgeT &edge) + { + const auto target_flag = + by_flag_bit(*(const_begin + edge.target)); + return (node_flag != target_flag); + }); + }); auto center = std::stable_partition(begin, end, by_flag_bit); // remap all remaining edges - std::for_each(const_begin, const_end, [&](const auto &node) { - for (auto &edge : bisection_graph.Edges(node)) - edge.target = mapping[edge.target]; - }); + std::for_each(const_begin, + const_end, + [&](const auto &node) + { + for (auto &edge : bisection_graph.Edges(node)) + edge.target = mapping[edge.target]; + }); return const_begin + std::distance(begin, center); } @@ -93,13 +100,13 @@ RecursiveBisectionState::PrePartitionWithSCC(const std::size_t small_component_s scc_algo.Run(); // Map Edges to Sccs - const auto in_small = [&scc_algo, small_component_size](const NodeID node_id) { - return scc_algo.GetComponentSize(scc_algo.GetComponentID(node_id)) <= small_component_size; - }; + const auto in_small = [&scc_algo, small_component_size](const NodeID node_id) + { return scc_algo.GetComponentSize(scc_algo.GetComponentID(node_id)) <= small_component_size; }; const constexpr std::size_t small_component_id = -1; std::unordered_map component_map; - const auto transform_id = [&](const NodeID node_id) -> std::size_t { + const auto transform_id = [&](const NodeID node_id) -> std::size_t + { if (in_small(node_id)) return small_component_id; else @@ -111,16 +118,19 @@ RecursiveBisectionState::PrePartitionWithSCC(const std::size_t small_component_s mapping[node.original_id] = component_map[transform_id(node.original_id)]++; // needs to remove edges, if we should ever switch to directed graphs here - std::stable_sort( - bisection_graph.Begin(), bisection_graph.End(), [&](const auto &lhs, const auto &rhs) { - return transform_id(lhs.original_id) < transform_id(rhs.original_id); - }); + std::stable_sort(bisection_graph.Begin(), + bisection_graph.End(), + [&](const auto &lhs, const auto &rhs) + { return transform_id(lhs.original_id) < transform_id(rhs.original_id); }); // remap all remaining edges - std::for_each(bisection_graph.Begin(), bisection_graph.End(), [&](const auto &node) { - for (auto &edge : bisection_graph.Edges(node)) - edge.target = mapping[edge.target]; - }); + std::for_each(bisection_graph.Begin(), + bisection_graph.End(), + [&](const auto &node) + { + for (auto &edge : bisection_graph.Edges(node)) + edge.target = mapping[edge.target]; + }); std::vector views; auto last = bisection_graph.CBegin(); @@ -139,7 +149,8 @@ RecursiveBisectionState::PrePartitionWithSCC(const std::size_t small_component_s } views.push_back(BisectionGraphView(bisection_graph, last, bisection_graph.CEnd())); - bool has_small_component = [&]() { + bool has_small_component = [&]() + { for (std::size_t i = 0; i < scc_algo.GetNumberOfComponents(); ++i) if (scc_algo.GetComponentSize(i) <= small_component_size) return true; @@ -154,7 +165,8 @@ RecursiveBisectionState::PrePartitionWithSCC(const std::size_t small_component_s // ceil(log_2(components)) scc_levels = ceil(log(views.size()) / log(2.0)); - const auto conscutive_component_id = [&](const NodeID nid) { + const auto conscutive_component_id = [&](const NodeID nid) + { const auto component_id = transform_id(nid); const auto itr = ordered_component_ids.find(component_id); BOOST_ASSERT(itr != ordered_component_ids.end()); diff --git a/src/partitioner/renumber.cpp b/src/partitioner/renumber.cpp index 278a0ea81..14f2ca660 100644 --- a/src/partitioner/renumber.cpp +++ b/src/partitioner/renumber.cpp @@ -46,10 +46,10 @@ std::vector makePermutation(const DynamicEdgeBasedGraph &graph, // Nodes in the same cell will be sorted by cell ID on the level below for (const auto &partition : partitions) { - std::stable_sort( - ordering.begin(), ordering.end(), [&partition](const auto lhs, const auto rhs) { - return partition[lhs] < partition[rhs]; - }); + std::stable_sort(ordering.begin(), + ordering.end(), + [&partition](const auto lhs, const auto rhs) + { return partition[lhs] < partition[rhs]; }); } // Now sort the nodes by the level at which they are a border node, descening. @@ -57,10 +57,10 @@ std::vector makePermutation(const DynamicEdgeBasedGraph &graph, // whereas nodes that are nerver border nodes are sorted to the end of the array. // Note: Since we use a stable sort that preserves the cell sorting within each level auto border_level = getHighestBorderLevel(graph, partitions); - std::stable_sort( - ordering.begin(), ordering.end(), [&border_level](const auto lhs, const auto rhs) { - return border_level[lhs] > border_level[rhs]; - }); + std::stable_sort(ordering.begin(), + ordering.end(), + [&border_level](const auto lhs, const auto rhs) + { return border_level[lhs] > border_level[rhs]; }); return util::orderingToPermutation(ordering); } diff --git a/src/server/connection.cpp b/src/server/connection.cpp index c67b40be8..c3c07a340 100644 --- a/src/server/connection.cpp +++ b/src/server/connection.cpp @@ -7,14 +7,17 @@ #include #include +#include #include namespace osrm::server { -Connection::Connection(boost::asio::io_context &io_context, RequestHandler &handler) +Connection::Connection(boost::asio::io_context &io_context, + RequestHandler &handler, + short keepalive_timeout) : strand(boost::asio::make_strand(io_context)), TCP_socket(strand), timer(strand), - request_handler(handler) + request_handler(handler), keepalive_timeout(keepalive_timeout) { } @@ -88,7 +91,9 @@ void Connection::handle_read(const boost::system::error_code &error, std::size_t { keep_alive = true; current_reply.headers.emplace_back("Connection", "keep-alive"); - current_reply.headers.emplace_back("Keep-Alive", "timeout=5, max=512"); + current_reply.headers.emplace_back("Keep-Alive", + "timeout=" + fmt::to_string(keepalive_timeout) + + ", max=" + fmt::to_string(processed_requests)); } // compress the result w/ gzip/deflate if requested diff --git a/src/server/request_handler.cpp b/src/server/request_handler.cpp index 0565e99a9..78408865d 100644 --- a/src/server/request_handler.cpp +++ b/src/server/request_handler.cpp @@ -9,21 +9,16 @@ #include "util/log.hpp" #include "util/string_util.hpp" #include "util/timing_util.hpp" -#include "util/typedefs.hpp" #include "engine/status.hpp" #include "osrm/osrm.hpp" #include "util/json_container.hpp" #include -#include -#include #include #include -#include -#include #include #include @@ -36,6 +31,48 @@ void RequestHandler::RegisterServiceHandler( service_handler = std::move(service_handler_); } +void SendResponse(ServiceHandler::ResultT &result, http::reply ¤t_reply) +{ + + current_reply.headers.emplace_back("Access-Control-Allow-Origin", "*"); + current_reply.headers.emplace_back("Access-Control-Allow-Methods", "GET"); + current_reply.headers.emplace_back("Access-Control-Allow-Headers", + "X-Requested-With, Content-Type"); + if (result.is()) + { + current_reply.headers.emplace_back("Content-Type", "application/json; charset=UTF-8"); + current_reply.headers.emplace_back("Content-Disposition", + "inline; filename=\"response.json\""); + + util::json::render(current_reply.content, result.get()); + } + else if (result.is()) + { + auto &buffer = result.get(); + current_reply.content.resize(buffer.GetSize()); + std::copy(buffer.GetBufferPointer(), + buffer.GetBufferPointer() + buffer.GetSize(), + current_reply.content.begin()); + + current_reply.headers.emplace_back( + "Content-Type", "application/x-flatbuffers;schema=osrm.engine.api.fbresult"); + } + else + { + BOOST_ASSERT(result.is()); + current_reply.content.resize(result.get().size()); + std::copy(result.get().cbegin(), + result.get().cend(), + current_reply.content.begin()); + + current_reply.headers.emplace_back("Content-Type", "application/x-protobuf"); + } + + // set headers + current_reply.headers.emplace_back("Content-Length", + std::to_string(current_reply.content.size())); +} + void RequestHandler::HandleRequest(const http::request ¤t_request, http::reply ¤t_reply) { if (!service_handler) @@ -96,43 +133,7 @@ void RequestHandler::HandleRequest(const http::request ¤t_request, http::r std::to_string(position) + ": \"" + context + "\""; } - current_reply.headers.emplace_back("Access-Control-Allow-Origin", "*"); - current_reply.headers.emplace_back("Access-Control-Allow-Methods", "GET"); - current_reply.headers.emplace_back("Access-Control-Allow-Headers", - "X-Requested-With, Content-Type"); - if (result.is()) - { - current_reply.headers.emplace_back("Content-Type", "application/json; charset=UTF-8"); - current_reply.headers.emplace_back("Content-Disposition", - "inline; filename=\"response.json\""); - - util::json::render(current_reply.content, result.get()); - } - else if (result.is()) - { - auto &buffer = result.get(); - current_reply.content.resize(buffer.GetSize()); - std::copy(buffer.GetBufferPointer(), - buffer.GetBufferPointer() + buffer.GetSize(), - current_reply.content.begin()); - - current_reply.headers.emplace_back( - "Content-Type", "application/x-flatbuffers;schema=osrm.engine.api.fbresult"); - } - else - { - BOOST_ASSERT(result.is()); - current_reply.content.resize(result.get().size()); - std::copy(result.get().cbegin(), - result.get().cend(), - current_reply.content.begin()); - - current_reply.headers.emplace_back("Content-Type", "application/x-protobuf"); - } - - // set headers - current_reply.headers.emplace_back("Content-Length", - std::to_string(current_reply.content.size())); + SendResponse(result, current_reply); if (!std::getenv("DISABLE_ACCESS_LOGGING")) { @@ -168,6 +169,19 @@ void RequestHandler::HandleRequest(const http::request ¤t_request, http::r << request_string; } } + catch (const util::DisabledDatasetException &e) + { + current_reply.status = http::reply::bad_request; + + ServiceHandler::ResultT result = util::json::Object(); + auto &json_result = result.get(); + json_result.values["code"] = "DisabledDataset"; + json_result.values["message"] = e.what(); + SendResponse(result, current_reply); + + util::Log(logWARNING) << "[disabled dataset error][" << tid << "] code: DisabledDataset_" + << e.Dataset() << ", uri: " << current_request.uri; + } catch (const std::exception &e) { current_reply = http::reply::stock_reply(http::reply::internal_server_error); diff --git a/src/storage/storage.cpp b/src/storage/storage.cpp index a24d67af1..65f422a31 100644 --- a/src/storage/storage.cpp +++ b/src/storage/storage.cpp @@ -294,17 +294,20 @@ std::vector> Storage::GetStaticFiles() std::vector> files = { {IS_OPTIONAL, config.GetPath(".osrm.cells")}, {IS_OPTIONAL, config.GetPath(".osrm.partition")}, - {IS_REQUIRED, config.GetPath(".osrm.icd")}, - {IS_REQUIRED, config.GetPath(".osrm.properties")}, - {IS_REQUIRED, config.GetPath(".osrm.nbg_nodes")}, {IS_REQUIRED, config.GetPath(".osrm.ebg_nodes")}, - {IS_REQUIRED, config.GetPath(".osrm.tls")}, - {IS_REQUIRED, config.GetPath(".osrm.tld")}, - {IS_REQUIRED, config.GetPath(".osrm.timestamp")}, {IS_REQUIRED, config.GetPath(".osrm.maneuver_overrides")}, - {IS_REQUIRED, config.GetPath(".osrm.edges")}, - {IS_REQUIRED, config.GetPath(".osrm.names")}, - {IS_REQUIRED, config.GetPath(".osrm.ramIndex")}}; + {IS_REQUIRED, config.GetPath(".osrm.nbg_nodes")}, + {IS_REQUIRED, config.GetPath(".osrm.ramIndex")}, + {IS_REQUIRED, config.GetPath(".osrm.properties")}, + {IS_REQUIRED, config.GetPath(".osrm.timestamp")}}; + + for (const auto &file : {".osrm.edges", ".osrm.names", ".osrm.icd", ".osrm.tls", ".osrm.tld"}) + { + if (config.IsRequiredConfiguredInput(file)) + { + files.push_back({IS_REQUIRED, config.GetPath(file)}); + } + } for (const auto &file : files) { @@ -394,12 +397,6 @@ void Storage::PopulateStaticData(const SharedDataIndex &index) absolute_file_index_path.begin(), absolute_file_index_path.end(), file_index_path_ptr); } - // Name data - { - auto name_table = make_name_table_view(index, "/common/names"); - extractor::files::readNames(config.GetPath(".osrm.names"), name_table); - } - // Timestamp mark { auto timestamp_ref = make_timestamp_view(index, "/common/timestamp"); @@ -412,25 +409,39 @@ void Storage::PopulateStaticData(const SharedDataIndex &index) } // Turn lane data + if (config.IsRequiredConfiguredInput(".osrm.tld")) { auto turn_lane_data = make_lane_data_view(index, "/common/turn_lanes"); extractor::files::readTurnLaneData(config.GetPath(".osrm.tld"), turn_lane_data); } // Turn lane descriptions + if (config.IsRequiredConfiguredInput(".osrm.tls")) { auto views = make_turn_lane_description_views(index, "/common/turn_lanes"); extractor::files::readTurnLaneDescriptions( config.GetPath(".osrm.tls"), std::get<0>(views), std::get<1>(views)); } - // Load edge-based nodes data + // Load intersection data + if (config.IsRequiredConfiguredInput(".osrm.icd")) { - auto node_data = make_ebn_data_view(index, "/common/ebg_node_data"); - extractor::files::readNodeData(config.GetPath(".osrm.ebg_nodes"), node_data); + auto intersection_bearings_view = + make_intersection_bearings_view(index, "/common/intersection_bearings"); + auto entry_classes = make_entry_classes_view(index, "/common/entry_classes"); + extractor::files::readIntersections( + config.GetPath(".osrm.icd"), intersection_bearings_view, entry_classes); + } + + // Name data + if (config.IsRequiredConfiguredInput(".osrm.names")) + { + auto name_table = make_name_table_view(index, "/common/names"); + extractor::files::readNames(config.GetPath(".osrm.names"), name_table); } // Load original edge data + if (config.IsRequiredConfiguredInput(".osrm.edges")) { auto turn_data = make_turn_data_view(index, "/common/turn_data"); @@ -441,6 +452,12 @@ void Storage::PopulateStaticData(const SharedDataIndex &index) config.GetPath(".osrm.edges"), turn_data, *connectivity_checksum_ptr); } + // Load edge-based nodes data + { + auto node_data = make_ebn_data_view(index, "/common/ebg_node_data"); + extractor::files::readNodeData(config.GetPath(".osrm.ebg_nodes"), node_data); + } + // Loading list of coordinates { auto views = make_nbn_data_view(index, "/common/nbn_data"); @@ -466,15 +483,6 @@ void Storage::PopulateStaticData(const SharedDataIndex &index) metric_name = profile_properties_ptr->GetWeightName(); } - // Load intersection data - { - auto intersection_bearings_view = - make_intersection_bearings_view(index, "/common/intersection_bearings"); - auto entry_classes = make_entry_classes_view(index, "/common/entry_classes"); - extractor::files::readIntersections( - config.GetPath(".osrm.icd"), intersection_bearings_view, entry_classes); - } - if (boost::filesystem::exists(config.GetPath(".osrm.partition"))) { auto mlp = make_partition_view(index, "/mld/multilevelpartition"); @@ -545,15 +553,18 @@ void Storage::PopulateUpdatableData(const SharedDataIndex &index) contractor::files::readGraph( config.GetPath(".osrm.hsgr"), metrics, graph_connectivity_checksum); - auto turns_connectivity_checksum = - *index.GetBlockPtr("/common/connectivity_checksum"); - if (turns_connectivity_checksum != graph_connectivity_checksum) + if (config.IsRequiredConfiguredInput("osrm.edges")) { - throw util::exception( - "Connectivity checksum " + std::to_string(graph_connectivity_checksum) + " in " + - config.GetPath(".osrm.hsgr").string() + " does not equal to checksum " + - std::to_string(turns_connectivity_checksum) + " in " + - config.GetPath(".osrm.edges").string()); + auto turns_connectivity_checksum = + *index.GetBlockPtr("/common/connectivity_checksum"); + if (turns_connectivity_checksum != graph_connectivity_checksum) + { + throw util::exception( + "Connectivity checksum " + std::to_string(graph_connectivity_checksum) + + " in " + config.GetPath(".osrm.hsgr").string() + + " does not equal to checksum " + std::to_string(turns_connectivity_checksum) + + " in " + config.GetPath(".osrm.edges").string()); + } } } @@ -573,15 +584,18 @@ void Storage::PopulateUpdatableData(const SharedDataIndex &index) customizer::files::readGraph( config.GetPath(".osrm.mldgr"), graph_view, graph_connectivity_checksum); - auto turns_connectivity_checksum = - *index.GetBlockPtr("/common/connectivity_checksum"); - if (turns_connectivity_checksum != graph_connectivity_checksum) + if (config.IsRequiredConfiguredInput("osrm.edges")) { - throw util::exception( - "Connectivity checksum " + std::to_string(graph_connectivity_checksum) + " in " + - config.GetPath(".osrm.hsgr").string() + " does not equal to checksum " + - std::to_string(turns_connectivity_checksum) + " in " + - config.GetPath(".osrm.edges").string()); + auto turns_connectivity_checksum = + *index.GetBlockPtr("/common/connectivity_checksum"); + if (turns_connectivity_checksum != graph_connectivity_checksum) + { + throw util::exception( + "Connectivity checksum " + std::to_string(graph_connectivity_checksum) + + " in " + config.GetPath(".osrm.mldgr").string() + + " does not equal to checksum " + std::to_string(turns_connectivity_checksum) + + " in " + config.GetPath(".osrm.edges").string()); + } } } } diff --git a/src/storage/storage_config.cpp b/src/storage/storage_config.cpp new file mode 100644 index 000000000..40ca707a6 --- /dev/null +++ b/src/storage/storage_config.cpp @@ -0,0 +1,23 @@ +#include "osrm/datasets.hpp" +#include "osrm/exception.hpp" +#include "util/exception_utils.hpp" +#include + +namespace osrm::storage +{ +std::istream &operator>>(std::istream &in, FeatureDataset &datasets) +{ + std::string token; + in >> token; + boost::to_lower(token); + + if (token == "route_steps") + datasets = FeatureDataset::ROUTE_STEPS; + else if (token == "route_geometry") + datasets = FeatureDataset::ROUTE_GEOMETRY; + else + throw util::RuntimeError(token, ErrorCode::UnknownFeatureDataset, SOURCE_REF); + return in; +} + +} // namespace osrm::storage diff --git a/src/tools/partition.cpp b/src/tools/partition.cpp index 44f06fad7..acc06a045 100644 --- a/src/tools/partition.cpp +++ b/src/tools/partition.cpp @@ -53,7 +53,8 @@ void validate(boost::any &v, const std::vector &values, MaxCellSize std::transform(std::sregex_token_iterator(s.begin(), s.end(), re, -1), std::sregex_token_iterator(), std::back_inserter(output), - [](const auto &x) { + [](const auto &x) + { try { return boost::lexical_cast(x); @@ -215,7 +216,8 @@ try return EXIT_FAILURE; } - auto check_file = [](const boost::filesystem::path &path) { + auto check_file = [](const boost::filesystem::path &path) + { if (!boost::filesystem::is_regular_file(path)) { util::Log(logERROR) << "Input file " << path << " not found!"; diff --git a/src/tools/routed.cpp b/src/tools/routed.cpp index e8fb36695..4f2fae5ef 100644 --- a/src/tools/routed.cpp +++ b/src/tools/routed.cpp @@ -4,6 +4,7 @@ #include "util/meminfo.hpp" #include "util/version.hpp" +#include "osrm/datasets.hpp" #include "osrm/engine_config.hpp" #include "osrm/exception.hpp" #include "osrm/osrm.hpp" @@ -12,6 +13,7 @@ #include #include #include +#include #include #include @@ -22,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -68,8 +69,36 @@ std::istream &operator>>(std::istream &in, EngineConfig::Algorithm &algorithm) throw util::RuntimeError(token, ErrorCode::UnknownAlgorithm, SOURCE_REF); return in; } + } // namespace osrm::engine +// overload validate for the double type to allow "unlimited" as an input +namespace boost +{ +void validate(boost::any &v, const std::vector &values, double *, double) +{ + boost::program_options::validators::check_first_occurrence(v); + const std::string &s = boost::program_options::validators::get_single_string(values); + + if (s == "unlimited") + { + v = -1.0; + } + else + { + try + { + v = std::stod(s); + } + catch (const std::invalid_argument &) + { + throw boost::program_options::validation_error( + boost::program_options::validation_error::invalid_option_value); + } + } +} +} // namespace boost + // generate boost::program_options object for the routing part inline unsigned generateServerProgramOptions(const int argc, const char *argv[], @@ -78,7 +107,8 @@ inline unsigned generateServerProgramOptions(const int argc, int &ip_port, bool &trial, EngineConfig &config, - int &requested_thread_num) + int &requested_thread_num, + short &keepalive_timeout) { using boost::filesystem::path; using boost::program_options::value; @@ -111,6 +141,9 @@ inline unsigned generateServerProgramOptions(const int argc, ("threads,t", value(&requested_thread_num)->default_value(hardware_threads), "Number of threads to use") // + ("keepalive-timeout,k", + value(&keepalive_timeout)->default_value(5), + "Default keepalive-timeout. Default: 5 seconds.") // ("shared-memory,s", value(&config.use_shared_memory)->implicit_value(true)->default_value(false), "Load data from shared memory") // @@ -127,6 +160,10 @@ inline unsigned generateServerProgramOptions(const int argc, value(&config.algorithm) ->default_value(EngineConfig::Algorithm::CH, "CH"), "Algorithm to use for the data. Can be CH, CoreCH, MLD.") // + ("disable-feature-dataset", + value>(&config.disable_feature_dataset)->multitoken(), + "Disables a feature dataset from being loaded into memory if not needed. Options: " + "ROUTE_STEPS, ROUTE_GEOMETRY") // ("max-viaroute-size", value(&config.max_locations_viaroute)->default_value(500), "Max. locations supported in viaroute query") // @@ -149,7 +186,7 @@ inline unsigned generateServerProgramOptions(const int argc, value(&config.max_radius_map_matching)->default_value(-1.0), "Max. radius size supported in map matching query. Default: unlimited.") // ("default-radius", - value>(&config.default_radius), + value>(&config.default_radius)->default_value(-1.0), "Default radius size for queries. Default: unlimited."); // hidden options, will be allowed on command line, but will not be shown to the user @@ -233,8 +270,16 @@ try boost::filesystem::path base_path; int requested_thread_num = 1; - const unsigned init_result = generateServerProgramOptions( - argc, argv, base_path, ip_address, ip_port, trial_run, config, requested_thread_num); + short keepalive_timeout = 5; + const unsigned init_result = generateServerProgramOptions(argc, + argv, + base_path, + ip_address, + ip_port, + trial_run, + config, + requested_thread_num, + keepalive_timeout); if (init_result == INIT_OK_DO_NOT_START_ENGINE) { return EXIT_SUCCESS; @@ -248,7 +293,7 @@ try if (!base_path.empty()) { - config.storage_config = storage::StorageConfig(base_path); + config.storage_config = storage::StorageConfig(base_path, config.disable_feature_dataset); } if (!config.use_shared_memory && !config.storage_config.IsValid()) { @@ -274,6 +319,7 @@ try util::Log() << "Threads: " << requested_thread_num; util::Log() << "IP address: " << ip_address; util::Log() << "IP port: " << ip_port; + util::Log() << "Keepalive timeout: " << keepalive_timeout; #ifndef _WIN32 int sig = 0; @@ -286,7 +332,8 @@ try #endif auto service_handler = std::make_unique(config); - auto routing_server = server::Server::CreateServer(ip_address, ip_port, requested_thread_num); + auto routing_server = + server::Server::CreateServer(ip_address, ip_port, requested_thread_num, keepalive_timeout); routing_server->RegisterServiceHandler(std::move(service_handler)); @@ -296,10 +343,12 @@ try } else { - std::packaged_task server_task([&] { - routing_server->Run(); - return 0; - }); + std::packaged_task server_task( + [&] + { + routing_server->Run(); + return 0; + }); auto future = server_task.get_future(); std::thread server_thread(std::move(server_task)); diff --git a/src/tools/store.cpp b/src/tools/store.cpp index 1504d9ed2..e821610e8 100644 --- a/src/tools/store.cpp +++ b/src/tools/store.cpp @@ -2,6 +2,7 @@ #include "storage/shared_memory.hpp" #include "storage/shared_monitor.hpp" #include "storage/storage.hpp" +#include "osrm/storage_config.hpp" #include "osrm/exception.hpp" #include "util/log.hpp" @@ -9,6 +10,7 @@ #include "util/typedefs.hpp" #include "util/version.hpp" +#include #include #include @@ -100,7 +102,8 @@ bool generateDataStoreOptions(const int argc, std::string &dataset_name, bool &list_datasets, bool &list_blocks, - bool &only_metric) + bool &only_metric, + std::vector &disable_feature_dataset) { // declare a group of options that will be allowed only on command line boost::program_options::options_description generic_options("Options"); @@ -125,6 +128,12 @@ bool generateDataStoreOptions(const int argc, boost::program_options::value(&dataset_name)->default_value(""), "Name of the dataset to load into memory. This allows having multiple datasets in memory " "at the same time.") // + ("disable-feature-dataset", + boost::program_options::value>( + &disable_feature_dataset) + ->multitoken(), + "Disables a feature dataset from being loaded into memory if not needed. Options: " + "ROUTE_STEPS, ROUTE_GEOMETRY") // ("list", boost::program_options::value(&list_datasets) ->default_value(false) @@ -239,6 +248,7 @@ try bool list_datasets = false; bool list_blocks = false; bool only_metric = false; + std::vector disable_feature_dataset; if (!generateDataStoreOptions(argc, argv, verbosity, @@ -247,7 +257,8 @@ try dataset_name, list_datasets, list_blocks, - only_metric)) + only_metric, + disable_feature_dataset)) { return EXIT_SUCCESS; } @@ -260,7 +271,7 @@ try return EXIT_SUCCESS; } - storage::StorageConfig config(base_path); + storage::StorageConfig config(base_path, disable_feature_dataset); if (!config.IsValid()) { util::Log(logERROR) << "Config contains invalid file paths. Exiting!"; diff --git a/src/updater/csv_source.cpp b/src/updater/csv_source.cpp index 973162487..ffcdc9ac5 100644 --- a/src/updater/csv_source.cpp +++ b/src/updater/csv_source.cpp @@ -39,9 +39,9 @@ SegmentLookupTable readSegmentValues(const std::vector &paths) // Check consistency of keys in the result lookup table auto result = parser(paths); const auto found_inconsistency = - std::find_if(std::begin(result.lookup), std::end(result.lookup), [](const auto &entry) { - return entry.first.from == entry.first.to; - }); + std::find_if(std::begin(result.lookup), + std::end(result.lookup), + [](const auto &entry) { return entry.first.from == entry.first.to; }); if (found_inconsistency != std::end(result.lookup)) { util::Log(logWARNING) << "Empty segment in CSV with node " + diff --git a/src/updater/updater.cpp b/src/updater/updater.cpp index a9ec31a6f..d467675df 100644 --- a/src/updater/updater.cpp +++ b/src/updater/updater.cpp @@ -155,10 +155,11 @@ updateSegmentData(const UpdaterConfig &config, // closure to convert SpeedSource value to weight and count fallbacks to durations std::atomic fallbacks_to_duration{0}; - auto convertToWeight = [&profile_properties, - &fallbacks_to_duration](const SegmentWeight &existing_weight, - const SpeedSource &value, - double distance_in_meters) { + auto convertToWeight = + [&profile_properties, &fallbacks_to_duration](const SegmentWeight &existing_weight, + const SpeedSource &value, + double distance_in_meters) + { double rate = std::numeric_limits::quiet_NaN(); // if value.rate is not set, we fall back to duration @@ -211,96 +212,104 @@ updateSegmentData(const UpdaterConfig &config, using DirectionalGeometryID = extractor::SegmentDataContainer::DirectionalGeometryID; auto range = tbb::blocked_range(0, segment_data.GetNumberOfGeometries()); - tbb::parallel_for(range, [&](const auto &range) { - auto &counters = segment_speeds_counters.local(); - std::vector segment_lengths; - for (auto geometry_id = range.begin(); geometry_id < range.end(); geometry_id++) + tbb::parallel_for( + range, + [&](const auto &range) { - auto nodes_range = segment_data.GetForwardGeometry(geometry_id); - - segment_lengths.clear(); - segment_lengths.reserve(nodes_range.size() + 1); - util::for_each_pair(nodes_range, [&](const auto &u, const auto &v) { - segment_lengths.push_back(util::coordinate_calculation::greatCircleDistance( - coordinates[u], coordinates[v])); - }); - - auto fwd_weights_range = segment_data.GetForwardWeights(geometry_id); - auto fwd_durations_range = segment_data.GetForwardDurations(geometry_id); - auto fwd_datasources_range = segment_data.GetForwardDatasources(geometry_id); - bool fwd_was_updated = false; - for (const auto segment_offset : util::irange(0, fwd_weights_range.size())) + auto &counters = segment_speeds_counters.local(); + std::vector segment_lengths; + for (auto geometry_id = range.begin(); geometry_id < range.end(); geometry_id++) { - auto u = osm_node_ids[nodes_range[segment_offset]]; - auto v = osm_node_ids[nodes_range[segment_offset + 1]]; + auto nodes_range = segment_data.GetForwardGeometry(geometry_id); - // Self-loops are artifical segments (e.g. traffic light nodes), do not - // waste time updating them with traffic data - if (u == v) - continue; + segment_lengths.clear(); + segment_lengths.reserve(nodes_range.size() + 1); + util::for_each_pair(nodes_range, + [&](const auto &u, const auto &v) + { + segment_lengths.push_back( + util::coordinate_calculation::greatCircleDistance( + coordinates[u], coordinates[v])); + }); - if (auto value = segment_speed_lookup({u, v})) + auto fwd_weights_range = segment_data.GetForwardWeights(geometry_id); + auto fwd_durations_range = segment_data.GetForwardDurations(geometry_id); + auto fwd_datasources_range = segment_data.GetForwardDatasources(geometry_id); + bool fwd_was_updated = false; + for (const auto segment_offset : + util::irange(0, fwd_weights_range.size())) { - auto segment_length = segment_lengths[segment_offset]; - auto new_duration = convertToDuration(value->speed, segment_length); - auto new_weight = - convertToWeight(fwd_weights_range[segment_offset], *value, segment_length); - fwd_was_updated = true; + auto u = osm_node_ids[nodes_range[segment_offset]]; + auto v = osm_node_ids[nodes_range[segment_offset + 1]]; - fwd_weights_range[segment_offset] = new_weight; - fwd_durations_range[segment_offset] = new_duration; - fwd_datasources_range[segment_offset] = value->source; - counters[value->source] += 1; + // Self-loops are artifical segments (e.g. traffic light nodes), do not + // waste time updating them with traffic data + if (u == v) + continue; + + if (auto value = segment_speed_lookup({u, v})) + { + auto segment_length = segment_lengths[segment_offset]; + auto new_duration = convertToDuration(value->speed, segment_length); + auto new_weight = convertToWeight( + fwd_weights_range[segment_offset], *value, segment_length); + fwd_was_updated = true; + + fwd_weights_range[segment_offset] = new_weight; + fwd_durations_range[segment_offset] = new_duration; + fwd_datasources_range[segment_offset] = value->source; + counters[value->source] += 1; + } + else + { + counters[LUA_SOURCE] += 1; + } } - else + if (fwd_was_updated) + updated_segments.push_back(GeometryID{geometry_id, true}); + + // In this case we want it oriented from in forward directions + auto rev_weights_range = + boost::adaptors::reverse(segment_data.GetReverseWeights(geometry_id)); + auto rev_durations_range = + boost::adaptors::reverse(segment_data.GetReverseDurations(geometry_id)); + auto rev_datasources_range = + boost::adaptors::reverse(segment_data.GetReverseDatasources(geometry_id)); + bool rev_was_updated = false; + + for (const auto segment_offset : + util::irange(0, rev_weights_range.size())) { - counters[LUA_SOURCE] += 1; + auto u = osm_node_ids[nodes_range[segment_offset]]; + auto v = osm_node_ids[nodes_range[segment_offset + 1]]; + + // Self-loops are artifical segments (e.g. traffic light nodes), do not + // waste time updating them with traffic data + if (u == v) + continue; + + if (auto value = segment_speed_lookup({v, u})) + { + auto segment_length = segment_lengths[segment_offset]; + auto new_duration = convertToDuration(value->speed, segment_length); + auto new_weight = convertToWeight( + rev_weights_range[segment_offset], *value, segment_length); + rev_was_updated = true; + + rev_weights_range[segment_offset] = new_weight; + rev_durations_range[segment_offset] = new_duration; + rev_datasources_range[segment_offset] = value->source; + counters[value->source] += 1; + } + else + { + counters[LUA_SOURCE] += 1; + } } + if (rev_was_updated) + updated_segments.push_back(GeometryID{geometry_id, false}); } - if (fwd_was_updated) - updated_segments.push_back(GeometryID{geometry_id, true}); - - // In this case we want it oriented from in forward directions - auto rev_weights_range = - boost::adaptors::reverse(segment_data.GetReverseWeights(geometry_id)); - auto rev_durations_range = - boost::adaptors::reverse(segment_data.GetReverseDurations(geometry_id)); - auto rev_datasources_range = - boost::adaptors::reverse(segment_data.GetReverseDatasources(geometry_id)); - bool rev_was_updated = false; - - for (const auto segment_offset : util::irange(0, rev_weights_range.size())) - { - auto u = osm_node_ids[nodes_range[segment_offset]]; - auto v = osm_node_ids[nodes_range[segment_offset + 1]]; - - // Self-loops are artifical segments (e.g. traffic light nodes), do not - // waste time updating them with traffic data - if (u == v) - continue; - - if (auto value = segment_speed_lookup({v, u})) - { - auto segment_length = segment_lengths[segment_offset]; - auto new_duration = convertToDuration(value->speed, segment_length); - auto new_weight = - convertToWeight(rev_weights_range[segment_offset], *value, segment_length); - rev_was_updated = true; - - rev_weights_range[segment_offset] = new_weight; - rev_durations_range[segment_offset] = new_duration; - rev_datasources_range[segment_offset] = value->source; - counters[value->source] += 1; - } - else - { - counters[LUA_SOURCE] += 1; - } - } - if (rev_was_updated) - updated_segments.push_back(GeometryID{geometry_id, false}); - } - }); // parallel_for + }); // parallel_for counters_type merged_counters(num_counters, 0); for (const auto &counters : segment_speeds_counters) @@ -587,20 +596,22 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e if (update_edge_weights || update_turn_penalties || update_conditional_turns) { tbb::parallel_invoke( - [&] { - extractor::files::readSegmentData(config.GetPath(".osrm.geometry"), segment_data); - }, + [&] + { extractor::files::readSegmentData(config.GetPath(".osrm.geometry"), segment_data); }, [&] { extractor::files::readNodeData(config.GetPath(".osrm.ebg_nodes"), node_data); }, - [&] { + [&] + { extractor::files::readTurnWeightPenalty( config.GetPath(".osrm.turn_weight_penalties"), turn_weight_penalties); }, - [&] { + [&] + { extractor::files::readTurnDurationPenalty( config.GetPath(".osrm.turn_duration_penalties"), turn_duration_penalties); }, - [&] { + [&] + { extractor::files::readProfileProperties(config.GetPath(".osrm.properties"), profile_properties); }); @@ -647,7 +658,8 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e std::transform(updated_turn_penalties.begin(), updated_turn_penalties.end(), updated_segments.begin() + offset, - [&node_data, &edge_based_edge_list](const std::uint64_t turn_id) { + [&node_data, &edge_based_edge_list](const std::uint64_t turn_id) + { const auto node_id = edge_based_edge_list[turn_id].source; return node_data.GetGeometryID(node_id); }); @@ -672,7 +684,8 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e std::transform(updated_turn_penalties.begin(), updated_turn_penalties.end(), updated_segments.begin() + offset, - [&node_data, &edge_based_edge_list](const std::uint64_t turn_id) { + [&node_data, &edge_based_edge_list](const std::uint64_t turn_id) + { const auto node_id = edge_based_edge_list[turn_id].source; return node_data.GetGeometryID(node_id); }); @@ -680,13 +693,13 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e tbb::parallel_sort(updated_segments.begin(), updated_segments.end(), - [](const GeometryID lhs, const GeometryID rhs) { - return std::tie(lhs.id, lhs.forward) < std::tie(rhs.id, rhs.forward); - }); + [](const GeometryID lhs, const GeometryID rhs) + { return std::tie(lhs.id, lhs.forward) < std::tie(rhs.id, rhs.forward); }); using WeightAndDuration = std::tuple; const auto compute_new_weight_and_duration = - [&](const GeometryID geometry_id) -> WeightAndDuration { + [&](const GeometryID geometry_id) -> WeightAndDuration + { EdgeWeight new_weight = {0}; EdgeDuration new_duration = {0}; if (geometry_id.forward) @@ -728,7 +741,8 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e std::vector accumulated_segment_data(updated_segments.size()); tbb::parallel_for(tbb::blocked_range(0, updated_segments.size()), - [&](const auto &range) { + [&](const auto &range) + { for (auto index = range.begin(); index < range.end(); ++index) { accumulated_segment_data[index] = @@ -736,16 +750,16 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e } }); - const auto update_edge = [&](extractor::EdgeBasedEdge &edge) { + const auto update_edge = [&](extractor::EdgeBasedEdge &edge) + { const auto node_id = edge.source; const auto geometry_id = node_data.GetGeometryID(node_id); - auto updated_iter = std::lower_bound(updated_segments.begin(), - updated_segments.end(), - geometry_id, - [](const GeometryID lhs, const GeometryID rhs) { - return std::tie(lhs.id, lhs.forward) < - std::tie(rhs.id, rhs.forward); - }); + auto updated_iter = std::lower_bound( + updated_segments.begin(), + updated_segments.end(), + geometry_id, + [](const GeometryID lhs, const GeometryID rhs) + { return std::tie(lhs.id, lhs.forward) < std::tie(rhs.id, rhs.forward); }); if (updated_iter != updated_segments.end() && updated_iter->id == geometry_id.id && updated_iter->forward == geometry_id.forward) { @@ -806,7 +820,8 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e if (updated_segments.size() > 0) { tbb::parallel_for(tbb::blocked_range(0, edge_based_edge_list.size()), - [&](const auto &range) { + [&](const auto &range) + { for (auto index = range.begin(); index < range.end(); ++index) { update_edge(edge_based_edge_list[index]); @@ -817,11 +832,13 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector &e if (update_turn_penalties || update_conditional_turns) { tbb::parallel_invoke( - [&] { + [&] + { extractor::files::writeTurnWeightPenalty( config.GetPath(".osrm.turn_weight_penalties"), turn_weight_penalties); }, - [&] { + [&] + { extractor::files::writeTurnDurationPenalty( config.GetPath(".osrm.turn_duration_penalties"), turn_duration_penalties); }); diff --git a/src/util/coordinate_calculation.cpp b/src/util/coordinate_calculation.cpp index 4686a9827..72c61a6eb 100644 --- a/src/util/coordinate_calculation.cpp +++ b/src/util/coordinate_calculation.cpp @@ -318,22 +318,23 @@ double findClosestDistance(const std::vector &lhs, const std::vector { double current_min = std::numeric_limits::max(); - const auto compute_minimum_distance_in_rhs = [¤t_min, &rhs](const Coordinate coordinate) { + const auto compute_minimum_distance_in_rhs = [¤t_min, &rhs](const Coordinate coordinate) + { current_min = std::min(current_min, findClosestDistance(coordinate, rhs.begin(), rhs.end())); return false; }; // NOLINTNEXTLINE(bugprone-unused-return-value) - std::find_if(std::begin(lhs), std::end(lhs), compute_minimum_distance_in_rhs); + [[maybe_unused]] auto _ = + std::find_if(std::begin(lhs), std::end(lhs), compute_minimum_distance_in_rhs); return current_min; } std::vector getDeviations(const std::vector &from, const std::vector &to) { - auto find_deviation = [&to](const Coordinate coordinate) { - return findClosestDistance(coordinate, to.begin(), to.end()); - }; + auto find_deviation = [&to](const Coordinate coordinate) + { return findClosestDistance(coordinate, to.begin(), to.end()); }; std::vector deviations_from; deviations_from.reserve(from.size()); @@ -385,9 +386,9 @@ double computeArea(const std::vector &polygon) // ⚠ ref_latitude is the standard parallel for the equirectangular projection // that is not an area-preserving projection const auto ref_point = - std::min_element(polygon.begin(), polygon.end(), [](const auto &lhs, const auto &rhs) { - return lhs.lat < rhs.lat; - }); + std::min_element(polygon.begin(), + polygon.end(), + [](const auto &lhs, const auto &rhs) { return lhs.lat < rhs.lat; }); const auto ref_latitude = ref_point->lat; // Compute area of under a curve and a line that is parallel the equator with ref_latitude diff --git a/src/util/exception.cpp b/src/util/exception.cpp index f96fd43ff..a4146f289 100644 --- a/src/util/exception.cpp +++ b/src/util/exception.cpp @@ -1,5 +1,7 @@ #include "util/exception.hpp" +#include + // This function exists to 'anchor' the class, and stop the compiler from // copying vtable and RTTI info into every object file that includes // this header. (Caught by -Wweak-vtables under Clang.) @@ -16,4 +18,5 @@ namespace osrm::util void exception::anchor() const {} void RuntimeError::anchor() const {} +void DisabledDatasetException::anchor() const {} } // namespace osrm::util diff --git a/src/util/log.cpp b/src/util/log.cpp index 17196ec18..aee8594b7 100644 --- a/src/util/log.cpp +++ b/src/util/log.cpp @@ -73,7 +73,8 @@ void Log::Init() { const bool is_terminal = IsStdoutATTY(); - auto format = [is_terminal](const char *level, const char *color) { + auto format = [is_terminal](const char *level, const char *color) + { const auto timestamp = std::chrono::system_clock::now(); return fmt::format("{}[{:%FT%H:%M:}{:%S}] [{}] ", is_terminal ? color : "", diff --git a/src/util/opening_hours.cpp b/src/util/opening_hours.cpp index e50cfe867..d96c3f6b5 100644 --- a/src/util/opening_hours.cpp +++ b/src/util/opening_hours.cpp @@ -327,13 +327,9 @@ struct opening_hours_grammar : qi::grammar()> time_domain; diff --git a/src/util/timezones.cpp b/src/util/timezones.cpp index f11b1860a..e7ef96356 100644 --- a/src/util/timezones.cpp +++ b/src/util/timezones.cpp @@ -79,7 +79,8 @@ void Timezoner::LoadLocalTimesRTree(rapidjson::Document &geojson, std::time_t ut // Lambda function that returns local time in the tzname time zone // Thread safety: MT-Unsafe const:env std::unordered_map local_time_memo; - auto get_local_time_in_tz = [utc_time, &local_time_memo](const char *tzname) { + auto get_local_time_in_tz = [utc_time, &local_time_memo](const char *tzname) + { auto it = local_time_memo.find(tzname); if (it == local_time_memo.end()) { diff --git a/taginfo.json b/taginfo.json index 85c57071a..392e7c660 100644 --- a/taginfo.json +++ b/taginfo.json @@ -150,6 +150,7 @@ {"key": "maxspeed", "value": "AT:trunk"}, {"key": "maxspeed", "value": "BE:motorway"}, {"key": "maxspeed", "value": "BE-VLG:rural"}, + {"key": "maxspeed", "value": "BG:motorway"}, {"key": "maxspeed", "value": "BY:urban"}, {"key": "maxspeed", "value": "BY:motorway"}, {"key": "maxspeed", "value": "CA-ON:rural"}, @@ -171,6 +172,9 @@ {"key": "maxspeed", "value": "NL:trunk"}, {"key": "maxspeed", "value": "NO:rural"}, {"key": "maxspeed", "value": "NO:motorway"}, + {"key": "maxspeed", "value": "PH:urban"}, + {"key": "maxspeed", "value": "PH:rural"}, + {"key": "maxspeed", "value": "PH:motorway"}, {"key": "maxspeed", "value": "PL:rural"}, {"key": "maxspeed", "value": "PL:trunk"}, {"key": "maxspeed", "value": "PL:motorway"}, diff --git a/test/nodejs/constants.js b/test/nodejs/constants.js index 72b93da30..e56742e0c 100644 --- a/test/nodejs/constants.js +++ b/test/nodejs/constants.js @@ -10,7 +10,7 @@ exports.three_test_coordinates = [[7.41337, 43.72956], exports.two_test_coordinates = exports.three_test_coordinates.slice(0, 2) -exports.test_tile = {'at': [17059, 11948, 15], 'size': 156539}; +exports.test_tile = {'at': [17059, 11948, 15], 'size': 159125}; // Test files generated by the routing engine; check test/data if (process.env.OSRM_DATA_PATH !== undefined) { diff --git a/test/nodejs/index.js b/test/nodejs/index.js index dd6f44ea4..73667cb8c 100644 --- a/test/nodejs/index.js +++ b/test/nodejs/index.js @@ -118,10 +118,17 @@ test('constructor: takes a default_radius argument', function(assert) { assert.ok(osrm); }); +test('constructor: takes a default_radius unlimited argument', function(assert) { + assert.plan(1); + var osrm = new OSRM({algorithm: 'MLD', path: monaco_mld_path, default_radius: 'unlimited'}); + assert.ok(osrm); +}); + test('constructor: throws if default_radius is not a number', function(assert) { - assert.plan(2); - assert.throws(function() { new OSRM({algorithm: 'MLD', path: monaco_mld_path, default_radius: 'abc'}); }, /default_radius must be an integral number/, 'Does not accept string'); + assert.plan(3); + assert.throws(function() { new OSRM({algorithm: 'MLD', path: monaco_mld_path, default_radius: 'abc'}); }, /default_radius must be unlimited or an integral number/, 'Does not accept invalid string'); assert.ok(new OSRM({algorithm: 'MLD', path: monaco_mld_path, default_radius: 1}), 'Does accept number'); + assert.ok(new OSRM({algorithm: 'MLD', path: monaco_mld_path, default_radius: 'unlimited'}), 'Does accept unlimited'); }); test('constructor: parses custom limits', function(assert) { @@ -135,6 +142,7 @@ test('constructor: parses custom limits', function(assert) { max_locations_map_matching: 1, max_results_nearest: 1, max_alternatives: 1, + default_radius: 1 }); assert.ok(osrm); }); @@ -150,10 +158,48 @@ test('constructor: throws on invalid custom limits', function(assert) { max_locations_distance_table: false, max_locations_map_matching: 'a lot', max_results_nearest: null, - max_alternatives: '10' + max_alternatives: '10', + default_radius: '10' }) }); }); +test('constructor: throws on invalid disable_feature_dataset option', function(assert) { + assert.plan(1); + assert.throws(function() { + var osrm = new OSRM({ + path: monaco_path, + disable_feature_dataset: ['NOT_EXIST'], + }) + }); +}); + +test('constructor: throws on non-array disable_feature_dataset', function(assert) { + assert.plan(1); + assert.throws(function() { + var osrm = new OSRM({ + path: monaco_path, + disable_feature_dataset: 'ROUTE_GEOMETRY', + }) + }); +}); + +test('constructor: ok on valid disable_feature_dataset option', function(assert) { + assert.plan(1); + var osrm = new OSRM({ + path: monaco_path, + disable_feature_dataset: ['ROUTE_GEOMETRY'], + }); + assert.ok(osrm); +}); + +test('constructor: ok on multiple overlapping disable_feature_dataset options', function(assert) { + assert.plan(1); + var osrm = new OSRM({ + path: monaco_path, + disable_feature_dataset: ['ROUTE_GEOMETRY', 'ROUTE_STEPS'], + }); + assert.ok(osrm); +}); require('./route.js'); require('./trip.js'); diff --git a/test/nodejs/match.js b/test/nodejs/match.js index 611a47f14..b13da9183 100644 --- a/test/nodejs/match.js +++ b/test/nodejs/match.js @@ -398,3 +398,65 @@ test('match: match in Monaco with waypoints', function(assert) { })); }); }); + +test('match: throws on disabled geometry', function (assert) { + assert.plan(1); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + coordinates: three_test_coordinates.concat(three_test_coordinates), + }; + osrm.match(options, function(err, route) { + console.log(err) + assert.match(err.message, /DisabledDatasetException/); + }); +}); + +test('match: ok on disabled geometry', function (assert) { + assert.plan(2); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + steps: false, + overview: 'false', + annotations: false, + skip_waypoints: true, + coordinates: three_test_coordinates.concat(three_test_coordinates), + }; + osrm.match(options, function(err, response) { + assert.ifError(err); + assert.equal(response.matchings.length, 1); + }); +}); + +test('match: throws on disabled steps', function (assert) { + assert.plan(1); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_STEPS']}); + var options = { + steps: true, + coordinates: three_test_coordinates.concat(three_test_coordinates), + }; + osrm.match(options, function(err, route) { + console.log(err) + assert.match(err.message, /DisabledDatasetException/); + }); +}); + +test('match: ok on disabled steps', function (assert) { + assert.plan(8); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_STEPS']}); + var options = { + steps: false, + overview: 'simplified', + annotations: true, + coordinates: three_test_coordinates.concat(three_test_coordinates), + }; + osrm.match(options, function(err, response) { + assert.ifError(err); + assert.ok(response.tracepoints); + assert.ok(response.matchings); + assert.equal(response.matchings.length, 1); + assert.ok(response.matchings[0].geometry, "the match has geometry"); + assert.ok(response.matchings[0].legs, "the match has legs"); + assert.notok(response.matchings[0].legs.every(l => { return l.steps.length > 0; }), 'every leg has steps'); + assert.ok(response.matchings[0].legs.every(l => { return l.annotation;}), 'every leg has annotations'); + }); +}); diff --git a/test/nodejs/nearest.js b/test/nodejs/nearest.js index 02879910b..d0e7e69c5 100644 --- a/test/nodejs/nearest.js +++ b/test/nodejs/nearest.js @@ -103,3 +103,40 @@ test('nearest: nearest in Monaco without motorways', function(assert) { assert.equal(response.waypoints.length, 1); }); }); + +test('nearest: throws on disabled geometry', function(assert) { + assert.plan(1); + var osrm = new OSRM({path: data_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + coordinates: [two_test_coordinates[0]], + }; + osrm.nearest(options, function(err, response) { + console.log(err) + assert.match(err.message, /DisabledDatasetException/); + }); +}); +test('nearest: ok on disabled geometry', function(assert) { + assert.plan(2); + var osrm = new OSRM({path: data_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + coordinates: [two_test_coordinates[0]], + skip_waypoints: true, + }; + osrm.nearest(options, function(err, response) { + assert.ifError(err); + assert.notok(response.waypoints); + + }); +}); + +test('nearest: ok on disabled steps', function(assert) { + assert.plan(2); + var osrm = new OSRM({path: data_path, 'disable_feature_dataset': ['ROUTE_STEPS']}); + var options = { + coordinates: [two_test_coordinates[0]], + }; + osrm.nearest(options, function(err, response) { + assert.ifError(err); + assert.equal(response.waypoints.length, 1); + }); +}); diff --git a/test/nodejs/route.js b/test/nodejs/route.js index d0f1ddf49..f84ced4e0 100644 --- a/test/nodejs/route.js +++ b/test/nodejs/route.js @@ -573,7 +573,7 @@ test('route: throws on bad radiuses', function(assert) { }); test('route: routes Monaco with valid approaches values', function(assert) { - assert.plan(3); + assert.plan(4); var osrm = new OSRM(monaco_path); var options = { coordinates: two_test_coordinates, @@ -586,6 +586,10 @@ test('route: routes Monaco with valid approaches values', function(assert) { osrm.route(options, function(err, route) { assert.ifError(err); }); + options.approaches = ['opposite', 'opposite']; + osrm.route(options, function(err, route) { + assert.ifError(err); + }); options.approaches = ['unrestricted', null]; osrm.route(options, function(err, route) { assert.ifError(err); @@ -609,12 +613,12 @@ test('route: throws on bad approaches', function(assert) { coordinates: two_test_coordinates, approaches: ['curb', 'test'] }, function(err, route) {}) }, - /'approaches' param must be one of \[curb, unrestricted\]/); + /'approaches' param must be one of \[curb, opposite, unrestricted\]/); assert.throws(function() { osrm.route({ coordinates: two_test_coordinates, approaches: [10, 15] }, function(err, route) {}) }, - /Approach must be a string: \[curb, unrestricted\] or null/); + /Approach must be a string: \[curb, opposite, unrestricted\] or null/); }); test('route: routes Monaco with custom limits on MLD', function(assert) { @@ -761,4 +765,66 @@ test('route: snapping parameter passed through OK', function(assert) { assert.ifError(err); assert.equal(Math.round(route.routes[0].distance * 10), 1315); // Round it to nearest 0.1m to eliminate floating point comparison error }); -}); \ No newline at end of file +}); + +test('route: throws on disabled geometry', function (assert) { + assert.plan(1); + var osrm = new OSRM({'path': monaco_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + coordinates: three_test_coordinates, + }; + osrm.route(options, function(err, route) { + console.log(err) + assert.match(err.message, /DisabledDatasetException/); + }); +}); + +test('route: ok on disabled geometry', function (assert) { + assert.plan(2); + var osrm = new OSRM({'path': monaco_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + steps: false, + overview: 'false', + annotations: false, + skip_waypoints: true, + coordinates: three_test_coordinates, + }; + osrm.route(options, function(err, response) { + assert.ifError(err); + assert.equal(response.routes.length, 1); + }); +}); + +test('route: throws on disabled steps', function (assert) { + assert.plan(1); + var osrm = new OSRM({'path': monaco_path, 'disable_feature_dataset': ['ROUTE_STEPS']}); + var options = { + steps: true, + coordinates: three_test_coordinates, + }; + osrm.route(options, function(err, route) { + console.log(err) + assert.match(err.message, /DisabledDatasetException/); + }); +}); + +test('route: ok on disabled steps', function (assert) { + assert.plan(8); + var osrm = new OSRM({'path': monaco_path, 'disable_feature_dataset': ['ROUTE_STEPS']}); + var options = { + steps: false, + overview: 'simplified', + annotations: true, + coordinates: three_test_coordinates, + }; + osrm.route(options, function(err, response) { + assert.ifError(err); + assert.ok(response.waypoints); + assert.ok(response.routes); + assert.equal(response.routes.length, 1); + assert.ok(response.routes[0].geometry, "the route has geometry"); + assert.ok(response.routes[0].legs, "the route has legs"); + assert.notok(response.routes[0].legs.every(l => { return l.steps.length > 0; }), 'every leg has steps'); + assert.ok(response.routes[0].legs.every(l => { return l.annotation;}), 'every leg has annotations'); + }); +}); diff --git a/test/nodejs/table.js b/test/nodejs/table.js index 0285d1aea..0d88bc4a1 100644 --- a/test/nodejs/table.js +++ b/test/nodejs/table.js @@ -19,7 +19,7 @@ test('table: flatbuffer format', function(assert) { assert.ok(table instanceof Buffer); const fb = FBResult.getRootAsFBResult(new flatbuffers.ByteBuffer(table)); assert.ok(fb.table()); - + }); }); @@ -369,3 +369,43 @@ tables.forEach(function(annotation) { }); }); +test('table: throws on disabled geometry', function (assert) { + assert.plan(1); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + coordinates: [three_test_coordinates[0], three_test_coordinates[1]], + }; + osrm.table(options, function(err, table) { + console.log(err) + assert.match(err.message, /DisabledDatasetException/); + }); +}); + +test('table: ok on disabled geometry', function (assert) { + assert.plan(4); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + coordinates: [three_test_coordinates[0], three_test_coordinates[1]], + skip_waypoints: true + }; + osrm.table(options, function(err, table) { + assert.ifError(err); + assert.ok(table.durations, 'distances table result should exist'); + assert.notok(table.sources) + assert.notok(table.destinations) + }); +}); + +test('table: ok on disabled steps', function (assert) { + assert.plan(4); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_STEPS']}); + var options = { + coordinates: [three_test_coordinates[0], three_test_coordinates[1]], + }; + osrm.table(options, function(err, table) { + assert.ifError(err); + assert.ok(table.durations, 'distances table result should exist'); + assert.ok(table.sources.length, 2) + assert.ok(table.destinations.length, 2) + }); +}); diff --git a/test/nodejs/tile.js b/test/nodejs/tile.js index e8e4a272f..f0869529e 100644 --- a/test/nodejs/tile.js +++ b/test/nodejs/tile.js @@ -23,3 +23,20 @@ test.test('tile interface pre-conditions', function(assert) { assert.throws(function() { osrm.tile(17059, 11948, 15, function(err, result) {}) }, /must be an array \[x, y, z\]/); assert.throws(function() { osrm.tile([17059, 11948, -15], function(err, result) {}) }, /must be unsigned/); }); + +test.test('tile fails to load with geometry disabled', function(assert) { + assert.plan(1); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + osrm.tile(tile.at, function(err, result) { + console.log(err) + assert.match(err.message, /DisabledDatasetException/); + }); +}); +test.test('tile ok with steps disabled', function(assert) { + assert.plan(2); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_STEPS']}); + osrm.tile(tile.at, function(err, result) { + assert.ifError(err); + assert.equal(result.length, tile.size); + }); +}); diff --git a/test/nodejs/trip.js b/test/nodejs/trip.js index 4b777fe15..b0682fa2d 100644 --- a/test/nodejs/trip.js +++ b/test/nodejs/trip.js @@ -368,3 +368,65 @@ test('trip: trip in Monaco without motorways', function(assert) { }); }); + +test('trip: throws on disabled geometry', function (assert) { + assert.plan(1); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + coordinates: three_test_coordinates.concat(three_test_coordinates), + }; + osrm.trip(options, function(err, route) { + console.log(err) + assert.match(err.message, /DisabledDatasetException/); + }); +}); + +test('trip: ok on disabled geometry', function (assert) { + assert.plan(2); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_GEOMETRY']}); + var options = { + steps: false, + overview: 'false', + annotations: false, + skip_waypoints: true, + coordinates: three_test_coordinates.concat(three_test_coordinates), + }; + osrm.trip(options, function(err, response) { + assert.ifError(err); + assert.equal(response.trips.length, 1); + }); +}); + +test('trip: throws on disabled steps', function (assert) { + assert.plan(1); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_STEPS']}); + var options = { + steps: true, + coordinates: three_test_coordinates.concat(three_test_coordinates), + }; + osrm.trip(options, function(err, route) { + console.log(err) + assert.match(err.message, /DisabledDatasetException/); + }); +}); + +test('trip: ok on disabled steps', function (assert) { + assert.plan(8); + var osrm = new OSRM({'path': data_path, 'disable_feature_dataset': ['ROUTE_STEPS']}); + var options = { + steps: false, + overview: 'simplified', + annotations: true, + coordinates: three_test_coordinates.concat(three_test_coordinates), + }; + osrm.trip(options, function(err, response) { + assert.ifError(err); + assert.ok(response.waypoints); + assert.ok(response.trips); + assert.equal(response.trips.length, 1); + assert.ok(response.trips[0].geometry, "trip has geometry"); + assert.ok(response.trips[0].legs, "trip has legs"); + assert.notok(response.trips[0].legs.every(l => { return l.steps.length > 0; }), 'every leg has steps'); + assert.ok(response.trips[0].legs.every(l => { return l.annotation;}), 'every leg has annotations'); + }); +}); diff --git a/unit_tests/engine/douglas_peucker.cpp b/unit_tests/engine/douglas_peucker.cpp index 1b9967d21..3433a772b 100644 --- a/unit_tests/engine/douglas_peucker.cpp +++ b/unit_tests/engine/douglas_peucker.cpp @@ -82,7 +82,8 @@ BOOST_AUTO_TEST_CASE(removed_middle_test_zoom_sensitive) BOOST_AUTO_TEST_CASE(remove_second_node_test) { // derived from the degreeToPixel function - const auto delta_pixel_to_delta_degree = [](const int pixel, const unsigned zoom) { + const auto delta_pixel_to_delta_degree = [](const int pixel, const unsigned zoom) + { const double shift = (1u << zoom) * 256; const double b = shift / 2.0; return pixel * 180. / b; diff --git a/unit_tests/extractor/intersection_analysis_tests.cpp b/unit_tests/extractor/intersection_analysis_tests.cpp index 9514a958d..947359c59 100644 --- a/unit_tests/extractor/intersection_analysis_tests.cpp +++ b/unit_tests/extractor/intersection_analysis_tests.cpp @@ -40,17 +40,18 @@ BOOST_AUTO_TEST_CASE(simple_intersection_connectivity) // ↓ // 4 const auto unit_edge = - [](const NodeID from, const NodeID to, bool allowed, AnnotationID annotation) { - return InputEdge{from, - to, - EdgeWeight{1}, - EdgeDuration{1}, - EdgeDistance{1}, - GeometryID{0, false}, - !allowed, - NodeBasedEdgeClassification(), - annotation}; - }; + [](const NodeID from, const NodeID to, bool allowed, AnnotationID annotation) + { + return InputEdge{from, + to, + EdgeWeight{1}, + EdgeDuration{1}, + EdgeDistance{1}, + GeometryID{0, false}, + !allowed, + NodeBasedEdgeClassification(), + annotation}; + }; std::vector edges = {unit_edge(0, 2, true, 1), unit_edge(0, 5, true, 0), @@ -102,7 +103,8 @@ BOOST_AUTO_TEST_CASE(simple_intersection_connectivity) RestrictionGraph restriction_graph = constructRestrictionGraph(restrictions); RestrictionMap restriction_map(restriction_graph); - const auto connectivity_matrix = [&](NodeID node) { + const auto connectivity_matrix = [&](NodeID node) + { std::vector result; const auto incoming_edges = getIncomingEdges(graph, node); const auto outgoing_edges = getOutgoingEdges(graph, node); @@ -167,7 +169,8 @@ BOOST_AUTO_TEST_CASE(roundabout_intersection_connectivity) // 0 // ↙ ↑ ↘ // 4 5 6 - const auto unit_edge = [](const NodeID from, const NodeID to, bool allowed, bool roundabout) { + const auto unit_edge = [](const NodeID from, const NodeID to, bool allowed, bool roundabout) + { return InputEdge{from, to, EdgeWeight{1}, @@ -226,7 +229,8 @@ BOOST_AUTO_TEST_CASE(roundabout_intersection_connectivity) RestrictionGraph restriction_graph = constructRestrictionGraph(restrictions); RestrictionMap restriction_map(restriction_graph); - const auto connectivity_matrix = [&](NodeID node) { + const auto connectivity_matrix = [&](NodeID node) + { std::vector result; const auto incoming_edges = getIncomingEdges(graph, node); const auto outgoing_edges = getOutgoingEdges(graph, node); @@ -274,7 +278,8 @@ BOOST_AUTO_TEST_CASE(skip_degree_two_nodes) // ↑ ↕ ↕ // 6 8 ↔ 9 // - const auto unit_edge = [](const NodeID from, const NodeID to, bool allowed) { + const auto unit_edge = [](const NodeID from, const NodeID to, bool allowed) + { return InputEdge{from, to, EdgeWeight{1}, diff --git a/unit_tests/extractor/restriction_graph.cpp b/unit_tests/extractor/restriction_graph.cpp index e0fac7bcc..b5c24694f 100644 --- a/unit_tests/extractor/restriction_graph.cpp +++ b/unit_tests/extractor/restriction_graph.cpp @@ -56,14 +56,12 @@ void checkInstructions(RestrictionGraph::RestrictionRange restrictions, }); std::sort(actual_instructions.begin(), actual_instructions.end(), - [](const auto &lhs, const auto &rhs) { - return (lhs.to < rhs.to) || (lhs.to == rhs.to && lhs.is_only); - }); + [](const auto &lhs, const auto &rhs) + { return (lhs.to < rhs.to) || (lhs.to == rhs.to && lhs.is_only); }); std::sort(expected_instructions.begin(), expected_instructions.end(), - [](const auto &lhs, const auto &rhs) { - return (lhs.to < rhs.to) || (lhs.to == rhs.to && lhs.is_only); - }); + [](const auto &lhs, const auto &rhs) + { return (lhs.to < rhs.to) || (lhs.to == rhs.to && lhs.is_only); }); BOOST_REQUIRE_EQUAL_COLLECTIONS(actual_instructions.begin(), actual_instructions.end(), @@ -88,10 +86,11 @@ void checkEdges(RestrictionGraph::EdgeRange edges, std::vector expected_ std::map nextEdges(RestrictionGraph::EdgeRange edges) { std::map res; - std::transform( - edges.begin(), edges.end(), std::inserter(res, res.end()), [&](const auto &edge) { - return std::make_pair(edge.node_based_to, edge.target); - }); + std::transform(edges.begin(), + edges.end(), + std::inserter(res, res.end()), + [&](const auto &edge) + { return std::make_pair(edge.node_based_to, edge.target); }); return res; } @@ -132,12 +131,12 @@ validateViaRestrictionNode(RestrictionGraph &graph, BOOST_REQUIRE_GE(graph.via_edge_to_node.count({from, to}), 1); auto node_match_it = graph.via_edge_to_node.equal_range({from, to}); - BOOST_REQUIRE_MESSAGE( - std::any_of(node_match_it.first, - node_match_it.second, - [&](const auto node_match) { return node_match.second == via_node_idx; }), - "Could not find expected via_node_idx " << via_node_idx << " for graph edge " << from << "," - << to); + BOOST_REQUIRE_MESSAGE(std::any_of(node_match_it.first, + node_match_it.second, + [&](const auto node_match) + { return node_match.second == via_node_idx; }), + "Could not find expected via_node_idx " + << via_node_idx << " for graph edge " << from << "," << to); BOOST_REQUIRE_LT(via_node_idx, graph.num_via_nodes); return checkNode( diff --git a/unit_tests/library/tile.cpp b/unit_tests/library/tile.cpp index 00a6c3846..43b74bada 100644 --- a/unit_tests/library/tile.cpp +++ b/unit_tests/library/tile.cpp @@ -87,9 +87,9 @@ void validate_feature_layer(vtzero::layer layer) } auto number_of_uint_values = - std::count_if(layer.value_table().begin(), layer.value_table().end(), [](auto v) { - return v.type() == vtzero::property_value_type::uint_value; - }); + std::count_if(layer.value_table().begin(), + layer.value_table().end(), + [](auto v) { return v.type() == vtzero::property_value_type::uint_value; }); BOOST_CHECK_EQUAL(number_of_uint_values, 79); } @@ -129,9 +129,9 @@ void validate_turn_layer(vtzero::layer layer) } auto number_of_float_values = - std::count_if(layer.value_table().begin(), layer.value_table().end(), [](auto v) { - return v.type() == vtzero::property_value_type::float_value; - }); + std::count_if(layer.value_table().begin(), + layer.value_table().end(), + [](auto v) { return v.type() == vtzero::property_value_type::float_value; }); BOOST_CHECK_EQUAL(number_of_float_values, 73); } diff --git a/unit_tests/partitioner/bisection_graph.cpp b/unit_tests/partitioner/bisection_graph.cpp index 7dc664e51..db46c4ed1 100644 --- a/unit_tests/partitioner/bisection_graph.cpp +++ b/unit_tests/partitioner/bisection_graph.cpp @@ -28,7 +28,8 @@ BOOST_AUTO_TEST_CASE(access_nodes) const auto to_row = [cols](const NodeID nid) { return nid / cols; }; const auto to_col = [cols](const NodeID nid) { return nid % cols; }; - const auto get_expected = [&](const NodeID id) { + const auto get_expected = [&](const NodeID id) + { const auto expected_lon = FloatLongitude{to_col(id) * step_size}; const auto expected_lat = FloatLatitude{to_row(id) * step_size}; Coordinate compare(expected_lon, expected_lat); diff --git a/unit_tests/partitioner/cell_storage.cpp b/unit_tests/partitioner/cell_storage.cpp index 26113a0fe..53fc0208b 100644 --- a/unit_tests/partitioner/cell_storage.cpp +++ b/unit_tests/partitioner/cell_storage.cpp @@ -40,7 +40,8 @@ BOOST_AUTO_TEST_SUITE(cell_storage_tests) BOOST_AUTO_TEST_CASE(mutable_cell_storage) { - const auto fill_range = [](auto range, const std::vector &values) { + const auto fill_range = [](auto range, const std::vector &values) + { auto iter = range.begin(); for (auto v : values) *iter++ = v; diff --git a/unit_tests/partitioner/dinic.cpp b/unit_tests/partitioner/dinic.cpp index 51f9b164c..1d2ebf451 100644 --- a/unit_tests/partitioner/dinic.cpp +++ b/unit_tests/partitioner/dinic.cpp @@ -21,11 +21,13 @@ BOOST_AUTO_TEST_CASE(horizontal_cut_between_two_grids) const int cols = 10; // build a small grid (10*10) and a (100 * 10) below (to make the different steps unique) - auto graph = [&]() { + auto graph = [&]() + { std::vector grid_coordinates; std::vector grid_edges; - const auto connect = [&grid_edges](const NodeID from, const NodeID to) { + const auto connect = [&grid_edges](const NodeID from, const NodeID to) + { grid_edges.push_back({from, to, 1}); grid_edges.push_back({to, from, 1}); }; diff --git a/unit_tests/partitioner/multi_level_partition.cpp b/unit_tests/partitioner/multi_level_partition.cpp index 62fca2772..3d4901155 100644 --- a/unit_tests/partitioner/multi_level_partition.cpp +++ b/unit_tests/partitioner/multi_level_partition.cpp @@ -192,9 +192,10 @@ BOOST_AUTO_TEST_CASE(large_cell_number) for (auto l : util::irange(1UL, num_levels)) { - std::transform(levels[l - 1].begin(), levels[l - 1].end(), levels[l].begin(), [](auto val) { - return val / 2; - }); + std::transform(levels[l - 1].begin(), + levels[l - 1].end(), + levels[l].begin(), + [](auto val) { return val / 2; }); levels_to_num_cells[l] = levels_to_num_cells[l - 1] / 2; } @@ -244,7 +245,8 @@ BOOST_AUTO_TEST_CASE(cell_64_bits) std::vector(level_cells[0])); std::vector levels_to_num_cells(level_cells.size()); - const auto set_level_cells = [&](size_t level, auto const num_cells) { + const auto set_level_cells = [&](size_t level, auto const num_cells) + { for (auto val : util::irange(0ULL, NUM_PARTITIONS)) { levels[level][val] = std::min(val, num_cells - 1); @@ -273,7 +275,8 @@ BOOST_AUTO_TEST_CASE(cell_overflow_bits) std::vector(level_cells[0])); std::vector levels_to_num_cells(level_cells.size()); - const auto set_level_cells = [&](size_t level, auto const num_cells) { + const auto set_level_cells = [&](size_t level, auto const num_cells) + { for (auto val : util::irange(0ULL, NUM_PARTITIONS)) { levels[level][val] = std::min(val, num_cells - 1); diff --git a/unit_tests/partitioner/recursive_bisection.cpp b/unit_tests/partitioner/recursive_bisection.cpp index dfcbb805f..3ecb06a93 100644 --- a/unit_tests/partitioner/recursive_bisection.cpp +++ b/unit_tests/partitioner/recursive_bisection.cpp @@ -20,18 +20,19 @@ BOOST_AUTO_TEST_CASE(dividing_four_grid_cells) const int cols = 10; const int cut_edges = 4; - auto graph = [&]() { + auto graph = [&]() + { std::vector grid_coordinates; std::vector grid_edges; - const auto connect = - [&grid_edges](int min_left, int max_left, int min_right, int max_right) { - const NodeID source = (rand() % (max_left - min_left)) + min_left; - const NodeID target = (rand() % (max_right - min_right)) + min_right; + const auto connect = [&grid_edges](int min_left, int max_left, int min_right, int max_right) + { + const NodeID source = (rand() % (max_left - min_left)) + min_left; + const NodeID target = (rand() % (max_right - min_right)) + min_right; - grid_edges.push_back({source, target, 1}); - grid_edges.push_back({target, source, 1}); - }; + grid_edges.push_back({source, target, 1}); + grid_edges.push_back({target, source, 1}); + }; // generate 10 big components for (int i = 0; i < 4; ++i) diff --git a/unit_tests/partitioner/scc_integration.cpp b/unit_tests/partitioner/scc_integration.cpp index f9cb4eb39..59e462d1e 100644 --- a/unit_tests/partitioner/scc_integration.cpp +++ b/unit_tests/partitioner/scc_integration.cpp @@ -21,7 +21,8 @@ BOOST_AUTO_TEST_CASE(graph_views_on_components) const int num_components = 10; - auto graph = [&]() { + auto graph = [&]() + { std::vector grid_coordinates; std::vector grid_edges; @@ -56,14 +57,14 @@ BOOST_AUTO_TEST_CASE(graph_views_on_components) const auto &view = views[comp]; BOOST_CHECK(views[comp].NumberOfNodes() == 10); - const auto to_component_id = [&](const auto &node) { - return node.original_id / (rows * cols + 1); - }; + const auto to_component_id = [&](const auto &node) + { return node.original_id / (rows * cols + 1); }; std::size_t expected_component_id = to_component_id(view.Node(0)); - BOOST_CHECK(std::all_of(view.Begin(), view.End(), [&](const auto &node) { - return to_component_id(node) == expected_component_id; - })); + BOOST_CHECK(std::all_of(view.Begin(), + view.End(), + [&](const auto &node) + { return to_component_id(node) == expected_component_id; })); for (const auto &node : view.Nodes()) { diff --git a/unit_tests/server/parameters_parser.cpp b/unit_tests/server/parameters_parser.cpp index c28825a68..22b03f6fd 100644 --- a/unit_tests/server/parameters_parser.cpp +++ b/unit_tests/server/parameters_parser.cpp @@ -451,7 +451,7 @@ BOOST_AUTO_TEST_CASE(valid_route_urls) boost::none, engine::Approach::CURB, engine::Approach::UNRESTRICTED, - engine::Approach::CURB, + engine::Approach::OPPOSITE, }; RouteParameters reference_18{false, false, @@ -466,7 +466,7 @@ BOOST_AUTO_TEST_CASE(valid_route_urls) approaches_18}; auto result_18 = parseParameters( - "1,2;3,4;5,6;7,8?steps=false&approaches=;curb;unrestricted;curb"); + "1,2;3,4;5,6;7,8?steps=false&approaches=;curb;unrestricted;opposite"); BOOST_CHECK(result_18); BOOST_CHECK_EQUAL(reference_18.steps, result_18->steps); BOOST_CHECK_EQUAL(reference_18.alternatives, result_18->alternatives); diff --git a/unit_tests/storage/tar.cpp b/unit_tests/storage/tar.cpp index c15a1ea4f..0e30fc99d 100644 --- a/unit_tests/storage/tar.cpp +++ b/unit_tests/storage/tar.cpp @@ -201,7 +201,8 @@ BOOST_AUTO_TEST_CASE(write_huge_tar_file, *boost::unit_test::disabled()) { storage::tar::FileWriter writer(tmp.path, storage::tar::FileWriter::GenerateFingerprint); std::uint64_t value = 0; - const std::function encode_function = [&]() -> std::uint64_t { + const std::function encode_function = [&]() -> std::uint64_t + { reference_checksum += value; return value++; }; diff --git a/unit_tests/util/indexed_data.cpp b/unit_tests/util/indexed_data.cpp index 40b79f9be..d7deb61c9 100644 --- a/unit_tests/util/indexed_data.cpp +++ b/unit_tests/util/indexed_data.cpp @@ -113,12 +113,10 @@ BOOST_AUTO_TEST_CASE(check_max_size) std::vector name_data(0x1000000, '#'); std::vector name_offsets; - auto test_variable = [&name_offsets, &name_data]() { - test_rw>>(name_offsets, name_data); - }; - auto test_fixed = [&name_offsets, &name_data]() { - test_rw>>(name_offsets, name_data); - }; + auto test_variable = [&name_offsets, &name_data]() + { test_rw>>(name_offsets, name_data); }; + auto test_fixed = [&name_offsets, &name_data]() + { test_rw>>(name_offsets, name_data); }; name_offsets = {0, 0x1000000}; BOOST_CHECK_THROW(test_variable(), osrm::util::exception); diff --git a/unit_tests/util/static_rtree.cpp b/unit_tests/util/static_rtree.cpp index 5a9336e1f..f46aa7387 100644 --- a/unit_tests/util/static_rtree.cpp +++ b/unit_tests/util/static_rtree.cpp @@ -61,8 +61,8 @@ template class LinearSearchNN std::vector local_edges(edges); auto projected_input = web_mercator::fromWGS84(input_coordinate); - const auto segment_comparator = [this, &projected_input](const DataT &lhs, - const DataT &rhs) { + const auto segment_comparator = [this, &projected_input](const DataT &lhs, const DataT &rhs) + { using web_mercator::fromWGS84; const auto lhs_result = coordinate_calculation::projectPointOnSegment( fromWGS84(coords[lhs.u]), fromWGS84(coords[lhs.v]), projected_input);