@tomtom-org/maps-sdk 1.0.0-rc.0 → 1.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-rc.2
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2548](https://github.com/tomtom-internal/maps-sdk-js/pull/2548) [`89660b0`](https://github.com/tomtom-internal/maps-sdk-js/commit/89660b065154b0211cb7234fa5d2da6f74ba9086) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: a knob id is the path of its setting in the configuration on every module, and `setKnobs` sets several knobs in one checked change
8
+ - map: `setKnobs(module, catalogue, values)` checks every value against its knob, then applies them all in one change and one `config-change`. If it refuses one value, it sets none. `KnobValues<CONFIG, ID>` types the values by id
9
+ - map: `StylingFoundationsModuleConfig` nests each setting along its id, as every other module does: `{ labels: { sizeFactor: 1.2 } }` instead of `{ 'labels.sizeFactor': 1.2 }`. `setKnob`, `setKnobs`, `getKnob`, `resetKnob` and `MapPresetSettings` keep the ids
10
+ - map: `StylingFoundationsModule`'s `updateConfig` merges one level deep, as on every module, so `updateConfig({ colors: { water } })` replaces the colours set before. Set a single colour with `setKnob`. Its `applyConfig` and `updateConfig` no longer check values at run time, as on every module. `setKnob` and `setKnobs` do
11
+ - map: a `KnobTarget` implements `_setKnobValues(values)` instead of `_setKnobValue(id, value)`, and a subclass of `AbstractMapModule` inherits it. For a plugin's own target, `knobValueIn`, `configWithKnobs` and `configWithoutKnob` implement the hooks
12
+ - map-effects: `MapEffectsSettings` is `MapEffectsConfig`, and nests each knob along its id: `new MapEffects(map, { bloom: { intensity: 0.5 } })`. `updateConfig` replaces each effect it names, while `setKnob` and `setKnobs` keep the rest of an effect. The constructor, `applyConfig` and `updateConfig` no longer check values at run time, as on a map module. `setKnob` and `setKnobs` do. The plugin needs SDK 1.0.0-rc.2
13
+ - agent-toolkit: `setMapStyling` reads the styling knobs at their paths, and the plugin needs SDK 1.0.0-rc.2
14
+ - examples: the map effects playground restores its panel from `localStorage` with `setKnobs`
15
+
16
+ ### Patch Changes
17
+
18
+ - [#2601](https://github.com/tomtom-internal/maps-sdk-js/pull/2601) [`cd9d3d2`](https://github.com/tomtom-internal/maps-sdk-js/commit/cd9d3d27e910f434ef9df78c3b5f8cdde567fb07) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: `TrafficAreaAnalyticsModule` metric filters no longer make MapLibre validate the whole style on each change
19
+
20
+ - [#2603](https://github.com/tomtom-internal/maps-sdk-js/pull/2603) [`fadf352`](https://github.com/tomtom-internal/maps-sdk-js/commit/fadf35214f0667c6bd229ca3f49223a136d66d56) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: a traffic flow section at a standstill reports `absoluteSpeed: 0` from `TrafficFlowModule.getRenderedFeatures()` and its events, instead of leaving it `undefined`
21
+
22
+ - [#2590](https://github.com/tomtom-internal/maps-sdk-js/pull/2590) [`75fb3ea`](https://github.com/tomtom-internal/maps-sdk-js/commit/75fb3eab4d38b2aad8f4f671c3fd84f78ffc19f3) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - license: the privacy clause of `LICENSE.txt` now links the TomTom Privacy Policy, https://www.tomtom.com/privacy/
23
+
24
+ - [#2547](https://github.com/tomtom-internal/maps-sdk-js/pull/2547) [`447d663`](https://github.com/tomtom-internal/maps-sdk-js/commit/447d6634aecd22002e0c3f206c80917fe53cf047) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: The map fills its container from the first frame on pages whose scrollbars take up layout space, as on Windows
25
+ - If the page didn't import the MapLibre CSS, the canvas could stay about one scrollbar width short on the right and bottom until the window was resized
26
+
27
+ - [#2535](https://github.com/tomtom-internal/maps-sdk-js/pull/2535) [`51a1d85`](https://github.com/tomtom-internal/maps-sdk-js/commit/51a1d85d07a7578031e8fb95c3d627d0205e120a) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: a knob or config change on a data-owned module writes only the layer properties whose value changes, so a value set on its layers with `mapLibreMap` stays until a change sets that property
28
+ - map: changing a `GeometriesModule`'s `line.color` keeps a fill opacity or label size set on its layers, and the same holds for routes, places, reachable ranges, custom GeoJSON, traffic incident details and area analytics
29
+
30
+ - [#2630](https://github.com/tomtom-internal/maps-sdk-js/pull/2630) [`5f5c5dd`](https://github.com/tomtom-internal/maps-sdk-js/commit/5f5c5dd44f4cd8076d1cda3960198d41732707fa) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: Set every label on the map in one typeface, from the style's serif and italic faces or your own font files, and give the labels of a route, places or geometries one of their own
31
+
32
+ - The `labels.typeface` knob of `StylingFoundationsModule` takes `sans`, `sans-italic`, `serif` or `serif-italic` (`mapTypefaces`), each label keeping its weight
33
+ - `labels.customTypeface` takes your own font file URLs per weight (`CustomTypeface`), which the map downloads itself; characters outside their range are drawn in the style's Noto face
34
+ - The labels of routes, places, geometries, reachable ranges and incident details follow the map's typeface unless their module sets its own
35
+ - Each module's label settings take the same `typeface` (a knob: `label.typeface`, `waypoints.label.typeface`, `lineLabel.typeface`) and `customTypeface`, for those labels alone
36
+ - The waypoint, geometry and reachable-range `font` knobs have no default, so `getKnob` returns `undefined` until you set one. Unset, those labels are in `Noto-Bold` set in their typeface
37
+ - `exportStyle()` returns labels set in font files in the style's own Noto faces, since only the SDK can draw those files
38
+ - New `map-typeface` example, with ten open-source font families and a typeface each for the map, the waypoints, the museums and a district
39
+ - `map-styling-playground` shows the typefaces in its Labels section, beside a route, museums and a district, and its sections now collapse
40
+ - `themed-map` sets its labels in Fraunces from the first frame
41
+
42
+ - [#2325](https://github.com/tomtom-internal/maps-sdk-js/pull/2325) [`31a9dd7`](https://github.com/tomtom-internal/maps-sdk-js/commit/31a9dd7cd78edd0100a58ef736196054199880d5) Thanks [@carlosprietofernandez-tomtom](https://github.com/carlosprietofernandez-tomtom)! - map: `RoutingModule`, `PlacesModule`, `CustomGeoJSONModule` and `TrafficIncidentDetailsModule` keep their events and `sourceAndLayerIDs` in step with the layers a later config change adds or removes
43
+ - A removed layer, such as a section icon, an `additional` layer, a custom source's layer or the incident highlight halo, used to stop hover and click for every module on the map. An added layer got no events and was missing from `sourceAndLayerIDs`
44
+
45
+ - [#2600](https://github.com/tomtom-internal/maps-sdk-js/pull/2600) [`fb14661`](https://github.com/tomtom-internal/maps-sdk-js/commit/fb146619ed8a8e7449dc74fff0d6e40f33c2839a) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: `POIsModule`'s `filters.categories` narrows the micro markers too, so the dots of filtered-out categories no longer show from zoom 15.5, nor come back from `getRenderedFeatures()`
46
+
47
+ - [#2635](https://github.com/tomtom-internal/maps-sdk-js/pull/2635) [`cf929d0`](https://github.com/tomtom-internal/maps-sdk-js/commit/cf929d0020f0a595105b809a8af64c702f3e6f57) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: `RoutingModule.setSectionFocus` rings any section or leg of the shown routes, so your UI can point at the stretch it describes
48
+
49
+ - The ring outlines the route clear of its hovered outline and section halos rather than covering them, black on a light style and white on a dark one, as the traffic incident highlight does
50
+ - `highlight.section.outline.color` and `highlight.section.outline.widthFactor` restyle it, as config or as routing knobs
51
+ - `getShown().sectionFocus` holds the focused sections, and `showRoutes` clears them
52
+ - examples: `route-leg-options-playground` rings the leg you point at or focus in its panel
53
+ - examples: `route-styling-playground` rings the route's toll roads, with a colour and a width control for the ring
54
+
55
+ - [#2627](https://github.com/tomtom-internal/maps-sdk-js/pull/2627) [`e09550e`](https://github.com/tomtom-internal/maps-sdk-js/commit/e09550ebbd9a46d464bb186fb4ec220cafc55170) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: the `maplibre-gl` peer dependency moves up to `^6.13.0`
56
+
57
+ - [#2625](https://github.com/tomtom-internal/maps-sdk-js/pull/2625) [`a1fe38b`](https://github.com/tomtom-internal/maps-sdk-js/commit/a1fe38b520341e70efc22900aa17ce5edeb7f9cb) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: a route's speed limit signs draw from zoom 11 by default, one zoom after the tunnel and closed-road signs, so they no longer crowd the overview of a route; `sections.speedLimit.sign.minZoom` still sets it
58
+
59
+ - [#2528](https://github.com/tomtom-internal/maps-sdk-js/pull/2528) [`fe64ed1`](https://github.com/tomtom-internal/maps-sdk-js/commit/fe64ed17caba48f9e95316981e89865c51d021c0) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: a `TerrainModule` change that leaves the 3D surface as it was, such as a hillshade knob, no longer makes MapLibre rebuild the terrain
60
+
61
+ - [#2614](https://github.com/tomtom-internal/maps-sdk-js/pull/2614) [`fe596fc`](https://github.com/tomtom-internal/maps-sdk-js/commit/fe596fcb2d1c5a05dddb77547f48debc1b856a12) Thanks [@JulianChinAFoeng-TomTom](https://github.com/JulianChinAFoeng-TomTom)! - tests: each package's unit test run now fails when its coverage drops below the goals in `TESTING.md`
62
+
63
+ ## 1.0.0-rc.1
64
+
65
+ ### Patch Changes
66
+
67
+ - [#2517](https://github.com/tomtom-internal/maps-sdk-js/pull/2517) [`49611d0`](https://github.com/tomtom-internal/maps-sdk-js/commit/49611d0ac91dc0b584e3d059d1f654208bdead6c) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - `npm install @tomtom-org/maps-sdk` installs the 1.0.0 release candidate, with no `@rc` needed, and the npm page shows its README
68
+
3
69
  ## 1.0.0-rc.0
4
70
 
5
71
  ### Major Changes
package/LICENSE.txt CHANGED
@@ -14,7 +14,7 @@ You may not use the SDK or accept this Agreement if you are barred from receivin
14
14
 
15
15
  3.1. You agree to use the SDK only for purposes permitted by (a) this Agreement and (b) any applicable law, regulation or generally accepted practice or guideline in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
16
16
 
17
- 3.2. Other than as permitted by applicable legislation, you are prohibited from copying (except for backup purposes), modifying, adapting, (re)distributing, renting, lending, publicly presenting, decompiling, reverse engineering, disassembling or creating derivative works of the SDK or any part of it. Notwithstanding the foregoing, you may inspect the SDK as distributed to you, including any source code embedded in its source maps, solely for the purpose of debugging your Permitted Application, provided that it is not shared or redistributed. The readability of the SDK’s source code in its distribution does not constitute “Open-Source” licensing and grants you no rights under any Open Source Initiative (OSI) approved license, nor shall it be construed as a grant of rights to modify, fork or redistribute the SDK beyond those expressly granted in Clause 1 and this Clause 3.2.
17
+ 3.2. Except as permitted by applicable law or this Clause 3.2, you may not copy (except for backup purposes), modify, adapt, distribute, rent, lend, publicly present, decompile, reverse engineer, disassemble or create derivative works of the SDK. Solely for your Permitted Applications and subject to Clauses 3.3 to 3.5, you may: (a) inspect the SDK, including source code in its source maps, for debugging; (b) copy the SDK as reasonably necessary to develop, build, test and deploy them, including in internal repositories, mirrors and offline build environments used only by you, your Affiliates and your contractors; (c) modify the SDK to fix errors or security vulnerabilities, to maintain compatibility, or to prepare a Contribution under Clause 11.5, but you may not alter, circumvent or disable any functionality for authentication, metering, billing, the notices in Clause 5.2 or the data collection in Clause 4; and (d) distribute the SDK only as a bundled part of a Permitted Application, and not on a standalone basis or as a library. Modified versions remain part of the SDK, and TomTom need not support them. On termination, you must delete all copies held under (b), except copies already distributed under (d). The readability of the SDK's source code does not make it open source and grants no rights beyond those in Clause 1 and this Clause 3.2.
18
18
 
19
19
  3.3. You may not use the SDK in connection with any illegal, fraudulent, dishonest or unethical activity or behaviour, and in particular not to create or develop, or help others create or develop, a product, service or library that competes, directly or indirectly, with the SDK or the TomTom APIs.
20
20
 
@@ -22,7 +22,7 @@ You may not use the SDK or accept this Agreement if you are barred from receivin
22
22
 
23
23
  3.5. The SDK may include data or software that TomTom licenses from third parties, including open-source software. Such components are made available to you under the terms and conditions of their applicable licenses, and you shall comply with all requirements and restrictions that those third parties may require TomTom to impose on you (as may be updated and amended by TomTom from time to time). It is your responsibility to check, review and comply with those terms as they apply to the SDK licensed to you under this Agreement. The applicable third party and open-source notices are set out in the accompanying THIRD_PARTY.txt file. In the event of a conflict between this Agreement and an open-source license governing a specific dependency, that open-source license shall prevail solely with respect to that dependency.
24
24
 
25
- 4. PRIVACY: In order to improve the TomTom Developer Portal and the SDK, TomTom may collect certain usage related information from the software, including but not limited to general SDK and product identifiers, version numbers, and information on which tools and/or services in the SDK are used and how you use them. In addition, TomTom may collect your unique identifier and associated IP address for legitimate business reasons (such as, without limitation, the processing of invoices). This data is retained for a maximum period of 120 days and is maintained in accordance with our Privacy Policy.
25
+ 4. PRIVACY: In order to improve the TomTom Developer Portal and the SDK, TomTom may collect certain usage related information from the software, including but not limited to general SDK and product identifiers, version numbers, and information on which tools and/or services in the SDK are used and how you use them. In addition, TomTom may collect your unique identifier and associated IP address for legitimate business reasons (such as, without limitation, the processing of invoices). This data is retained for a maximum period of 120 days and is maintained in accordance with our Privacy Policy (https://www.tomtom.com/privacy/).
26
26
 
27
27
  5. INTELLECTUAL PROPERTY RIGHTS AND COPYRIGHT NOTICES:
28
28
 
package/README.md CHANGED
@@ -5,7 +5,8 @@
5
5
  [**Examples**](https://docs.tomtom.com/maps-sdk-js/examples/) |
6
6
  [**Documentation**](https://docs.tomtom.com/maps-sdk-js/introduction/overview) |
7
7
  [**API reference**](https://docs.tomtom.com/maps-sdk-js/api-reference/index.html) |
8
- [**Release notes**](https://docs.tomtom.com/maps-sdk-js/introduction/release-notes)
8
+ [**Release notes**](https://docs.tomtom.com/maps-sdk-js/introduction/release-notes) |
9
+ [**Earlier versions**](https://tomtom-international.github.io/maps-sdk-js/)
9
10
 
10
11
  [![NPM Version](https://img.shields.io/npm/v/@tomtom-org/maps-sdk.svg)](https://www.npmjs.com/package/@tomtom-org/maps-sdk)
11
12
 
@@ -13,7 +14,7 @@
13
14
 
14
15
  **Maps SDK for JavaScript** is a **JavaScript/TypeScript** library for building applications with **TomTom** maps and location APIs.
15
16
 
16
- It is built on [MapLibre GL JS](https://docs.tomtom.com/maps-sdk-js/guides/map/about-maplibre) and [GeoJSON](https://geojson.org/): TomTom maps and services work together out of the box, and the MapLibre map stays fully exposed, so its API and plugin ecosystem work alongside the SDK.
17
+ It's built on [MapLibre GL JS](https://docs.tomtom.com/maps-sdk-js/guides/map/about-maplibre) and [GeoJSON](https://geojson.org/). TomTom maps and services work together out of the box, and the MapLibre map stays fully exposed, so its API and plugin ecosystem work alongside the SDK.
17
18
 
18
19
  > Some capabilities of the SDK are released under [Public Preview](https://docs.tomtom.com/legal/public-preview) to collect feedback from the community. The [release notes](https://docs.tomtom.com/maps-sdk-js/introduction/release-notes) list what changes in each release.
19
20
 
@@ -34,10 +35,10 @@ It is built on [MapLibre GL JS](https://docs.tomtom.com/maps-sdk-js/guides/map/a
34
35
  3. **Using an AI coding agent? Install the SDK skill** in your project root, for Claude Code, Cursor, GitHub Copilot, Windsurf and [many more](https://www.npmjs.com/package/skills#available-agents):
35
36
 
36
37
  ```bash
37
- npx skills add tomtom-international/maps-sdk-js --skill tomtom-maps-sdk-js
38
+ npx skills add tomtom-international/maps-sdk-js --skill tomtom-maps-sdk-js tomtom-maps-sdk-js-feedback
38
39
  ```
39
40
 
40
- The skill loads the SDK's patterns, coordinate conventions, service APIs and pitfalls into the agent's context, so the agent writes code against the real API instead of guessing it. Commit it so the whole team gets it. [AI coding with the SDK](https://docs.tomtom.com/maps-sdk-js/guides/ai-coding) lists the topics it covers and how to invoke them.
41
+ The skill loads the SDK's patterns, coordinate conventions, service APIs and pitfalls into the agent's context, so the agent writes code against the real API instead of guessing it. Commit it so the whole team gets it. The optional `tomtom-maps-sdk-js-feedback` skill lets the agent report SDK problems it hits to TomTom, with your consent. [AI coding with the SDK](https://docs.tomtom.com/maps-sdk-js/guides/ai-coding) lists the topics it covers, how to invoke them and [what a report holds](https://docs.tomtom.com/maps-sdk-js/guides/ai-coding#reporting-sdk-problems).
41
42
 
42
43
  4. **Start building.** Services return GeoJSON, and map modules show it unchanged:
43
44
 
@@ -63,8 +64,8 @@ It is built on [MapLibre GL JS](https://docs.tomtom.com/maps-sdk-js/guides/map/a
63
64
 
64
65
  - **Node.js 24+** at install time, the minimum the package declares, whether or not you target the browser.
65
66
  - **A browser with WebGL** for the Map bundle.
66
- - **A bundler** such as Vite or webpack: the SDK ships as ES modules. Under Vite, `TomTomMap` sets up MapLibre's web worker on its own; [Vite projects](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup#vite-projects) says when another bundler, such as webpack, needs it set up by hand.
67
- - **Peer dependencies**, installed by the commands above: MapLibre GL JS 6.12+, Turf 7, culori 4, Lodash 4 and Zod 4.
67
+ - **A bundler** such as Vite or webpack, because the SDK ships as ES modules. Under Vite, `TomTomMap` sets up MapLibre's web worker on its own; [Vite projects](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup#vite-projects) says when another bundler, such as webpack, needs it set up by hand.
68
+ - **Peer dependencies**, installed by the commands above: MapLibre GL JS 6.13+, Turf 7, culori 4, Lodash 4 and Zod 4.
68
69
  - **TypeScript is optional**: the type definitions ship with the package, with no `@types` package to install.
69
70
 
70
71
  [Project setup](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup) has the full requirements and the [React, Vue and Node.js](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup#framework-specific-setup) setups.
@@ -140,11 +141,11 @@ map.mapLibreMap.addControl(new NavigationControl(), 'top-right');
140
141
  map.mapLibreMap.on('moveend', () => console.log(map.mapLibreMap.getCenter()));
141
142
  ```
142
143
 
143
- Where the SDK has a feature for the job, prefer it: it survives style switches and style releases, and its events coordinate across modules. [About MapLibre](https://docs.tomtom.com/maps-sdk-js/guides/map/about-maplibre#when-to-use-tomtom-sdk-vs-direct-maplibre) says which to use when.
144
+ Where the SDK has a feature for the job, prefer it. It survives style switches and style releases, and its events coordinate across modules. [About MapLibre](https://docs.tomtom.com/maps-sdk-js/guides/map/about-maplibre#when-to-use-tomtom-sdk-vs-direct-maplibre) says which to use when.
144
145
 
145
146
  ## Security and privacy
146
147
 
147
- - [**Where your API key runs**](https://docs.tomtom.com/maps-sdk-js/guides/security/where-your-api-key-runs): a key used from the browser can be read by anyone who opens the page; a key used from Node.js cannot.
148
+ - [**Where your API key runs**](https://docs.tomtom.com/maps-sdk-js/guides/security/where-your-api-key-runs): anyone who opens the page can read a key used from the browser, but not one used from Node.js.
148
149
  - [**Proxying your API calls**](https://docs.tomtom.com/maps-sdk-js/guides/security/proxying-api-calls): keep the key on your server by routing the SDK's requests through your own proxy, then [harden that proxy](https://docs.tomtom.com/maps-sdk-js/guides/security/hardening-your-proxy).
149
150
  - [**What the SDK sends, and where**](https://docs.tomtom.com/maps-sdk-js/guides/security/what-the-sdk-sends): the data your users' browsers send to TomTom, for your privacy notice.
150
151
 
@@ -175,4 +176,4 @@ This repository uses a **dual-licensing model**:
175
176
  - **SDK packages and plugins**: `@tomtom-org/maps-sdk` (core, services, map) and the `@tomtom-org/maps-sdk-plugin-*` packages are distributed under a **proprietary license**, in [LICENSE.txt](./LICENSE.txt). They require a TomTom API key and agreement to our terms of service.
176
177
  - **Examples**: the code in `examples/` is **open source** under the Apache 2.0 license, in [examples/LICENSE](./examples/LICENSE). Copy, modify and use it in your projects.
177
178
 
178
- The [GitHub repository](https://github.com/tomtom-international/maps-sdk-js) carries the examples, the changelogs and the AI coding skill; the SDK's sources are not published. It is a read-only mirror: report bugs in its [issues](https://github.com/tomtom-international/maps-sdk-js/issues) and ask questions in its [discussions](https://github.com/tomtom-international/maps-sdk-js/discussions).
179
+ The [GitHub repository](https://github.com/tomtom-international/maps-sdk-js) carries the examples, the changelogs and the AI coding skills. The SDK's sources aren't published. It's a read-only mirror, so report bugs in its [issues](https://github.com/tomtom-international/maps-sdk-js/issues) and ask questions in its [discussions](https://github.com/tomtom-international/maps-sdk-js/discussions).
package/THIRD_PARTY.txt CHANGED
@@ -152,7 +152,7 @@ terms above.
152
152
  ---
153
153
 
154
154
  Name: maplibre-gl
155
- Version: 6.12.0
155
+ Version: 6.13.0
156
156
  License: BSD-3-Clause
157
157
  Bundled: false (peer dependency)
158
158
  Required by: map
@@ -1 +1 @@
1
- import{distance,nearestPointOnLine}from"@turf/turf";import{clamp,isNil,sortedIndex}from"lodash-es";var DEFAULT_COMMON_BASE_URL="https://api.tomtom.com",defaultRetryConfig={initialWaitMs:.447,backoffFactor:1.618,timeoutMs:4e4},defaultConfig={commonBaseURL:"https://api.tomtom.com",apiKey:"",retry:defaultRetryConfig},TomTomConfig=class A{static{this.instance=new A}constructor(){this.config={...defaultConfig}}put(A){this.config={...this.config,...A,...A.retry&&{retry:{...defaultRetryConfig,...A.retry}}}}reset(){this.config={...defaultConfig}}get(){return this.config}},mergeFromGlobal=(A={})=>({...TomTomConfig.instance.get(),...A}),isProxyCredentialsMode=(A=TomTomConfig.instance.get())=>!A.apiKey&&"https://api.tomtom.com"!==(A.commonBaseURL??"https://api.tomtom.com"),LOOPBACK_IPV4=/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,isSecureBaseURL=A=>{let E;try{E=new URL(A)}catch{return!0}if("https:"===E.protocol)return!0;const{hostname:R}=E;return"http:"===E.protocol&&("localhost"===R||R.endsWith(".localhost")||"[::1]"===R||LOOPBACK_IPV4.test(R))},insecureBaseURLMessage=A=>`commonBaseURL ${A} is not https:, so requests to it would carry the API key in the clear; only loopback addresses may use http:.`,geopoliticalViews=["Unified","AE","AR","BN","CL","CN","DZ","IL","IN","KR","MA","MY","PH","PK","RS","RU","TR","TW","US","VN"],chargingPointCapabilities=["ChargingProfileCapable","ChargingPreferencesCapable","ChipCardSupport","ContactlessCardSupport","CreditCardPayable","DebitCardPayable","PedTerminal","RemoteStartStopCapable","Reservable","RfidReader","StartSessionConnectorRequired","TokenGroupCapable","UnlockCapable","PlugAndCharge","Unknown"],chargingPointRestrictions=["EvOnly","Plugged","Disabled","Customers","Motorcycles"],connectorTypes=["StandardHouseholdCountrySpecific","IEC62196Type1","IEC62196Type1CCS","IEC62196Type2CableAttached","IEC62196Type2Outlet","IEC62196Type2CCS","IEC62196Type3","Chademo","GBT20234Part2","GBT20234Part3","IEC60309AC3PhaseRed","IEC60309AC1PhaseBlue","IEC60309DCWhite","Tesla"],currentTypes=["AC1","AC3","DC"],geographyTypes=["Country","CountrySubdivision","CountrySecondarySubdivision","CountryTertiarySubdivision","Municipality","MunicipalitySubdivision","MunicipalitySecondarySubdivision","Neighbourhood","PostalCodeArea"],placeTypes=["POI","Street","Geography","Point Address","Address Range","Cross Street"],poiCategories=["ABORIGINAL_LAND","ADVENTURE_SPORTS_FACILITY","ADVENTURE_VEHICLE_TRAIL","ADVERTISING_COMPANY","AFGHAN_RESTAURANT","AFRICAN_RESTAURANT","AGRICULTURAL_SUPPLIES","AGRICULTURAL_TECHNOLOGY","AGRICULTURE","AIRFIELD","AIRLINE_ACCESS","AIRLINE_COMPANY","AIRPORT","AMBULANCE_UNIT","AMERICAN_RESTAURANT","AMPHITHEATER","AMUSEMENT_PARK","AMUSEMENT_PLACE","ANIMAL_SERVICE","ANIMAL_SHELTER","ANTIQUE_ART_SHOP","APARTMENT_RENTAL","AQUATIC_ZOO","ARABIAN_RESTAURANT","ARBORETA_AND_BOTANICAL_GARDENS","ARCH","ARMENIAN_RESTAURANT","ART_SCHOOL","ASIAN_RESTAURANT","ATHLETICS_TRACK","ATM","ATV_DEALER","AUSTRALIAN_RESTAURANT","AUSTRIAN_RESTAURANT","AUTOMOBILE_COMPANY","AUTOMOBILE_MANUFACTURING","BAGS_LEATHERWEAR","BAKERY","BANDB_OR_GUEST_HOUSE","BANK","BANQUET_ROOMS","BAR","BARBECUE_RESTAURANT","BASEBALL_PARK","BASKETBALL_ARENA","BASQUE_RESTAURANT","BATTLEFIELD","BAY","BEACH","BEACH_CLUB","BEAUTY_SALON","BEAUTY_SUPPLIES","BELGIAN_RESTAURANT","BETTING_STATION","BISTRO","BLOOD_BANK","BOATING_EQUIPMENT_AND_ACCESSORIES","BOAT_DEALER","BOAT_LAUNCHING_RAMP","BODYSHOP","BOLIVIAN_RESTAURANT","BOOK_SHOP","BORDER_CONTROL","BOWLING_CENTER","BRAZILIAN_RESTAURANT","BRIDGE","BRITISH_RESTAURANT","BUFFET_RESTAURANT","BUILDING","BULGARIAN_RESTAURANT","BUNGALOW_RENTAL","BURMESE_RESTAURANT","BUSINESS_PARK","BUSINESS_SERVICES","BUS_CHARTER_COMPANY","BUS_DEALER","BUS_LINES","BUS_STOP","BUTCHER","CABARET_THEATER","CABINS_LODGES","CABLE_AND_TELEPHONE_COMPANY","CAFE","CAFETERIA","CAFE_PUB","CALIFORNIAN_RESTAURANT","CAMBODIAN_RESTAURANT","CAMERAS_AND_PHOTOGRAPHY","CAMPING_GROUND","CANADIAN_RESTAURANT","CANNABIS_SHOP","CAPE","CARAVAN_SITE","CARIBBEAN_RESTAURANT","CARPET_FLOOR_COVERINGS","CAR_DEALER","CAR_GLASS_REPLACEMENT_SHOP","CAR_RENTAL","CAR_REPAIR_AND_SERVICE","CAR_WASH","CASINO_AND_GAMBLING","CATERING_SERVICES","CAVE","CEMETERY","CHALET_RENTAL","CHARGING_LOCATION","CHEMICAL_COMPANY","CHICKEN_RESTAURANT","CHILDCARE","CHILDREN_S_CLOTHES","CHILEAN_RESTAURANT","CHINESE_RESTAURANT","CHRISTMAS_OR_HOLIDAY_SHOP","CHURCH","CINEMA","CLEANING_SERVICES","CLOTHING_SHOP","CLUB_AND_ASSOCIATION","COCKTAIL_BAR","COFFEE_SHOP","COLLEGE_OR_UNIVERSITY","COLOMBIAN_RESTAURANT","COMEDY_CLUB","COMMERCIAL_BUILDING","COMMUNITY_CENTER","COMPANY","COMPUTER_AND_COMPUTER_SUPPLIES","COMPUTER_AND_DATA_SERVICES","CONCERT_HALL","CONSTRUCTION_COMPANY","CONSTRUCTION_MATERIAL_AND_EQUIPMENT","CONSUMER_ELECTRONICS","CONVENIENCE_STORE","CORSICAN_RESTAURANT","COTTAGE_RENTAL","COURIER_DROP_BOX","COURTHOUSE","COVE","CREOLE_RESTAURANT","CREPERIE","CRICKET_GROUND","CUBAN_RESTAURANT","CULTURAL_CENTER","CURTAINS_TEXTILES","CZECH_RESTAURANT","C_DS_DVD_VIDEOS","DAM","DANCE_STUDIO_AND_SCHOOL","DANISH_RESTAURANT","DELICATESSEN","DELIVERY_SERVICE","DENTIST","DEPARTMENT_STORE","DINNER_THEATER","DISCO_CLUB","DIVERSIFIED_FINANCIALS","DOCTOR","DONGBEI_RESTAURANT","DOUGHNUT_RESTAURANT","DO_IT_YOURSELF_CENTERS","DRIVE_IN_MOVIES","DRIVE_THROUGH_BOTTLE_SHOP","DRIVING_SCHOOL","DRUG_STORE","DRY_CLEANER","DUNE","DUTCH_RESTAURANT","EGYPTIAN_RESTAURANT","ELECTRICAL_APPLIANCES_SHOP","ELECTRONICS_COMPANY","EMBASSY","EMERGENCY_MEDICAL_SERVICE","EMERGENCY_ROOM","ENGLISH_RESTAURANT","ENTERTAINMENT","EQUIPMENT_RENTAL","ETHIOPIAN_RESTAURANT","EXCHANGE","EXHIBITION_CONVENTION_CENTER","FACTORY_OUTLET","FAIRGROUND","FARM","FARMERS_MARKET","FAST_FOOD","FERRY_TERMINAL","FINNISH_RESTAURANT","FIRE_STATION","FISHING_AND_HUNTING_AREA","FISHMONGER","FITNESS_CLUB_AND_CENTER","FLATS_OR_APARTMENT_COMPLEX","FLORISTS","FLYING_CLUB","FONDUE_RESTAURANT","FOOD_AND_DRINKS_SHOP","FOOD_MARKET","FOOTBALL_STADIUM","FOOTWEAR_SHOE_REPAIRS","FOREIGN_EXCHANGE","FOREST_AREA","FRENCH_RESTAURANT","FUEL_STATION","FUNERAL_SERVICE_AND_MORTUARIES","FURNITURE_HOME_FURNISHINGS","FUSION_RESTAURANT","GARDEN_CENTERS_SERVICES","GENERAL_HOSPITAL_AND_POLYCLINIC","GENERAL_PRACTITIONER","GERMAN_RESTAURANT","GIFTS_CARDS_NOVELTIES_SOUVENIRS","GLASSWARE_CERAMIC_SHOP","GLASS_WINDOWS_STORE","GOLD_EXCHANGE","GOLF_COURSE","GOVERNMENT_OFFICE","GREEK_RESTAURANT","GREENGROCER","GRILL_RESTAURANT","GROCERY_STORE","GURUDWARA","HAIRDRESSER","HAMBURGER_RESTAURANT","HARBOR","HARDWARE_STORE","HAWAIIAN_RESTAURANT","HEALTHCARE_SERVICE","HELIPORT_OR_HELIPAD","HIGH_SCHOOL","HIKING_TRAIL","HILL","HISTORICAL_PARK","HISTORIC_SITE","HOBBY_SHOP","HOCKEY_CLUB","HOLIDAY_RENTAL","HOME_APPLIANCE_REPAIR","HORSE_RACING_TRACK","HORSE_RIDING","HORSE_RIDING_TRAIL","HORTICULTURE","HOSPITAL","HOSPITAL_FOR_WOMEN_AND_CHILDREN","HOSPITAL_OF_CHINESE_MEDICINE","HOSTEL","HOTEL","HOTEL_OR_MOTEL","HOT_POT_RESTAURANT","HOUSE_AND_GARDEN_FURNITURE_AND_FITTINGS","HUNAN_RESTAURANT","HUNGARIAN_RESTAURANT","ICE_CREAM_PARLOR","ICE_HOCKEY_ARENA","ICE_RINK","IMPORT_OR_EXPORT_AND_DISTRIBUTION","INDIAN_RESTAURANT","INDONESIAN_RESTAURANT","INDUSTRIAL_BUILDING","INFORMAL_MARKET","INSURANCE_COMPANY","INTERNATIONAL_RAILROAD_STATION","INTERNATIONAL_RESTAURANT","INTERNET_CAFE","INVESTMENT_ADVISOR","IRANIAN_RESTAURANT","IRISH_RESTAURANT","ISLAND","ISRAELI_RESTAURANT","ITALIAN_RESTAURANT","JAMAICAN_RESTAURANT","JAPANESE_RESTAURANT","JAZZ_CLUB","JEWELRY_CLOCKS_WATCHES","JEWISH_RESTAURANT","JUICE_BAR","JUNIOR_COLLEGE_OR_COMMUNITY_COLLEGE","KARAOKE_CLUB","KITCHENS_BATHROOMS","KOREAN_RESTAURANT","KOSHER_RESTAURANT","LANGUAGE_SCHOOL","LATIN_AMERICAN_RESTAURANT","LAUNDRY","LEBANESE_RESTAURANT","LEGAL_SERVICES","LEISURE_CENTER","LIGHTING_SHOPS","LOCALE","LOCAL_SPECIALITIES_SHOP","LOTTERY_SHOP","MALL","MANUFACTURING_COMPANY","MANUFACTURING_FACILITY","MARINA","MARKETPLACE","MARSH","MAUSOLEUM_OR_GRAVE","MECHANICAL_ENGINEERING","MEDIA_FACILITY","MEDICAL_SUPPLIES_EQUIPMENT","MEDICINAL_AND_RECREATIONAL_DISPENSARY","MEDICINAL_MARIJUANA_DISPENSARY","MEDITERRANEAN_RESTAURANT","MEMORIAL","MEN_S_CLOTHING","MEXICAN_RESTAURANT","MICROBREWERY","MIDDLE_EASTERN_RESTAURANT","MIDDLE_SCHOOL","MILITARY_AIRPORT","MINERAL_OR_HOT_SPRINGS","MINING_COMPANY","MOBILE_PHONE_SHOP","MONGOLIAN_RESTAURANT","MONUMENT","MOROCCAN_RESTAURANT","MOSQUE","MOTEL","MOTORCYCLE_DEALER","MOTORCYCLE_REPAIR","MOTORING_ORGANIZATION_OFFICE","MOTOR_RACING_STADIUM","MOUNTAIN_BIKE_TRAIL","MOUNTAIN_PASS","MOUNTAIN_PEAK","MOVIE_THEATER","MOVING_AND_STORAGE_COMPANY","MULTI_PURPOSE_STADIUM","MUSEUM","MUSIC_CENTER","MUSIC_INSTRUMENTS_STORE","NAIL_SALON","NATIONAL_RAILROAD_STATION","NATURAL_FEATURE","NATURAL_TOURIST_ATTRACTION","NEPALESE_RESTAURANT","NETBALL_STADIUM","NEWSAGENTS_TOBACCONISTS","NIGHTLIFE","NON_GOVERNMENTAL_ORGANIZATION","NORWEGIAN_RESTAURANT","OASIS","OBSERVATORY","OFFICE_EQUIPMENT","OIL_AND_NATURAL_GAS","OPEN_CAR_PARKING_AREA","OPERA_HOUSE","OPTICIAN","ORGANIC_FOOD_RESTAURANT","ORIENTAL_RESTAURANT","PAGODA","PAINTING_DECORATING","PAKISTANI_RESTAURANT","PAN","PARK","PARKING_GARAGE","PARKWAY","PARK_AND_RECREATION_AREA","PASSENGER_TRANSPORT_TICKET_OFFICE","PAWN_SHOP","PEDESTRIAN_SUBWAY","PERSONAL_CARE_FACILITY","PERSONAL_SERVICE","PERUVIAN_RESTAURANT","PET_SUPPLIES","PHARMACEUTICAL_COMPANY","PHARMACY","PHILIPPINE_RESTAURANT","PHOTOCOPY_SHOP","PHOTO_LAB_OR_DEVELOPMENT","PICNIC_AREA","PIZZERIA","PLAIN_OR_FLAT","PLANETARIUM","PLATEAU","POLICE_STATION","POLISH_RESTAURANT","PORTUGUESE_RESTAURANT","PORT_WAREHOUSE_FACILITY","POST_OFFICE","PRE_SCHOOL","PRIMARY_PRODUCER","PRIMARY_RESOURCE_UTILITY","PRIMARY_SCHOOL","PRISON","PRIVATE_AIRPORT","PROTECTED_LAND","PUB","PUBLIC_AIRPORT","PUBLIC_AMENITY","PUBLIC_BATHROOM","PUBLIC_CALL_BOX","PUBLIC_LIBRARY","PUBLIC_MARKET","PUBLIC_TRANSPORT_STOP","PUBLISHING_TECHNOLOGIES","QUARRY","RACE_TRACK","RAILWAY_STATION","RAPIDS","REAL_ESTATE_AGENT","REAL_ESTATE_COMPANY","RECREATIONAL_CAMPING_GROUND","RECREATIONAL_MARIJUANA_DISPENSARY","RECREATIONAL_VEHICLE_DEALER","RECREATION_AREA","RECYCLING_SHOP","REEF","RELIGIOUS_SITE","RENTAL_CAR_PARKING","RESCUE_SERVICE","RESEARCH_FACILITY","RESERVOIR","RESIDENTIAL_ACCOMMODATION","RESIDENTIAL_ENTRANCE","RESORT","RESTAURANT","RESTAURANT_AREA","REST_AREA","REST_CAMP","RETAIL_OUTLET","RETIREMENT_COMMUNITY","RIDGE","RIVER_CROSSING","ROCKS","ROCK_CLIMBING_TRAIL","RUGBY_GROUND","RUSSIAN_RESTAURANT","SALAD_BAR","SANDWICH_RESTAURANT","SAUNA_SOLARIUM_MASSAGE","SCANDINAVIAN_RESTAURANT","SCHOOL","SCHOOL_BUS_COMPANY","SEAFOOD","SECURED_ENTRANCE","SECURITY_PRODUCTS","SENIOR_HIGH_SCHOOL","SERVICE_COMPANY","SHANDONG_RESTAURANT","SHOPPING_SERVICE","SHOP_OR_STORE","SICHUAN_RESTAURANT","SKI_RESORT","SNACKS_RESTAURANT","SOCCER_STADIUM","SOFTWARE_COMPANY","SOUL_FOOD","SOUP_RESTAURANT","SPANISH_RESTAURANT","SPECIALIST","SPECIALTY_CLOTHING_SHOP","SPECIALTY_FOODS","SPECIAL_HOSPITAL","SPORTS_CENTER","SPORTS_EQUIPMENT_AND_CLOTHING","SQUASH_COURT","STADIUM","STATION_ACCESS","STATUE","STEAK_HOUSE","STOCK_EXCHANGE","STREETCAR_STOP","SUBWAY_ENTRANCE","SUBWAY_STATION","SUPERMARKET","SUSHI_RESTAURANT","SWEDISH_RESTAURANT","SWIMMING_POOL","SWISS_RESTAURANT","SYNAGOG","SYRIAN_RESTAURANT","TAILOR_SHOP","TAIWANESE_RESTAURANT","TAKEOUT_FOOD","TAPAS_RESTAURANT","TAXI_LIMOUSINE_AND_SHUTTLE_SERVICE","TAXI_STAND","TAX_SERVICES","TEA_HOUSE","TELECOMMUNICATIONS","TEMPLE","TENNIS_COURT","TEPPANYAKI_RESTAURANT","THAI_RESTAURANT","THEATER","THEMATIC_SPORT_CENTER","TIBETAN_RESTAURANT","TIRE_SERVICE","TOLL_GATE","TOURIST_ATTRACTION","TOURIST_INFORMATION","TOWER","TOYS_GAMES_SHOP","TRAFFIC_CONTROL_DEPARTMENT","TRAIL_SYSTEM","TRANSPORT_ACCESS","TRANSPORT_AUTHORITY_VEHICLE_REGISTRATION","TRANSPORT_COMPANY","TRAVEL_AGENT","TRUCK_DEALER","TRUCK_REPAIR_AND_SERVICE","TRUCK_STOP","TUNISIAN_RESTAURANT","TUNNEL","TURKISH_RESTAURANT","URBAN_STATION","VALLEY","VAN_DEALER","VARIETY_STORE","VEGETARIAN_RESTAURANT","VEHICLE_DEALER","VEHICLE_REPAIR","VENEZUELAN_RESTAURANT","VETERINARY","VIDEO_RENTAL_SHOP","VIETNAMESE_RESTAURANT","VIEWPOINT","VILLA_RENTAL","VOCATIONAL_SCHOOL","WATER_HOLE","WATER_SPORT","WEDDING_SERVICES","WEIGH_STATION","WELFARE_ORGANIZATION","WELL","WESTERN_RESTAURANT","WHOLESALE_CLUB","WILDERNESS_AREA","WILDLIFE_PARK","WINERY","WINE_SPIRITS","WOMEN_S_CLOTHING","YACHT_BASIN","ZOO","ZOOS_ARBORETA_BOTANICAL_GARDEN"],budgetTypes=["timeMinutes","distanceKM"],budgetUnits={timeMinutes:"min",distanceKM:"km"},avoidableTypes=["tollRoads","motorways","ferries","unpavedRoads","carpools","alreadyUsedRoads","borderCrossings","tunnels","carTrains","lowEmissionZones"],inputSectionTypes=["carpool","carTrain","country","ferry","importantRoadStretch","lowEmissionZone","motorway","pedestrian","roadShields","speedLimit","toll","tollRoad","tollVignette","traffic","tunnel","unpaved","urban","vehicleRestricted"],inputSectionTypesWithGuidance=[...inputSectionTypes,"lanes"],sectionTypes=[...inputSectionTypesWithGuidance,"leg"],sdkErrorCodes=["INVALID_REQUEST","INSECURE_BASE_URL","INVALID_CREDENTIALS","INSUFFICIENT_PERMISSIONS","NOT_FOUND","RATE_LIMITED","LIVE_SERVICE_NOT_AVAILABLE","NETWORK_NOT_AVAILABLE","ABORTED","WEBGL_UNSUPPORTED","WEBGL_CONTEXT_LOST","STYLE_LOAD_FAILED","INTERNAL"],areaAnalyticsMetricKeys=["speed","freeFlowSpeed","congestionLevel","travelTime","networkLength"],trafficIncidentRequestCategories=["accident","broken-down-vehicle","danger","flooding","fog","frost","jam","lane-closed","other","rain","road-closed","roadworks","wind"],fullTrafficIncidentCategories=[...trafficIncidentRequestCategories,"animals-on-road","narrow-lanes"],trafficIncidentTimeValidities=["present","future"],isBBoxWithArea=A=>!!A&&(A.length>=4&&A[3]!==A[1]&&A[2]!==A[0]),bboxOnlyIfWithArea=A=>isBBoxWithArea(A)?A:void 0,bboxExpandedWithPosition=(A,E)=>{if(A&&!(A.length<2))return E?[E[0]>A[0]?A[0]:E[0],E[1]>A[1]?A[1]:E[1],E[2]<A[0]?A[0]:E[2],E[3]<A[1]?A[1]:E[3]]:[A[0],A[1],A[0],A[1]]},bboxFromBBoxes=A=>A?.length?A.reduce((A,E)=>{return R=E,(T=A)&&R?[T[0]>R[0]?R[0]:T[0],T[1]>R[1]?R[1]:T[1],T[2]<R[2]?R[2]:T[2],T[3]<R[3]?R[3]:T[3]]:R||T;var R,T}):void 0,bboxFromCoordsArray=A=>{const E=A?.length;if(!E)return;let R;const T=Math.ceil(E/1e3);for(let I=0;I<E;I+=T)R=bboxExpandedWithPosition(A[I],R);return 1===T?R:bboxExpandedWithPosition(A[E-1],R)},bboxFromGeoJSON=A=>{if(A){if(Array.isArray(A))return"number"==typeof A[0]?A.length>=4?A:void 0:bboxFromBBoxes(A.map(A=>bboxFromGeoJSON(A)));if(A.bbox)return A.bbox;switch(A.type){case"Feature":return bboxFromGeoJSON(A.geometry);case"FeatureCollection":return bboxFromBBoxes(A.features.map(bboxFromGeoJSON));case"GeometryCollection":return bboxFromBBoxes(A.geometries.map(bboxFromGeoJSON));case"Point":return bboxExpandedWithPosition(A.coordinates);case"LineString":case"MultiPoint":return bboxFromCoordsArray(A.coordinates);case"MultiLineString":case"Polygon":return bboxFromBBoxes(A.coordinates.map(bboxFromCoordsArray));case"MultiPolygon":return bboxFromBBoxes(A.coordinates.flatMap(A=>A.map(bboxFromCoordsArray)));default:return}}},bboxCenter=A=>[(A[0]+A[2])/2,(A[1]+A[3])/2],polygonFromBBox=A=>{const[E,R,T,I]=A;return{type:"Feature",geometry:{type:"Polygon",coordinates:[[[E,R],[T,R],[T,I],[E,I],[E,R]]]},properties:{}}},generateId=()=>Date.now().toString(36)+Math.random().toString(36).substring(2),TOMTOM_USER_AGENT_SDK_NAME="MapsSDKJS",generateTomTomHeaders=A=>!1===A.sendUserAgentHeader?{}:{"tomtom-user-agent":A["tomtom-user-agent"]??"MapsSDKJS/1.0.0-rc.0"},getPosition=(A,E)=>{if(A){if(Array.isArray(A))return A;if(A.coordinates)return A.coordinates;if(A.geometry)return"main-when-available"===E?.useEntryPoint?(R=A,R?.properties?.entryPoints?.find(A=>"main"===A.type))?.position??A.geometry.coordinates:A.geometry.coordinates}var R;return null},getPositionStrict=(A,E)=>{const R=getPosition(A,E);if(!R)throw new Error(`The received object does not have lng-lat coordinates: ${JSON.stringify(A)}`);return R},toPointGeometry=A=>({type:"Point",coordinates:A}),poiCategoriesToIDs={TRAFFIC_CONTROL_DEPARTMENT:[7301,7301002],TRAIL_SYSTEM:[7302],MOUNTAIN_BIKE_TRAIL:[7302002],ADVENTURE_VEHICLE_TRAIL:[7302003],HIKING_TRAIL:[7302004],HORSE_RIDING_TRAIL:[7302005],ROCK_CLIMBING_TRAIL:[7302006],RESIDENTIAL_ACCOMMODATION:[7303],RETIREMENT_COMMUNITY:[7303002],FLATS_OR_APARTMENT_COMPLEX:[7303003],HOLIDAY_RENTAL:[7304],COTTAGE_RENTAL:[7304002],VILLA_RENTAL:[7304003],BUNGALOW_RENTAL:[7304004],CHALET_RENTAL:[7304005],APARTMENT_RENTAL:[7304006],ADVENTURE_SPORTS_FACILITY:[7305],HELIPORT_OR_HELIPAD:[7308],CHARGING_LOCATION:[7309],VEHICLE_REPAIR:[7310],BODYSHOP:[7310002],CAR_GLASS_REPLACEMENT_SHOP:[7310003],CAR_REPAIR_AND_SERVICE:[7310004],TIRE_SERVICE:[7310007],MOTORCYCLE_REPAIR:[7310008],TRUCK_REPAIR_AND_SERVICE:[7310009],FUEL_STATION:[7311],CAR_RENTAL:[7312],PARKING_GARAGE:[7313],HOTEL_OR_MOTEL:[7314],BANDB_OR_GUEST_HOUSE:[7314002],HOTEL:[7314003],HOSTEL:[7314004],RESORT:[7314005],MOTEL:[7314006],CABINS_LODGES:[7314007],REST_CAMP:[7314008],RESTAURANT:[7315],AFRICAN_RESTAURANT:[7315002],AMERICAN_RESTAURANT:[7315003],AUSTRIAN_RESTAURANT:[7315004],BARBECUE_RESTAURANT:[7315005],BELGIAN_RESTAURANT:[7315006],BISTRO:[7315007],BRITISH_RESTAURANT:[7315008],CALIFORNIAN_RESTAURANT:[7315009],CANADIAN_RESTAURANT:[7315010],CARIBBEAN_RESTAURANT:[7315011],CHINESE_RESTAURANT:[7315012],CREPERIE:[7315013],DUTCH_RESTAURANT:[7315014],FAST_FOOD:[7315015],PHILIPPINE_RESTAURANT:[7315016],FRENCH_RESTAURANT:[7315017],GERMAN_RESTAURANT:[7315018],GREEK_RESTAURANT:[7315019],GRILL_RESTAURANT:[7315020],HAWAIIAN_RESTAURANT:[7315021],HUNGARIAN_RESTAURANT:[7315022],INDIAN_RESTAURANT:[7315023],INDONESIAN_RESTAURANT:[7315024],ITALIAN_RESTAURANT:[7315025],JAPANESE_RESTAURANT:[7315026],JEWISH_RESTAURANT:[7315027],KOREAN_RESTAURANT:[7315028],LATIN_AMERICAN_RESTAURANT:[7315029],LEBANESE_RESTAURANT:[7315030],MEDITERRANEAN_RESTAURANT:[7315032],MEXICAN_RESTAURANT:[7315033],MIDDLE_EASTERN_RESTAURANT:[7315034],ORIENTAL_RESTAURANT:[7315035],PIZZERIA:[7315036],POLISH_RESTAURANT:[7315037],PORTUGUESE_RESTAURANT:[7315038],RUSSIAN_RESTAURANT:[7315040],SANDWICH_RESTAURANT:[7315042],SEAFOOD:[7315043],SPANISH_RESTAURANT:[7315044],STEAK_HOUSE:[7315045],SWISS_RESTAURANT:[7315047],THAI_RESTAURANT:[7315048],TURKISH_RESTAURANT:[7315049],VEGETARIAN_RESTAURANT:[7315050],VIETNAMESE_RESTAURANT:[7315051],HUNAN_RESTAURANT:[7315052],SHANDONG_RESTAURANT:[7315053],SICHUAN_RESTAURANT:[7315056],DONGBEI_RESTAURANT:[7315057],HOT_POT_RESTAURANT:[7315058],TAIWANESE_RESTAURANT:[7315059],WESTERN_RESTAURANT:[7315060],PERUVIAN_RESTAURANT:[7315061],ASIAN_RESTAURANT:[7315062],CREOLE_RESTAURANT:[7315063],SOUL_FOOD:[7315064],IRISH_RESTAURANT:[7315065],JAMAICAN_RESTAURANT:[7315066],KOSHER_RESTAURANT:[7315067],CZECH_RESTAURANT:[7315068],HAMBURGER_RESTAURANT:[7315069],CHICKEN_RESTAURANT:[7315070],FUSION_RESTAURANT:[7315071],BRAZILIAN_RESTAURANT:[7315072],INTERNATIONAL_RESTAURANT:[7315073],MOROCCAN_RESTAURANT:[7315074],ORGANIC_FOOD_RESTAURANT:[7315075],TAPAS_RESTAURANT:[7315076],ICE_CREAM_PARLOR:[7315078],DOUGHNUT_RESTAURANT:[7315079],AFGHAN_RESTAURANT:[7315081],ARABIAN_RESTAURANT:[7315083],ARMENIAN_RESTAURANT:[7315085],AUSTRALIAN_RESTAURANT:[7315086],BASQUE_RESTAURANT:[7315087],BOLIVIAN_RESTAURANT:[7315088],BULGARIAN_RESTAURANT:[7315090],BURMESE_RESTAURANT:[7315091],CAMBODIAN_RESTAURANT:[7315092],CHILEAN_RESTAURANT:[7315093],COLOMBIAN_RESTAURANT:[7315094],CORSICAN_RESTAURANT:[7315095],CUBAN_RESTAURANT:[7315096],DANISH_RESTAURANT:[7315098],EGYPTIAN_RESTAURANT:[7315100],ENGLISH_RESTAURANT:[7315101],ETHIOPIAN_RESTAURANT:[7315102],FINNISH_RESTAURANT:[7315104],IRANIAN_RESTAURANT:[7315105],ISRAELI_RESTAURANT:[7315106],MONGOLIAN_RESTAURANT:[7315110],NEPALESE_RESTAURANT:[7315111],NORWEGIAN_RESTAURANT:[7315112],SCANDINAVIAN_RESTAURANT:[7315114],SWEDISH_RESTAURANT:[7315119],SYRIAN_RESTAURANT:[7315120],TEPPANYAKI_RESTAURANT:[7315121],TIBETAN_RESTAURANT:[7315122],TUNISIAN_RESTAURANT:[7315123],VENEZUELAN_RESTAURANT:[7315125],PAKISTANI_RESTAURANT:[7315127],FONDUE_RESTAURANT:[7315134],SNACKS_RESTAURANT:[7315139],SOUP_RESTAURANT:[7315140],BUFFET_RESTAURANT:[7315142],SALAD_BAR:[7315143],TAKEOUT_FOOD:[7315145],BANQUET_ROOMS:[7315146],CAFETERIA:[7315147],SUSHI_RESTAURANT:[7315148],JUICE_BAR:[7315149],TOURIST_INFORMATION:[7316],MUSEUM:[7317],THEATER:[7318,7318005],CONCERT_HALL:[7318002],MUSIC_CENTER:[7318003],OPERA_HOUSE:[7318004],CABARET_THEATER:[7318006],AMPHITHEATER:[7318007],DINNER_THEATER:[7318008],CULTURAL_CENTER:[7319],SPORTS_CENTER:[7320,7320004],FITNESS_CLUB_AND_CENTER:[7320002],HORSE_RIDING:[7320003],THEMATIC_SPORT_CENTER:[7320005],SQUASH_COURT:[7320006],HOSPITAL:[7321],GENERAL_HOSPITAL_AND_POLYCLINIC:[7321002],SPECIAL_HOSPITAL:[7321003],HOSPITAL_OF_CHINESE_MEDICINE:[7321004],HOSPITAL_FOR_WOMEN_AND_CHILDREN:[7321005],POLICE_STATION:[7322],POST_OFFICE:[7324],PHARMACY:[7326],DEPARTMENT_STORE:[7327],BANK:[7328],MARKETPLACE:[7332],INFORMAL_MARKET:[7332002],PUBLIC_MARKET:[7332003],FARMERS_MARKET:[7332004],SUPERMARKET:[7332005],AGRICULTURE:[7335],HORTICULTURE:[7335002],PRIMARY_PRODUCER:[7335003],FARM:[7335004],VIEWPOINT:[7337],SWIMMING_POOL:[7338],RELIGIOUS_SITE:[7339],CHURCH:[7339002],MOSQUE:[7339003],SYNAGOG:[7339004],TEMPLE:[7339005],GURUDWARA:[7339006],PAGODA:[7339008],CASINO_AND_GAMBLING:[7341],CINEMA:[7342],MOVIE_THEATER:[7342002],DRIVE_IN_MOVIES:[7342003],MARINA:[7347,7347002],YACHT_BASIN:[7347003],WINERY:[7349],FERRY_TERMINAL:[7352],TRUCK_STOP:[7358],WEIGH_STATION:[7359,7359002],CAMPING_GROUND:[7360],RECREATIONAL_CAMPING_GROUND:[7360002],CARAVAN_SITE:[7360003],COMMUNITY_CENTER:[7363],EMBASSY:[7365],BORDER_CONTROL:[7366],GOVERNMENT_OFFICE:[7367],MOTORING_ORGANIZATION_OFFICE:[7368],OPEN_CAR_PARKING_AREA:[7369,7369002],SCHOOL:[7372,7372002],CHILDCARE:[7372003],PRE_SCHOOL:[7372004],PRIMARY_SCHOOL:[7372005],HIGH_SCHOOL:[7372006],SENIOR_HIGH_SCHOOL:[7372007],VOCATIONAL_SCHOOL:[7372008],LANGUAGE_SCHOOL:[7372010],ART_SCHOOL:[7372012],MIDDLE_SCHOOL:[7372014],DRIVING_SCHOOL:[7372016],MALL:[7373],STADIUM:[7374],ATHLETICS_TRACK:[7374002],CRICKET_GROUND:[7374003],SOCCER_STADIUM:[7374004],HORSE_RACING_TRACK:[7374005],MULTI_PURPOSE_STADIUM:[7374006],RUGBY_GROUND:[7374007],ICE_HOCKEY_ARENA:[7374008],BASEBALL_PARK:[7374009],FOOTBALL_STADIUM:[7374010],MOTOR_RACING_STADIUM:[7374011],BASKETBALL_ARENA:[7374012],RACE_TRACK:[7374013],NETBALL_STADIUM:[7374014],TOLL_GATE:[7375],TOURIST_ATTRACTION:[7376],BUILDING:[7376002],MONUMENT:[7376003],NATURAL_TOURIST_ATTRACTION:[7376004],OBSERVATORY:[7376005],PLANETARIUM:[7376006],DAM:[7376007],TUNNEL:[7376008],TOWER:[7376009],BRIDGE:[7376010],MAUSOLEUM_OR_GRAVE:[7376011],ARCH:[7376012],STATUE:[7376013],WATER_HOLE:[7376014],COLLEGE_OR_UNIVERSITY:[7377,7377002],JUNIOR_COLLEGE_OR_COMMUNITY_COLLEGE:[7377003],BUSINESS_PARK:[7378],RAILWAY_STATION:[7380],INTERNATIONAL_RAILROAD_STATION:[7380002],NATIONAL_RAILROAD_STATION:[7380003],URBAN_STATION:[7380004],SUBWAY_STATION:[7380005],AIRPORT:[7383],PUBLIC_AIRPORT:[7383002],PRIVATE_AIRPORT:[7383003],MILITARY_AIRPORT:[7383004],AIRFIELD:[7383005],COURIER_DROP_BOX:[7388],TRANSPORT_ACCESS:[7389],AIRLINE_ACCESS:[7389002],STATION_ACCESS:[7389003],SECURED_ENTRANCE:[7389004],SUBWAY_ENTRANCE:[7389999],EMERGENCY_MEDICAL_SERVICE:[7391],FIRE_STATION:[7392],REST_AREA:[7395],ATM:[7397],NATURAL_FEATURE:[8099],MOUNTAIN_PEAK:[8099002],CAVE:[8099003],RIDGE:[8099004],DUNE:[8099005],VALLEY:[8099006],PLAIN_OR_FLAT:[8099007],PLATEAU:[8099008],PAN:[8099009],WELL:[8099010],OASIS:[8099011],ROCKS:[8099012],RESERVOIR:[8099013],REEF:[8099014],RAPIDS:[8099015],BAY:[8099016],COVE:[8099017],HARBOR:[8099018],CAPE:[8099020],MINERAL_OR_HOT_SPRINGS:[8099021],ISLAND:[8099022],MARSH:[8099023],RIVER_CROSSING:[8099024],HILL:[8099025],QUARRY:[8099026],LOCALE:[8099027],PRIMARY_RESOURCE_UTILITY:[9150],TRANSPORT_AUTHORITY_VEHICLE_REGISTRATION:[9151],NON_GOVERNMENTAL_ORGANIZATION:[9152],WELFARE_ORGANIZATION:[9153],PRISON:[9154],CAR_WASH:[9155,9155002],MANUFACTURING_FACILITY:[9156],RESEARCH_FACILITY:[9157],MEDIA_FACILITY:[9158],PORT_WAREHOUSE_FACILITY:[9159],EXCHANGE:[9160],STOCK_EXCHANGE:[9160002],GOLD_EXCHANGE:[9160003],FOREIGN_EXCHANGE:[9160004],COMPANY:[9352],SERVICE_COMPANY:[9352002],ADVERTISING_COMPANY:[9352003],COMPUTER_AND_DATA_SERVICES:[9352004],SOFTWARE_COMPANY:[9352005],DIVERSIFIED_FINANCIALS:[9352006],INSURANCE_COMPANY:[9352007],DELIVERY_SERVICE:[9352008],REAL_ESTATE_COMPANY:[9352009],MANUFACTURING_COMPANY:[9352011],AGRICULTURAL_TECHNOLOGY:[9352012],AUTOMOBILE_COMPANY:[9352013],CHEMICAL_COMPANY:[9352014],ELECTRONICS_COMPANY:[9352015],MECHANICAL_ENGINEERING:[9352016],PHARMACEUTICAL_COMPANY:[9352018],PUBLISHING_TECHNOLOGIES:[9352019],TELECOMMUNICATIONS:[9352020],TAX_SERVICES:[9352022],LEGAL_SERVICES:[9352023],TRANSPORT_COMPANY:[9352024],BUS_CHARTER_COMPANY:[9352025],TAXI_LIMOUSINE_AND_SHUTTLE_SERVICE:[9352026],BUS_LINES:[9352027],SCHOOL_BUS_COMPANY:[9352028],CLEANING_SERVICES:[9352029],OIL_AND_NATURAL_GAS:[9352030],MINING_COMPANY:[9352031],CONSTRUCTION_COMPANY:[9352032],MOVING_AND_STORAGE_COMPANY:[9352033],AIRLINE_COMPANY:[9352034],FUNERAL_SERVICE_AND_MORTUARIES:[9352036],INVESTMENT_ADVISOR:[9352037],EQUIPMENT_RENTAL:[9352038],BUSINESS_SERVICES:[9352039],CABLE_AND_TELEPHONE_COMPANY:[9352040],AUTOMOBILE_MANUFACTURING:[9352041],IMPORT_OR_EXPORT_AND_DISTRIBUTION:[9352042],CATERING_SERVICES:[9352043],HOME_APPLIANCE_REPAIR:[9352044],ANIMAL_SHELTER:[9352045],WEDDING_SERVICES:[9352046],BEACH:[9357],RESTAURANT_AREA:[9359],ICE_RINK:[9360],SHOP_OR_STORE:[9361],BOOK_SHOP:[9361002],C_DS_DVD_VIDEOS:[9361003],CHILDREN_S_CLOTHES:[9361004],FOOTWEAR_SHOE_REPAIRS:[9361005],CLOTHING_SHOP:[9361006],MEN_S_CLOTHING:[9361007],WOMEN_S_CLOTHING:[9361008],CONVENIENCE_STORE:[9361009],DRY_CLEANER:[9361010],CAMERAS_AND_PHOTOGRAPHY:[9361011],COMPUTER_AND_COMPUTER_SUPPLIES:[9361012],CONSUMER_ELECTRONICS:[9361013],OFFICE_EQUIPMENT:[9361014],REAL_ESTATE_AGENT:[9361015],FACTORY_OUTLET:[9361016],FLORISTS:[9361017],BAKERY:[9361018],BUTCHER:[9361019],FISHMONGER:[9361020],FOOD_MARKET:[9361021],GREENGROCER:[9361022],GROCERY_STORE:[9361023],FOOD_AND_DRINKS_SHOP:[9361024],WINE_SPIRITS:[9361025],GIFTS_CARDS_NOVELTIES_SOUVENIRS:[9361026],HAIRDRESSER:[9361027],CARPET_FLOOR_COVERINGS:[9361028],CURTAINS_TEXTILES:[9361029],DO_IT_YOURSELF_CENTERS:[9361030],HOUSE_AND_GARDEN_FURNITURE_AND_FITTINGS:[9361031],GARDEN_CENTERS_SERVICES:[9361032],KITCHENS_BATHROOMS:[9361033],LIGHTING_SHOPS:[9361034],PAINTING_DECORATING:[9361035],JEWELRY_CLOCKS_WATCHES:[9361036],NEWSAGENTS_TOBACCONISTS:[9361037],OPTICIAN:[9361038],SPORTS_EQUIPMENT_AND_CLOTHING:[9361039],TOYS_GAMES_SHOP:[9361040],TRAVEL_AGENT:[9361041],CONSTRUCTION_MATERIAL_AND_EQUIPMENT:[9361042],MEDICAL_SUPPLIES_EQUIPMENT:[9361043],VIDEO_RENTAL_SHOP:[9361044],LAUNDRY:[9361045],PHOTO_LAB_OR_DEVELOPMENT:[9361046],PHOTOCOPY_SHOP:[9361047],ANIMAL_SERVICE:[9361048],ANTIQUE_ART_SHOP:[9361049],BEAUTY_SUPPLIES:[9361050],DRUG_STORE:[9361051],ELECTRICAL_APPLIANCES_SHOP:[9361052],HOBBY_SHOP:[9361053],FURNITURE_HOME_FURNISHINGS:[9361054],GLASSWARE_CERAMIC_SHOP:[9361055],LOCAL_SPECIALITIES_SHOP:[9361056],RECYCLING_SHOP:[9361057],BAGS_LEATHERWEAR:[9361058],MUSIC_INSTRUMENTS_STORE:[9361059],DELICATESSEN:[9361060],SPECIALTY_FOODS:[9361061],SHOPPING_SERVICE:[9361062],RETAIL_OUTLET:[9361063],PET_SUPPLIES:[9361064],WHOLESALE_CLUB:[9361066],BEAUTY_SALON:[9361067],NAIL_SALON:[9361068],HARDWARE_STORE:[9361069],PAWN_SHOP:[9361070],LOTTERY_SHOP:[9361071],BETTING_STATION:[9361072],AGRICULTURAL_SUPPLIES:[9361073],MOBILE_PHONE_SHOP:[9361075],DRIVE_THROUGH_BOTTLE_SHOP:[9361076],TAILOR_SHOP:[9361077],SECURITY_PRODUCTS:[9361078],SPECIALTY_CLOTHING_SHOP:[9361079],GLASS_WINDOWS_STORE:[9361080],VARIETY_STORE:[9361081],CHRISTMAS_OR_HOLIDAY_SHOP:[9361082],BOATING_EQUIPMENT_AND_ACCESSORIES:[9361083],PARK_AND_RECREATION_AREA:[9362],BATTLEFIELD:[9362002],CEMETERY:[9362003],HISTORIC_SITE:[9362004],HISTORICAL_PARK:[9362005],MEMORIAL:[9362007],PARK:[9362008],PARKWAY:[9362009],RECREATION_AREA:[9362011],WILDERNESS_AREA:[9362014],FOREST_AREA:[9362015],FISHING_AND_HUNTING_AREA:[9362016],FAIRGROUND:[9362017],SKI_RESORT:[9362026],BOAT_LAUNCHING_RAMP:[9362032],PICNIC_AREA:[9362033],PROTECTED_LAND:[9362037],COURTHOUSE:[9363],CANNABIS_SHOP:[9364],MEDICINAL_MARIJUANA_DISPENSARY:[9364002],RECREATIONAL_MARIJUANA_DISPENSARY:[9364003],MEDICINAL_AND_RECREATIONAL_DISPENSARY:[9364004],TENNIS_COURT:[9369],WATER_SPORT:[9371],DOCTOR:[9373],GENERAL_PRACTITIONER:[9373002],SPECIALIST:[9373003],DENTIST:[9374],VETERINARY:[9375],CAFE_PUB:[9376],CAFE:[9376002],PUB:[9376003],INTERNET_CAFE:[9376004],TEA_HOUSE:[9376005],COFFEE_SHOP:[9376006],MICROBREWERY:[9376007],EXHIBITION_CONVENTION_CENTER:[9377],LEISURE_CENTER:[9378],BOWLING_CENTER:[9378002],DANCE_STUDIO_AND_SCHOOL:[9378003],FLYING_CLUB:[9378004],SAUNA_SOLARIUM_MASSAGE:[9378005],NIGHTLIFE:[9379],DISCO_CLUB:[9379002],BAR:[9379004],COCKTAIL_BAR:[9379006],JAZZ_CLUB:[9379008],COMEDY_CLUB:[9379009],KARAOKE_CLUB:[9379010],COMMERCIAL_BUILDING:[9382],INDUSTRIAL_BUILDING:[9383],ABORIGINAL_LAND:[9389],HEALTHCARE_SERVICE:[9663],PERSONAL_SERVICE:[9663002],PERSONAL_CARE_FACILITY:[9663003],BLOOD_BANK:[9663004],AMBULANCE_UNIT:[9663005],ENTERTAINMENT:[9900],AMUSEMENT_PARK:[9902,9902003],AMUSEMENT_PLACE:[9902004],VEHICLE_DEALER:[9910],CAR_DEALER:[9910002],MOTORCYCLE_DEALER:[9910003],BOAT_DEALER:[9910004],RECREATIONAL_VEHICLE_DEALER:[9910005],TRUCK_DEALER:[9910006],VAN_DEALER:[9910007],BUS_DEALER:[9910008],ATV_DEALER:[9910009],GOLF_COURSE:[9911],PUBLIC_LIBRARY:[9913],ZOOS_ARBORETA_BOTANICAL_GARDEN:[9927],ARBORETA_AND_BOTANICAL_GARDENS:[9927002],ZOO:[9927003],AQUATIC_ZOO:[9927004],WILDLIFE_PARK:[9927005],RENTAL_CAR_PARKING:[9930],PUBLIC_AMENITY:[9932],PASSENGER_TRANSPORT_TICKET_OFFICE:[9932002],PEDESTRIAN_SUBWAY:[9932003],PUBLIC_CALL_BOX:[9932004],PUBLIC_BATHROOM:[9932005],RESCUE_SERVICE:[9932006],MOUNTAIN_PASS:[9935],CLUB_AND_ASSOCIATION:[9937],BEACH_CLUB:[9937002],HOCKEY_CLUB:[9937003],PUBLIC_TRANSPORT_STOP:[9942],BUS_STOP:[9942002],TAXI_STAND:[9942003],STREETCAR_STOP:[9942004],EMERGENCY_ROOM:[9956],RESIDENTIAL_ENTRANCE:[9999]},poiCategoriesToID=Object.fromEntries(Object.entries(poiCategoriesToIDs).map(([A,E])=>[A,E[0]])),poiIDsToCategories=Object.fromEntries(Object.entries(poiCategoriesToIDs).flatMap(([A,E])=>E.map(E=>[E,A]))),projectAlongRouteLocation=(A,E)=>nearestPointOnLine(A,getPositionStrict(E)).properties.location,findInsertionSlot=(A,E)=>{for(let R=0;R<A.length-1;R++)if(E>=A[R]&&E<=A[R+1])return R+1;return E<A[0]?0:A.length},findBestWaypointInsertionIndex=(A,E,R)=>findBestWaypointInsertionIndices(A,E,[R])[0],findBestWaypointInsertionIndices=(A,E,R)=>{if(0===R.length)return[];if(0===A.geometry.coordinates.length||E.length<2)return R.map(()=>0);const T=E.map(E=>projectAlongRouteLocation(A,E)??0);return R.map(E=>{const R=projectAlongRouteLocation(A,E);return void 0===R?0:findInsertionSlot(T,R)})},withInsertedWaypoint=(A,E,R)=>withInsertedWaypoints(A,E,[R]),withInsertedWaypoints=(A,E,R)=>{if(0===R.length)return E.slice();if(0===A.geometry.coordinates.length||E.length<2)return[...R,...E];const T=E.map(E=>projectAlongRouteLocation(A,E)??0),I=Array.from({length:E.length+1},()=>[]);for(let _=0;_<R.length;_++){const E=R[_],N=projectAlongRouteLocation(A,E);I[void 0===N?0:findInsertionSlot(T,N)].push({waypoint:E,location:N??0,inputIndex:_})}for(const _ of I)_.sort((A,E)=>A.location-E.location||A.inputIndex-E.inputIndex);const N=[];for(let _=0;_<E.length;_++){for(const A of I[_])N.push(A.waypoint);N.push(E[_])}for(const _ of I[E.length])N.push(_.waypoint);return N},calculateProgressAtRoutePoint=(A,E)=>{const{progress:R}=A.properties;if(!R||0===R.length)return;const T=A.geometry.coordinates.length;if(E<0||E>=T)return;const I=findBracketingProgressPoints(R,"pointIndex",E);if(!I)return;const{lower:N,lowerVal:_,upper:S,upperVal:e}=I,t=N.distanceInMeters,O=S.distanceInMeters,C=N.travelTimeInSeconds,o=S.travelTimeInSeconds;if(void 0===t||void 0===O||void 0===C||void 0===o)return;if(_===e)return{distanceInMeters:t,travelTimeInSeconds:C};const n=lengthShareOfBracket(A.geometry.coordinates,_,E,e);return{distanceInMeters:t+n*(O-t),travelTimeInSeconds:C+n*(o-C)}},getRouteProgressBetween=(A,E,R)=>{const T=calculateProgressAtRoutePoint(A,E),I=calculateProgressAtRoutePoint(A,R);if(T&&I)return{start:T,end:I,delta:{distanceInMeters:I.distanceInMeters-T.distanceInMeters,travelTimeInSeconds:I.travelTimeInSeconds-T.travelTimeInSeconds}}},getRouteProgressForSection=(A,E)=>getRouteProgressBetween(A,E.startPointIndex,E.endPointIndex),getSectionBBox=(A,E)=>{const R=A.geometry.coordinates;if(!R||0===R.length||E.startPointIndex<0||E.endPointIndex>=R.length||E.startPointIndex>E.endPointIndex)return;const T=R[E.startPointIndex],I=R[E.endPointIndex],N=R[Math.floor((E.startPointIndex+E.endPointIndex)/2)];let _=bboxExpandedWithPosition(T);return _=bboxExpandedWithPosition(N,_),_=bboxExpandedWithPosition(I,_),_},firstProgressIndexPast=(A,E,R)=>{let T=A.length,I=0,N=A.length;for(;I<N;){const _=I+N>>>1;let S=_;for(;S<N&&void 0===A[S][E];)S++;const e=S<N?A[S][E]:void 0;void 0===e?N=_:R(e)?(T=S,N=_):I=S+1}return T},findBracketingProgressPoints=(A,E,R)=>{const T=A[firstProgressIndexPast(A,E,A=>A>=R)];let I=firstProgressIndexPast(A,E,A=>A>R)-1;for(;I>=0&&void 0===A[I][E];)I--;const N=A[I],_=N?.[E],S=T?.[E];return void 0!==_&&void 0!==S?{lower:N,lowerVal:_,upper:T,upperVal:S}:void 0},metersAlongLineCache=/* @__PURE__ */new WeakMap,metersAlongLine=A=>{const E=metersAlongLineCache.get(A);if(E?.length===A.length)return E;const R=new Float64Array(A.length);for(let T=1;T<A.length;T++)R[T]=R[T-1]+distance(A[T-1],A[T],{units:"meters"});return metersAlongLineCache.set(A,R),R},lengthShareOfBracket=(A,E,R,T)=>{const I=metersAlongLine(A),N=I[T]-I[E];return N>0?(I[R]-I[E])/N:(R-E)/(T-E)},interpolateProgressAtPathIndex=(A,E,R)=>{const T=A.geometry.coordinates,I=Math.min(E+1,T.length-1),N=T[E],_=T[I],S=calculateProgressAtRoutePoint(A,E),e=calculateProgressAtRoutePoint(A,I);if(S&&e)return{position:[N[0]+R*(_[0]-N[0]),N[1]+R*(_[1]-N[1])],travelTimeInSeconds:S.travelTimeInSeconds+R*(e.travelTimeInSeconds-S.travelTimeInSeconds),distanceInMeters:S.distanceInMeters+R*(e.distanceInMeters-S.distanceInMeters)}},resolveCoordinateAtProgress=(A,E,R)=>{const{progress:T}=A.properties;if(!T||0===T.length)return;const I=A.geometry.coordinates,N=T[0],_=T.at(-1),S=N[E],e=_[E];if(void 0===S||void 0===e)return;if(R<=S)return{position:I[N.pointIndex],travelTimeInSeconds:N.travelTimeInSeconds??0,distanceInMeters:N.distanceInMeters??0};if(R>=e)return{position:I[_.pointIndex],travelTimeInSeconds:_.travelTimeInSeconds??0,distanceInMeters:_.distanceInMeters??0};const t=((A,E,R,T)=>{const I=findBracketingProgressPoints(A,R,T);if(!I)return;const{lower:N,lowerVal:_,upper:S,upperVal:e}=I,t=_===e?0:(T-_)/(e-_),O=metersAlongLine(E),C=O[S.pointIndex]-O[N.pointIndex];if(0===C){const A=N.pointIndex+t*(S.pointIndex-N.pointIndex),E=Math.floor(A);return{pathIndex:E,progressRatioTowardsNextPathPoint:A-E}}const o=O[N.pointIndex]+t*C,n=clamp(sortedIndex(O,o)-1,N.pointIndex,S.pointIndex-1),r=O[n+1]-O[n];return{pathIndex:n,progressRatioTowardsNextPathPoint:r>0?(o-O[n])/r:0}})(T,I,E,R);return void 0!==t?interpolateProgressAtPathIndex(A,t.pathIndex,t.progressRatioTowardsNextPathPoint):void 0},getCoordinateAtRouteProgress=(A,E)=>{if("traveledTimeInSeconds"in E)return resolveCoordinateAtProgress(A,"travelTimeInSeconds",E.traveledTimeInSeconds);if("traveledDistanceInMeters"in E)return resolveCoordinateAtProgress(A,"distanceInMeters",E.traveledDistanceInMeters);const R=A.properties.summary.departureTime;if(!R)return;const T=(E.clockTime.getTime()-R.getTime())/1e3;return T<0?void 0:resolveCoordinateAtProgress(A,"travelTimeInSeconds",T)},getProgressAtNearestRoutePoint=(A,E)=>{const{progress:R}=A.properties;if(!R?.length)return;const T=A.geometry.coordinates,I=nearestPointOnLine(A,getPositionStrict(E)),N=I.properties.index??0,_=Math.min(N+1,T.length-1),S=T[N],e=T[_],t=((A,E,R)=>{const T=R[0]-A[0],I=R[1]-A[1],N=T*T+I*I;if(0===N)return 0;const _=((E[0]-A[0])*T+(E[1]-A[1])*I)/N;return clamp(_,0,1)})(S,I.geometry.coordinates,e);return interpolateProgressAtPathIndex(A,N,t)},getRoutePlanningLocationType=A=>Array.isArray(A)?Array.isArray(A[0])?"path":"waypoint":"Feature"===A.type&&"LineString"===A.geometry.type?"path":"waypoint",sdkErrorCodeForStatus=A=>401===A?"INVALID_CREDENTIALS":403===A?"INSUFFICIENT_PERMISSIONS":404===A?"NOT_FOUND":429===A?"RATE_LIMITED":A>=500?"LIVE_SERVICE_NOT_AVAILABLE":A>=400?"INVALID_REQUEST":"INTERNAL",retryableCodes=/* @__PURE__ */new Set(["RATE_LIMITED","LIVE_SERVICE_NOT_AVAILABLE","NETWORK_NOT_AVAILABLE"]),canRetrySDKErrorCode=A=>retryableCodes.has(A),indexedMagnitudes=["unknown","minor","moderate","major","indefinite"],iconCategoryMap={1:"accident",2:"fog",3:"danger",4:"rain",5:"frost",6:"jam",7:"lane-closed",8:"road-closed",9:"roadworks",10:"wind",11:"flooding",12:"animals-on-road",13:"narrow-lanes",14:"broken-down-vehicle"},categoryToIconMap=Object.fromEntries(Object.entries(iconCategoryMap).map(([A,E])=>[E,Number(A)])),iconToTrafficIncidentCategory=A=>iconCategoryMap[A]??"other",trafficIncidentToIconCategory=A=>categoryToIconMap[A]??0,minuteUnits=A=>A?.minutes??"min",formatDuration=(A,E)=>{if(A){const T=Math.abs(A)/3600;let I=Math.floor(T),N=Math.round(T%1*60);60===N&&(N=0,I++);const _={...TomTomConfig.instance.get().displayUnits?.time,...E};if(I)return`${I} ${R=_,R?.hours??"hr"} ${N.toString().padStart(2,"0")} ${minuteUnits(_)}`;if(N)return`${N.toString()} ${minuteUnits(_)}`}var R},MILE_IN_METERS=1609.344,meterUnits=A=>A?.meters??"m",kmUnits=A=>A?.kilometers??"km",formatMiles=(A,E,R)=>E<3?((A,E,R)=>{const T=Number.parseInt(E.toString()),I=E-T,N=A<0?"-":"";if(I<.125)return`${N}${T} ${R}`;const _=T>0?T:"";return I<.375?`${N}${_}¼ ${R}`:I<.625?`${N}${_}½ ${R}`:I<.875?`${N}${_}¾ ${R}`:`${N}${T+1} ${R}`})(A,E,R):E<10?((A,E,R)=>{const T=Number.parseInt(E.toString()),I=E-T,N=A<0?"-":"";return I<.25?`${N}${T} ${R}`:I<.75?`${N}${T}½ ${R}`:`${N}${T+1} ${R}`})(A,E,R):`${Math.round(A)} ${R}`,mileUnitsWithDefault=A=>A.miles??"mi",formatUs=(A,E)=>{const R=A/1609.344,T=Math.abs(R);return T<.125?((A,E)=>{const R=Math.round(A/.3048),T=Math.abs(R);return T<30?`${R} ${E}`:T<500?`${10*Math.round(R/10)} ${E}`:`${100*Math.round(R/100)} ${E}`})(A,E.feet??"ft"):formatMiles(R,T,mileUnitsWithDefault(E))},formatUk=(A,E)=>{const R=A/1609.344,T=Math.abs(R);return T<.125?((A,E)=>{const R=Math.round(A/.9144);return Math.abs(R)<10?`${Math.round(R)} ${E}`:`${10*Math.round(R/10)} ${E}`})(A,E.yards??"yd"):formatMiles(R,T,mileUnitsWithDefault(E))},formatDistance=(A,E)=>{if(isNil(A))return"";const R={...TomTomConfig.instance.get().displayUnits?.distance,...E};switch(R?.type??"metric"){case"metric":return((A,E)=>{const R=Math.abs(A);if(R<10)return`${A} ${meterUnits(E)}`;if(R<500)return`${10*Math.round(A/10)} ${meterUnits(E)}`;if(R<1e3){const R=100*Math.round(A/100);return 1e3===R||-1e3===R?`${A<0?"-":""}1 ${kmUnits(E)}`:`${R} ${meterUnits(E)}`}return R<1e4?`${100*Math.round(A/100)/1e3} ${kmUnits(E)}`:`${Math.round(A/1e3)} ${kmUnits(E)}`})(A,R);case"imperial_us":return formatUs(A,R);case"imperial_uk":return formatUk(A,R)}};export{DEFAULT_COMMON_BASE_URL,MILE_IN_METERS,TOMTOM_USER_AGENT_SDK_NAME,TomTomConfig,areaAnalyticsMetricKeys,avoidableTypes,bboxCenter,bboxFromBBoxes,bboxFromCoordsArray,bboxFromGeoJSON,bboxOnlyIfWithArea,budgetTypes,budgetUnits,calculateProgressAtRoutePoint,canRetrySDKErrorCode,chargingPointCapabilities,chargingPointRestrictions,connectorTypes,currentTypes,defaultConfig,findBestWaypointInsertionIndex,findBestWaypointInsertionIndices,formatDistance,formatDuration,fullTrafficIncidentCategories,generateId,generateTomTomHeaders,geographyTypes,geopoliticalViews,getCoordinateAtRouteProgress,getPosition,getPositionStrict,getProgressAtNearestRoutePoint,getRoutePlanningLocationType,getRouteProgressBetween,getRouteProgressForSection,getSectionBBox,iconToTrafficIncidentCategory,indexedMagnitudes,inputSectionTypes,inputSectionTypesWithGuidance,insecureBaseURLMessage,isBBoxWithArea,isProxyCredentialsMode,isSecureBaseURL,mergeFromGlobal,placeTypes,poiCategories,poiCategoriesToID,poiCategoriesToIDs,poiIDsToCategories,polygonFromBBox,sdkErrorCodeForStatus,sdkErrorCodes,sectionTypes,toPointGeometry,trafficIncidentRequestCategories,trafficIncidentTimeValidities,trafficIncidentToIconCategory,withInsertedWaypoint,withInsertedWaypoints};
1
+ import{distance,nearestPointOnLine}from"@turf/turf";import{clamp,isNil,sortedIndex}from"lodash-es";var DEFAULT_COMMON_BASE_URL="https://api.tomtom.com",defaultRetryConfig={initialWaitMs:.447,backoffFactor:1.618,timeoutMs:4e4},defaultConfig={commonBaseURL:"https://api.tomtom.com",apiKey:"",retry:defaultRetryConfig},TomTomConfig=class A{static{this.instance=new A}constructor(){this.config={...defaultConfig}}put(A){this.config={...this.config,...A,...A.retry&&{retry:{...defaultRetryConfig,...A.retry}}}}reset(){this.config={...defaultConfig}}get(){return this.config}},mergeFromGlobal=(A={})=>({...TomTomConfig.instance.get(),...A}),isProxyCredentialsMode=(A=TomTomConfig.instance.get())=>!A.apiKey&&"https://api.tomtom.com"!==(A.commonBaseURL??"https://api.tomtom.com"),LOOPBACK_IPV4=/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,isSecureBaseURL=A=>{let E;try{E=new URL(A)}catch{return!0}if("https:"===E.protocol)return!0;const{hostname:R}=E;return"http:"===E.protocol&&("localhost"===R||R.endsWith(".localhost")||"[::1]"===R||LOOPBACK_IPV4.test(R))},insecureBaseURLMessage=A=>`commonBaseURL ${A} is not https:, so requests to it would carry the API key in the clear; only loopback addresses may use http:.`,geopoliticalViews=["Unified","AE","AR","BN","CL","CN","DZ","IL","IN","KR","MA","MY","PH","PK","RS","RU","TR","TW","US","VN"],chargingPointCapabilities=["ChargingProfileCapable","ChargingPreferencesCapable","ChipCardSupport","ContactlessCardSupport","CreditCardPayable","DebitCardPayable","PedTerminal","RemoteStartStopCapable","Reservable","RfidReader","StartSessionConnectorRequired","TokenGroupCapable","UnlockCapable","PlugAndCharge","Unknown"],chargingPointRestrictions=["EvOnly","Plugged","Disabled","Customers","Motorcycles"],connectorTypes=["StandardHouseholdCountrySpecific","IEC62196Type1","IEC62196Type1CCS","IEC62196Type2CableAttached","IEC62196Type2Outlet","IEC62196Type2CCS","IEC62196Type3","Chademo","GBT20234Part2","GBT20234Part3","IEC60309AC3PhaseRed","IEC60309AC1PhaseBlue","IEC60309DCWhite","Tesla"],currentTypes=["AC1","AC3","DC"],geographyTypes=["Country","CountrySubdivision","CountrySecondarySubdivision","CountryTertiarySubdivision","Municipality","MunicipalitySubdivision","MunicipalitySecondarySubdivision","Neighbourhood","PostalCodeArea"],placeTypes=["POI","Street","Geography","Point Address","Address Range","Cross Street"],poiCategories=["ABORIGINAL_LAND","ADVENTURE_SPORTS_FACILITY","ADVENTURE_VEHICLE_TRAIL","ADVERTISING_COMPANY","AFGHAN_RESTAURANT","AFRICAN_RESTAURANT","AGRICULTURAL_SUPPLIES","AGRICULTURAL_TECHNOLOGY","AGRICULTURE","AIRFIELD","AIRLINE_ACCESS","AIRLINE_COMPANY","AIRPORT","AMBULANCE_UNIT","AMERICAN_RESTAURANT","AMPHITHEATER","AMUSEMENT_PARK","AMUSEMENT_PLACE","ANIMAL_SERVICE","ANIMAL_SHELTER","ANTIQUE_ART_SHOP","APARTMENT_RENTAL","AQUATIC_ZOO","ARABIAN_RESTAURANT","ARBORETA_AND_BOTANICAL_GARDENS","ARCH","ARMENIAN_RESTAURANT","ART_SCHOOL","ASIAN_RESTAURANT","ATHLETICS_TRACK","ATM","ATV_DEALER","AUSTRALIAN_RESTAURANT","AUSTRIAN_RESTAURANT","AUTOMOBILE_COMPANY","AUTOMOBILE_MANUFACTURING","BAGS_LEATHERWEAR","BAKERY","BANDB_OR_GUEST_HOUSE","BANK","BANQUET_ROOMS","BAR","BARBECUE_RESTAURANT","BASEBALL_PARK","BASKETBALL_ARENA","BASQUE_RESTAURANT","BATTLEFIELD","BAY","BEACH","BEACH_CLUB","BEAUTY_SALON","BEAUTY_SUPPLIES","BELGIAN_RESTAURANT","BETTING_STATION","BISTRO","BLOOD_BANK","BOATING_EQUIPMENT_AND_ACCESSORIES","BOAT_DEALER","BOAT_LAUNCHING_RAMP","BODYSHOP","BOLIVIAN_RESTAURANT","BOOK_SHOP","BORDER_CONTROL","BOWLING_CENTER","BRAZILIAN_RESTAURANT","BRIDGE","BRITISH_RESTAURANT","BUFFET_RESTAURANT","BUILDING","BULGARIAN_RESTAURANT","BUNGALOW_RENTAL","BURMESE_RESTAURANT","BUSINESS_PARK","BUSINESS_SERVICES","BUS_CHARTER_COMPANY","BUS_DEALER","BUS_LINES","BUS_STOP","BUTCHER","CABARET_THEATER","CABINS_LODGES","CABLE_AND_TELEPHONE_COMPANY","CAFE","CAFETERIA","CAFE_PUB","CALIFORNIAN_RESTAURANT","CAMBODIAN_RESTAURANT","CAMERAS_AND_PHOTOGRAPHY","CAMPING_GROUND","CANADIAN_RESTAURANT","CANNABIS_SHOP","CAPE","CARAVAN_SITE","CARIBBEAN_RESTAURANT","CARPET_FLOOR_COVERINGS","CAR_DEALER","CAR_GLASS_REPLACEMENT_SHOP","CAR_RENTAL","CAR_REPAIR_AND_SERVICE","CAR_WASH","CASINO_AND_GAMBLING","CATERING_SERVICES","CAVE","CEMETERY","CHALET_RENTAL","CHARGING_LOCATION","CHEMICAL_COMPANY","CHICKEN_RESTAURANT","CHILDCARE","CHILDREN_S_CLOTHES","CHILEAN_RESTAURANT","CHINESE_RESTAURANT","CHRISTMAS_OR_HOLIDAY_SHOP","CHURCH","CINEMA","CLEANING_SERVICES","CLOTHING_SHOP","CLUB_AND_ASSOCIATION","COCKTAIL_BAR","COFFEE_SHOP","COLLEGE_OR_UNIVERSITY","COLOMBIAN_RESTAURANT","COMEDY_CLUB","COMMERCIAL_BUILDING","COMMUNITY_CENTER","COMPANY","COMPUTER_AND_COMPUTER_SUPPLIES","COMPUTER_AND_DATA_SERVICES","CONCERT_HALL","CONSTRUCTION_COMPANY","CONSTRUCTION_MATERIAL_AND_EQUIPMENT","CONSUMER_ELECTRONICS","CONVENIENCE_STORE","CORSICAN_RESTAURANT","COTTAGE_RENTAL","COURIER_DROP_BOX","COURTHOUSE","COVE","CREOLE_RESTAURANT","CREPERIE","CRICKET_GROUND","CUBAN_RESTAURANT","CULTURAL_CENTER","CURTAINS_TEXTILES","CZECH_RESTAURANT","C_DS_DVD_VIDEOS","DAM","DANCE_STUDIO_AND_SCHOOL","DANISH_RESTAURANT","DELICATESSEN","DELIVERY_SERVICE","DENTIST","DEPARTMENT_STORE","DINNER_THEATER","DISCO_CLUB","DIVERSIFIED_FINANCIALS","DOCTOR","DONGBEI_RESTAURANT","DOUGHNUT_RESTAURANT","DO_IT_YOURSELF_CENTERS","DRIVE_IN_MOVIES","DRIVE_THROUGH_BOTTLE_SHOP","DRIVING_SCHOOL","DRUG_STORE","DRY_CLEANER","DUNE","DUTCH_RESTAURANT","EGYPTIAN_RESTAURANT","ELECTRICAL_APPLIANCES_SHOP","ELECTRONICS_COMPANY","EMBASSY","EMERGENCY_MEDICAL_SERVICE","EMERGENCY_ROOM","ENGLISH_RESTAURANT","ENTERTAINMENT","EQUIPMENT_RENTAL","ETHIOPIAN_RESTAURANT","EXCHANGE","EXHIBITION_CONVENTION_CENTER","FACTORY_OUTLET","FAIRGROUND","FARM","FARMERS_MARKET","FAST_FOOD","FERRY_TERMINAL","FINNISH_RESTAURANT","FIRE_STATION","FISHING_AND_HUNTING_AREA","FISHMONGER","FITNESS_CLUB_AND_CENTER","FLATS_OR_APARTMENT_COMPLEX","FLORISTS","FLYING_CLUB","FONDUE_RESTAURANT","FOOD_AND_DRINKS_SHOP","FOOD_MARKET","FOOTBALL_STADIUM","FOOTWEAR_SHOE_REPAIRS","FOREIGN_EXCHANGE","FOREST_AREA","FRENCH_RESTAURANT","FUEL_STATION","FUNERAL_SERVICE_AND_MORTUARIES","FURNITURE_HOME_FURNISHINGS","FUSION_RESTAURANT","GARDEN_CENTERS_SERVICES","GENERAL_HOSPITAL_AND_POLYCLINIC","GENERAL_PRACTITIONER","GERMAN_RESTAURANT","GIFTS_CARDS_NOVELTIES_SOUVENIRS","GLASSWARE_CERAMIC_SHOP","GLASS_WINDOWS_STORE","GOLD_EXCHANGE","GOLF_COURSE","GOVERNMENT_OFFICE","GREEK_RESTAURANT","GREENGROCER","GRILL_RESTAURANT","GROCERY_STORE","GURUDWARA","HAIRDRESSER","HAMBURGER_RESTAURANT","HARBOR","HARDWARE_STORE","HAWAIIAN_RESTAURANT","HEALTHCARE_SERVICE","HELIPORT_OR_HELIPAD","HIGH_SCHOOL","HIKING_TRAIL","HILL","HISTORICAL_PARK","HISTORIC_SITE","HOBBY_SHOP","HOCKEY_CLUB","HOLIDAY_RENTAL","HOME_APPLIANCE_REPAIR","HORSE_RACING_TRACK","HORSE_RIDING","HORSE_RIDING_TRAIL","HORTICULTURE","HOSPITAL","HOSPITAL_FOR_WOMEN_AND_CHILDREN","HOSPITAL_OF_CHINESE_MEDICINE","HOSTEL","HOTEL","HOTEL_OR_MOTEL","HOT_POT_RESTAURANT","HOUSE_AND_GARDEN_FURNITURE_AND_FITTINGS","HUNAN_RESTAURANT","HUNGARIAN_RESTAURANT","ICE_CREAM_PARLOR","ICE_HOCKEY_ARENA","ICE_RINK","IMPORT_OR_EXPORT_AND_DISTRIBUTION","INDIAN_RESTAURANT","INDONESIAN_RESTAURANT","INDUSTRIAL_BUILDING","INFORMAL_MARKET","INSURANCE_COMPANY","INTERNATIONAL_RAILROAD_STATION","INTERNATIONAL_RESTAURANT","INTERNET_CAFE","INVESTMENT_ADVISOR","IRANIAN_RESTAURANT","IRISH_RESTAURANT","ISLAND","ISRAELI_RESTAURANT","ITALIAN_RESTAURANT","JAMAICAN_RESTAURANT","JAPANESE_RESTAURANT","JAZZ_CLUB","JEWELRY_CLOCKS_WATCHES","JEWISH_RESTAURANT","JUICE_BAR","JUNIOR_COLLEGE_OR_COMMUNITY_COLLEGE","KARAOKE_CLUB","KITCHENS_BATHROOMS","KOREAN_RESTAURANT","KOSHER_RESTAURANT","LANGUAGE_SCHOOL","LATIN_AMERICAN_RESTAURANT","LAUNDRY","LEBANESE_RESTAURANT","LEGAL_SERVICES","LEISURE_CENTER","LIGHTING_SHOPS","LOCALE","LOCAL_SPECIALITIES_SHOP","LOTTERY_SHOP","MALL","MANUFACTURING_COMPANY","MANUFACTURING_FACILITY","MARINA","MARKETPLACE","MARSH","MAUSOLEUM_OR_GRAVE","MECHANICAL_ENGINEERING","MEDIA_FACILITY","MEDICAL_SUPPLIES_EQUIPMENT","MEDICINAL_AND_RECREATIONAL_DISPENSARY","MEDICINAL_MARIJUANA_DISPENSARY","MEDITERRANEAN_RESTAURANT","MEMORIAL","MEN_S_CLOTHING","MEXICAN_RESTAURANT","MICROBREWERY","MIDDLE_EASTERN_RESTAURANT","MIDDLE_SCHOOL","MILITARY_AIRPORT","MINERAL_OR_HOT_SPRINGS","MINING_COMPANY","MOBILE_PHONE_SHOP","MONGOLIAN_RESTAURANT","MONUMENT","MOROCCAN_RESTAURANT","MOSQUE","MOTEL","MOTORCYCLE_DEALER","MOTORCYCLE_REPAIR","MOTORING_ORGANIZATION_OFFICE","MOTOR_RACING_STADIUM","MOUNTAIN_BIKE_TRAIL","MOUNTAIN_PASS","MOUNTAIN_PEAK","MOVIE_THEATER","MOVING_AND_STORAGE_COMPANY","MULTI_PURPOSE_STADIUM","MUSEUM","MUSIC_CENTER","MUSIC_INSTRUMENTS_STORE","NAIL_SALON","NATIONAL_RAILROAD_STATION","NATURAL_FEATURE","NATURAL_TOURIST_ATTRACTION","NEPALESE_RESTAURANT","NETBALL_STADIUM","NEWSAGENTS_TOBACCONISTS","NIGHTLIFE","NON_GOVERNMENTAL_ORGANIZATION","NORWEGIAN_RESTAURANT","OASIS","OBSERVATORY","OFFICE_EQUIPMENT","OIL_AND_NATURAL_GAS","OPEN_CAR_PARKING_AREA","OPERA_HOUSE","OPTICIAN","ORGANIC_FOOD_RESTAURANT","ORIENTAL_RESTAURANT","PAGODA","PAINTING_DECORATING","PAKISTANI_RESTAURANT","PAN","PARK","PARKING_GARAGE","PARKWAY","PARK_AND_RECREATION_AREA","PASSENGER_TRANSPORT_TICKET_OFFICE","PAWN_SHOP","PEDESTRIAN_SUBWAY","PERSONAL_CARE_FACILITY","PERSONAL_SERVICE","PERUVIAN_RESTAURANT","PET_SUPPLIES","PHARMACEUTICAL_COMPANY","PHARMACY","PHILIPPINE_RESTAURANT","PHOTOCOPY_SHOP","PHOTO_LAB_OR_DEVELOPMENT","PICNIC_AREA","PIZZERIA","PLAIN_OR_FLAT","PLANETARIUM","PLATEAU","POLICE_STATION","POLISH_RESTAURANT","PORTUGUESE_RESTAURANT","PORT_WAREHOUSE_FACILITY","POST_OFFICE","PRE_SCHOOL","PRIMARY_PRODUCER","PRIMARY_RESOURCE_UTILITY","PRIMARY_SCHOOL","PRISON","PRIVATE_AIRPORT","PROTECTED_LAND","PUB","PUBLIC_AIRPORT","PUBLIC_AMENITY","PUBLIC_BATHROOM","PUBLIC_CALL_BOX","PUBLIC_LIBRARY","PUBLIC_MARKET","PUBLIC_TRANSPORT_STOP","PUBLISHING_TECHNOLOGIES","QUARRY","RACE_TRACK","RAILWAY_STATION","RAPIDS","REAL_ESTATE_AGENT","REAL_ESTATE_COMPANY","RECREATIONAL_CAMPING_GROUND","RECREATIONAL_MARIJUANA_DISPENSARY","RECREATIONAL_VEHICLE_DEALER","RECREATION_AREA","RECYCLING_SHOP","REEF","RELIGIOUS_SITE","RENTAL_CAR_PARKING","RESCUE_SERVICE","RESEARCH_FACILITY","RESERVOIR","RESIDENTIAL_ACCOMMODATION","RESIDENTIAL_ENTRANCE","RESORT","RESTAURANT","RESTAURANT_AREA","REST_AREA","REST_CAMP","RETAIL_OUTLET","RETIREMENT_COMMUNITY","RIDGE","RIVER_CROSSING","ROCKS","ROCK_CLIMBING_TRAIL","RUGBY_GROUND","RUSSIAN_RESTAURANT","SALAD_BAR","SANDWICH_RESTAURANT","SAUNA_SOLARIUM_MASSAGE","SCANDINAVIAN_RESTAURANT","SCHOOL","SCHOOL_BUS_COMPANY","SEAFOOD","SECURED_ENTRANCE","SECURITY_PRODUCTS","SENIOR_HIGH_SCHOOL","SERVICE_COMPANY","SHANDONG_RESTAURANT","SHOPPING_SERVICE","SHOP_OR_STORE","SICHUAN_RESTAURANT","SKI_RESORT","SNACKS_RESTAURANT","SOCCER_STADIUM","SOFTWARE_COMPANY","SOUL_FOOD","SOUP_RESTAURANT","SPANISH_RESTAURANT","SPECIALIST","SPECIALTY_CLOTHING_SHOP","SPECIALTY_FOODS","SPECIAL_HOSPITAL","SPORTS_CENTER","SPORTS_EQUIPMENT_AND_CLOTHING","SQUASH_COURT","STADIUM","STATION_ACCESS","STATUE","STEAK_HOUSE","STOCK_EXCHANGE","STREETCAR_STOP","SUBWAY_ENTRANCE","SUBWAY_STATION","SUPERMARKET","SUSHI_RESTAURANT","SWEDISH_RESTAURANT","SWIMMING_POOL","SWISS_RESTAURANT","SYNAGOG","SYRIAN_RESTAURANT","TAILOR_SHOP","TAIWANESE_RESTAURANT","TAKEOUT_FOOD","TAPAS_RESTAURANT","TAXI_LIMOUSINE_AND_SHUTTLE_SERVICE","TAXI_STAND","TAX_SERVICES","TEA_HOUSE","TELECOMMUNICATIONS","TEMPLE","TENNIS_COURT","TEPPANYAKI_RESTAURANT","THAI_RESTAURANT","THEATER","THEMATIC_SPORT_CENTER","TIBETAN_RESTAURANT","TIRE_SERVICE","TOLL_GATE","TOURIST_ATTRACTION","TOURIST_INFORMATION","TOWER","TOYS_GAMES_SHOP","TRAFFIC_CONTROL_DEPARTMENT","TRAIL_SYSTEM","TRANSPORT_ACCESS","TRANSPORT_AUTHORITY_VEHICLE_REGISTRATION","TRANSPORT_COMPANY","TRAVEL_AGENT","TRUCK_DEALER","TRUCK_REPAIR_AND_SERVICE","TRUCK_STOP","TUNISIAN_RESTAURANT","TUNNEL","TURKISH_RESTAURANT","URBAN_STATION","VALLEY","VAN_DEALER","VARIETY_STORE","VEGETARIAN_RESTAURANT","VEHICLE_DEALER","VEHICLE_REPAIR","VENEZUELAN_RESTAURANT","VETERINARY","VIDEO_RENTAL_SHOP","VIETNAMESE_RESTAURANT","VIEWPOINT","VILLA_RENTAL","VOCATIONAL_SCHOOL","WATER_HOLE","WATER_SPORT","WEDDING_SERVICES","WEIGH_STATION","WELFARE_ORGANIZATION","WELL","WESTERN_RESTAURANT","WHOLESALE_CLUB","WILDERNESS_AREA","WILDLIFE_PARK","WINERY","WINE_SPIRITS","WOMEN_S_CLOTHING","YACHT_BASIN","ZOO","ZOOS_ARBORETA_BOTANICAL_GARDEN"],budgetTypes=["timeMinutes","distanceKM"],budgetUnits={timeMinutes:"min",distanceKM:"km"},avoidableTypes=["tollRoads","motorways","ferries","unpavedRoads","carpools","alreadyUsedRoads","borderCrossings","tunnels","carTrains","lowEmissionZones"],inputSectionTypes=["carpool","carTrain","country","ferry","importantRoadStretch","lowEmissionZone","motorway","pedestrian","roadShields","speedLimit","toll","tollRoad","tollVignette","traffic","tunnel","unpaved","urban","vehicleRestricted"],inputSectionTypesWithGuidance=[...inputSectionTypes,"lanes"],sectionTypes=[...inputSectionTypesWithGuidance,"leg"],sdkErrorCodes=["INVALID_REQUEST","INSECURE_BASE_URL","INVALID_CREDENTIALS","INSUFFICIENT_PERMISSIONS","NOT_FOUND","RATE_LIMITED","LIVE_SERVICE_NOT_AVAILABLE","NETWORK_NOT_AVAILABLE","ABORTED","WEBGL_UNSUPPORTED","WEBGL_CONTEXT_LOST","STYLE_LOAD_FAILED","INTERNAL"],areaAnalyticsMetricKeys=["speed","freeFlowSpeed","congestionLevel","travelTime","networkLength"],trafficIncidentRequestCategories=["accident","broken-down-vehicle","danger","flooding","fog","frost","jam","lane-closed","other","rain","road-closed","roadworks","wind"],fullTrafficIncidentCategories=[...trafficIncidentRequestCategories,"animals-on-road","narrow-lanes"],trafficIncidentTimeValidities=["present","future"],isBBoxWithArea=A=>!!A&&(A.length>=4&&A[3]!==A[1]&&A[2]!==A[0]),bboxOnlyIfWithArea=A=>isBBoxWithArea(A)?A:void 0,bboxExpandedWithPosition=(A,E)=>{if(A&&!(A.length<2))return E?[E[0]>A[0]?A[0]:E[0],E[1]>A[1]?A[1]:E[1],E[2]<A[0]?A[0]:E[2],E[3]<A[1]?A[1]:E[3]]:[A[0],A[1],A[0],A[1]]},bboxFromBBoxes=A=>A?.length?A.reduce((A,E)=>{return R=E,(T=A)&&R?[T[0]>R[0]?R[0]:T[0],T[1]>R[1]?R[1]:T[1],T[2]<R[2]?R[2]:T[2],T[3]<R[3]?R[3]:T[3]]:R||T;var R,T}):void 0,bboxFromCoordsArray=A=>{const E=A?.length;if(!E)return;let R;const T=Math.ceil(E/1e3);for(let I=0;I<E;I+=T)R=bboxExpandedWithPosition(A[I],R);return 1===T?R:bboxExpandedWithPosition(A[E-1],R)},bboxFromGeoJSON=A=>{if(A){if(Array.isArray(A))return"number"==typeof A[0]?A.length>=4?A:void 0:bboxFromBBoxes(A.map(A=>bboxFromGeoJSON(A)));if(A.bbox)return A.bbox;switch(A.type){case"Feature":return bboxFromGeoJSON(A.geometry);case"FeatureCollection":return bboxFromBBoxes(A.features.map(bboxFromGeoJSON));case"GeometryCollection":return bboxFromBBoxes(A.geometries.map(bboxFromGeoJSON));case"Point":return bboxExpandedWithPosition(A.coordinates);case"LineString":case"MultiPoint":return bboxFromCoordsArray(A.coordinates);case"MultiLineString":case"Polygon":return bboxFromBBoxes(A.coordinates.map(bboxFromCoordsArray));case"MultiPolygon":return bboxFromBBoxes(A.coordinates.flatMap(A=>A.map(bboxFromCoordsArray)));default:return}}},bboxCenter=A=>[(A[0]+A[2])/2,(A[1]+A[3])/2],polygonFromBBox=A=>{const[E,R,T,I]=A;return{type:"Feature",geometry:{type:"Polygon",coordinates:[[[E,R],[T,R],[T,I],[E,I],[E,R]]]},properties:{}}},generateId=()=>Date.now().toString(36)+Math.random().toString(36).substring(2),TOMTOM_USER_AGENT_SDK_NAME="MapsSDKJS",generateTomTomHeaders=A=>!1===A.sendUserAgentHeader?{}:{"tomtom-user-agent":A["tomtom-user-agent"]??"MapsSDKJS/1.0.0-rc.2"},getPosition=(A,E)=>{if(A){if(Array.isArray(A))return A;if(A.coordinates)return A.coordinates;if(A.geometry)return"main-when-available"===E?.useEntryPoint?(R=A,R?.properties?.entryPoints?.find(A=>"main"===A.type))?.position??A.geometry.coordinates:A.geometry.coordinates}var R;return null},getPositionStrict=(A,E)=>{const R=getPosition(A,E);if(!R)throw new Error(`The received object does not have lng-lat coordinates: ${JSON.stringify(A)}`);return R},toPointGeometry=A=>({type:"Point",coordinates:A}),poiCategoriesToIDs={TRAFFIC_CONTROL_DEPARTMENT:[7301,7301002],TRAIL_SYSTEM:[7302],MOUNTAIN_BIKE_TRAIL:[7302002],ADVENTURE_VEHICLE_TRAIL:[7302003],HIKING_TRAIL:[7302004],HORSE_RIDING_TRAIL:[7302005],ROCK_CLIMBING_TRAIL:[7302006],RESIDENTIAL_ACCOMMODATION:[7303],RETIREMENT_COMMUNITY:[7303002],FLATS_OR_APARTMENT_COMPLEX:[7303003],HOLIDAY_RENTAL:[7304],COTTAGE_RENTAL:[7304002],VILLA_RENTAL:[7304003],BUNGALOW_RENTAL:[7304004],CHALET_RENTAL:[7304005],APARTMENT_RENTAL:[7304006],ADVENTURE_SPORTS_FACILITY:[7305],HELIPORT_OR_HELIPAD:[7308],CHARGING_LOCATION:[7309],VEHICLE_REPAIR:[7310],BODYSHOP:[7310002],CAR_GLASS_REPLACEMENT_SHOP:[7310003],CAR_REPAIR_AND_SERVICE:[7310004],TIRE_SERVICE:[7310007],MOTORCYCLE_REPAIR:[7310008],TRUCK_REPAIR_AND_SERVICE:[7310009],FUEL_STATION:[7311],CAR_RENTAL:[7312],PARKING_GARAGE:[7313],HOTEL_OR_MOTEL:[7314],BANDB_OR_GUEST_HOUSE:[7314002],HOTEL:[7314003],HOSTEL:[7314004],RESORT:[7314005],MOTEL:[7314006],CABINS_LODGES:[7314007],REST_CAMP:[7314008],RESTAURANT:[7315],AFRICAN_RESTAURANT:[7315002],AMERICAN_RESTAURANT:[7315003],AUSTRIAN_RESTAURANT:[7315004],BARBECUE_RESTAURANT:[7315005],BELGIAN_RESTAURANT:[7315006],BISTRO:[7315007],BRITISH_RESTAURANT:[7315008],CALIFORNIAN_RESTAURANT:[7315009],CANADIAN_RESTAURANT:[7315010],CARIBBEAN_RESTAURANT:[7315011],CHINESE_RESTAURANT:[7315012],CREPERIE:[7315013],DUTCH_RESTAURANT:[7315014],FAST_FOOD:[7315015],PHILIPPINE_RESTAURANT:[7315016],FRENCH_RESTAURANT:[7315017],GERMAN_RESTAURANT:[7315018],GREEK_RESTAURANT:[7315019],GRILL_RESTAURANT:[7315020],HAWAIIAN_RESTAURANT:[7315021],HUNGARIAN_RESTAURANT:[7315022],INDIAN_RESTAURANT:[7315023],INDONESIAN_RESTAURANT:[7315024],ITALIAN_RESTAURANT:[7315025],JAPANESE_RESTAURANT:[7315026],JEWISH_RESTAURANT:[7315027],KOREAN_RESTAURANT:[7315028],LATIN_AMERICAN_RESTAURANT:[7315029],LEBANESE_RESTAURANT:[7315030],MEDITERRANEAN_RESTAURANT:[7315032],MEXICAN_RESTAURANT:[7315033],MIDDLE_EASTERN_RESTAURANT:[7315034],ORIENTAL_RESTAURANT:[7315035],PIZZERIA:[7315036],POLISH_RESTAURANT:[7315037],PORTUGUESE_RESTAURANT:[7315038],RUSSIAN_RESTAURANT:[7315040],SANDWICH_RESTAURANT:[7315042],SEAFOOD:[7315043],SPANISH_RESTAURANT:[7315044],STEAK_HOUSE:[7315045],SWISS_RESTAURANT:[7315047],THAI_RESTAURANT:[7315048],TURKISH_RESTAURANT:[7315049],VEGETARIAN_RESTAURANT:[7315050],VIETNAMESE_RESTAURANT:[7315051],HUNAN_RESTAURANT:[7315052],SHANDONG_RESTAURANT:[7315053],SICHUAN_RESTAURANT:[7315056],DONGBEI_RESTAURANT:[7315057],HOT_POT_RESTAURANT:[7315058],TAIWANESE_RESTAURANT:[7315059],WESTERN_RESTAURANT:[7315060],PERUVIAN_RESTAURANT:[7315061],ASIAN_RESTAURANT:[7315062],CREOLE_RESTAURANT:[7315063],SOUL_FOOD:[7315064],IRISH_RESTAURANT:[7315065],JAMAICAN_RESTAURANT:[7315066],KOSHER_RESTAURANT:[7315067],CZECH_RESTAURANT:[7315068],HAMBURGER_RESTAURANT:[7315069],CHICKEN_RESTAURANT:[7315070],FUSION_RESTAURANT:[7315071],BRAZILIAN_RESTAURANT:[7315072],INTERNATIONAL_RESTAURANT:[7315073],MOROCCAN_RESTAURANT:[7315074],ORGANIC_FOOD_RESTAURANT:[7315075],TAPAS_RESTAURANT:[7315076],ICE_CREAM_PARLOR:[7315078],DOUGHNUT_RESTAURANT:[7315079],AFGHAN_RESTAURANT:[7315081],ARABIAN_RESTAURANT:[7315083],ARMENIAN_RESTAURANT:[7315085],AUSTRALIAN_RESTAURANT:[7315086],BASQUE_RESTAURANT:[7315087],BOLIVIAN_RESTAURANT:[7315088],BULGARIAN_RESTAURANT:[7315090],BURMESE_RESTAURANT:[7315091],CAMBODIAN_RESTAURANT:[7315092],CHILEAN_RESTAURANT:[7315093],COLOMBIAN_RESTAURANT:[7315094],CORSICAN_RESTAURANT:[7315095],CUBAN_RESTAURANT:[7315096],DANISH_RESTAURANT:[7315098],EGYPTIAN_RESTAURANT:[7315100],ENGLISH_RESTAURANT:[7315101],ETHIOPIAN_RESTAURANT:[7315102],FINNISH_RESTAURANT:[7315104],IRANIAN_RESTAURANT:[7315105],ISRAELI_RESTAURANT:[7315106],MONGOLIAN_RESTAURANT:[7315110],NEPALESE_RESTAURANT:[7315111],NORWEGIAN_RESTAURANT:[7315112],SCANDINAVIAN_RESTAURANT:[7315114],SWEDISH_RESTAURANT:[7315119],SYRIAN_RESTAURANT:[7315120],TEPPANYAKI_RESTAURANT:[7315121],TIBETAN_RESTAURANT:[7315122],TUNISIAN_RESTAURANT:[7315123],VENEZUELAN_RESTAURANT:[7315125],PAKISTANI_RESTAURANT:[7315127],FONDUE_RESTAURANT:[7315134],SNACKS_RESTAURANT:[7315139],SOUP_RESTAURANT:[7315140],BUFFET_RESTAURANT:[7315142],SALAD_BAR:[7315143],TAKEOUT_FOOD:[7315145],BANQUET_ROOMS:[7315146],CAFETERIA:[7315147],SUSHI_RESTAURANT:[7315148],JUICE_BAR:[7315149],TOURIST_INFORMATION:[7316],MUSEUM:[7317],THEATER:[7318,7318005],CONCERT_HALL:[7318002],MUSIC_CENTER:[7318003],OPERA_HOUSE:[7318004],CABARET_THEATER:[7318006],AMPHITHEATER:[7318007],DINNER_THEATER:[7318008],CULTURAL_CENTER:[7319],SPORTS_CENTER:[7320,7320004],FITNESS_CLUB_AND_CENTER:[7320002],HORSE_RIDING:[7320003],THEMATIC_SPORT_CENTER:[7320005],SQUASH_COURT:[7320006],HOSPITAL:[7321],GENERAL_HOSPITAL_AND_POLYCLINIC:[7321002],SPECIAL_HOSPITAL:[7321003],HOSPITAL_OF_CHINESE_MEDICINE:[7321004],HOSPITAL_FOR_WOMEN_AND_CHILDREN:[7321005],POLICE_STATION:[7322],POST_OFFICE:[7324],PHARMACY:[7326],DEPARTMENT_STORE:[7327],BANK:[7328],MARKETPLACE:[7332],INFORMAL_MARKET:[7332002],PUBLIC_MARKET:[7332003],FARMERS_MARKET:[7332004],SUPERMARKET:[7332005],AGRICULTURE:[7335],HORTICULTURE:[7335002],PRIMARY_PRODUCER:[7335003],FARM:[7335004],VIEWPOINT:[7337],SWIMMING_POOL:[7338],RELIGIOUS_SITE:[7339],CHURCH:[7339002],MOSQUE:[7339003],SYNAGOG:[7339004],TEMPLE:[7339005],GURUDWARA:[7339006],PAGODA:[7339008],CASINO_AND_GAMBLING:[7341],CINEMA:[7342],MOVIE_THEATER:[7342002],DRIVE_IN_MOVIES:[7342003],MARINA:[7347,7347002],YACHT_BASIN:[7347003],WINERY:[7349],FERRY_TERMINAL:[7352],TRUCK_STOP:[7358],WEIGH_STATION:[7359,7359002],CAMPING_GROUND:[7360],RECREATIONAL_CAMPING_GROUND:[7360002],CARAVAN_SITE:[7360003],COMMUNITY_CENTER:[7363],EMBASSY:[7365],BORDER_CONTROL:[7366],GOVERNMENT_OFFICE:[7367],MOTORING_ORGANIZATION_OFFICE:[7368],OPEN_CAR_PARKING_AREA:[7369,7369002],SCHOOL:[7372,7372002],CHILDCARE:[7372003],PRE_SCHOOL:[7372004],PRIMARY_SCHOOL:[7372005],HIGH_SCHOOL:[7372006],SENIOR_HIGH_SCHOOL:[7372007],VOCATIONAL_SCHOOL:[7372008],LANGUAGE_SCHOOL:[7372010],ART_SCHOOL:[7372012],MIDDLE_SCHOOL:[7372014],DRIVING_SCHOOL:[7372016],MALL:[7373],STADIUM:[7374],ATHLETICS_TRACK:[7374002],CRICKET_GROUND:[7374003],SOCCER_STADIUM:[7374004],HORSE_RACING_TRACK:[7374005],MULTI_PURPOSE_STADIUM:[7374006],RUGBY_GROUND:[7374007],ICE_HOCKEY_ARENA:[7374008],BASEBALL_PARK:[7374009],FOOTBALL_STADIUM:[7374010],MOTOR_RACING_STADIUM:[7374011],BASKETBALL_ARENA:[7374012],RACE_TRACK:[7374013],NETBALL_STADIUM:[7374014],TOLL_GATE:[7375],TOURIST_ATTRACTION:[7376],BUILDING:[7376002],MONUMENT:[7376003],NATURAL_TOURIST_ATTRACTION:[7376004],OBSERVATORY:[7376005],PLANETARIUM:[7376006],DAM:[7376007],TUNNEL:[7376008],TOWER:[7376009],BRIDGE:[7376010],MAUSOLEUM_OR_GRAVE:[7376011],ARCH:[7376012],STATUE:[7376013],WATER_HOLE:[7376014],COLLEGE_OR_UNIVERSITY:[7377,7377002],JUNIOR_COLLEGE_OR_COMMUNITY_COLLEGE:[7377003],BUSINESS_PARK:[7378],RAILWAY_STATION:[7380],INTERNATIONAL_RAILROAD_STATION:[7380002],NATIONAL_RAILROAD_STATION:[7380003],URBAN_STATION:[7380004],SUBWAY_STATION:[7380005],AIRPORT:[7383],PUBLIC_AIRPORT:[7383002],PRIVATE_AIRPORT:[7383003],MILITARY_AIRPORT:[7383004],AIRFIELD:[7383005],COURIER_DROP_BOX:[7388],TRANSPORT_ACCESS:[7389],AIRLINE_ACCESS:[7389002],STATION_ACCESS:[7389003],SECURED_ENTRANCE:[7389004],SUBWAY_ENTRANCE:[7389999],EMERGENCY_MEDICAL_SERVICE:[7391],FIRE_STATION:[7392],REST_AREA:[7395],ATM:[7397],NATURAL_FEATURE:[8099],MOUNTAIN_PEAK:[8099002],CAVE:[8099003],RIDGE:[8099004],DUNE:[8099005],VALLEY:[8099006],PLAIN_OR_FLAT:[8099007],PLATEAU:[8099008],PAN:[8099009],WELL:[8099010],OASIS:[8099011],ROCKS:[8099012],RESERVOIR:[8099013],REEF:[8099014],RAPIDS:[8099015],BAY:[8099016],COVE:[8099017],HARBOR:[8099018],CAPE:[8099020],MINERAL_OR_HOT_SPRINGS:[8099021],ISLAND:[8099022],MARSH:[8099023],RIVER_CROSSING:[8099024],HILL:[8099025],QUARRY:[8099026],LOCALE:[8099027],PRIMARY_RESOURCE_UTILITY:[9150],TRANSPORT_AUTHORITY_VEHICLE_REGISTRATION:[9151],NON_GOVERNMENTAL_ORGANIZATION:[9152],WELFARE_ORGANIZATION:[9153],PRISON:[9154],CAR_WASH:[9155,9155002],MANUFACTURING_FACILITY:[9156],RESEARCH_FACILITY:[9157],MEDIA_FACILITY:[9158],PORT_WAREHOUSE_FACILITY:[9159],EXCHANGE:[9160],STOCK_EXCHANGE:[9160002],GOLD_EXCHANGE:[9160003],FOREIGN_EXCHANGE:[9160004],COMPANY:[9352],SERVICE_COMPANY:[9352002],ADVERTISING_COMPANY:[9352003],COMPUTER_AND_DATA_SERVICES:[9352004],SOFTWARE_COMPANY:[9352005],DIVERSIFIED_FINANCIALS:[9352006],INSURANCE_COMPANY:[9352007],DELIVERY_SERVICE:[9352008],REAL_ESTATE_COMPANY:[9352009],MANUFACTURING_COMPANY:[9352011],AGRICULTURAL_TECHNOLOGY:[9352012],AUTOMOBILE_COMPANY:[9352013],CHEMICAL_COMPANY:[9352014],ELECTRONICS_COMPANY:[9352015],MECHANICAL_ENGINEERING:[9352016],PHARMACEUTICAL_COMPANY:[9352018],PUBLISHING_TECHNOLOGIES:[9352019],TELECOMMUNICATIONS:[9352020],TAX_SERVICES:[9352022],LEGAL_SERVICES:[9352023],TRANSPORT_COMPANY:[9352024],BUS_CHARTER_COMPANY:[9352025],TAXI_LIMOUSINE_AND_SHUTTLE_SERVICE:[9352026],BUS_LINES:[9352027],SCHOOL_BUS_COMPANY:[9352028],CLEANING_SERVICES:[9352029],OIL_AND_NATURAL_GAS:[9352030],MINING_COMPANY:[9352031],CONSTRUCTION_COMPANY:[9352032],MOVING_AND_STORAGE_COMPANY:[9352033],AIRLINE_COMPANY:[9352034],FUNERAL_SERVICE_AND_MORTUARIES:[9352036],INVESTMENT_ADVISOR:[9352037],EQUIPMENT_RENTAL:[9352038],BUSINESS_SERVICES:[9352039],CABLE_AND_TELEPHONE_COMPANY:[9352040],AUTOMOBILE_MANUFACTURING:[9352041],IMPORT_OR_EXPORT_AND_DISTRIBUTION:[9352042],CATERING_SERVICES:[9352043],HOME_APPLIANCE_REPAIR:[9352044],ANIMAL_SHELTER:[9352045],WEDDING_SERVICES:[9352046],BEACH:[9357],RESTAURANT_AREA:[9359],ICE_RINK:[9360],SHOP_OR_STORE:[9361],BOOK_SHOP:[9361002],C_DS_DVD_VIDEOS:[9361003],CHILDREN_S_CLOTHES:[9361004],FOOTWEAR_SHOE_REPAIRS:[9361005],CLOTHING_SHOP:[9361006],MEN_S_CLOTHING:[9361007],WOMEN_S_CLOTHING:[9361008],CONVENIENCE_STORE:[9361009],DRY_CLEANER:[9361010],CAMERAS_AND_PHOTOGRAPHY:[9361011],COMPUTER_AND_COMPUTER_SUPPLIES:[9361012],CONSUMER_ELECTRONICS:[9361013],OFFICE_EQUIPMENT:[9361014],REAL_ESTATE_AGENT:[9361015],FACTORY_OUTLET:[9361016],FLORISTS:[9361017],BAKERY:[9361018],BUTCHER:[9361019],FISHMONGER:[9361020],FOOD_MARKET:[9361021],GREENGROCER:[9361022],GROCERY_STORE:[9361023],FOOD_AND_DRINKS_SHOP:[9361024],WINE_SPIRITS:[9361025],GIFTS_CARDS_NOVELTIES_SOUVENIRS:[9361026],HAIRDRESSER:[9361027],CARPET_FLOOR_COVERINGS:[9361028],CURTAINS_TEXTILES:[9361029],DO_IT_YOURSELF_CENTERS:[9361030],HOUSE_AND_GARDEN_FURNITURE_AND_FITTINGS:[9361031],GARDEN_CENTERS_SERVICES:[9361032],KITCHENS_BATHROOMS:[9361033],LIGHTING_SHOPS:[9361034],PAINTING_DECORATING:[9361035],JEWELRY_CLOCKS_WATCHES:[9361036],NEWSAGENTS_TOBACCONISTS:[9361037],OPTICIAN:[9361038],SPORTS_EQUIPMENT_AND_CLOTHING:[9361039],TOYS_GAMES_SHOP:[9361040],TRAVEL_AGENT:[9361041],CONSTRUCTION_MATERIAL_AND_EQUIPMENT:[9361042],MEDICAL_SUPPLIES_EQUIPMENT:[9361043],VIDEO_RENTAL_SHOP:[9361044],LAUNDRY:[9361045],PHOTO_LAB_OR_DEVELOPMENT:[9361046],PHOTOCOPY_SHOP:[9361047],ANIMAL_SERVICE:[9361048],ANTIQUE_ART_SHOP:[9361049],BEAUTY_SUPPLIES:[9361050],DRUG_STORE:[9361051],ELECTRICAL_APPLIANCES_SHOP:[9361052],HOBBY_SHOP:[9361053],FURNITURE_HOME_FURNISHINGS:[9361054],GLASSWARE_CERAMIC_SHOP:[9361055],LOCAL_SPECIALITIES_SHOP:[9361056],RECYCLING_SHOP:[9361057],BAGS_LEATHERWEAR:[9361058],MUSIC_INSTRUMENTS_STORE:[9361059],DELICATESSEN:[9361060],SPECIALTY_FOODS:[9361061],SHOPPING_SERVICE:[9361062],RETAIL_OUTLET:[9361063],PET_SUPPLIES:[9361064],WHOLESALE_CLUB:[9361066],BEAUTY_SALON:[9361067],NAIL_SALON:[9361068],HARDWARE_STORE:[9361069],PAWN_SHOP:[9361070],LOTTERY_SHOP:[9361071],BETTING_STATION:[9361072],AGRICULTURAL_SUPPLIES:[9361073],MOBILE_PHONE_SHOP:[9361075],DRIVE_THROUGH_BOTTLE_SHOP:[9361076],TAILOR_SHOP:[9361077],SECURITY_PRODUCTS:[9361078],SPECIALTY_CLOTHING_SHOP:[9361079],GLASS_WINDOWS_STORE:[9361080],VARIETY_STORE:[9361081],CHRISTMAS_OR_HOLIDAY_SHOP:[9361082],BOATING_EQUIPMENT_AND_ACCESSORIES:[9361083],PARK_AND_RECREATION_AREA:[9362],BATTLEFIELD:[9362002],CEMETERY:[9362003],HISTORIC_SITE:[9362004],HISTORICAL_PARK:[9362005],MEMORIAL:[9362007],PARK:[9362008],PARKWAY:[9362009],RECREATION_AREA:[9362011],WILDERNESS_AREA:[9362014],FOREST_AREA:[9362015],FISHING_AND_HUNTING_AREA:[9362016],FAIRGROUND:[9362017],SKI_RESORT:[9362026],BOAT_LAUNCHING_RAMP:[9362032],PICNIC_AREA:[9362033],PROTECTED_LAND:[9362037],COURTHOUSE:[9363],CANNABIS_SHOP:[9364],MEDICINAL_MARIJUANA_DISPENSARY:[9364002],RECREATIONAL_MARIJUANA_DISPENSARY:[9364003],MEDICINAL_AND_RECREATIONAL_DISPENSARY:[9364004],TENNIS_COURT:[9369],WATER_SPORT:[9371],DOCTOR:[9373],GENERAL_PRACTITIONER:[9373002],SPECIALIST:[9373003],DENTIST:[9374],VETERINARY:[9375],CAFE_PUB:[9376],CAFE:[9376002],PUB:[9376003],INTERNET_CAFE:[9376004],TEA_HOUSE:[9376005],COFFEE_SHOP:[9376006],MICROBREWERY:[9376007],EXHIBITION_CONVENTION_CENTER:[9377],LEISURE_CENTER:[9378],BOWLING_CENTER:[9378002],DANCE_STUDIO_AND_SCHOOL:[9378003],FLYING_CLUB:[9378004],SAUNA_SOLARIUM_MASSAGE:[9378005],NIGHTLIFE:[9379],DISCO_CLUB:[9379002],BAR:[9379004],COCKTAIL_BAR:[9379006],JAZZ_CLUB:[9379008],COMEDY_CLUB:[9379009],KARAOKE_CLUB:[9379010],COMMERCIAL_BUILDING:[9382],INDUSTRIAL_BUILDING:[9383],ABORIGINAL_LAND:[9389],HEALTHCARE_SERVICE:[9663],PERSONAL_SERVICE:[9663002],PERSONAL_CARE_FACILITY:[9663003],BLOOD_BANK:[9663004],AMBULANCE_UNIT:[9663005],ENTERTAINMENT:[9900],AMUSEMENT_PARK:[9902,9902003],AMUSEMENT_PLACE:[9902004],VEHICLE_DEALER:[9910],CAR_DEALER:[9910002],MOTORCYCLE_DEALER:[9910003],BOAT_DEALER:[9910004],RECREATIONAL_VEHICLE_DEALER:[9910005],TRUCK_DEALER:[9910006],VAN_DEALER:[9910007],BUS_DEALER:[9910008],ATV_DEALER:[9910009],GOLF_COURSE:[9911],PUBLIC_LIBRARY:[9913],ZOOS_ARBORETA_BOTANICAL_GARDEN:[9927],ARBORETA_AND_BOTANICAL_GARDENS:[9927002],ZOO:[9927003],AQUATIC_ZOO:[9927004],WILDLIFE_PARK:[9927005],RENTAL_CAR_PARKING:[9930],PUBLIC_AMENITY:[9932],PASSENGER_TRANSPORT_TICKET_OFFICE:[9932002],PEDESTRIAN_SUBWAY:[9932003],PUBLIC_CALL_BOX:[9932004],PUBLIC_BATHROOM:[9932005],RESCUE_SERVICE:[9932006],MOUNTAIN_PASS:[9935],CLUB_AND_ASSOCIATION:[9937],BEACH_CLUB:[9937002],HOCKEY_CLUB:[9937003],PUBLIC_TRANSPORT_STOP:[9942],BUS_STOP:[9942002],TAXI_STAND:[9942003],STREETCAR_STOP:[9942004],EMERGENCY_ROOM:[9956],RESIDENTIAL_ENTRANCE:[9999]},poiCategoriesToID=Object.fromEntries(Object.entries(poiCategoriesToIDs).map(([A,E])=>[A,E[0]])),poiIDsToCategories=Object.fromEntries(Object.entries(poiCategoriesToIDs).flatMap(([A,E])=>E.map(E=>[E,A]))),projectAlongRouteLocation=(A,E)=>nearestPointOnLine(A,getPositionStrict(E)).properties.location,findInsertionSlot=(A,E)=>{for(let R=0;R<A.length-1;R++)if(E>=A[R]&&E<=A[R+1])return R+1;return E<A[0]?0:A.length},findBestWaypointInsertionIndex=(A,E,R)=>findBestWaypointInsertionIndices(A,E,[R])[0],findBestWaypointInsertionIndices=(A,E,R)=>{if(0===R.length)return[];if(0===A.geometry.coordinates.length||E.length<2)return R.map(()=>0);const T=E.map(E=>projectAlongRouteLocation(A,E)??0);return R.map(E=>{const R=projectAlongRouteLocation(A,E);return void 0===R?0:findInsertionSlot(T,R)})},withInsertedWaypoint=(A,E,R)=>withInsertedWaypoints(A,E,[R]),withInsertedWaypoints=(A,E,R)=>{if(0===R.length)return E.slice();if(0===A.geometry.coordinates.length||E.length<2)return[...R,...E];const T=E.map(E=>projectAlongRouteLocation(A,E)??0),I=Array.from({length:E.length+1},()=>[]);for(let _=0;_<R.length;_++){const E=R[_],N=projectAlongRouteLocation(A,E);I[void 0===N?0:findInsertionSlot(T,N)].push({waypoint:E,location:N??0,inputIndex:_})}for(const _ of I)_.sort((A,E)=>A.location-E.location||A.inputIndex-E.inputIndex);const N=[];for(let _=0;_<E.length;_++){for(const A of I[_])N.push(A.waypoint);N.push(E[_])}for(const _ of I[E.length])N.push(_.waypoint);return N},calculateProgressAtRoutePoint=(A,E)=>{const{progress:R}=A.properties;if(!R||0===R.length)return;const T=A.geometry.coordinates.length;if(E<0||E>=T)return;const I=findBracketingProgressPoints(R,"pointIndex",E);if(!I)return;const{lower:N,lowerVal:_,upper:S,upperVal:e}=I,t=N.distanceInMeters,O=S.distanceInMeters,C=N.travelTimeInSeconds,o=S.travelTimeInSeconds;if(void 0===t||void 0===O||void 0===C||void 0===o)return;if(_===e)return{distanceInMeters:t,travelTimeInSeconds:C};const n=lengthShareOfBracket(A.geometry.coordinates,_,E,e);return{distanceInMeters:t+n*(O-t),travelTimeInSeconds:C+n*(o-C)}},getRouteProgressBetween=(A,E,R)=>{const T=calculateProgressAtRoutePoint(A,E),I=calculateProgressAtRoutePoint(A,R);if(T&&I)return{start:T,end:I,delta:{distanceInMeters:I.distanceInMeters-T.distanceInMeters,travelTimeInSeconds:I.travelTimeInSeconds-T.travelTimeInSeconds}}},getRouteProgressForSection=(A,E)=>getRouteProgressBetween(A,E.startPointIndex,E.endPointIndex),getSectionBBox=(A,E)=>{const R=A.geometry.coordinates;if(!R||0===R.length||E.startPointIndex<0||E.endPointIndex>=R.length||E.startPointIndex>E.endPointIndex)return;const T=R[E.startPointIndex],I=R[E.endPointIndex],N=R[Math.floor((E.startPointIndex+E.endPointIndex)/2)];let _=bboxExpandedWithPosition(T);return _=bboxExpandedWithPosition(N,_),_=bboxExpandedWithPosition(I,_),_},firstProgressIndexPast=(A,E,R)=>{let T=A.length,I=0,N=A.length;for(;I<N;){const _=I+N>>>1;let S=_;for(;S<N&&void 0===A[S][E];)S++;const e=S<N?A[S][E]:void 0;void 0===e?N=_:R(e)?(T=S,N=_):I=S+1}return T},findBracketingProgressPoints=(A,E,R)=>{const T=A[firstProgressIndexPast(A,E,A=>A>=R)];let I=firstProgressIndexPast(A,E,A=>A>R)-1;for(;I>=0&&void 0===A[I][E];)I--;const N=A[I],_=N?.[E],S=T?.[E];return void 0!==_&&void 0!==S?{lower:N,lowerVal:_,upper:T,upperVal:S}:void 0},metersAlongLineCache=/* @__PURE__ */new WeakMap,metersAlongLine=A=>{const E=metersAlongLineCache.get(A);if(E?.length===A.length)return E;const R=new Float64Array(A.length);for(let T=1;T<A.length;T++)R[T]=R[T-1]+distance(A[T-1],A[T],{units:"meters"});return metersAlongLineCache.set(A,R),R},lengthShareOfBracket=(A,E,R,T)=>{const I=metersAlongLine(A),N=I[T]-I[E];return N>0?(I[R]-I[E])/N:(R-E)/(T-E)},interpolateProgressAtPathIndex=(A,E,R)=>{const T=A.geometry.coordinates,I=Math.min(E+1,T.length-1),N=T[E],_=T[I],S=calculateProgressAtRoutePoint(A,E),e=calculateProgressAtRoutePoint(A,I);if(S&&e)return{position:[N[0]+R*(_[0]-N[0]),N[1]+R*(_[1]-N[1])],travelTimeInSeconds:S.travelTimeInSeconds+R*(e.travelTimeInSeconds-S.travelTimeInSeconds),distanceInMeters:S.distanceInMeters+R*(e.distanceInMeters-S.distanceInMeters)}},resolveCoordinateAtProgress=(A,E,R)=>{const{progress:T}=A.properties;if(!T||0===T.length)return;const I=A.geometry.coordinates,N=T[0],_=T.at(-1),S=N[E],e=_[E];if(void 0===S||void 0===e)return;if(R<=S)return{position:I[N.pointIndex],travelTimeInSeconds:N.travelTimeInSeconds??0,distanceInMeters:N.distanceInMeters??0};if(R>=e)return{position:I[_.pointIndex],travelTimeInSeconds:_.travelTimeInSeconds??0,distanceInMeters:_.distanceInMeters??0};const t=((A,E,R,T)=>{const I=findBracketingProgressPoints(A,R,T);if(!I)return;const{lower:N,lowerVal:_,upper:S,upperVal:e}=I,t=_===e?0:(T-_)/(e-_),O=metersAlongLine(E),C=O[S.pointIndex]-O[N.pointIndex];if(0===C){const A=N.pointIndex+t*(S.pointIndex-N.pointIndex),E=Math.floor(A);return{pathIndex:E,progressRatioTowardsNextPathPoint:A-E}}const o=O[N.pointIndex]+t*C,n=clamp(sortedIndex(O,o)-1,N.pointIndex,S.pointIndex-1),r=O[n+1]-O[n];return{pathIndex:n,progressRatioTowardsNextPathPoint:r>0?(o-O[n])/r:0}})(T,I,E,R);return void 0!==t?interpolateProgressAtPathIndex(A,t.pathIndex,t.progressRatioTowardsNextPathPoint):void 0},getCoordinateAtRouteProgress=(A,E)=>{if("traveledTimeInSeconds"in E)return resolveCoordinateAtProgress(A,"travelTimeInSeconds",E.traveledTimeInSeconds);if("traveledDistanceInMeters"in E)return resolveCoordinateAtProgress(A,"distanceInMeters",E.traveledDistanceInMeters);const R=A.properties.summary.departureTime;if(!R)return;const T=(E.clockTime.getTime()-R.getTime())/1e3;return T<0?void 0:resolveCoordinateAtProgress(A,"travelTimeInSeconds",T)},getProgressAtNearestRoutePoint=(A,E)=>{const{progress:R}=A.properties;if(!R?.length)return;const T=A.geometry.coordinates,I=nearestPointOnLine(A,getPositionStrict(E)),N=I.properties.index??0,_=Math.min(N+1,T.length-1),S=T[N],e=T[_],t=((A,E,R)=>{const T=R[0]-A[0],I=R[1]-A[1],N=T*T+I*I;if(0===N)return 0;const _=((E[0]-A[0])*T+(E[1]-A[1])*I)/N;return clamp(_,0,1)})(S,I.geometry.coordinates,e);return interpolateProgressAtPathIndex(A,N,t)},getRoutePlanningLocationType=A=>Array.isArray(A)?Array.isArray(A[0])?"path":"waypoint":"Feature"===A.type&&"LineString"===A.geometry.type?"path":"waypoint",sdkErrorCodeForStatus=A=>401===A?"INVALID_CREDENTIALS":403===A?"INSUFFICIENT_PERMISSIONS":404===A?"NOT_FOUND":429===A?"RATE_LIMITED":A>=500?"LIVE_SERVICE_NOT_AVAILABLE":A>=400?"INVALID_REQUEST":"INTERNAL",retryableCodes=/* @__PURE__ */new Set(["RATE_LIMITED","LIVE_SERVICE_NOT_AVAILABLE","NETWORK_NOT_AVAILABLE"]),canRetrySDKErrorCode=A=>retryableCodes.has(A),indexedMagnitudes=["unknown","minor","moderate","major","indefinite"],iconCategoryMap={1:"accident",2:"fog",3:"danger",4:"rain",5:"frost",6:"jam",7:"lane-closed",8:"road-closed",9:"roadworks",10:"wind",11:"flooding",12:"animals-on-road",13:"narrow-lanes",14:"broken-down-vehicle"},categoryToIconMap=Object.fromEntries(Object.entries(iconCategoryMap).map(([A,E])=>[E,Number(A)])),iconToTrafficIncidentCategory=A=>iconCategoryMap[A]??"other",trafficIncidentToIconCategory=A=>categoryToIconMap[A]??0,minuteUnits=A=>A?.minutes??"min",formatDuration=(A,E)=>{if(A){const T=Math.abs(A)/3600;let I=Math.floor(T),N=Math.round(T%1*60);60===N&&(N=0,I++);const _={...TomTomConfig.instance.get().displayUnits?.time,...E};if(I)return`${I} ${R=_,R?.hours??"hr"} ${N.toString().padStart(2,"0")} ${minuteUnits(_)}`;if(N)return`${N.toString()} ${minuteUnits(_)}`}var R},MILE_IN_METERS=1609.344,meterUnits=A=>A?.meters??"m",kmUnits=A=>A?.kilometers??"km",formatMiles=(A,E,R)=>E<3?((A,E,R)=>{const T=Number.parseInt(E.toString()),I=E-T,N=A<0?"-":"";if(I<.125)return`${N}${T} ${R}`;const _=T>0?T:"";return I<.375?`${N}${_}¼ ${R}`:I<.625?`${N}${_}½ ${R}`:I<.875?`${N}${_}¾ ${R}`:`${N}${T+1} ${R}`})(A,E,R):E<10?((A,E,R)=>{const T=Number.parseInt(E.toString()),I=E-T,N=A<0?"-":"";return I<.25?`${N}${T} ${R}`:I<.75?`${N}${T}½ ${R}`:`${N}${T+1} ${R}`})(A,E,R):`${Math.round(A)} ${R}`,mileUnitsWithDefault=A=>A.miles??"mi",formatUs=(A,E)=>{const R=A/1609.344,T=Math.abs(R);return T<.125?((A,E)=>{const R=Math.round(A/.3048),T=Math.abs(R);return T<30?`${R} ${E}`:T<500?`${10*Math.round(R/10)} ${E}`:`${100*Math.round(R/100)} ${E}`})(A,E.feet??"ft"):formatMiles(R,T,mileUnitsWithDefault(E))},formatUk=(A,E)=>{const R=A/1609.344,T=Math.abs(R);return T<.125?((A,E)=>{const R=Math.round(A/.9144);return Math.abs(R)<10?`${Math.round(R)} ${E}`:`${10*Math.round(R/10)} ${E}`})(A,E.yards??"yd"):formatMiles(R,T,mileUnitsWithDefault(E))},formatDistance=(A,E)=>{if(isNil(A))return"";const R={...TomTomConfig.instance.get().displayUnits?.distance,...E};switch(R?.type??"metric"){case"metric":return((A,E)=>{const R=Math.abs(A);if(R<10)return`${A} ${meterUnits(E)}`;if(R<500)return`${10*Math.round(A/10)} ${meterUnits(E)}`;if(R<1e3){const R=100*Math.round(A/100);return 1e3===R||-1e3===R?`${A<0?"-":""}1 ${kmUnits(E)}`:`${R} ${meterUnits(E)}`}return R<1e4?`${100*Math.round(A/100)/1e3} ${kmUnits(E)}`:`${Math.round(A/1e3)} ${kmUnits(E)}`})(A,R);case"imperial_us":return formatUs(A,R);case"imperial_uk":return formatUk(A,R)}};export{DEFAULT_COMMON_BASE_URL,MILE_IN_METERS,TOMTOM_USER_AGENT_SDK_NAME,TomTomConfig,areaAnalyticsMetricKeys,avoidableTypes,bboxCenter,bboxFromBBoxes,bboxFromCoordsArray,bboxFromGeoJSON,bboxOnlyIfWithArea,budgetTypes,budgetUnits,calculateProgressAtRoutePoint,canRetrySDKErrorCode,chargingPointCapabilities,chargingPointRestrictions,connectorTypes,currentTypes,defaultConfig,findBestWaypointInsertionIndex,findBestWaypointInsertionIndices,formatDistance,formatDuration,fullTrafficIncidentCategories,generateId,generateTomTomHeaders,geographyTypes,geopoliticalViews,getCoordinateAtRouteProgress,getPosition,getPositionStrict,getProgressAtNearestRoutePoint,getRoutePlanningLocationType,getRouteProgressBetween,getRouteProgressForSection,getSectionBBox,iconToTrafficIncidentCategory,indexedMagnitudes,inputSectionTypes,inputSectionTypesWithGuidance,insecureBaseURLMessage,isBBoxWithArea,isProxyCredentialsMode,isSecureBaseURL,mergeFromGlobal,placeTypes,poiCategories,poiCategoriesToID,poiCategoriesToIDs,poiIDsToCategories,polygonFromBBox,sdkErrorCodeForStatus,sdkErrorCodes,sectionTypes,toPointGeometry,trafficIncidentRequestCategories,trafficIncidentTimeValidities,trafficIncidentToIconCategory,withInsertedWaypoint,withInsertedWaypoints};
@@ -139,7 +139,7 @@ terms above.
139
139
  ---
140
140
 
141
141
  Name: maplibre-gl
142
- Version: 6.12.0
142
+ Version: 6.13.0
143
143
  License: BSD-3-Clause
144
144
  Bundled: false (peer dependency)
145
145
  Description: BSD licensed community fork of mapbox-gl, a WebGL interactive maps library