From 5f2321a4a1192d7d81b191d8a8e668d35dd1df0a Mon Sep 17 00:00:00 2001 From: Yasunori Kirimoto Date: Sun, 10 Sep 2023 14:09:03 +0900 Subject: [PATCH] v6.5.0 --- LICENSE | 2 +- README.md | 16 +- dist/index.html | 4 +- ...{index-c3ae4bcd.css => index-1126d8f9.css} | 2 +- docs/assets/index-83eeea77.js | 580 ------------------ docs/assets/index-ee1dc6cf.js | 580 ++++++++++++++++++ docs/index.html | 4 +- img/README02.png | Bin 31958 -> 50701 bytes package-lock.json | 577 +++++++++-------- package.json | 8 +- 10 files changed, 906 insertions(+), 867 deletions(-) rename docs/assets/{index-c3ae4bcd.css => index-1126d8f9.css} (89%) delete mode 100644 docs/assets/index-83eeea77.js create mode 100644 docs/assets/index-ee1dc6cf.js diff --git a/LICENSE b/LICENSE index 3a7e745..9bbd6f5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019-2022 Yasunori Kirimoto +Copyright (c) 2019-2023 Yasunori Kirimoto Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 2a2a1aa..1696674 100755 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# turfjs-starter +# maplibregljs-turfjs-starter ![README02](img/README02.png) Start Turf.js easily. - [Turf.js v6.5.0](http://turfjs.org/) -- [MapLibre GL JS v3.1.0](https://maplibre.org) -- [TypeScript v5.1.6](https://www.typescriptlang.org) -- [Vite v4.3.9](https://vitejs.dev) +- [MapLibre GL JS v3.3.1](https://maplibre.org) +- [TypeScript v5.2.2](https://www.typescriptlang.org) +- [Vite v4.4.9](https://vitejs.dev) - node v18.1.0 - npm v8.8.0 @@ -61,15 +61,15 @@ Copyright (c) 2019-2023 Yasunori Kirimoto
-# Turf.js スターター +# MapLibre GL JS & Turf.js スターター ![README02](img/README02.png) Turf.jsを手軽に始める - [Turf.js v6.5.0](http://turfjs.org/) -- [MapLibre GL JS v3.1.0](https://maplibre.org) -- [TypeScript v5.1.6](https://www.typescriptlang.org) -- [Vite v4.3.9](https://vitejs.dev) +- [MapLibre GL JS v3.3.1](https://maplibre.org) +- [TypeScript v5.2.2](https://www.typescriptlang.org) +- [Vite v4.4.9](https://vitejs.dev) - node v18.1.0 - npm v8.8.0 diff --git a/dist/index.html b/dist/index.html index a54f0e0..e276c3a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,8 +5,8 @@ Turf.js Starter - - + +
diff --git a/docs/assets/index-c3ae4bcd.css b/docs/assets/index-1126d8f9.css similarity index 89% rename from docs/assets/index-c3ae4bcd.css rename to docs/assets/index-1126d8f9.css index 99d0eaa..966f7ca 100644 --- a/docs/assets/index-c3ae4bcd.css +++ b/docs/assets/index-1126d8f9.css @@ -1 +1 @@ -html,body{height:100%;padding:0;margin:0}#map{z-index:0;height:100%}.maplibregl-map{-webkit-tap-highlight-color:rgb(0 0 0/0);font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media (-ms-high-contrast:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (-ms-high-contrast:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8h-8z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath fill='%23999' d='m10.5 16 4 8 4-8h-8z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8h-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1 9-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1 9-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1 9-9z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.255 1.255 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.255 1.255 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5.11 5.11 0 0 1 .314-.787l.009-.016a4.623 4.623 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.548 4.548 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4.314.319.566.676.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.416 2.416 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.448 2.448 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675c.211.2.381.43.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.76 4.76 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.407 3.407 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.255 1.255 0 0 1 .689 1.004 4.73 4.73 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528 0 .343-.02.694-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.815 5.815 0 0 1-.548-2.512c0-.286.017-.567.053-.843a1.255 1.255 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.778 4.778 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.47 4.47 0 0 1-1.935-.424 1.252 1.252 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.402 2.402 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.703 4.703 0 0 1-1.782 1.884 4.767 4.767 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.47 4.47 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a4.983 4.983 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.255 1.255 0 0 1-1.115.676h-.098a1.255 1.255 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15c.329-.237.574-.499.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267c-.088-.22-.264-.438-.526-.658l-.032-.028a3.16 3.16 0 0 0-.668-.428l-.27-.12a3.293 3.293 0 0 0-1.235-.23c-.757 0-1.415.163-1.974.493a3.36 3.36 0 0 0-1.3 1.382c-.297.593-.444 1.284-.444 2.074 0 .8.17 1.503.51 2.107a3.795 3.795 0 0 0 1.382 1.381 3.883 3.883 0 0 0 1.893.477c.53 0 1.015-.11 1.455-.33zm-2.789-5.38c-.384.45-.575 1.038-.575 1.762 0 .735.186 1.332.559 1.794.384.45.933.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.17 2.17 0 0 0 .468-.29l.178-.161a2.163 2.163 0 0 0 .397-.561c.163-.333.244-.717.244-1.15v-.115c0-.472-.098-.894-.296-1.267l-.043-.077a2.211 2.211 0 0 0-.633-.709l-.13-.086-.047-.028a2.099 2.099 0 0 0-1.073-.285c-.702 0-1.244.231-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.958.958 0 0 0-.353-.389.851.851 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.626 2.626 0 0 0 .331.423c.213.22.464.402.755.548l.173.074c.433.17.93.255 1.49.255.68 0 1.295-.165 1.844-.493a3.447 3.447 0 0 0 1.316-1.4c.329-.603.493-1.299.493-2.089 0-1.273-.33-2.243-.988-2.913-.658-.68-1.52-1.02-2.584-1.02-.598 0-1.124.115-1.575.347a2.807 2.807 0 0 0-.415.262l-.199.166a3.35 3.35 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138c.137.193.297.36.48.5l.155.11.053.034c.34.197.713.297 1.119.297.714 0 1.262-.225 1.645-.675.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.29 0-.569.053-.835.16a2.366 2.366 0 0 0-.284.136 1.99 1.99 0 0 0-.363.254 2.237 2.237 0 0 0-.46.569l-.082.162a2.56 2.56 0 0 0-.213 1.072v.115c0 .471.098.894.296 1.267l.135.211zm.964-.818a1.11 1.11 0 0 0 .367.385.937.937 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a.995.995 0 0 0-.503.135l-.012.007a.859.859 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.43 1.43 0 0 0 .14.66zm15.7-6.222c.232-.23.346-.516.346-.856a1.053 1.053 0 0 0-.345-.79 1.175 1.175 0 0 0-.84-.329c-.34 0-.625.11-.855.33a1.053 1.053 0 0 0-.346.79c0 .34.115.625.346.855.23.23.516.346.856.346.34 0 .62-.115.839-.346zm4.337 9.314.033-1.332c.128.269.324.518.59.747l.098.081a3.727 3.727 0 0 0 .316.224l.223.122a3.21 3.21 0 0 0 1.44.322 3.785 3.785 0 0 0 1.875-.477 3.52 3.52 0 0 0 1.382-1.366c.352-.593.526-1.29.526-2.09 0-.79-.147-1.48-.444-2.073a3.235 3.235 0 0 0-1.283-1.399c-.549-.34-1.195-.51-1.942-.51a3.476 3.476 0 0 0-1.527.344l-.086.043-.165.09a3.412 3.412 0 0 0-.33.214c-.288.21-.507.446-.656.707a1.893 1.893 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.482 2.482 0 0 0 .566.7c.078.065.159.125.245.18l.144.08a2.105 2.105 0 0 0 .975.232c.713 0 1.262-.225 1.645-.675.384-.46.576-1.053.576-1.778 0-.734-.192-1.327-.576-1.777-.373-.46-.921-.692-1.645-.692a2.18 2.18 0 0 0-1.015.235c-.147.075-.285.17-.415.282l-.15.142a2.086 2.086 0 0 0-.42.594c-.149.32-.223.685-.223 1.1v.115c0 .47.097.89.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.868.868 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.13 1.13 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013c.23-.087.472-.134.724-.14l.069-.002c.329 0 .542.033.642.099l.247-1.794c-.13-.066-.37-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2.086 2.086 0 0 0-.411.148 2.18 2.18 0 0 0-.4.249 2.482 2.482 0 0 0-.485.499 2.659 2.659 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884c0-.364.053-.678.159-.943a1.49 1.49 0 0 1 .466-.636 2.52 2.52 0 0 1 .399-.253 2.19 2.19 0 0 1 .224-.099zm9.784 2.656.05-.922c0-1.162-.285-2.062-.856-2.698-.559-.647-1.42-.97-2.584-.97-.746 0-1.415.163-2.007.493a3.462 3.462 0 0 0-1.4 1.382c-.329.604-.493 1.306-.493 2.106 0 .714.143 1.371.428 1.975.285.593.73 1.07 1.332 1.432.604.351 1.355.526 2.255.526.649 0 1.204-.062 1.668-.185l.044-.012.135-.04c.409-.122.736-.263.984-.421l-.542-1.267c-.2.108-.415.199-.642.274l-.297.087c-.34.088-.773.131-1.3.131-.636 0-1.135-.147-1.497-.444a1.573 1.573 0 0 1-.192-.193c-.244-.294-.415-.705-.512-1.234l-.004-.021h5.43zm-5.427-1.256-.003.022h3.752v-.138c-.007-.485-.104-.857-.288-1.118a1.056 1.056 0 0 0-.156-.176c-.307-.285-.746-.428-1.316-.428-.657 0-1.155.202-1.494.604-.253.3-.417.712-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81c-.68 0-1.311-.16-1.893-.478a3.795 3.795 0 0 1-1.381-1.382c-.34-.604-.51-1.306-.51-2.106 0-.79.147-1.482.444-2.074a3.364 3.364 0 0 1 1.3-1.382c.559-.33 1.217-.494 1.974-.494a3.293 3.293 0 0 1 1.234.231 3.341 3.341 0 0 1 .97.575c.264.22.44.439.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332c-.186.395-.526.746-1.02 1.053a3.167 3.167 0 0 1-1.662.444zm.296-1.482c.626 0 1.152-.214 1.58-.642.428-.44.642-1.01.642-1.711v-.115c0-.472-.098-.894-.296-1.267a2.211 2.211 0 0 0-.807-.872 2.098 2.098 0 0 0-1.119-.313c-.702 0-1.245.231-1.629.692-.384.45-.575 1.037-.575 1.76 0 .736.186 1.333.559 1.795.384.45.933.675 1.645.675zm6.521-6.237h1.711v1.4c.604-1.065 1.547-1.597 2.83-1.597 1.064 0 1.926.34 2.584 1.02.659.67.988 1.641.988 2.914 0 .79-.164 1.487-.493 2.09a3.456 3.456 0 0 1-1.316 1.399 3.51 3.51 0 0 1-1.844.493c-.636 0-1.19-.11-1.662-.329a2.665 2.665 0 0 1-1.086-.97l.017 5.134h-1.728V9.242zm4.048 6.22c.714 0 1.262-.224 1.645-.674.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.395 0-.768.098-1.12.296-.34.187-.613.46-.822.823-.197.351-.296.763-.296 1.234v.115c0 .472.098.894.296 1.267.209.362.483.647.823.855.34.197.713.297 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.159 1.159 0 0 1-.856-.346 1.165 1.165 0 0 1-.346-.856 1.053 1.053 0 0 1 .346-.79c.23-.219.516-.329.856-.329.329 0 .609.11.839.33a1.053 1.053 0 0 1 .345.79 1.159 1.159 0 0 1-.345.855c-.22.23-.5.346-.84.346zm7.875 9.133a3.167 3.167 0 0 1-1.662-.444c-.482-.307-.817-.658-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283c.186-.438.548-.812 1.086-1.119a3.486 3.486 0 0 1 1.778-.477c.746 0 1.393.17 1.942.51a3.235 3.235 0 0 1 1.283 1.4c.297.592.444 1.282.444 2.072 0 .8-.175 1.498-.526 2.09a3.52 3.52 0 0 1-1.382 1.366 3.785 3.785 0 0 1-1.876.477zm-.296-1.481c.713 0 1.26-.225 1.645-.675.384-.46.577-1.053.577-1.778 0-.734-.193-1.327-.577-1.776-.373-.46-.921-.692-1.645-.692a2.115 2.115 0 0 0-1.58.659c-.428.428-.642.992-.642 1.694v.115c0 .473.098.895.296 1.267a2.385 2.385 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481c.176-.505.46-.91.856-1.217a2.14 2.14 0 0 1 1.349-.46c.351 0 .593.032.724.098l-.247 1.794c-.099-.066-.313-.099-.642-.099-.516 0-.988.164-1.416.494-.417.329-.626.855-.626 1.58v3.883h-1.777V9.242zm9.534 7.718c-.9 0-1.651-.175-2.255-.526-.603-.362-1.047-.84-1.332-1.432a4.567 4.567 0 0 1-.428-1.975c0-.8.164-1.502.493-2.106a3.462 3.462 0 0 1 1.4-1.382c.592-.33 1.262-.494 2.007-.494 1.163 0 2.024.324 2.584.97.57.637.856 1.537.856 2.7 0 .296-.017.603-.05.92h-5.43c.12.67.356 1.153.708 1.45.362.296.86.443 1.497.443.526 0 .96-.044 1.3-.131a4.123 4.123 0 0 0 .938-.362l.542 1.267c-.274.175-.647.329-1.119.46-.472.132-1.042.197-1.711.197zm1.596-4.558c.01-.68-.137-1.158-.444-1.432-.307-.285-.746-.428-1.316-.428-1.152 0-1.815.62-1.991 1.86h3.752z'/%3E%3Cg fill-rule='evenodd' stroke-width='1.036'%3E%3Cpath fill='%23000' fill-opacity='.4' d='m8.166 16.146-.002.002a1.54 1.54 0 0 1-2.009 0l-.002-.002-.043-.034-.002-.002-.199-.162H4.377a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659H8.411l-.202.164zm-1.121-.905a.29.29 0 0 0 .113.023.286.286 0 0 0 .189-.07l.077-.063c.634-.508 4.672-3.743 4.672-7.575 0-2.55-2.215-4.625-4.938-4.625S2.221 5.006 2.221 7.556c0 3.225 2.86 6.027 4.144 7.137h.004l.04.038.484.4.077.063a.628.628 0 0 0 .074.047zm-2.52-.548a16.898 16.898 0 0 1-1.183-1.315C2.187 11.942.967 9.897.967 7.555c0-3.319 2.855-5.88 6.192-5.88 3.338 0 6.193 2.561 6.193 5.881 0 2.34-1.22 4.387-2.376 5.822a16.898 16.898 0 0 1-1.182 1.315h.15a1.912 1.912 0 0 1 1.914 1.914v1.84a1.912 1.912 0 0 1-1.914 1.914H4.377a1.912 1.912 0 0 1-1.914-1.914v-1.84a1.912 1.912 0 0 1 1.914-1.914zm3.82-6.935c0 .692-.55 1.222-1.187 1.222s-1.185-.529-1.185-1.222.548-1.222 1.185-1.222c.638 0 1.186.529 1.186 1.222zm-1.186 2.477c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477zm2.048 7.71H5.114v-.838h4.093z'/%3E%3Cpath fill='%23e1e3e9' d='M2.222 7.555c0-2.55 2.214-4.625 4.937-4.625 2.723 0 4.938 2.075 4.938 4.625 0 3.832-4.038 7.068-4.672 7.575l-.077.063a.286.286 0 0 1-.189.07.286.286 0 0 1-.188-.07l-.077-.063c-.634-.507-4.672-3.743-4.672-7.575zm4.937 2.68c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477z'/%3E%3Cpath fill='%23fff' d='M4.377 15.948a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659zm4.83 1.16H5.114v.838h4.093z'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (-ms-high-contrast:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.255 1.255 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.255 1.255 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5.11 5.11 0 0 1 .314-.787l.009-.016a4.623 4.623 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.548 4.548 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4.314.319.566.676.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.416 2.416 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.448 2.448 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675c.211.2.381.43.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.76 4.76 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.407 3.407 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.255 1.255 0 0 1 .689 1.004 4.73 4.73 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528 0 .343-.02.694-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.815 5.815 0 0 1-.548-2.512c0-.286.017-.567.053-.843a1.255 1.255 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.778 4.778 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.47 4.47 0 0 1-1.935-.424 1.252 1.252 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.402 2.402 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.703 4.703 0 0 1-1.782 1.884 4.767 4.767 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.47 4.47 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a4.983 4.983 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.255 1.255 0 0 1-1.115.676h-.098a1.255 1.255 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15c.329-.237.574-.499.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267c-.088-.22-.264-.438-.526-.658l-.032-.028a3.16 3.16 0 0 0-.668-.428l-.27-.12a3.293 3.293 0 0 0-1.235-.23c-.757 0-1.415.163-1.974.493a3.36 3.36 0 0 0-1.3 1.382c-.297.593-.444 1.284-.444 2.074 0 .8.17 1.503.51 2.107a3.795 3.795 0 0 0 1.382 1.381 3.883 3.883 0 0 0 1.893.477c.53 0 1.015-.11 1.455-.33zm-2.789-5.38c-.384.45-.575 1.038-.575 1.762 0 .735.186 1.332.559 1.794.384.45.933.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.17 2.17 0 0 0 .468-.29l.178-.161a2.163 2.163 0 0 0 .397-.561c.163-.333.244-.717.244-1.15v-.115c0-.472-.098-.894-.296-1.267l-.043-.077a2.211 2.211 0 0 0-.633-.709l-.13-.086-.047-.028a2.099 2.099 0 0 0-1.073-.285c-.702 0-1.244.231-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.958.958 0 0 0-.353-.389.851.851 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.626 2.626 0 0 0 .331.423c.213.22.464.402.755.548l.173.074c.433.17.93.255 1.49.255.68 0 1.295-.165 1.844-.493a3.447 3.447 0 0 0 1.316-1.4c.329-.603.493-1.299.493-2.089 0-1.273-.33-2.243-.988-2.913-.658-.68-1.52-1.02-2.584-1.02-.598 0-1.124.115-1.575.347a2.807 2.807 0 0 0-.415.262l-.199.166a3.35 3.35 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138c.137.193.297.36.48.5l.155.11.053.034c.34.197.713.297 1.119.297.714 0 1.262-.225 1.645-.675.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.29 0-.569.053-.835.16a2.366 2.366 0 0 0-.284.136 1.99 1.99 0 0 0-.363.254 2.237 2.237 0 0 0-.46.569l-.082.162a2.56 2.56 0 0 0-.213 1.072v.115c0 .471.098.894.296 1.267l.135.211zm.964-.818a1.11 1.11 0 0 0 .367.385.937.937 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a.995.995 0 0 0-.503.135l-.012.007a.859.859 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.43 1.43 0 0 0 .14.66zm15.7-6.222c.232-.23.346-.516.346-.856a1.053 1.053 0 0 0-.345-.79 1.175 1.175 0 0 0-.84-.329c-.34 0-.625.11-.855.33a1.053 1.053 0 0 0-.346.79c0 .34.115.625.346.855.23.23.516.346.856.346.34 0 .62-.115.839-.346zm4.337 9.314.033-1.332c.128.269.324.518.59.747l.098.081a3.727 3.727 0 0 0 .316.224l.223.122a3.21 3.21 0 0 0 1.44.322 3.785 3.785 0 0 0 1.875-.477 3.52 3.52 0 0 0 1.382-1.366c.352-.593.526-1.29.526-2.09 0-.79-.147-1.48-.444-2.073a3.235 3.235 0 0 0-1.283-1.399c-.549-.34-1.195-.51-1.942-.51a3.476 3.476 0 0 0-1.527.344l-.086.043-.165.09a3.412 3.412 0 0 0-.33.214c-.288.21-.507.446-.656.707a1.893 1.893 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.482 2.482 0 0 0 .566.7c.078.065.159.125.245.18l.144.08a2.105 2.105 0 0 0 .975.232c.713 0 1.262-.225 1.645-.675.384-.46.576-1.053.576-1.778 0-.734-.192-1.327-.576-1.777-.373-.46-.921-.692-1.645-.692a2.18 2.18 0 0 0-1.015.235c-.147.075-.285.17-.415.282l-.15.142a2.086 2.086 0 0 0-.42.594c-.149.32-.223.685-.223 1.1v.115c0 .47.097.89.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.868.868 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.13 1.13 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013c.23-.087.472-.134.724-.14l.069-.002c.329 0 .542.033.642.099l.247-1.794c-.13-.066-.37-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2.086 2.086 0 0 0-.411.148 2.18 2.18 0 0 0-.4.249 2.482 2.482 0 0 0-.485.499 2.659 2.659 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884c0-.364.053-.678.159-.943a1.49 1.49 0 0 1 .466-.636 2.52 2.52 0 0 1 .399-.253 2.19 2.19 0 0 1 .224-.099zm9.784 2.656.05-.922c0-1.162-.285-2.062-.856-2.698-.559-.647-1.42-.97-2.584-.97-.746 0-1.415.163-2.007.493a3.462 3.462 0 0 0-1.4 1.382c-.329.604-.493 1.306-.493 2.106 0 .714.143 1.371.428 1.975.285.593.73 1.07 1.332 1.432.604.351 1.355.526 2.255.526.649 0 1.204-.062 1.668-.185l.044-.012.135-.04c.409-.122.736-.263.984-.421l-.542-1.267c-.2.108-.415.199-.642.274l-.297.087c-.34.088-.773.131-1.3.131-.636 0-1.135-.147-1.497-.444a1.573 1.573 0 0 1-.192-.193c-.244-.294-.415-.705-.512-1.234l-.004-.021h5.43zm-5.427-1.256-.003.022h3.752v-.138c-.007-.485-.104-.857-.288-1.118a1.056 1.056 0 0 0-.156-.176c-.307-.285-.746-.428-1.316-.428-.657 0-1.155.202-1.494.604-.253.3-.417.712-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81c-.68 0-1.311-.16-1.893-.478a3.795 3.795 0 0 1-1.381-1.382c-.34-.604-.51-1.306-.51-2.106 0-.79.147-1.482.444-2.074a3.364 3.364 0 0 1 1.3-1.382c.559-.33 1.217-.494 1.974-.494a3.293 3.293 0 0 1 1.234.231 3.341 3.341 0 0 1 .97.575c.264.22.44.439.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332c-.186.395-.526.746-1.02 1.053a3.167 3.167 0 0 1-1.662.444zm.296-1.482c.626 0 1.152-.214 1.58-.642.428-.44.642-1.01.642-1.711v-.115c0-.472-.098-.894-.296-1.267a2.211 2.211 0 0 0-.807-.872 2.098 2.098 0 0 0-1.119-.313c-.702 0-1.245.231-1.629.692-.384.45-.575 1.037-.575 1.76 0 .736.186 1.333.559 1.795.384.45.933.675 1.645.675zm6.521-6.237h1.711v1.4c.604-1.065 1.547-1.597 2.83-1.597 1.064 0 1.926.34 2.584 1.02.659.67.988 1.641.988 2.914 0 .79-.164 1.487-.493 2.09a3.456 3.456 0 0 1-1.316 1.399 3.51 3.51 0 0 1-1.844.493c-.636 0-1.19-.11-1.662-.329a2.665 2.665 0 0 1-1.086-.97l.017 5.134h-1.728V9.242zm4.048 6.22c.714 0 1.262-.224 1.645-.674.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.395 0-.768.098-1.12.296-.34.187-.613.46-.822.823-.197.351-.296.763-.296 1.234v.115c0 .472.098.894.296 1.267.209.362.483.647.823.855.34.197.713.297 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.159 1.159 0 0 1-.856-.346 1.165 1.165 0 0 1-.346-.856 1.053 1.053 0 0 1 .346-.79c.23-.219.516-.329.856-.329.329 0 .609.11.839.33a1.053 1.053 0 0 1 .345.79 1.159 1.159 0 0 1-.345.855c-.22.23-.5.346-.84.346zm7.875 9.133a3.167 3.167 0 0 1-1.662-.444c-.482-.307-.817-.658-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283c.186-.438.548-.812 1.086-1.119a3.486 3.486 0 0 1 1.778-.477c.746 0 1.393.17 1.942.51a3.235 3.235 0 0 1 1.283 1.4c.297.592.444 1.282.444 2.072 0 .8-.175 1.498-.526 2.09a3.52 3.52 0 0 1-1.382 1.366 3.785 3.785 0 0 1-1.876.477zm-.296-1.481c.713 0 1.26-.225 1.645-.675.384-.46.577-1.053.577-1.778 0-.734-.193-1.327-.577-1.776-.373-.46-.921-.692-1.645-.692a2.115 2.115 0 0 0-1.58.659c-.428.428-.642.992-.642 1.694v.115c0 .473.098.895.296 1.267a2.385 2.385 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481c.176-.505.46-.91.856-1.217a2.14 2.14 0 0 1 1.349-.46c.351 0 .593.032.724.098l-.247 1.794c-.099-.066-.313-.099-.642-.099-.516 0-.988.164-1.416.494-.417.329-.626.855-.626 1.58v3.883h-1.777V9.242zm9.534 7.718c-.9 0-1.651-.175-2.255-.526-.603-.362-1.047-.84-1.332-1.432a4.567 4.567 0 0 1-.428-1.975c0-.8.164-1.502.493-2.106a3.462 3.462 0 0 1 1.4-1.382c.592-.33 1.262-.494 2.007-.494 1.163 0 2.024.324 2.584.97.57.637.856 1.537.856 2.7 0 .296-.017.603-.05.92h-5.43c.12.67.356 1.153.708 1.45.362.296.86.443 1.497.443.526 0 .96-.044 1.3-.131a4.123 4.123 0 0 0 .938-.362l.542 1.267c-.274.175-.647.329-1.119.46-.472.132-1.042.197-1.711.197zm1.596-4.558c.01-.68-.137-1.158-.444-1.432-.307-.285-.746-.428-1.316-.428-1.152 0-1.815.62-1.991 1.86h3.752z'/%3E%3Cg fill-rule='evenodd' stroke-width='1.036'%3E%3Cpath fill='%23000' fill-opacity='.4' d='m8.166 16.146-.002.002a1.54 1.54 0 0 1-2.009 0l-.002-.002-.043-.034-.002-.002-.199-.162H4.377a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659H8.411l-.202.164zm-1.121-.905a.29.29 0 0 0 .113.023.286.286 0 0 0 .189-.07l.077-.063c.634-.508 4.672-3.743 4.672-7.575 0-2.55-2.215-4.625-4.938-4.625S2.221 5.006 2.221 7.556c0 3.225 2.86 6.027 4.144 7.137h.004l.04.038.484.4.077.063a.628.628 0 0 0 .074.047zm-2.52-.548a16.898 16.898 0 0 1-1.183-1.315C2.187 11.942.967 9.897.967 7.555c0-3.319 2.855-5.88 6.192-5.88 3.338 0 6.193 2.561 6.193 5.881 0 2.34-1.22 4.387-2.376 5.822a16.898 16.898 0 0 1-1.182 1.315h.15a1.912 1.912 0 0 1 1.914 1.914v1.84a1.912 1.912 0 0 1-1.914 1.914H4.377a1.912 1.912 0 0 1-1.914-1.914v-1.84a1.912 1.912 0 0 1 1.914-1.914zm3.82-6.935c0 .692-.55 1.222-1.187 1.222s-1.185-.529-1.185-1.222.548-1.222 1.185-1.222c.638 0 1.186.529 1.186 1.222zm-1.186 2.477c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477zm2.048 7.71H5.114v-.838h4.093z'/%3E%3Cpath fill='%23e1e3e9' d='M2.222 7.555c0-2.55 2.214-4.625 4.937-4.625 2.723 0 4.938 2.075 4.938 4.625 0 3.832-4.038 7.068-4.672 7.575l-.077.063a.286.286 0 0 1-.189.07.286.286 0 0 1-.188-.07l-.077-.063c-.634-.507-4.672-3.743-4.672-7.575zm4.937 2.68c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477z'/%3E%3Cpath fill='%23fff' d='M4.377 15.948a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659zm4.83 1.16H5.114v.838h4.093z'/%3E%3C/g%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.255 1.255 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.255 1.255 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5.11 5.11 0 0 1 .314-.787l.009-.016a4.623 4.623 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.548 4.548 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4.314.319.566.676.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.416 2.416 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.448 2.448 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675c.211.2.381.43.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.76 4.76 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.407 3.407 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.255 1.255 0 0 1 .689 1.004 4.73 4.73 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528 0 .343-.02.694-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.815 5.815 0 0 1-.548-2.512c0-.286.017-.567.053-.843a1.255 1.255 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.778 4.778 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.47 4.47 0 0 1-1.935-.424 1.252 1.252 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.402 2.402 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.703 4.703 0 0 1-1.782 1.884 4.767 4.767 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.47 4.47 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a4.983 4.983 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.255 1.255 0 0 1-1.115.676h-.098a1.255 1.255 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15c.329-.237.574-.499.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267c-.088-.22-.264-.438-.526-.658l-.032-.028a3.16 3.16 0 0 0-.668-.428l-.27-.12a3.293 3.293 0 0 0-1.235-.23c-.757 0-1.415.163-1.974.493a3.36 3.36 0 0 0-1.3 1.382c-.297.593-.444 1.284-.444 2.074 0 .8.17 1.503.51 2.107a3.795 3.795 0 0 0 1.382 1.381 3.883 3.883 0 0 0 1.893.477c.53 0 1.015-.11 1.455-.33zm-2.789-5.38c-.384.45-.575 1.038-.575 1.762 0 .735.186 1.332.559 1.794.384.45.933.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.17 2.17 0 0 0 .468-.29l.178-.161a2.163 2.163 0 0 0 .397-.561c.163-.333.244-.717.244-1.15v-.115c0-.472-.098-.894-.296-1.267l-.043-.077a2.211 2.211 0 0 0-.633-.709l-.13-.086-.047-.028a2.099 2.099 0 0 0-1.073-.285c-.702 0-1.244.231-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.958.958 0 0 0-.353-.389.851.851 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.626 2.626 0 0 0 .331.423c.213.22.464.402.755.548l.173.074c.433.17.93.255 1.49.255.68 0 1.295-.165 1.844-.493a3.447 3.447 0 0 0 1.316-1.4c.329-.603.493-1.299.493-2.089 0-1.273-.33-2.243-.988-2.913-.658-.68-1.52-1.02-2.584-1.02-.598 0-1.124.115-1.575.347a2.807 2.807 0 0 0-.415.262l-.199.166a3.35 3.35 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138c.137.193.297.36.48.5l.155.11.053.034c.34.197.713.297 1.119.297.714 0 1.262-.225 1.645-.675.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.29 0-.569.053-.835.16a2.366 2.366 0 0 0-.284.136 1.99 1.99 0 0 0-.363.254 2.237 2.237 0 0 0-.46.569l-.082.162a2.56 2.56 0 0 0-.213 1.072v.115c0 .471.098.894.296 1.267l.135.211zm.964-.818a1.11 1.11 0 0 0 .367.385.937.937 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a.995.995 0 0 0-.503.135l-.012.007a.859.859 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.43 1.43 0 0 0 .14.66zm15.7-6.222c.232-.23.346-.516.346-.856a1.053 1.053 0 0 0-.345-.79 1.175 1.175 0 0 0-.84-.329c-.34 0-.625.11-.855.33a1.053 1.053 0 0 0-.346.79c0 .34.115.625.346.855.23.23.516.346.856.346.34 0 .62-.115.839-.346zm4.337 9.314.033-1.332c.128.269.324.518.59.747l.098.081a3.727 3.727 0 0 0 .316.224l.223.122a3.21 3.21 0 0 0 1.44.322 3.785 3.785 0 0 0 1.875-.477 3.52 3.52 0 0 0 1.382-1.366c.352-.593.526-1.29.526-2.09 0-.79-.147-1.48-.444-2.073a3.235 3.235 0 0 0-1.283-1.399c-.549-.34-1.195-.51-1.942-.51a3.476 3.476 0 0 0-1.527.344l-.086.043-.165.09a3.412 3.412 0 0 0-.33.214c-.288.21-.507.446-.656.707a1.893 1.893 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.482 2.482 0 0 0 .566.7c.078.065.159.125.245.18l.144.08a2.105 2.105 0 0 0 .975.232c.713 0 1.262-.225 1.645-.675.384-.46.576-1.053.576-1.778 0-.734-.192-1.327-.576-1.777-.373-.46-.921-.692-1.645-.692a2.18 2.18 0 0 0-1.015.235c-.147.075-.285.17-.415.282l-.15.142a2.086 2.086 0 0 0-.42.594c-.149.32-.223.685-.223 1.1v.115c0 .47.097.89.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.868.868 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.13 1.13 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013c.23-.087.472-.134.724-.14l.069-.002c.329 0 .542.033.642.099l.247-1.794c-.13-.066-.37-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2.086 2.086 0 0 0-.411.148 2.18 2.18 0 0 0-.4.249 2.482 2.482 0 0 0-.485.499 2.659 2.659 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884c0-.364.053-.678.159-.943a1.49 1.49 0 0 1 .466-.636 2.52 2.52 0 0 1 .399-.253 2.19 2.19 0 0 1 .224-.099zm9.784 2.656.05-.922c0-1.162-.285-2.062-.856-2.698-.559-.647-1.42-.97-2.584-.97-.746 0-1.415.163-2.007.493a3.462 3.462 0 0 0-1.4 1.382c-.329.604-.493 1.306-.493 2.106 0 .714.143 1.371.428 1.975.285.593.73 1.07 1.332 1.432.604.351 1.355.526 2.255.526.649 0 1.204-.062 1.668-.185l.044-.012.135-.04c.409-.122.736-.263.984-.421l-.542-1.267c-.2.108-.415.199-.642.274l-.297.087c-.34.088-.773.131-1.3.131-.636 0-1.135-.147-1.497-.444a1.573 1.573 0 0 1-.192-.193c-.244-.294-.415-.705-.512-1.234l-.004-.021h5.43zm-5.427-1.256-.003.022h3.752v-.138c-.007-.485-.104-.857-.288-1.118a1.056 1.056 0 0 0-.156-.176c-.307-.285-.746-.428-1.316-.428-.657 0-1.155.202-1.494.604-.253.3-.417.712-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81c-.68 0-1.311-.16-1.893-.478a3.795 3.795 0 0 1-1.381-1.382c-.34-.604-.51-1.306-.51-2.106 0-.79.147-1.482.444-2.074a3.364 3.364 0 0 1 1.3-1.382c.559-.33 1.217-.494 1.974-.494a3.293 3.293 0 0 1 1.234.231 3.341 3.341 0 0 1 .97.575c.264.22.44.439.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332c-.186.395-.526.746-1.02 1.053a3.167 3.167 0 0 1-1.662.444zm.296-1.482c.626 0 1.152-.214 1.58-.642.428-.44.642-1.01.642-1.711v-.115c0-.472-.098-.894-.296-1.267a2.211 2.211 0 0 0-.807-.872 2.098 2.098 0 0 0-1.119-.313c-.702 0-1.245.231-1.629.692-.384.45-.575 1.037-.575 1.76 0 .736.186 1.333.559 1.795.384.45.933.675 1.645.675zm6.521-6.237h1.711v1.4c.604-1.065 1.547-1.597 2.83-1.597 1.064 0 1.926.34 2.584 1.02.659.67.988 1.641.988 2.914 0 .79-.164 1.487-.493 2.09a3.456 3.456 0 0 1-1.316 1.399 3.51 3.51 0 0 1-1.844.493c-.636 0-1.19-.11-1.662-.329a2.665 2.665 0 0 1-1.086-.97l.017 5.134h-1.728V9.242zm4.048 6.22c.714 0 1.262-.224 1.645-.674.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.395 0-.768.098-1.12.296-.34.187-.613.46-.822.823-.197.351-.296.763-.296 1.234v.115c0 .472.098.894.296 1.267.209.362.483.647.823.855.34.197.713.297 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.159 1.159 0 0 1-.856-.346 1.165 1.165 0 0 1-.346-.856 1.053 1.053 0 0 1 .346-.79c.23-.219.516-.329.856-.329.329 0 .609.11.839.33a1.053 1.053 0 0 1 .345.79 1.159 1.159 0 0 1-.345.855c-.22.23-.5.346-.84.346zm7.875 9.133a3.167 3.167 0 0 1-1.662-.444c-.482-.307-.817-.658-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283c.186-.438.548-.812 1.086-1.119a3.486 3.486 0 0 1 1.778-.477c.746 0 1.393.17 1.942.51a3.235 3.235 0 0 1 1.283 1.4c.297.592.444 1.282.444 2.072 0 .8-.175 1.498-.526 2.09a3.52 3.52 0 0 1-1.382 1.366 3.785 3.785 0 0 1-1.876.477zm-.296-1.481c.713 0 1.26-.225 1.645-.675.384-.46.577-1.053.577-1.778 0-.734-.193-1.327-.577-1.776-.373-.46-.921-.692-1.645-.692a2.115 2.115 0 0 0-1.58.659c-.428.428-.642.992-.642 1.694v.115c0 .473.098.895.296 1.267a2.385 2.385 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481c.176-.505.46-.91.856-1.217a2.14 2.14 0 0 1 1.349-.46c.351 0 .593.032.724.098l-.247 1.794c-.099-.066-.313-.099-.642-.099-.516 0-.988.164-1.416.494-.417.329-.626.855-.626 1.58v3.883h-1.777V9.242zm9.534 7.718c-.9 0-1.651-.175-2.255-.526-.603-.362-1.047-.84-1.332-1.432a4.567 4.567 0 0 1-.428-1.975c0-.8.164-1.502.493-2.106a3.462 3.462 0 0 1 1.4-1.382c.592-.33 1.262-.494 2.007-.494 1.163 0 2.024.324 2.584.97.57.637.856 1.537.856 2.7 0 .296-.017.603-.05.92h-5.43c.12.67.356 1.153.708 1.45.362.296.86.443 1.497.443.526 0 .96-.044 1.3-.131a4.123 4.123 0 0 0 .938-.362l.542 1.267c-.274.175-.647.329-1.119.46-.472.132-1.042.197-1.711.197zm1.596-4.558c.01-.68-.137-1.158-.444-1.432-.307-.285-.746-.428-1.316-.428-1.152 0-1.815.62-1.991 1.86h3.752z'/%3E%3Cg fill-rule='evenodd' stroke-width='1.036'%3E%3Cpath fill='%23000' fill-opacity='.4' d='m8.166 16.146-.002.002a1.54 1.54 0 0 1-2.009 0l-.002-.002-.043-.034-.002-.002-.199-.162H4.377a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659H8.411l-.202.164zm-1.121-.905a.29.29 0 0 0 .113.023.286.286 0 0 0 .189-.07l.077-.063c.634-.508 4.672-3.743 4.672-7.575 0-2.55-2.215-4.625-4.938-4.625S2.221 5.006 2.221 7.556c0 3.225 2.86 6.027 4.144 7.137h.004l.04.038.484.4.077.063a.628.628 0 0 0 .074.047zm-2.52-.548a16.898 16.898 0 0 1-1.183-1.315C2.187 11.942.967 9.897.967 7.555c0-3.319 2.855-5.88 6.192-5.88 3.338 0 6.193 2.561 6.193 5.881 0 2.34-1.22 4.387-2.376 5.822a16.898 16.898 0 0 1-1.182 1.315h.15a1.912 1.912 0 0 1 1.914 1.914v1.84a1.912 1.912 0 0 1-1.914 1.914H4.377a1.912 1.912 0 0 1-1.914-1.914v-1.84a1.912 1.912 0 0 1 1.914-1.914zm3.82-6.935c0 .692-.55 1.222-1.187 1.222s-1.185-.529-1.185-1.222.548-1.222 1.185-1.222c.638 0 1.186.529 1.186 1.222zm-1.186 2.477c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477zm2.048 7.71H5.114v-.838h4.093z'/%3E%3Cpath fill='%23e1e3e9' d='M2.222 7.555c0-2.55 2.214-4.625 4.937-4.625 2.723 0 4.938 2.075 4.938 4.625 0 3.832-4.038 7.068-4.672 7.575l-.077.063a.286.286 0 0 1-.189.07.286.286 0 0 1-.188-.07l-.077-.063c-.634-.507-4.672-3.743-4.672-7.575zm4.937 2.68c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477z'/%3E%3Cpath fill='%23fff' d='M4.377 15.948a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659zm4.83 1.16H5.114v.838h4.093z'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999} +html,body{height:100%;padding:0;margin:0}#map{z-index:0;height:100%}.maplibregl-map{-webkit-tap-highlight-color:rgb(0 0 0/0);font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media (-ms-high-contrast:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (-ms-high-contrast:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8h-8z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath fill='%23999' d='m10.5 16 4 8 4-8h-8z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8h-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1 9-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1 9-9z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1 9-9z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.255 1.255 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.255 1.255 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5.11 5.11 0 0 1 .314-.787l.009-.016a4.623 4.623 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.548 4.548 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4.314.319.566.676.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.416 2.416 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.448 2.448 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675c.211.2.381.43.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.76 4.76 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.407 3.407 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.255 1.255 0 0 1 .689 1.004 4.73 4.73 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528 0 .343-.02.694-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.815 5.815 0 0 1-.548-2.512c0-.286.017-.567.053-.843a1.255 1.255 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.778 4.778 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.47 4.47 0 0 1-1.935-.424 1.252 1.252 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.402 2.402 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.703 4.703 0 0 1-1.782 1.884 4.767 4.767 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.47 4.47 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a4.983 4.983 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.255 1.255 0 0 1-1.115.676h-.098a1.255 1.255 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15c.329-.237.574-.499.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267c-.088-.22-.264-.438-.526-.658l-.032-.028a3.16 3.16 0 0 0-.668-.428l-.27-.12a3.293 3.293 0 0 0-1.235-.23c-.757 0-1.415.163-1.974.493a3.36 3.36 0 0 0-1.3 1.382c-.297.593-.444 1.284-.444 2.074 0 .8.17 1.503.51 2.107a3.795 3.795 0 0 0 1.382 1.381 3.883 3.883 0 0 0 1.893.477c.53 0 1.015-.11 1.455-.33zm-2.789-5.38c-.384.45-.575 1.038-.575 1.762 0 .735.186 1.332.559 1.794.384.45.933.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.17 2.17 0 0 0 .468-.29l.178-.161a2.163 2.163 0 0 0 .397-.561c.163-.333.244-.717.244-1.15v-.115c0-.472-.098-.894-.296-1.267l-.043-.077a2.211 2.211 0 0 0-.633-.709l-.13-.086-.047-.028a2.099 2.099 0 0 0-1.073-.285c-.702 0-1.244.231-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.958.958 0 0 0-.353-.389.851.851 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.626 2.626 0 0 0 .331.423c.213.22.464.402.755.548l.173.074c.433.17.93.255 1.49.255.68 0 1.295-.165 1.844-.493a3.447 3.447 0 0 0 1.316-1.4c.329-.603.493-1.299.493-2.089 0-1.273-.33-2.243-.988-2.913-.658-.68-1.52-1.02-2.584-1.02-.598 0-1.124.115-1.575.347a2.807 2.807 0 0 0-.415.262l-.199.166a3.35 3.35 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138c.137.193.297.36.48.5l.155.11.053.034c.34.197.713.297 1.119.297.714 0 1.262-.225 1.645-.675.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.29 0-.569.053-.835.16a2.366 2.366 0 0 0-.284.136 1.99 1.99 0 0 0-.363.254 2.237 2.237 0 0 0-.46.569l-.082.162a2.56 2.56 0 0 0-.213 1.072v.115c0 .471.098.894.296 1.267l.135.211zm.964-.818a1.11 1.11 0 0 0 .367.385.937.937 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a.995.995 0 0 0-.503.135l-.012.007a.859.859 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.43 1.43 0 0 0 .14.66zm15.7-6.222c.232-.23.346-.516.346-.856a1.053 1.053 0 0 0-.345-.79 1.175 1.175 0 0 0-.84-.329c-.34 0-.625.11-.855.33a1.053 1.053 0 0 0-.346.79c0 .34.115.625.346.855.23.23.516.346.856.346.34 0 .62-.115.839-.346zm4.337 9.314.033-1.332c.128.269.324.518.59.747l.098.081a3.727 3.727 0 0 0 .316.224l.223.122a3.21 3.21 0 0 0 1.44.322 3.785 3.785 0 0 0 1.875-.477 3.52 3.52 0 0 0 1.382-1.366c.352-.593.526-1.29.526-2.09 0-.79-.147-1.48-.444-2.073a3.235 3.235 0 0 0-1.283-1.399c-.549-.34-1.195-.51-1.942-.51a3.476 3.476 0 0 0-1.527.344l-.086.043-.165.09a3.412 3.412 0 0 0-.33.214c-.288.21-.507.446-.656.707a1.893 1.893 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.482 2.482 0 0 0 .566.7c.078.065.159.125.245.18l.144.08a2.105 2.105 0 0 0 .975.232c.713 0 1.262-.225 1.645-.675.384-.46.576-1.053.576-1.778 0-.734-.192-1.327-.576-1.777-.373-.46-.921-.692-1.645-.692a2.18 2.18 0 0 0-1.015.235c-.147.075-.285.17-.415.282l-.15.142a2.086 2.086 0 0 0-.42.594c-.149.32-.223.685-.223 1.1v.115c0 .47.097.89.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.868.868 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.13 1.13 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013c.23-.087.472-.134.724-.14l.069-.002c.329 0 .542.033.642.099l.247-1.794c-.13-.066-.37-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2.086 2.086 0 0 0-.411.148 2.18 2.18 0 0 0-.4.249 2.482 2.482 0 0 0-.485.499 2.659 2.659 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884c0-.364.053-.678.159-.943a1.49 1.49 0 0 1 .466-.636 2.52 2.52 0 0 1 .399-.253 2.19 2.19 0 0 1 .224-.099zm9.784 2.656.05-.922c0-1.162-.285-2.062-.856-2.698-.559-.647-1.42-.97-2.584-.97-.746 0-1.415.163-2.007.493a3.462 3.462 0 0 0-1.4 1.382c-.329.604-.493 1.306-.493 2.106 0 .714.143 1.371.428 1.975.285.593.73 1.07 1.332 1.432.604.351 1.355.526 2.255.526.649 0 1.204-.062 1.668-.185l.044-.012.135-.04c.409-.122.736-.263.984-.421l-.542-1.267c-.2.108-.415.199-.642.274l-.297.087c-.34.088-.773.131-1.3.131-.636 0-1.135-.147-1.497-.444a1.573 1.573 0 0 1-.192-.193c-.244-.294-.415-.705-.512-1.234l-.004-.021h5.43zm-5.427-1.256-.003.022h3.752v-.138c-.007-.485-.104-.857-.288-1.118a1.056 1.056 0 0 0-.156-.176c-.307-.285-.746-.428-1.316-.428-.657 0-1.155.202-1.494.604-.253.3-.417.712-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81c-.68 0-1.311-.16-1.893-.478a3.795 3.795 0 0 1-1.381-1.382c-.34-.604-.51-1.306-.51-2.106 0-.79.147-1.482.444-2.074a3.364 3.364 0 0 1 1.3-1.382c.559-.33 1.217-.494 1.974-.494a3.293 3.293 0 0 1 1.234.231 3.341 3.341 0 0 1 .97.575c.264.22.44.439.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332c-.186.395-.526.746-1.02 1.053a3.167 3.167 0 0 1-1.662.444zm.296-1.482c.626 0 1.152-.214 1.58-.642.428-.44.642-1.01.642-1.711v-.115c0-.472-.098-.894-.296-1.267a2.211 2.211 0 0 0-.807-.872 2.098 2.098 0 0 0-1.119-.313c-.702 0-1.245.231-1.629.692-.384.45-.575 1.037-.575 1.76 0 .736.186 1.333.559 1.795.384.45.933.675 1.645.675zm6.521-6.237h1.711v1.4c.604-1.065 1.547-1.597 2.83-1.597 1.064 0 1.926.34 2.584 1.02.659.67.988 1.641.988 2.914 0 .79-.164 1.487-.493 2.09a3.456 3.456 0 0 1-1.316 1.399 3.51 3.51 0 0 1-1.844.493c-.636 0-1.19-.11-1.662-.329a2.665 2.665 0 0 1-1.086-.97l.017 5.134h-1.728V9.242zm4.048 6.22c.714 0 1.262-.224 1.645-.674.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.395 0-.768.098-1.12.296-.34.187-.613.46-.822.823-.197.351-.296.763-.296 1.234v.115c0 .472.098.894.296 1.267.209.362.483.647.823.855.34.197.713.297 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.159 1.159 0 0 1-.856-.346 1.165 1.165 0 0 1-.346-.856 1.053 1.053 0 0 1 .346-.79c.23-.219.516-.329.856-.329.329 0 .609.11.839.33a1.053 1.053 0 0 1 .345.79 1.159 1.159 0 0 1-.345.855c-.22.23-.5.346-.84.346zm7.875 9.133a3.167 3.167 0 0 1-1.662-.444c-.482-.307-.817-.658-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283c.186-.438.548-.812 1.086-1.119a3.486 3.486 0 0 1 1.778-.477c.746 0 1.393.17 1.942.51a3.235 3.235 0 0 1 1.283 1.4c.297.592.444 1.282.444 2.072 0 .8-.175 1.498-.526 2.09a3.52 3.52 0 0 1-1.382 1.366 3.785 3.785 0 0 1-1.876.477zm-.296-1.481c.713 0 1.26-.225 1.645-.675.384-.46.577-1.053.577-1.778 0-.734-.193-1.327-.577-1.776-.373-.46-.921-.692-1.645-.692a2.115 2.115 0 0 0-1.58.659c-.428.428-.642.992-.642 1.694v.115c0 .473.098.895.296 1.267a2.385 2.385 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481c.176-.505.46-.91.856-1.217a2.14 2.14 0 0 1 1.349-.46c.351 0 .593.032.724.098l-.247 1.794c-.099-.066-.313-.099-.642-.099-.516 0-.988.164-1.416.494-.417.329-.626.855-.626 1.58v3.883h-1.777V9.242zm9.534 7.718c-.9 0-1.651-.175-2.255-.526-.603-.362-1.047-.84-1.332-1.432a4.567 4.567 0 0 1-.428-1.975c0-.8.164-1.502.493-2.106a3.462 3.462 0 0 1 1.4-1.382c.592-.33 1.262-.494 2.007-.494 1.163 0 2.024.324 2.584.97.57.637.856 1.537.856 2.7 0 .296-.017.603-.05.92h-5.43c.12.67.356 1.153.708 1.45.362.296.86.443 1.497.443.526 0 .96-.044 1.3-.131a4.123 4.123 0 0 0 .938-.362l.542 1.267c-.274.175-.647.329-1.119.46-.472.132-1.042.197-1.711.197zm1.596-4.558c.01-.68-.137-1.158-.444-1.432-.307-.285-.746-.428-1.316-.428-1.152 0-1.815.62-1.991 1.86h3.752z'/%3E%3Cg fill-rule='evenodd' stroke-width='1.036'%3E%3Cpath fill='%23000' fill-opacity='.4' d='m8.166 16.146-.002.002a1.54 1.54 0 0 1-2.009 0l-.002-.002-.043-.034-.002-.002-.199-.162H4.377a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659H8.411l-.202.164zm-1.121-.905a.29.29 0 0 0 .113.023.286.286 0 0 0 .189-.07l.077-.063c.634-.508 4.672-3.743 4.672-7.575 0-2.55-2.215-4.625-4.938-4.625S2.221 5.006 2.221 7.556c0 3.225 2.86 6.027 4.144 7.137h.004l.04.038.484.4.077.063a.628.628 0 0 0 .074.047zm-2.52-.548a16.898 16.898 0 0 1-1.183-1.315C2.187 11.942.967 9.897.967 7.555c0-3.319 2.855-5.88 6.192-5.88 3.338 0 6.193 2.561 6.193 5.881 0 2.34-1.22 4.387-2.376 5.822a16.898 16.898 0 0 1-1.182 1.315h.15a1.912 1.912 0 0 1 1.914 1.914v1.84a1.912 1.912 0 0 1-1.914 1.914H4.377a1.912 1.912 0 0 1-1.914-1.914v-1.84a1.912 1.912 0 0 1 1.914-1.914zm3.82-6.935c0 .692-.55 1.222-1.187 1.222s-1.185-.529-1.185-1.222.548-1.222 1.185-1.222c.638 0 1.186.529 1.186 1.222zm-1.186 2.477c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477zm2.048 7.71H5.114v-.838h4.093z'/%3E%3Cpath fill='%23e1e3e9' d='M2.222 7.555c0-2.55 2.214-4.625 4.937-4.625 2.723 0 4.938 2.075 4.938 4.625 0 3.832-4.038 7.068-4.672 7.575l-.077.063a.286.286 0 0 1-.189.07.286.286 0 0 1-.188-.07l-.077-.063c-.634-.507-4.672-3.743-4.672-7.575zm4.937 2.68c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477z'/%3E%3Cpath fill='%23fff' d='M4.377 15.948a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659zm4.83 1.16H5.114v.838h4.093z'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (-ms-high-contrast:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.255 1.255 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.255 1.255 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5.11 5.11 0 0 1 .314-.787l.009-.016a4.623 4.623 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.548 4.548 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4.314.319.566.676.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.416 2.416 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.448 2.448 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675c.211.2.381.43.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.76 4.76 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.407 3.407 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.255 1.255 0 0 1 .689 1.004 4.73 4.73 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528 0 .343-.02.694-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.815 5.815 0 0 1-.548-2.512c0-.286.017-.567.053-.843a1.255 1.255 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.778 4.778 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.47 4.47 0 0 1-1.935-.424 1.252 1.252 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.402 2.402 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.703 4.703 0 0 1-1.782 1.884 4.767 4.767 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.47 4.47 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a4.983 4.983 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.255 1.255 0 0 1-1.115.676h-.098a1.255 1.255 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15c.329-.237.574-.499.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267c-.088-.22-.264-.438-.526-.658l-.032-.028a3.16 3.16 0 0 0-.668-.428l-.27-.12a3.293 3.293 0 0 0-1.235-.23c-.757 0-1.415.163-1.974.493a3.36 3.36 0 0 0-1.3 1.382c-.297.593-.444 1.284-.444 2.074 0 .8.17 1.503.51 2.107a3.795 3.795 0 0 0 1.382 1.381 3.883 3.883 0 0 0 1.893.477c.53 0 1.015-.11 1.455-.33zm-2.789-5.38c-.384.45-.575 1.038-.575 1.762 0 .735.186 1.332.559 1.794.384.45.933.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.17 2.17 0 0 0 .468-.29l.178-.161a2.163 2.163 0 0 0 .397-.561c.163-.333.244-.717.244-1.15v-.115c0-.472-.098-.894-.296-1.267l-.043-.077a2.211 2.211 0 0 0-.633-.709l-.13-.086-.047-.028a2.099 2.099 0 0 0-1.073-.285c-.702 0-1.244.231-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.958.958 0 0 0-.353-.389.851.851 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.626 2.626 0 0 0 .331.423c.213.22.464.402.755.548l.173.074c.433.17.93.255 1.49.255.68 0 1.295-.165 1.844-.493a3.447 3.447 0 0 0 1.316-1.4c.329-.603.493-1.299.493-2.089 0-1.273-.33-2.243-.988-2.913-.658-.68-1.52-1.02-2.584-1.02-.598 0-1.124.115-1.575.347a2.807 2.807 0 0 0-.415.262l-.199.166a3.35 3.35 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138c.137.193.297.36.48.5l.155.11.053.034c.34.197.713.297 1.119.297.714 0 1.262-.225 1.645-.675.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.29 0-.569.053-.835.16a2.366 2.366 0 0 0-.284.136 1.99 1.99 0 0 0-.363.254 2.237 2.237 0 0 0-.46.569l-.082.162a2.56 2.56 0 0 0-.213 1.072v.115c0 .471.098.894.296 1.267l.135.211zm.964-.818a1.11 1.11 0 0 0 .367.385.937.937 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a.995.995 0 0 0-.503.135l-.012.007a.859.859 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.43 1.43 0 0 0 .14.66zm15.7-6.222c.232-.23.346-.516.346-.856a1.053 1.053 0 0 0-.345-.79 1.175 1.175 0 0 0-.84-.329c-.34 0-.625.11-.855.33a1.053 1.053 0 0 0-.346.79c0 .34.115.625.346.855.23.23.516.346.856.346.34 0 .62-.115.839-.346zm4.337 9.314.033-1.332c.128.269.324.518.59.747l.098.081a3.727 3.727 0 0 0 .316.224l.223.122a3.21 3.21 0 0 0 1.44.322 3.785 3.785 0 0 0 1.875-.477 3.52 3.52 0 0 0 1.382-1.366c.352-.593.526-1.29.526-2.09 0-.79-.147-1.48-.444-2.073a3.235 3.235 0 0 0-1.283-1.399c-.549-.34-1.195-.51-1.942-.51a3.476 3.476 0 0 0-1.527.344l-.086.043-.165.09a3.412 3.412 0 0 0-.33.214c-.288.21-.507.446-.656.707a1.893 1.893 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.482 2.482 0 0 0 .566.7c.078.065.159.125.245.18l.144.08a2.105 2.105 0 0 0 .975.232c.713 0 1.262-.225 1.645-.675.384-.46.576-1.053.576-1.778 0-.734-.192-1.327-.576-1.777-.373-.46-.921-.692-1.645-.692a2.18 2.18 0 0 0-1.015.235c-.147.075-.285.17-.415.282l-.15.142a2.086 2.086 0 0 0-.42.594c-.149.32-.223.685-.223 1.1v.115c0 .47.097.89.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.868.868 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.13 1.13 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013c.23-.087.472-.134.724-.14l.069-.002c.329 0 .542.033.642.099l.247-1.794c-.13-.066-.37-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2.086 2.086 0 0 0-.411.148 2.18 2.18 0 0 0-.4.249 2.482 2.482 0 0 0-.485.499 2.659 2.659 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884c0-.364.053-.678.159-.943a1.49 1.49 0 0 1 .466-.636 2.52 2.52 0 0 1 .399-.253 2.19 2.19 0 0 1 .224-.099zm9.784 2.656.05-.922c0-1.162-.285-2.062-.856-2.698-.559-.647-1.42-.97-2.584-.97-.746 0-1.415.163-2.007.493a3.462 3.462 0 0 0-1.4 1.382c-.329.604-.493 1.306-.493 2.106 0 .714.143 1.371.428 1.975.285.593.73 1.07 1.332 1.432.604.351 1.355.526 2.255.526.649 0 1.204-.062 1.668-.185l.044-.012.135-.04c.409-.122.736-.263.984-.421l-.542-1.267c-.2.108-.415.199-.642.274l-.297.087c-.34.088-.773.131-1.3.131-.636 0-1.135-.147-1.497-.444a1.573 1.573 0 0 1-.192-.193c-.244-.294-.415-.705-.512-1.234l-.004-.021h5.43zm-5.427-1.256-.003.022h3.752v-.138c-.007-.485-.104-.857-.288-1.118a1.056 1.056 0 0 0-.156-.176c-.307-.285-.746-.428-1.316-.428-.657 0-1.155.202-1.494.604-.253.3-.417.712-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81c-.68 0-1.311-.16-1.893-.478a3.795 3.795 0 0 1-1.381-1.382c-.34-.604-.51-1.306-.51-2.106 0-.79.147-1.482.444-2.074a3.364 3.364 0 0 1 1.3-1.382c.559-.33 1.217-.494 1.974-.494a3.293 3.293 0 0 1 1.234.231 3.341 3.341 0 0 1 .97.575c.264.22.44.439.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332c-.186.395-.526.746-1.02 1.053a3.167 3.167 0 0 1-1.662.444zm.296-1.482c.626 0 1.152-.214 1.58-.642.428-.44.642-1.01.642-1.711v-.115c0-.472-.098-.894-.296-1.267a2.211 2.211 0 0 0-.807-.872 2.098 2.098 0 0 0-1.119-.313c-.702 0-1.245.231-1.629.692-.384.45-.575 1.037-.575 1.76 0 .736.186 1.333.559 1.795.384.45.933.675 1.645.675zm6.521-6.237h1.711v1.4c.604-1.065 1.547-1.597 2.83-1.597 1.064 0 1.926.34 2.584 1.02.659.67.988 1.641.988 2.914 0 .79-.164 1.487-.493 2.09a3.456 3.456 0 0 1-1.316 1.399 3.51 3.51 0 0 1-1.844.493c-.636 0-1.19-.11-1.662-.329a2.665 2.665 0 0 1-1.086-.97l.017 5.134h-1.728V9.242zm4.048 6.22c.714 0 1.262-.224 1.645-.674.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.395 0-.768.098-1.12.296-.34.187-.613.46-.822.823-.197.351-.296.763-.296 1.234v.115c0 .472.098.894.296 1.267.209.362.483.647.823.855.34.197.713.297 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.159 1.159 0 0 1-.856-.346 1.165 1.165 0 0 1-.346-.856 1.053 1.053 0 0 1 .346-.79c.23-.219.516-.329.856-.329.329 0 .609.11.839.33a1.053 1.053 0 0 1 .345.79 1.159 1.159 0 0 1-.345.855c-.22.23-.5.346-.84.346zm7.875 9.133a3.167 3.167 0 0 1-1.662-.444c-.482-.307-.817-.658-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283c.186-.438.548-.812 1.086-1.119a3.486 3.486 0 0 1 1.778-.477c.746 0 1.393.17 1.942.51a3.235 3.235 0 0 1 1.283 1.4c.297.592.444 1.282.444 2.072 0 .8-.175 1.498-.526 2.09a3.52 3.52 0 0 1-1.382 1.366 3.785 3.785 0 0 1-1.876.477zm-.296-1.481c.713 0 1.26-.225 1.645-.675.384-.46.577-1.053.577-1.778 0-.734-.193-1.327-.577-1.776-.373-.46-.921-.692-1.645-.692a2.115 2.115 0 0 0-1.58.659c-.428.428-.642.992-.642 1.694v.115c0 .473.098.895.296 1.267a2.385 2.385 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481c.176-.505.46-.91.856-1.217a2.14 2.14 0 0 1 1.349-.46c.351 0 .593.032.724.098l-.247 1.794c-.099-.066-.313-.099-.642-.099-.516 0-.988.164-1.416.494-.417.329-.626.855-.626 1.58v3.883h-1.777V9.242zm9.534 7.718c-.9 0-1.651-.175-2.255-.526-.603-.362-1.047-.84-1.332-1.432a4.567 4.567 0 0 1-.428-1.975c0-.8.164-1.502.493-2.106a3.462 3.462 0 0 1 1.4-1.382c.592-.33 1.262-.494 2.007-.494 1.163 0 2.024.324 2.584.97.57.637.856 1.537.856 2.7 0 .296-.017.603-.05.92h-5.43c.12.67.356 1.153.708 1.45.362.296.86.443 1.497.443.526 0 .96-.044 1.3-.131a4.123 4.123 0 0 0 .938-.362l.542 1.267c-.274.175-.647.329-1.119.46-.472.132-1.042.197-1.711.197zm1.596-4.558c.01-.68-.137-1.158-.444-1.432-.307-.285-.746-.428-1.316-.428-1.152 0-1.815.62-1.991 1.86h3.752z'/%3E%3Cg fill-rule='evenodd' stroke-width='1.036'%3E%3Cpath fill='%23000' fill-opacity='.4' d='m8.166 16.146-.002.002a1.54 1.54 0 0 1-2.009 0l-.002-.002-.043-.034-.002-.002-.199-.162H4.377a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659H8.411l-.202.164zm-1.121-.905a.29.29 0 0 0 .113.023.286.286 0 0 0 .189-.07l.077-.063c.634-.508 4.672-3.743 4.672-7.575 0-2.55-2.215-4.625-4.938-4.625S2.221 5.006 2.221 7.556c0 3.225 2.86 6.027 4.144 7.137h.004l.04.038.484.4.077.063a.628.628 0 0 0 .074.047zm-2.52-.548a16.898 16.898 0 0 1-1.183-1.315C2.187 11.942.967 9.897.967 7.555c0-3.319 2.855-5.88 6.192-5.88 3.338 0 6.193 2.561 6.193 5.881 0 2.34-1.22 4.387-2.376 5.822a16.898 16.898 0 0 1-1.182 1.315h.15a1.912 1.912 0 0 1 1.914 1.914v1.84a1.912 1.912 0 0 1-1.914 1.914H4.377a1.912 1.912 0 0 1-1.914-1.914v-1.84a1.912 1.912 0 0 1 1.914-1.914zm3.82-6.935c0 .692-.55 1.222-1.187 1.222s-1.185-.529-1.185-1.222.548-1.222 1.185-1.222c.638 0 1.186.529 1.186 1.222zm-1.186 2.477c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477zm2.048 7.71H5.114v-.838h4.093z'/%3E%3Cpath fill='%23e1e3e9' d='M2.222 7.555c0-2.55 2.214-4.625 4.937-4.625 2.723 0 4.938 2.075 4.938 4.625 0 3.832-4.038 7.068-4.672 7.575l-.077.063a.286.286 0 0 1-.189.07.286.286 0 0 1-.188-.07l-.077-.063c-.634-.507-4.672-3.743-4.672-7.575zm4.937 2.68c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477z'/%3E%3Cpath fill='%23fff' d='M4.377 15.948a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659zm4.83 1.16H5.114v.838h4.093z'/%3E%3C/g%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.255 1.255 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.255 1.255 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5.11 5.11 0 0 1 .314-.787l.009-.016a4.623 4.623 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.548 4.548 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4.314.319.566.676.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.416 2.416 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.448 2.448 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675c.211.2.381.43.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.76 4.76 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.407 3.407 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.255 1.255 0 0 1 .689 1.004 4.73 4.73 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528 0 .343-.02.694-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.815 5.815 0 0 1-.548-2.512c0-.286.017-.567.053-.843a1.255 1.255 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.778 4.778 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.47 4.47 0 0 1-1.935-.424 1.252 1.252 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.402 2.402 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.703 4.703 0 0 1-1.782 1.884 4.767 4.767 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.47 4.47 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a4.983 4.983 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.255 1.255 0 0 1-1.115.676h-.098a1.255 1.255 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15c.329-.237.574-.499.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267c-.088-.22-.264-.438-.526-.658l-.032-.028a3.16 3.16 0 0 0-.668-.428l-.27-.12a3.293 3.293 0 0 0-1.235-.23c-.757 0-1.415.163-1.974.493a3.36 3.36 0 0 0-1.3 1.382c-.297.593-.444 1.284-.444 2.074 0 .8.17 1.503.51 2.107a3.795 3.795 0 0 0 1.382 1.381 3.883 3.883 0 0 0 1.893.477c.53 0 1.015-.11 1.455-.33zm-2.789-5.38c-.384.45-.575 1.038-.575 1.762 0 .735.186 1.332.559 1.794.384.45.933.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.17 2.17 0 0 0 .468-.29l.178-.161a2.163 2.163 0 0 0 .397-.561c.163-.333.244-.717.244-1.15v-.115c0-.472-.098-.894-.296-1.267l-.043-.077a2.211 2.211 0 0 0-.633-.709l-.13-.086-.047-.028a2.099 2.099 0 0 0-1.073-.285c-.702 0-1.244.231-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.958.958 0 0 0-.353-.389.851.851 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.626 2.626 0 0 0 .331.423c.213.22.464.402.755.548l.173.074c.433.17.93.255 1.49.255.68 0 1.295-.165 1.844-.493a3.447 3.447 0 0 0 1.316-1.4c.329-.603.493-1.299.493-2.089 0-1.273-.33-2.243-.988-2.913-.658-.68-1.52-1.02-2.584-1.02-.598 0-1.124.115-1.575.347a2.807 2.807 0 0 0-.415.262l-.199.166a3.35 3.35 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138c.137.193.297.36.48.5l.155.11.053.034c.34.197.713.297 1.119.297.714 0 1.262-.225 1.645-.675.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.29 0-.569.053-.835.16a2.366 2.366 0 0 0-.284.136 1.99 1.99 0 0 0-.363.254 2.237 2.237 0 0 0-.46.569l-.082.162a2.56 2.56 0 0 0-.213 1.072v.115c0 .471.098.894.296 1.267l.135.211zm.964-.818a1.11 1.11 0 0 0 .367.385.937.937 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a.995.995 0 0 0-.503.135l-.012.007a.859.859 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.43 1.43 0 0 0 .14.66zm15.7-6.222c.232-.23.346-.516.346-.856a1.053 1.053 0 0 0-.345-.79 1.175 1.175 0 0 0-.84-.329c-.34 0-.625.11-.855.33a1.053 1.053 0 0 0-.346.79c0 .34.115.625.346.855.23.23.516.346.856.346.34 0 .62-.115.839-.346zm4.337 9.314.033-1.332c.128.269.324.518.59.747l.098.081a3.727 3.727 0 0 0 .316.224l.223.122a3.21 3.21 0 0 0 1.44.322 3.785 3.785 0 0 0 1.875-.477 3.52 3.52 0 0 0 1.382-1.366c.352-.593.526-1.29.526-2.09 0-.79-.147-1.48-.444-2.073a3.235 3.235 0 0 0-1.283-1.399c-.549-.34-1.195-.51-1.942-.51a3.476 3.476 0 0 0-1.527.344l-.086.043-.165.09a3.412 3.412 0 0 0-.33.214c-.288.21-.507.446-.656.707a1.893 1.893 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.482 2.482 0 0 0 .566.7c.078.065.159.125.245.18l.144.08a2.105 2.105 0 0 0 .975.232c.713 0 1.262-.225 1.645-.675.384-.46.576-1.053.576-1.778 0-.734-.192-1.327-.576-1.777-.373-.46-.921-.692-1.645-.692a2.18 2.18 0 0 0-1.015.235c-.147.075-.285.17-.415.282l-.15.142a2.086 2.086 0 0 0-.42.594c-.149.32-.223.685-.223 1.1v.115c0 .47.097.89.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.868.868 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.13 1.13 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013c.23-.087.472-.134.724-.14l.069-.002c.329 0 .542.033.642.099l.247-1.794c-.13-.066-.37-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2.086 2.086 0 0 0-.411.148 2.18 2.18 0 0 0-.4.249 2.482 2.482 0 0 0-.485.499 2.659 2.659 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884c0-.364.053-.678.159-.943a1.49 1.49 0 0 1 .466-.636 2.52 2.52 0 0 1 .399-.253 2.19 2.19 0 0 1 .224-.099zm9.784 2.656.05-.922c0-1.162-.285-2.062-.856-2.698-.559-.647-1.42-.97-2.584-.97-.746 0-1.415.163-2.007.493a3.462 3.462 0 0 0-1.4 1.382c-.329.604-.493 1.306-.493 2.106 0 .714.143 1.371.428 1.975.285.593.73 1.07 1.332 1.432.604.351 1.355.526 2.255.526.649 0 1.204-.062 1.668-.185l.044-.012.135-.04c.409-.122.736-.263.984-.421l-.542-1.267c-.2.108-.415.199-.642.274l-.297.087c-.34.088-.773.131-1.3.131-.636 0-1.135-.147-1.497-.444a1.573 1.573 0 0 1-.192-.193c-.244-.294-.415-.705-.512-1.234l-.004-.021h5.43zm-5.427-1.256-.003.022h3.752v-.138c-.007-.485-.104-.857-.288-1.118a1.056 1.056 0 0 0-.156-.176c-.307-.285-.746-.428-1.316-.428-.657 0-1.155.202-1.494.604-.253.3-.417.712-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81c-.68 0-1.311-.16-1.893-.478a3.795 3.795 0 0 1-1.381-1.382c-.34-.604-.51-1.306-.51-2.106 0-.79.147-1.482.444-2.074a3.364 3.364 0 0 1 1.3-1.382c.559-.33 1.217-.494 1.974-.494a3.293 3.293 0 0 1 1.234.231 3.341 3.341 0 0 1 .97.575c.264.22.44.439.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332c-.186.395-.526.746-1.02 1.053a3.167 3.167 0 0 1-1.662.444zm.296-1.482c.626 0 1.152-.214 1.58-.642.428-.44.642-1.01.642-1.711v-.115c0-.472-.098-.894-.296-1.267a2.211 2.211 0 0 0-.807-.872 2.098 2.098 0 0 0-1.119-.313c-.702 0-1.245.231-1.629.692-.384.45-.575 1.037-.575 1.76 0 .736.186 1.333.559 1.795.384.45.933.675 1.645.675zm6.521-6.237h1.711v1.4c.604-1.065 1.547-1.597 2.83-1.597 1.064 0 1.926.34 2.584 1.02.659.67.988 1.641.988 2.914 0 .79-.164 1.487-.493 2.09a3.456 3.456 0 0 1-1.316 1.399 3.51 3.51 0 0 1-1.844.493c-.636 0-1.19-.11-1.662-.329a2.665 2.665 0 0 1-1.086-.97l.017 5.134h-1.728V9.242zm4.048 6.22c.714 0 1.262-.224 1.645-.674.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.395 0-.768.098-1.12.296-.34.187-.613.46-.822.823-.197.351-.296.763-.296 1.234v.115c0 .472.098.894.296 1.267.209.362.483.647.823.855.34.197.713.297 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.159 1.159 0 0 1-.856-.346 1.165 1.165 0 0 1-.346-.856 1.053 1.053 0 0 1 .346-.79c.23-.219.516-.329.856-.329.329 0 .609.11.839.33a1.053 1.053 0 0 1 .345.79 1.159 1.159 0 0 1-.345.855c-.22.23-.5.346-.84.346zm7.875 9.133a3.167 3.167 0 0 1-1.662-.444c-.482-.307-.817-.658-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283c.186-.438.548-.812 1.086-1.119a3.486 3.486 0 0 1 1.778-.477c.746 0 1.393.17 1.942.51a3.235 3.235 0 0 1 1.283 1.4c.297.592.444 1.282.444 2.072 0 .8-.175 1.498-.526 2.09a3.52 3.52 0 0 1-1.382 1.366 3.785 3.785 0 0 1-1.876.477zm-.296-1.481c.713 0 1.26-.225 1.645-.675.384-.46.577-1.053.577-1.778 0-.734-.193-1.327-.577-1.776-.373-.46-.921-.692-1.645-.692a2.115 2.115 0 0 0-1.58.659c-.428.428-.642.992-.642 1.694v.115c0 .473.098.895.296 1.267a2.385 2.385 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481c.176-.505.46-.91.856-1.217a2.14 2.14 0 0 1 1.349-.46c.351 0 .593.032.724.098l-.247 1.794c-.099-.066-.313-.099-.642-.099-.516 0-.988.164-1.416.494-.417.329-.626.855-.626 1.58v3.883h-1.777V9.242zm9.534 7.718c-.9 0-1.651-.175-2.255-.526-.603-.362-1.047-.84-1.332-1.432a4.567 4.567 0 0 1-.428-1.975c0-.8.164-1.502.493-2.106a3.462 3.462 0 0 1 1.4-1.382c.592-.33 1.262-.494 2.007-.494 1.163 0 2.024.324 2.584.97.57.637.856 1.537.856 2.7 0 .296-.017.603-.05.92h-5.43c.12.67.356 1.153.708 1.45.362.296.86.443 1.497.443.526 0 .96-.044 1.3-.131a4.123 4.123 0 0 0 .938-.362l.542 1.267c-.274.175-.647.329-1.119.46-.472.132-1.042.197-1.711.197zm1.596-4.558c.01-.68-.137-1.158-.444-1.432-.307-.285-.746-.428-1.316-.428-1.152 0-1.815.62-1.991 1.86h3.752z'/%3E%3Cg fill-rule='evenodd' stroke-width='1.036'%3E%3Cpath fill='%23000' fill-opacity='.4' d='m8.166 16.146-.002.002a1.54 1.54 0 0 1-2.009 0l-.002-.002-.043-.034-.002-.002-.199-.162H4.377a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659H8.411l-.202.164zm-1.121-.905a.29.29 0 0 0 .113.023.286.286 0 0 0 .189-.07l.077-.063c.634-.508 4.672-3.743 4.672-7.575 0-2.55-2.215-4.625-4.938-4.625S2.221 5.006 2.221 7.556c0 3.225 2.86 6.027 4.144 7.137h.004l.04.038.484.4.077.063a.628.628 0 0 0 .074.047zm-2.52-.548a16.898 16.898 0 0 1-1.183-1.315C2.187 11.942.967 9.897.967 7.555c0-3.319 2.855-5.88 6.192-5.88 3.338 0 6.193 2.561 6.193 5.881 0 2.34-1.22 4.387-2.376 5.822a16.898 16.898 0 0 1-1.182 1.315h.15a1.912 1.912 0 0 1 1.914 1.914v1.84a1.912 1.912 0 0 1-1.914 1.914H4.377a1.912 1.912 0 0 1-1.914-1.914v-1.84a1.912 1.912 0 0 1 1.914-1.914zm3.82-6.935c0 .692-.55 1.222-1.187 1.222s-1.185-.529-1.185-1.222.548-1.222 1.185-1.222c.638 0 1.186.529 1.186 1.222zm-1.186 2.477c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477zm2.048 7.71H5.114v-.838h4.093z'/%3E%3Cpath fill='%23e1e3e9' d='M2.222 7.555c0-2.55 2.214-4.625 4.937-4.625 2.723 0 4.938 2.075 4.938 4.625 0 3.832-4.038 7.068-4.672 7.575l-.077.063a.286.286 0 0 1-.189.07.286.286 0 0 1-.188-.07l-.077-.063c-.634-.507-4.672-3.743-4.672-7.575zm4.937 2.68c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477z'/%3E%3Cpath fill='%23fff' d='M4.377 15.948a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659zm4.83 1.16H5.114v.838h4.093z'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;top:0;right:0;bottom:0;left:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999} diff --git a/docs/assets/index-83eeea77.js b/docs/assets/index-83eeea77.js deleted file mode 100644 index 55c4151..0000000 --- a/docs/assets/index-83eeea77.js +++ /dev/null @@ -1,580 +0,0 @@ -(function(){const Ke=document.createElement("link").relList;if(Ke&&Ke.supports&&Ke.supports("modulepreload"))return;for(const ht of document.querySelectorAll('link[rel="modulepreload"]'))Ye(ht);new MutationObserver(ht=>{for(const jt of ht)if(jt.type==="childList")for(const Qi of jt.addedNodes)Qi.tagName==="LINK"&&Qi.rel==="modulepreload"&&Ye(Qi)}).observe(document,{childList:!0,subtree:!0});function Xe(ht){const jt={};return ht.integrity&&(jt.integrity=ht.integrity),ht.referrerPolicy&&(jt.referrerPolicy=ht.referrerPolicy),ht.crossOrigin==="use-credentials"?jt.credentials="include":ht.crossOrigin==="anonymous"?jt.credentials="omit":jt.credentials="same-origin",jt}function Ye(ht){if(ht.ep)return;ht.ep=!0;const jt=Xe(ht);fetch(ht.href,jt)}})();var Np=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $p(Je){return Je&&Je.__esModule&&Object.prototype.hasOwnProperty.call(Je,"default")?Je.default:Je}var eu={exports:{}};(function(Je,Ke){(function(Xe,Ye){Je.exports=Ye()})(Np,function(){var Xe,Ye,ht;function jt(h,vt){if(!Xe)Xe=vt;else if(!Ye)Ye=vt;else{var te="var sharedChunk = {}; ("+Xe+")(sharedChunk); ("+Ye+")(sharedChunk);",Kt={};Xe(Kt),ht=vt(Kt),typeof window<"u"&&(ht.workerUrl=window.URL.createObjectURL(new Blob([te],{type:"text/javascript"})))}}jt(["exports"],function(h){function vt(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var te=Kt;function Kt(i,e){this.x=i,this.y=e}Kt.prototype={clone:function(){return new Kt(this.x,this.y)},add:function(i){return this.clone()._add(i)},sub:function(i){return this.clone()._sub(i)},multByPoint:function(i){return this.clone()._multByPoint(i)},divByPoint:function(i){return this.clone()._divByPoint(i)},mult:function(i){return this.clone()._mult(i)},div:function(i){return this.clone()._div(i)},rotate:function(i){return this.clone()._rotate(i)},rotateAround:function(i,e){return this.clone()._rotateAround(i,e)},matMult:function(i){return this.clone()._matMult(i)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(i){return this.x===i.x&&this.y===i.y},dist:function(i){return Math.sqrt(this.distSqr(i))},distSqr:function(i){var e=i.x-this.x,r=i.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(i){return Math.atan2(this.y-i.y,this.x-i.x)},angleWith:function(i){return this.angleWithSep(i.x,i.y)},angleWithSep:function(i,e){return Math.atan2(this.x*e-this.y*i,this.x*i+this.y*e)},_matMult:function(i){var e=i[2]*this.x+i[3]*this.y;return this.x=i[0]*this.x+i[1]*this.y,this.y=e,this},_add:function(i){return this.x+=i.x,this.y+=i.y,this},_sub:function(i){return this.x-=i.x,this.y-=i.y,this},_mult:function(i){return this.x*=i,this.y*=i,this},_div:function(i){return this.x/=i,this.y/=i,this},_multByPoint:function(i){return this.x*=i.x,this.y*=i.y,this},_divByPoint:function(i){return this.x/=i.x,this.y/=i.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var i=this.y;return this.y=this.x,this.x=-i,this},_rotate:function(i){var e=Math.cos(i),r=Math.sin(i),s=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=s,this},_rotateAround:function(i,e){var r=Math.cos(i),s=Math.sin(i),l=e.y+s*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-s*(this.y-e.y),this.y=l,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Kt.convert=function(i){return i instanceof Kt?i:Array.isArray(i)?new Kt(i[0],i[1]):i};var Ae=vt(te),Li=er;function er(i,e,r,s){this.cx=3*i,this.bx=3*(r-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(s-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=e,this.p2x=r,this.p2y=s}er.prototype={sampleCurveX:function(i){return((this.ax*i+this.bx)*i+this.cx)*i},sampleCurveY:function(i){return((this.ay*i+this.by)*i+this.cy)*i},sampleCurveDerivativeX:function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},solveCurveX:function(i,e){if(e===void 0&&(e=1e-6),i<0)return 0;if(i>1)return 1;for(var r=i,s=0;s<8;s++){var l=this.sampleCurveX(r)-i;if(Math.abs(l)l?p=r:f=r,r=.5*(f-p)+p;return r},solve:function(i,e){return this.sampleCurveY(this.solveCurveX(i,e))}};var Cr=vt(Li);function Mr(i,e,r,s){const l=new Cr(i,e,r,s);return function(u){return l.solve(u)}}const pr=Mr(.25,.1,.25,1);function ot(i,e,r){return Math.min(r,Math.max(e,i))}function mi(i,e,r){const s=r-e,l=((i-e)%s+s)%s+e;return l===e?r:l}function _t(i,...e){for(const r of e)for(const s in r)i[s]=r[s];return i}let ji=1;function gi(i,e){i.forEach(r=>{e[r]&&(e[r]=e[r].bind(e))})}function Pr(i,e,r){const s={};for(const l in i)s[l]=e.call(r||this,i[l],l,i);return s}function cn(i,e,r){const s={};for(const l in i)e.call(r||this,i[l],l,i)&&(s[l]=i[l]);return s}function _i(i){return Array.isArray(i)?i.map(_i):typeof i=="object"&&i?Pr(i,_i):i}const jr={};function ti(i){jr[i]||(typeof console<"u"&&console.warn(i),jr[i]=!0)}function ct(i,e,r){return(r.y-i.y)*(e.x-i.x)>(e.y-i.y)*(r.x-i.x)}function na(i){let e=0;for(let r,s,l=0,u=i.length,p=u-1;lcancelAnimationFrame(e)}},getImageData(i,e=0){return this.getImageCanvasContext(i).getImageData(-e,-e,i.width+2*e,i.height+2*e)},getImageCanvasContext(i){const e=window.document.createElement("canvas"),r=e.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("failed to create canvas 2d context");return e.width=i.width,e.height=i.height,r.drawImage(i,0,0,i.width,i.height),r},resolveURL:i=>(hn||(hn=document.createElement("a")),hn.href=i,hn.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(Gr==null&&(Gr=matchMedia("(prefers-reduced-motion: reduce)")),Gr.matches)}},Bn={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};class kr extends Error{constructor(e,r,s,l){super(`AJAXError: ${r} (${e}): ${s}`),this.status=e,this.statusText=r,this.url=s,this.body=l}}const ci=Bi()?()=>self.worker&&self.worker.referrer:()=>(window.location.protocol==="blob:"?window.parent:window).location.href,Ri=i=>Bn.REGISTERED_PROTOCOLS[i.substring(0,i.indexOf("://"))];function Yt(i,e){const r=new AbortController,s=new Request(i.url,{method:i.method||"GET",body:i.body,credentials:i.credentials,headers:i.headers,referrer:ci(),signal:r.signal});let l=!1,u=!1;return i.type==="json"&&s.headers.set("Accept","application/json"),u||fetch(s).then(p=>p.ok?(f=>{(i.type==="arrayBuffer"||i.type==="image"?f.arrayBuffer():i.type==="json"?f.json():f.text()).then(g=>{u||(l=!0,e(null,g,f.headers.get("Cache-Control"),f.headers.get("Expires")))}).catch(g=>{u||e(new Error(g.message))})})(p):p.blob().then(f=>e(new kr(p.status,p.statusText,i.url,f)))).catch(p=>{p.code!==20&&e(new Error(p.message))}),{cancel:()=>{u=!0,l||r.abort()}}}const pn=function(i,e){if(/:\/\//.test(i.url)&&!/^https?:|^file:/.test(i.url)){if(Bi()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",i,e);if(!Bi())return(Ri(i.url)||Yt)(i,e)}if(!(/^file:/.test(r=i.url)||/^file:/.test(ci())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return Yt(i,e);if(Bi()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",i,e,void 0,!0)}var r;return function(s,l){const u=new XMLHttpRequest;u.open(s.method||"GET",s.url,!0),s.type!=="arrayBuffer"&&s.type!=="image"||(u.responseType="arraybuffer");for(const p in s.headers)u.setRequestHeader(p,s.headers[p]);return s.type==="json"&&(u.responseType="text",u.setRequestHeader("Accept","application/json")),u.withCredentials=s.credentials==="include",u.onerror=()=>{l(new Error(u.statusText))},u.onload=()=>{if((u.status>=200&&u.status<300||u.status===0)&&u.response!==null){let p=u.response;if(s.type==="json")try{p=JSON.parse(u.response)}catch(f){return l(f)}l(null,p,u.getResponseHeader("Cache-Control"),u.getResponseHeader("Expires"))}else{const p=new Blob([u.response],{type:u.getResponseHeader("Content-Type")});l(new kr(u.status,u.statusText,s.url,p))}},u.send(s.body),{cancel:()=>u.abort()}}(i,e)},dn=function(i,e){return pn(_t(i,{type:"arrayBuffer"}),e)};function Xr(i){if(!i||i.indexOf("://")<=0||i.indexOf("data:image/")===0||i.indexOf("blob:")===0)return!0;const e=new URL(i),r=window.location;return e.protocol===r.protocol&&e.host===r.host}function Dr(i,e,r){r[i]&&r[i].indexOf(e)!==-1||(r[i]=r[i]||[],r[i].push(e))}function mr(i,e,r){if(r&&r[i]){const s=r[i].indexOf(e);s!==-1&&r[i].splice(s,1)}}class gr{constructor(e,r={}){_t(this,r),this.type=e}}class Fi extends gr{constructor(e,r={}){super("error",_t({error:e},r))}}class fn{on(e,r){return this._listeners=this._listeners||{},Dr(e,r,this._listeners),this}off(e,r){return mr(e,r,this._listeners),mr(e,r,this._oneTimeListeners),this}once(e,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},Dr(e,r,this._oneTimeListeners),this):new Promise(s=>this.once(e,s))}fire(e,r){typeof e=="string"&&(e=new gr(e,r||{}));const s=e.type;if(this.listens(s)){e.target=this;const l=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const f of l)f.call(this,e);const u=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const f of u)mr(s,f,this._oneTimeListeners),f.call(this,e);const p=this._eventedParent;p&&(_t(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(e))}else e instanceof Fi&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,r){return this._eventedParent=e,this._eventedParentData=r,this}}var ie={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const Lr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Rn(i,e){const r={};for(const s in i)s!=="ref"&&(r[s]=i[s]);return Lr.forEach(s=>{s in e&&(r[s]=e[s])}),r}function pt(i,e){if(Array.isArray(i)){if(!Array.isArray(e)||i.length!==e.length)return!1;for(let r=0;r`:i.itemType.kind==="value"?"array":`array<${e}>`}return i.kind}const On=[Br,pe,qe,Ne,yi,yr,Vt,Jt(Ue),Zi,xr];function ir(i,e){if(e.kind==="error")return null;if(i.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!ir(i.itemType,e.itemType))&&(typeof i.N!="number"||i.N===e.N))return null}else{if(i.kind===e.kind)return null;if(i.kind==="value"){for(const r of On)if(!ir(r,e))return null}}return`Expected ${mt(i)} but found ${mt(e)} instead.`}function F(i,e){return e.some(r=>r.kind===i.kind)}function S(i,e){return e.some(r=>r==="null"?i===null:r==="array"?Array.isArray(i):r==="object"?i&&!Array.isArray(i)&&typeof i=="object":r===typeof i)}function A(i,e){return i.kind==="array"&&e.kind==="array"?i.itemType.kind===e.itemType.kind&&typeof i.N=="number":i.kind===e.kind}const z=.96422,V=.82521,N=4/29,X=6/29,j=3*X*X,$=X*X*X,H=Math.PI/180,ne=180/Math.PI;function ae(i){return(i%=360)<0&&(i+=360),i}function se([i,e,r,s]){let l,u;const p=Oe((.2225045*(i=De(i))+.7168786*(e=De(e))+.0606169*(r=De(r)))/1);i===e&&e===r?l=u=p:(l=Oe((.4360747*i+.3850649*e+.1430804*r)/z),u=Oe((.0139322*i+.0971045*e+.7141733*r)/V));const f=116*p-16;return[f<0?0:f,500*(l-p),200*(p-u),s]}function De(i){return i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Oe(i){return i>$?Math.pow(i,1/3):i/j+N}function Se([i,e,r,s]){let l=(i+16)/116,u=isNaN(e)?l:l+e/500,p=isNaN(r)?l:l-r/200;return l=1*Fe(l),u=z*Fe(u),p=V*Fe(p),[Pe(3.1338561*u-1.6168667*l-.4906146*p),Pe(-.9787684*u+1.9161415*l+.033454*p),Pe(.0719453*u-.2289914*l+1.4052427*p),s]}function Pe(i){return(i=i<=.00304?12.92*i:1.055*Math.pow(i,1/2.4)-.055)<0?0:i>1?1:i}function Fe(i){return i>X?i*i*i:j*(i-N)}function He(i){return parseInt(i.padEnd(2,i),16)/255}function je(i,e){return et(e?i/100:i,0,1)}function et(i,e,r){return Math.min(Math.max(e,i),r)}function dt(i){return!i.some(Number.isNaN)}const Lt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Re{constructor(e,r,s,l=1,u=!0){this.r=e,this.g=r,this.b=s,this.a=l,u||(this.r*=l,this.g*=l,this.b*=l,l||this.overwriteGetter("rgb",[e,r,s,l]))}static parse(e){if(e instanceof Re)return e;if(typeof e!="string")return;const r=function(s){if((s=s.toLowerCase())==="transparent")return[0,0,0,0];const l=Lt[s];if(l){const[p,f,g]=l;return[p/255,f/255,g/255,1]}if(s.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(s)){const p=s.length<6?1:2;let f=1;return[He(s.slice(f,f+=p)),He(s.slice(f,f+=p)),He(s.slice(f,f+=p)),He(s.slice(f,f+p)||"ff")]}if(s.startsWith("rgb")){const p=s.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(p){const[f,g,v,b,E,I,C,P,R,L,G,W]=p,q=[b||" ",C||" ",L].join("");if(q===" "||q===" /"||q===",,"||q===",,,"){const Y=[v,I,R].join(""),Q=Y==="%%%"?100:Y===""?255:0;if(Q){const re=[et(+g/Q,0,1),et(+E/Q,0,1),et(+P/Q,0,1),G?je(+G,W):1];if(dt(re))return re}}return}}const u=s.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(u){const[p,f,g,v,b,E,I,C,P]=u,R=[g||" ",b||" ",I].join("");if(R===" "||R===" /"||R===",,"||R===",,,"){const L=[+f,et(+v,0,100),et(+E,0,100),C?je(+C,P):1];if(dt(L))return function([G,W,q,Y]){function Q(re){const Te=(re+G/30)%12,Ie=W*Math.min(q,1-q);return q-Ie*Math.max(-1,Math.min(Te-3,9-Te,1))}return G=ae(G),W/=100,q/=100,[Q(0),Q(8),Q(4),Y]}(L)}}}(e);return r?new Re(...r,!1):void 0}get rgb(){const{r:e,g:r,b:s,a:l}=this,u=l||1/0;return this.overwriteGetter("rgb",[e/u,r/u,s/u,l])}get hcl(){return this.overwriteGetter("hcl",function(e){const[r,s,l,u]=se(e),p=Math.sqrt(s*s+l*l);return[Math.round(1e4*p)?ae(Math.atan2(l,s)*ne):NaN,p,r,u]}(this.rgb))}get lab(){return this.overwriteGetter("lab",se(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){const[e,r,s,l]=this.rgb;return`rgba(${[e,r,s].map(u=>Math.round(255*u)).join(",")},${l})`}}Re.black=new Re(0,0,0,1),Re.white=new Re(1,1,1,1),Re.transparent=new Re(0,0,0,0),Re.red=new Re(1,0,0,1);class Et{constructor(e,r,s){this.sensitivity=e?r?"variant":"case":r?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,r){return this.collator.compare(e,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Rr{constructor(e,r,s,l,u){this.text=e,this.image=r,this.scale=s,this.fontStack=l,this.textColor=u}}class Qt{constructor(e){this.sections=e}static fromString(e){return new Qt([new Rr(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof Qt?e:Qt.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}}class Ti{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Ti)return e;if(typeof e=="number")return new Ti([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Ti(e)}}toString(){return JSON.stringify(this.values)}}class Oi{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Oi({name:e,available:!1}):null}}function _n(i,e,r,s){return typeof i=="number"&&i>=0&&i<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[i,e,r,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[i,e,r,s]:[i,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function ls(i){if(i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"||i instanceof Re||i instanceof Et||i instanceof Qt||i instanceof Ti||i instanceof Oi)return!0;if(Array.isArray(i)){for(const e of i)if(!ls(e))return!1;return!0}if(typeof i=="object"){for(const e in i)if(!ls(i[e]))return!1;return!0}return!1}function Bt(i){if(i===null)return Br;if(typeof i=="string")return qe;if(typeof i=="boolean")return Ne;if(typeof i=="number")return pe;if(i instanceof Re)return yi;if(i instanceof Et)return _r;if(i instanceof Qt)return yr;if(i instanceof Ti)return Zi;if(i instanceof Oi)return xr;if(Array.isArray(i)){const e=i.length;let r;for(const s of i){const l=Bt(s);if(r){if(r===l)continue;r=Ue;break}r=l}return Jt(r||Ue,e)}return Vt}function Un(i){const e=typeof i;return i===null?"":e==="string"||e==="number"||e==="boolean"?String(i):i instanceof Re||i instanceof Qt||i instanceof Ti||i instanceof Oi?i.toString():JSON.stringify(i)}class Fr{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ls(e[1]))return r.error("invalid value");const s=e[1];let l=Bt(s);const u=r.expectedType;return l.kind!=="array"||l.N!==0||!u||u.kind!=="array"||typeof u.N=="number"&&u.N!==0||(l=u),new Fr(l,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Ct{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const cs={string:qe,number:pe,boolean:Ne,object:Vt};class Gi{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let s,l=1;const u=e[0];if(u==="array"){let f,g;if(e.length>2){const v=e[1];if(typeof v!="string"||!(v in cs)||v==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);f=cs[v],l++}else f=Ue;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error('The length argument to "array" must be a positive integer literal',2);g=e[2],l++}s=Jt(f,g)}else{if(!cs[u])throw new Error(`Types doesn't contain name = ${u}`);s=cs[u]}const p=[];for(;le.outputDefined())}}const oo={"to-boolean":Ne,"to-color":yi,"to-number":pe,"to-string":qe};class ei{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const s=e[0];if(!oo[s])throw new Error(`Can't parse ${s} as it is not part of the known types`);if((s==="to-boolean"||s==="to-string")&&e.length!==2)return r.error("Expected one argument.");const l=oo[s],u=[];for(let p=1;p4?`Invalid rbga value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:_n(r[0],r[1],r[2],r[3]),!s))return new Re(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new Ct(s||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}if(this.type.kind==="padding"){let r;for(const s of this.args){r=s.evaluate(e);const l=Ti.parse(r);if(l)return l}throw new Ct(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}if(this.type.kind==="number"){let r=null;for(const s of this.args){if(r=s.evaluate(e),r===null)return 0;const l=Number(r);if(!isNaN(l))return l}throw new Ct(`Could not convert ${JSON.stringify(r)} to number.`)}return this.type.kind==="formatted"?Qt.fromString(Un(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Oi.fromString(Un(this.args[0].evaluate(e))):Un(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}const sa=["Unknown","Point","LineString","Polygon"];class hs{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?sa[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let r=this._parseColorCache[e];return r||(r=this._parseColorCache[e]=Re.parse(e)),r}}class Or{constructor(e,r,s=[],l,u=new gn,p=[]){this.registry=e,this.path=s,this.key=s.map(f=>`[${f}]`).join(""),this.scope=u,this.errors=p,this.expectedType=l,this._isConstant=r}parse(e,r,s,l,u={}){return r?this.concat(r,s,l)._parse(e,u):this._parse(e,u)}_parse(e,r){function s(l,u,p){return p==="assert"?new Gi(u,[l]):p==="coerce"?new ei(u,[l]):l}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const l=e[0];if(typeof l!="string")return this.error(`Expression name must be a string, but found ${typeof l} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const u=this.registry[l];if(u){let p=u.parse(e,this);if(!p)return null;if(this.expectedType){const f=this.expectedType,g=p.type;if(f.kind!=="string"&&f.kind!=="number"&&f.kind!=="boolean"&&f.kind!=="object"&&f.kind!=="array"||g.kind!=="value")if(f.kind!=="color"&&f.kind!=="formatted"&&f.kind!=="resolvedImage"||g.kind!=="value"&&g.kind!=="string")if(f.kind!=="padding"||g.kind!=="value"&&g.kind!=="number"&&g.kind!=="array"){if(this.checkSubtype(f,g))return null}else p=s(p,f,r.typeAnnotation||"coerce");else p=s(p,f,r.typeAnnotation||"coerce");else p=s(p,f,r.typeAnnotation||"assert")}if(!(p instanceof Fr)&&p.type.kind!=="resolvedImage"&&this._isConstant(p)){const f=new hs;try{p=new Fr(p.type,p.evaluate(f))}catch(g){return this.error(g.message),null}}return p}return this.error(`Unknown expression "${l}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,r,s){const l=typeof e=="number"?this.path.concat(e):this.path,u=s?this.scope.concat(s):this.scope;return new Or(this.registry,this._isConstant,l,r||null,u,this.errors)}error(e,...r){const s=`${this.key}${r.map(l=>`[${l}]`).join("")}`;this.errors.push(new ii(s,e))}checkSubtype(e,r){const s=ir(e,r);return s&&this.error(s),s}}class st{constructor(e,r,s){this.type=_r,this.locale=s,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");const s=e[1];if(typeof s!="object"||Array.isArray(s))return r.error("Collator options argument must be an object.");const l=r.parse(s["case-sensitive"]!==void 0&&s["case-sensitive"],1,Ne);if(!l)return null;const u=r.parse(s["diacritic-sensitive"]!==void 0&&s["diacritic-sensitive"],1,Ne);if(!u)return null;let p=null;return s.locale&&(p=r.parse(s.locale,1,qe),!p)?null:new st(l,u,p)}evaluate(e){return new Et(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}const Ur=8192;function Vn(i,e){i[0]=Math.min(i[0],e[0]),i[1]=Math.min(i[1],e[1]),i[2]=Math.max(i[2],e[0]),i[3]=Math.max(i[3],e[1])}function us(i,e){return!(i[0]<=e[0]||i[2]>=e[2]||i[1]<=e[1]||i[3]>=e[3])}function lo(i,e){const r=(180+i[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i[1]*Math.PI/360)))/360,l=Math.pow(2,e.z);return[Math.round(r*l*Ur),Math.round(s*l*Ur)]}function co(i,e,r){const s=i[0]-e[0],l=i[1]-e[1],u=i[0]-r[0],p=i[1]-r[1];return s*p-u*l==0&&s*u<=0&&l*p<=0}function aa(i,e){let r=!1;for(let p=0,f=e.length;p(s=i)[1]!=(u=g[v+1])[1]>s[1]&&s[0]<(u[0]-l[0])*(s[1]-l[1])/(u[1]-l[1])+l[0]&&(r=!r)}}var s,l,u;return r}function ho(i,e){for(let r=0;r0&&f<0||p<0&&f>0}function dl(i,e,r){for(const v of r)for(let b=0;br[2]){const l=.5*s;let u=i[0]-r[0]>l?-s:r[0]-i[0]>l?s:0;u===0&&(u=i[0]-r[2]>l?-s:r[2]-i[0]>l?s:0),i[0]+=u}Vn(e,i)}function po(i,e,r,s){const l=Math.pow(2,s.z)*Ur,u=[s.x*Ur,s.y*Ur],p=[];for(const f of i)for(const g of f){const v=[g.x+u[0],g.y+u[1]];ha(v,e,r,l),p.push(v)}return p}function fo(i,e,r,s){const l=Math.pow(2,s.z)*Ur,u=[s.x*Ur,s.y*Ur],p=[];for(const g of i){const v=[];for(const b of g){const E=[b.x+u[0],b.y+u[1]];Vn(e,E),v.push(E)}p.push(v)}if(e[2]-e[0]<=l/2){(f=e)[0]=f[1]=1/0,f[2]=f[3]=-1/0;for(const g of p)for(const v of g)ha(v,e,r,l)}var f;return p}class vr{constructor(e,r){this.type=Ne,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ls(e[1])){const s=e[1];if(s.type==="FeatureCollection")for(let l=0;l!Array.isArray(v)||v.length===e.length-1);let g=null;for(const[v,b]of f){g=new Or(r.registry,ds,r.path,null,r.scope);const E=[];let I=!1;for(let C=1;C{return I=E,Array.isArray(I)?`(${I.map(mt).join(", ")})`:`(${mt(I.type)}...)`;var I}).join(" | "),b=[];for(let E=1;E{r=e?r&&ds(s):r&&s instanceof Fr}),!!r&&Nn(i)&&fs(i,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Nn(i){if(i instanceof Ui&&(i.name==="get"&&i.args.length===1||i.name==="feature-state"||i.name==="has"&&i.args.length===1||i.name==="properties"||i.name==="geometry-type"||i.name==="id"||/^filter-/.test(i.name))||i instanceof vr)return!1;let e=!0;return i.eachChild(r=>{e&&!Nn(r)&&(e=!1)}),e}function yn(i){if(i instanceof Ui&&i.name==="feature-state")return!1;let e=!0;return i.eachChild(r=>{e&&!yn(r)&&(e=!1)}),e}function fs(i,e){if(i instanceof Ui&&e.indexOf(i.name)>=0)return!1;let r=!0;return i.eachChild(s=>{r&&!fs(s,e)&&(r=!1)}),r}function ms(i,e){const r=i.length-1;let s,l,u=0,p=r,f=0;for(;u<=p;)if(f=Math.floor((u+p)/2),s=i[f],l=i[f+1],s<=e){if(f===r||ee))throw new Ct("Input is not a number.");p=f-1}return 0}class xn{constructor(e,r,s){this.type=e,this.input=r,this.labels=[],this.outputs=[];for(const[l,u]of s)this.labels.push(l),this.outputs.push(u)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");const s=r.parse(e[1],1,pe);if(!s)return null;const l=[];let u=null;r.expectedType&&r.expectedType.kind!=="value"&&(u=r.expectedType);for(let p=1;p=f)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',v);const E=r.parse(g,b,u);if(!E)return null;u=u||E.type,l.push([f,E])}return new xn(u,s,l)}evaluate(e){const r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(e);const l=this.input.evaluate(e);if(l<=r[0])return s[0].evaluate(e);const u=r.length;return l>=r[u-1]?s[u-1].evaluate(e):s[ms(r,l)].evaluate(e)}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function vn(i,e,r){return i+r*(e-i)}function gs(i,e,r){return i.map((s,l)=>vn(s,e[l],r))}const Ei={number:vn,color:function(i,e,r,s="rgb"){switch(s){case"rgb":{const[l,u,p,f]=gs(i.rgb,e.rgb,r);return new Re(l,u,p,f,!1)}case"hcl":{const[l,u,p,f]=i.hcl,[g,v,b,E]=e.hcl;let I,C;if(isNaN(l)||isNaN(g))isNaN(l)?isNaN(g)?I=NaN:(I=g,p!==1&&p!==0||(C=v)):(I=l,b!==1&&b!==0||(C=u));else{let W=g-l;g>l&&W>180?W-=360:g180&&(W+=360),I=l+r*W}const[P,R,L,G]=function([W,q,Y,Q]){return W=isNaN(W)?0:W*H,Se([Y,Math.cos(W)*q,Math.sin(W)*q,Q])}([I,C??vn(u,v,r),vn(p,b,r),vn(f,E,r)]);return new Re(P,R,L,G,!1)}case"lab":{const[l,u,p,f]=Se(gs(i.lab,e.lab,r));return new Re(l,u,p,f,!1)}}},array:gs,padding:function(i,e,r){return new Ti(gs(i.values,e.values,r))}};class Si{constructor(e,r,s,l,u){this.type=e,this.operator=r,this.interpolation=s,this.input=l,this.labels=[],this.outputs=[];for(const[p,f]of u)this.labels.push(p),this.outputs.push(f)}static interpolationFactor(e,r,s,l){let u=0;if(e.name==="exponential")u=ua(r,e.base,s,l);else if(e.name==="linear")u=ua(r,1,s,l);else if(e.name==="cubic-bezier"){const p=e.controlPoints;u=new Cr(p[0],p[1],p[2],p[3]).solve(ua(r,1,s,l))}return u}static parse(e,r){let[s,l,u,...p]=e;if(!Array.isArray(l)||l.length===0)return r.error("Expected an interpolation type expression.",1);if(l[0]==="linear")l={name:"linear"};else if(l[0]==="exponential"){const v=l[1];if(typeof v!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);l={name:"exponential",base:v}}else{if(l[0]!=="cubic-bezier")return r.error(`Unknown interpolation type ${String(l[0])}`,1,0);{const v=l.slice(1);if(v.length!==4||v.some(b=>typeof b!="number"||b<0||b>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);l={name:"cubic-bezier",controlPoints:v}}}if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(u=r.parse(u,2,pe),!u)return null;const f=[];let g=null;s==="interpolate-hcl"||s==="interpolate-lab"?g=yi:r.expectedType&&r.expectedType.kind!=="value"&&(g=r.expectedType);for(let v=0;v=b)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',I);const P=r.parse(E,C,g);if(!P)return null;g=g||P.type,f.push([b,P])}return A(g,pe)||A(g,yi)||A(g,Zi)||A(g,Jt(pe))?new Si(g,s,l,u,f):r.error(`Type ${mt(g)} is not interpolatable.`)}evaluate(e){const r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(e);const l=this.input.evaluate(e);if(l<=r[0])return s[0].evaluate(e);const u=r.length;if(l>=r[u-1])return s[u-1].evaluate(e);const p=ms(r,l),f=Si.interpolationFactor(this.interpolation,l,r[p],r[p+1]),g=s[p].evaluate(e),v=s[p+1].evaluate(e);switch(this.operator){case"interpolate":return Ei[this.type.kind](g,v,f);case"interpolate-hcl":return Ei.color(g,v,f,"hcl");case"interpolate-lab":return Ei.color(g,v,f,"lab")}}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function ua(i,e,r,s){const l=s-r,u=i-r;return l===0?0:e===1?u/l:(Math.pow(e,u)-1)/(Math.pow(e,l)-1)}class _s{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expectected at least one argument.");let s=null;const l=r.expectedType;l&&l.kind!=="value"&&(s=l);const u=[];for(const f of e.slice(1)){const g=r.parse(f,1+u.length,s,void 0,{typeAnnotation:"omit"});if(!g)return null;s=s||g.type,u.push(g)}if(!s)throw new Error("No output type");const p=l&&u.some(f=>ir(l,f.type));return new _s(p?Ue:s,u)}evaluate(e){let r,s=null,l=0;for(const u of this.args)if(l++,s=u.evaluate(e),s&&s instanceof Oi&&!s.available&&(r||(r=s.name),s=null,l===this.args.length&&(s=r)),s!==null)break;return s}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}class ys{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const s=[];for(let u=1;u=s.length)throw new Ct(`Array index out of bounds: ${r} > ${s.length-1}.`);if(r!==Math.floor(r))throw new Ct(`Array index must be an integer, but found ${r} instead.`);return s[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class $n{constructor(e,r){this.type=Ne,this.needle=e,this.haystack=r}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=r.parse(e[1],1,Ue),l=r.parse(e[2],2,Ue);return s&&l?F(s.type,[Ne,qe,pe,Br,Ue])?new $n(s,l):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(s.type)} instead`):null}evaluate(e){const r=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!s)return!1;if(!S(r,["boolean","string","number","null"]))throw new Ct(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Bt(r))} instead.`);if(!S(s,["string","array"]))throw new Ct(`Expected second argument to be of type array or string, but found ${mt(Bt(s))} instead.`);return s.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class Yr{constructor(e,r,s){this.type=pe,this.needle=e,this.haystack=r,this.fromIndex=s}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=r.parse(e[1],1,Ue),l=r.parse(e[2],2,Ue);if(!s||!l)return null;if(!F(s.type,[Ne,qe,pe,Br,Ue]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(s.type)} instead`);if(e.length===4){const u=r.parse(e[3],3,pe);return u?new Yr(s,l,u):null}return new Yr(s,l)}evaluate(e){const r=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!S(r,["boolean","string","number","null"]))throw new Ct(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Bt(r))} instead.`);if(!S(s,["string","array"]))throw new Ct(`Expected second argument to be of type array or string, but found ${mt(Bt(s))} instead.`);if(this.fromIndex){const l=this.fromIndex.evaluate(e);return s.indexOf(r,l)}return s.indexOf(r)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class tt{constructor(e,r,s,l,u,p){this.inputType=e,this.type=r,this.input=s,this.cases=l,this.outputs=u,this.otherwise=p}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let s,l;r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);const u={},p=[];for(let v=2;vNumber.MAX_SAFE_INTEGER)return I.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof P=="number"&&Math.floor(P)!==P)return I.error("Numeric branch labels must be integer values.");if(s){if(I.checkSubtype(s,Bt(P)))return null}else s=Bt(P);if(u[String(P)]!==void 0)return I.error("Branch labels must be unique.");u[String(P)]=p.length}const C=r.parse(E,v,l);if(!C)return null;l=l||C.type,p.push(C)}const f=r.parse(e[1],1,Ue);if(!f)return null;const g=r.parse(e[e.length-1],e.length-1,l);return g?f.type.kind!=="value"&&r.concat(1).checkSubtype(s,f.type)?null:new tt(s,l,f,u,p,g):null}evaluate(e){const r=this.input.evaluate(e);return(Bt(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class da{constructor(e,r,s){this.type=e,this.branches=r,this.otherwise=s}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let s;r.expectedType&&r.expectedType.kind!=="value"&&(s=r.expectedType);const l=[];for(let p=1;pr.outputDefined())&&this.otherwise.outputDefined()}}class xs{constructor(e,r,s,l){this.type=e,this.input=r,this.beginIndex=s,this.endIndex=l}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=r.parse(e[1],1,Ue),l=r.parse(e[2],2,pe);if(!s||!l)return null;if(!F(s.type,[Jt(Ue),qe,Ue]))return r.error(`Expected first argument to be of type array or string, but found ${mt(s.type)} instead`);if(e.length===4){const u=r.parse(e[3],3,pe);return u?new xs(s.type,s,l,u):null}return new xs(s.type,s,l)}evaluate(e){const r=this.input.evaluate(e),s=this.beginIndex.evaluate(e);if(!S(r,["string","array"]))throw new Ct(`Expected first argument to be of type array or string, but found ${mt(Bt(r))} instead.`);if(this.endIndex){const l=this.endIndex.evaluate(e);return r.slice(s,l)}return r.slice(s)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function mo(i,e){return i==="=="||i==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function go(i,e,r,s){return s.compare(e,r)===0}function bn(i,e,r){const s=i!=="=="&&i!=="!=";return class tu{constructor(u,p,f){this.type=Ne,this.lhs=u,this.rhs=p,this.collator=f,this.hasUntypedArgument=u.type.kind==="value"||p.type.kind==="value"}static parse(u,p){if(u.length!==3&&u.length!==4)return p.error("Expected two or three arguments.");const f=u[0];let g=p.parse(u[1],1,Ue);if(!g)return null;if(!mo(f,g.type))return p.concat(1).error(`"${f}" comparisons are not supported for type '${mt(g.type)}'.`);let v=p.parse(u[2],2,Ue);if(!v)return null;if(!mo(f,v.type))return p.concat(2).error(`"${f}" comparisons are not supported for type '${mt(v.type)}'.`);if(g.type.kind!==v.type.kind&&g.type.kind!=="value"&&v.type.kind!=="value")return p.error(`Cannot compare types '${mt(g.type)}' and '${mt(v.type)}'.`);s&&(g.type.kind==="value"&&v.type.kind!=="value"?g=new Gi(v.type,[g]):g.type.kind!=="value"&&v.type.kind==="value"&&(v=new Gi(g.type,[v])));let b=null;if(u.length===4){if(g.type.kind!=="string"&&v.type.kind!=="string"&&g.type.kind!=="value"&&v.type.kind!=="value")return p.error("Cannot use collator to compare non-string types.");if(b=p.parse(u[3],3,_r),!b)return null}return new tu(g,v,b)}evaluate(u){const p=this.lhs.evaluate(u),f=this.rhs.evaluate(u);if(s&&this.hasUntypedArgument){const g=Bt(p),v=Bt(f);if(g.kind!==v.kind||g.kind!=="string"&&g.kind!=="number")throw new Ct(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${g.kind}, ${v.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const g=Bt(p),v=Bt(f);if(g.kind!=="string"||v.kind!=="string")return e(u,p,f)}return this.collator?r(u,p,f,this.collator.evaluate(u)):e(u,p,f)}eachChild(u){u(this.lhs),u(this.rhs),this.collator&&u(this.collator)}outputDefined(){return!0}}}const ml=bn("==",function(i,e,r){return e===r},go),gl=bn("!=",function(i,e,r){return e!==r},function(i,e,r,s){return!go(0,e,r,s)}),_l=bn("<",function(i,e,r){return e",function(i,e,r){return e>r},function(i,e,r,s){return s.compare(e,r)>0}),xl=bn("<=",function(i,e,r){return e<=r},function(i,e,r,s){return s.compare(e,r)<=0}),vl=bn(">=",function(i,e,r){return e>=r},function(i,e,r,s){return s.compare(e,r)>=0});class fa{constructor(e,r,s,l,u){this.type=qe,this.number=e,this.locale=r,this.currency=s,this.minFractionDigits=l,this.maxFractionDigits=u}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");const s=r.parse(e[1],1,pe);if(!s)return null;const l=e[2];if(typeof l!="object"||Array.isArray(l))return r.error("NumberFormat options argument must be an object.");let u=null;if(l.locale&&(u=r.parse(l.locale,1,qe),!u))return null;let p=null;if(l.currency&&(p=r.parse(l.currency,1,qe),!p))return null;let f=null;if(l["min-fraction-digits"]&&(f=r.parse(l["min-fraction-digits"],1,pe),!f))return null;let g=null;return l["max-fraction-digits"]&&(g=r.parse(l["max-fraction-digits"],1,pe),!g)?null:new fa(s,u,p,f,g)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class vs{constructor(e){this.type=yr,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const s=e[1];if(!Array.isArray(s)&&typeof s=="object")return r.error("First argument must be an image or text section.");const l=[];let u=!1;for(let p=1;p<=e.length-1;++p){const f=e[p];if(u&&typeof f=="object"&&!Array.isArray(f)){u=!1;let g=null;if(f["font-scale"]&&(g=r.parse(f["font-scale"],1,pe),!g))return null;let v=null;if(f["text-font"]&&(v=r.parse(f["text-font"],1,Jt(qe)),!v))return null;let b=null;if(f["text-color"]&&(b=r.parse(f["text-color"],1,yi),!b))return null;const E=l[l.length-1];E.scale=g,E.font=v,E.textColor=b}else{const g=r.parse(e[p],1,Ue);if(!g)return null;const v=g.type.kind;if(v!=="string"&&v!=="value"&&v!=="null"&&v!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");u=!0,l.push({content:g,scale:null,font:null,textColor:null})}}return new vs(l)}evaluate(e){return new Qt(this.sections.map(r=>{const s=r.content.evaluate(e);return Bt(s)===xr?new Rr("",s,null,null,null):new Rr(Un(s),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null)}))}eachChild(e){for(const r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}outputDefined(){return!1}}class ma{constructor(e){this.type=xr,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");const s=r.parse(e[1],1,qe);return s?new ma(s):r.error("No image name provided.")}evaluate(e){const r=this.input.evaluate(e),s=Oi.fromString(r);return s&&e.availableImages&&(s.available=e.availableImages.indexOf(r)>-1),s}eachChild(e){e(this.input)}outputDefined(){return!1}}class ga{constructor(e){this.type=pe,this.input=e}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);const s=r.parse(e[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${mt(s.type)} instead.`):new ga(s):null}evaluate(e){const r=this.input.evaluate(e);if(typeof r=="string"||Array.isArray(r))return r.length;throw new Ct(`Expected value to be of type string or array, but found ${mt(Bt(r))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const wn={"==":ml,"!=":gl,">":yl,"<":_l,">=":vl,"<=":xl,array:Gi,at:pa,boolean:Gi,case:da,coalesce:_s,collator:st,format:vs,image:ma,in:$n,"index-of":Yr,interpolate:Si,"interpolate-hcl":Si,"interpolate-lab":Si,length:ga,let:ys,literal:Fr,match:tt,number:Gi,"number-format":fa,object:Gi,slice:xs,step:xn,string:Gi,"to-boolean":ei,"to-color":ei,"to-number":ei,"to-string":ei,var:ps,within:vr};function _o(i,[e,r,s,l]){e=e.evaluate(i),r=r.evaluate(i),s=s.evaluate(i);const u=l?l.evaluate(i):1,p=_n(e,r,s,u);if(p)throw new Ct(p);return new Re(e/255,r/255,s/255,u,!1)}function yo(i,e){return i in e}function _a(i,e){const r=e[i];return r===void 0?null:r}function Jr(i){return{type:i}}function xo(i){return{result:"success",value:i}}function Tn(i){return{result:"error",value:i}}function En(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function vo(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function ya(i){return!!i.expression&&i.expression.interpolated}function lt(i){return i instanceof Number?"number":i instanceof String?"string":i instanceof Boolean?"boolean":Array.isArray(i)?"array":i===null?"null":typeof i}function bs(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function bl(i){return i}function bo(i,e){const r=e.type==="color",s=i.stops&&typeof i.stops[0][0]=="object",l=s||!(s||i.property!==void 0),u=i.type||(ya(e)?"exponential":"interval");if(r||e.type==="padding"){const b=r?Re.parse:Ti.parse;(i=tr({},i)).stops&&(i.stops=i.stops.map(E=>[E[0],b(E[1])])),i.default=b(i.default?i.default:e.default)}if(i.colorSpace&&(p=i.colorSpace)!=="rgb"&&p!=="hcl"&&p!=="lab")throw new Error(`Unknown color space: "${i.colorSpace}"`);var p;let f,g,v;if(u==="exponential")f=wo;else if(u==="interval")f=xa;else if(u==="categorical"){f=wl,g=Object.create(null);for(const b of i.stops)g[b[0]]=b[1];v=typeof i.stops[0][0]}else{if(u!=="identity")throw new Error(`Unknown function type "${u}"`);f=Tl}if(s){const b={},E=[];for(let P=0;PP[0]),evaluate:({zoom:P},R)=>wo({stops:I,base:i.base},e,P).evaluate(P,R)}}if(l){const b=u==="exponential"?{name:"exponential",base:i.base!==void 0?i.base:1}:null;return{kind:"camera",interpolationType:b,interpolationFactor:Si.interpolationFactor.bind(void 0,b),zoomStops:i.stops.map(E=>E[0]),evaluate:({zoom:E})=>f(i,e,E,g,v)}}return{kind:"source",evaluate(b,E){const I=E&&E.properties?E.properties[i.property]:void 0;return I===void 0?qn(i.default,e.default):f(i,e,I,g,v)}}}function qn(i,e,r){return i!==void 0?i:e!==void 0?e:r!==void 0?r:void 0}function wl(i,e,r,s,l){return qn(typeof r===l?s[r]:void 0,i.default,e.default)}function xa(i,e,r){if(lt(r)!=="number")return qn(i.default,e.default);const s=i.stops.length;if(s===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[s-1][0])return i.stops[s-1][1];const l=ms(i.stops.map(u=>u[0]),r);return i.stops[l][1]}function wo(i,e,r){const s=i.base!==void 0?i.base:1;if(lt(r)!=="number")return qn(i.default,e.default);const l=i.stops.length;if(l===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[l-1][0])return i.stops[l-1][1];const u=ms(i.stops.map(b=>b[0]),r),p=function(b,E,I,C){const P=C-I,R=b-I;return P===0?0:E===1?R/P:(Math.pow(E,R)-1)/(Math.pow(E,P)-1)}(r,s,i.stops[u][0],i.stops[u+1][0]),f=i.stops[u][1],g=i.stops[u+1][1],v=Ei[e.type]||bl;return typeof f.evaluate=="function"?{evaluate(...b){const E=f.evaluate.apply(void 0,b),I=g.evaluate.apply(void 0,b);if(E!==void 0&&I!==void 0)return v(E,I,p,i.colorSpace)}}:v(f,g,p,i.colorSpace)}function Tl(i,e,r){switch(e.type){case"color":r=Re.parse(r);break;case"formatted":r=Qt.fromString(r.toString());break;case"resolvedImage":r=Oi.fromString(r.toString());break;case"padding":r=Ti.parse(r);break;default:lt(r)===e.type||e.type==="enum"&&e.values[r]||(r=void 0)}return qn(r,i.default,e.default)}Ui.register(wn,{error:[{kind:"error"},[qe],(i,[e])=>{throw new Ct(e.evaluate(i))}],typeof:[qe,[Ue],(i,[e])=>mt(Bt(e.evaluate(i)))],"to-rgba":[Jt(pe,4),[yi],(i,[e])=>{const[r,s,l,u]=e.evaluate(i).rgb;return[255*r,255*s,255*l,u]}],rgb:[yi,[pe,pe,pe],_o],rgba:[yi,[pe,pe,pe,pe],_o],has:{type:Ne,overloads:[[[qe],(i,[e])=>yo(e.evaluate(i),i.properties())],[[qe,Vt],(i,[e,r])=>yo(e.evaluate(i),r.evaluate(i))]]},get:{type:Ue,overloads:[[[qe],(i,[e])=>_a(e.evaluate(i),i.properties())],[[qe,Vt],(i,[e,r])=>_a(e.evaluate(i),r.evaluate(i))]]},"feature-state":[Ue,[qe],(i,[e])=>_a(e.evaluate(i),i.featureState||{})],properties:[Vt,[],i=>i.properties()],"geometry-type":[qe,[],i=>i.geometryType()],id:[Ue,[],i=>i.id()],zoom:[pe,[],i=>i.globals.zoom],"heatmap-density":[pe,[],i=>i.globals.heatmapDensity||0],"line-progress":[pe,[],i=>i.globals.lineProgress||0],accumulated:[Ue,[],i=>i.globals.accumulated===void 0?null:i.globals.accumulated],"+":[pe,Jr(pe),(i,e)=>{let r=0;for(const s of e)r+=s.evaluate(i);return r}],"*":[pe,Jr(pe),(i,e)=>{let r=1;for(const s of e)r*=s.evaluate(i);return r}],"-":{type:pe,overloads:[[[pe,pe],(i,[e,r])=>e.evaluate(i)-r.evaluate(i)],[[pe],(i,[e])=>-e.evaluate(i)]]},"/":[pe,[pe,pe],(i,[e,r])=>e.evaluate(i)/r.evaluate(i)],"%":[pe,[pe,pe],(i,[e,r])=>e.evaluate(i)%r.evaluate(i)],ln2:[pe,[],()=>Math.LN2],pi:[pe,[],()=>Math.PI],e:[pe,[],()=>Math.E],"^":[pe,[pe,pe],(i,[e,r])=>Math.pow(e.evaluate(i),r.evaluate(i))],sqrt:[pe,[pe],(i,[e])=>Math.sqrt(e.evaluate(i))],log10:[pe,[pe],(i,[e])=>Math.log(e.evaluate(i))/Math.LN10],ln:[pe,[pe],(i,[e])=>Math.log(e.evaluate(i))],log2:[pe,[pe],(i,[e])=>Math.log(e.evaluate(i))/Math.LN2],sin:[pe,[pe],(i,[e])=>Math.sin(e.evaluate(i))],cos:[pe,[pe],(i,[e])=>Math.cos(e.evaluate(i))],tan:[pe,[pe],(i,[e])=>Math.tan(e.evaluate(i))],asin:[pe,[pe],(i,[e])=>Math.asin(e.evaluate(i))],acos:[pe,[pe],(i,[e])=>Math.acos(e.evaluate(i))],atan:[pe,[pe],(i,[e])=>Math.atan(e.evaluate(i))],min:[pe,Jr(pe),(i,e)=>Math.min(...e.map(r=>r.evaluate(i)))],max:[pe,Jr(pe),(i,e)=>Math.max(...e.map(r=>r.evaluate(i)))],abs:[pe,[pe],(i,[e])=>Math.abs(e.evaluate(i))],round:[pe,[pe],(i,[e])=>{const r=e.evaluate(i);return r<0?-Math.round(-r):Math.round(r)}],floor:[pe,[pe],(i,[e])=>Math.floor(e.evaluate(i))],ceil:[pe,[pe],(i,[e])=>Math.ceil(e.evaluate(i))],"filter-==":[Ne,[qe,Ue],(i,[e,r])=>i.properties()[e.value]===r.value],"filter-id-==":[Ne,[Ue],(i,[e])=>i.id()===e.value],"filter-type-==":[Ne,[qe],(i,[e])=>i.geometryType()===e.value],"filter-<":[Ne,[qe,Ue],(i,[e,r])=>{const s=i.properties()[e.value],l=r.value;return typeof s==typeof l&&s{const r=i.id(),s=e.value;return typeof r==typeof s&&r":[Ne,[qe,Ue],(i,[e,r])=>{const s=i.properties()[e.value],l=r.value;return typeof s==typeof l&&s>l}],"filter-id->":[Ne,[Ue],(i,[e])=>{const r=i.id(),s=e.value;return typeof r==typeof s&&r>s}],"filter-<=":[Ne,[qe,Ue],(i,[e,r])=>{const s=i.properties()[e.value],l=r.value;return typeof s==typeof l&&s<=l}],"filter-id-<=":[Ne,[Ue],(i,[e])=>{const r=i.id(),s=e.value;return typeof r==typeof s&&r<=s}],"filter->=":[Ne,[qe,Ue],(i,[e,r])=>{const s=i.properties()[e.value],l=r.value;return typeof s==typeof l&&s>=l}],"filter-id->=":[Ne,[Ue],(i,[e])=>{const r=i.id(),s=e.value;return typeof r==typeof s&&r>=s}],"filter-has":[Ne,[Ue],(i,[e])=>e.value in i.properties()],"filter-has-id":[Ne,[],i=>i.id()!==null&&i.id()!==void 0],"filter-type-in":[Ne,[Jt(qe)],(i,[e])=>e.value.indexOf(i.geometryType())>=0],"filter-id-in":[Ne,[Jt(Ue)],(i,[e])=>e.value.indexOf(i.id())>=0],"filter-in-small":[Ne,[qe,Jt(Ue)],(i,[e,r])=>r.value.indexOf(i.properties()[e.value])>=0],"filter-in-large":[Ne,[qe,Jt(Ue)],(i,[e,r])=>function(s,l,u,p){for(;u<=p;){const f=u+p>>1;if(l[f]===s)return!0;l[f]>s?p=f-1:u=f+1}return!1}(i.properties()[e.value],r.value,0,r.value.length-1)],all:{type:Ne,overloads:[[[Ne,Ne],(i,[e,r])=>e.evaluate(i)&&r.evaluate(i)],[Jr(Ne),(i,e)=>{for(const r of e)if(!r.evaluate(i))return!1;return!0}]]},any:{type:Ne,overloads:[[[Ne,Ne],(i,[e,r])=>e.evaluate(i)||r.evaluate(i)],[Jr(Ne),(i,e)=>{for(const r of e)if(r.evaluate(i))return!0;return!1}]]},"!":[Ne,[Ne],(i,[e])=>!e.evaluate(i)],"is-supported-script":[Ne,[qe],(i,[e])=>{const r=i.globals&&i.globals.isSupportedScript;return!r||r(e.evaluate(i))}],upcase:[qe,[qe],(i,[e])=>e.evaluate(i).toUpperCase()],downcase:[qe,[qe],(i,[e])=>e.evaluate(i).toLowerCase()],concat:[qe,Jr(Ue),(i,e)=>e.map(r=>Un(r.evaluate(i))).join("")],"resolved-locale":[qe,[_r],(i,[e])=>e.evaluate(i).resolvedLocale()]});class va{constructor(e,r){var s;this.expression=e,this._warningHistory={},this._evaluator=new hs,this._defaultValue=r?(s=r).type==="color"&&bs(s.default)?new Re(0,0,0,0):s.type==="color"?Re.parse(s.default)||null:s.type==="padding"?Ti.parse(s.default)||null:s.default===void 0?null:s.default:null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(e,r,s,l,u,p){return this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=s,this._evaluator.canonical=l,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=p,this.expression.evaluate(this._evaluator)}evaluate(e,r,s,l,u,p){this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=s||null,this._evaluator.canonical=l,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=p||null;try{const f=this.expression.evaluate(this._evaluator);if(f==null||typeof f=="number"&&f!=f)return this._defaultValue;if(this._enumValues&&!(f in this._enumValues))throw new Ct(`Expected value to be one of ${Object.keys(this._enumValues).map(g=>JSON.stringify(g)).join(", ")}, but found ${JSON.stringify(f)} instead.`);return f}catch(f){return this._warningHistory[f.message]||(this._warningHistory[f.message]=!0,typeof console<"u"&&console.warn(f.message)),this._defaultValue}}}function ws(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in wn}function Tt(i,e){const r=new Or(wn,ds,[],e?function(l){const u={color:yi,string:qe,number:pe,enum:qe,boolean:Ne,formatted:yr,padding:Zi,resolvedImage:xr};return l.type==="array"?Jt(u[l.value]||Ue,l.length):u[l.type]}(e):void 0),s=r.parse(i,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return s?xo(new va(s,e)):Tn(r.errors)}class ba{constructor(e,r){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!yn(r.expression)}evaluateWithoutErrorHandling(e,r,s,l,u,p){return this._styleExpression.evaluateWithoutErrorHandling(e,r,s,l,u,p)}evaluate(e,r,s,l,u,p){return this._styleExpression.evaluate(e,r,s,l,u,p)}}class We{constructor(e,r,s,l){this.kind=e,this.zoomStops=s,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!yn(r.expression),this.interpolationType=l}evaluateWithoutErrorHandling(e,r,s,l,u,p){return this._styleExpression.evaluateWithoutErrorHandling(e,r,s,l,u,p)}evaluate(e,r,s,l,u,p){return this._styleExpression.evaluate(e,r,s,l,u,p)}interpolationFactor(e,r,s){return this.interpolationType?Si.interpolationFactor(this.interpolationType,e,r,s):0}}function Ts(i,e){const r=Tt(i,e);if(r.result==="error")return r;const s=r.value.expression,l=Nn(s);if(!l&&!En(e))return Tn([new ii("","data expressions not supported")]);const u=fs(s,["zoom"]);if(!u&&!vo(e))return Tn([new ii("","zoom expressions not supported")]);const p=ft(s);return p||u?p instanceof ii?Tn([p]):p instanceof Si&&!ya(e)?Tn([new ii("",'"interpolate" expressions cannot be used with this property')]):xo(p?new We(l?"camera":"composite",r.value,p.labels,p instanceof Si?p.interpolation:void 0):new ba(l?"constant":"source",r.value)):Tn([new ii("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class gt{constructor(e,r){this._parameters=e,this._specification=r,tr(this,bo(this._parameters,this._specification))}static deserialize(e){return new gt(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function ft(i){let e=null;if(i instanceof ys)e=ft(i.result);else if(i instanceof _s){for(const r of i.args)if(e=ft(r),e)break}else(i instanceof xn||i instanceof Si)&&i.input instanceof Ui&&i.input.name==="zoom"&&(e=i);return e instanceof ii||i.eachChild(r=>{const s=ft(r);s instanceof ii?e=s:!e&&s?e=new ii("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&s&&e!==s&&(e=new ii("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function Sn(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(const e of i.slice(1))if(!Sn(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}const To={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function wa(i){if(i==null)return{filter:()=>!0,needGeometry:!1};Sn(i)||(i=Es(i));const e=Tt(i,To);if(e.result==="error")throw new Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));return{filter:(r,s,l)=>e.value.evaluate(r,s,{},l),needGeometry:Eo(i)}}function El(i,e){return ie?1:0}function Eo(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(let e=1;e"||e==="<="||e===">="?Ss(i[1],i[2],e):e==="any"?(r=i.slice(1),["any"].concat(r.map(Es))):e==="all"?["all"].concat(i.slice(1).map(Es)):e==="none"?["all"].concat(i.slice(1).map(Es).map(jn)):e==="in"?Ta(i[1],i.slice(2)):e==="!in"?jn(Ta(i[1],i.slice(2))):e==="has"?Ea(i[1]):e==="!has"?jn(Ea(i[1])):e!=="within"||i;var r}function Ss(i,e,r){switch(i){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,i,e]}}function Ta(i,e){if(e.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",i,["literal",e.sort(El)]]:["filter-in-small",i,["literal",e]]}}function Ea(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function jn(i){return["!",i]}function Zn(i){const e=typeof i;if(e==="number"||e==="boolean"||e==="string"||i==null)return JSON.stringify(i);if(Array.isArray(i)){let l="[";for(const u of i)l+=`${Zn(u)},`;return`${l}]`}const r=Object.keys(i).sort();let s="{";for(let l=0;ls.maximum?[new de(e,r,`${r} is greater than the maximum value ${s.maximum}`)]:[]}function Ao(i){const e=i.valueSpec,r=Mt(i.value.type);let s,l,u,p={};const f=r!=="categorical"&&i.value.property===void 0,g=!f,v=lt(i.value.stops)==="array"&<(i.value.stops[0])==="array"&<(i.value.stops[0][0])==="object",b=Vi({key:i.key,value:i.value,valueSpec:i.styleSpec.function,validateSpec:i.validateSpec,style:i.style,styleSpec:i.styleSpec,objectElementValidators:{stops:function(C){if(r==="identity")return[new de(C.key,C.value,'identity function may not have a "stops" property')];let P=[];const R=C.value;return P=P.concat(Io({key:C.key,value:R,valueSpec:C.valueSpec,validateSpec:C.validateSpec,style:C.style,styleSpec:C.styleSpec,arrayElementValidator:E})),lt(R)==="array"&&R.length===0&&P.push(new de(C.key,R,"array must have at least one stop")),P},default:function(C){return C.validateSpec({key:C.key,value:C.value,valueSpec:e,validateSpec:C.validateSpec,style:C.style,styleSpec:C.styleSpec})}}});return r==="identity"&&f&&b.push(new de(i.key,i.value,'missing required property "property"')),r==="identity"||i.value.stops||b.push(new de(i.key,i.value,'missing required property "stops"')),r==="exponential"&&i.valueSpec.expression&&!ya(i.valueSpec)&&b.push(new de(i.key,i.value,"exponential functions not supported")),i.styleSpec.$version>=8&&(g&&!En(i.valueSpec)?b.push(new de(i.key,i.value,"property functions not supported")):f&&!vo(i.valueSpec)&&b.push(new de(i.key,i.value,"zoom functions not supported"))),r!=="categorical"&&!v||i.value.property!==void 0||b.push(new de(i.key,i.value,'"property" property is required')),b;function E(C){let P=[];const R=C.value,L=C.key;if(lt(R)!=="array")return[new de(L,R,`array expected, ${lt(R)} found`)];if(R.length!==2)return[new de(L,R,`array length 2 expected, length ${R.length} found`)];if(v){if(lt(R[0])!=="object")return[new de(L,R,`object expected, ${lt(R[0])} found`)];if(R[0].zoom===void 0)return[new de(L,R,"object stop key must have zoom")];if(R[0].value===void 0)return[new de(L,R,"object stop key must have value")];if(u&&u>Mt(R[0].zoom))return[new de(L,R[0].zoom,"stop zoom values must appear in ascending order")];Mt(R[0].zoom)!==u&&(u=Mt(R[0].zoom),l=void 0,p={}),P=P.concat(Vi({key:`${L}[0]`,value:R[0],valueSpec:{zoom:{}},validateSpec:C.validateSpec,style:C.style,styleSpec:C.styleSpec,objectElementValidators:{zoom:Sa,value:I}}))}else P=P.concat(I({key:`${L}[0]`,value:R[0],valueSpec:{},validateSpec:C.validateSpec,style:C.style,styleSpec:C.styleSpec},R));return ws(Qr(R[1]))?P.concat([new de(`${L}[1]`,R[1],"expressions are not allowed in function stops.")]):P.concat(C.validateSpec({key:`${L}[1]`,value:R[1],valueSpec:e,validateSpec:C.validateSpec,style:C.style,styleSpec:C.styleSpec}))}function I(C,P){const R=lt(C.value),L=Mt(C.value),G=C.value!==null?C.value:P;if(s){if(R!==s)return[new de(C.key,G,`${R} stop domain type must match previous stop domain type ${s}`)]}else s=R;if(R!=="number"&&R!=="string"&&R!=="boolean")return[new de(C.key,G,"stop domain value must be a number, string, or boolean")];if(R!=="number"&&r!=="categorical"){let W=`number expected, ${R} found`;return En(e)&&r===void 0&&(W+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new de(C.key,G,W)]}return r!=="categorical"||R!=="number"||isFinite(L)&&Math.floor(L)===L?r!=="categorical"&&R==="number"&&l!==void 0&&Lnew de(`${i.key}${s.key}`,i.value,s.message));const r=e.value.expression||e.value._styleExpression.expression;if(i.expressionContext==="property"&&i.propertyKey==="text-font"&&!r.outputDefined())return[new de(i.key,i.value,`Invalid data expression for "${i.propertyKey}". Output values must be contained as literals within the expression.`)];if(i.expressionContext==="property"&&i.propertyType==="layout"&&!yn(r))return[new de(i.key,i.value,'"feature-state" data expressions are not supported with layout properties.')];if(i.expressionContext==="filter"&&!yn(r))return[new de(i.key,i.value,'"feature-state" data expressions are not supported with filters.')];if(i.expressionContext&&i.expressionContext.indexOf("cluster")===0){if(!fs(r,["zoom","feature-state"]))return[new de(i.key,i.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(i.expressionContext==="cluster-initial"&&!Nn(r))return[new de(i.key,i.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Gn(i){const e=i.key,r=i.value,s=i.valueSpec,l=[];return Array.isArray(s.values)?s.values.indexOf(Mt(r))===-1&&l.push(new de(e,r,`expected one of [${s.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(s.values).indexOf(Mt(r))===-1&&l.push(new de(e,r,`expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(r)} found`)),l}function In(i){return Sn(Qr(i.value))?en(tr({},i,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Co(i)}function Co(i){const e=i.value,r=i.key;if(lt(e)!=="array")return[new de(r,e,`array expected, ${lt(e)} found`)];const s=i.styleSpec;let l,u=[];if(e.length<1)return[new de(r,e,"filter array must have at least 1 element")];switch(u=u.concat(Gn({key:`${r}[0]`,value:e[0],valueSpec:s.filter_operator,style:i.style,styleSpec:i.styleSpec})),Mt(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Mt(e[1])==="$type"&&u.push(new de(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&u.push(new de(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(l=lt(e[1]),l!=="string"&&u.push(new de(`${r}[1]`,e[1],`string expected, ${l} found`)));for(let p=2;p{v in r&&e.push(new de(s,r[v],`"${v}" is prohibited for ref layers`))}),l.layers.forEach(v=>{Mt(v.id)===f&&(g=v)}),g?g.ref?e.push(new de(s,r.ref,"ref cannot reference another ref layer")):p=Mt(g.type):e.push(new de(s,r.ref,`ref layer "${f}" not found`))}else if(p!=="background")if(r.source){const g=l.sources&&l.sources[r.source],v=g&&Mt(g.type);g?v==="vector"&&p==="raster"?e.push(new de(s,r.source,`layer "${r.id}" requires a raster source`)):v==="raster"&&p!=="raster"?e.push(new de(s,r.source,`layer "${r.id}" requires a vector source`)):v!=="vector"||r["source-layer"]?v==="raster-dem"&&p!=="hillshade"?e.push(new de(s,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):p!=="line"||!r.paint||!r.paint["line-gradient"]||v==="geojson"&&g.lineMetrics||e.push(new de(s,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new de(s,r,`layer "${r.id}" must specify a "source-layer"`)):e.push(new de(s,r.source,`source "${r.source}" not found`))}else e.push(new de(s,r,'missing required property "source"'));return e=e.concat(Vi({key:s,value:r,valueSpec:u.layer,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,objectElementValidators:{"*":()=>[],type:()=>i.validateSpec({key:`${s}.type`,value:r.type,valueSpec:u.layer.type,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,object:r,objectKey:"type"}),filter:In,layout:g=>Vi({layer:r,key:g.key,value:g.value,style:g.style,styleSpec:g.styleSpec,validateSpec:g.validateSpec,objectElementValidators:{"*":v=>Mo(tr({layerType:p},v))}}),paint:g=>Vi({layer:r,key:g.key,value:g.value,style:g.style,styleSpec:g.styleSpec,validateSpec:g.validateSpec,objectElementValidators:{"*":v=>Aa(tr({layerType:p},v))}})}})),e}function rr(i){const e=i.value,r=i.key,s=lt(e);return s!=="string"?[new de(r,e,`string expected, ${s} found`)]:[]}const As={promoteId:function({key:i,value:e}){if(lt(e)==="string")return rr({key:i,value:e});{const r=[];for(const s in e)r.push(...rr({key:`${i}.${s}`,value:e[s]}));return r}}};function Cs(i){const e=i.value,r=i.key,s=i.styleSpec,l=i.style,u=i.validateSpec;if(!e.type)return[new de(r,e,'"type" is required')];const p=Mt(e.type);let f;switch(p){case"vector":case"raster":case"raster-dem":return f=Vi({key:r,value:e,valueSpec:s[`source_${p.replace("-","_")}`],style:i.style,styleSpec:s,objectElementValidators:As,validateSpec:u}),f;case"geojson":if(f=Vi({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s,validateSpec:u,objectElementValidators:As}),e.cluster)for(const g in e.clusterProperties){const[v,b]=e.clusterProperties[g],E=typeof v=="string"?[v,["accumulated"],["get",g]]:v;f.push(...en({key:`${r}.${g}.map`,value:b,validateSpec:u,expressionContext:"cluster-map"})),f.push(...en({key:`${r}.${g}.reduce`,value:E,validateSpec:u,expressionContext:"cluster-reduce"}))}return f;case"video":return Vi({key:r,value:e,valueSpec:s.source_video,style:l,validateSpec:u,styleSpec:s});case"image":return Vi({key:r,value:e,valueSpec:s.source_image,style:l,validateSpec:u,styleSpec:s});case"canvas":return[new de(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Gn({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:l,validateSpec:u,styleSpec:s})}}function Po(i){const e=i.value,r=i.styleSpec,s=r.light,l=i.style;let u=[];const p=lt(e);if(e===void 0)return u;if(p!=="object")return u=u.concat([new de("light",e,`object expected, ${p} found`)]),u;for(const f in e){const g=f.match(/^(.*)-transition$/);u=u.concat(g&&s[g[1]]&&s[g[1]].transition?i.validateSpec({key:f,value:e[f],valueSpec:r.transition,validateSpec:i.validateSpec,style:l,styleSpec:r}):s[f]?i.validateSpec({key:f,value:e[f],valueSpec:s[f],validateSpec:i.validateSpec,style:l,styleSpec:r}):[new de(f,e[f],`unknown property "${f}"`)])}return u}function Xn(i){const e=i.value,r=i.styleSpec,s=r.terrain,l=i.style;let u=[];const p=lt(e);if(e===void 0)return u;if(p!=="object")return u=u.concat([new de("terrain",e,`object expected, ${p} found`)]),u;for(const f in e)u=u.concat(s[f]?i.validateSpec({key:f,value:e[f],valueSpec:s[f],validateSpec:i.validateSpec,style:l,styleSpec:r}):[new de(f,e[f],`unknown property "${f}"`)]);return u}function zo(i){let e=[];const r=i.value,s=i.key;if(Array.isArray(r)){const l=[],u=[];for(const p in r)r[p].id&&l.includes(r[p].id)&&e.push(new de(s,r,`all the sprites' ids must be unique, but ${r[p].id} is duplicated`)),l.push(r[p].id),r[p].url&&u.includes(r[p].url)&&e.push(new de(s,r,`all the sprites' URLs must be unique, but ${r[p].url} is duplicated`)),u.push(r[p].url),e=e.concat(Vi({key:`${s}[${p}]`,value:r[p],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:i.validateSpec}));return e}return rr({key:s,value:r})}const ko={"*":()=>[],array:Io,boolean:function(i){const e=i.value,r=i.key,s=lt(e);return s!=="boolean"?[new de(r,e,`boolean expected, ${s} found`)]:[]},number:Sa,color:function(i){const e=i.key,r=i.value,s=lt(r);return s!=="string"?[new de(e,r,`color expected, ${s} found`)]:Re.parse(String(r))?[]:[new de(e,r,`color expected, "${r}" found`)]},constants:So,enum:Gn,filter:In,function:Ao,layer:Is,object:Vi,source:Cs,light:Po,terrain:Xn,string:rr,formatted:function(i){return rr(i).length===0?[]:en(i)},resolvedImage:function(i){return rr(i).length===0?[]:en(i)},padding:function(i){const e=i.key,r=i.value;if(lt(r)==="array"){if(r.length<1||r.length>4)return[new de(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];const s={type:"number"};let l=[];for(let u=0;u[]}})),i.constants&&(r=r.concat(So({key:"constants",value:i.constants,style:i,styleSpec:e,validateSpec:Wn}))),Hn(r)}function Ni(i){return function(e){return i({...e,validateSpec:Wn})}}function Hn(i){return[].concat(i).sort((e,r)=>e.line-r.line)}function Rt(i){return function(...e){return Hn(i.apply(this,e))}}nr.source=Rt(Ni(Cs)),nr.sprite=Rt(Ni(zo)),nr.glyphs=Rt(Ni(Do)),nr.light=Rt(Ni(Po)),nr.terrain=Rt(Ni(Xn)),nr.layer=Rt(Ni(Is)),nr.filter=Rt(Ni(In)),nr.paintProperty=Rt(Ni(Aa)),nr.layoutProperty=Rt(Ni(Mo));const Vr=nr,Il=Vr.light,Al=Vr.paintProperty,Cl=Vr.layoutProperty;function An(i,e){let r=!1;if(e&&e.length)for(const s of e)i.fire(new Fi(new Error(s.message))),r=!0;return r}class Kn{constructor(e,r,s){const l=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;const p=new Int32Array(this.arrayBuffer);e=p[0],this.d=(r=p[1])+2*(s=p[2]);for(let g=0;g=E[P+0]&&l>=E[P+1])?(f[C]=!0,p.push(b[C])):f[C]=!1}}}}_forEachCell(e,r,s,l,u,p,f,g){const v=this._convertToCellCoord(e),b=this._convertToCellCoord(r),E=this._convertToCellCoord(s),I=this._convertToCellCoord(l);for(let C=v;C<=E;C++)for(let P=b;P<=I;P++){const R=this.d*P+C;if((!g||g(this._convertFromCellCoord(C),this._convertFromCellCoord(P),this._convertFromCellCoord(C+1),this._convertFromCellCoord(P+1)))&&u.call(this,e,r,s,l,R,p,f,g))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const e=this.cells,r=3+this.cells.length+1+1;let s=0;for(let p=0;p=0)continue;const p=i[u];l[u]=sr[s].shallow.indexOf(u)>=0?p:Yn(p,e)}i instanceof Error&&(l.message=i.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return s!=="Object"&&(l.$name=s),l}throw new Error("can't serialize object of type "+typeof i)}function br(i){if(i==null||typeof i=="boolean"||typeof i=="number"||typeof i=="string"||i instanceof Boolean||i instanceof Number||i instanceof String||i instanceof Date||i instanceof RegExp||i instanceof Blob||Ms(i)||Zr(i)||ArrayBuffer.isView(i)||i instanceof ImageData)return i;if(Array.isArray(i))return i.map(br);if(typeof i=="object"){const e=i.$name||"Object";if(!sr[e])throw new Error(`can't deserialize unregistered class ${e}`);const{klass:r}=sr[e];if(!r)throw new Error(`can't deserialize unregistered class ${e}`);if(r.deserialize)return r.deserialize(i);const s=Object.create(r.prototype);for(const l of Object.keys(i)){if(l==="$name")continue;const u=i[l];s[l]=sr[e].shallow.indexOf(l)>=0?u:br(u)}return s}throw new Error("can't deserialize object of type "+typeof i)}class Lo{constructor(){this.first=!0}update(e,r){const s=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=s,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=s,!0):(this.lastFloorZoom>s?(this.lastIntegerZoom=s+1,this.lastIntegerZoomTime=r):this.lastFloorZoomi>=128&&i<=255,Arabic:i=>i>=1536&&i<=1791,"Arabic Supplement":i=>i>=1872&&i<=1919,"Arabic Extended-A":i=>i>=2208&&i<=2303,"Hangul Jamo":i=>i>=4352&&i<=4607,"Unified Canadian Aboriginal Syllabics":i=>i>=5120&&i<=5759,Khmer:i=>i>=6016&&i<=6143,"Unified Canadian Aboriginal Syllabics Extended":i=>i>=6320&&i<=6399,"General Punctuation":i=>i>=8192&&i<=8303,"Letterlike Symbols":i=>i>=8448&&i<=8527,"Number Forms":i=>i>=8528&&i<=8591,"Miscellaneous Technical":i=>i>=8960&&i<=9215,"Control Pictures":i=>i>=9216&&i<=9279,"Optical Character Recognition":i=>i>=9280&&i<=9311,"Enclosed Alphanumerics":i=>i>=9312&&i<=9471,"Geometric Shapes":i=>i>=9632&&i<=9727,"Miscellaneous Symbols":i=>i>=9728&&i<=9983,"Miscellaneous Symbols and Arrows":i=>i>=11008&&i<=11263,"CJK Radicals Supplement":i=>i>=11904&&i<=12031,"Kangxi Radicals":i=>i>=12032&&i<=12255,"Ideographic Description Characters":i=>i>=12272&&i<=12287,"CJK Symbols and Punctuation":i=>i>=12288&&i<=12351,Hiragana:i=>i>=12352&&i<=12447,Katakana:i=>i>=12448&&i<=12543,Bopomofo:i=>i>=12544&&i<=12591,"Hangul Compatibility Jamo":i=>i>=12592&&i<=12687,Kanbun:i=>i>=12688&&i<=12703,"Bopomofo Extended":i=>i>=12704&&i<=12735,"CJK Strokes":i=>i>=12736&&i<=12783,"Katakana Phonetic Extensions":i=>i>=12784&&i<=12799,"Enclosed CJK Letters and Months":i=>i>=12800&&i<=13055,"CJK Compatibility":i=>i>=13056&&i<=13311,"CJK Unified Ideographs Extension A":i=>i>=13312&&i<=19903,"Yijing Hexagram Symbols":i=>i>=19904&&i<=19967,"CJK Unified Ideographs":i=>i>=19968&&i<=40959,"Yi Syllables":i=>i>=40960&&i<=42127,"Yi Radicals":i=>i>=42128&&i<=42191,"Hangul Jamo Extended-A":i=>i>=43360&&i<=43391,"Hangul Syllables":i=>i>=44032&&i<=55215,"Hangul Jamo Extended-B":i=>i>=55216&&i<=55295,"Private Use Area":i=>i>=57344&&i<=63743,"CJK Compatibility Ideographs":i=>i>=63744&&i<=64255,"Arabic Presentation Forms-A":i=>i>=64336&&i<=65023,"Vertical Forms":i=>i>=65040&&i<=65055,"CJK Compatibility Forms":i=>i>=65072&&i<=65103,"Small Form Variants":i=>i>=65104&&i<=65135,"Arabic Presentation Forms-B":i=>i>=65136&&i<=65279,"Halfwidth and Fullwidth Forms":i=>i>=65280&&i<=65519};function Ps(i){for(const e of i)if(zs(e.charCodeAt(0)))return!0;return!1}function Ca(i){for(const e of i)if(!Bo(e.charCodeAt(0)))return!1;return!0}function Bo(i){return!(ye.Arabic(i)||ye["Arabic Supplement"](i)||ye["Arabic Extended-A"](i)||ye["Arabic Presentation Forms-A"](i)||ye["Arabic Presentation Forms-B"](i))}function zs(i){return!(i!==746&&i!==747&&(i<4352||!(ye["Bopomofo Extended"](i)||ye.Bopomofo(i)||ye["CJK Compatibility Forms"](i)&&!(i>=65097&&i<=65103)||ye["CJK Compatibility Ideographs"](i)||ye["CJK Compatibility"](i)||ye["CJK Radicals Supplement"](i)||ye["CJK Strokes"](i)||!(!ye["CJK Symbols and Punctuation"](i)||i>=12296&&i<=12305||i>=12308&&i<=12319||i===12336)||ye["CJK Unified Ideographs Extension A"](i)||ye["CJK Unified Ideographs"](i)||ye["Enclosed CJK Letters and Months"](i)||ye["Hangul Compatibility Jamo"](i)||ye["Hangul Jamo Extended-A"](i)||ye["Hangul Jamo Extended-B"](i)||ye["Hangul Jamo"](i)||ye["Hangul Syllables"](i)||ye.Hiragana(i)||ye["Ideographic Description Characters"](i)||ye.Kanbun(i)||ye["Kangxi Radicals"](i)||ye["Katakana Phonetic Extensions"](i)||ye.Katakana(i)&&i!==12540||!(!ye["Halfwidth and Fullwidth Forms"](i)||i===65288||i===65289||i===65293||i>=65306&&i<=65310||i===65339||i===65341||i===65343||i>=65371&&i<=65503||i===65507||i>=65512&&i<=65519)||!(!ye["Small Form Variants"](i)||i>=65112&&i<=65118||i>=65123&&i<=65126)||ye["Unified Canadian Aboriginal Syllabics"](i)||ye["Unified Canadian Aboriginal Syllabics Extended"](i)||ye["Vertical Forms"](i)||ye["Yijing Hexagram Symbols"](i)||ye["Yi Syllables"](i)||ye["Yi Radicals"](i))))}function Ro(i){return!(zs(i)||function(e){return!!(ye["Latin-1 Supplement"](e)&&(e===167||e===169||e===174||e===177||e===188||e===189||e===190||e===215||e===247)||ye["General Punctuation"](e)&&(e===8214||e===8224||e===8225||e===8240||e===8241||e===8251||e===8252||e===8258||e===8263||e===8264||e===8265||e===8273)||ye["Letterlike Symbols"](e)||ye["Number Forms"](e)||ye["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||e===9003||e>=9085&&e<=9114||e>=9150&&e<=9165||e===9167||e>=9169&&e<=9179||e>=9186&&e<=9215)||ye["Control Pictures"](e)&&e!==9251||ye["Optical Character Recognition"](e)||ye["Enclosed Alphanumerics"](e)||ye["Geometric Shapes"](e)||ye["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||ye["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||ye["CJK Symbols and Punctuation"](e)||ye.Katakana(e)||ye["Private Use Area"](e)||ye["CJK Compatibility Forms"](e)||ye["Small Form Variants"](e)||ye["Halfwidth and Fullwidth Forms"](e)||e===8734||e===8756||e===8757||e>=9984&&e<=10087||e>=10102&&e<=10131||e===65532||e===65533)}(i))}function ks(i){return i>=1424&&i<=2303||ye["Arabic Presentation Forms-A"](i)||ye["Arabic Presentation Forms-B"](i)}function Ds(i,e){return!(!e&&ks(i)||i>=2304&&i<=3583||i>=3840&&i<=4255||ye.Khmer(i))}function Fo(i){for(const e of i)if(ks(e.charCodeAt(0)))return!0;return!1}const Ma="deferred",Ls="loading",Pa="loaded";let Jn=null,xi="unavailable",Nr=null;const Oo=function(i){i&&typeof i=="string"&&i.indexOf("NetworkError")>-1&&(xi="error"),Jn&&Jn(i)};function za(){Bs.fire(new gr("pluginStateChange",{pluginStatus:xi,pluginURL:Nr}))}const Bs=new fn,ka=function(){return xi},Uo=function(){if(xi!==Ma||!Nr)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");xi=Ls,za(),Nr&&dn({url:Nr},i=>{i?Oo(i):(xi=Pa,za())})},$i={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>xi===Pa||$i.applyArabicShaping!=null,isLoading:()=>xi===Ls,setState(i){if(!Bi())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");xi=i.pluginStatus,Nr=i.pluginURL},isParsed(){if(!Bi())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return $i.applyArabicShaping!=null&&$i.processBidirectionalText!=null&&$i.processStyledBidirectionalText!=null},getPluginURL(){if(!Bi())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return Nr}};class bt{constructor(e,r){this.zoom=e,r?(this.now=r.now,this.fadeDuration=r.fadeDuration,this.zoomHistory=r.zoomHistory,this.transition=r.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Lo,this.transition={})}isSupportedScript(e){return function(r,s){for(const l of r)if(!Ds(l.charCodeAt(0),s))return!1;return!0}(e,$i.isLoaded())}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const e=this.zoom,r=e-Math.floor(e),s=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*s}:{fromScale:.5,toScale:1,t:1-(1-s)*r}}}class Rs{constructor(e,r){this.property=e,this.value=r,this.expression=function(s,l){if(bs(s))return new gt(s,l);if(ws(s)){const u=Ts(s,l);if(u.result==="error")throw new Error(u.value.map(p=>`${p.key}: ${p.message}`).join(", "));return u.value}{let u=s;return l.type==="color"&&typeof s=="string"?u=Re.parse(s):l.type!=="padding"||typeof s!="number"&&!Array.isArray(s)||(u=Ti.parse(s)),{kind:"constant",evaluate:()=>u}}}(r===void 0?e.specification.default:r,e.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(e,r,s){return this.property.possiblyEvaluate(this,e,r,s)}}class Da{constructor(e){this.property=e,this.value=new Rs(e,void 0)}transitioned(e,r){return new Qn(this.property,this.value,r,_t({},e.transition,this.transition),e.now)}untransitioned(){return new Qn(this.property,this.value,null,{},0)}}class Vo{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return _i(this._values[e].value.value)}setValue(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new Da(this._values[e].property)),this._values[e].value=new Rs(this._values[e].property,r===null?void 0:_i(r))}getTransition(e){return _i(this._values[e].transition)}setTransition(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new Da(this._values[e].property)),this._values[e].transition=_i(r)||void 0}serialize(){const e={};for(const r of Object.keys(this._values)){const s=this.getValue(r);s!==void 0&&(e[r]=s);const l=this.getTransition(r);l!==void 0&&(e[`${r}-transition`]=l)}return e}transitioned(e,r){const s=new No(this._properties);for(const l of Object.keys(this._values))s._values[l]=this._values[l].transitioned(e,r._values[l]);return s}untransitioned(){const e=new No(this._properties);for(const r of Object.keys(this._values))e._values[r]=this._values[r].untransitioned();return e}}class Qn{constructor(e,r,s,l,u){this.property=e,this.value=r,this.begin=u+l.delay||0,this.end=this.begin+l.duration||0,e.specification.transition&&(l.delay||l.duration)&&(this.prior=s)}possiblyEvaluate(e,r,s){const l=e.now||0,u=this.value.possiblyEvaluate(e,r,s),p=this.prior;if(p){if(l>this.end)return this.prior=null,u;if(this.value.isDataDriven())return this.prior=null,u;if(l=1)return 1;const v=g*g,b=v*g;return 4*(g<.5?b:3*(g-v)+b-.75)}(f))}}return u}}class No{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,r,s){const l=new Fs(this._properties);for(const u of Object.keys(this._values))l._values[u]=this._values[u].possiblyEvaluate(e,r,s);return l}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class La{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}getValue(e){return _i(this._values[e].value)}setValue(e,r){this._values[e]=new Rs(this._values[e].property,r===null?void 0:_i(r))}serialize(){const e={};for(const r of Object.keys(this._values)){const s=this.getValue(r);s!==void 0&&(e[r]=s)}return e}possiblyEvaluate(e,r,s){const l=new Fs(this._properties);for(const u of Object.keys(this._values))l._values[u]=this._values[u].possiblyEvaluate(e,r,s);return l}}class ar{constructor(e,r,s){this.property=e,this.value=r,this.parameters=s}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,r,s,l){return this.property.evaluate(this.value,this.parameters,e,r,s,l)}}class Fs{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class Me{constructor(e){this.specification=e}possiblyEvaluate(e,r){if(e.isDataDriven())throw new Error("Value should not be data driven");return e.expression.evaluate(r)}interpolate(e,r,s){const l=Ei[this.specification.type];return l?l(e,r,s):e}}class Le{constructor(e,r){this.specification=e,this.overrides=r}possiblyEvaluate(e,r,s,l){return new ar(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(r,null,{},s,l)}:e.expression,r)}interpolate(e,r,s){if(e.value.kind!=="constant"||r.value.kind!=="constant")return e;if(e.value.value===void 0||r.value.value===void 0)return new ar(this,{kind:"constant",value:void 0},e.parameters);const l=Ei[this.specification.type];if(l){const u=l(e.value.value,r.value.value,s);return new ar(this,{kind:"constant",value:u},e.parameters)}return e}evaluate(e,r,s,l,u,p){return e.kind==="constant"?e.value:e.evaluate(r,s,l,u,p)}}class es extends Le{possiblyEvaluate(e,r,s,l){if(e.value===void 0)return new ar(this,{kind:"constant",value:void 0},r);if(e.expression.kind==="constant"){const u=e.expression.evaluate(r,null,{},s,l),p=e.property.specification.type==="resolvedImage"&&typeof u!="string"?u.name:u,f=this._calculate(p,p,p,r);return new ar(this,{kind:"constant",value:f},r)}if(e.expression.kind==="camera"){const u=this._calculate(e.expression.evaluate({zoom:r.zoom-1}),e.expression.evaluate({zoom:r.zoom}),e.expression.evaluate({zoom:r.zoom+1}),r);return new ar(this,{kind:"constant",value:u},r)}return new ar(this,e.expression,r)}evaluate(e,r,s,l,u,p){if(e.kind==="source"){const f=e.evaluate(r,s,l,u,p);return this._calculate(f,f,f,r)}return e.kind==="composite"?this._calculate(e.evaluate({zoom:Math.floor(r.zoom)-1},s,l),e.evaluate({zoom:Math.floor(r.zoom)},s,l),e.evaluate({zoom:Math.floor(r.zoom)+1},s,l),r):e.value}_calculate(e,r,s,l){return l.zoom>l.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:s,to:r}}interpolate(e){return e}}class Ba{constructor(e){this.specification=e}possiblyEvaluate(e,r,s,l){if(e.value!==void 0){if(e.expression.kind==="constant"){const u=e.expression.evaluate(r,null,{},s,l);return this._calculate(u,u,u,r)}return this._calculate(e.expression.evaluate(new bt(Math.floor(r.zoom-1),r)),e.expression.evaluate(new bt(Math.floor(r.zoom),r)),e.expression.evaluate(new bt(Math.floor(r.zoom+1),r)),r)}}_calculate(e,r,s,l){return l.zoom>l.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:s,to:r}}interpolate(e){return e}}class Ra{constructor(e){this.specification=e}possiblyEvaluate(e,r,s,l){return!!e.expression.evaluate(r,null,{},s,l)}interpolate(){return!1}}class vi{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const r in e){const s=e[r];s.specification.overridable&&this.overridableProperties.push(r);const l=this.defaultPropertyValues[r]=new Rs(s,void 0),u=this.defaultTransitionablePropertyValues[r]=new Da(s);this.defaultTransitioningPropertyValues[r]=u.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=l.possiblyEvaluate({})}}}Ee("DataDrivenProperty",Le),Ee("DataConstantProperty",Me),Ee("CrossFadedDataDrivenProperty",es),Ee("CrossFadedProperty",Ba),Ee("ColorRampProperty",Ra);const $o="-transition";class or extends fn{constructor(e,r){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new La(r.layout)),r.paint)){this._transitionablePaint=new Vo(r.paint);for(const s in e.paint)this.setPaintProperty(s,e.paint[s],{validate:!1});for(const s in e.layout)this.setLayoutProperty(s,e.layout[s],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Fs(r.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return e==="visibility"?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,r,s={}){r!=null&&this._validate(Cl,`layers.${this.id}.layout.${e}`,e,r,s)||(e!=="visibility"?this._unevaluatedLayout.setValue(e,r):this.visibility=r)}getPaintProperty(e){return e.endsWith($o)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,r,s={}){if(r!=null&&this._validate(Al,`layers.${this.id}.paint.${e}`,e,r,s))return!1;if(e.endsWith($o))return this._transitionablePaint.setTransition(e.slice(0,-11),r||void 0),!1;{const l=this._transitionablePaint._values[e],u=l.property.specification["property-type"]==="cross-faded-data-driven",p=l.value.isDataDriven(),f=l.value;this._transitionablePaint.setValue(e,r),this._handleSpecialPaintPropertyUpdate(e);const g=this._transitionablePaint._values[e].value;return g.isDataDriven()||p||u||this._handleOverridablePaintPropertyUpdate(e,f,g)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,r,s){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||this.visibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,r){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,r)}serialize(){const e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),cn(e,(r,s)=>!(r===void 0||s==="layout"&&!Object.keys(r).length||s==="paint"&&!Object.keys(r).length))}_validate(e,r,s,l,u={}){return(!u||u.validate!==!1)&&An(this,e.call(Vr,{key:r,layerType:this.type,objectKey:s,value:l,styleSpec:ie,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const e in this.paint._values){const r=this.paint.get(e);if(r instanceof ar&&En(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}}const Ml={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class wr{constructor(e,r){this._structArray=e,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class St{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,r){return e._trim(),r&&(e.isTransferred=!0,r.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){const r=Object.create(this.prototype);return r.arrayBuffer=e.arrayBuffer,r.length=e.length,r.capacity=e.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Ft(i,e=1){let r=0,s=0;return{members:i.map(l=>{const u=Ml[l.type].BYTES_PER_ELEMENT,p=r=qo(r,Math.max(e,u)),f=l.components||1;return s=Math.max(s,u),r+=u*f,{name:l.name,type:l.type,components:f,offset:p}}),size:qo(r,Math.max(s,e)),alignment:e}}function qo(i,e){return Math.ceil(i/e)*e}class Cn extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r){const s=this.length;return this.resize(s+1),this.emplace(s,e,r)}emplace(e,r,s){const l=2*e;return this.int16[l+0]=r,this.int16[l+1]=s,e}}Cn.prototype.bytesPerElement=4,Ee("StructArrayLayout2i4",Cn);class Os extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,s)}emplace(e,r,s,l){const u=3*e;return this.int16[u+0]=r,this.int16[u+1]=s,this.int16[u+2]=l,e}}Os.prototype.bytesPerElement=6,Ee("StructArrayLayout3i6",Os);class Fa extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,l){const u=this.length;return this.resize(u+1),this.emplace(u,e,r,s,l)}emplace(e,r,s,l,u){const p=4*e;return this.int16[p+0]=r,this.int16[p+1]=s,this.int16[p+2]=l,this.int16[p+3]=u,e}}Fa.prototype.bytesPerElement=8,Ee("StructArrayLayout4i8",Fa);class lr extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,l,u,p){const f=this.length;return this.resize(f+1),this.emplace(f,e,r,s,l,u,p)}emplace(e,r,s,l,u,p,f){const g=6*e;return this.int16[g+0]=r,this.int16[g+1]=s,this.int16[g+2]=l,this.int16[g+3]=u,this.int16[g+4]=p,this.int16[g+5]=f,e}}lr.prototype.bytesPerElement=12,Ee("StructArrayLayout2i4i12",lr);class Us extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,l,u,p){const f=this.length;return this.resize(f+1),this.emplace(f,e,r,s,l,u,p)}emplace(e,r,s,l,u,p,f){const g=4*e,v=8*e;return this.int16[g+0]=r,this.int16[g+1]=s,this.uint8[v+4]=l,this.uint8[v+5]=u,this.uint8[v+6]=p,this.uint8[v+7]=f,e}}Us.prototype.bytesPerElement=8,Ee("StructArrayLayout2i4ub8",Us);class tn extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r){const s=this.length;return this.resize(s+1),this.emplace(s,e,r)}emplace(e,r,s){const l=2*e;return this.float32[l+0]=r,this.float32[l+1]=s,e}}tn.prototype.bytesPerElement=8,Ee("StructArrayLayout2f8",tn);class Vs extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s,l,u,p,f,g,v,b){const E=this.length;return this.resize(E+1),this.emplace(E,e,r,s,l,u,p,f,g,v,b)}emplace(e,r,s,l,u,p,f,g,v,b,E){const I=10*e;return this.uint16[I+0]=r,this.uint16[I+1]=s,this.uint16[I+2]=l,this.uint16[I+3]=u,this.uint16[I+4]=p,this.uint16[I+5]=f,this.uint16[I+6]=g,this.uint16[I+7]=v,this.uint16[I+8]=b,this.uint16[I+9]=E,e}}Vs.prototype.bytesPerElement=20,Ee("StructArrayLayout10ui20",Vs);class ts extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s,l,u,p,f,g,v,b,E,I){const C=this.length;return this.resize(C+1),this.emplace(C,e,r,s,l,u,p,f,g,v,b,E,I)}emplace(e,r,s,l,u,p,f,g,v,b,E,I,C){const P=12*e;return this.int16[P+0]=r,this.int16[P+1]=s,this.int16[P+2]=l,this.int16[P+3]=u,this.uint16[P+4]=p,this.uint16[P+5]=f,this.uint16[P+6]=g,this.uint16[P+7]=v,this.int16[P+8]=b,this.int16[P+9]=E,this.int16[P+10]=I,this.int16[P+11]=C,e}}ts.prototype.bytesPerElement=24,Ee("StructArrayLayout4i4ui4i24",ts);class Oa extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,s)}emplace(e,r,s,l){const u=3*e;return this.float32[u+0]=r,this.float32[u+1]=s,this.float32[u+2]=l,e}}Oa.prototype.bytesPerElement=12,Ee("StructArrayLayout3f12",Oa);class Mn extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint32[1*e+0]=r,e}}Mn.prototype.bytesPerElement=4,Ee("StructArrayLayout1ul4",Mn);class rn extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s,l,u,p,f,g,v){const b=this.length;return this.resize(b+1),this.emplace(b,e,r,s,l,u,p,f,g,v)}emplace(e,r,s,l,u,p,f,g,v,b){const E=10*e,I=5*e;return this.int16[E+0]=r,this.int16[E+1]=s,this.int16[E+2]=l,this.int16[E+3]=u,this.int16[E+4]=p,this.int16[E+5]=f,this.uint32[I+3]=g,this.uint16[E+8]=v,this.uint16[E+9]=b,e}}rn.prototype.bytesPerElement=20,Ee("StructArrayLayout6i1ul2ui20",rn);class Ua extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,l,u,p){const f=this.length;return this.resize(f+1),this.emplace(f,e,r,s,l,u,p)}emplace(e,r,s,l,u,p,f){const g=6*e;return this.int16[g+0]=r,this.int16[g+1]=s,this.int16[g+2]=l,this.int16[g+3]=u,this.int16[g+4]=p,this.int16[g+5]=f,e}}Ua.prototype.bytesPerElement=12,Ee("StructArrayLayout2i2i2i12",Ua);class Ns extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,l,u){const p=this.length;return this.resize(p+1),this.emplace(p,e,r,s,l,u)}emplace(e,r,s,l,u,p){const f=4*e,g=8*e;return this.float32[f+0]=r,this.float32[f+1]=s,this.float32[f+2]=l,this.int16[g+6]=u,this.int16[g+7]=p,e}}Ns.prototype.bytesPerElement=16,Ee("StructArrayLayout2f1f2i16",Ns);class nn extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s,l){const u=this.length;return this.resize(u+1),this.emplace(u,e,r,s,l)}emplace(e,r,s,l,u){const p=12*e,f=3*e;return this.uint8[p+0]=r,this.uint8[p+1]=s,this.float32[f+1]=l,this.float32[f+2]=u,e}}nn.prototype.bytesPerElement=12,Ee("StructArrayLayout2ub2f12",nn);class $s extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,s)}emplace(e,r,s,l){const u=3*e;return this.uint16[u+0]=r,this.uint16[u+1]=s,this.uint16[u+2]=l,e}}$s.prototype.bytesPerElement=6,Ee("StructArrayLayout3ui6",$s);class Va extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s,l,u,p,f,g,v,b,E,I,C,P,R,L,G){const W=this.length;return this.resize(W+1),this.emplace(W,e,r,s,l,u,p,f,g,v,b,E,I,C,P,R,L,G)}emplace(e,r,s,l,u,p,f,g,v,b,E,I,C,P,R,L,G,W){const q=24*e,Y=12*e,Q=48*e;return this.int16[q+0]=r,this.int16[q+1]=s,this.uint16[q+2]=l,this.uint16[q+3]=u,this.uint32[Y+2]=p,this.uint32[Y+3]=f,this.uint32[Y+4]=g,this.uint16[q+10]=v,this.uint16[q+11]=b,this.uint16[q+12]=E,this.float32[Y+7]=I,this.float32[Y+8]=C,this.uint8[Q+36]=P,this.uint8[Q+37]=R,this.uint8[Q+38]=L,this.uint32[Y+10]=G,this.int16[q+22]=W,e}}Va.prototype.bytesPerElement=48,Ee("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Va);class qs extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s,l,u,p,f,g,v,b,E,I,C,P,R,L,G,W,q,Y,Q,re,Te,Ie,xe,ge,fe,ve){const _e=this.length;return this.resize(_e+1),this.emplace(_e,e,r,s,l,u,p,f,g,v,b,E,I,C,P,R,L,G,W,q,Y,Q,re,Te,Ie,xe,ge,fe,ve)}emplace(e,r,s,l,u,p,f,g,v,b,E,I,C,P,R,L,G,W,q,Y,Q,re,Te,Ie,xe,ge,fe,ve,_e){const he=34*e,ke=17*e;return this.int16[he+0]=r,this.int16[he+1]=s,this.int16[he+2]=l,this.int16[he+3]=u,this.int16[he+4]=p,this.int16[he+5]=f,this.int16[he+6]=g,this.int16[he+7]=v,this.uint16[he+8]=b,this.uint16[he+9]=E,this.uint16[he+10]=I,this.uint16[he+11]=C,this.uint16[he+12]=P,this.uint16[he+13]=R,this.uint16[he+14]=L,this.uint16[he+15]=G,this.uint16[he+16]=W,this.uint16[he+17]=q,this.uint16[he+18]=Y,this.uint16[he+19]=Q,this.uint16[he+20]=re,this.uint16[he+21]=Te,this.uint16[he+22]=Ie,this.uint32[ke+12]=xe,this.float32[ke+13]=ge,this.float32[ke+14]=fe,this.float32[ke+15]=ve,this.float32[ke+16]=_e,e}}qs.prototype.bytesPerElement=68,Ee("StructArrayLayout8i15ui1ul4f68",qs);class js extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.float32[1*e+0]=r,e}}js.prototype.bytesPerElement=4,Ee("StructArrayLayout1f4",js);class Zs extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,s)}emplace(e,r,s,l){const u=4*e;return this.uint32[2*e+0]=r,this.uint16[u+2]=s,this.uint16[u+3]=l,e}}Zs.prototype.bytesPerElement=8,Ee("StructArrayLayout1ul2ui8",Zs);class o extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r){const s=this.length;return this.resize(s+1),this.emplace(s,e,r)}emplace(e,r,s){const l=2*e;return this.uint16[l+0]=r,this.uint16[l+1]=s,e}}o.prototype.bytesPerElement=4,Ee("StructArrayLayout2ui4",o);class t extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint16[1*e+0]=r,e}}t.prototype.bytesPerElement=2,Ee("StructArrayLayout1ui2",t);class n extends St{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s,l){const u=this.length;return this.resize(u+1),this.emplace(u,e,r,s,l)}emplace(e,r,s,l,u){const p=4*e;return this.float32[p+0]=r,this.float32[p+1]=s,this.float32[p+2]=l,this.float32[p+3]=u,e}}n.prototype.bytesPerElement=16,Ee("StructArrayLayout4f16",n);class a extends wr{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new Ae(this.anchorPointX,this.anchorPointY)}}a.prototype.size=20;class c extends rn{get(e){return new a(this,e)}}Ee("CollisionBoxArray",c);class d extends wr{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}d.prototype.size=48;class m extends Va{get(e){return new d(this,e)}}Ee("PlacedSymbolArray",m);class y extends wr{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get textOffset0(){return this._structArray.float32[this._pos4+14]}get textOffset1(){return this._structArray.float32[this._pos4+15]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+16]}}y.prototype.size=68;class _ extends qs{get(e){return new y(this,e)}}Ee("SymbolInstanceArray",_);class x extends js{getoffsetX(e){return this.float32[1*e+0]}}Ee("GlyphOffsetArray",x);class T extends Os{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}Ee("SymbolLineVertexArray",T);class w extends wr{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}w.prototype.size=8;class M extends Zs{get(e){return new w(this,e)}}Ee("FeatureIndexArray",M);class B extends Cn{}class k extends Cn{}class D extends Cn{}class U extends lr{}class Z extends Us{}class J extends tn{}class O extends Vs{}class K extends ts{}class ee extends Oa{}class oe extends Mn{}class ce extends Ua{}class ue extends nn{}class le extends $s{}class be extends o{}const ze=Ft([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ve}=ze;class me{constructor(e=[]){this.segments=e}prepareSegment(e,r,s,l){let u=this.segments[this.segments.length-1];return e>me.MAX_VERTEX_ARRAY_LENGTH&&ti(`Max vertices per segment is ${me.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!u||u.vertexLength+e>me.MAX_VERTEX_ARRAY_LENGTH||u.sortKey!==l)&&(u={vertexOffset:r.length,primitiveOffset:s.length,vertexLength:0,primitiveLength:0},l!==void 0&&(u.sortKey=l),this.segments.push(u)),u}get(){return this.segments}destroy(){for(const e of this.segments)for(const r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,s,l){return new me([{vertexOffset:e,primitiveOffset:r,vertexLength:s,primitiveLength:l,vaos:{},sortKey:0}])}}function Be(i,e){return 256*(i=ot(Math.floor(i),0,255))+ot(Math.floor(e),0,255)}me.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ee("SegmentVector",me);const we=Ft([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var it={exports:{}},Pt={exports:{}};Pt.exports=function(i,e){var r,s,l,u,p,f,g,v;for(s=i.length-(r=3&i.length),l=e,p=3432918353,f=461845907,v=0;v>>16)*p&65535)<<16)&4294967295)<<15|g>>>17))*f+(((g>>>16)*f&65535)<<16)&4294967295)<<13|l>>>19))+((5*(l>>>16)&65535)<<16)&4294967295))+((58964+(u>>>16)&65535)<<16);switch(g=0,r){case 3:g^=(255&i.charCodeAt(v+2))<<16;case 2:g^=(255&i.charCodeAt(v+1))<<8;case 1:l^=g=(65535&(g=(g=(65535&(g^=255&i.charCodeAt(v)))*p+(((g>>>16)*p&65535)<<16)&4294967295)<<15|g>>>17))*f+(((g>>>16)*f&65535)<<16)&4294967295}return l^=i.length,l=2246822507*(65535&(l^=l>>>16))+((2246822507*(l>>>16)&65535)<<16)&4294967295,l=3266489909*(65535&(l^=l>>>13))+((3266489909*(l>>>16)&65535)<<16)&4294967295,(l^=l>>>16)>>>0};var rt=Pt.exports,$e={exports:{}};$e.exports=function(i,e){for(var r,s=i.length,l=e^s,u=0;s>=4;)r=1540483477*(65535&(r=255&i.charCodeAt(u)|(255&i.charCodeAt(++u))<<8|(255&i.charCodeAt(++u))<<16|(255&i.charCodeAt(++u))<<24))+((1540483477*(r>>>16)&65535)<<16),l=1540483477*(65535&l)+((1540483477*(l>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),s-=4,++u;switch(s){case 3:l^=(255&i.charCodeAt(u+2))<<16;case 2:l^=(255&i.charCodeAt(u+1))<<8;case 1:l=1540483477*(65535&(l^=255&i.charCodeAt(u)))+((1540483477*(l>>>16)&65535)<<16)}return l=1540483477*(65535&(l^=l>>>13))+((1540483477*(l>>>16)&65535)<<16),(l^=l>>>15)>>>0};var It=rt,hi=$e.exports;it.exports=It,it.exports.murmur3=It,it.exports.murmur2=hi;var zt=vt(it.exports);class Zt{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,s,l){this.ids.push(Ii(e)),this.positions.push(r,s,l)}getPositions(e){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const r=Ii(e);let s=0,l=this.ids.length-1;for(;s>1;this.ids[p]>=r?l=p:s=p+1}const u=[];for(;this.ids[s]===r;)u.push({index:this.positions[3*s],start:this.positions[3*s+1],end:this.positions[3*s+2]}),s++;return u}static serialize(e,r){const s=new Float64Array(e.ids),l=new Uint32Array(e.positions);return Xi(s,l,0,s.length-1),r&&r.push(s.buffer,l.buffer),{ids:s,positions:l}}static deserialize(e){const r=new Zt;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}}function Ii(i){const e=+i;return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e:zt(String(i))}function Xi(i,e,r,s){for(;r>1];let u=r-1,p=s+1;for(;;){do u++;while(i[u]l);if(u>=p)break;Wi(i,u,p),Wi(e,3*u,3*p),Wi(e,3*u+1,3*p+1),Wi(e,3*u+2,3*p+2)}p-r`u_${l}`),this.type=s}setUniform(e,r,s){e.set(s.constantOr(this.value))}getBinding(e,r,s){return this.type==="color"?new ri(e,r):new cr(e,r)}}class Xt{constructor(e,r){this.uniformNames=r.map(s=>`u_${s}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=e.tlbr}setUniform(e,r,s,l){const u=l==="u_pattern_to"?this.patternTo:l==="u_pattern_from"?this.patternFrom:l==="u_pixel_ratio_to"?this.pixelRatioTo:l==="u_pixel_ratio_from"?this.pixelRatioFrom:null;u&&e.set(u)}getBinding(e,r,s){return s.substr(0,9)==="u_pattern"?new is(e,r):new cr(e,r)}}class at{constructor(e,r,s,l){this.expression=e,this.type=s,this.maxValue=0,this.paintVertexAttributes=r.map(u=>({name:`a_${u}`,type:"Float32",components:s==="color"?2:1,offset:0})),this.paintVertexArray=new l}populatePaintArray(e,r,s,l,u){const p=this.paintVertexArray.length,f=this.expression.evaluate(new bt(0),r,{},l,[],u);this.paintVertexArray.resize(e),this._setPaintValue(p,e,f)}updatePaintArray(e,r,s,l){const u=this.expression.evaluate({zoom:0},s,l);this._setPaintValue(e,r,u)}_setPaintValue(e,r,s){if(this.type==="color"){const l=nt(s);for(let u=e;u`u_${f}_t`),this.type=s,this.useIntegerZoom=l,this.zoom=u,this.maxValue=0,this.paintVertexAttributes=r.map(f=>({name:`a_${f}`,type:"Float32",components:s==="color"?4:2,offset:0})),this.paintVertexArray=new p}populatePaintArray(e,r,s,l,u){const p=this.expression.evaluate(new bt(this.zoom),r,{},l,[],u),f=this.expression.evaluate(new bt(this.zoom+1),r,{},l,[],u),g=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(g,e,p,f)}updatePaintArray(e,r,s,l){const u=this.expression.evaluate({zoom:this.zoom},s,l),p=this.expression.evaluate({zoom:this.zoom+1},s,l);this._setPaintValue(e,r,u,p)}_setPaintValue(e,r,s,l){if(this.type==="color"){const u=nt(s),p=nt(l);for(let f=e;f`#define HAS_UNIFORM_${l}`))}return e}getBinderAttributes(){const e=[];for(const r in this.binders){const s=this.binders[r];if(s instanceof at||s instanceof $t)for(let l=0;l!0){this.programConfigurations={};for(const l of e)this.programConfigurations[l.id]=new Gs(l,r,s);this.needsUpload=!1,this._featureMap=new Zt,this._bufferOffset=0}populatePaintArrays(e,r,s,l,u,p){for(const f in this.programConfigurations)this.programConfigurations[f].populatePaintArrays(e,r,l,u,p);r.id!==void 0&&this._featureMap.add(r.id,s,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,r,s,l){for(const u of s)this.needsUpload=this.programConfigurations[u.id].updatePaintArrays(e,this._featureMap,r,u,l)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const r in this.programConfigurations)this.programConfigurations[r].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function Pl(i,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[i]||[i.replace(`${e}-`,"").replace(/-/g,"_")]}function jo(i,e,r){const s={color:{source:tn,composite:n},number:{source:js,composite:tn}},l=function(u){return{"line-pattern":{source:O,composite:O},"fill-pattern":{source:O,composite:O},"fill-extrusion-pattern":{source:O,composite:O}}[u]}(i);return l&&l[r]||s[e][r]}Ee("ConstantBinder",Nt),Ee("CrossFadedConstantBinder",Xt),Ee("SourceExpressionBinder",at),Ee("CrossFadedCompositeBinder",Ai),Ee("CompositeExpressionBinder",$t),Ee("ProgramConfiguration",Gs,{omit:["_buffers"]}),Ee("ProgramConfigurationSet",Tr);var yt=8192;const Na=Math.pow(2,14)-1,rs=-Na-1;function Er(i){const e=yt/i.extent,r=i.loadGeometry();for(let s=0;sp.x+1||gp.y+1)&&ti("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function ns(i,e){return{type:i.type,id:i.id,properties:i.properties,geometry:e?Er(i):[]}}function Zo(i,e,r,s,l){i.emplaceBack(2*e+(s+1)/2,2*r+(l+1)/2)}class zl{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new k,this.indexArray=new le,this.segments=new me,this.programConfigurations=new Tr(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){const l=this.layers[0],u=[];let p=null,f=!1;l.type==="circle"&&(p=l.layout.get("circle-sort-key"),f=!p.isConstant());for(const{feature:g,id:v,index:b,sourceLayerIndex:E}of e){const I=this.layers[0]._featureFilter.needGeometry,C=ns(g,I);if(!this.layers[0]._featureFilter.filter(new bt(this.zoom),C,s))continue;const P=f?p.evaluate(C,{},s):void 0,R={id:v,properties:g.properties,type:g.type,sourceLayerIndex:E,index:b,geometry:I?C.geometry:Er(g),patterns:{},sortKey:P};u.push(R)}f&&u.sort((g,v)=>g.sortKey-v.sortKey);for(const g of u){const{geometry:v,index:b,sourceLayerIndex:E}=g,I=e[b].feature;this.addFeature(g,v,b,s),r.featureIndex.insert(I,v,b,E,this.index)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Ve),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,r,s,l){for(const u of r)for(const p of u){const f=p.x,g=p.y;if(f<0||f>=yt||g<0||g>=yt)continue;const v=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),b=v.vertexLength;Zo(this.layoutVertexArray,f,g,-1,-1),Zo(this.layoutVertexArray,f,g,1,-1),Zo(this.layoutVertexArray,f,g,1,1),Zo(this.layoutVertexArray,f,g,-1,1),this.indexArray.emplaceBack(b,b+1,b+2),this.indexArray.emplaceBack(b,b+3,b+2),v.vertexLength+=4,v.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,s,{},l)}}function wc(i,e){for(let r=0;r1){if(kl(i,e))return!0;for(let s=0;s1?r:r.sub(e)._mult(l)._add(e))}function Sc(i,e){let r,s,l,u=!1;for(let p=0;pe.y!=l.y>e.y&&e.x<(l.x-s.x)*(e.y-s.y)/(l.y-s.y)+s.x&&(u=!u)}return u}function Xs(i,e){let r=!1;for(let s=0,l=i.length-1;se.y!=p.y>e.y&&e.x<(p.x-u.x)*(e.y-u.y)/(p.y-u.y)+u.x&&(r=!r)}return r}function ou(i,e,r){const s=r[0],l=r[2];if(i.xl.x&&e.x>l.x||i.yl.y&&e.y>l.y)return!1;const u=ct(i,e,r[0]);return u!==ct(i,e,r[1])||u!==ct(i,e,r[2])||u!==ct(i,e,r[3])}function $a(i,e,r){const s=e.paint.get(i).value;return s.kind==="constant"?s.value:r.programConfigurations.get(e.id).getMaxValue(i)}function Go(i){return Math.sqrt(i[0]*i[0]+i[1]*i[1])}function Xo(i,e,r,s,l){if(!e[0]&&!e[1])return i;const u=Ae.convert(e)._mult(l);r==="viewport"&&u._rotate(-s);const p=[];for(let f=0;fi.width||l.height>i.height||r.x>i.width-l.width||r.y>i.height-l.height)throw new RangeError("out of range source coordinates for image copy");if(l.width>e.width||l.height>e.height||s.x>e.width-l.width||s.y>e.height-l.height)throw new RangeError("out of range destination coordinates for image copy");const p=i.data,f=e.data;if(p===f)throw new Error("srcData equals dstData, so image is already copied");for(let g=0;g{e[i.evaluationKey]=g;const v=i.expression.evaluate(e);l.data[p+f+0]=Math.floor(255*v.r/v.a),l.data[p+f+1]=Math.floor(255*v.g/v.a),l.data[p+f+2]=Math.floor(255*v.b/v.a),l.data[p+f+3]=Math.floor(255*v.a)};if(i.clips)for(let p=0,f=0;p80*r){s=u=i[0],l=p=i[1];for(var P=r;Pu&&(u=f),g>p&&(p=g);v=(v=Math.max(u-s,p-l))!==0?32767/v:0}return Za(I,C,r,s,l,v,0),C}function Bc(i,e,r,s,l){var u,p;if(l===Vl(i,e,r,s)>0)for(u=e;u=e;u-=s)p=Oc(u,i[u],i[u+1],p);return p&&Ko(p,p.next)&&(Xa(p),p=p.next),p}function ss(i,e){if(!i)return i;e||(e=i);var r,s=i;do if(r=!1,s.steiner||!Ko(s,s.next)&&kt(s.prev,s,s.next)!==0)s=s.next;else{if(Xa(s),(s=e=s.prev)===s.next)break;r=!0}while(r||s!==e);return e}function Za(i,e,r,s,l,u,p){if(i){!p&&u&&function(b,E,I,C){var P=b;do P.z===0&&(P.z=Ol(P.x,P.y,E,I,C)),P.prevZ=P.prev,P.nextZ=P.next,P=P.next;while(P!==b);P.prevZ.nextZ=null,P.prevZ=null,function(R){var L,G,W,q,Y,Q,re,Te,Ie=1;do{for(G=R,R=null,Y=null,Q=0;G;){for(Q++,W=G,re=0,L=0;L0||Te>0&&W;)re!==0&&(Te===0||!W||G.z<=W.z)?(q=G,G=G.nextZ,re--):(q=W,W=W.nextZ,Te--),Y?Y.nextZ=q:R=q,q.prevZ=Y,Y=q;G=W}Y.nextZ=null,Ie*=2}while(Q>1)}(P)}(i,s,l,u);for(var f,g,v=i;i.prev!==i.next;)if(f=i.prev,g=i.next,u?mu(i,s,l,u):fu(i))e.push(f.i/r|0),e.push(i.i/r|0),e.push(g.i/r|0),Xa(i),i=g.next,v=g.next;else if((i=g)===v){p?p===1?Za(i=gu(ss(i),e,r),e,r,s,l,u,2):p===2&&_u(i,e,r,s,l,u):Za(ss(i),e,r,s,l,u,1);break}}}function fu(i){var e=i.prev,r=i,s=i.next;if(kt(e,r,s)>=0)return!1;for(var l=e.x,u=r.x,p=s.x,f=e.y,g=r.y,v=s.y,b=lu?l>p?l:p:u>p?u:p,C=f>g?f>v?f:v:g>v?g:v,P=s.next;P!==e;){if(P.x>=b&&P.x<=I&&P.y>=E&&P.y<=C&&Hs(l,f,u,g,p,v,P.x,P.y)&&kt(P.prev,P,P.next)>=0)return!1;P=P.next}return!0}function mu(i,e,r,s){var l=i.prev,u=i,p=i.next;if(kt(l,u,p)>=0)return!1;for(var f=l.x,g=u.x,v=p.x,b=l.y,E=u.y,I=p.y,C=fg?f>v?f:v:g>v?g:v,L=b>E?b>I?b:I:E>I?E:I,G=Ol(C,P,e,r,s),W=Ol(R,L,e,r,s),q=i.prevZ,Y=i.nextZ;q&&q.z>=G&&Y&&Y.z<=W;){if(q.x>=C&&q.x<=R&&q.y>=P&&q.y<=L&&q!==l&&q!==p&&Hs(f,b,g,E,v,I,q.x,q.y)&&kt(q.prev,q,q.next)>=0||(q=q.prevZ,Y.x>=C&&Y.x<=R&&Y.y>=P&&Y.y<=L&&Y!==l&&Y!==p&&Hs(f,b,g,E,v,I,Y.x,Y.y)&&kt(Y.prev,Y,Y.next)>=0))return!1;Y=Y.nextZ}for(;q&&q.z>=G;){if(q.x>=C&&q.x<=R&&q.y>=P&&q.y<=L&&q!==l&&q!==p&&Hs(f,b,g,E,v,I,q.x,q.y)&&kt(q.prev,q,q.next)>=0)return!1;q=q.prevZ}for(;Y&&Y.z<=W;){if(Y.x>=C&&Y.x<=R&&Y.y>=P&&Y.y<=L&&Y!==l&&Y!==p&&Hs(f,b,g,E,v,I,Y.x,Y.y)&&kt(Y.prev,Y,Y.next)>=0)return!1;Y=Y.nextZ}return!0}function gu(i,e,r){var s=i;do{var l=s.prev,u=s.next.next;!Ko(l,u)&&Rc(l,s,s.next,u)&&Ga(l,u)&&Ga(u,l)&&(e.push(l.i/r|0),e.push(s.i/r|0),e.push(u.i/r|0),Xa(s),Xa(s.next),s=i=u),s=s.next}while(s!==i);return ss(s)}function _u(i,e,r,s,l,u){var p=i;do{for(var f=p.next.next;f!==p.prev;){if(p.i!==f.i&&wu(p,f)){var g=Fc(p,f);return p=ss(p,p.next),g=ss(g,g.next),Za(p,e,r,s,l,u,0),void Za(g,e,r,s,l,u,0)}f=f.next}p=p.next}while(p!==i)}function yu(i,e){return i.x-e.x}function xu(i,e){var r=function(l,u){var p,f=u,g=l.x,v=l.y,b=-1/0;do{if(v<=f.y&&v>=f.next.y&&f.next.y!==f.y){var E=f.x+(v-f.y)*(f.next.x-f.x)/(f.next.y-f.y);if(E<=g&&E>b&&(b=E,p=f.x=f.x&&f.x>=P&&g!==f.x&&Hs(vp.x||f.x===p.x&&vu(p,f)))&&(p=f,L=I)),f=f.next;while(f!==C);return p}(i,e);if(!r)return e;var s=Fc(r,i);return ss(s,s.next),ss(r,r.next)}function vu(i,e){return kt(i.prev,i,e.prev)<0&&kt(e.next,i,i.next)<0}function Ol(i,e,r,s,l){return(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=(i-r)*l|0)|i<<8))|i<<4))|i<<2))|i<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*l|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function bu(i){var e=i,r=i;do(e.x=(i-p)*(u-f)&&(i-p)*(s-f)>=(r-p)*(e-f)&&(r-p)*(u-f)>=(l-p)*(s-f)}function wu(i,e){return i.next.i!==e.i&&i.prev.i!==e.i&&!function(r,s){var l=r;do{if(l.i!==r.i&&l.next.i!==r.i&&l.i!==s.i&&l.next.i!==s.i&&Rc(l,l.next,r,s))return!0;l=l.next}while(l!==r);return!1}(i,e)&&(Ga(i,e)&&Ga(e,i)&&function(r,s){var l=r,u=!1,p=(r.x+s.x)/2,f=(r.y+s.y)/2;do l.y>f!=l.next.y>f&&l.next.y!==l.y&&p<(l.next.x-l.x)*(f-l.y)/(l.next.y-l.y)+l.x&&(u=!u),l=l.next;while(l!==r);return u}(i,e)&&(kt(i.prev,i,e.prev)||kt(i,e.prev,e))||Ko(i,e)&&kt(i.prev,i,i.next)>0&&kt(e.prev,e,e.next)>0)}function kt(i,e,r){return(e.y-i.y)*(r.x-e.x)-(e.x-i.x)*(r.y-e.y)}function Ko(i,e){return i.x===e.x&&i.y===e.y}function Rc(i,e,r,s){var l=Jo(kt(i,e,r)),u=Jo(kt(i,e,s)),p=Jo(kt(r,s,i)),f=Jo(kt(r,s,e));return l!==u&&p!==f||!(l!==0||!Yo(i,r,e))||!(u!==0||!Yo(i,s,e))||!(p!==0||!Yo(r,i,s))||!(f!==0||!Yo(r,e,s))}function Yo(i,e,r){return e.x<=Math.max(i.x,r.x)&&e.x>=Math.min(i.x,r.x)&&e.y<=Math.max(i.y,r.y)&&e.y>=Math.min(i.y,r.y)}function Jo(i){return i>0?1:i<0?-1:0}function Ga(i,e){return kt(i.prev,i,i.next)<0?kt(i,e,i.next)>=0&&kt(i,i.prev,e)>=0:kt(i,e,i.prev)<0||kt(i,i.next,e)<0}function Fc(i,e){var r=new Ul(i.i,i.x,i.y),s=new Ul(e.i,e.x,e.y),l=i.next,u=e.prev;return i.next=e,e.prev=i,r.next=l,l.prev=r,s.next=r,r.prev=s,u.next=s,s.prev=u,s}function Oc(i,e,r,s){var l=new Ul(i,e,r);return s?(l.next=s.next,l.prev=s,s.next.prev=l,s.next=l):(l.prev=l,l.next=l),l}function Xa(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function Ul(i,e,r){this.i=i,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Vl(i,e,r,s){for(var l=0,u=e,p=r-s;u0&&r.holes.push(s+=i[l-1].length)}return r};var Uc=vt(Fl.exports);function Tu(i,e,r,s,l){Vc(i,e,r||0,s||i.length-1,l||Eu)}function Vc(i,e,r,s,l){for(;s>r;){if(s-r>600){var u=s-r+1,p=e-r+1,f=Math.log(u),g=.5*Math.exp(2*f/3),v=.5*Math.sqrt(f*g*(u-g)/u)*(p-u/2<0?-1:1);Vc(i,e,Math.max(r,Math.floor(e-p*g/u+v)),Math.min(s,Math.floor(e+(u-p)*g/u+v)),l)}var b=i[e],E=r,I=s;for(Wa(i,r,e),l(i[s],b)>0&&Wa(i,r,s);E0;)I--}l(i[r],b)===0?Wa(i,r,I):Wa(i,++I,s),I<=e&&(r=I+1),e<=I&&(s=I-1)}}function Wa(i,e,r){var s=i[e];i[e]=i[r],i[r]=s}function Eu(i,e){return ie?1:0}function Nl(i,e){const r=i.length;if(r<=1)return[i];const s=[];let l,u;for(let p=0;p1)for(let p=0;pr.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new D,this.indexArray=new le,this.indexArray2=new be,this.programConfigurations=new Tr(e.layers,e.zoom),this.segments=new me,this.segments2=new me,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){this.hasPattern=$l("fill",this.layers,r);const l=this.layers[0].layout.get("fill-sort-key"),u=!l.isConstant(),p=[];for(const{feature:f,id:g,index:v,sourceLayerIndex:b}of e){const E=this.layers[0]._featureFilter.needGeometry,I=ns(f,E);if(!this.layers[0]._featureFilter.filter(new bt(this.zoom),I,s))continue;const C=u?l.evaluate(I,{},s,r.availableImages):void 0,P={id:g,properties:f.properties,type:f.type,sourceLayerIndex:b,index:v,geometry:E?I.geometry:Er(f),patterns:{},sortKey:C};p.push(P)}u&&p.sort((f,g)=>f.sortKey-g.sortKey);for(const f of p){const{geometry:g,index:v,sourceLayerIndex:b}=f;if(this.hasPattern){const E=ql("fill",this.layers,f,this.zoom,r);this.patternFeatures.push(E)}else this.addFeature(f,g,v,s,{});r.featureIndex.insert(e[v].feature,g,v,b,this.index)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}addFeatures(e,r,s){for(const l of this.patternFeatures)this.addFeature(l,l.geometry,l.index,r,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,du),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,r,s,l,u){for(const p of Nl(r,500)){let f=0;for(const C of p)f+=C.length;const g=this.segments.prepareSegment(f,this.layoutVertexArray,this.indexArray),v=g.vertexLength,b=[],E=[];for(const C of p){if(C.length===0)continue;C!==p[0]&&E.push(b.length/2);const P=this.segments2.prepareSegment(C.length,this.layoutVertexArray,this.indexArray2),R=P.vertexLength;this.layoutVertexArray.emplaceBack(C[0].x,C[0].y),this.indexArray2.emplaceBack(R+C.length-1,R),b.push(C[0].x),b.push(C[0].y);for(let L=1;L>3}if(l--,s===1||s===2)u+=i.readSVarint(),p+=i.readSVarint(),s===1&&(e&&f.push(e),e=[]),e.push(new Pu(u,p));else{if(s!==7)throw new Error("unknown command "+s);e&&e.push(e[0].clone())}}return e&&f.push(e),f},Ks.prototype.bbox=function(){var i=this._pbf;i.pos=this._geometry;for(var e=i.readVarint()+i.pos,r=1,s=0,l=0,u=0,p=1/0,f=-1/0,g=1/0,v=-1/0;i.pos>3}if(s--,r===1||r===2)(l+=i.readSVarint())f&&(f=l),(u+=i.readSVarint())v&&(v=u);else if(r!==7)throw new Error("unknown command "+r)}return[p,g,f,v]},Ks.prototype.toGeoJSON=function(i,e,r){var s,l,u=this.extent*Math.pow(2,r),p=this.extent*i,f=this.extent*e,g=this.loadGeometry(),v=Ks.types[this.type];function b(C){for(var P=0;P>3;l=p===1?s.readString():p===2?s.readFloat():p===3?s.readDouble():p===4?s.readVarint64():p===5?s.readVarint():p===6?s.readSVarint():p===7?s.readBoolean():null}return l}(r))}Zc.prototype.feature=function(i){if(i<0||i>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[i];var e=this._pbf.readVarint()+this._pbf.pos;return new Du(this._pbf,e,this.extent,this._keys,this._values)};var Bu=jc;function Ru(i,e,r){if(i===3){var s=new Bu(r,r.readVarint()+r.pos);s.length&&(e[s.name]=s)}}Pn.VectorTile=function(i,e){this.layers=i.readFields(Ru,{},e)},Pn.VectorTileFeature=qc,Pn.VectorTileLayer=jc;const Fu=Pn.VectorTileFeature.types,Zl=Math.pow(2,13);function Ha(i,e,r,s,l,u,p,f){i.emplaceBack(e,r,2*Math.floor(s*Zl)+p,l*Zl*2,u*Zl*2,Math.round(f))}class Gl{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new U,this.centroidVertexArray=new B,this.indexArray=new le,this.programConfigurations=new Tr(e.layers,e.zoom),this.segments=new me,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){this.features=[],this.hasPattern=$l("fill-extrusion",this.layers,r);for(const{feature:l,id:u,index:p,sourceLayerIndex:f}of e){const g=this.layers[0]._featureFilter.needGeometry,v=ns(l,g);if(!this.layers[0]._featureFilter.filter(new bt(this.zoom),v,s))continue;const b={id:u,sourceLayerIndex:f,index:p,geometry:g?v.geometry:Er(l),properties:l.properties,type:l.type,patterns:{}};this.hasPattern?this.features.push(ql("fill-extrusion",this.layers,b,this.zoom,r)):this.addFeature(b,b.geometry,p,s,{}),r.featureIndex.insert(l,b.geometry,p,f,this.index,!0)}}addFeatures(e,r,s){for(const l of this.features){const{geometry:u}=l;this.addFeature(l,u,l.index,r,s)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Mu),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,Cu.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,r,s,l,u){const p={x:0,y:0,vertexCount:0};for(const f of Nl(r,500)){let g=0;for(const P of f)g+=P.length;let v=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const P of f){if(P.length===0||Uu(P))continue;let R=0;for(let L=0;L=1){const W=P[L-1];if(!Ou(G,W)){v.vertexLength+4>me.MAX_VERTEX_ARRAY_LENGTH&&(v=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const q=G.sub(W)._perp()._unit(),Y=W.dist(G);R+Y>32768&&(R=0),Ha(this.layoutVertexArray,G.x,G.y,q.x,q.y,0,0,R),Ha(this.layoutVertexArray,G.x,G.y,q.x,q.y,0,1,R),p.x+=2*G.x,p.y+=2*G.y,p.vertexCount+=2,R+=Y,Ha(this.layoutVertexArray,W.x,W.y,q.x,q.y,0,0,R),Ha(this.layoutVertexArray,W.x,W.y,q.x,q.y,0,1,R),p.x+=2*W.x,p.y+=2*W.y,p.vertexCount+=2;const Q=v.vertexLength;this.indexArray.emplaceBack(Q,Q+2,Q+1),this.indexArray.emplaceBack(Q+1,Q+2,Q+3),v.vertexLength+=4,v.primitiveLength+=2}}}}if(v.vertexLength+g>me.MAX_VERTEX_ARRAY_LENGTH&&(v=this.segments.prepareSegment(g,this.layoutVertexArray,this.indexArray)),Fu[e.type]!=="Polygon")continue;const b=[],E=[],I=v.vertexLength;for(const P of f)if(P.length!==0){P!==f[0]&&E.push(b.length/2);for(let R=0;Ryt)||i.y===e.y&&(i.y<0||i.y>yt)}function Uu(i){return i.every(e=>e.x<0)||i.every(e=>e.x>yt)||i.every(e=>e.y<0)||i.every(e=>e.y>yt)}let Gc;Ee("FillExtrusionBucket",Gl,{omit:["layers","features"]});var Vu={get paint(){return Gc=Gc||new vi({"fill-extrusion-opacity":new Me(ie["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Le(ie["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Me(ie["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Me(ie["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new es(ie["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Le(ie["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Le(ie["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Me(ie["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};function Ka(i,e){return i.x*e.x+i.y*e.y}function Xc(i,e){if(i.length===1){let r=0;const s=e[r++];let l;for(;!l||s.equals(l);)if(l=e[r++],!l)return 1/0;for(;rr.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(r=>{this.gradients[r.id]={}}),this.layoutVertexArray=new Z,this.layoutVertexArray2=new J,this.indexArray=new le,this.programConfigurations=new Tr(e.layers,e.zoom),this.segments=new me,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){this.hasPattern=$l("line",this.layers,r);const l=this.layers[0].layout.get("line-sort-key"),u=!l.isConstant(),p=[];for(const{feature:f,id:g,index:v,sourceLayerIndex:b}of e){const E=this.layers[0]._featureFilter.needGeometry,I=ns(f,E);if(!this.layers[0]._featureFilter.filter(new bt(this.zoom),I,s))continue;const C=u?l.evaluate(I,{},s):void 0,P={id:g,properties:f.properties,type:f.type,sourceLayerIndex:b,index:v,geometry:E?I.geometry:Er(f),patterns:{},sortKey:C};p.push(P)}u&&p.sort((f,g)=>f.sortKey-g.sortKey);for(const f of p){const{geometry:g,index:v,sourceLayerIndex:b}=f;if(this.hasPattern){const E=ql("line",this.layers,f,this.zoom,r);this.patternFeatures.push(E)}else this.addFeature(f,g,v,s,{});r.featureIndex.insert(e[v].feature,g,v,b,this.index)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}addFeatures(e,r,s){for(const l of this.patternFeatures)this.addFeature(l,l.geometry,l.index,r,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,ju)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,$u),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,r,s,l,u){const p=this.layers[0].layout,f=p.get("line-join").evaluate(e,{}),g=p.get("line-cap"),v=p.get("line-miter-limit"),b=p.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(const E of r)this.addLine(E,e,f,g,v,b);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,s,u,l)}addLine(e,r,s,l,u,p){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let G=0;G=2&&e[g-1].equals(e[g-2]);)g--;let v=0;for(;v0;if(Te&&G>v){const fe=I.dist(C);if(fe>2*b){const ve=I.sub(I.sub(C)._mult(b/fe)._round());this.updateDistance(C,ve),this.addCurrentVertex(ve,R,0,0,E),C=ve}}const xe=C&&P;let ge=xe?s:f?"butt":l;if(xe&&ge==="round"&&(Qu&&(ge="bevel"),ge==="bevel"&&(Q>2&&(ge="flipbevel"),Q100)W=L.mult(-1);else{const fe=Q*R.add(L).mag()/R.sub(L).mag();W._perp()._mult(fe*(Ie?-1:1))}this.addCurrentVertex(I,W,0,0,E),this.addCurrentVertex(I,W.mult(-1),0,0,E)}else if(ge==="bevel"||ge==="fakeround"){const fe=-Math.sqrt(Q*Q-1),ve=Ie?fe:0,_e=Ie?0:fe;if(C&&this.addCurrentVertex(I,R,ve,_e,E),ge==="fakeround"){const he=Math.round(180*re/Math.PI/20);for(let ke=1;ke2*b){const ve=I.add(P.sub(I)._mult(b/fe)._round());this.updateDistance(I,ve),this.addCurrentVertex(ve,L,0,0,E),I=ve}}}}addCurrentVertex(e,r,s,l,u,p=!1){const f=r.y*l-r.x,g=-r.y-r.x*l;this.addHalfVertex(e,r.x+r.y*s,r.y-r.x*s,p,!1,s,u),this.addHalfVertex(e,f,g,p,!0,-l,u),this.distance>Wc/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,r,s,l,u,p))}addHalfVertex({x:e,y:r},s,l,u,p,f,g){const v=.5*(this.lineClips?this.scaledDistance*(Wc-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+(u?1:0),(r<<1)+(p?1:0),Math.round(63*s)+128,Math.round(63*l)+128,1+(f===0?0:f<0?-1:1)|(63&v)<<2,v>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const b=g.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,b),g.primitiveLength++),p?this.e2=b:this.e1=b}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,r){this.distance+=e.dist(r),this.updateScaledDistance()}}let Hc,Kc;Ee("LineBucket",Xl,{omit:["layers","patternFeatures"]});var Yc={get paint(){return Kc=Kc||new vi({"line-opacity":new Le(ie.paint_line["line-opacity"]),"line-color":new Le(ie.paint_line["line-color"]),"line-translate":new Me(ie.paint_line["line-translate"]),"line-translate-anchor":new Me(ie.paint_line["line-translate-anchor"]),"line-width":new Le(ie.paint_line["line-width"]),"line-gap-width":new Le(ie.paint_line["line-gap-width"]),"line-offset":new Le(ie.paint_line["line-offset"]),"line-blur":new Le(ie.paint_line["line-blur"]),"line-dasharray":new Ba(ie.paint_line["line-dasharray"]),"line-pattern":new es(ie.paint_line["line-pattern"]),"line-gradient":new Ra(ie.paint_line["line-gradient"])})},get layout(){return Hc=Hc||new vi({"line-cap":new Me(ie.layout_line["line-cap"]),"line-join":new Le(ie.layout_line["line-join"]),"line-miter-limit":new Me(ie.layout_line["line-miter-limit"]),"line-round-limit":new Me(ie.layout_line["line-round-limit"]),"line-sort-key":new Le(ie.layout_line["line-sort-key"])})}};class Xu extends Le{possiblyEvaluate(e,r){return r=new bt(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(e,r)}evaluate(e,r,s,l){return r=_t({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(e,r,s,l)}}let Qo;function Jc(i,e){return e>0?e+2*i:i}const Wu=Ft([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Hu=Ft([{name:"a_projected_pos",components:3,type:"Float32"}],4);Ft([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const Ku=Ft([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);Ft([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Qc=Ft([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Yu=Ft([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Ju(i,e,r){return i.sections.forEach(s=>{s.text=function(l,u,p){const f=u.layout.get("text-transform").evaluate(p,{});return f==="uppercase"?l=l.toLocaleUpperCase():f==="lowercase"&&(l=l.toLocaleLowerCase()),$i.applyArabicShaping&&(l=$i.applyArabicShaping(l)),l}(s.text,e,r)}),i}Ft([{name:"triangle",components:3,type:"Uint16"}]),Ft([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Ft([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Ft([{type:"Float32",name:"offsetX"}]),Ft([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);const Ya={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Wt=24,eh=ut,th=function(i,e,r,s,l){var u,p,f=8*l-s-1,g=(1<>1,b=-7,E=r?l-1:0,I=r?-1:1,C=i[e+E];for(E+=I,u=C&(1<<-b)-1,C>>=-b,b+=f;b>0;u=256*u+i[e+E],E+=I,b-=8);for(p=u&(1<<-b)-1,u>>=-b,b+=s;b>0;p=256*p+i[e+E],E+=I,b-=8);if(u===0)u=1-v;else{if(u===g)return p?NaN:1/0*(C?-1:1);p+=Math.pow(2,s),u-=v}return(C?-1:1)*p*Math.pow(2,u-s)},ih=function(i,e,r,s,l,u){var p,f,g,v=8*u-l-1,b=(1<>1,I=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=s?0:u-1,P=s?1:-1,R=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,p=b):(p=Math.floor(Math.log(e)/Math.LN2),e*(g=Math.pow(2,-p))<1&&(p--,g*=2),(e+=p+E>=1?I/g:I*Math.pow(2,1-E))*g>=2&&(p++,g/=2),p+E>=b?(f=0,p=b):p+E>=1?(f=(e*g-1)*Math.pow(2,l),p+=E):(f=e*Math.pow(2,E-1)*Math.pow(2,l),p=0));l>=8;i[r+C]=255&f,C+=P,f/=256,l-=8);for(p=p<0;i[r+C]=255&p,C+=P,p/=256,v-=8);i[r+C-P]|=128*R};function ut(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}ut.Varint=0,ut.Fixed64=1,ut.Bytes=2,ut.Fixed32=5;var Wl=4294967296,rh=1/Wl,nh=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function sn(i){return i.type===ut.Bytes?i.readVarint()+i.pos:i.pos+1}function Ys(i,e,r){return r?4294967296*e+(i>>>0):4294967296*(e>>>0)+(i>>>0)}function sh(i,e,r){var s=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(s);for(var l=r.pos-1;l>=i;l--)r.buf[l+s]=r.buf[l]}function Qu(i,e){for(var r=0;r>>8,i[r+2]=e>>>16,i[r+3]=e>>>24}function ah(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16)+(i[e+3]<<24)}ut.prototype={destroy:function(){this.buf=null},readFields:function(i,e,r){for(r=r||this.length;this.pos>3,u=this.pos;this.type=7&s,i(l,e,this),this.pos===u&&this.skip(s)}return e},readMessage:function(i,e){return this.readFields(i,e,this.readVarint()+this.pos)},readFixed32:function(){var i=el(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=ah(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=el(this.buf,this.pos)+el(this.buf,this.pos+4)*Wl;return this.pos+=8,i},readSFixed64:function(){var i=el(this.buf,this.pos)+ah(this.buf,this.pos+4)*Wl;return this.pos+=8,i},readFloat:function(){var i=th(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=th(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var e,r,s=this.buf;return e=127&(r=s[this.pos++]),r<128?e:(e|=(127&(r=s[this.pos++]))<<7,r<128?e:(e|=(127&(r=s[this.pos++]))<<14,r<128?e:(e|=(127&(r=s[this.pos++]))<<21,r<128?e:function(l,u,p){var f,g,v=p.buf;if(f=(112&(g=v[p.pos++]))>>4,g<128||(f|=(127&(g=v[p.pos++]))<<3,g<128)||(f|=(127&(g=v[p.pos++]))<<10,g<128)||(f|=(127&(g=v[p.pos++]))<<17,g<128)||(f|=(127&(g=v[p.pos++]))<<24,g<128)||(f|=(1&(g=v[p.pos++]))<<31,g<128))return Ys(l,f,u);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=s[this.pos]))<<28,i,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2==1?(i+1)/-2:i/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var i=this.readVarint()+this.pos,e=this.pos;return this.pos=i,i-e>=12&&nh?function(r,s,l){return nh.decode(r.subarray(s,l))}(this.buf,e,i):function(r,s,l){for(var u="",p=s;p239?4:b>223?3:b>191?2:1;if(p+I>l)break;I===1?b<128&&(E=b):I===2?(192&(f=r[p+1]))==128&&(E=(31&b)<<6|63&f)<=127&&(E=null):I===3?(g=r[p+2],(192&(f=r[p+1]))==128&&(192&g)==128&&((E=(15&b)<<12|(63&f)<<6|63&g)<=2047||E>=55296&&E<=57343)&&(E=null)):I===4&&(g=r[p+2],v=r[p+3],(192&(f=r[p+1]))==128&&(192&g)==128&&(192&v)==128&&((E=(15&b)<<18|(63&f)<<12|(63&g)<<6|63&v)<=65535||E>=1114112)&&(E=null)),E===null?(E=65533,I=1):E>65535&&(E-=65536,u+=String.fromCharCode(E>>>10&1023|55296),E=56320|1023&E),u+=String.fromCharCode(E),p+=I}return u}(this.buf,e,i)},readBytes:function(){var i=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,i);return this.pos=i,e},readPackedVarint:function(i,e){if(this.type!==ut.Bytes)return i.push(this.readVarint(e));var r=sn(this);for(i=i||[];this.pos127;);else if(e===ut.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ut.Fixed32)this.pos+=4;else{if(e!==ut.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(i,e){this.writeVarint(i<<3|e)},realloc:function(i){for(var e=this.length||16;e268435455||i<0?function(e,r){var s,l;if(e>=0?(s=e%4294967296|0,l=e/4294967296|0):(l=~(-e/4294967296),4294967295^(s=~(-e%4294967296))?s=s+1|0:(s=0,l=l+1|0)),e>=18446744073709552e3||e<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");r.realloc(10),function(u,p,f){f.buf[f.pos++]=127&u|128,u>>>=7,f.buf[f.pos++]=127&u|128,u>>>=7,f.buf[f.pos++]=127&u|128,u>>>=7,f.buf[f.pos++]=127&u|128,f.buf[f.pos]=127&(u>>>=7)}(s,0,r),function(u,p){var f=(7&u)<<4;p.buf[p.pos++]|=f|((u>>>=3)?128:0),u&&(p.buf[p.pos++]=127&u|((u>>>=7)?128:0),u&&(p.buf[p.pos++]=127&u|((u>>>=7)?128:0),u&&(p.buf[p.pos++]=127&u|((u>>>=7)?128:0),u&&(p.buf[p.pos++]=127&u|((u>>>=7)?128:0),u&&(p.buf[p.pos++]=127&u)))))}(l,r)}(i,this):(this.realloc(4),this.buf[this.pos++]=127&i|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=i>>>7&127))))},writeSVarint:function(i){this.writeVarint(i<0?2*-i-1:2*i)},writeBoolean:function(i){this.writeVarint(!!i)},writeString:function(i){i=String(i),this.realloc(4*i.length),this.pos++;var e=this.pos;this.pos=function(s,l,u){for(var p,f,g=0;g55295&&p<57344){if(!f){p>56319||g+1===l.length?(s[u++]=239,s[u++]=191,s[u++]=189):f=p;continue}if(p<56320){s[u++]=239,s[u++]=191,s[u++]=189,f=p;continue}p=f-55296<<10|p-56320|65536,f=null}else f&&(s[u++]=239,s[u++]=191,s[u++]=189,f=null);p<128?s[u++]=p:(p<2048?s[u++]=p>>6|192:(p<65536?s[u++]=p>>12|224:(s[u++]=p>>18|240,s[u++]=p>>12&63|128),s[u++]=p>>6&63|128),s[u++]=63&p|128)}return u}(this.buf,i,this.pos);var r=this.pos-e;r>=128&&sh(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(i){this.realloc(4),ih(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),ih(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var e=i.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&sh(r,s,this),this.pos=r-1,this.writeVarint(s),this.pos+=s},writeMessage:function(i,e,r){this.writeTag(i,ut.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(i,e){e.length&&this.writeMessage(i,Qu,e)},writePackedSVarint:function(i,e){e.length&&this.writeMessage(i,ep,e)},writePackedBoolean:function(i,e){e.length&&this.writeMessage(i,rp,e)},writePackedFloat:function(i,e){e.length&&this.writeMessage(i,tp,e)},writePackedDouble:function(i,e){e.length&&this.writeMessage(i,ip,e)},writePackedFixed32:function(i,e){e.length&&this.writeMessage(i,np,e)},writePackedSFixed32:function(i,e){e.length&&this.writeMessage(i,sp,e)},writePackedFixed64:function(i,e){e.length&&this.writeMessage(i,ap,e)},writePackedSFixed64:function(i,e){e.length&&this.writeMessage(i,op,e)},writeBytesField:function(i,e){this.writeTag(i,ut.Bytes),this.writeBytes(e)},writeFixed32Field:function(i,e){this.writeTag(i,ut.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(i,e){this.writeTag(i,ut.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(i,e){this.writeTag(i,ut.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(i,e){this.writeTag(i,ut.Fixed64),this.writeSFixed64(e)},writeVarintField:function(i,e){this.writeTag(i,ut.Varint),this.writeVarint(e)},writeSVarintField:function(i,e){this.writeTag(i,ut.Varint),this.writeSVarint(e)},writeStringField:function(i,e){this.writeTag(i,ut.Bytes),this.writeString(e)},writeFloatField:function(i,e){this.writeTag(i,ut.Fixed32),this.writeFloat(e)},writeDoubleField:function(i,e){this.writeTag(i,ut.Fixed64),this.writeDouble(e)},writeBooleanField:function(i,e){this.writeVarintField(i,!!e)}};var Hl=vt(eh);const Kl=3;function lp(i,e,r){i===1&&r.readMessage(cp,e)}function cp(i,e,r){if(i===3){const{id:s,bitmap:l,width:u,height:p,left:f,top:g,advance:v}=r.readMessage(hp,{});e.push({id:s,bitmap:new ja({width:u+2*Kl,height:p+2*Kl},l),metrics:{width:u,height:p,left:f,top:g,advance:v}})}}function hp(i,e,r){i===1?e.id=r.readVarint():i===2?e.bitmap=r.readBytes():i===3?e.width=r.readVarint():i===4?e.height=r.readVarint():i===5?e.left=r.readSVarint():i===6?e.top=r.readSVarint():i===7&&(e.advance=r.readVarint())}const oh=Kl;function lh(i){let e=0,r=0;for(const p of i)e+=p.w*p.h,r=Math.max(r,p.w);i.sort((p,f)=>f.h-p.h);const s=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}];let l=0,u=0;for(const p of i)for(let f=s.length-1;f>=0;f--){const g=s[f];if(!(p.w>g.w||p.h>g.h)){if(p.x=g.x,p.y=g.y,u=Math.max(u,p.y+p.h),l=Math.max(l,p.x+p.w),p.w===g.w&&p.h===g.h){const v=s.pop();f=0&&s>=e&&il[this.text.charCodeAt(s)];s--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)}substring(e,r){const s=new Qs;return s.text=this.text.substring(e,r),s.sectionIndex=this.sectionIndex.slice(e,r),s.sections=this.sections,s}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>Math.max(e,this.sections[r].scale),0)}addTextSection(e,r){this.text+=e.text,this.sections.push(Qa.forText(e.scale,e.fontStack||r));const s=this.sections.length-1;for(let l=0;l=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function tl(i,e,r,s,l,u,p,f,g,v,b,E,I,C,P,R){const L=Qs.fromFeature(i,l);let G;E===h.WritingMode.vertical&&L.verticalizePunctuation();const{processBidirectionalText:W,processStyledBidirectionalText:q}=$i;if(W&&L.sections.length===1){G=[];const re=W(L.toString(),Jl(L,v,u,e,s,C,P));for(const Te of re){const Ie=new Qs;Ie.text=Te,Ie.sections=L.sections;for(let xe=0;xe0&&on>zi&&(zi=on)}else{const Ji=Ie[Ge.fontStack],ki=Ji&&Ji[li];if(ki&&ki.rect)Sr=ki.rect,hr=ki.metrics;else{const on=Te[Ge.fontStack],no=on&&on[li];if(!no)continue;hr=no.metrics}fi=(ai-Ge.scale)*Wt}ur?(re.verticalizable=!0,Pi.push({glyph:li,imageName:Ir,x:xt,y:wt+fi,vertical:ur,scale:Ge.scale,fontStack:Ge.fontStack,sectionIndex:qi,metrics:hr,rect:Sr}),xt+=an*Ge.scale+ke):(Pi.push({glyph:li,imageName:Ir,x:xt,y:wt+fi,vertical:ur,scale:Ge.scale,fontStack:Ge.fontStack,sectionIndex:qi,metrics:hr,rect:Sr}),xt+=hr.advance*Ge.scale+ke)}Pi.length!==0&&(qt=Math.max(xt-ke,qt),dp(Pi,0,Pi.length-1,ni,zi)),xt=0;const At=fe*ai+zi;wi.lineOffset=Math.max(zi,di),wt+=At,Yi=Math.max(At,Yi),++Ot}var Ht;const si=wt-Ja,{horizontalAlign:pi,verticalAlign:Mi}=Ql(ve);(function(Ut,ai,di,wi,Pi,zi,At,oi,Ge){const qi=(ai-di)*Pi;let li=0;li=zi!==At?-oi*wi-Ja:(-wi*Ge+.5)*At;for(const fi of Ut)for(const hr of fi.positionedGlyphs)hr.x+=qi,hr.y+=li})(re.positionedLines,ni,pi,Mi,qt,Yi,fe,si,ge.length),re.top+=-Mi*si,re.bottom=re.top+si,re.left+=-pi*qt,re.right=re.left+qt}(Q,e,r,s,G,p,f,g,E,v,I,R),!function(re){for(const Te of re)if(Te.positionedGlyphs.length!==0)return!1;return!0}(Y)&&Q}const il={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},up={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function hh(i,e,r,s,l,u){if(e.imageName){const p=s[e.imageName];return p?p.displaySize[0]*e.scale*Wt/u+l:0}{const p=r[e.fontStack],f=p&&p[i];return f?f.metrics.advance*e.scale+l:0}}function uh(i,e,r,s){const l=Math.pow(i-e,2);return s?i=0;let b=0;for(let I=0;Ip.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ll([]),this.placementViewportMatrix=Ll([]);const r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=mh(this.zoom,r["text-size"]),this.iconSizeData=mh(this.zoom,r["icon-size"]);const s=this.layers[0].layout,l=s.get("symbol-sort-key"),u=s.get("symbol-z-order");this.canOverlap=ec(s,"text-overlap","text-allow-overlap")!=="never"||ec(s,"icon-overlap","icon-allow-overlap")!=="never"||s.get("text-ignore-placement")||s.get("icon-ignore-placement"),this.sortFeaturesByKey=u!=="viewport-y"&&!l.isConstant(),this.sortFeaturesByY=(u==="viewport-y"||u==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,s.get("symbol-placement")==="point"&&(this.writingModes=s.get("text-writing-mode").map(p=>h.WritingMode[p])),this.stateDependentLayerIds=this.layers.filter(p=>p.isStateDependent()).map(p=>p.id),this.sourceID=e.sourceID}createArrays(){this.text=new ic(new Tr(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new ic(new Tr(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new x,this.lineVertexArray=new T,this.symbolInstances=new _}calculateGlyphDependencies(e,r,s,l,u){for(let p=0;p0)&&(p.value.kind!=="constant"||p.value.value.length>0),b=g.value.kind!=="constant"||!!g.value.value||Object.keys(g.parameters).length>0,E=u.get("symbol-sort-key");if(this.features=[],!v&&!b)return;const I=r.iconDependencies,C=r.glyphDependencies,P=r.availableImages,R=new bt(this.zoom);for(const{feature:L,id:G,index:W,sourceLayerIndex:q}of e){const Y=l._featureFilter.needGeometry,Q=ns(L,Y);if(!l._featureFilter.filter(R,Q,s))continue;let re,Te;if(Y||(Q.geometry=Er(L)),v){const xe=l.getValueAndResolveTokens("text-field",Q,s,P),ge=Qt.factory(xe);_p(ge)&&(this.hasRTLText=!0),(!this.hasRTLText||ka()==="unavailable"||this.hasRTLText&&$i.isParsed())&&(re=Ju(ge,l,Q))}if(b){const xe=l.getValueAndResolveTokens("icon-image",Q,s,P);Te=xe instanceof Oi?xe:Oi.fromString(xe)}if(!re&&!Te)continue;const Ie=this.sortFeaturesByKey?E.evaluate(Q,{},s):void 0;if(this.features.push({id:G,text:re,icon:Te,index:W,sourceLayerIndex:q,geometry:Q.geometry,properties:L.properties,type:mp[L.type],sortKey:Ie}),Te&&(I[Te.name]=!0),re){const xe=p.evaluate(Q,{},s).join(","),ge=u.get("text-rotation-alignment")!=="viewport"&&u.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(h.WritingMode.vertical)>=0;for(const fe of re.sections)if(fe.image)I[fe.image.name]=!0;else{const ve=Ps(re.toString()),_e=fe.fontStack||xe,he=C[_e]=C[_e]||{};this.calculateGlyphDependencies(fe.text,he,ge,this.allowVerticalPlacement,ve)}}}u.get("symbol-placement")==="line"&&(this.features=function(L){const G={},W={},q=[];let Y=0;function Q(xe){q.push(L[xe]),Y++}function re(xe,ge,fe){const ve=W[xe];return delete W[xe],W[ge]=ve,q[ve].geometry[0].pop(),q[ve].geometry[0]=q[ve].geometry[0].concat(fe[0]),ve}function Te(xe,ge,fe){const ve=G[ge];return delete G[ge],G[xe]=ve,q[ve].geometry[0].shift(),q[ve].geometry[0]=fe[0].concat(q[ve].geometry[0]),ve}function Ie(xe,ge,fe){const ve=fe?ge[0][ge[0].length-1]:ge[0][0];return`${xe}:${ve.x}:${ve.y}`}for(let xe=0;xexe.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((L,G)=>L.sortKey-G.sortKey)}update(e,r,s){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,r,this.layers,s),this.icon.programConfigurations.updatePaintArrays(e,r,this.layers,s))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,r){const s=this.lineVertexArray.length;if(e.segment!==void 0){let l=e.dist(r[e.segment+1]),u=e.dist(r[e.segment]);const p={};for(let f=e.segment+1;f=0;f--)p[f]={x:r[f].x,y:r[f].y,tileUnitDistanceFromAnchor:u},f>0&&(u+=r[f-1].dist(r[f]));for(let f=0;f0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,r){const s=e.placedSymbolArray.get(r),l=s.vertexStartIndex+4*s.numGlyphs;for(let u=s.vertexStartIndex;ul[f]-l[g]||u[g]-u[f]),p}addToSortKeyRanges(e,r){const s=this.sortKeyRanges[this.sortKeyRanges.length-1];s&&s.sortKey===r?s.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:r,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const r of this.symbolInstanceIndexes){const s=this.symbolInstances.get(r);this.featureSortOrder.push(s.featureIndex),[s.rightJustifiedTextSymbolIndex,s.centerJustifiedTextSymbolIndex,s.leftJustifiedTextSymbolIndex].forEach((l,u,p)=>{l>=0&&p.indexOf(l)===u&&this.addIndicesForPlacedSymbol(this.text,l)}),s.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,s.verticalPlacedTextSymbolIndex),s.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.placedIconSymbolIndex),s.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let gh,_h;Ee("SymbolBucket",ea,{omit:["layers","collisionBoxArray","features","compareText"]}),ea.MAX_GLYPHS=65535,ea.addDynamicAttributes=tc;var nc={get paint(){return _h=_h||new vi({"icon-opacity":new Le(ie.paint_symbol["icon-opacity"]),"icon-color":new Le(ie.paint_symbol["icon-color"]),"icon-halo-color":new Le(ie.paint_symbol["icon-halo-color"]),"icon-halo-width":new Le(ie.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Le(ie.paint_symbol["icon-halo-blur"]),"icon-translate":new Me(ie.paint_symbol["icon-translate"]),"icon-translate-anchor":new Me(ie.paint_symbol["icon-translate-anchor"]),"text-opacity":new Le(ie.paint_symbol["text-opacity"]),"text-color":new Le(ie.paint_symbol["text-color"],{runtimeType:yi,getOverride:i=>i.textColor,hasOverride:i=>!!i.textColor}),"text-halo-color":new Le(ie.paint_symbol["text-halo-color"]),"text-halo-width":new Le(ie.paint_symbol["text-halo-width"]),"text-halo-blur":new Le(ie.paint_symbol["text-halo-blur"]),"text-translate":new Me(ie.paint_symbol["text-translate"]),"text-translate-anchor":new Me(ie.paint_symbol["text-translate-anchor"])})},get layout(){return gh=gh||new vi({"symbol-placement":new Me(ie.layout_symbol["symbol-placement"]),"symbol-spacing":new Me(ie.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Me(ie.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Le(ie.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Me(ie.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Me(ie.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Me(ie.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Me(ie.layout_symbol["icon-ignore-placement"]),"icon-optional":new Me(ie.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Me(ie.layout_symbol["icon-rotation-alignment"]),"icon-size":new Le(ie.layout_symbol["icon-size"]),"icon-text-fit":new Me(ie.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Me(ie.layout_symbol["icon-text-fit-padding"]),"icon-image":new Le(ie.layout_symbol["icon-image"]),"icon-rotate":new Le(ie.layout_symbol["icon-rotate"]),"icon-padding":new Le(ie.layout_symbol["icon-padding"]),"icon-keep-upright":new Me(ie.layout_symbol["icon-keep-upright"]),"icon-offset":new Le(ie.layout_symbol["icon-offset"]),"icon-anchor":new Le(ie.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Me(ie.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Me(ie.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Me(ie.layout_symbol["text-rotation-alignment"]),"text-field":new Le(ie.layout_symbol["text-field"]),"text-font":new Le(ie.layout_symbol["text-font"]),"text-size":new Le(ie.layout_symbol["text-size"]),"text-max-width":new Le(ie.layout_symbol["text-max-width"]),"text-line-height":new Me(ie.layout_symbol["text-line-height"]),"text-letter-spacing":new Le(ie.layout_symbol["text-letter-spacing"]),"text-justify":new Le(ie.layout_symbol["text-justify"]),"text-radial-offset":new Le(ie.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Me(ie.layout_symbol["text-variable-anchor"]),"text-anchor":new Le(ie.layout_symbol["text-anchor"]),"text-max-angle":new Me(ie.layout_symbol["text-max-angle"]),"text-writing-mode":new Me(ie.layout_symbol["text-writing-mode"]),"text-rotate":new Le(ie.layout_symbol["text-rotate"]),"text-padding":new Me(ie.layout_symbol["text-padding"]),"text-keep-upright":new Me(ie.layout_symbol["text-keep-upright"]),"text-transform":new Le(ie.layout_symbol["text-transform"]),"text-offset":new Le(ie.layout_symbol["text-offset"]),"text-allow-overlap":new Me(ie.layout_symbol["text-allow-overlap"]),"text-overlap":new Me(ie.layout_symbol["text-overlap"]),"text-ignore-placement":new Me(ie.layout_symbol["text-ignore-placement"]),"text-optional":new Me(ie.layout_symbol["text-optional"])})}};class yh{constructor(e){if(e.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:Br,this.defaultValue=e}evaluate(e){if(e.formattedSection){const r=this.defaultValue.property.overrides;if(r&&r.hasOverride(e.formattedSection))return r.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ee("FormatSectionOverride",yh,{omit:["defaultValue"]});class nl extends or{constructor(e){super(e,nc)}recalculate(e,r){if(super.recalculate(e,r),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const s=this.layout.get("text-writing-mode");if(s){const l=[];for(const u of s)l.indexOf(u)<0&&l.push(u);this.layout._values["text-writing-mode"]=l}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,s,l){const u=this.layout.get(e).evaluate(r,{},s,l),p=this._unevaluatedLayout._values[e];return p.isDataDriven()||ws(p.value)||!u?u:function(f,g){return g.replace(/{([^{}]+)}/g,(v,b)=>b in f?String(f[b]):"")}(r.properties,u)}createBucket(e){return new ea(e)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const e of nc.paint.overridableProperties){if(!nl.hasPaintOverride(this.layout,e))continue;const r=this.paint.get(e),s=new yh(r),l=new va(s,r.property.specification);let u=null;u=r.value.kind==="constant"||r.value.kind==="source"?new ba("source",l):new We("composite",l,r.value.zoomStops),this.paint._values[e]=new ar(r.property,u,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,s){return!(!this.layout||r.isDataDriven()||s.isDataDriven())&&nl.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){const s=e.get("text-field"),l=nc.paint.properties[r];let u=!1;const p=f=>{for(const g of f)if(l.overrides&&l.overrides.hasOverride(g))return void(u=!0)};if(s.value.kind==="constant"&&s.value.value instanceof Qt)p(s.value.value.sections);else if(s.value.kind==="source"){const f=v=>{u||(v instanceof Fr&&Bt(v.value)===yr?p(v.value.sections):v instanceof vs?p(v.sections):v.eachChild(f))},g=s.value;g._styleExpression&&f(g._styleExpression.expression)}return u}}let xh;var yp={get paint(){return xh=xh||new vi({"background-color":new Me(ie.paint_background["background-color"]),"background-pattern":new Ba(ie.paint_background["background-pattern"]),"background-opacity":new Me(ie.paint_background["background-opacity"])})}};let vh;var xp={get paint(){return vh=vh||new vi({"raster-opacity":new Me(ie.paint_raster["raster-opacity"]),"raster-hue-rotate":new Me(ie.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Me(ie.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Me(ie.paint_raster["raster-brightness-max"]),"raster-saturation":new Me(ie.paint_raster["raster-saturation"]),"raster-contrast":new Me(ie.paint_raster["raster-contrast"]),"raster-resampling":new Me(ie.paint_raster["raster-resampling"]),"raster-fade-duration":new Me(ie.paint_raster["raster-fade-duration"])})}};class vp extends or{constructor(e){super(e,{}),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=e}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}const bp={circle:class extends or{constructor(i){super(i,lu)}createBucket(i){return new zl(i)}queryRadius(i){const e=i;return $a("circle-radius",this,e)+$a("circle-stroke-width",this,e)+Go(this.paint.get("circle-translate"))}queryIntersectsFeature(i,e,r,s,l,u,p,f){const g=Xo(i,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),u.angle,p),v=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),b=this.paint.get("circle-pitch-alignment")==="map",E=b?g:function(C,P){return C.map(R=>Mc(R,P))}(g,f),I=b?v*p:v;for(const C of s)for(const P of C){const R=b?P:Mc(P,f);let L=I;const G=Wo([],[P.x,P.y,0,1],f);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?L*=G[3]/u.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(L*=u.cameraToCenterDistance/G[3]),nu(E,R,L))return!0}return!1}},heatmap:class extends or{createBucket(i){return new Pc(i)}constructor(i){super(i,hu),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(i){i==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Dc({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}},hillshade:class extends or{constructor(i){super(i,uu)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}},fill:class extends or{constructor(i){super(i,Iu)}recalculate(i,e){super.recalculate(i,e);const r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(i){return new jl(i)}queryRadius(){return Go(this.paint.get("fill-translate"))}queryIntersectsFeature(i,e,r,s,l,u,p){return Tc(Xo(i,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),u.angle,p),s)}isTileClipped(){return!0}},"fill-extrusion":class extends or{constructor(i){super(i,Vu)}createBucket(i){return new Gl(i)}queryRadius(){return Go(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(i,e,r,s,l,u,p,f){const g=Xo(i,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),u.angle,p),v=this.paint.get("fill-extrusion-height").evaluate(e,r),b=this.paint.get("fill-extrusion-base").evaluate(e,r),E=function(C,P,R,L){const G=[];for(const W of C){const q=[W.x,W.y,0,1];Wo(q,q,P),G.push(new Ae(q[0]/q[3],q[1]/q[3]))}return G}(g,f),I=function(C,P,R,L){const G=[],W=[],q=L[8]*P,Y=L[9]*P,Q=L[10]*P,re=L[11]*P,Te=L[8]*R,Ie=L[9]*R,xe=L[10]*R,ge=L[11]*R;for(const fe of C){const ve=[],_e=[];for(const he of fe){const ke=he.x,Ce=he.y,Ze=L[0]*ke+L[4]*Ce+L[12],xt=L[1]*ke+L[5]*Ce+L[13],wt=L[2]*ke+L[6]*Ce+L[14],qt=L[3]*ke+L[7]*Ce+L[15],Yi=wt+Q,ni=qt+re,Ot=Ze+Te,Ht=xt+Ie,si=wt+xe,pi=qt+ge,Mi=new Ae((Ze+q)/ni,(xt+Y)/ni);Mi.z=Yi/ni,ve.push(Mi);const Ut=new Ae(Ot/pi,Ht/pi);Ut.z=si/pi,_e.push(Ut)}G.push(ve),W.push(_e)}return[G,W]}(s,b,v,f);return function(C,P,R){let L=1/0;Tc(R,P)&&(L=Xc(R,P[0]));for(let G=0;G=3){for(let R=0;R{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){delete this._channel,this._callback=()=>{}}}const sc=63710088e-1;class Dn{constructor(e,r){if(isNaN(e)||isNaN(r))throw new Error(`Invalid LngLat object: (${e}, ${r})`);if(this.lng=+e,this.lat=+r,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Dn(mi(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){const r=Math.PI/180,s=this.lat*r,l=e.lat*r,u=Math.sin(s)*Math.sin(l)+Math.cos(s)*Math.cos(l)*Math.cos((e.lng-this.lng)*r);return sc*Math.acos(Math.min(u,1))}static convert(e){if(e instanceof Dn)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Dn(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e!==null)return new Dn(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const bh=2*Math.PI*sc;function wh(i){return bh*Math.cos(i*Math.PI/180)}function Th(i){return(180+i)/360}function Eh(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Sh(i,e){return i/wh(e)}function ac(i){return 360/Math.PI*Math.atan(Math.exp((180-360*i)*Math.PI/180))-90}class sl{constructor(e,r,s=0){this.x=+e,this.y=+r,this.z=+s}static fromLngLat(e,r=0){const s=Dn.convert(e);return new sl(Th(s.lng),Eh(s.lat),Sh(r,s.lat))}toLngLat(){return new Dn(360*this.x-180,ac(this.y))}toAltitude(){return this.z*wh(ac(this.y))}meterInMercatorCoordinateUnits(){return 1/bh*(e=ac(this.y),1/Math.cos(e*Math.PI/180));var e}}function Ih(i,e,r){var s=2*Math.PI*6378137/256/Math.pow(2,r);return[i*s-2*Math.PI*6378137/2,e*s-2*Math.PI*6378137/2]}class oc{constructor(e,r,s){if(e<0||e>25||s<0||s>=Math.pow(2,e)||r<0||r>=Math.pow(2,e))throw new Error(`x=${r}, y=${s}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=r,this.y=s,this.key=to(0,e,e,r,s)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,r,s){const l=(p=this.y,f=this.z,g=Ih(256*(u=this.x),256*(p=Math.pow(2,f)-p-1),f),v=Ih(256*(u+1),256*(p+1),f),g[0]+","+g[1]+","+v[0]+","+v[1]);var u,p,f,g,v;const b=function(E,I,C){let P,R="";for(let L=E;L>0;L--)P=1<1?"@2x":"").replace(/{quadkey}/g,b).replace(/{bbox-epsg-3857}/g,l)}isChildOf(e){const r=this.z-e.z;return r>0&&e.x===this.x>>r&&e.y===this.y>>r}getTilePoint(e){const r=Math.pow(2,this.z);return new Ae((e.x*r-this.x)*yt,(e.y*r-this.y)*yt)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Ah{constructor(e,r){this.wrap=e,this.canonical=r,this.key=to(e,r.z,r.z,r.x,r.y)}}class Ki{constructor(e,r,s,l,u){if(e= z; overscaledZ = ${e}; z = ${s}`);this.overscaledZ=e,this.wrap=r,this.canonical=new oc(s,+l,+u),this.key=to(r,e,s,l,u)}clone(){return new Ki(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const r=this.canonical.z-e;return e>this.canonical.z?new Ki(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ki(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}calculateScaledKey(e,r){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const s=this.canonical.z-e;return e>this.canonical.z?to(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):to(this.wrap*+r,e,e,this.canonical.x>>s,this.canonical.y>>s)}isChildOf(e){if(e.wrap!==this.wrap)return!1;const r=this.canonical.z-e.canonical.z;return e.overscaledZ===0||e.overscaledZ>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new Ki(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const r=this.canonical.z+1,s=2*this.canonical.x,l=2*this.canonical.y;return[new Ki(r,this.wrap,r,s,l),new Ki(r,this.wrap,r,s+1,l),new Ki(r,this.wrap,r,s,l+1),new Ki(r,this.wrap,r,s+1,l+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ythis.max&&(this.max=f),f=this.dim+1||r<-1||r>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(r+1)*this.stride+(e+1)}_unpackMapbox(e,r,s){return(256*e*256+256*r+s)/10-1e4}_unpackTerrarium(e,r,s){return 256*e+r+s/256-32768}getPixels(){return new Hi({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,r,s){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let l=r*this.dim,u=r*this.dim+this.dim,p=s*this.dim,f=s*this.dim+this.dim;switch(r){case-1:l=u-1;break;case 1:u=l+1}switch(s){case-1:p=f-1;break;case 1:f=p+1}const g=-r*this.dim,v=-s*this.dim;for(let b=p;b=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class Ph{constructor(e,r,s,l,u){this.type="Feature",this._vectorTileFeature=e,e._z=r,e._x=s,e._y=l,this.properties=e.properties,this.id=u}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(e){this._geometry=e}toJSON(){const e={geometry:this.geometry};for(const r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&(e[r]=this[r]);return e}}class zh{constructor(e,r){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new Kn(yt,16,0),this.grid3D=new Kn(yt,16,0),this.featureIndexArray=new M,this.promoteId=r}insert(e,r,s,l,u,p){const f=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(s,l,u);const g=p?this.grid3D:this.grid;for(let v=0;v=0&&E[3]>=0&&g.insert(f,E[0],E[1],E[2],E[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Pn.VectorTile(new Hl(this.rawTileData)).layers,this.sourceLayerCoder=new Mh(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,r,s,l){this.loadVTLayers();const u=e.params||{},p=yt/e.tileSize/e.scale,f=wa(u.filter),g=e.queryGeometry,v=e.queryPadding*p,b=Dh(g),E=this.grid.query(b.minX-v,b.minY-v,b.maxX+v,b.maxY+v),I=Dh(e.cameraQueryGeometry),C=this.grid3D.query(I.minX-v,I.minY-v,I.maxX+v,I.maxY+v,(L,G,W,q)=>function(Y,Q,re,Te,Ie){for(const ge of Y)if(Q<=ge.x&&re<=ge.y&&Te>=ge.x&&Ie>=ge.y)return!0;const xe=[new Ae(Q,re),new Ae(Q,Ie),new Ae(Te,Ie),new Ae(Te,re)];if(Y.length>2){for(const ge of xe)if(Xs(Y,ge))return!0}for(let ge=0;ge(q||(q=Er(Y)),Q.queryIntersectsFeature(g,Y,re,q,this.z,e.transform,p,e.pixelPosMatrix)))}return P}loadMatchingFeature(e,r,s,l,u,p,f,g,v,b,E){const I=this.bucketLayerIDs[r];if(p&&!function(L,G){for(let W=0;W=0)return!0;return!1}(p,I))return;const C=this.sourceLayerCoder.decode(s),P=this.vtLayers[C].feature(l);if(u.needGeometry){const L=ns(P,!0);if(!u.filter(new bt(this.tileID.overscaledZ),L,this.tileID.canonical))return}else if(!u.filter(new bt(this.tileID.overscaledZ),P))return;const R=this.getId(P,C);for(let L=0;L{const f=e instanceof Fs?e.get(p):null;return f&&f.evaluate?f.evaluate(r,s,l):f})}function Dh(i){let e=1/0,r=1/0,s=-1/0,l=-1/0;for(const u of i)e=Math.min(e,u.x),r=Math.min(r,u.y),s=Math.max(s,u.x),l=Math.max(l,u.y);return{minX:e,minY:r,maxX:s,maxY:l}}function Tp(i,e){return e-i}function Lh(i,e,r,s,l){const u=[];for(let p=0;p=s&&E.x>=s||(b.x>=s?b=new Ae(s,b.y+(s-b.x)/(E.x-b.x)*(E.y-b.y))._round():E.x>=s&&(E=new Ae(s,b.y+(s-b.x)/(E.x-b.x)*(E.y-b.y))._round()),b.y>=l&&E.y>=l||(b.y>=l?b=new Ae(b.x+(l-b.y)/(E.y-b.y)*(E.x-b.x),l)._round():E.y>=l&&(E=new Ae(b.x+(l-b.y)/(E.y-b.y)*(E.x-b.x),l)._round()),g&&b.equals(g[g.length-1])||(g=[b],u.push(g)),g.push(E)))))}}return u}Ee("FeatureIndex",zh,{omit:["rawTileData","sourceLayerCoder"]});class Ln extends Ae{constructor(e,r,s,l){super(e,r),this.angle=s,l!==void 0&&(this.segment=l)}clone(){return new Ln(this.x,this.y,this.angle,this.segment)}}function Bh(i,e,r,s,l){if(e.segment===void 0)return!0;let u=e,p=e.segment+1,f=0;for(;f>-r/2;){if(p--,p<0)return!1;f-=i[p].dist(u),u=i[p]}f+=i[p].dist(i[p+1]),p++;const g=[];let v=0;for(;fs;)v-=g.shift().angleDelta;if(v>l)return!1;p++,f+=b.dist(E)}return!0}function Rh(i){let e=0;for(let r=0;rv){const P=(v-g)/C,R=Ei.number(E.x,I.x,P),L=Ei.number(E.y,I.y,P),G=new Ln(R,L,I.angleTo(E),b);return G._round(),!p||Bh(i,G,f,p,e)?G:void 0}g+=C}}function Sp(i,e,r,s,l,u,p,f,g){const v=Fh(s,u,p),b=Oh(s,l),E=b*p,I=i[0].x===0||i[0].x===g||i[0].y===0||i[0].y===g;return e-E=0&&Y=0&&Q=0&&I+v<=b){const re=new Ln(Y,Q,W,P);re._round(),s&&!Bh(i,re,u,s,l)||C.push(re)}}E+=G}return f||C.length||p||(C=Uh(i,E/2,r,s,l,u,p,!0,g)),C}Ee("Anchor",Ln);const ta=Ci;function Vh(i,e,r,s){const l=[],u=i.image,p=u.pixelRatio,f=u.paddedRect.w-2*ta,g=u.paddedRect.h-2*ta,v=i.right-i.left,b=i.bottom-i.top,E=u.stretchX||[[0,f]],I=u.stretchY||[[0,g]],C=(fe,ve)=>fe+ve[1]-ve[0],P=E.reduce(C,0),R=I.reduce(C,0),L=f-P,G=g-R;let W=0,q=P,Y=0,Q=R,re=0,Te=L,Ie=0,xe=G;if(u.content&&s){const fe=u.content;W=al(E,0,fe[0]),Y=al(I,0,fe[1]),q=al(E,fe[0],fe[2]),Q=al(I,fe[1],fe[3]),re=fe[0]-W,Ie=fe[1]-Y,Te=fe[2]-fe[0]-q,xe=fe[3]-fe[1]-Q}const ge=(fe,ve,_e,he)=>{const ke=ol(fe.stretch-W,q,v,i.left),Ce=ll(fe.fixed-re,Te,fe.stretch,P),Ze=ol(ve.stretch-Y,Q,b,i.top),xt=ll(ve.fixed-Ie,xe,ve.stretch,R),wt=ol(_e.stretch-W,q,v,i.left),qt=ll(_e.fixed-re,Te,_e.stretch,P),Yi=ol(he.stretch-Y,Q,b,i.top),ni=ll(he.fixed-Ie,xe,he.stretch,R),Ot=new Ae(ke,Ze),Ht=new Ae(wt,Ze),si=new Ae(wt,Yi),pi=new Ae(ke,Yi),Mi=new Ae(Ce/p,xt/p),Ut=new Ae(qt/p,ni/p),ai=e*Math.PI/180;if(ai){const Pi=Math.sin(ai),zi=Math.cos(ai),At=[zi,-Pi,Pi,zi];Ot._matMult(At),Ht._matMult(At),pi._matMult(At),si._matMult(At)}const di=fe.stretch+fe.fixed,wi=ve.stretch+ve.fixed;return{tl:Ot,tr:Ht,bl:pi,br:si,tex:{x:u.paddedRect.x+ta+di,y:u.paddedRect.y+ta+wi,w:_e.stretch+_e.fixed-di,h:he.stretch+he.fixed-wi},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Mi,pixelOffsetBR:Ut,minFontScaleX:Te/p/v,minFontScaleY:xe/p/b,isSDF:r}};if(s&&(u.stretchX||u.stretchY)){const fe=Nh(E,L,P),ve=Nh(I,G,R);for(let _e=0;_e0&&(P=Math.max(10,P),this.circleDiameter=P)}else{let E=p.top*f-g[0],I=p.bottom*f+g[2],C=p.left*f-g[3],P=p.right*f+g[1];const R=p.collisionPadding;if(R&&(C-=R[0]*f,E-=R[1]*f,P+=R[2]*f,I+=R[3]*f),b){const L=new Ae(C,E),G=new Ae(P,E),W=new Ae(C,I),q=new Ae(P,I),Y=b*Math.PI/180;L._rotate(Y),G._rotate(Y),W._rotate(Y),q._rotate(Y),C=Math.min(L.x,G.x,W.x,q.x),P=Math.max(L.x,G.x,W.x,q.x),E=Math.min(L.y,G.y,W.y,q.y),I=Math.max(L.y,G.y,W.y,q.y)}e.emplaceBack(r.x,r.y,C,E,P,I,s,l,u)}this.boxEndIndex=e.length}}class Ip{constructor(e=[],r=Ap){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:r,compare:s}=this,l=r[e];for(;e>0;){const u=e-1>>1,p=r[u];if(s(l,p)>=0)break;r[e]=p,e=u}r[e]=l}_down(e){const{data:r,compare:s}=this,l=this.length>>1,u=r[e];for(;e=0)break;r[e]=f,e=p}r[e]=u}}function Ap(i,e){return ie?1:0}function Cp(i,e=1,r=!1){let s=1/0,l=1/0,u=-1/0,p=-1/0;const f=i[0];for(let C=0;Cu)&&(u=P.x),(!C||P.y>p)&&(p=P.y)}const g=Math.min(u-s,p-l);let v=g/2;const b=new Ip([],Mp);if(g===0)return new Ae(s,l);for(let C=s;CE.d||!E.d)&&(E=C,r&&console.log("found best %d after %d probes",Math.round(1e4*C.d)/1e4,I)),C.max-E.d<=e||(v=C.h/2,b.push(new ia(C.p.x-v,C.p.y-v,v,i)),b.push(new ia(C.p.x+v,C.p.y-v,v,i)),b.push(new ia(C.p.x-v,C.p.y+v,v,i)),b.push(new ia(C.p.x+v,C.p.y+v,v,i)),I+=4)}return r&&(console.log(`num probes: ${I}`),console.log(`best distance: ${E.d}`)),E.p}function Mp(i,e){return e.max-i.max}function ia(i,e,r,s){this.p=new Ae(i,e),this.h=r,this.d=function(l,u){let p=!1,f=1/0;for(let g=0;gl.y!=P.y>l.y&&l.x<(P.x-C.x)*(l.y-C.y)/(P.y-C.y)+C.x&&(p=!p),f=Math.min(f,Ec(l,C,P))}}return(p?1:-1)*Math.sqrt(f)}(this.p,s),this.max=this.d+this.h*Math.SQRT2}const lc=Number.POSITIVE_INFINITY;function $h(i,e){return e[1]!==lc?function(r,s,l){let u=0,p=0;switch(s=Math.abs(s),l=Math.abs(l),r){case"top-right":case"top-left":case"top":p=l-7;break;case"bottom-right":case"bottom-left":case"bottom":p=7-l}switch(r){case"top-right":case"bottom-right":case"right":u=-s;break;case"top-left":case"bottom-left":case"left":u=s}return[u,p]}(i,e[0],e[1]):function(r,s){let l=0,u=0;s<0&&(s=0);const p=s/Math.sqrt(2);switch(r){case"top-right":case"top-left":u=p-7;break;case"bottom-right":case"bottom-left":u=7-p;break;case"bottom":u=7-s;break;case"top":u=s-7}switch(r){case"top-right":case"bottom-right":l=-p;break;case"top-left":case"bottom-left":l=p;break;case"left":l=s;break;case"right":l=-s}return[l,u]}(i,e[0])}function cc(i){switch(i){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Pp(i,e,r,s,l,u,p,f,g,v,b){let E=u.textMaxSize.evaluate(e,{});E===void 0&&(E=p);const I=i.layers[0].layout,C=I.get("icon-offset").evaluate(e,{},b),P=jh(r.horizontal),R=p/24,L=i.tilePixelRatio*R,G=i.tilePixelRatio*E/24,W=i.tilePixelRatio*f,q=i.tilePixelRatio*I.get("symbol-spacing"),Y=I.get("text-padding")*i.tilePixelRatio,Q=function(he,ke,Ce,Ze=1){const xt=he.get("icon-padding").evaluate(ke,{},Ce),wt=xt&&xt.values;return[wt[0]*Ze,wt[1]*Ze,wt[2]*Ze,wt[3]*Ze]}(I,e,b,i.tilePixelRatio),re=I.get("text-max-angle")/180*Math.PI,Te=I.get("text-rotation-alignment")!=="viewport"&&I.get("symbol-placement")!=="point",Ie=I.get("icon-rotation-alignment")==="map"&&I.get("symbol-placement")!=="point",xe=I.get("symbol-placement"),ge=q/2,fe=I.get("icon-text-fit");let ve;s&&fe!=="none"&&(i.allowVerticalPlacement&&r.vertical&&(ve=fh(s,r.vertical,fe,I.get("icon-text-fit-padding"),C,R)),P&&(s=fh(s,P,fe,I.get("icon-text-fit-padding"),C,R)));const _e=(he,ke)=>{ke.x<0||ke.x>=yt||ke.y<0||ke.y>=yt||function(Ce,Ze,xt,wt,qt,Yi,ni,Ot,Ht,si,pi,Mi,Ut,ai,di,wi,Pi,zi,At,oi,Ge,qi,li,fi,hr){const Sr=Ce.addToLineVertexArray(Ze,xt);let Ir,an,ur,Ji,ki=0,on=0,no=0,Wh=0,_c=-1,yc=-1;const ln={};let Hh=zt(""),xc=0,vc=0;if(Ot._unevaluatedLayout.getValue("text-radial-offset")===void 0?[xc,vc]=Ot.layout.get("text-offset").evaluate(Ge,{},fi).map(Di=>Di*Wt):(xc=Ot.layout.get("text-radial-offset").evaluate(Ge,{},fi)*Wt,vc=lc),Ce.allowVerticalPlacement&&wt.vertical){const Di=Ot.layout.get("text-rotate").evaluate(Ge,{},fi)+90;ur=new cl(Ht,Ze,si,pi,Mi,wt.vertical,Ut,ai,di,Di),ni&&(Ji=new cl(Ht,Ze,si,pi,Mi,ni,Pi,zi,di,Di))}if(qt){const Di=Ot.layout.get("icon-rotate").evaluate(Ge,{}),qr=Ot.layout.get("icon-text-fit")!=="none",so=Vh(qt,Di,li,qr),ao=ni?Vh(ni,Di,li,qr):void 0;an=new cl(Ht,Ze,si,pi,Mi,qt,Pi,zi,!1,Di),ki=4*so.length;const Jh=Ce.iconSizeData;let as=null;Jh.kind==="source"?(as=[$r*Ot.layout.get("icon-size").evaluate(Ge,{})],as[0]>kn&&ti(`${Ce.layerIds[0]}: Value for "icon-size" is >= ${eo}. Reduce your "icon-size".`)):Jh.kind==="composite"&&(as=[$r*qi.compositeIconSizes[0].evaluate(Ge,{},fi),$r*qi.compositeIconSizes[1].evaluate(Ge,{},fi)],(as[0]>kn||as[1]>kn)&&ti(`${Ce.layerIds[0]}: Value for "icon-size" is >= ${eo}. Reduce your "icon-size".`)),Ce.addSymbols(Ce.icon,so,as,oi,At,Ge,h.WritingMode.none,Ze,Sr.lineStartIndex,Sr.lineLength,-1,fi),_c=Ce.icon.placedSymbolArray.length-1,ao&&(on=4*ao.length,Ce.addSymbols(Ce.icon,ao,as,oi,At,Ge,h.WritingMode.vertical,Ze,Sr.lineStartIndex,Sr.lineLength,-1,fi),yc=Ce.icon.placedSymbolArray.length-1)}const Kh=Object.keys(wt.horizontal);for(const Di of Kh){const qr=wt.horizontal[Di];if(!Ir){Hh=zt(qr.text);const ao=Ot.layout.get("text-rotate").evaluate(Ge,{},fi);Ir=new cl(Ht,Ze,si,pi,Mi,qr,Ut,ai,di,ao)}const so=qr.positionedLines.length===1;if(no+=qh(Ce,Ze,qr,Yi,Ot,di,Ge,wi,Sr,wt.vertical?h.WritingMode.horizontal:h.WritingMode.horizontalOnly,so?Kh:[Di],ln,_c,qi,fi),so)break}wt.vertical&&(Wh+=qh(Ce,Ze,wt.vertical,Yi,Ot,di,Ge,wi,Sr,h.WritingMode.vertical,["vertical"],ln,yc,qi,fi));const Dp=Ir?Ir.boxStartIndex:Ce.collisionBoxArray.length,Lp=Ir?Ir.boxEndIndex:Ce.collisionBoxArray.length,Bp=ur?ur.boxStartIndex:Ce.collisionBoxArray.length,Rp=ur?ur.boxEndIndex:Ce.collisionBoxArray.length,Fp=an?an.boxStartIndex:Ce.collisionBoxArray.length,Op=an?an.boxEndIndex:Ce.collisionBoxArray.length,Up=Ji?Ji.boxStartIndex:Ce.collisionBoxArray.length,Vp=Ji?Ji.boxEndIndex:Ce.collisionBoxArray.length;let Ar=-1;const ul=(Di,qr)=>Di&&Di.circleDiameter?Math.max(Di.circleDiameter,qr):qr;Ar=ul(Ir,Ar),Ar=ul(ur,Ar),Ar=ul(an,Ar),Ar=ul(Ji,Ar);const Yh=Ar>-1?1:0;Yh&&(Ar*=hr/Wt),Ce.glyphOffsetArray.length>=ea.MAX_GLYPHS&&ti("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ge.sortKey!==void 0&&Ce.addToSortKeyRanges(Ce.symbolInstances.length,Ge.sortKey),Ce.symbolInstances.emplaceBack(Ze.x,Ze.y,ln.right>=0?ln.right:-1,ln.center>=0?ln.center:-1,ln.left>=0?ln.left:-1,ln.vertical||-1,_c,yc,Hh,Dp,Lp,Bp,Rp,Fp,Op,Up,Vp,si,no,Wh,ki,on,Yh,0,Ut,xc,vc,Ar)}(i,ke,he,r,s,l,ve,i.layers[0],i.collisionBoxArray,e.index,e.sourceLayerIndex,i.index,L,[Y,Y,Y,Y],Te,g,W,Q,Ie,C,e,u,v,b,p)};if(xe==="line")for(const he of Lh(e.geometry,0,0,yt,yt)){const ke=Sp(he,q,re,r.vertical||P,s,24,G,i.overscaling,yt);for(const Ce of ke)P&&zp(i,P.text,ge,Ce)||_e(he,Ce)}else if(xe==="line-center"){for(const he of e.geometry)if(he.length>1){const ke=Ep(he,re,r.vertical||P,s,24,G);ke&&_e(he,ke)}}else if(e.type==="Polygon")for(const he of Nl(e.geometry,0)){const ke=Cp(he,16);_e(he[0],new Ln(ke.x,ke.y,0))}else if(e.type==="LineString")for(const he of e.geometry)_e(he,new Ln(he[0].x,he[0].y,0));else if(e.type==="Point")for(const he of e.geometry)for(const ke of he)_e([ke],new Ln(ke.x,ke.y,0))}function qh(i,e,r,s,l,u,p,f,g,v,b,E,I,C,P){const R=function(W,q,Y,Q,re,Te,Ie,xe){const ge=Q.layout.get("text-rotate").evaluate(Te,{})*Math.PI/180,fe=[];for(const ve of q.positionedLines)for(const _e of ve.positionedGlyphs){if(!_e.rect)continue;const he=_e.rect||{};let ke=oh+1,Ce=!0,Ze=1,xt=0;const wt=(re||xe)&&_e.vertical,qt=_e.metrics.advance*_e.scale/2;if(xe&&q.verticalizable&&(xt=ve.lineOffset/2-(_e.imageName?-(Wt-_e.metrics.width*_e.scale)/2:(_e.scale-1)*Wt)),_e.imageName){const At=Ie[_e.imageName];Ce=At.sdf,Ze=At.pixelRatio,ke=Ci/Ze}const Yi=re?[_e.x+qt,_e.y]:[0,0];let ni=re?[0,0]:[_e.x+qt+Y[0],_e.y+Y[1]-xt],Ot=[0,0];wt&&(Ot=ni,ni=[0,0]);const Ht=(_e.metrics.left-ke)*_e.scale-qt+ni[0],si=(-_e.metrics.top-ke)*_e.scale+ni[1],pi=Ht+he.w*_e.scale/Ze,Mi=si+he.h*_e.scale/Ze,Ut=new Ae(Ht,si),ai=new Ae(pi,si),di=new Ae(Ht,Mi),wi=new Ae(pi,Mi);if(wt){const At=new Ae(-qt,qt-Ja),oi=-Math.PI/2,Ge=Wt/2-qt,qi=new Ae(5-Ja-Ge,-(_e.imageName?Ge:0)),li=new Ae(...Ot);Ut._rotateAround(oi,At)._add(qi)._add(li),ai._rotateAround(oi,At)._add(qi)._add(li),di._rotateAround(oi,At)._add(qi)._add(li),wi._rotateAround(oi,At)._add(qi)._add(li)}if(ge){const At=Math.sin(ge),oi=Math.cos(ge),Ge=[oi,-At,At,oi];Ut._matMult(Ge),ai._matMult(Ge),di._matMult(Ge),wi._matMult(Ge)}const Pi=new Ae(0,0),zi=new Ae(0,0);fe.push({tl:Ut,tr:ai,bl:di,br:wi,tex:he,writingMode:q.writingMode,glyphOffset:Yi,sectionIndex:_e.sectionIndex,isSDF:Ce,pixelOffsetTL:Pi,pixelOffsetBR:zi,minFontScaleX:0,minFontScaleY:0})}return fe}(0,r,f,l,u,p,s,i.allowVerticalPlacement),L=i.textSizeData;let G=null;L.kind==="source"?(G=[$r*l.layout.get("text-size").evaluate(p,{})],G[0]>kn&&ti(`${i.layerIds[0]}: Value for "text-size" is >= ${eo}. Reduce your "text-size".`)):L.kind==="composite"&&(G=[$r*C.compositeTextSizes[0].evaluate(p,{},P),$r*C.compositeTextSizes[1].evaluate(p,{},P)],(G[0]>kn||G[1]>kn)&&ti(`${i.layerIds[0]}: Value for "text-size" is >= ${eo}. Reduce your "text-size".`)),i.addSymbols(i.text,R,G,f,u,p,v,e,g.lineStartIndex,g.lineLength,I,P);for(const W of b)E[W]=i.text.placedSymbolArray.length-1;return 4*R.length}function jh(i){for(const e in i)return i[e];return null}function zp(i,e,r,s){const l=i.compareText;if(e in l){const u=l[e];for(let p=u.length-1;p>=0;p--)if(s.dist(u[p])>4;if(l!==1)throw new Error(`Got v${l} data when expected v1.`);const u=Zh[15&s];if(!u)throw new Error("Unrecognized array type.");const[p]=new Uint16Array(e,2,1),[f]=new Uint32Array(e,4,1);return new hc(f,p,u,e)}constructor(e,r=64,s=Float64Array,l){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=s,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const u=Zh.indexOf(this.ArrayType),p=2*e*this.ArrayType.BYTES_PER_ELEMENT,f=e*this.IndexArrayType.BYTES_PER_ELEMENT,g=(8-f%8)%8;if(u<0)throw new Error(`Unexpected typed array class: ${s}.`);l&&l instanceof ArrayBuffer?(this.data=l,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+f+g,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+p+f+g),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+f+g,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+u]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=e,this.coords[this._pos++]=r,s}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return uc(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,s,l){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:u,coords:p,nodeSize:f}=this,g=[0,u.length-1,0],v=[];for(;g.length;){const b=g.pop()||0,E=g.pop()||0,I=g.pop()||0;if(E-I<=f){for(let L=I;L<=E;L++){const G=p[2*L],W=p[2*L+1];G>=e&&G<=s&&W>=r&&W<=l&&v.push(u[L])}continue}const C=I+E>>1,P=p[2*C],R=p[2*C+1];P>=e&&P<=s&&R>=r&&R<=l&&v.push(u[C]),(b===0?e<=P:r<=R)&&(g.push(I),g.push(C-1),g.push(1-b)),(b===0?s>=P:l>=R)&&(g.push(C+1),g.push(E),g.push(1-b))}return v}within(e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:l,coords:u,nodeSize:p}=this,f=[0,l.length-1,0],g=[],v=s*s;for(;f.length;){const b=f.pop()||0,E=f.pop()||0,I=f.pop()||0;if(E-I<=p){for(let L=I;L<=E;L++)Xh(u[2*L],u[2*L+1],e,r)<=v&&g.push(l[L]);continue}const C=I+E>>1,P=u[2*C],R=u[2*C+1];Xh(P,R,e,r)<=v&&g.push(l[C]),(b===0?e-s<=P:r-s<=R)&&(f.push(I),f.push(C-1),f.push(1-b)),(b===0?e+s>=P:r+s>=R)&&(f.push(C+1),f.push(E),f.push(1-b))}return g}}function uc(i,e,r,s,l,u){if(l-s<=r)return;const p=s+l>>1;Gh(i,e,p,s,l,u),uc(i,e,r,s,p-1,1-u),uc(i,e,r,p+1,l,1-u)}function Gh(i,e,r,s,l,u){for(;l>s;){if(l-s>600){const v=l-s+1,b=r-s+1,E=Math.log(v),I=.5*Math.exp(2*E/3),C=.5*Math.sqrt(E*I*(v-I)/v)*(b-v/2<0?-1:1);Gh(i,e,r,Math.max(s,Math.floor(r-b*I/v+C)),Math.min(l,Math.floor(r+(v-b)*I/v+C)),u)}const p=e[2*r+u];let f=s,g=l;for(io(i,e,s,r),e[2*l+u]>p&&io(i,e,s,l);fp;)g--}e[2*s+u]===p?io(i,e,s,g):(g++,io(i,e,g,l)),g<=r&&(s=g+1),r<=g&&(l=g-1)}}function io(i,e,r,s){pc(i,r,s),pc(e,2*r,2*s),pc(e,2*r+1,2*s+1)}function pc(i,e,r){const s=i[e];i[e]=i[r],i[r]=s}function Xh(i,e,r,s){const l=i-r,u=e-s;return l*l+u*u}var dc;h.PerformanceMarkers=void 0,(dc=h.PerformanceMarkers||(h.PerformanceMarkers={})).create="create",dc.load="load",dc.fullLoad="fullLoad";let hl=null,ro=[];const fc=1e3/60,mc="loadTime",gc="fullLoadTime",kp={mark(i){performance.mark(i)},frame(i){const e=i;hl!=null&&ro.push(e-hl),hl=e},clearMetrics(){hl=null,ro=[],performance.clearMeasures(mc),performance.clearMeasures(gc);for(const i in h.PerformanceMarkers)performance.clearMarks(h.PerformanceMarkers[i])},getPerformanceMetrics(){performance.measure(mc,h.PerformanceMarkers.create,h.PerformanceMarkers.load),performance.measure(gc,h.PerformanceMarkers.create,h.PerformanceMarkers.fullLoad);const i=performance.getEntriesByName(mc)[0].duration,e=performance.getEntriesByName(gc)[0].duration,r=ro.length,s=1/(ro.reduce((u,p)=>u+p,0)/r/1e3),l=ro.filter(u=>u>fc).reduce((u,p)=>u+(p-fc)/fc,0);return{loadTime:i,fullLoadTime:e,fps:s,percentDroppedFrames:l/(r+l)*100,totalFrames:r}}};h.AJAXError=kr,h.ARRAY_TYPE=Ws,h.Actor=class{constructor(i,e,r){this.target=i,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},gi(["receive","process"],this),this.invoker=new wp(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=Bi()?i:window}send(i,e,r,s,l=!1){const u=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[u]=r);const p=zr(this.globalScope)?void 0:[];return this.target.postMessage({id:u,type:i,hasCallback:!!r,targetMapId:s,mustQueue:l,sourceMapId:this.mapId,data:Yn(e,p)},p),{cancel:()=>{r&&delete this.callbacks[u],this.target.postMessage({id:u,type:"",targetMapId:s,sourceMapId:this.mapId})}}}receive(i){const e=i.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(e.type===""){delete this.tasks[r];const s=this.cancelCallbacks[r];delete this.cancelCallbacks[r],s&&s()}else Bi()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)}process(){if(!this.taskQueue.length)return;const i=this.taskQueue.shift(),e=this.tasks[i];delete this.tasks[i],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(i,e)}processTask(i,e){if(e.type===""){const r=this.callbacks[i];delete this.callbacks[i],r&&(e.error?r(br(e.error)):r(null,br(e.data)))}else{let r=!1;const s=zr(this.globalScope)?void 0:[],l=e.hasCallback?(f,g)=>{r=!0,delete this.cancelCallbacks[i],this.target.postMessage({id:i,type:"",sourceMapId:this.mapId,error:f?Yn(f):null,data:Yn(g,s)},s)}:f=>{r=!0};let u=null;const p=br(e.data);if(this.parent[e.type])u=this.parent[e.type](e.sourceMapId,p,l);else if(this.parent.getWorkerSource){const f=e.type.split(".");u=this.parent.getWorkerSource(e.sourceMapId,f[0],p.source)[f[1]](p,l)}else l(new Error(`Could not find function ${e.type}`));!r&&u&&u.cancel&&(this.cancelCallbacks[i]=u.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},h.AlphaImage=ja,h.CanonicalTileID=oc,h.CollisionBoxArray=c,h.CollisionCircleLayoutArray=class extends Ns{},h.Color=Re,h.DEMData=Ch,h.DataConstantProperty=Me,h.DictionaryCoder=Mh,h.EXTENT=yt,h.ErrorEvent=Fi,h.EvaluationParameters=bt,h.Event=gr,h.Evented=fn,h.FeatureIndex=zh,h.FillBucket=jl,h.FillExtrusionBucket=Gl,h.GeoJSONFeature=Ph,h.ImageAtlas=ch,h.ImagePosition=Yl,h.KDBush=hc,h.LineBucket=Xl,h.LineStripIndexArray=class extends t{},h.LngLat=Dn,h.MercatorCoordinate=sl,h.ONE_EM=Wt,h.OverscaledTileID=Ki,h.PerformanceUtils=kp,h.Point=Ae,h.Pos3dArray=class extends Os{},h.PosArray=B,h.Properties=vi,h.Protobuf=Hl,h.QuadTriangleArray=class extends $s{},h.RGBAImage=Hi,h.RasterBoundsArray=class extends Fa{},h.RequestPerformance=class{constructor(i){this._marks={start:[i.url,"start"].join("#"),end:[i.url,"end"].join("#"),measure:i.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let i=performance.getEntriesByName(this._marks.measure);return i.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),i=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),i}},h.SegmentVector=me,h.SymbolBucket=ea,h.Transitionable=Vo,h.TriangleIndexArray=le,h.Uniform1f=cr,h.Uniform1i=class extends ui{constructor(i,e){super(i,e),this.current=0}set(i){this.current!==i&&(this.current=i,this.gl.uniform1i(this.location,i))}},h.Uniform2f=class extends ui{constructor(i,e){super(i,e),this.current=[0,0]}set(i){i[0]===this.current[0]&&i[1]===this.current[1]||(this.current=i,this.gl.uniform2f(this.location,i[0],i[1]))}},h.Uniform3f=class extends ui{constructor(i,e){super(i,e),this.current=[0,0,0]}set(i){i[0]===this.current[0]&&i[1]===this.current[1]&&i[2]===this.current[2]||(this.current=i,this.gl.uniform3f(this.location,i[0],i[1],i[2]))}},h.Uniform4f=is,h.UniformColor=ri,h.UniformMatrix4f=class extends ui{constructor(i,e){super(i,e),this.current=Gt}set(i){if(i[12]!==this.current[12]||i[0]!==this.current[0])return this.current=i,void this.gl.uniformMatrix4fv(this.location,!1,i);for(let e=1;e<16;e++)if(i[e]!==this.current[e]){this.current=i,this.gl.uniformMatrix4fv(this.location,!1,i);break}}},h.UnwrappedTileID=Ah,h.ValidationError=de,h.ZoomHistory=Lo,h.addDynamicAttributes=tc,h.arrayBufferToImage=function(i,e){const r=new Image;r.onload=()=>{e(null,r),URL.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame(()=>{r.src=fr})},r.onerror=()=>e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const s=new Blob([new Uint8Array(i)],{type:"image/png"});r.src=i.byteLength?URL.createObjectURL(s):fr},h.arrayBufferToImageBitmap=function(i,e){const r=new Blob([new Uint8Array(i)],{type:"image/png"});createImageBitmap(r).then(s=>{e(null,s)}).catch(s=>{e(new Error(`Could not load image because of ${s.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})},h.asyncAll=function(i,e,r){if(!i.length)return r(null,[]);let s=i.length;const l=new Array(i.length);let u=null;i.forEach((p,f)=>{e(p,(g,v)=>{g&&(u=g),l[f]=v,--s==0&&r(u,l)})})},h.bezier=Mr,h.bindAll=gi,h.clamp=ot,h.clipLine=Lh,h.clone=function(i){var e=new Ws(16);return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],e},h.clone$1=_i,h.collisionCircleLayout=Yu,h.config=Bn,h.copy=function(i,e){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},h.create=function(){var i=new Ws(16);return Ws!=Float32Array&&(i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0),i[0]=1,i[5]=1,i[10]=1,i[15]=1,i},h.createExpression=Tt,h.createFilter=wa,h.createLayout=Ft,h.createStyleLayer=function(i){return i.type==="custom"?new vp(i):new bp[i.type](i)},h.deepEqual=function i(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(let s=0;s{s[p.source]?r.push({command:Qe.removeLayer,args:[p.id]}):u.push(p)}),r=r.concat(l),function(p,f,g){f=f||[];const v=(p=p||[]).map(mn),b=f.map(mn),E=p.reduce(Kr,{}),I=f.reduce(Kr,{}),C=v.slice(),P=Object.create(null);let R,L,G,W,q,Y,Q;for(R=0,L=0;R{}}},h.groupByLayout=function(i,e){const r={};for(let l=0;l@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(r,s,l,u)=>{const p=l||u;return e[s]=!p||p.toLowerCase(),""}),e["max-age"]){const r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e},h.parseGlyphPbf=function(i){return new Hl(i).readFields(lp,[])},h.pbf=eh,h.performSymbolLayout=function(i){i.bucket.createArrays(),i.bucket.tilePixelRatio=yt/(512*i.bucket.overscaling),i.bucket.compareText={},i.bucket.iconsNeedLinear=!1;const e=i.bucket.layers[0].layout,r=i.bucket.layers[0]._unevaluatedLayout._values,s={layoutIconSize:r["icon-size"].possiblyEvaluate(new bt(i.bucket.zoom+1),i.canonical),layoutTextSize:r["text-size"].possiblyEvaluate(new bt(i.bucket.zoom+1),i.canonical),textMaxSize:r["text-size"].possiblyEvaluate(new bt(18))};if(i.bucket.textSizeData.kind==="composite"){const{minZoom:g,maxZoom:v}=i.bucket.textSizeData;s.compositeTextSizes=[r["text-size"].possiblyEvaluate(new bt(g),i.canonical),r["text-size"].possiblyEvaluate(new bt(v),i.canonical)]}if(i.bucket.iconSizeData.kind==="composite"){const{minZoom:g,maxZoom:v}=i.bucket.iconSizeData;s.compositeIconSizes=[r["icon-size"].possiblyEvaluate(new bt(g),i.canonical),r["icon-size"].possiblyEvaluate(new bt(v),i.canonical)]}const l=e.get("text-line-height")*Wt,u=e.get("text-rotation-alignment")!=="viewport"&&e.get("symbol-placement")!=="point",p=e.get("text-keep-upright"),f=e.get("text-size");for(const g of i.bucket.features){const v=e.get("text-font").evaluate(g,{},i.canonical).join(","),b=f.evaluate(g,{},i.canonical),E=s.layoutTextSize.evaluate(g,{},i.canonical),I=s.layoutIconSize.evaluate(g,{},i.canonical),C={horizontal:{},vertical:void 0},P=g.text;let R,L=[0,0];if(P){const q=P.toString(),Y=e.get("text-letter-spacing").evaluate(g,{},i.canonical)*Wt,Q=Ca(q)?Y:0,re=e.get("text-anchor").evaluate(g,{},i.canonical),Te=e.get("text-variable-anchor");if(!Te){const ve=e.get("text-radial-offset").evaluate(g,{},i.canonical);L=ve?$h(re,[ve*Wt,lc]):e.get("text-offset").evaluate(g,{},i.canonical).map(_e=>_e*Wt)}let Ie=u?"center":e.get("text-justify").evaluate(g,{},i.canonical);const xe=e.get("symbol-placement"),ge=xe==="point"?e.get("text-max-width").evaluate(g,{},i.canonical)*Wt:0,fe=()=>{i.bucket.allowVerticalPlacement&&Ps(q)&&(C.vertical=tl(P,i.glyphMap,i.glyphPositions,i.imagePositions,v,ge,l,re,"left",Q,L,h.WritingMode.vertical,!0,xe,E,b))};if(!u&&Te){const ve=Ie==="auto"?Te.map(he=>cc(he)):[Ie];let _e=!1;for(let he=0;hethis._layers[ae.id]),X=N[0];if(X.visibility==="none")continue;const j=X.source||"";let $=this.familiesBySource[j];$||($=this.familiesBySource[j]={});const H=X.sourceLayer||"_geojsonTileLayer";let ne=$[H];ne||(ne=$[H]=[]),ne.push(N)}}}class te{constructor(S){const A={},z=[];for(const j in S){const $=S[j],H=A[j]={};for(const ne in $){const ae=$[+ne];if(!ae||ae.bitmap.width===0||ae.bitmap.height===0)continue;const se={x:0,y:0,w:ae.bitmap.width+2,h:ae.bitmap.height+2};z.push(se),H[ne]={rect:se,metrics:ae.metrics}}}const{w:V,h:N}=h.potpack(z),X=new h.AlphaImage({width:V||1,height:N||1});for(const j in S){const $=S[j];for(const H in $){const ne=$[+H];if(!ne||ne.bitmap.width===0||ne.bitmap.height===0)continue;const ae=A[j][H].rect;h.AlphaImage.copy(ne.bitmap,X,{x:0,y:0},{x:ae.x+1,y:ae.y+1},ne.bitmap)}}this.image=X,this.positions=A}}h.register("GlyphAtlas",te);class Kt{constructor(S){this.tileID=new h.OverscaledTileID(S.tileID.overscaledZ,S.tileID.wrap,S.tileID.canonical.z,S.tileID.canonical.x,S.tileID.canonical.y),this.uid=S.uid,this.zoom=S.zoom,this.pixelRatio=S.pixelRatio,this.tileSize=S.tileSize,this.source=S.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=S.showCollisionBoxes,this.collectResourceTiming=!!S.collectResourceTiming,this.returnDependencies=!!S.returnDependencies,this.promoteId=S.promoteId}parse(S,A,z,V,N){this.status="parsing",this.data=S,this.collisionBoxArray=new h.CollisionBoxArray;const X=new h.DictionaryCoder(Object.keys(S.layers).sort()),j=new h.FeatureIndex(this.tileID,this.promoteId);j.bucketLayerIDs=[];const $={},H={featureIndex:j,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:z},ne=A.familiesBySource[this.source];for(const je in ne){const et=S.layers[je];if(!et)continue;et.version===1&&h.warnOnce(`Vector tile source "${this.source}" layer "${je}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const dt=X.encode(je),Lt=[];for(let Re=0;Re=Et.maxzoom||Et.visibility!=="none"&&(Ae(Re,this.zoom,z),($[Et.id]=Et.createBucket({index:j.bucketLayerIDs.length,layers:Re,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:dt,sourceID:this.source})).populate(Lt,H,this.tileID.canonical),j.bucketLayerIDs.push(Re.map(Rr=>Rr.id)))}}let ae,se,De,Oe;const Se=h.mapObject(H.glyphDependencies,je=>Object.keys(je).map(Number));Object.keys(Se).length?V.send("getGlyphs",{uid:this.uid,stacks:Se,source:this.source,tileID:this.tileID,type:"glyphs"},(je,et)=>{ae||(ae=je,se=et,He.call(this))}):se={};const Pe=Object.keys(H.iconDependencies);Pe.length?V.send("getImages",{icons:Pe,source:this.source,tileID:this.tileID,type:"icons"},(je,et)=>{ae||(ae=je,De=et,He.call(this))}):De={};const Fe=Object.keys(H.patternDependencies);function He(){if(ae)return N(ae);if(se&&De&&Oe){const je=new te(se),et=new h.ImageAtlas(De,Oe);for(const dt in $){const Lt=$[dt];Lt instanceof h.SymbolBucket?(Ae(Lt.layers,this.zoom,z),h.performSymbolLayout({bucket:Lt,glyphMap:se,glyphPositions:je.positions,imageMap:De,imagePositions:et.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Lt.hasPattern&&(Lt instanceof h.LineBucket||Lt instanceof h.FillBucket||Lt instanceof h.FillExtrusionBucket)&&(Ae(Lt.layers,this.zoom,z),Lt.addFeatures(H,this.tileID.canonical,et.patternPositions))}this.status="done",N(null,{buckets:Object.values($).filter(dt=>!dt.isEmpty()),featureIndex:j,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:je.image,imageAtlas:et,glyphMap:this.returnDependencies?se:null,iconMap:this.returnDependencies?De:null,glyphPositions:this.returnDependencies?je.positions:null})}}Fe.length?V.send("getImages",{icons:Fe,source:this.source,tileID:this.tileID,type:"patterns"},(je,et)=>{ae||(ae=je,Oe=et,He.call(this))}):Oe={},He.call(this)}}function Ae(F,S,A){const z=new h.EvaluationParameters(S);for(const V of F)V.recalculate(z,A)}function Li(F,S){const A=h.getArrayBuffer(F.request,(z,V,N,X)=>{z?S(z):V&&S(null,{vectorTile:new h.vectorTile.VectorTile(new h.Protobuf(V)),rawData:V,cacheControl:N,expires:X})});return()=>{A.cancel(),S()}}class er{constructor(S,A,z,V){this.actor=S,this.layerIndex=A,this.availableImages=z,this.loadVectorData=V||Li,this.loading={},this.loaded={}}loadTile(S,A){const z=S.uid;this.loading||(this.loading={});const V=!!(S&&S.request&&S.request.collectResourceTiming)&&new h.RequestPerformance(S.request),N=this.loading[z]=new Kt(S);N.abort=this.loadVectorData(S,(X,j)=>{if(delete this.loading[z],X||!j)return N.status="done",this.loaded[z]=N,A(X);const $=j.rawData,H={};j.expires&&(H.expires=j.expires),j.cacheControl&&(H.cacheControl=j.cacheControl);const ne={};if(V){const ae=V.finish();ae&&(ne.resourceTiming=JSON.parse(JSON.stringify(ae)))}N.vectorTile=j.vectorTile,N.parse(j.vectorTile,this.layerIndex,this.availableImages,this.actor,(ae,se)=>{if(ae||!se)return A(ae);A(null,h.extend({rawTileData:$.slice(0)},se,H,ne))}),this.loaded=this.loaded||{},this.loaded[z]=N})}reloadTile(S,A){const z=this.loaded,V=S.uid,N=this;if(z&&z[V]){const X=z[V];X.showCollisionBoxes=S.showCollisionBoxes;const j=($,H)=>{const ne=X.reloadCallback;ne&&(delete X.reloadCallback,X.parse(X.vectorTile,N.layerIndex,this.availableImages,N.actor,ne)),A($,H)};X.status==="parsing"?X.reloadCallback=j:X.status==="done"&&(X.vectorTile?X.parse(X.vectorTile,this.layerIndex,this.availableImages,this.actor,j):j())}}abortTile(S,A){const z=this.loading,V=S.uid;z&&z[V]&&z[V].abort&&(z[V].abort(),delete z[V]),A()}removeTile(S,A){const z=this.loaded,V=S.uid;z&&z[V]&&delete z[V],A()}}class Cr{constructor(){this.loaded={}}loadTile(S,A){const{uid:z,encoding:V,rawImageData:N}=S,X=h.isImageBitmap(N)?this.getImageData(N):N,j=new h.DEMData(z,X,V);this.loaded=this.loaded||{},this.loaded[z]=j,A(null,j)}getImageData(S){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(S.width,S.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=S.width,this.offscreenCanvas.height=S.height,this.offscreenCanvasContext.drawImage(S,0,0,S.width,S.height);const A=this.offscreenCanvasContext.getImageData(-1,-1,S.width+2,S.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new h.RGBAImage({width:A.width,height:A.height},A.data)}removeTile(S){const A=this.loaded,z=S.uid;A&&A[z]&&delete A[z]}}function Mr(F,S){if(F.length!==0){pr(F[0],S);for(var A=1;A=Math.abs(j)?A-$+j:j-$+A,A=$}A+z>=0!=!!S&&F.reverse()}var ot=h.getDefaultExportFromCjs(function F(S,A){var z,V=S&&S.type;if(V==="FeatureCollection")for(z=0;z>31}function fr(F,S){for(var A=F.loadGeometry(),z=F.type,V=0,N=0,X=A.length,j=0;jF},Bn=Math.fround||(kr=new Float32Array(1),F=>(kr[0]=+F,kr[0]));var kr;const ci=3,Ri=5,Yt=6;class pn{constructor(S){this.options=Object.assign(Object.create(un),S),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(S){const{log:A,minZoom:z,maxZoom:V}=this.options;A&&console.time("total time");const N=`prepare ${S.length} points`;A&&console.time(N),this.points=S;const X=[];for(let $=0;$=z;$--){const H=+Date.now();j=this.trees[$]=this._createTree(this._cluster(j,$)),A&&console.log("z%d: %d clusters in %dms",$,j.numItems,+Date.now()-H)}return A&&console.timeEnd("total time"),this}getClusters(S,A){let z=((S[0]+180)%360+360)%360-180;const V=Math.max(-90,Math.min(90,S[1]));let N=S[2]===180?180:((S[2]+180)%360+360)%360-180;const X=Math.max(-90,Math.min(90,S[3]));if(S[2]-S[0]>=360)z=-180,N=180;else if(z>N){const ae=this.getClusters([z,V,180,X],A),se=this.getClusters([-180,V,N,X],A);return ae.concat(se)}const j=this.trees[this._limitZoom(A)],$=j.range(Dr(z),mr(X),Dr(N),mr(V)),H=j.data,ne=[];for(const ae of $){const se=this.stride*ae;ne.push(H[se+Ri]>1?dn(H,se,this.clusterProps):this.points[H[se+ci]])}return ne}getChildren(S){const A=this._getOriginId(S),z=this._getOriginZoom(S),V="No cluster with the specified id.",N=this.trees[z];if(!N)throw new Error(V);const X=N.data;if(A*this.stride>=X.length)throw new Error(V);const j=this.options.radius/(this.options.extent*Math.pow(2,z-1)),$=N.within(X[A*this.stride],X[A*this.stride+1],j),H=[];for(const ne of $){const ae=ne*this.stride;X[ae+4]===S&&H.push(X[ae+Ri]>1?dn(X,ae,this.clusterProps):this.points[X[ae+ci]])}if(H.length===0)throw new Error(V);return H}getLeaves(S,A,z){const V=[];return this._appendLeaves(V,S,A=A||10,z=z||0,0),V}getTile(S,A,z){const V=this.trees[this._limitZoom(S)],N=Math.pow(2,S),{extent:X,radius:j}=this.options,$=j/X,H=(z-$)/N,ne=(z+1+$)/N,ae={features:[]};return this._addTileFeatures(V.range((A-$)/N,H,(A+1+$)/N,ne),V.data,A,z,N,ae),A===0&&this._addTileFeatures(V.range(1-$/N,H,1,ne),V.data,N,z,N,ae),A===N-1&&this._addTileFeatures(V.range(0,H,$/N,ne),V.data,-1,z,N,ae),ae.features.length?ae:null}getClusterExpansionZoom(S){let A=this._getOriginZoom(S)-1;for(;A<=this.options.maxZoom;){const z=this.getChildren(S);if(A++,z.length!==1)break;S=z[0].properties.cluster_id}return A}_appendLeaves(S,A,z,V,N){const X=this.getChildren(A);for(const j of X){const $=j.properties;if($&&$.cluster?N+$.point_count<=V?N+=$.point_count:N=this._appendLeaves(S,$.cluster_id,z,V,N):N1;let ne,ae,se;if(H)ne=Xr(A,$,this.clusterProps),ae=A[$],se=A[$+1];else{const Se=this.points[A[$+ci]];ne=Se.properties;const[Pe,Fe]=Se.geometry.coordinates;ae=Dr(Pe),se=mr(Fe)}const De={type:1,geometry:[[Math.round(this.options.extent*(ae*N-z)),Math.round(this.options.extent*(se*N-V))]],tags:ne};let Oe;Oe=H||this.options.generateId?A[$+ci]:this.points[A[$+ci]].id,Oe!==void 0&&(De.id=Oe),X.features.push(De)}}_limitZoom(S){return Math.max(this.options.minZoom,Math.min(Math.floor(+S),this.options.maxZoom+1))}_cluster(S,A){const{radius:z,extent:V,reduce:N,minPoints:X}=this.options,j=z/(V*Math.pow(2,A)),$=S.data,H=[],ne=this.stride;for(let ae=0;ae<$.length;ae+=ne){if($[ae+2]<=A)continue;$[ae+2]=A;const se=$[ae],De=$[ae+1],Oe=S.within($[ae],$[ae+1],j),Se=$[ae+Ri];let Pe=Se;for(const Fe of Oe){const He=Fe*ne;$[He+2]>A&&(Pe+=$[He+Ri])}if(Pe>Se&&Pe>=X){let Fe,He=se*Se,je=De*Se,et=-1;const dt=((ae/ne|0)<<5)+(A+1)+this.points.length;for(const Lt of Oe){const Re=Lt*ne;if($[Re+2]<=A)continue;$[Re+2]=A;const Et=$[Re+Ri];He+=$[Re]*Et,je+=$[Re+1]*Et,$[Re+4]=dt,N&&(Fe||(Fe=this._map($,ae,!0),et=this.clusterProps.length,this.clusterProps.push(Fe)),N(Fe,this._map($,Re)))}$[ae+4]=dt,H.push(He/Pe,je/Pe,1/0,dt,-1,Pe),N&&H.push(et)}else{for(let Fe=0;Fe1)for(const Fe of Oe){const He=Fe*ne;if(!($[He+2]<=A)){$[He+2]=A;for(let je=0;je>5}_getOriginZoom(S){return(S-this.points.length)%32}_map(S,A,z){if(S[A+Ri]>1){const X=this.clusterProps[S[A+Yt]];return z?Object.assign({},X):X}const V=this.points[S[A+ci]].properties,N=this.options.map(V);return z&&N===V?Object.assign({},N):N}}function dn(F,S,A){return{type:"Feature",id:F[S+ci],properties:Xr(F,S,A),geometry:{type:"Point",coordinates:[(z=F[S],360*(z-.5)),gr(F[S+1])]}};var z}function Xr(F,S,A){const z=F[S+Ri],V=z>=1e4?`${Math.round(z/1e3)}k`:z>=1e3?Math.round(z/100)/10+"k":z,N=F[S+Yt],X=N===-1?{}:Object.assign({},A[N]);return Object.assign(X,{cluster:!0,cluster_id:F[S+ci],point_count:z,point_count_abbreviated:V})}function Dr(F){return F/360+.5}function mr(F){const S=Math.sin(F*Math.PI/180),A=.5-.25*Math.log((1+S)/(1-S))/Math.PI;return A<0?0:A>1?1:A}function gr(F){const S=(180-360*F)*Math.PI/180;return 360*Math.atan(Math.exp(S))/Math.PI-90}function Fi(F,S,A,z){for(var V,N=z,X=A-S>>1,j=A-S,$=F[S],H=F[S+1],ne=F[A],ae=F[A+1],se=S+3;seN)V=se,N=De;else if(De===N){var Oe=Math.abs(se-X);Oez&&(V-S>3&&Fi(F,S,V,z),F[V+2]=N,A-V>3&&Fi(F,V,A,z))}function fn(F,S,A,z,V,N){var X=V-A,j=N-z;if(X!==0||j!==0){var $=((F-A)*X+(S-z)*j)/(X*X+j*j);$>1?(A=V,z=N):$>0&&(A+=X*$,z+=j*$)}return(X=F-A)*X+(j=S-z)*j}function ie(F,S,A,z){var V={id:F===void 0?null:F,type:S,geometry:A,tags:z,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(N){var X=N.geometry,j=N.type;if(j==="Point"||j==="MultiPoint"||j==="LineString")Lr(N,X);else if(j==="Polygon"||j==="MultiLineString")for(var $=0;$0&&(X+=z?(V*H-$*N)/2:Math.sqrt(Math.pow($-V,2)+Math.pow(H-N,2))),V=$,N=H}var ne=S.length-3;S[2]=1,Fi(S,0,ne,A),S[ne+2]=1,S.size=Math.abs(X),S.start=0,S.end=S.size}function Wr(F,S,A,z){for(var V=0;V1?1:A}function Dt(F,S,A,z,V,N,X,j){if(z/=S,N>=(A/=S)&&X=z)return null;for(var $=[],H=0;H=A&&Oe=z)){var Se=[];if(se==="Point"||se==="MultiPoint")Hr(ae,Se,A,z,V);else if(se==="LineString")mn(ae,Se,A,z,V,!1,j.lineMetrics);else if(se==="MultiLineString")de(ae,Se,A,z,V,!1);else if(se==="Polygon")de(ae,Se,A,z,V,!0);else if(se==="MultiPolygon")for(var Pe=0;Pe=A&&X<=z&&(S.push(F[N]),S.push(F[N+1]),S.push(F[N+2]))}}function mn(F,S,A,z,V,N,X){for(var j,$,H=Kr(F),ne=V===0?ii:gn,ae=F.start,se=0;seA&&($=ne(H,De,Oe,Pe,Fe,A),X&&(H.start=ae+j*$)):He>z?je=A&&($=ne(H,De,Oe,Pe,Fe,A),et=!0),je>z&&He<=z&&($=ne(H,De,Oe,Pe,Fe,z),et=!0),!N&&et&&(X&&(H.end=ae+j*$),S.push(H),H=Kr(F)),X&&(ae+=j)}var dt=F.length-3;De=F[dt],Oe=F[dt+1],Se=F[dt+2],(He=V===0?De:Oe)>=A&&He<=z&&tr(H,De,Oe,Se),dt=H.length-3,N&&dt>=3&&(H[dt]!==H[0]||H[dt+1]!==H[1])&&tr(H,H[0],H[1],H[2]),H.length&&S.push(H)}function Kr(F){var S=[];return S.size=F.size,S.start=F.start,S.end=F.end,S}function de(F,S,A,z,V,N){for(var X=0;XX.maxX&&(X.maxX=ne),ae>X.maxY&&(X.maxY=ae)}return X}function Vt(F,S,A,z){var V=S.geometry,N=S.type,X=[];if(N==="Point"||N==="MultiPoint")for(var j=0;j0&&S.size<(V?X:z))A.numPoints+=S.length/3;else{for(var j=[],$=0;$X)&&(A.numSimplified++,j.push(S[$]),j.push(S[$+1])),A.numPoints++;V&&function(H,ne){for(var ae=0,se=0,De=H.length,Oe=De-2;se0===ne)for(se=0,De=H.length;se24)throw new Error("maxZoom should be in the 0-24 range");if(S.promoteId&&S.generateId)throw new Error("promoteId and generateId cannot be used together.");var z=function(V,N){var X=[];if(V.type==="FeatureCollection")for(var j=0;j1&&console.time("creation"),se=this.tiles[ae]=yi(F,S,A,z,$),this.tileCoords.push({z:S,x:A,y:z}),H)){H>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",S,A,z,se.numFeatures,se.numPoints,se.numSimplified),console.timeEnd("creation"));var De="z"+S;this.stats[De]=(this.stats[De]||0)+1,this.total++}if(se.source=F,V){if(S===$.maxZoom||S===V)continue;var Oe=1<1&&console.time("clipping");var Se,Pe,Fe,He,je,et,dt=.5*$.buffer/$.extent,Lt=.5-dt,Re=.5+dt,Et=1+dt;Se=Pe=Fe=He=null,je=Dt(F,ne,A-dt,A+Re,0,se.minX,se.maxX,$),et=Dt(F,ne,A+Lt,A+Et,0,se.minX,se.maxX,$),F=null,je&&(Se=Dt(je,ne,z-dt,z+Re,1,se.minY,se.maxY,$),Pe=Dt(je,ne,z+Lt,z+Et,1,se.minY,se.maxY,$),je=null),et&&(Fe=Dt(et,ne,z-dt,z+Re,1,se.minY,se.maxY,$),He=Dt(et,ne,z+Lt,z+Et,1,se.minY,se.maxY,$),et=null),H>1&&console.timeEnd("clipping"),j.push(Se||[],S+1,2*A,2*z),j.push(Pe||[],S+1,2*A,2*z+1),j.push(Fe||[],S+1,2*A+1,2*z),j.push(He||[],S+1,2*A+1,2*z+1)}}},_r.prototype.getTile=function(F,S,A){var z=this.options,V=z.extent,N=z.debug;if(F<0||F>24)return null;var X=1<1&&console.log("drilling down to z%d-%d-%d",F,S,A);for(var $,H=F,ne=S,ae=A;!$&&H>0;)H--,ne=Math.floor(ne/2),ae=Math.floor(ae/2),$=this.tiles[yr(H,ne,ae)];return $&&$.source?(N>1&&console.log("found parent tile z%d-%d-%d",H,ne,ae),N>1&&console.time("drilling down"),this.splitTile($.source,H,ne,ae,F,S,A),N>1&&console.timeEnd("drilling down"),this.tiles[j]?qe(this.tiles[j],V):null):null};class On extends er{constructor(S,A,z,V){super(S,A,z,mt),this._dataUpdateable=new Map,this.loadGeoJSON=(N,X)=>{const{promoteId:j}=N;if(N.request)return h.getJSON(N.request,($,H,ne,ae)=>{this._dataUpdateable=xr(H,j)?Jt(H,j):void 0,X($,H,ne,ae)});if(typeof N.data=="string")try{const $=JSON.parse(N.data);this._dataUpdateable=xr($,j)?Jt($,j):void 0,X(null,$)}catch{X(new Error(`Input data given to '${N.source}' is not a valid GeoJSON object.`))}else N.dataDiff?this._dataUpdateable?(function($,H,ne){var ae,se,De,Oe;if(H.removeAll&&$.clear(),H.remove)for(const Se of H.remove)$.delete(Se);if(H.add)for(const Se of H.add){const Pe=Zi(Se,ne);Pe!=null&&$.set(Pe,Se)}if(H.update)for(const Se of H.update){let Pe=$.get(Se.id);if(Pe==null)continue;const Fe=!Se.removeAllProperties&&(((ae=Se.removeProperties)===null||ae===void 0?void 0:ae.length)>0||((se=Se.addOrUpdateProperties)===null||se===void 0?void 0:se.length)>0);if((Se.newGeometry||Se.removeAllProperties||Fe)&&(Pe={...Pe},$.set(Se.id,Pe),Fe&&(Pe.properties={...Pe.properties})),Se.newGeometry&&(Pe.geometry=Se.newGeometry),Se.removeAllProperties)Pe.properties={};else if(((De=Se.removeProperties)===null||De===void 0?void 0:De.length)>0)for(const He of Se.removeProperties)Object.prototype.hasOwnProperty.call(Pe.properties,He)&&delete Pe.properties[He];if(((Oe=Se.addOrUpdateProperties)===null||Oe===void 0?void 0:Oe.length)>0)for(const{key:He,value:je}of Se.addOrUpdateProperties)Pe.properties[He]=je}}(this._dataUpdateable,N.dataDiff,j),X(null,{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())})):X(new Error(`Cannot update existing geojson data in ${N.source}`)):X(new Error(`Input data given to '${N.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}},V&&(this.loadGeoJSON=V)}loadData(S,A){var z;(z=this._pendingRequest)===null||z===void 0||z.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const V=!!(S&&S.request&&S.request.collectResourceTiming)&&new h.RequestPerformance(S.request);this._pendingCallback=A,this._pendingRequest=this.loadGeoJSON(S,(N,X)=>{if(delete this._pendingCallback,delete this._pendingRequest,N||!X)return A(N);if(typeof X!="object")return A(new Error(`Input data given to '${S.source}' is not a valid GeoJSON object.`));{ot(X,!0);try{if(S.filter){const $=h.createExpression(S.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if($.result==="error")throw new Error($.value.map(ne=>`${ne.key}: ${ne.message}`).join(", "));X={type:"FeatureCollection",features:X.features.filter(ne=>$.value.evaluate({zoom:0},ne))}}this._geoJSONIndex=S.cluster?new pn(function({superclusterOptions:$,clusterProperties:H}){if(!H||!$)return $;const ne={},ae={},se={accumulated:null,zoom:0},De={properties:null},Oe=Object.keys(H);for(const Se of Oe){const[Pe,Fe]=H[Se],He=h.createExpression(Fe),je=h.createExpression(typeof Pe=="string"?[Pe,["accumulated"],["get",Se]]:Pe);ne[Se]=He.value,ae[Se]=je.value}return $.map=Se=>{De.properties=Se;const Pe={};for(const Fe of Oe)Pe[Fe]=ne[Fe].evaluate(se,De);return Pe},$.reduce=(Se,Pe)=>{De.properties=Pe;for(const Fe of Oe)se.accumulated=Se[Fe],Se[Fe]=ae[Fe].evaluate(se,De)},$}(S)).load(X.features):function($,H){return new _r($,H)}(X,S.geojsonVtOptions)}catch($){return A($)}this.loaded={};const j={};if(V){const $=V.finish();$&&(j.resourceTiming={},j.resourceTiming[S.source]=JSON.parse(JSON.stringify($)))}A(null,j)}})}reloadTile(S,A){const z=this.loaded;return z&&z[S.uid]?super.reloadTile(S,A):this.loadTile(S,A)}removeSource(S,A){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),A()}getClusterExpansionZoom(S,A){try{A(null,this._geoJSONIndex.getClusterExpansionZoom(S.clusterId))}catch(z){A(z)}}getClusterChildren(S,A){try{A(null,this._geoJSONIndex.getChildren(S.clusterId))}catch(z){A(z)}}getClusterLeaves(S,A){try{A(null,this._geoJSONIndex.getLeaves(S.clusterId,S.limit,S.offset))}catch(z){A(z)}}}class ir{constructor(S){this.self=S,this.actor=new h.Actor(S,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:er,geojson:On},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(A,z)=>{if(this.workerSourceTypes[A])throw new Error(`Worker source with name "${A}" already registered.`);this.workerSourceTypes[A]=z},this.self.registerRTLTextPlugin=A=>{if(h.plugin.isParsed())throw new Error("RTL text plugin already registered.");h.plugin.applyArabicShaping=A.applyArabicShaping,h.plugin.processBidirectionalText=A.processBidirectionalText,h.plugin.processStyledBidirectionalText=A.processStyledBidirectionalText}}setReferrer(S,A){this.referrer=A}setImages(S,A,z){this.availableImages[S]=A;for(const V in this.workerSources[S]){const N=this.workerSources[S][V];for(const X in N)N[X].availableImages=A}z()}setLayers(S,A,z){this.getLayerIndex(S).replace(A),z()}updateLayers(S,A,z){this.getLayerIndex(S).update(A.layers,A.removedIds),z()}loadTile(S,A,z){this.getWorkerSource(S,A.type,A.source).loadTile(A,z)}loadDEMTile(S,A,z){this.getDEMWorkerSource(S,A.source).loadTile(A,z)}reloadTile(S,A,z){this.getWorkerSource(S,A.type,A.source).reloadTile(A,z)}abortTile(S,A,z){this.getWorkerSource(S,A.type,A.source).abortTile(A,z)}removeTile(S,A,z){this.getWorkerSource(S,A.type,A.source).removeTile(A,z)}removeDEMTile(S,A){this.getDEMWorkerSource(S,A.source).removeTile(A)}removeSource(S,A,z){if(!this.workerSources[S]||!this.workerSources[S][A.type]||!this.workerSources[S][A.type][A.source])return;const V=this.workerSources[S][A.type][A.source];delete this.workerSources[S][A.type][A.source],V.removeSource!==void 0?V.removeSource(A,z):z()}loadWorkerSource(S,A,z){try{this.self.importScripts(A.url),z()}catch(V){z(V.toString())}}syncRTLPluginState(S,A,z){try{h.plugin.setState(A);const V=h.plugin.getPluginURL();if(h.plugin.isLoaded()&&!h.plugin.isParsed()&&V!=null){this.self.importScripts(V);const N=h.plugin.isParsed();z(N?void 0:new Error(`RTL Text Plugin failed to import scripts from ${V}`),N)}}catch(V){z(V.toString())}}getAvailableImages(S){let A=this.availableImages[S];return A||(A=[]),A}getLayerIndex(S){let A=this.layerIndexes[S];return A||(A=this.layerIndexes[S]=new vt),A}getWorkerSource(S,A,z){if(this.workerSources[S]||(this.workerSources[S]={}),this.workerSources[S][A]||(this.workerSources[S][A]={}),!this.workerSources[S][A][z]){const V={send:(N,X,j)=>{this.actor.send(N,X,j,S)}};this.workerSources[S][A][z]=new this.workerSourceTypes[A](V,this.getLayerIndex(S),this.getAvailableImages(S))}return this.workerSources[S][A][z]}getDEMWorkerSource(S,A){return this.demWorkerSources[S]||(this.demWorkerSources[S]={}),this.demWorkerSources[S][A]||(this.demWorkerSources[S][A]=new Cr),this.demWorkerSources[S][A]}}return h.isWorker()&&(self.worker=new ir(self)),ir}),jt(["./shared"],function(h){var vt="3.1.0";class te{static testProp(t){if(!te.docStyle)return t[0];for(let n=0;n{window.removeEventListener("click",te.suppressClickInternal,!0)},0)}static mousePos(t,n){const a=t.getBoundingClientRect();return new h.Point(n.clientX-a.left-t.clientLeft,n.clientY-a.top-t.clientTop)}static touchPos(t,n){const a=t.getBoundingClientRect(),c=[];for(let d=0;d{t=[],n=0,a=0,c={}},o.addThrottleControl=x=>{const T=a++;return c[T]=x,T},o.removeThrottleControl=x=>{delete c[x],y()},o.getImage=(x,T,w=!0)=>{Kt.supported&&(x.headers||(x.headers={}),x.headers.accept="image/webp,*/*");const M={requestParameters:x,supportImageRefresh:w,callback:T,cancelled:!1,completed:!1,cancel:()=>{M.completed||M.cancelled||(M.cancelled=!0,M.innerRequest&&(M.innerRequest.cancel(),n--),y())}};return t.push(M),y(),M};const d=x=>{const{requestParameters:T,supportImageRefresh:w,callback:M}=x;return h.extend(T,{type:"image"}),(w!==!1||h.isWorker()||h.getProtocolAction(T.url)||T.headers&&!Object.keys(T.headers).reduce((B,k)=>B&&k==="accept",!0)?h.makeRequest:_)(T,(B,k,D,U)=>{m(x,M,B,k,D,U)})},m=(x,T,w,M,B,k)=>{w?T(w):M instanceof HTMLImageElement||M instanceof ImageBitmap?T(null,M):M&&((D,U)=>{typeof createImageBitmap=="function"?h.arrayBufferToImageBitmap(D,U):h.arrayBufferToImage(D,U)})(M,(D,U)=>{D!=null?T(D):U!=null&&T(null,U,{cacheControl:B,expires:k})}),x.cancelled||(x.completed=!0,n--,y())},y=()=>{const x=(()=>{const T=Object.keys(c);let w=!1;if(T.length>0){for(const M of T)if(w=c[M](),w)break}return w})()?h.config.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:h.config.MAX_PARALLEL_IMAGE_REQUESTS;for(let T=n;T0;T++){const w=t.shift();if(w.cancelled){T--;continue}const M=d(w);n++,w.innerRequest=M}},_=(x,T)=>{const w=new Image,M=x.url;let B=!1;const k=x.credentials;return k&&k==="include"?w.crossOrigin="use-credentials":(k&&k==="same-origin"||!h.sameOrigin(M))&&(w.crossOrigin="anonymous"),w.fetchPriority="high",w.onload=()=>{T(null,w),w.onerror=w.onload=null},w.onerror=()=>{B||T(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")),w.onerror=w.onload=null},w.src=M,{cancel:()=>{B=!0,w.src=""}}}}(pr||(pr={})),pr.resetRequestQueue();var ot,mi=pr;(function(o){o.Glyphs="Glyphs",o.Image="Image",o.Source="Source",o.SpriteImage="SpriteImage",o.SpriteJSON="SpriteJSON",o.Style="Style",o.Tile="Tile",o.Unknown="Unknown"})(ot||(ot={}));class _t{constructor(t){this._transformRequestFn=t}transformRequest(t,n){return this._transformRequestFn&&this._transformRequestFn(t,n)||{url:t}}normalizeSpriteURL(t,n,a){const c=function(d){const m=d.match(ji);if(!m)throw new Error(`Unable to parse URL "${d}"`);return{protocol:m[1],authority:m[2],path:m[3]||"/",params:m[4]?m[4].split("&"):[]}}(t);return c.path+=`${n}${a}`,function(d){const m=d.params.length?`?${d.params.join("&")}`:"";return`${d.protocol}://${d.authority}${d.path}${m}`}(c)}setTransformRequest(t){this._transformRequestFn=t}}const ji=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function gi(o){var t=new h.ARRAY_TYPE(3);return t[0]=o[0],t[1]=o[1],t[2]=o[2],t}var Pr,cn=function(o,t,n){return o[0]=t[0]-n[0],o[1]=t[1]-n[1],o[2]=t[2]-n[2],o};Pr=new h.ARRAY_TYPE(3),h.ARRAY_TYPE!=Float32Array&&(Pr[0]=0,Pr[1]=0,Pr[2]=0);var _i=function(o){var t=o[0],n=o[1];return t*t+n*n};function jr(o){const t=[];if(typeof o=="string")t.push({id:"default",url:o});else if(o&&o.length>0){const n=[];for(const{id:a,url:c}of o){const d=`${a}${c}`;n.indexOf(d)===-1&&(n.push(d),t.push({id:a,url:c}))}}return t}function ti(o,t,n,a,c){if(a)return void o(a);if(c!==Object.values(t).length||c!==Object.values(n).length)return;const d={};for(const m in t){d[m]={};const y=h.exported.getImageCanvasContext(n[m]),_=t[m];for(const x in _){const{width:T,height:w,x:M,y:B,sdf:k,pixelRatio:D,stretchX:U,stretchY:Z,content:J}=_[x];d[m][x]={data:null,pixelRatio:D,sdf:k,stretchX:U,stretchY:Z,content:J,spriteData:{width:T,height:w,x:M,y:B,context:y}}}}o(null,d)}(function(){var o=new h.ARRAY_TYPE(2);h.ARRAY_TYPE!=Float32Array&&(o[0]=0,o[1]=0)})();class ct{constructor(t,n,a,c){this.context=t,this.format=a,this.texture=t.gl.createTexture(),this.update(n,c)}update(t,n,a){const{width:c,height:d}=t,m=!(this.size&&this.size[0]===c&&this.size[1]===d||a),{context:y}=this,{gl:_}=y;if(this.useMipmap=!!(n&&n.useMipmap),_.bindTexture(_.TEXTURE_2D,this.texture),y.pixelStoreUnpackFlipY.set(!1),y.pixelStoreUnpack.set(1),y.pixelStoreUnpackPremultiplyAlpha.set(this.format===_.RGBA&&(!n||n.premultiply!==!1)),m)this.size=[c,d],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||h.isImageBitmap(t)?_.texImage2D(_.TEXTURE_2D,0,this.format,this.format,_.UNSIGNED_BYTE,t):_.texImage2D(_.TEXTURE_2D,0,this.format,c,d,0,this.format,_.UNSIGNED_BYTE,t.data);else{const{x,y:T}=a||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||h.isImageBitmap(t)?_.texSubImage2D(_.TEXTURE_2D,0,x,T,_.RGBA,_.UNSIGNED_BYTE,t):_.texSubImage2D(_.TEXTURE_2D,0,x,T,c,d,_.RGBA,_.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&_.generateMipmap(_.TEXTURE_2D)}bind(t,n,a){const{context:c}=this,{gl:d}=c;d.bindTexture(d.TEXTURE_2D,this.texture),a!==d.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(a=d.LINEAR),t!==this.filter&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,t),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,a||t),this.filter=t),n!==this.wrap&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,n),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,n),this.wrap=n)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}function na(o){const{userImage:t}=o;return!!(t&&t.render&&t.render())&&(o.data.replace(new Uint8Array(t.data.buffer)),!0)}class Bi extends h.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new h.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(t){if(this.loaded!==t&&(this.loaded=t,t)){for(const{ids:n,callback:a}of this.requestors)this._notify(n,a);this.requestors=[]}}getImage(t){const n=this.images[t];if(n&&!n.data&&n.spriteData){const a=n.spriteData;n.data=new h.RGBAImage({width:a.width,height:a.height},a.context.getImageData(a.x,a.y,a.width,a.height).data),n.spriteData=null}return n}addImage(t,n){if(this.images[t])throw new Error(`Image id ${t} already exist, use updateImage instead`);this._validate(t,n)&&(this.images[t]=n)}_validate(t,n){let a=!0;const c=n.data||n.spriteData;return this._validateStretch(n.stretchX,c&&c.width)||(this.fire(new h.ErrorEvent(new Error(`Image "${t}" has invalid "stretchX" value`))),a=!1),this._validateStretch(n.stretchY,c&&c.height)||(this.fire(new h.ErrorEvent(new Error(`Image "${t}" has invalid "stretchY" value`))),a=!1),this._validateContent(n.content,n)||(this.fire(new h.ErrorEvent(new Error(`Image "${t}" has invalid "content" value`))),a=!1),a}_validateStretch(t,n){if(!t)return!0;let a=0;for(const c of t){if(c[0]-1);_++,d[_]=y,m[_]=x,m[_+1]=dr}for(let y=0,_=0;y{let y=this.entries[c];y||(y=this.entries[c]={glyphs:{},requests:{},ranges:{}});let _=y.glyphs[d];if(_!==void 0)return void m(null,{stack:c,id:d,glyph:_});if(_=this._tinySDF(y,c,d),_)return y.glyphs[d]=_,void m(null,{stack:c,id:d,glyph:_});const x=Math.floor(d/256);if(256*x>65535)return void m(new Error("glyphs > 65535 not supported"));if(y.ranges[x])return void m(null,{stack:c,id:d,glyph:_});if(!this.url)return void m(new Error("glyphsUrl is not set"));let T=y.requests[x];T||(T=y.requests[x]=[],fr.loadGlyphRange(c,x,this.url,this.requestManager,(w,M)=>{if(M){for(const B in M)this._doesCharSupportLocalGlyph(+B)||(y.glyphs[+B]=M[+B]);y.ranges[x]=!0}for(const B of T)B(w,M);delete y.requests[x]})),T.push((w,M)=>{w?m(w):M&&m(null,{stack:c,id:d,glyph:M[d]||null})})},(c,d)=>{if(c)n(c);else if(d){const m={};for(const{stack:y,id:_,glyph:x}of d)(m[y]||(m[y]={}))[_]=x&&{id:x.id,bitmap:x.bitmap.clone(),metrics:x.metrics};n(null,m)}})}_doesCharSupportLocalGlyph(t){return!!this.localIdeographFontFamily&&(h.unicodeBlockLookup["CJK Unified Ideographs"](t)||h.unicodeBlockLookup["Hangul Syllables"](t)||h.unicodeBlockLookup.Hiragana(t)||h.unicodeBlockLookup.Katakana(t))}_tinySDF(t,n,a){const c=this.localIdeographFontFamily;if(!c||!this._doesCharSupportLocalGlyph(a))return;let d=t.tinySDF;if(!d){let y="400";/bold/i.test(n)?y="900":/medium/i.test(n)?y="500":/light/i.test(n)&&(y="200"),d=t.tinySDF=new fr.TinySDF({fontSize:24,buffer:3,radius:8,cutoff:.25,fontFamily:c,fontWeight:y})}const m=d.draw(String.fromCharCode(a));return{id:a,bitmap:new h.AlphaImage({width:m.width||30,height:m.height||30},m.data),metrics:{width:m.glyphWidth||24,height:m.glyphHeight||24,left:m.glyphLeft||0,top:m.glyphTop-27||-8,advance:m.glyphAdvance||24}}}}fr.loadGlyphRange=function(o,t,n,a,c){const d=256*t,m=d+255,y=a.transformRequest(n.replace("{fontstack}",o).replace("{range}",`${d}-${m}`),ot.Glyphs);h.getArrayBuffer(y,(_,x)=>{if(_)c(_);else if(x){const T={};for(const w of h.parseGlyphPbf(x))T[w.id]=w;c(null,T)}})},fr.TinySDF=class{constructor({fontSize:o=24,buffer:t=3,radius:n=8,cutoff:a=.25,fontFamily:c="sans-serif",fontWeight:d="normal",fontStyle:m="normal"}={}){this.buffer=t,this.cutoff=a,this.radius=n;const y=this.size=o+4*t,_=this._createCanvas(y),x=this.ctx=_.getContext("2d",{willReadFrequently:!0});x.font=`${m} ${d} ${o}px ${c}`,x.textBaseline="alphabetic",x.textAlign="left",x.fillStyle="black",this.gridOuter=new Float64Array(y*y),this.gridInner=new Float64Array(y*y),this.f=new Float64Array(y),this.z=new Float64Array(y+1),this.v=new Uint16Array(y)}_createCanvas(o){const t=document.createElement("canvas");return t.width=t.height=o,t}draw(o){const{width:t,actualBoundingBoxAscent:n,actualBoundingBoxDescent:a,actualBoundingBoxLeft:c,actualBoundingBoxRight:d}=this.ctx.measureText(o),m=Math.ceil(n),y=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(d-c))),_=Math.min(this.size-this.buffer,m+Math.ceil(a)),x=y+2*this.buffer,T=_+2*this.buffer,w=Math.max(x*T,0),M=new Uint8ClampedArray(w),B={data:M,width:x,height:T,glyphWidth:y,glyphHeight:_,glyphTop:m,glyphLeft:0,glyphAdvance:t};if(y===0||_===0)return B;const{ctx:k,buffer:D,gridInner:U,gridOuter:Z}=this;k.clearRect(D,D,y,_),k.fillText(o,D,D+m);const J=k.getImageData(D,D,y,_);Z.fill(dr,0,w),U.fill(0,0,w);for(let O=0;O<_;O++)for(let K=0;K0?ce*ce:0,U[oe]=ce<0?ce*ce:0}}zr(Z,0,0,x,T,x,this.f,this.v,this.z),zr(U,D,D,y,_,x,this.f,this.v,this.z);for(let O=0;O1&&(_=t[++y]);const T=Math.abs(x-_.left),w=Math.abs(x-_.right),M=Math.min(T,w);let B;const k=d/a*(c+1);if(_.isDash){const D=c-Math.abs(k);B=Math.sqrt(M*M+D*D)}else B=c-Math.sqrt(M*M+k*k);this.data[m+x]=Math.max(0,Math.min(255,B+128))}}}addRegularDash(t){for(let y=t.length-1;y>=0;--y){const _=t[y],x=t[y+1];_.zeroLength?t.splice(y,1):x&&x.isDash===_.isDash&&(x.left=_.left,t.splice(y,1))}const n=t[0],a=t[t.length-1];n.isDash===a.isDash&&(n.left=a.left-this.width,a.right=n.right+this.width);const c=this.width*this.nextRow;let d=0,m=t[d];for(let y=0;y1&&(m=t[++d]);const _=Math.abs(y-m.left),x=Math.abs(y-m.right),T=Math.min(_,x);this.data[c+y]=Math.max(0,Math.min(255,(m.isDash?T:-T)+128))}}addDash(t,n){const a=n?7:0,c=2*a+1;if(this.nextRow+c>this.height)return h.warnOnce("LineAtlas out of space"),null;let d=0;for(let y=0;y{c.send(t,n,d)},a=a||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(t=!0){this.actors.forEach(n=>{n.remove()}),this.actors=[],t&&this.workerPool.release(this.id)}}function Ri(o,t,n){const a=function(c,d){if(c)return n(c);if(d){const m=h.pick(h.extend(d,o),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);d.vector_layers&&(m.vectorLayers=d.vector_layers,m.vectorLayerIds=m.vectorLayers.map(y=>y.id)),n(null,m)}};return o.url?h.getJSON(t.transformRequest(o.url,ot.Source),a):h.exported.frame(()=>a(null,o))}ci.Actor=h.Actor;class Yt{constructor(t,n){t&&(n?this.setSouthWest(t).setNorthEast(n):Array.isArray(t)&&(t.length===4?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1])))}setNorthEast(t){return this._ne=t instanceof h.LngLat?new h.LngLat(t.lng,t.lat):h.LngLat.convert(t),this}setSouthWest(t){return this._sw=t instanceof h.LngLat?new h.LngLat(t.lng,t.lat):h.LngLat.convert(t),this}extend(t){const n=this._sw,a=this._ne;let c,d;if(t instanceof h.LngLat)c=t,d=t;else{if(!(t instanceof Yt))return Array.isArray(t)?t.length===4||t.every(Array.isArray)?this.extend(Yt.convert(t)):this.extend(h.LngLat.convert(t)):t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(h.LngLat.convert(t)):this;if(c=t._sw,d=t._ne,!c||!d)return this}return n||a?(n.lng=Math.min(c.lng,n.lng),n.lat=Math.min(c.lat,n.lat),a.lng=Math.max(d.lng,a.lng),a.lat=Math.max(d.lat,a.lat)):(this._sw=new h.LngLat(c.lng,c.lat),this._ne=new h.LngLat(d.lng,d.lat)),this}getCenter(){return new h.LngLat((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new h.LngLat(this.getWest(),this.getNorth())}getSouthEast(){return new h.LngLat(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(t){const{lng:n,lat:a}=h.LngLat.convert(t);let c=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(c=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&c}static convert(t){return t instanceof Yt?t:t&&new Yt(t)}static fromLngLat(t,n=0){const a=360*n/40075017,c=a/Math.cos(Math.PI/180*t.lat);return new Yt(new h.LngLat(t.lng-c,t.lat-a),new h.LngLat(t.lng+c,t.lat+a))}}class pn{constructor(t,n,a){this.bounds=Yt.convert(this.validateBounds(t)),this.minzoom=n||0,this.maxzoom=a||24}validateBounds(t){return Array.isArray(t)&&t.length===4?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]}contains(t){const n=Math.pow(2,t.z),a=Math.floor(h.mercatorXfromLng(this.bounds.getWest())*n),c=Math.floor(h.mercatorYfromLat(this.bounds.getNorth())*n),d=Math.ceil(h.mercatorXfromLng(this.bounds.getEast())*n),m=Math.ceil(h.mercatorYfromLat(this.bounds.getSouth())*n);return t.x>=a&&t.x=c&&t.y{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),t?this.fire(new h.ErrorEvent(t)):n&&(h.extend(this,n),n.bounds&&(this.tileBounds=new pn(n.bounds,this.minzoom,this.maxzoom)),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}onAdd(t){this.map=t,this.load()}setSourceProperty(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.load()}setTiles(t){return this.setSourceProperty(()=>{this._options.tiles=t}),this}setUrl(t){return this.setSourceProperty(()=>{this.url=t,this._options.url=t}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return h.extend({},this._options)}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),c={request:this.map._requestManager.transformRequest(a,ot.Tile),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function d(m,y){return delete t.request,t.aborted?n(null):m&&m.status!==404?n(m):(y&&y.resourceTiming&&(t.resourceTiming=y.resourceTiming),this.map._refreshExpiredTiles&&y&&t.setExpiryData(y),t.loadVectorData(y,this.map.painter),n(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}c.request.collectResourceTiming=this._collectResourceTiming,t.actor&&t.state!=="expired"?t.state==="loading"?t.reloadCallback=n:t.request=t.actor.send("reloadTile",c,d.bind(this)):(t.actor=this.dispatcher.getActor(),t.request=t.actor.send("loadTile",c,d.bind(this)))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)}unloadTile(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class Xr extends h.Evented{constructor(t,n,a,c){super(),this.id=t,this.dispatcher=a,this.setEventedParent(c),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=h.extend({type:"raster"},n),h.extend(this,h.pick(n,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new h.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=Ri(this._options,this.map._requestManager,(t,n)=>{this._tileJSONRequest=null,this._loaded=!0,t?this.fire(new h.ErrorEvent(t)):n&&(h.extend(this,n),n.bounds&&(this.tileBounds=new pn(n.bounds,this.minzoom,this.maxzoom)),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return h.extend({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);t.request=mi.getImage(this.map._requestManager.transformRequest(a,ot.Tile),(c,d,m)=>{if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(c)t.state="errored",n(c);else if(d){this.map._refreshExpiredTiles&&m&&t.setExpiryData(m);const y=this.map.painter.context,_=y.gl;t.texture=this.map.painter.getTileTexture(d.width),t.texture?t.texture.update(d,{useMipmap:!0}):(t.texture=new ct(y,d,_.RGBA,{useMipmap:!0}),t.texture.bind(_.LINEAR,_.CLAMP_TO_EDGE,_.LINEAR_MIPMAP_NEAREST),y.extTextureFilterAnisotropic&&_.texParameterf(_.TEXTURE_2D,y.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,y.extTextureFilterAnisotropicMax)),t.state="loaded",n(null)}},this.map._refreshExpiredTiles)}abortTile(t,n){t.request&&(t.request.cancel(),delete t.request),n()}unloadTile(t,n){t.texture&&this.map.painter.saveTileTexture(t.texture),n()}hasTransition(){return!1}}class Dr extends Xr{constructor(t,n,a,c){super(t,n,a,c),this.type="raster-dem",this.maxzoom=22,this._options=h.extend({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox"}serialize(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);function c(d,m){d&&(t.state="errored",n(d)),m&&(t.dem=m,t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0,t.state="loaded",n(null))}t.request=mi.getImage(this.map._requestManager.transformRequest(a,ot.Tile),function(d,m){if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(d)t.state="errored",n(d);else if(m){this.map._refreshExpiredTiles&&t.setExpiryData(m),delete m.cacheControl,delete m.expires;const y=h.isImageBitmap(m)&&(un==null&&(un=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),un)?m:h.exported.getImageData(m,1),_={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:y,encoding:this.encoding};t.actor&&t.state!=="expired"||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",_,c.bind(this)))}}.bind(this),this.map._refreshExpiredTiles),t.neighboringTiles=this._getNeighboringTiles(t.tileID)}_getNeighboringTiles(t){const n=t.canonical,a=Math.pow(2,n.z),c=(n.x-1+a)%a,d=n.x===0?t.wrap-1:t.wrap,m=(n.x+1+a)%a,y=n.x+1===a?t.wrap+1:t.wrap,_={};return _[new h.OverscaledTileID(t.overscaledZ,d,n.z,c,n.y).key]={backfilled:!1},_[new h.OverscaledTileID(t.overscaledZ,y,n.z,m,n.y).key]={backfilled:!1},n.y>0&&(_[new h.OverscaledTileID(t.overscaledZ,d,n.z,c,n.y-1).key]={backfilled:!1},_[new h.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},_[new h.OverscaledTileID(t.overscaledZ,y,n.z,m,n.y-1).key]={backfilled:!1}),n.y+1{if(this._pendingLoads--,this._removed||c&&c.abandoned)return void this.fire(new h.Event("dataabort",{dataType:"source"}));let d=null;if(c&&c.resourceTiming&&c.resourceTiming[this.id]&&(d=c.resourceTiming[this.id].slice(0)),a)return void this.fire(new h.ErrorEvent(a));const m={dataType:"source"};this._collectResourceTiming&&d&&d.length>0&&h.extend(m,{resourceTiming:d}),this.fire(new h.Event("data",{...m,sourceDataType:"metadata"})),this.fire(new h.Event("data",{...m,sourceDataType:"content"}))})}loaded(){return this._pendingLoads===0}loadTile(t,n){const a=t.actor?"reloadTile":"loadTile";t.actor=this.actor;const c={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(a,c,(d,m)=>(delete t.request,t.unloadVectorData(),t.aborted?n(null):d?n(d):(t.loadVectorData(m,this.map.painter,a==="reloadTile"),n(null))))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0}unloadTile(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}serialize(){return h.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var gr=h.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Fi extends h.Evented{constructor(t,n,a,c){super(),this.id=t,this.dispatcher=a,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(c),this.options=n}load(t,n){this._loaded=!1,this.fire(new h.Event("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=mi.getImage(this.map._requestManager.transformRequest(this.url,ot.Image),(a,c)=>{this._request=null,this._loaded=!0,a?this.fire(new h.ErrorEvent(a)):c&&(this.image=c,t&&(this.coordinates=t),n&&n(),this._finishLoading())})}loaded(){return this._loaded}updateImage(t){return t.url?(this._request&&(this._request.cancel(),this._request=null),this.options.url=t.url,this.load(t.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}onRemove(){this._request&&(this._request.cancel(),this._request=null)}setCoordinates(t){this.coordinates=t;const n=t.map(h.MercatorCoordinate.fromLngLat);this.tileID=function(c){let d=1/0,m=1/0,y=-1/0,_=-1/0;for(const M of c)d=Math.min(d,M.x),m=Math.min(m,M.y),y=Math.max(y,M.x),_=Math.max(_,M.y);const x=Math.max(y-d,_-m),T=Math.max(0,Math.floor(-Math.log(x)/Math.LN2)),w=Math.pow(2,T);return new h.CanonicalTileID(T,Math.floor((d+y)/2*w),Math.floor((m+_)/2*w))}(n),this.minzoom=this.maxzoom=this.tileID.z;const a=n.map(c=>this.tileID.getTilePoint(c)._round());return this._boundsArray=new h.RasterBoundsArray,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,h.EXTENT,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,h.EXTENT),this._boundsArray.emplaceBack(a[2].x,a[2].y,h.EXTENT,h.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const t=this.map.painter.context,n=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,gr.members)),this.boundsSegments||(this.boundsSegments=h.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new ct(t,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));let a=!1;for(const c in this.tiles){const d=this.tiles[c];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,a=!0)}a&&this.fire(new h.Event("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(t,n){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},n(null)):(t.state="errored",n(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class fn extends Fi{constructor(t,n,a,c){super(t,n,a,c),this.roundZoom=!0,this.type="video",this.options=n}load(){this._loaded=!1;const t=this.options;this.urls=[];for(const n of t.urls)this.urls.push(this.map._requestManager.transformRequest(n,ot.Source).url);h.getVideo(this.urls,(n,a)=>{this._loaded=!0,n?this.fire(new h.ErrorEvent(n)):a&&(this.video=a,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const n=this.video.seekable;tn.end(0)?this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const t=this.map.painter.context,n=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,gr.members)),this.boundsSegments||(this.boundsSegments=h.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new ct(t,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));let a=!1;for(const c in this.tiles){const d=this.tiles[c];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,a=!0)}a&&this.fire(new h.Event("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ie extends Fi{constructor(t,n,a,c){super(t,n,a,c),n.coordinates?Array.isArray(n.coordinates)&&n.coordinates.length===4&&!n.coordinates.some(d=>!Array.isArray(d)||d.length!==2||d.some(m=>typeof m!="number"))||this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${t}`,null,'missing required property "coordinates"'))),n.animate&&typeof n.animate!="boolean"&&this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),n.canvas?typeof n.canvas=="string"||n.canvas instanceof HTMLCanvasElement||this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${t}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${t}`,null,'missing required property "canvas"'))),this.options=n,this.animate=n.animate===void 0||n.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new h.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const n=this.map.painter.context,a=n.gl;this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,gr.members)),this.boundsSegments||(this.boundsSegments=h.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new ct(n,this.canvas,a.RGBA,{premultiply:!0});let c=!1;for(const d in this.tiles){const m=this.tiles[d];m.state!=="loaded"&&(m.state="loaded",m.texture=this.texture,c=!0)}c&&this.fire(new h.Event("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const t of[this.canvas.width,this.canvas.height])if(isNaN(t)||t<=0)return!0;return!1}}const Lr={vector:dn,raster:Xr,"raster-dem":Dr,geojson:mr,video:fn,image:Fi,canvas:ie};function Rn(o,t){const n=h.create();return h.translate(n,n,[1,1,0]),h.scale(n,n,[.5*o.width,.5*o.height,1]),h.multiply(n,n,o.calculatePosMatrix(t.toUnwrapped()))}function pt(o,t,n,a,c,d){const m=function(w,M,B){if(w)for(const k of w){const D=M[k];if(D&&D.source===B&&D.type==="fill-extrusion")return!0}else for(const k in M){const D=M[k];if(D.source===B&&D.type==="fill-extrusion")return!0}return!1}(c&&c.layers,t,o.id),y=d.maxPitchScaleFactor(),_=o.tilesIn(a,y,m);_.sort(Qe);const x=[];for(const w of _)x.push({wrappedTileID:w.tileID.wrapped().key,queryResults:w.tile.queryRenderedFeatures(t,n,o._state,w.queryGeometry,w.cameraQueryGeometry,w.scale,c,d,y,Rn(o.transform,w.tileID))});const T=function(w){const M={},B={};for(const k of w){const D=k.queryResults,U=k.wrappedTileID,Z=B[U]=B[U]||{};for(const J in D){const O=D[J],K=Z[J]=Z[J]||{},ee=M[J]=M[J]||[];for(const oe of O)K[oe.featureIndex]||(K[oe.featureIndex]=!0,ee.push(oe))}}return M}(x);for(const w in T)T[w].forEach(M=>{const B=M.feature,k=o.getFeatureState(B.layer["source-layer"],B.id);B.source=B.layer.source,B.layer["source-layer"]&&(B.sourceLayer=B.layer["source-layer"]),B.state=k});return T}function Qe(o,t){const n=o.tileID,a=t.tileID;return n.overscaledZ-a.overscaledZ||n.canonical.y-a.canonical.y||n.wrap-a.wrap||n.canonical.x-a.canonical.x}class Wr{constructor(t,n){this.timeAdded=0,this.fadeEndTime=0,this.tileID=t,this.uid=h.uniqueId(),this.uses=0,this.tileSize=n,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(t){const n=t+this.timeAdded;nd.getLayer(x)).filter(Boolean);if(_.length!==0){y.layers=_,y.stateDependentLayerIds&&(y.stateDependentLayers=y.stateDependentLayerIds.map(x=>_.filter(T=>T.id===x)[0]));for(const x of _)m[x.id]=y}}return m}(t.buckets,n.style),this.hasSymbolBuckets=!1;for(const c in this.buckets){const d=this.buckets[c];if(d instanceof h.SymbolBucket){if(this.hasSymbolBuckets=!0,!a)break;d.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const c in this.buckets){const d=this.buckets[c];if(d instanceof h.SymbolBucket&&d.hasRTLText){this.hasRTLText=!0,h.lazyLoadRTLTextPlugin();break}}this.queryPadding=0;for(const c in this.buckets){const d=this.buckets[c];this.queryPadding=Math.max(this.queryPadding,n.style.getLayer(c).queryRadius(d))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new h.CollisionBoxArray}unloadVectorData(){for(const t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(t){return this.buckets[t.id]}upload(t){for(const a in this.buckets){const c=this.buckets[a];c.uploadPending()&&c.upload(t)}const n=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new ct(t,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new ct(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)}prepare(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}queryRenderedFeatures(t,n,a,c,d,m,y,_,x,T){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:c,cameraQueryGeometry:d,scale:m,tileSize:this.tileSize,pixelPosMatrix:T,transform:_,params:y,queryPadding:this.queryPadding*x},t,n,a):{}}querySourceFeatures(t,n){const a=this.latestFeatureIndex;if(!a||!a.rawTileData)return;const c=a.loadVTLayers(),d=n&&n.sourceLayer?n.sourceLayer:"",m=c._geojsonTileLayer||c[d];if(!m)return;const y=h.createFilter(n&&n.filter),{z:_,x,y:T}=this.tileID.canonical,w={z:_,x,y:T};for(let M=0;Ma)c=!1;else if(n)if(this.expirationTime{this.remove(t,d)},a)),this.data[c].push(d),this.order.push(c),this.order.length>this.max){const m=this._getAndRemoveByKey(this.order[0]);m&&this.onRemove(m)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const n=this.data[t].shift();return n.timeout&&clearTimeout(n.timeout),this.data[t].length===0&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),n.value}getByKey(t){const n=this.data[t];return n?n[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,n){if(!this.has(t))return this;const a=t.wrapped().key,c=n===void 0?0:this.data[a].indexOf(n),d=this.data[a][c];return this.data[a].splice(c,1),d.timeout&&clearTimeout(d.timeout),this.data[a].length===0&&delete this.data[a],this.onRemove(d.value),this.order.splice(this.order.indexOf(a),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const n=this._getAndRemoveByKey(this.order[0]);n&&this.onRemove(n)}return this}filter(t){const n=[];for(const a in this.data)for(const c of this.data[a])t(c.value)||n.push(c);for(const a of n)this.remove(a.value.tileID,a)}}class os{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,n,a){const c=String(n);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][c]=this.stateChanges[t][c]||{},h.extend(this.stateChanges[t][c],a),this.deletedStates[t]===null){this.deletedStates[t]={};for(const d in this.state[t])d!==c&&(this.deletedStates[t][d]=null)}else if(this.deletedStates[t]&&this.deletedStates[t][c]===null){this.deletedStates[t][c]={};for(const d in this.state[t][c])a[d]||(this.deletedStates[t][c][d]=null)}else for(const d in a)this.deletedStates[t]&&this.deletedStates[t][c]&&this.deletedStates[t][c][d]===null&&delete this.deletedStates[t][c][d]}removeFeatureState(t,n,a){if(this.deletedStates[t]===null)return;const c=String(n);if(this.deletedStates[t]=this.deletedStates[t]||{},a&&n!==void 0)this.deletedStates[t][c]!==null&&(this.deletedStates[t][c]=this.deletedStates[t][c]||{},this.deletedStates[t][c][a]=null);else if(n!==void 0)if(this.stateChanges[t]&&this.stateChanges[t][c])for(a in this.deletedStates[t][c]={},this.stateChanges[t][c])this.deletedStates[t][c][a]=null;else this.deletedStates[t][c]=null;else this.deletedStates[t]=null}getState(t,n){const a=String(n),c=h.extend({},(this.state[t]||{})[a],(this.stateChanges[t]||{})[a]);if(this.deletedStates[t]===null)return{};if(this.deletedStates[t]){const d=this.deletedStates[t][n];if(d===null)return{};for(const m in d)delete c[m]}return c}initializeTileState(t,n){t.setFeatureState(this.state,n)}coalesceChanges(t,n){const a={};for(const c in this.stateChanges){this.state[c]=this.state[c]||{};const d={};for(const m in this.stateChanges[c])this.state[c][m]||(this.state[c][m]={}),h.extend(this.state[c][m],this.stateChanges[c][m]),d[m]=this.state[c][m];a[c]=d}for(const c in this.deletedStates){this.state[c]=this.state[c]||{};const d={};if(this.deletedStates[c]===null)for(const m in this.state[c])d[m]={},this.state[c][m]={};else for(const m in this.deletedStates[c]){if(this.deletedStates[c][m]===null)this.state[c][m]={};else for(const y of Object.keys(this.deletedStates[c][m]))delete this.state[c][m][y];d[m]=this.state[c][m]}a[c]=a[c]||{},h.extend(a[c],d)}if(this.stateChanges={},this.deletedStates={},Object.keys(a).length!==0)for(const c in t)t[c].setFeatureState(a,n)}}class Dt extends h.Evented{constructor(t,n,a){super(),this.id=t,this.dispatcher=a,this.on("data",c=>{c.dataType==="source"&&c.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&c.dataType==="source"&&c.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=function(c,d,m,y){const _=new Lr[d.type](c,d,m,y);if(_.id!==c)throw new Error(`Expected Source id to be ${c} instead of ${_.id}`);return h.bindAll(["load","abort","unload","serialize","prepare"],_),_}(t,n,a,this),this._tiles={},this._cache=new Fn(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new os,this._didEmitContent=!1,this._updated=!1}onAdd(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(t)}onRemove(t){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(t)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const t in this._tiles){const n=this._tiles[t];if(n.state!=="loaded"&&n.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,n){return this._source.loadTile(t,n)}_unloadTile(t){if(this._source.unloadTile)return this._source.unloadTile(t,()=>{})}_abortTile(t){this._source.abortTile&&this._source.abortTile(t,()=>{}),this._source.fire(new h.Event("dataabort",{tile:t,coord:t.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const n in this._tiles){const a=this._tiles[n];a.upload(t),a.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(t=>t.tileID).sort(Hr).map(t=>t.key)}getRenderableIds(t){const n=[];for(const a in this._tiles)this._isIdRenderable(a,t)&&n.push(this._tiles[a]);return t?n.sort((a,c)=>{const d=a.tileID,m=c.tileID,y=new h.Point(d.canonical.x,d.canonical.y)._rotate(this.transform.angle),_=new h.Point(m.canonical.x,m.canonical.y)._rotate(this.transform.angle);return d.overscaledZ-m.overscaledZ||_.y-y.y||_.x-y.x}).map(a=>a.tileID.key):n.map(a=>a.tileID).sort(Hr).map(a=>a.key)}hasRenderableParent(t){const n=this.findLoadedParent(t,0);return!!n&&this._isIdRenderable(n.tileID.key)}_isIdRenderable(t,n){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(n||!this._tiles[t].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const t in this._tiles)this._tiles[t].state!=="errored"&&this._reloadTile(t,"reloading")}}_reloadTile(t,n){const a=this._tiles[t];a&&(a.state!=="loading"&&(a.state=n),this._loadTile(a,this._tileLoaded.bind(this,a,t,n)))}_tileLoaded(t,n,a,c){if(c)return t.state="errored",void(c.status!==404?this._source.fire(new h.ErrorEvent(c,{tile:t})):this.update(this.transform,this.terrain));t.timeAdded=h.exported.now(),a==="expired"&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(n,t),this.getSource().type==="raster-dem"&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new h.Event("data",{dataType:"source",tile:t,coord:t.tileID}))}_backfillDEM(t){const n=this.getRenderableIds();for(let c=0;c1||(Math.abs(m)>1&&(Math.abs(m+_)===1?m+=_:Math.abs(m-_)===1&&(m-=_)),d.dem&&c.dem&&(c.dem.backfillBorder(d.dem,m,y),c.neighboringTiles&&c.neighboringTiles[x]&&(c.neighboringTiles[x].backfilled=!0)))}}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._tiles[t]}_retainLoadedChildren(t,n,a,c){for(const d in this._tiles){let m=this._tiles[d];if(c[d]||!m.hasData()||m.tileID.overscaledZ<=n||m.tileID.overscaledZ>a)continue;let y=m.tileID;for(;m&&m.tileID.overscaledZ>n+1;){const x=m.tileID.scaledTo(m.tileID.overscaledZ-1);m=this._tiles[x.key],m&&m.hasData()&&(y=x)}let _=y;for(;_.overscaledZ>n;)if(_=_.scaledTo(_.overscaledZ-1),t[_.key]){c[y.key]=y;break}}}findLoadedParent(t,n){if(t.key in this._loadedParentTiles){const a=this._loadedParentTiles[t.key];return a&&a.tileID.overscaledZ>=n?a:null}for(let a=t.overscaledZ-1;a>=n;a--){const c=t.scaledTo(a),d=this._getLoadedTile(c);if(d)return d}}_getLoadedTile(t){const n=this._tiles[t.key];return n&&n.hasData()?n:this._cache.getByKey(t.wrapped().key)}updateCacheSize(t){const n=Math.ceil(t.width/this._source.tileSize)+1,a=Math.ceil(t.height/this._source.tileSize)+1,c=Math.floor(n*a*(this._maxTileCacheZoomLevels===null?h.config.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),d=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,c):c;this._cache.setMaxSize(d)}handleWrapJump(t){const n=Math.round((t-(this._prevLng===void 0?t:this._prevLng))/360);if(this._prevLng=t,n){const a={};for(const c in this._tiles){const d=this._tiles[c];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+n),a[d.tileID.key]=d}this._tiles=a;for(const c in this._timers)clearTimeout(this._timers[c]),delete this._timers[c];for(const c in this._tiles)this._setTileReloadTimer(c,this._tiles[c])}}update(t,n){if(this.transform=t,this.terrain=n,!this._sourceLoaded||this._paused)return;let a;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?a=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(T=>new h.OverscaledTileID(T.canonical.z,T.wrap,T.canonical.z,T.canonical.x,T.canonical.y)):(a=t.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:n}),this._source.hasTile&&(a=a.filter(T=>this._source.hasTile(T)))):a=[];const c=t.coveringZoomLevel(this._source),d=Math.max(c-Dt.maxOverzooming,this._source.minzoom),m=Math.max(c+Dt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const T={};for(const w of a)if(w.canonical.z>this._source.minzoom){const M=w.scaledTo(w.canonical.z-1);T[M.key]=M;const B=w.scaledTo(Math.max(this._source.minzoom,Math.min(w.canonical.z,5)));T[B.key]=B}a=a.concat(Object.values(T))}const y=a.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,y&&this.fire(new h.Event("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const _=this._updateRetainedTiles(a,c);if(mn(this._source.type)){const T={},w={},M=Object.keys(_),B=h.exported.now();for(const k of M){const D=_[k],U=this._tiles[k];if(!U||U.fadeEndTime!==0&&U.fadeEndTime<=B)continue;const Z=this.findLoadedParent(D,d);Z&&(this._addTile(Z.tileID),T[Z.tileID.key]=Z.tileID),w[k]=D}this._retainLoadedChildren(w,c,m,_);for(const k in T)_[k]||(this._coveredTiles[k]=!0,_[k]=T[k]);if(n){const k={},D={};for(const U of a)this._tiles[U.key].hasData()?k[U.key]=U:D[U.key]=U;for(const U in D){const Z=D[U].children(this._source.maxzoom);this._tiles[Z[0].key]&&this._tiles[Z[1].key]&&this._tiles[Z[2].key]&&this._tiles[Z[3].key]&&(k[Z[0].key]=_[Z[0].key]=Z[0],k[Z[1].key]=_[Z[1].key]=Z[1],k[Z[2].key]=_[Z[2].key]=Z[2],k[Z[3].key]=_[Z[3].key]=Z[3],delete D[U])}for(const U in D){const Z=this.findLoadedParent(D[U],this._source.minzoom);if(Z){k[Z.tileID.key]=_[Z.tileID.key]=Z.tileID;for(const J in k)k[J].isChildOf(Z.tileID)&&delete k[J]}}for(const U in this._tiles)k[U]||(this._coveredTiles[U]=!0)}}for(const T in _)this._tiles[T].clearFadeHold();const x=h.keysDifference(this._tiles,_);for(const T of x){const w=this._tiles[T];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(T)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)}_updateRetainedTiles(t,n){const a={},c={},d=Math.max(n-Dt.maxOverzooming,this._source.minzoom),m=Math.max(n+Dt.maxUnderzooming,this._source.minzoom),y={};for(const _ of t){const x=this._addTile(_);a[_.key]=_,x.hasData()||nthis._source.maxzoom){const w=_.children(this._source.maxzoom)[0],M=this.getTile(w);if(M&&M.hasData()){a[w.key]=w;continue}}else{const w=_.children(this._source.maxzoom);if(a[w[0].key]&&a[w[1].key]&&a[w[2].key]&&a[w[3].key])continue}let T=x.wasRequested();for(let w=_.overscaledZ-1;w>=d;--w){const M=_.scaledTo(w);if(c[M.key])break;if(c[M.key]=!0,x=this.getTile(M),!x&&T&&(x=this._addTile(M)),x){const B=x.hasData();if((T||B)&&(a[M.key]=M),T=x.wasRequested(),B)break}}}return a}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const t in this._tiles){const n=[];let a,c=this._tiles[t].tileID;for(;c.overscaledZ>0;){if(c.key in this._loadedParentTiles){a=this._loadedParentTiles[c.key];break}n.push(c.key);const d=c.scaledTo(c.overscaledZ-1);if(a=this._getLoadedTile(d),a)break;c=d}for(const d of n)this._loadedParentTiles[d]=a}}_addTile(t){let n=this._tiles[t.key];if(n)return n;n=this._cache.getAndRemove(t),n&&(this._setTileReloadTimer(t.key,n),n.tileID=t,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,n)));const a=n;return n||(n=new Wr(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,t.key,n.state))),n.uses++,this._tiles[t.key]=n,a||this._source.fire(new h.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n}_setTileReloadTimer(t,n){t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);const a=n.getExpiryTimeout();a&&(this._timers[t]=setTimeout(()=>{this._reloadTile(t,"expired"),delete this._timers[t]},a))}_removeTile(t){const n=this._tiles[t];n&&(n.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),n.uses>0||(n.hasData()&&n.state!=="reloading"?this._cache.add(n.tileID,n,n.getExpiryTimeout()):(n.aborted=!0,this._abortTile(n),this._unloadTile(n))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const t in this._tiles)this._removeTile(t);this._cache.reset()}tilesIn(t,n,a){const c=[],d=this.transform;if(!d)return c;const m=a?d.getCameraQueryGeometry(t):t,y=t.map(k=>d.pointCoordinate(k,this.terrain)),_=m.map(k=>d.pointCoordinate(k,this.terrain)),x=this.getIds();let T=1/0,w=1/0,M=-1/0,B=-1/0;for(const k of _)T=Math.min(T,k.x),w=Math.min(w,k.y),M=Math.max(M,k.x),B=Math.max(B,k.y);for(let k=0;k=0&&O[1].y+J>=0){const K=y.map(oe=>U.getTilePoint(oe)),ee=_.map(oe=>U.getTilePoint(oe));c.push({tile:D,tileID:U,queryGeometry:K,cameraQueryGeometry:ee,scale:Z})}}return c}getVisibleCoordinates(t){const n=this.getRenderableIds(t).map(a=>this._tiles[a].tileID);for(const a of n)a.posMatrix=this.transform.calculatePosMatrix(a.toUnwrapped());return n}hasTransition(){if(this._source.hasTransition())return!0;if(mn(this._source.type)){const t=h.exported.now();for(const n in this._tiles)if(this._tiles[n].fadeEndTime>=t)return!0}return!1}setFeatureState(t,n,a){this._state.updateState(t=t||"_geojsonTileLayer",n,a)}removeFeatureState(t,n,a){this._state.removeFeatureState(t=t||"_geojsonTileLayer",n,a)}getFeatureState(t,n){return this._state.getState(t=t||"_geojsonTileLayer",n)}setDependencies(t,n,a){const c=this._tiles[t];c&&c.setDependencies(n,a)}reloadTilesForDependencies(t,n){for(const a in this._tiles)this._tiles[a].hasDependency(t,n)&&this._reloadTile(a,"reloading");this._cache.filter(a=>!a.hasDependency(t,n))}}function Hr(o,t){const n=Math.abs(2*o.wrap)-+(o.wrap<0),a=Math.abs(2*t.wrap)-+(t.wrap<0);return o.overscaledZ-t.overscaledZ||a-n||t.canonical.y-o.canonical.y||t.canonical.x-o.canonical.x}function mn(o){return o==="raster"||o==="image"||o==="video"}Dt.maxOverzooming=10,Dt.maxUnderzooming=3;const Kr="mapboxgl_preloaded_worker_pool";class de{constructor(){this.active={}}acquire(t){if(!this.workers)for(this.workers=[];this.workers.length{n.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Kr]}numActive(){return Object.keys(this.active).length}}const tr=Math.floor(h.exported.hardwareConcurrency/2);let ii;function gn(){return ii||(ii=new de),ii}de.workerCount=h.isSafari(globalThis)?Math.max(Math.min(tr,3),1):1;class Br{constructor(t,n){this.reset(t,n)}reset(t,n){this.points=t||[],this._distances=[0];for(let a=1;a0?(c-m)/y:0;return this.points[d].mult(1-_).add(this.points[n].mult(_))}}function pe(o,t){let n=!0;return o==="always"||o!=="never"&&t!=="never"||(n=!1),n}class qe{constructor(t,n,a){const c=this.boxCells=[],d=this.circleCells=[];this.xCellCount=Math.ceil(t/a),this.yCellCount=Math.ceil(n/a);for(let m=0;mthis.width||c<0||n>this.height)return[];const _=[];if(t<=0&&n<=0&&this.width<=a&&this.height<=c){if(d)return[{key:null,x1:t,y1:n,x2:a,y2:c}];for(let x=0;x0}hitTestCircle(t,n,a,c,d){const m=t-a,y=t+a,_=n-a,x=n+a;if(y<0||m>this.width||x<0||_>this.height)return!1;const T=[];return this._forEachCell(m,_,y,x,this._queryCellCircle,T,{hitTest:!0,overlapMode:c,circle:{x:t,y:n,radius:a},seenUids:{box:{},circle:{}}},d),T.length>0}_queryCell(t,n,a,c,d,m,y,_){const{seenUids:x,hitTest:T,overlapMode:w}=y,M=this.boxCells[d];if(M!==null){const k=this.bboxes;for(const D of M)if(!x.box[D]){x.box[D]=!0;const U=4*D,Z=this.boxKeys[D];if(t<=k[U+2]&&n<=k[U+3]&&a>=k[U+0]&&c>=k[U+1]&&(!_||_(Z))&&(!T||!pe(w,Z.overlapMode))&&(m.push({key:Z,x1:k[U],y1:k[U+1],x2:k[U+2],y2:k[U+3]}),T))return!0}}const B=this.circleCells[d];if(B!==null){const k=this.circles;for(const D of B)if(!x.circle[D]){x.circle[D]=!0;const U=3*D,Z=this.circleKeys[D];if(this._circleAndRectCollide(k[U],k[U+1],k[U+2],t,n,a,c)&&(!_||_(Z))&&(!T||!pe(w,Z.overlapMode))){const J=k[U],O=k[U+1],K=k[U+2];if(m.push({key:Z,x1:J-K,y1:O-K,x2:J+K,y2:O+K}),T)return!0}}}return!1}_queryCellCircle(t,n,a,c,d,m,y,_){const{circle:x,seenUids:T,overlapMode:w}=y,M=this.boxCells[d];if(M!==null){const k=this.bboxes;for(const D of M)if(!T.box[D]){T.box[D]=!0;const U=4*D,Z=this.boxKeys[D];if(this._circleAndRectCollide(x.x,x.y,x.radius,k[U+0],k[U+1],k[U+2],k[U+3])&&(!_||_(Z))&&!pe(w,Z.overlapMode))return m.push(!0),!0}}const B=this.circleCells[d];if(B!==null){const k=this.circles;for(const D of B)if(!T.circle[D]){T.circle[D]=!0;const U=3*D,Z=this.circleKeys[D];if(this._circlesCollide(k[U],k[U+1],k[U+2],x.x,x.y,x.radius)&&(!_||_(Z))&&!pe(w,Z.overlapMode))return m.push(!0),!0}}}_forEachCell(t,n,a,c,d,m,y,_){const x=this._convertToXCellCoord(t),T=this._convertToYCellCoord(n),w=this._convertToXCellCoord(a),M=this._convertToYCellCoord(c);for(let B=x;B<=w;B++)for(let k=T;k<=M;k++)if(d.call(this,t,n,a,c,this.xCellCount*k+B,m,y,_))return}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}_convertToYCellCoord(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}_circlesCollide(t,n,a,c,d,m){const y=c-t,_=d-n,x=a+m;return x*x>y*y+_*_}_circleAndRectCollide(t,n,a,c,d,m,y){const _=(m-c)/2,x=Math.abs(t-(c+_));if(x>_+a)return!1;const T=(y-d)/2,w=Math.abs(n-(d+T));if(w>T+a)return!1;if(x<=_||w<=T)return!0;const M=x-_,B=w-T;return M*M+B*B<=a*a}}function Ne(o,t,n,a,c){const d=h.create();return t?(h.scale(d,d,[1/c,1/c,1]),n||h.rotateZ(d,d,a.angle)):h.multiply(d,a.labelPlaneMatrix,o),d}function yi(o,t,n,a,c){if(t){const d=h.clone(o);return h.scale(d,d,[c,c,1]),n||h.rotateZ(d,d,-a.angle),d}return a.glCoordMatrix}function Vt(o,t,n){let a;n?(a=[o.x,o.y,n(o.x,o.y),1],h.transformMat4(a,a,t)):(a=[o.x,o.y,0,1],V(a,a,t));const c=a[3];return{point:new h.Point(a[0]/c,a[1]/c),signedDistanceFromCamera:c}}function Ue(o,t){return .5+o/t*.5}function _r(o,t){const n=o[0]/o[3],a=o[1]/o[3];return n>=-t[0]&&n<=t[0]&&a>=-t[1]&&a<=t[1]}function yr(o,t,n,a,c,d,m,y,_,x){const T=a?o.textSizeData:o.iconSizeData,w=h.evaluateSizeForZoom(T,n.transform.zoom),M=[256/n.width*2+1,256/n.height*2+1],B=a?o.text.dynamicLayoutVertexArray:o.icon.dynamicLayoutVertexArray;B.clear();const k=o.lineVertexArray,D=a?o.text.placedSymbolArray:o.icon.placedSymbolArray,U=n.transform.width/n.transform.height;let Z=!1;for(let J=0;JMath.abs(n.x-t.x)*a?{useVertical:!0}:(o===h.WritingMode.vertical?t.yn.x)?{needsFlipping:!0}:null}function Jt(o,t,n,a,c,d,m,y,_,x,T,w,M,B,k,D){const U=t/24,Z=o.lineOffsetX*U,J=o.lineOffsetY*U;let O;if(o.numGlyphs>1){const K=o.glyphStartIndex+o.numGlyphs,ee=o.lineStartIndex,oe=o.lineStartIndex+o.lineLength,ce=Zi(U,y,Z,J,n,T,w,o,_,d,M,k,D);if(!ce)return{notEnoughRoom:!0};const ue=Vt(ce.first.point,m,D).point,le=Vt(ce.last.point,m,D).point;if(a&&!n){const be=xr(o.writingMode,ue,le,B);if(be)return be}O=[ce.first];for(let be=o.glyphStartIndex+1;be0?ue.point:mt(w,ce,ee,1,c,D),be=xr(o.writingMode,ee,le,B);if(be)return be}const K=S(U*y.getoffsetX(o.glyphStartIndex),Z,J,n,T,w,o.segment,o.lineStartIndex,o.lineStartIndex+o.lineLength,_,d,M,k,D);if(!K)return{notEnoughRoom:!0};O=[K]}for(const K of O)h.addDynamicAttributes(x,K.point,K.angle);return{}}function mt(o,t,n,a,c,d){const m=Vt(o.add(o.sub(t)._unit()),c,d).point,y=n.sub(m);return n.add(y._mult(a/y.mag()))}function On(o,t){const{projectionCache:n,lineVertexArray:a,labelPlaneMatrix:c,tileAnchorPoint:d,distanceFromAnchor:m,getElevation:y,previousVertex:_,direction:x,absOffsetX:T}=t;if(n.projections[o])return n.projections[o];const w=new h.Point(a.getx(o),a.gety(o)),M=Vt(w,c,y);if(M.signedDistanceFromCamera>0)return n.projections[o]=M.point,M.point;const B=o-x;return mt(m===0?d:new h.Point(a.getx(B),a.gety(B)),w,_,T-m+1,c,y)}function ir(o,t,n){return o._unit()._perp()._mult(t*n)}function F(o,t,n,a,c,d,m,y){const{projectionCache:_,direction:x}=y;if(_.offsets[o])return _.offsets[o];const T=n.add(t);if(o+x=c)return _.offsets[o]=T,T;const w=On(o+x,y),M=ir(w.sub(n),m,x),B=n.add(M),k=w.add(M);return _.offsets[o]=h.findLineIntersection(d,T,B,k)||T,_.offsets[o]}function S(o,t,n,a,c,d,m,y,_,x,T,w,M,B){const k=a?o-t:o+t;let D=k>0?1:-1,U=0;a&&(D*=-1,U=Math.PI),D<0&&(U+=Math.PI);let Z,J,O=D>0?y+m:y+m+1,K=c,ee=c,oe=0,ce=0;const ue=Math.abs(k),le=[];let be;for(;oe+ce<=ue;){if(O+=D,O=_)return null;oe+=ce,ee=K,J=Z;const me={projectionCache:w,lineVertexArray:x,labelPlaneMatrix:T,tileAnchorPoint:d,distanceFromAnchor:oe,getElevation:B,previousVertex:ee,direction:D,absOffsetX:ue};if(K=On(O,me),n===0)le.push(ee),be=K.sub(ee);else{let Be;const we=K.sub(ee);Be=we.mag()===0?ir(On(O+D,me).sub(K),n,D):ir(we,n,D),J||(J=ee.add(Be)),Z=F(O,Be,K,y,_,J,n,me),le.push(J),be=Z.sub(J)}ce=be.mag()}const ze=be._mult((ue-oe)/ce)._add(J||ee),Ve=U+Math.atan2(K.y-ee.y,K.x-ee.x);return le.push(ze),{point:ze,angle:M?Ve:0,path:le}}const A=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function z(o,t){for(let n=0;n=1;rt--)we.push(me.path[rt]);for(let rt=1;rtVt($e,_,k));we=rt.some($e=>$e.signedDistanceFromCamera<=0)?[]:rt.map($e=>$e.point)}let Pt=[];if(we.length>0){const rt=we[0].clone(),$e=we[0].clone();for(let It=1;It=be.x&&$e.x<=ze.x&&rt.y>=be.y&&$e.y<=ze.y?[we]:$e.xze.x||$e.yze.y?[]:h.clipLine([we],be.x,be.y,ze.x,ze.y)}for(const rt of Pt){Ve.reset(rt,.25*le);let $e=0;$e=Ve.length<=.5*le?1:Math.ceil(Ve.paddedLength/it)+1;for(let It=0;It<$e;It++){const hi=It/Math.max($e-1,1),zt=Ve.lerp(hi),Zt=zt.x+N,Ii=zt.y+N;D.push(Zt,Ii,le,0);const Xi=Zt-le,Wi=Ii-le,ui=Zt+le,cr=Ii+le;if(ue=ue&&this.isOffscreen(Xi,Wi,ui,cr),ce=ce||this.isInsideGrid(Xi,Wi,ui,cr),t!=="always"&&this.grid.hitTestCircle(Zt,Ii,le,t,w)&&(oe=!0,!x))return{circles:[],offscreen:!1,collisionDetected:oe}}}}return{circles:!x&&oe||!ce||J=this.screenRightBoundary||cthis.screenBottomBoundary}isInsideGrid(t,n,a,c){return a>=0&&t=0&&na.collisionGroupID===n}}return this.collisionGroups[t]}}function Oe(o,t,n,a,c){const{horizontalAlign:d,verticalAlign:m}=h.getAnchorAlignment(o),y=-(d-.5)*t,_=-(m-.5)*n,x=h.evaluateVariableOffset(o,a);return new h.Point(y+x[0]*c,_+x[1]*c)}function Se(o,t,n,a,c,d){const{x1:m,x2:y,y1:_,y2:x,anchorPointX:T,anchorPointY:w}=o,M=new h.Point(t,n);return a&&M._rotate(c?d:-d),{x1:m+M.x,y1:_+M.y,x2:y+M.x,y2:x+M.y,anchorPointX:T,anchorPointY:w}}class Pe{constructor(t,n,a,c,d){this.transform=t.clone(),this.terrain=n,this.collisionIndex=new X(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=a,this.retainedQueryData={},this.collisionGroups=new De(c),this.collisionCircleArrays={},this.prevPlacement=d,d&&(d.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,n,a,c){const d=a.getBucket(n),m=a.latestFeatureIndex;if(!d||!m||n.id!==d.layerIds[0])return;const y=a.collisionBoxArray,_=d.layers[0].layout,x=Math.pow(2,this.transform.zoom-a.tileID.overscaledZ),T=a.tileSize/h.EXTENT,w=this.transform.calculatePosMatrix(a.tileID.toUnwrapped()),M=_.get("text-pitch-alignment")==="map",B=_.get("text-rotation-alignment")==="map",k=j(a,1,this.transform.zoom),D=Ne(w,M,B,this.transform,k);let U=null;if(M){const J=yi(w,M,B,this.transform,k);U=h.multiply([],this.transform.labelPlaneMatrix,J)}this.retainedQueryData[d.bucketInstanceId]=new se(d.bucketInstanceId,m,d.sourceLayerIndex,d.index,a.tileID);const Z={bucket:d,layout:_,posMatrix:w,textLabelPlaneMatrix:D,labelToScreenMatrix:U,scale:x,textPixelRatio:T,holdingForFade:a.holdingForFade(),collisionBoxArray:y,partiallyEvaluatedTextSize:h.evaluateSizeForZoom(d.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(d.sourceID)};if(c)for(const J of d.sortKeyRanges){const{sortKey:O,symbolInstanceStart:K,symbolInstanceEnd:ee}=J;t.push({sortKey:O,symbolInstanceStart:K,symbolInstanceEnd:ee,parameters:Z})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:d.symbolInstances.length,parameters:Z})}attemptAnchorPlacement(t,n,a,c,d,m,y,_,x,T,w,M,B,k,D,U){const Z=[M.textOffset0,M.textOffset1],J=Oe(t,a,c,Z,d),O=this.collisionIndex.placeCollisionBox(Se(n,J.x,J.y,m,y,this.transform.angle),w,_,x,T.predicate,U);if((!D||this.collisionIndex.placeCollisionBox(Se(D,J.x,J.y,m,y,this.transform.angle),w,_,x,T.predicate,U).box.length!==0)&&O.box.length>0){let K;if(this.prevPlacement&&this.prevPlacement.variableOffsets[M.crossTileID]&&this.prevPlacement.placements[M.crossTileID]&&this.prevPlacement.placements[M.crossTileID].text&&(K=this.prevPlacement.variableOffsets[M.crossTileID].anchor),M.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[M.crossTileID]={textOffset:Z,width:a,height:c,anchor:t,textBoxScale:d,prevAnchor:K},this.markUsedJustification(B,t,M,k),B.allowVerticalPlacement&&(this.markUsedOrientation(B,k,M),this.placedOrientations[M.crossTileID]=k),{shift:J,placedGlyphBoxes:O}}}placeLayerBucketPart(t,n,a){const{bucket:c,layout:d,posMatrix:m,textLabelPlaneMatrix:y,labelToScreenMatrix:_,textPixelRatio:x,holdingForFade:T,collisionBoxArray:w,partiallyEvaluatedTextSize:M,collisionGroup:B}=t.parameters,k=d.get("text-optional"),D=d.get("icon-optional"),U=h.getOverlapMode(d,"text-overlap","text-allow-overlap"),Z=U==="always",J=h.getOverlapMode(d,"icon-overlap","icon-allow-overlap"),O=J==="always",K=d.get("text-rotation-alignment")==="map",ee=d.get("text-pitch-alignment")==="map",oe=d.get("icon-text-fit")!=="none",ce=d.get("symbol-z-order")==="viewport-y",ue=Z&&(O||!c.hasIconData()||D),le=O&&(Z||!c.hasTextData()||k);!c.collisionArrays&&w&&c.deserializeCollisionBoxes(w);const be=this.retainedQueryData[c.bucketInstanceId].tileID,ze=this.terrain?(me,Be)=>this.terrain.getElevation(be,me,Be):null,Ve=(me,Be)=>{if(n[me.crossTileID])return;if(T)return void(this.placements[me.crossTileID]=new ne(!1,!1,!1));let we=!1,it=!1,Pt=!0,rt=null,$e={box:null,offscreen:null},It={box:null,offscreen:null},hi=null,zt=null,Zt=null,Ii=0,Xi=0,Wi=0;Be.textFeatureIndex?Ii=Be.textFeatureIndex:me.useRuntimeCollisionCircles&&(Ii=me.featureIndex),Be.verticalTextFeatureIndex&&(Xi=Be.verticalTextFeatureIndex);const ui=Be.textBox;if(ui){const ri=nt=>{let Nt=h.WritingMode.horizontal;if(c.allowVerticalPlacement&&!nt&&this.prevPlacement){const Xt=this.prevPlacement.placedOrientations[me.crossTileID];Xt&&(this.placedOrientations[me.crossTileID]=Xt,Nt=Xt,this.markUsedOrientation(c,Nt,me))}return Nt},Gt=(nt,Nt)=>{if(c.allowVerticalPlacement&&me.numVerticalGlyphVertices>0&&Be.verticalTextBox){for(const Xt of c.writingModes)if(Xt===h.WritingMode.vertical?($e=Nt(),It=$e):$e=nt(),$e&&$e.box&&$e.box.length)break}else $e=nt()};if(d.get("text-variable-anchor")){let nt=d.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[me.crossTileID]){const at=this.prevPlacement.variableOffsets[me.crossTileID];nt.indexOf(at.anchor)>0&&(nt=nt.filter($t=>$t!==at.anchor),nt.unshift(at.anchor))}const Nt=(at,$t,Ai)=>{const Gs=at.x2-at.x1,Tr=at.y2-at.y1,Pl=me.textBoxScale,jo=oe&&J==="never"?$t:null;let yt={box:[],offscreen:!1};const Na=U!=="never"?2*nt.length:nt.length;for(let rs=0;rs=nt.length?U:"never",me,c,Ai,jo,ze);if(Er&&(yt=Er.placedGlyphBoxes,yt&&yt.box&&yt.box.length)){we=!0,rt=Er.shift;break}}return yt};Gt(()=>Nt(ui,Be.iconBox,h.WritingMode.horizontal),()=>{const at=Be.verticalTextBox;return c.allowVerticalPlacement&&!($e&&$e.box&&$e.box.length)&&me.numVerticalGlyphVertices>0&&at?Nt(at,Be.verticalIconBox,h.WritingMode.vertical):{box:null,offscreen:null}}),$e&&(we=$e.box,Pt=$e.offscreen);const Xt=ri($e&&$e.box);if(!we&&this.prevPlacement){const at=this.prevPlacement.variableOffsets[me.crossTileID];at&&(this.variableOffsets[me.crossTileID]=at,this.markUsedJustification(c,at.anchor,me,Xt))}}else{const nt=(Nt,Xt)=>{const at=this.collisionIndex.placeCollisionBox(Nt,U,x,m,B.predicate,ze);return at&&at.box&&at.box.length&&(this.markUsedOrientation(c,Xt,me),this.placedOrientations[me.crossTileID]=Xt),at};Gt(()=>nt(ui,h.WritingMode.horizontal),()=>{const Nt=Be.verticalTextBox;return c.allowVerticalPlacement&&me.numVerticalGlyphVertices>0&&Nt?nt(Nt,h.WritingMode.vertical):{box:null,offscreen:null}}),ri($e&&$e.box&&$e.box.length)}}if(hi=$e,we=hi&&hi.box&&hi.box.length>0,Pt=hi&&hi.offscreen,me.useRuntimeCollisionCircles){const ri=c.text.placedSymbolArray.get(me.centerJustifiedTextSymbolIndex),Gt=h.evaluateSizeForFeature(c.textSizeData,M,ri),nt=d.get("text-padding");zt=this.collisionIndex.placeCollisionCircles(U,ri,c.lineVertexArray,c.glyphOffsetArray,Gt,m,y,_,a,ee,B.predicate,me.collisionCircleDiameter,nt,ze),zt.circles.length&&zt.collisionDetected&&!a&&h.warnOnce("Collisions detected, but collision boxes are not shown"),we=Z||zt.circles.length>0&&!zt.collisionDetected,Pt=Pt&&zt.offscreen}if(Be.iconFeatureIndex&&(Wi=Be.iconFeatureIndex),Be.iconBox){const ri=Gt=>{const nt=oe&&rt?Se(Gt,rt.x,rt.y,K,ee,this.transform.angle):Gt;return this.collisionIndex.placeCollisionBox(nt,J,x,m,B.predicate,ze)};It&&It.box&&It.box.length&&Be.verticalIconBox?(Zt=ri(Be.verticalIconBox),it=Zt.box.length>0):(Zt=ri(Be.iconBox),it=Zt.box.length>0),Pt=Pt&&Zt.offscreen}const cr=k||me.numHorizontalGlyphVertices===0&&me.numVerticalGlyphVertices===0,is=D||me.numIconVertices===0;if(cr||is?is?cr||(it=it&&we):we=it&&we:it=we=it&&we,we&&hi&&hi.box&&this.collisionIndex.insertCollisionBox(hi.box,U,d.get("text-ignore-placement"),c.bucketInstanceId,It&&It.box&&Xi?Xi:Ii,B.ID),it&&Zt&&this.collisionIndex.insertCollisionBox(Zt.box,J,d.get("icon-ignore-placement"),c.bucketInstanceId,Wi,B.ID),zt&&(we&&this.collisionIndex.insertCollisionCircles(zt.circles,U,d.get("text-ignore-placement"),c.bucketInstanceId,Ii,B.ID),a)){const ri=c.bucketInstanceId;let Gt=this.collisionCircleArrays[ri];Gt===void 0&&(Gt=this.collisionCircleArrays[ri]=new ae);for(let nt=0;nt=0;--Be){const we=me[Be];Ve(c.symbolInstances.get(we),c.collisionArrays[we])}}else for(let me=t.symbolInstanceStart;me=0&&(t.text.placedSymbolArray.get(y).crossTileID=d>=0&&y!==d?0:a.crossTileID)}markUsedOrientation(t,n,a){const c=n===h.WritingMode.horizontal||n===h.WritingMode.horizontalOnly?n:0,d=n===h.WritingMode.vertical?n:0,m=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex];for(const y of m)t.text.placedSymbolArray.get(y).placedOrientation=c;a.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).placedOrientation=d)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;const n=this.prevPlacement;let a=!1;this.prevZoomAdjustment=n?n.zoomAdjustment(this.transform.zoom):0;const c=n?n.symbolFadeChange(t):1,d=n?n.opacities:{},m=n?n.variableOffsets:{},y=n?n.placedOrientations:{};for(const _ in this.placements){const x=this.placements[_],T=d[_];T?(this.opacities[_]=new H(T,c,x.text,x.icon),a=a||x.text!==T.text.placed||x.icon!==T.icon.placed):(this.opacities[_]=new H(null,c,x.text,x.icon,x.skipFade),a=a||x.text||x.icon)}for(const _ in d){const x=d[_];if(!this.opacities[_]){const T=new H(x,c,!1,!1);T.isHidden()||(this.opacities[_]=T,a=a||x.text.placed||x.icon.placed)}}for(const _ in m)this.variableOffsets[_]||!this.opacities[_]||this.opacities[_].isHidden()||(this.variableOffsets[_]=m[_]);for(const _ in y)this.placedOrientations[_]||!this.opacities[_]||this.opacities[_].isHidden()||(this.placedOrientations[_]=y[_]);if(n&&n.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");a?this.lastPlacementChangeTime=t:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=n?n.lastPlacementChangeTime:t)}updateLayerOpacities(t,n){const a={};for(const c of n){const d=c.getBucket(t);d&&c.latestFeatureIndex&&t.id===d.layerIds[0]&&this.updateBucketOpacities(d,a,c.collisionBoxArray)}}updateBucketOpacities(t,n,a){t.hasTextData()&&(t.text.opacityVertexArray.clear(),t.text.hasVisibleVertices=!1),t.hasIconData()&&(t.icon.opacityVertexArray.clear(),t.icon.hasVisibleVertices=!1),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const c=t.layers[0].layout,d=new H(null,0,!1,!1,!0),m=c.get("text-allow-overlap"),y=c.get("icon-allow-overlap"),_=c.get("text-variable-anchor"),x=c.get("text-rotation-alignment")==="map",T=c.get("text-pitch-alignment")==="map",w=c.get("icon-text-fit")!=="none",M=new H(null,0,m&&(y||!t.hasIconData()||c.get("icon-optional")),y&&(m||!t.hasTextData()||c.get("text-optional")),!0);!t.collisionArrays&&a&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(a);const B=(k,D,U)=>{for(let Z=0;Z0,ee=this.placedOrientations[D.crossTileID],oe=ee===h.WritingMode.vertical,ce=ee===h.WritingMode.horizontal||ee===h.WritingMode.horizontalOnly;if(U>0||Z>0){const ue=Rr(O.text);B(t.text,U,oe?Qt:ue),B(t.text,Z,ce?Qt:ue);const le=O.text.isHidden();[D.rightJustifiedTextSymbolIndex,D.centerJustifiedTextSymbolIndex,D.leftJustifiedTextSymbolIndex].forEach(Ve=>{Ve>=0&&(t.text.placedSymbolArray.get(Ve).hidden=le||oe?1:0)}),D.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(D.verticalPlacedTextSymbolIndex).hidden=le||ce?1:0);const be=this.variableOffsets[D.crossTileID];be&&this.markUsedJustification(t,be.anchor,D,ee);const ze=this.placedOrientations[D.crossTileID];ze&&(this.markUsedJustification(t,"left",D,ze),this.markUsedOrientation(t,ze,D))}if(K){const ue=Rr(O.icon),le=!(w&&D.verticalPlacedIconSymbolIndex&&oe);D.placedIconSymbolIndex>=0&&(B(t.icon,D.numIconVertices,le?ue:Qt),t.icon.placedSymbolArray.get(D.placedIconSymbolIndex).hidden=O.icon.isHidden()),D.verticalPlacedIconSymbolIndex>=0&&(B(t.icon,D.numVerticalIconVertices,le?Qt:ue),t.icon.placedSymbolArray.get(D.verticalPlacedIconSymbolIndex).hidden=O.icon.isHidden())}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const ue=t.collisionArrays[k];if(ue){let le=new h.Point(0,0);if(ue.textBox||ue.verticalTextBox){let ze=!0;if(_){const Ve=this.variableOffsets[J];Ve?(le=Oe(Ve.anchor,Ve.width,Ve.height,Ve.textOffset,Ve.textBoxScale),x&&le._rotate(T?this.transform.angle:-this.transform.angle)):ze=!1}ue.textBox&&Fe(t.textCollisionBox.collisionVertexArray,O.text.placed,!ze||oe,le.x,le.y),ue.verticalTextBox&&Fe(t.textCollisionBox.collisionVertexArray,O.text.placed,!ze||ce,le.x,le.y)}const be=!!(!ce&&ue.verticalIconBox);ue.iconBox&&Fe(t.iconCollisionBox.collisionVertexArray,O.icon.placed,be,w?le.x:0,w?le.y:0),ue.verticalIconBox&&Fe(t.iconCollisionBox.collisionVertexArray,O.icon.placed,!be,w?le.x:0,w?le.y:0)}}}if(t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.text.opacityVertexArray.length!==t.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${t.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${t.text.layoutVertexArray.length}) / 4`);if(t.icon.opacityVertexArray.length!==t.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${t.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${t.icon.layoutVertexArray.length}) / 4`);if(t.bucketInstanceId in this.collisionCircleArrays){const k=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=k.invProjMatrix,t.placementViewportMatrix=k.viewportMatrix,t.collisionCircleArray=k.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(t){return this.fadeDuration===0?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform.zoom-t)/1.5)}hasTransitions(t){return this.stale||t-this.lastPlacementChangeTimet}setStale(){this.stale=!0}}function Fe(o,t,n,a,c){o.emplaceBack(t?1:0,n?1:0,a||0,c||0),o.emplaceBack(t?1:0,n?1:0,a||0,c||0),o.emplaceBack(t?1:0,n?1:0,a||0,c||0),o.emplaceBack(t?1:0,n?1:0,a||0,c||0)}const He=Math.pow(2,25),je=Math.pow(2,24),et=Math.pow(2,17),dt=Math.pow(2,16),Lt=Math.pow(2,9),Re=Math.pow(2,8),Et=Math.pow(2,1);function Rr(o){if(o.opacity===0&&!o.placed)return 0;if(o.opacity===1&&o.placed)return 4294967295;const t=o.placed?1:0,n=Math.floor(127*o.opacity);return n*He+t*je+n*et+t*dt+n*Lt+t*Re+n*Et+t}const Qt=0;class Ti{constructor(t){this._sortAcrossTiles=t.layout.get("symbol-z-order")!=="viewport-y"&&!t.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(t,n,a,c,d){const m=this._bucketParts;for(;this._currentTileIndexy.sortKey-_.sortKey));this._currentPartIndex!this._forceFullPlacement&&h.exported.now()-c>2;for(;this._currentPlacementIndex>=0;){const m=n[t[this._currentPlacementIndex]],y=this.placement.collisionIndex.transform.zoom;if(m.type==="symbol"&&(!m.minzoom||m.minzoom<=y)&&(!m.maxzoom||m.maxzoom>y)){if(this._inProgressLayer||(this._inProgressLayer=new Ti(m)),this._inProgressLayer.continuePlacement(a[m.source],this.placement,this._showCollisionBoxes,m,d))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const _n=512/h.EXTENT/2;class ls{constructor(t,n,a){this.tileID=t,this.bucketInstanceId=a,this._symbolsByKey={};const c=new Map;for(let d=0;d({x:Math.floor(_.anchorX*_n),y:Math.floor(_.anchorY*_n)})),crossTileIDs:m.map(_=>_.crossTileID)};if(y.positions.length>128){const _=new h.KDBush(y.positions.length,16,Uint16Array);for(const{x,y:T}of y.positions)_.add(x,T);_.finish(),delete y.positions,y.index=_}this._symbolsByKey[d]=y}}getScaledCoordinates(t,n){const{x:a,y:c,z:d}=this.tileID.canonical,{x:m,y,z:_}=n.canonical,x=_n/Math.pow(2,_-d),T=(y*h.EXTENT+t.anchorY)*x,w=c*h.EXTENT*_n;return{x:Math.floor((m*h.EXTENT+t.anchorX)*x-a*h.EXTENT*_n),y:Math.floor(T-w)}}findMatches(t,n,a){const c=this.tileID.canonical.zt)}}class Bt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Un{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){const n=Math.round((t-this.lng)/360);if(n!==0)for(const a in this.indexes){const c=this.indexes[a],d={};for(const m in c){const y=c[m];y.tileID=y.tileID.unwrapTo(y.tileID.wrap+n),d[y.tileID.key]=y}this.indexes[a]=d}this.lng=t}addBucket(t,n,a){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===n.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(let d=0;dt.overscaledZ)for(const y in m){const _=m[y];_.tileID.isChildOf(t)&&_.findMatches(n.symbolInstances,t,c)}else{const y=m[t.scaledTo(Number(d)).key];y&&y.findMatches(n.symbolInstances,t,c)}}for(let d=0;d{n[a]=!0});for(const a in this.layerIndexes)n[a]||delete this.layerIndexes[a]}}const Ct=(o,t)=>h.emitValidationErrors(o,t&&t.filter(n=>n.identifier!=="source.canvas")),cs=h.pick(h.operations,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setGlyphs","setSprite"]),Gi=h.pick(h.operations,["setCenter","setZoom","setBearing","setPitch"]),oo=h.emptyStyle();class ei extends h.Evented{constructor(t,n={}){super(),this.map=t,this.dispatcher=new ci(gn(),this,t._getMapId()),this.imageManager=new Bi,this.imageManager.setEventedParent(this),this.glyphManager=new fr(t._requestManager,n.localIdeographFontFamily),this.lineAtlas=new kr(256,512),this.crossTileSymbolIndex=new Fr,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new h.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",h.getReferrer());const a=this;this._rtlTextPluginCallback=ei.registerForPluginStateChange(c=>{a.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:c.pluginStatus,pluginURL:c.pluginURL},(d,m)=>{if(h.triggerPluginCompletionEvent(d),m&&m.every(y=>y))for(const y in a.sourceCaches){const _=a.sourceCaches[y].getSource().type;_!=="vector"&&_!=="geojson"||a.sourceCaches[y].reload()}})}),this.on("data",c=>{if(c.dataType!=="source"||c.sourceDataType!=="metadata")return;const d=this.sourceCaches[c.sourceId];if(!d)return;const m=d.getSource();if(m&&m.vectorLayerIds)for(const y in this._layers){const _=this._layers[y];_.source===m.id&&this._validateLayer(_)}})}loadURL(t,n={},a){this.fire(new h.Event("dataloading",{dataType:"style"})),n.validate=typeof n.validate!="boolean"||n.validate;const c=this.map._requestManager.transformRequest(t,ot.Style);this._request=h.getJSON(c,(d,m)=>{this._request=null,d?this.fire(new h.ErrorEvent(d)):m&&this._load(m,n,a)})}loadJSON(t,n={},a){this.fire(new h.Event("dataloading",{dataType:"style"})),this._request=h.exported.frame(()=>{this._request=null,n.validate=n.validate!==!1,this._load(t,n,a)})}loadEmpty(){this.fire(new h.Event("dataloading",{dataType:"style"})),this._load(oo,{validate:!1})}_load(t,n,a){const c=n.transformStyle?n.transformStyle(a,t):t;if(!n.validate||!Ct(this,h.validateStyle(c))){this._loaded=!0,this.stylesheet=c;for(const d in c.sources)this.addSource(d,c.sources[d],{validate:!1});c.sprite?this._loadSprite(c.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(c.glyphs),this._createLayers(),this.light=new Bn(this.stylesheet.light),this.map.setTerrain(this.stylesheet.terrain),this.fire(new h.Event("data",{dataType:"style"})),this.fire(new h.Event("style.load"))}}_createLayers(){const t=h.derefLayers(this.stylesheet.layers);this.dispatcher.broadcast("setLayers",t),this._order=t.map(n=>n.id),this._layers={},this._serializedLayers=null;for(const n of t){const a=h.createStyleLayer(n);a.setEventedParent(this,{layer:{id:n.id}}),this._layers[n.id]=a}}_loadSprite(t,n=!1,a=void 0){this.imageManager.setLoaded(!1),this._spriteRequest=function(c,d,m,y){const _=jr(c),x=_.length,T=m>1?"@2x":"",w={},M={},B={};for(const{id:k,url:D}of _){const U=d.transformRequest(d.normalizeSpriteURL(D,T,".json"),ot.SpriteJSON),Z=`${k}_${U.url}`;w[Z]=h.getJSON(U,(K,ee)=>{delete w[Z],M[k]=ee,ti(y,M,B,K,x)});const J=d.transformRequest(d.normalizeSpriteURL(D,T,".png"),ot.SpriteImage),O=`${k}_${J.url}`;w[O]=mi.getImage(J,(K,ee)=>{delete w[O],B[k]=ee,ti(y,M,B,K,x)})}return{cancel(){for(const k of Object.values(w))k.cancel()}}}(t,this.map._requestManager,this.map.getPixelRatio(),(c,d)=>{if(this._spriteRequest=null,c)this.fire(new h.ErrorEvent(c));else if(d)for(const m in d){this._spritesImagesIds[m]=[];const y=this._spritesImagesIds[m]?this._spritesImagesIds[m].filter(_=>!(_ in d)):[];for(const _ of y)this.imageManager.removeImage(_),this._changedImages[_]=!0;for(const _ in d[m]){const x=m==="default"?_:`${m}:${_}`;this._spritesImagesIds[m].push(x),x in this.imageManager.images?this.imageManager.updateImage(x,d[m][_],!1):this.imageManager.addImage(x,d[m][_]),n&&(this._changedImages[x]=!0)}}this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),n&&(this._changed=!0),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new h.Event("data",{dataType:"style"})),a&&a(c)})}_unloadSprite(){for(const t of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(t),this._changedImages[t]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new h.Event("data",{dataType:"style"}))}_validateLayer(t){const n=this.sourceCaches[t.source];if(!n)return;const a=t.sourceLayer;if(!a)return;const c=n.getSource();(c.type==="geojson"||c.vectorLayerIds&&c.vectorLayerIds.indexOf(a)===-1)&&this.fire(new h.ErrorEvent(new Error(`Source layer "${a}" does not exist on source "${c.id}" as specified by style layer "${t.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(t){const n=this._serializedAllLayers();if(!t||t.length===0)return Object.values(n);const a=[];for(const c of t)n[c]&&a.push(n[c]);return a}_serializedAllLayers(){let t=this._serializedLayers;if(t)return t;t=this._serializedLayers={};const n=Object.keys(this._layers);for(const a of n){const c=this._layers[a];c.type!=="custom"&&(t[a]=c.serialize())}return t}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(const t in this._layers)if(this._layers[t].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(t){if(!this._loaded)return;const n=this._changed;if(this._changed){const c=Object.keys(this._updatedLayers),d=Object.keys(this._removedLayers);(c.length||d.length)&&this._updateWorkerLayers(c,d);for(const m in this._updatedSources){const y=this._updatedSources[m];if(y==="reload")this._reloadSource(m);else{if(y!=="clear")throw new Error(`Invalid action ${y}`);this._clearSource(m)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const m in this._updatedPaintProps)this._layers[m].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates()}const a={};for(const c in this.sourceCaches){const d=this.sourceCaches[c];a[c]=d.used,d.used=!1}for(const c of this._order){const d=this._layers[c];d.recalculate(t,this._availableImages),!d.isHidden(t.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}for(const c in a){const d=this.sourceCaches[c];a[c]!==d.used&&d.fire(new h.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:c}))}this.light.recalculate(t),this.z=t.zoom,n&&this.fire(new h.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const t=Object.keys(this._changedImages);if(t.length){for(const n in this.sourceCaches)this.sourceCaches[n].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(t,n){this.dispatcher.broadcast("updateLayers",{layers:this._serializeByIds(t),removedIds:n})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(t,n={}){this._checkLoaded();const a=this.serialize();if(t=n.transformStyle?n.transformStyle(a,t):t,Ct(this,h.validateStyle(t)))return!1;(t=h.clone$1(t)).layers=h.derefLayers(t.layers);const c=h.diffStyles(a,t).filter(m=>!(m.command in Gi));if(c.length===0)return!1;const d=c.filter(m=>!(m.command in cs));if(d.length>0)throw new Error(`Unimplemented: ${d.map(m=>m.command).join(", ")}.`);for(const m of c)m.command!=="setTransition"&&this[m.command].apply(this,m.args);return this.stylesheet=t,!0}addImage(t,n){if(this.getImage(t))return this.fire(new h.ErrorEvent(new Error(`An image named "${t}" already exists.`)));this.imageManager.addImage(t,n),this._afterImageUpdated(t)}updateImage(t,n){this.imageManager.updateImage(t,n)}getImage(t){return this.imageManager.getImage(t)}removeImage(t){if(!this.getImage(t))return this.fire(new h.ErrorEvent(new Error(`An image named "${t}" does not exist.`)));this.imageManager.removeImage(t),this._afterImageUpdated(t)}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new h.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,n,a={}){if(this._checkLoaded(),this.sourceCaches[t]!==void 0)throw new Error(`Source "${t}" already exists.`);if(!n.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(h.validateStyle.source,`sources.${t}`,n,null,a))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const c=this.sourceCaches[t]=new Dt(t,n,this.dispatcher);c.style=this,c.setEventedParent(this,()=>({isSourceLoaded:c.loaded(),source:c.serialize(),sourceId:t})),c.onAdd(this.map),this._changed=!0}removeSource(t){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error("There is no source with this ID");for(const a in this._layers)if(this._layers[a].source===t)return this.fire(new h.ErrorEvent(new Error(`Source "${t}" cannot be removed while layer "${a}" is using it.`)));const n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new h.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(t,n){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error(`There is no source with this ID=${t}`);const a=this.sourceCaches[t].getSource();if(a.type!=="geojson")throw new Error(`geojsonSource.type is ${a.type}, which is !== 'geojson`);a.setData(n),this._changed=!0}getSource(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()}addLayer(t,n,a={}){this._checkLoaded();const c=t.id;if(this.getLayer(c))return void this.fire(new h.ErrorEvent(new Error(`Layer "${c}" already exists on this map.`)));let d;if(t.type==="custom"){if(Ct(this,h.validateCustomStyleLayer(t)))return;d=h.createStyleLayer(t)}else{if(typeof t.source=="object"&&(this.addSource(c,t.source),t=h.clone$1(t),t=h.extend(t,{source:c})),this._validate(h.validateStyle.layer,`layers.${c}`,t,{arrayIndex:-1},a))return;d=h.createStyleLayer(t),this._validateLayer(d),d.setEventedParent(this,{layer:{id:c}})}const m=n?this._order.indexOf(n):this._order.length;if(n&&m===-1)this.fire(new h.ErrorEvent(new Error(`Cannot add layer "${c}" before non-existing layer "${n}".`)));else{if(this._order.splice(m,0,c),this._layerOrderChanged=!0,this._layers[c]=d,this._removedLayers[c]&&d.source&&d.type!=="custom"){const y=this._removedLayers[c];delete this._removedLayers[c],y.type!==d.type?this._updatedSources[d.source]="clear":(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause())}this._updateLayer(d),d.onAdd&&d.onAdd(this.map)}}moveLayer(t,n){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new h.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===n)return;const a=this._order.indexOf(t);this._order.splice(a,1);const c=n?this._order.indexOf(n):this._order.length;n&&c===-1?this.fire(new h.ErrorEvent(new Error(`Cannot move layer "${t}" before non-existing layer "${n}".`))):(this._order.splice(c,0,t),this._layerOrderChanged=!0)}removeLayer(t){this._checkLoaded();const n=this._layers[t];if(!n)return void this.fire(new h.ErrorEvent(new Error(`Cannot remove non-existing layer "${t}".`)));n.setEventedParent(null);const a=this._order.indexOf(t);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],this._serializedLayers&&delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}getLayer(t){return this._layers[t]}hasLayer(t){return t in this._layers}setLayerZoomRange(t,n,a){this._checkLoaded();const c=this.getLayer(t);c?c.minzoom===n&&c.maxzoom===a||(n!=null&&(c.minzoom=n),a!=null&&(c.maxzoom=a),this._updateLayer(c)):this.fire(new h.ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer "${t}".`)))}setFilter(t,n,a={}){this._checkLoaded();const c=this.getLayer(t);if(c){if(!h.deepEqual(c.filter,n))return n==null?(c.filter=void 0,void this._updateLayer(c)):void(this._validate(h.validateStyle.filter,`layers.${c.id}.filter`,n,null,a)||(c.filter=h.clone$1(n),this._updateLayer(c)))}else this.fire(new h.ErrorEvent(new Error(`Cannot filter non-existing layer "${t}".`)))}getFilter(t){return h.clone$1(this.getLayer(t).filter)}setLayoutProperty(t,n,a,c={}){this._checkLoaded();const d=this.getLayer(t);d?h.deepEqual(d.getLayoutProperty(n),a)||(d.setLayoutProperty(n,a,c),this._updateLayer(d)):this.fire(new h.ErrorEvent(new Error(`Cannot style non-existing layer "${t}".`)))}getLayoutProperty(t,n){const a=this.getLayer(t);if(a)return a.getLayoutProperty(n);this.fire(new h.ErrorEvent(new Error(`Cannot get style of non-existing layer "${t}".`)))}setPaintProperty(t,n,a,c={}){this._checkLoaded();const d=this.getLayer(t);d?h.deepEqual(d.getPaintProperty(n),a)||(d.setPaintProperty(n,a,c)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new h.ErrorEvent(new Error(`Cannot style non-existing layer "${t}".`)))}getPaintProperty(t,n){return this.getLayer(t).getPaintProperty(n)}setFeatureState(t,n){this._checkLoaded();const a=t.source,c=t.sourceLayer,d=this.sourceCaches[a];if(d===void 0)return void this.fire(new h.ErrorEvent(new Error(`The source '${a}' does not exist in the map's style.`)));const m=d.getSource().type;m==="geojson"&&c?this.fire(new h.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):m!=="vector"||c?(t.id===void 0&&this.fire(new h.ErrorEvent(new Error("The feature id parameter must be provided."))),d.setFeatureState(c,t.id,n)):this.fire(new h.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(t,n){this._checkLoaded();const a=t.source,c=this.sourceCaches[a];if(c===void 0)return void this.fire(new h.ErrorEvent(new Error(`The source '${a}' does not exist in the map's style.`)));const d=c.getSource().type,m=d==="vector"?t.sourceLayer:void 0;d!=="vector"||m?n&&typeof t.id!="string"&&typeof t.id!="number"?this.fire(new h.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):c.removeFeatureState(m,t.id,n):this.fire(new h.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){this._checkLoaded();const n=t.source,a=t.sourceLayer,c=this.sourceCaches[n];if(c!==void 0)return c.getSource().type!=="vector"||a?(t.id===void 0&&this.fire(new h.ErrorEvent(new Error("The feature id parameter must be provided."))),c.getFeatureState(a,t.id)):void this.fire(new h.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new h.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return h.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){const t=h.mapObject(this.sourceCaches,c=>c.serialize()),n=this._serializeByIds(this._order),a=this.stylesheet;return h.filterObject({version:a.version,name:a.name,metadata:a.metadata,light:a.light,center:a.center,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,sprite:a.sprite,glyphs:a.glyphs,transition:a.transition,sources:t,layers:n},c=>c!==void 0)}_updateLayer(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&this.sourceCaches[t.source].getSource().type!=="raster"&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(t){const n=m=>this._layers[m].type==="fill-extrusion",a={},c=[];for(let m=this._order.length-1;m>=0;m--){const y=this._order[m];if(n(y)){a[y]=m;for(const _ of t){const x=_[y];if(x)for(const T of x)c.push(T)}}}c.sort((m,y)=>y.intersectionZ-m.intersectionZ);const d=[];for(let m=this._order.length-1;m>=0;m--){const y=this._order[m];if(n(y))for(let _=c.length-1;_>=0;_--){const x=c[_].feature;if(a[x.layer.id]{const ue=Z.featureSortOrder;if(ue){const le=ue.indexOf(oe.featureIndex);return ue.indexOf(ce.featureIndex)-le}return ce.featureIndex-oe.featureIndex});for(const oe of ee)K.push(oe)}}for(const Z in k)k[Z].forEach(J=>{const O=J.feature,K=x[y[Z].source].getFeatureState(O.layer["source-layer"],O.id);O.source=O.layer.source,O.layer["source-layer"]&&(O.sourceLayer=O.layer["source-layer"]),O.state=K});return k}(this._layers,m,this.sourceCaches,t,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(d)}querySourceFeatures(t,n){n&&n.filter&&this._validate(h.validateStyle.filter,"querySourceFeatures.filter",n.filter,null,n);const a=this.sourceCaches[t];return a?function(c,d){const m=c.getRenderableIds().map(x=>c.getTileByID(x)),y=[],_={};for(let x=0;xM.getTileByID(B)).sort((B,k)=>k.tileID.overscaledZ-B.tileID.overscaledZ||(B.tileID.isLessThan(k.tileID)?-1:1))}const w=this.crossTileSymbolIndex.addLayer(T,_[T.source],t.center.lng);m=m||w}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||a===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(h.exported.now(),t.zoom))&&(this.pauseablePlacement=new Oi(t,this.map.terrain,this._order,d,n,a,c,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,_),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(h.exported.now()),y=!0),m&&this.pauseablePlacement.placement.setStale()),y||m)for(const x of this._order){const T=this._layers[x];T.type==="symbol"&&this.placement.updateLayerOpacities(T,_[T.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(h.exported.now())}_releaseSymbolFadeTiles(){for(const t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()}getImages(t,n,a){this.imageManager.getImages(n.icons,a),this._updateTilesForChangedImages();const c=this.sourceCaches[n.source];c&&c.setDependencies(n.tileID.key,n.type,n.icons)}getGlyphs(t,n,a){this.glyphManager.getGlyphs(n.stacks,a);const c=this.sourceCaches[n.source];c&&c.setDependencies(n.tileID.key,n.type,[""])}getResource(t,n,a){return h.makeRequest(n,a)}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(t,n={}){this._checkLoaded(),t&&this._validate(h.validateStyle.glyphs,"glyphs",t,null,n)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=t,this.glyphManager.entries={},this.glyphManager.setURL(t))}addSprite(t,n,a={},c){this._checkLoaded();const d=[{id:t,url:n}],m=[...jr(this.stylesheet.sprite),...d];this._validate(h.validateStyle.sprite,"sprite",m,null,a)||(this.stylesheet.sprite=m,this._loadSprite(d,!0,c))}removeSprite(t){this._checkLoaded();const n=jr(this.stylesheet.sprite);if(n.find(a=>a.id===t)){if(this._spritesImagesIds[t])for(const a of this._spritesImagesIds[t])this.imageManager.removeImage(a),this._changedImages[a]=!0;n.splice(n.findIndex(a=>a.id===t),1),this.stylesheet.sprite=n.length>0?n:void 0,delete this._spritesImagesIds[t],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new h.Event("data",{dataType:"style"}))}else this.fire(new h.ErrorEvent(new Error(`Sprite "${t}" doesn't exists on this map.`)))}getSprite(){return jr(this.stylesheet.sprite)}setSprite(t,n={},a){this._checkLoaded(),t&&this._validate(h.validateStyle.sprite,"sprite",t,null,n)||(this.stylesheet.sprite=t,t?this._loadSprite(t,!0,a):(this._unloadSprite(),a&&a(null)))}}ei.getSourceType=function(o){return Lr[o]},ei.setSourceType=function(o,t){Lr[o]=t},ei.registerForPluginStateChange=h.registerForPluginStateChange;var sa=h.createLayout([{name:"a_pos",type:"Int16",components:2}]),hs="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const Or={prelude:st(`#ifdef GL_ES -precision mediump float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -`,`#ifdef GL_ES -precision highp float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 -);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} -#ifdef TERRAIN3D -uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; -#endif -const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { -#ifdef TERRAIN3D -highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); -#else -return 1.0; -#endif -}float calculate_visibility(vec4 pos) { -#ifdef TERRAIN3D -vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; -#else -return 1.0; -#endif -}float ele(vec2 pos) { -#ifdef TERRAIN3D -vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; -#else -return 0.0; -#endif -}float get_elevation(vec2 pos) { -#ifdef TERRAIN3D -vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; -#else -return 0.0; -#endif -}`),background:st(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:st(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:st(`varying vec3 v_data;varying float v_visibility; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main(void) { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:st("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:st(`uniform highp float u_intensity;varying vec2 v_extrude; -#pragma mapbox: define highp float weight -#define GAUSS_COEF 0.3989422804014327 -void main() { -#pragma mapbox: initialize highp float weight -float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; -#pragma mapbox: define highp float weight -#pragma mapbox: define mediump float radius -const highp float ZERO=1.0/255.0/16.0; -#define GAUSS_COEF 0.3989422804014327 -void main(void) { -#pragma mapbox: initialize highp float weight -#pragma mapbox: initialize mediump float radius -vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),heatmapTexture:st(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(0.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:st("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:st("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:st("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:st(`#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_FragColor=color*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:st(`varying vec2 v_pos; -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:st(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:st(`#ifdef GL_ES -precision highp float; -#endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:st(`varying vec4 v_color;void main() {gl_FragColor=v_color; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; -#ifdef TERRAIN3D -attribute vec2 a_centroid; -#endif -varying vec4 v_color; -#pragma mapbox: define highp float base -#pragma mapbox: define highp float height -#pragma mapbox: define highp vec4 color -void main() { -#pragma mapbox: initialize highp float base -#pragma mapbox: initialize highp float height -#pragma mapbox: initialize highp vec4 color -vec3 normal=a_normal_ed.xyz; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:st(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; -#ifdef TERRAIN3D -attribute vec2 a_centroid; -#endif -varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 -? a_pos -: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:st(`#ifdef GL_ES -precision highp float; -#endif -uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:st(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; -#define PI 3.141592653589793 -void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:st(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; -#endif -v_width2=vec2(outset,inset);}`),lineGradient:st(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; -#endif -v_width2=vec2(outset,inset);}`),linePattern:st(`#ifdef GL_ES -precision highp float; -#endif -uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; -#endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:st(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; -#endif -v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:st(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:st(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),z,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:st(`#define SDF_PX 8.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:st(`#define SDF_PX 8.0 -#define SDF 1.0 -#define ICON 0.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:st("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",hs),terrainDepth:st("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",hs),terrainCoords:st("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",hs)};function st(o,t){const n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=t.match(/attribute ([\w]+) ([\w]+)/g),c=o.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),m=d?d.concat(c):c,y={};return{fragmentSource:o=o.replace(n,(_,x,T,w,M)=>(y[M]=!0,x==="define"?` -#ifndef HAS_UNIFORM_u_${M} -varying ${T} ${w} ${M}; -#else -uniform ${T} ${w} u_${M}; -#endif -`:` -#ifdef HAS_UNIFORM_u_${M} - ${T} ${w} ${M} = u_${M}; -#endif -`)),vertexSource:t=t.replace(n,(_,x,T,w,M)=>{const B=w==="float"?"vec2":"vec4",k=M.match(/color/)?"color":B;return y[M]?x==="define"?` -#ifndef HAS_UNIFORM_u_${M} -uniform lowp float u_${M}_t; -attribute ${T} ${B} a_${M}; -varying ${T} ${w} ${M}; -#else -uniform ${T} ${w} u_${M}; -#endif -`:k==="vec4"?` -#ifndef HAS_UNIFORM_u_${M} - ${M} = a_${M}; -#else - ${T} ${w} ${M} = u_${M}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${M} - ${M} = unpack_mix_${k}(a_${M}, u_${M}_t); -#else - ${T} ${w} ${M} = u_${M}; -#endif -`:x==="define"?` -#ifndef HAS_UNIFORM_u_${M} -uniform lowp float u_${M}_t; -attribute ${T} ${B} a_${M}; -#else -uniform ${T} ${w} u_${M}; -#endif -`:k==="vec4"?` -#ifndef HAS_UNIFORM_u_${M} - ${T} ${w} ${M} = a_${M}; -#else - ${T} ${w} ${M} = u_${M}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${M} - ${T} ${w} ${M} = unpack_mix_${k}(a_${M}, u_${M}_t); -#else - ${T} ${w} ${M} = u_${M}; -#endif -`}),staticAttributes:a,staticUniforms:m}}class Ur{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(t,n,a,c,d,m,y,_,x){this.context=t;let T=this.boundPaintVertexBuffers.length!==c.length;for(let w=0;!T&&w({u_depth:new h.Uniform1i(ce,ue.u_depth),u_terrain:new h.Uniform1i(ce,ue.u_terrain),u_terrain_dim:new h.Uniform1f(ce,ue.u_terrain_dim),u_terrain_matrix:new h.UniformMatrix4f(ce,ue.u_terrain_matrix),u_terrain_unpack:new h.Uniform4f(ce,ue.u_terrain_unpack),u_terrain_exaggeration:new h.Uniform1f(ce,ue.u_terrain_exaggeration)}))(t,oe),this.binderUniforms=c?c.getUniforms(t,oe):[]}draw(t,n,a,c,d,m,y,_,x,T,w,M,B,k,D,U,Z,J){const O=t.gl;if(this.failedToCreate)return;if(t.program.set(this.program),t.setDepthMode(a),t.setStencilMode(c),t.setColorMode(d),t.setCullFace(m),_){t.activeTexture.set(O.TEXTURE2),O.bindTexture(O.TEXTURE_2D,_.depthTexture),t.activeTexture.set(O.TEXTURE3),O.bindTexture(O.TEXTURE_2D,_.texture);for(const ee in this.terrainUniforms)this.terrainUniforms[ee].set(_[ee])}for(const ee in this.fixedUniforms)this.fixedUniforms[ee].set(y[ee]);D&&D.setUniforms(t,this.binderUniforms,B,{zoom:k});let K=0;switch(n){case O.LINES:K=2;break;case O.TRIANGLES:K=3;break;case O.LINE_STRIP:K=1}for(const ee of M.get()){const oe=ee.vaos||(ee.vaos={});(oe[x]||(oe[x]=new Ur)).bind(t,this,T,D?D.getPaintVertexBuffers():[],w,ee.vertexOffset,U,Z,J),O.drawElements(n,ee.primitiveLength*K,O.UNSIGNED_SHORT,ee.primitiveOffset*K*2)}}}function lo(o,t,n){const a=1/j(n,1,t.transform.tileZoom),c=Math.pow(2,n.tileID.overscaledZ),d=n.tileSize*Math.pow(2,t.transform.tileZoom)/c,m=d*(n.tileID.canonical.x+n.tileID.wrap*c),y=d*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[a,o.fromScale,o.toScale],u_fade:o.t,u_pixel_coord_upper:[m>>16,y>>16],u_pixel_coord_lower:[65535&m,65535&y]}}const co=(o,t,n,a)=>{const c=t.style.light,d=c.properties.get("position"),m=[d.x,d.y,d.z],y=function(){var x=new h.ARRAY_TYPE(9);return h.ARRAY_TYPE!=Float32Array&&(x[1]=0,x[2]=0,x[3]=0,x[5]=0,x[6]=0,x[7]=0),x[0]=1,x[4]=1,x[8]=1,x}();c.properties.get("anchor")==="viewport"&&function(x,T){var w=Math.sin(T),M=Math.cos(T);x[0]=M,x[1]=w,x[2]=0,x[3]=-w,x[4]=M,x[5]=0,x[6]=0,x[7]=0,x[8]=1}(y,-t.transform.angle),function(x,T,w){var M=T[0],B=T[1],k=T[2];x[0]=M*w[0]+B*w[3]+k*w[6],x[1]=M*w[1]+B*w[4]+k*w[7],x[2]=M*w[2]+B*w[5]+k*w[8]}(m,m,y);const _=c.properties.get("color");return{u_matrix:o,u_lightpos:m,u_lightintensity:c.properties.get("intensity"),u_lightcolor:[_.r,_.g,_.b],u_vertical_gradient:+n,u_opacity:a}},aa=(o,t,n,a,c,d,m)=>h.extend(co(o,t,n,a),lo(d,t,m),{u_height_factor:-Math.pow(2,c.overscaledZ)/m.tileSize/8}),ho=o=>({u_matrix:o}),oa=(o,t,n,a)=>h.extend(ho(o),lo(n,t,a)),dl=(o,t)=>({u_matrix:o,u_world:t}),uo=(o,t,n,a,c)=>h.extend(oa(o,t,n,a),{u_world:c}),fl=(o,t,n,a)=>{const c=o.transform;let d,m;if(a.paint.get("circle-pitch-alignment")==="map"){const y=j(n,1,c.zoom);d=!0,m=[y,y]}else d=!1,m=c.pixelsToGLUnits;return{u_camera_to_center_distance:c.cameraToCenterDistance,u_scale_with_map:+(a.paint.get("circle-pitch-scale")==="map"),u_matrix:o.translatePosMatrix(t.posMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_pitch_with_map:+d,u_device_pixel_ratio:o.pixelRatio,u_extrude_scale:m}},la=(o,t,n)=>{const a=j(n,1,t.zoom),c=Math.pow(2,t.zoom-n.tileID.overscaledZ),d=n.tileID.overscaleFactor();return{u_matrix:o,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:a,u_extrude_scale:[t.pixelsToGLUnits[0]/(a*c),t.pixelsToGLUnits[1]/(a*c)],u_overscale_factor:d}},ca=(o,t,n=1)=>({u_matrix:o,u_color:t,u_overlay:0,u_overlay_scale:n}),ha=o=>({u_matrix:o}),po=(o,t,n,a)=>({u_matrix:o,u_extrude_scale:j(t,1,n),u_intensity:a});function fo(o,t){const n=Math.pow(2,t.canonical.z),a=t.canonical.y;return[new h.MercatorCoordinate(0,a/n).toLngLat().lat,new h.MercatorCoordinate(0,(a+1)/n).toLngLat().lat]}const vr=(o,t,n,a)=>{const c=o.transform;return{u_matrix:yn(o,t,n,a),u_ratio:1/j(t,1,c.zoom),u_device_pixel_ratio:o.pixelRatio,u_units_to_pixels:[1/c.pixelsToGLUnits[0],1/c.pixelsToGLUnits[1]]}},ps=(o,t,n,a,c)=>h.extend(vr(o,t,n,c),{u_image:0,u_image_height:a}),Ui=(o,t,n,a,c)=>{const d=o.transform,m=Nn(t,d);return{u_matrix:yn(o,t,n,c),u_texsize:t.imageAtlasTexture.size,u_ratio:1/j(t,1,d.zoom),u_device_pixel_ratio:o.pixelRatio,u_image:0,u_scale:[m,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},ds=(o,t,n,a,c,d)=>{const m=o.lineAtlas,y=Nn(t,o.transform),_=n.layout.get("line-cap")==="round",x=m.getDash(a.from,_),T=m.getDash(a.to,_),w=x.width*c.fromScale,M=T.width*c.toScale;return h.extend(vr(o,t,n,d),{u_patternscale_a:[y/w,-x.height/2],u_patternscale_b:[y/M,-T.height/2],u_sdfgamma:m.width/(256*Math.min(w,M)*o.pixelRatio)/2,u_image:0,u_tex_y_a:x.y,u_tex_y_b:T.y,u_mix:c.t})};function Nn(o,t){return 1/j(o,1,t.tileZoom)}function yn(o,t,n,a){return o.translatePosMatrix(a?a.posMatrix:t.tileID.posMatrix,t,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}const fs=(o,t,n,a,c)=>{return{u_matrix:o,u_tl_parent:t,u_scale_parent:n,u_buffer_scale:1,u_fade_t:a.mix,u_opacity:a.opacity*c.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:c.paint.get("raster-brightness-min"),u_brightness_high:c.paint.get("raster-brightness-max"),u_saturation_factor:(m=c.paint.get("raster-saturation"),m>0?1-1/(1.001-m):-m),u_contrast_factor:(d=c.paint.get("raster-contrast"),d>0?1/(1-d):1+d),u_spin_weights:ms(c.paint.get("raster-hue-rotate"))};var d,m};function ms(o){o*=Math.PI/180;const t=Math.sin(o),n=Math.cos(o);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}const xn=(o,t,n,a,c,d,m,y,_,x)=>{const T=c.transform;return{u_is_size_zoom_constant:+(o==="constant"||o==="source"),u_is_size_feature_constant:+(o==="constant"||o==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:T.cameraToCenterDistance,u_pitch:T.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:T.width/T.height,u_fade_change:c.options.fadeDuration?c.symbolFadeChange:1,u_matrix:d,u_label_plane_matrix:m,u_coord_matrix:y,u_is_text:+_,u_pitch_with_map:+a,u_texsize:x,u_texture:0}},vn=(o,t,n,a,c,d,m,y,_,x,T)=>{const w=c.transform;return h.extend(xn(o,t,n,a,c,d,m,y,_,x),{u_gamma_scale:a?Math.cos(w._pitch)*w.cameraToCenterDistance:1,u_device_pixel_ratio:c.pixelRatio,u_is_halo:+T})},gs=(o,t,n,a,c,d,m,y,_,x)=>h.extend(vn(o,t,n,a,c,d,m,y,!0,_,!0),{u_texsize_icon:x,u_texture_icon:1}),Ei=(o,t,n)=>({u_matrix:o,u_opacity:t,u_color:n}),Si=(o,t,n,a,c,d)=>h.extend(function(m,y,_,x){const T=_.imageManager.getPattern(m.from.toString()),w=_.imageManager.getPattern(m.to.toString()),{width:M,height:B}=_.imageManager.getPixelSize(),k=Math.pow(2,x.tileID.overscaledZ),D=x.tileSize*Math.pow(2,_.transform.tileZoom)/k,U=D*(x.tileID.canonical.x+x.tileID.wrap*k),Z=D*x.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:T.tl,u_pattern_br_a:T.br,u_pattern_tl_b:w.tl,u_pattern_br_b:w.br,u_texsize:[M,B],u_mix:y.t,u_pattern_size_a:T.displaySize,u_pattern_size_b:w.displaySize,u_scale_a:y.fromScale,u_scale_b:y.toScale,u_tile_units_to_pixels:1/j(x,1,_.transform.tileZoom),u_pixel_coord_upper:[U>>16,Z>>16],u_pixel_coord_lower:[65535&U,65535&Z]}}(a,d,n,c),{u_matrix:o,u_opacity:t}),ua={fillExtrusion:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_lightpos:new h.Uniform3f(o,t.u_lightpos),u_lightintensity:new h.Uniform1f(o,t.u_lightintensity),u_lightcolor:new h.Uniform3f(o,t.u_lightcolor),u_vertical_gradient:new h.Uniform1f(o,t.u_vertical_gradient),u_opacity:new h.Uniform1f(o,t.u_opacity)}),fillExtrusionPattern:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_lightpos:new h.Uniform3f(o,t.u_lightpos),u_lightintensity:new h.Uniform1f(o,t.u_lightintensity),u_lightcolor:new h.Uniform3f(o,t.u_lightcolor),u_vertical_gradient:new h.Uniform1f(o,t.u_vertical_gradient),u_height_factor:new h.Uniform1f(o,t.u_height_factor),u_image:new h.Uniform1i(o,t.u_image),u_texsize:new h.Uniform2f(o,t.u_texsize),u_pixel_coord_upper:new h.Uniform2f(o,t.u_pixel_coord_upper),u_pixel_coord_lower:new h.Uniform2f(o,t.u_pixel_coord_lower),u_scale:new h.Uniform3f(o,t.u_scale),u_fade:new h.Uniform1f(o,t.u_fade),u_opacity:new h.Uniform1f(o,t.u_opacity)}),fill:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix)}),fillPattern:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_image:new h.Uniform1i(o,t.u_image),u_texsize:new h.Uniform2f(o,t.u_texsize),u_pixel_coord_upper:new h.Uniform2f(o,t.u_pixel_coord_upper),u_pixel_coord_lower:new h.Uniform2f(o,t.u_pixel_coord_lower),u_scale:new h.Uniform3f(o,t.u_scale),u_fade:new h.Uniform1f(o,t.u_fade)}),fillOutline:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_world:new h.Uniform2f(o,t.u_world)}),fillOutlinePattern:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_world:new h.Uniform2f(o,t.u_world),u_image:new h.Uniform1i(o,t.u_image),u_texsize:new h.Uniform2f(o,t.u_texsize),u_pixel_coord_upper:new h.Uniform2f(o,t.u_pixel_coord_upper),u_pixel_coord_lower:new h.Uniform2f(o,t.u_pixel_coord_lower),u_scale:new h.Uniform3f(o,t.u_scale),u_fade:new h.Uniform1f(o,t.u_fade)}),circle:(o,t)=>({u_camera_to_center_distance:new h.Uniform1f(o,t.u_camera_to_center_distance),u_scale_with_map:new h.Uniform1i(o,t.u_scale_with_map),u_pitch_with_map:new h.Uniform1i(o,t.u_pitch_with_map),u_extrude_scale:new h.Uniform2f(o,t.u_extrude_scale),u_device_pixel_ratio:new h.Uniform1f(o,t.u_device_pixel_ratio),u_matrix:new h.UniformMatrix4f(o,t.u_matrix)}),collisionBox:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_camera_to_center_distance:new h.Uniform1f(o,t.u_camera_to_center_distance),u_pixels_to_tile_units:new h.Uniform1f(o,t.u_pixels_to_tile_units),u_extrude_scale:new h.Uniform2f(o,t.u_extrude_scale),u_overscale_factor:new h.Uniform1f(o,t.u_overscale_factor)}),collisionCircle:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_inv_matrix:new h.UniformMatrix4f(o,t.u_inv_matrix),u_camera_to_center_distance:new h.Uniform1f(o,t.u_camera_to_center_distance),u_viewport_size:new h.Uniform2f(o,t.u_viewport_size)}),debug:(o,t)=>({u_color:new h.UniformColor(o,t.u_color),u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_overlay:new h.Uniform1i(o,t.u_overlay),u_overlay_scale:new h.Uniform1f(o,t.u_overlay_scale)}),clippingMask:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix)}),heatmap:(o,t)=>({u_extrude_scale:new h.Uniform1f(o,t.u_extrude_scale),u_intensity:new h.Uniform1f(o,t.u_intensity),u_matrix:new h.UniformMatrix4f(o,t.u_matrix)}),heatmapTexture:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_world:new h.Uniform2f(o,t.u_world),u_image:new h.Uniform1i(o,t.u_image),u_color_ramp:new h.Uniform1i(o,t.u_color_ramp),u_opacity:new h.Uniform1f(o,t.u_opacity)}),hillshade:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_image:new h.Uniform1i(o,t.u_image),u_latrange:new h.Uniform2f(o,t.u_latrange),u_light:new h.Uniform2f(o,t.u_light),u_shadow:new h.UniformColor(o,t.u_shadow),u_highlight:new h.UniformColor(o,t.u_highlight),u_accent:new h.UniformColor(o,t.u_accent)}),hillshadePrepare:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_image:new h.Uniform1i(o,t.u_image),u_dimension:new h.Uniform2f(o,t.u_dimension),u_zoom:new h.Uniform1f(o,t.u_zoom),u_unpack:new h.Uniform4f(o,t.u_unpack)}),line:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_ratio:new h.Uniform1f(o,t.u_ratio),u_device_pixel_ratio:new h.Uniform1f(o,t.u_device_pixel_ratio),u_units_to_pixels:new h.Uniform2f(o,t.u_units_to_pixels)}),lineGradient:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_ratio:new h.Uniform1f(o,t.u_ratio),u_device_pixel_ratio:new h.Uniform1f(o,t.u_device_pixel_ratio),u_units_to_pixels:new h.Uniform2f(o,t.u_units_to_pixels),u_image:new h.Uniform1i(o,t.u_image),u_image_height:new h.Uniform1f(o,t.u_image_height)}),linePattern:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_texsize:new h.Uniform2f(o,t.u_texsize),u_ratio:new h.Uniform1f(o,t.u_ratio),u_device_pixel_ratio:new h.Uniform1f(o,t.u_device_pixel_ratio),u_image:new h.Uniform1i(o,t.u_image),u_units_to_pixels:new h.Uniform2f(o,t.u_units_to_pixels),u_scale:new h.Uniform3f(o,t.u_scale),u_fade:new h.Uniform1f(o,t.u_fade)}),lineSDF:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_ratio:new h.Uniform1f(o,t.u_ratio),u_device_pixel_ratio:new h.Uniform1f(o,t.u_device_pixel_ratio),u_units_to_pixels:new h.Uniform2f(o,t.u_units_to_pixels),u_patternscale_a:new h.Uniform2f(o,t.u_patternscale_a),u_patternscale_b:new h.Uniform2f(o,t.u_patternscale_b),u_sdfgamma:new h.Uniform1f(o,t.u_sdfgamma),u_image:new h.Uniform1i(o,t.u_image),u_tex_y_a:new h.Uniform1f(o,t.u_tex_y_a),u_tex_y_b:new h.Uniform1f(o,t.u_tex_y_b),u_mix:new h.Uniform1f(o,t.u_mix)}),raster:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_tl_parent:new h.Uniform2f(o,t.u_tl_parent),u_scale_parent:new h.Uniform1f(o,t.u_scale_parent),u_buffer_scale:new h.Uniform1f(o,t.u_buffer_scale),u_fade_t:new h.Uniform1f(o,t.u_fade_t),u_opacity:new h.Uniform1f(o,t.u_opacity),u_image0:new h.Uniform1i(o,t.u_image0),u_image1:new h.Uniform1i(o,t.u_image1),u_brightness_low:new h.Uniform1f(o,t.u_brightness_low),u_brightness_high:new h.Uniform1f(o,t.u_brightness_high),u_saturation_factor:new h.Uniform1f(o,t.u_saturation_factor),u_contrast_factor:new h.Uniform1f(o,t.u_contrast_factor),u_spin_weights:new h.Uniform3f(o,t.u_spin_weights)}),symbolIcon:(o,t)=>({u_is_size_zoom_constant:new h.Uniform1i(o,t.u_is_size_zoom_constant),u_is_size_feature_constant:new h.Uniform1i(o,t.u_is_size_feature_constant),u_size_t:new h.Uniform1f(o,t.u_size_t),u_size:new h.Uniform1f(o,t.u_size),u_camera_to_center_distance:new h.Uniform1f(o,t.u_camera_to_center_distance),u_pitch:new h.Uniform1f(o,t.u_pitch),u_rotate_symbol:new h.Uniform1i(o,t.u_rotate_symbol),u_aspect_ratio:new h.Uniform1f(o,t.u_aspect_ratio),u_fade_change:new h.Uniform1f(o,t.u_fade_change),u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_label_plane_matrix:new h.UniformMatrix4f(o,t.u_label_plane_matrix),u_coord_matrix:new h.UniformMatrix4f(o,t.u_coord_matrix),u_is_text:new h.Uniform1i(o,t.u_is_text),u_pitch_with_map:new h.Uniform1i(o,t.u_pitch_with_map),u_texsize:new h.Uniform2f(o,t.u_texsize),u_texture:new h.Uniform1i(o,t.u_texture)}),symbolSDF:(o,t)=>({u_is_size_zoom_constant:new h.Uniform1i(o,t.u_is_size_zoom_constant),u_is_size_feature_constant:new h.Uniform1i(o,t.u_is_size_feature_constant),u_size_t:new h.Uniform1f(o,t.u_size_t),u_size:new h.Uniform1f(o,t.u_size),u_camera_to_center_distance:new h.Uniform1f(o,t.u_camera_to_center_distance),u_pitch:new h.Uniform1f(o,t.u_pitch),u_rotate_symbol:new h.Uniform1i(o,t.u_rotate_symbol),u_aspect_ratio:new h.Uniform1f(o,t.u_aspect_ratio),u_fade_change:new h.Uniform1f(o,t.u_fade_change),u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_label_plane_matrix:new h.UniformMatrix4f(o,t.u_label_plane_matrix),u_coord_matrix:new h.UniformMatrix4f(o,t.u_coord_matrix),u_is_text:new h.Uniform1i(o,t.u_is_text),u_pitch_with_map:new h.Uniform1i(o,t.u_pitch_with_map),u_texsize:new h.Uniform2f(o,t.u_texsize),u_texture:new h.Uniform1i(o,t.u_texture),u_gamma_scale:new h.Uniform1f(o,t.u_gamma_scale),u_device_pixel_ratio:new h.Uniform1f(o,t.u_device_pixel_ratio),u_is_halo:new h.Uniform1i(o,t.u_is_halo)}),symbolTextAndIcon:(o,t)=>({u_is_size_zoom_constant:new h.Uniform1i(o,t.u_is_size_zoom_constant),u_is_size_feature_constant:new h.Uniform1i(o,t.u_is_size_feature_constant),u_size_t:new h.Uniform1f(o,t.u_size_t),u_size:new h.Uniform1f(o,t.u_size),u_camera_to_center_distance:new h.Uniform1f(o,t.u_camera_to_center_distance),u_pitch:new h.Uniform1f(o,t.u_pitch),u_rotate_symbol:new h.Uniform1i(o,t.u_rotate_symbol),u_aspect_ratio:new h.Uniform1f(o,t.u_aspect_ratio),u_fade_change:new h.Uniform1f(o,t.u_fade_change),u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_label_plane_matrix:new h.UniformMatrix4f(o,t.u_label_plane_matrix),u_coord_matrix:new h.UniformMatrix4f(o,t.u_coord_matrix),u_is_text:new h.Uniform1i(o,t.u_is_text),u_pitch_with_map:new h.Uniform1i(o,t.u_pitch_with_map),u_texsize:new h.Uniform2f(o,t.u_texsize),u_texsize_icon:new h.Uniform2f(o,t.u_texsize_icon),u_texture:new h.Uniform1i(o,t.u_texture),u_texture_icon:new h.Uniform1i(o,t.u_texture_icon),u_gamma_scale:new h.Uniform1f(o,t.u_gamma_scale),u_device_pixel_ratio:new h.Uniform1f(o,t.u_device_pixel_ratio),u_is_halo:new h.Uniform1i(o,t.u_is_halo)}),background:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_opacity:new h.Uniform1f(o,t.u_opacity),u_color:new h.UniformColor(o,t.u_color)}),backgroundPattern:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_opacity:new h.Uniform1f(o,t.u_opacity),u_image:new h.Uniform1i(o,t.u_image),u_pattern_tl_a:new h.Uniform2f(o,t.u_pattern_tl_a),u_pattern_br_a:new h.Uniform2f(o,t.u_pattern_br_a),u_pattern_tl_b:new h.Uniform2f(o,t.u_pattern_tl_b),u_pattern_br_b:new h.Uniform2f(o,t.u_pattern_br_b),u_texsize:new h.Uniform2f(o,t.u_texsize),u_mix:new h.Uniform1f(o,t.u_mix),u_pattern_size_a:new h.Uniform2f(o,t.u_pattern_size_a),u_pattern_size_b:new h.Uniform2f(o,t.u_pattern_size_b),u_scale_a:new h.Uniform1f(o,t.u_scale_a),u_scale_b:new h.Uniform1f(o,t.u_scale_b),u_pixel_coord_upper:new h.Uniform2f(o,t.u_pixel_coord_upper),u_pixel_coord_lower:new h.Uniform2f(o,t.u_pixel_coord_lower),u_tile_units_to_pixels:new h.Uniform1f(o,t.u_tile_units_to_pixels)}),terrain:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_texture:new h.Uniform1i(o,t.u_texture),u_ele_delta:new h.Uniform1f(o,t.u_ele_delta)}),terrainDepth:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_ele_delta:new h.Uniform1f(o,t.u_ele_delta)}),terrainCoords:(o,t)=>({u_matrix:new h.UniformMatrix4f(o,t.u_matrix),u_texture:new h.Uniform1i(o,t.u_texture),u_terrain_coords_id:new h.Uniform1f(o,t.u_terrain_coords_id),u_ele_delta:new h.Uniform1f(o,t.u_ele_delta)})};class _s{constructor(t,n,a){this.context=t;const c=t.gl;this.buffer=c.createBuffer(),this.dynamicDraw=!!a,this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),c.bufferData(c.ELEMENT_ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?c.DYNAMIC_DRAW:c.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){const n=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),n.bufferSubData(n.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const ys={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class pa{constructor(t,n,a,c){this.length=n.length,this.attributes=a,this.itemSize=n.bytesPerElement,this.dynamicDraw=c,this.context=t;const d=t.gl;this.buffer=d.createBuffer(),t.bindVertexBuffer.set(this.buffer),d.bufferData(d.ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?d.DYNAMIC_DRAW:d.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(t){if(t.length!==this.length)throw new Error(`Length of new data is ${t.length}, which doesn't match current length of ${this.length}`);const n=this.context.gl;this.bind(),n.bufferSubData(n.ARRAY_BUFFER,0,t.arrayBuffer)}enableAttributes(t,n){for(let a=0;a0){const be=h.create(),ze=ce;h.mul(be,oe.placementInvProjMatrix,o.transform.glCoordMatrix),h.mul(be,be,oe.placementViewportMatrix),T.push({circleArray:le,circleOffset:M,transform:ze,invTransform:be,coord:K}),w+=le.length/4,M=w}ue&&x.draw(y,_.LINES,We.disabled,gt.disabled,o.colorModeForRenderPass(),ft.disabled,la(ce,o.transform,ee),o.style.map.terrain&&o.style.map.terrain.getTerrainData(K),n.id,ue.layoutVertexBuffer,ue.indexBuffer,ue.segments,null,o.transform.zoom,null,null,ue.collisionVertexBuffer)}if(!m||!T.length)return;const B=o.useProgram("collisionCircle"),k=new h.CollisionCircleLayoutArray;k.resize(4*w),k._trim();let D=0;for(const O of T)for(let K=0;K=0&&(k[U.associatedIconIndex]={shiftedAnchor:Ve,angle:me})}else z(U.numGlyphs,M)}if(x){B.clear();const D=o.icon.placedSymbolArray;for(let U=0;Uo.style.map.terrain.getElevation(ue,Gs,Tr):null,Ai=n.layout.get("text-rotation-alignment")==="map";yr(be,ue.posMatrix,o,c,Wi,ui,U,x,Ai,$t)}const ri=o.translatePosMatrix(ue.posMatrix,le,d,m),Gt=Z||c&&oe||is?wa:Wi,nt=o.translatePosMatrix(ui,le,d,m,!0),Nt=me&&n.paint.get(c?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Xt;Xt=me?be.iconsInText?gs(Be.kind,Pt,J,U,o,ri,Gt,nt,$e,Zt):vn(Be.kind,Pt,J,U,o,ri,Gt,nt,c,$e,!0):xn(Be.kind,Pt,J,U,o,ri,Gt,nt,c,$e);const at={program:it,buffers:ze,uniformValues:Xt,atlasTexture:It,atlasTextureIcon:Ii,atlasInterpolation:hi,atlasInterpolationIcon:zt,isSDF:me,hasHalo:Nt};if(O&&be.canOverlap){K=!0;const $t=ze.segments.get();for(const Ai of $t)ce.push({segments:new h.SegmentVector([Ai]),sortKey:Ai.sortKey,state:at,terrainData:rt})}else ce.push({segments:ze.segments,sortKey:0,state:at,terrainData:rt})}K&&ce.sort((ue,le)=>ue.sortKey-le.sortKey);for(const ue of ce){const le=ue.state;if(M.activeTexture.set(B.TEXTURE0),le.atlasTexture.bind(le.atlasInterpolation,B.CLAMP_TO_EDGE),le.atlasTextureIcon&&(M.activeTexture.set(B.TEXTURE1),le.atlasTextureIcon&&le.atlasTextureIcon.bind(le.atlasInterpolationIcon,B.CLAMP_TO_EDGE)),le.isSDF){const be=le.uniformValues;le.hasHalo&&(be.u_is_halo=1,Ta(le.buffers,ue.segments,n,o,le.program,ee,T,w,be,ue.terrainData)),be.u_is_halo=0}Ta(le.buffers,ue.segments,n,o,le.program,ee,T,w,le.uniformValues,ue.terrainData)}}function Ta(o,t,n,a,c,d,m,y,_,x){const T=a.context;c.draw(T,T.gl.TRIANGLES,d,m,y,ft.disabled,_,x,n.id,o.layoutVertexBuffer,o.indexBuffer,t,n.paint,a.transform.zoom,o.programConfigurations.get(n.id),o.dynamicLayoutVertexBuffer,o.opacityVertexBuffer)}function Ea(o,t,n,a,c){if(!n||!a||!a.imageAtlas)return;const d=a.imageAtlas.patternPositions;let m=d[n.to.toString()],y=d[n.from.toString()];if(!m||!y){const _=c.getPaintProperty(t);m=d[_],y=d[_]}m&&y&&o.setConstantPatternPositions(m,y)}function jn(o,t,n,a,c,d,m){const y=o.context.gl,_="fill-pattern",x=n.paint.get(_),T=x&&x.constantOr(1),w=n.getCrossfadeParameters();let M,B,k,D,U;m?(B=T&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",M=y.LINES):(B=T?"fillPattern":"fill",M=y.TRIANGLES);const Z=x.constantOr(null);for(const J of a){const O=t.getTile(J);if(T&&!O.patternsLoaded())continue;const K=O.getBucket(n);if(!K)continue;const ee=K.programConfigurations.get(n.id),oe=o.useProgram(B,ee),ce=o.style.map.terrain&&o.style.map.terrain.getTerrainData(J);T&&(o.context.activeTexture.set(y.TEXTURE0),O.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),ee.updatePaintBuffers(w)),Ea(ee,_,Z,O,n);const ue=ce?J:null,le=o.translatePosMatrix(ue?ue.posMatrix:J.posMatrix,O,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(m){D=K.indexBuffer2,U=K.segments2;const be=[y.drawingBufferWidth,y.drawingBufferHeight];k=B==="fillOutlinePattern"&&T?uo(le,o,w,O,be):dl(le,be)}else D=K.indexBuffer,U=K.segments,k=T?oa(le,o,w,O):ho(le);oe.draw(o.context,M,c,o.stencilModeForClipping(J),d,ft.disabled,k,ce,n.id,K.layoutVertexBuffer,D,U,n.paint,o.transform.zoom,ee)}}function Zn(o,t,n,a,c,d,m){const y=o.context,_=y.gl,x="fill-extrusion-pattern",T=n.paint.get(x),w=T.constantOr(1),M=n.getCrossfadeParameters(),B=n.paint.get("fill-extrusion-opacity"),k=T.constantOr(null);for(const D of a){const U=t.getTile(D),Z=U.getBucket(n);if(!Z)continue;const J=o.style.map.terrain&&o.style.map.terrain.getTerrainData(D),O=Z.programConfigurations.get(n.id),K=o.useProgram(w?"fillExtrusionPattern":"fillExtrusion",O);w&&(o.context.activeTexture.set(_.TEXTURE0),U.imageAtlasTexture.bind(_.LINEAR,_.CLAMP_TO_EDGE),O.updatePaintBuffers(M)),Ea(O,x,k,U,n);const ee=o.translatePosMatrix(D.posMatrix,U,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),oe=n.paint.get("fill-extrusion-vertical-gradient"),ce=w?aa(ee,o,oe,B,D,M,U):co(ee,o,oe,B);K.draw(y,y.gl.TRIANGLES,c,d,m,ft.backCCW,ce,J,n.id,Z.layoutVertexBuffer,Z.indexBuffer,Z.segments,n.paint,o.transform.zoom,O,o.style.map.terrain&&Z.centroidVertexBuffer)}}function Sl(o,t,n,a,c,d,m){const y=o.context,_=y.gl,x=n.fbo;if(!x)return;const T=o.useProgram("hillshade"),w=o.style.map.terrain&&o.style.map.terrain.getTerrainData(t);y.activeTexture.set(_.TEXTURE0),_.bindTexture(_.TEXTURE_2D,x.colorAttachment.get()),T.draw(y,_.TRIANGLES,c,d,m,ft.disabled,((M,B,k,D)=>{const U=k.paint.get("hillshade-shadow-color"),Z=k.paint.get("hillshade-highlight-color"),J=k.paint.get("hillshade-accent-color");let O=k.paint.get("hillshade-illumination-direction")*(Math.PI/180);k.paint.get("hillshade-illumination-anchor")==="viewport"&&(O-=M.transform.angle);const K=!M.options.moving;return{u_matrix:D?D.posMatrix:M.transform.calculatePosMatrix(B.tileID.toUnwrapped(),K),u_image:0,u_latrange:fo(0,B.tileID),u_light:[k.paint.get("hillshade-exaggeration"),O],u_shadow:U,u_highlight:Z,u_accent:J}})(o,n,a,w?t:null),w,a.id,o.rasterBoundsBuffer,o.quadTriangleIndexBuffer,o.rasterBoundsSegments)}function So(o,t,n,a,c,d){const m=o.context,y=m.gl,_=t.dem;if(_&&_.data){const x=_.dim,T=_.stride,w=_.getPixels();if(m.activeTexture.set(y.TEXTURE1),m.pixelStoreUnpackPremultiplyAlpha.set(!1),t.demTexture=t.demTexture||o.getTileTexture(T),t.demTexture){const B=t.demTexture;B.update(w,{premultiply:!1}),B.bind(y.NEAREST,y.CLAMP_TO_EDGE)}else t.demTexture=new ct(m,w,y.RGBA,{premultiply:!1}),t.demTexture.bind(y.NEAREST,y.CLAMP_TO_EDGE);m.activeTexture.set(y.TEXTURE0);let M=t.fbo;if(!M){const B=new ct(m,{width:x,height:x,data:null},y.RGBA);B.bind(y.LINEAR,y.CLAMP_TO_EDGE),M=t.fbo=m.createFramebuffer(x,x,!0,!1),M.colorAttachment.set(B.texture)}m.bindFramebuffer.set(M.framebuffer),m.viewport.set([0,0,x,x]),o.useProgram("hillshadePrepare").draw(m,y.TRIANGLES,a,c,d,ft.disabled,((B,k)=>{const D=k.stride,U=h.create();return h.ortho(U,0,h.EXTENT,-h.EXTENT,0,0,1),h.translate(U,U,[0,-h.EXTENT,0]),{u_matrix:U,u_image:1,u_dimension:[D,D],u_zoom:B.overscaledZ,u_unpack:k.getUnpackVector()}})(t.tileID,_),null,n.id,o.rasterBoundsBuffer,o.quadTriangleIndexBuffer,o.rasterBoundsSegments),t.needsHillshadePrepare=!1}}function Mt(o,t,n,a,c,d){const m=a.paint.get("raster-fade-duration");if(!d&&m>0){const y=h.exported.now(),_=(y-o.timeAdded)/m,x=t?(y-t.timeAdded)/m:-1,T=n.getSource(),w=c.coveringZoomLevel({tileSize:T.tileSize,roundZoom:T.roundZoom}),M=!t||Math.abs(t.tileID.overscaledZ-w)>Math.abs(o.tileID.overscaledZ-w),B=M&&o.refreshedUponExpiration?1:h.clamp(M?_:1-x,0,1);return o.refreshedUponExpiration&&_>=1&&(o.refreshedUponExpiration=!1),t?{opacity:1,mix:1-B}:{opacity:B,mix:0}}return{opacity:1,mix:0}}const Qr=new h.Color(1,0,0,1),Vi=new h.Color(0,1,0,1),Io=new h.Color(0,0,1,1),Sa=new h.Color(1,0,1,1),Ao=new h.Color(0,1,1,1);function en(o,t,n,a){In(o,0,t+n/2,o.transform.width,n,a)}function Gn(o,t,n,a){In(o,t-n/2,0,n,o.transform.height,a)}function In(o,t,n,a,c,d){const m=o.context,y=m.gl;y.enable(y.SCISSOR_TEST),y.scissor(t*o.pixelRatio,n*o.pixelRatio,a*o.pixelRatio,c*o.pixelRatio),m.clear({color:d}),y.disable(y.SCISSOR_TEST)}function Co(o,t,n){const a=o.context,c=a.gl,d=n.posMatrix,m=o.useProgram("debug"),y=We.disabled,_=gt.disabled,x=o.colorModeForRenderPass(),T="$debug",w=o.style.map.terrain&&o.style.map.terrain.getTerrainData(n);a.activeTexture.set(c.TEXTURE0);const M=t.getTileByID(n.key).latestRawTileData,B=Math.floor((M&&M.byteLength||0)/1024),k=t.getTile(n).tileSize,D=512/Math.min(k,512)*(n.overscaledZ/o.transform.zoom)*.5;let U=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(U+=` => ${n.overscaledZ}`),function(Z,J){Z.initDebugOverlayCanvas();const O=Z.debugOverlayCanvas,K=Z.context.gl,ee=Z.debugOverlayCanvas.getContext("2d");ee.clearRect(0,0,O.width,O.height),ee.shadowColor="white",ee.shadowBlur=2,ee.lineWidth=1.5,ee.strokeStyle="white",ee.textBaseline="top",ee.font="bold 36px Open Sans, sans-serif",ee.fillText(J,5,5),ee.strokeText(J,5,5),Z.debugOverlayTexture.update(O),Z.debugOverlayTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE)}(o,`${U} ${B}kB`),m.draw(a,c.TRIANGLES,y,_,Tt.alphaBlended,ft.disabled,ca(d,h.Color.transparent,D),null,T,o.debugBuffer,o.quadTriangleIndexBuffer,o.debugSegments),m.draw(a,c.LINE_STRIP,y,_,x,ft.disabled,ca(d,h.Color.red),w,T,o.debugBuffer,o.tileBorderIndexBuffer,o.debugSegments)}function Ia(o,t,n){const a=o.context,c=a.gl,d=o.colorModeForRenderPass(),m=new We(c.LEQUAL,We.ReadWrite,o.depthRangeFor3D),y=o.useProgram("terrain"),_=t.getTerrainMesh();a.bindFramebuffer.set(null),a.viewport.set([0,0,o.width,o.height]);for(const x of n){const T=o.renderToTexture.getTexture(x),w=t.getTerrainData(x.tileID);a.activeTexture.set(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,T.texture);const M={u_matrix:o.transform.calculatePosMatrix(x.tileID.toUnwrapped()),u_texture:0,u_ele_delta:t.getMeshFrameDelta(o.transform.zoom)};y.draw(a,c.TRIANGLES,m,gt.disabled,d,ft.backCCW,M,w,"terrain",_.vertexBuffer,_.indexBuffer,_.segments)}}const Aa={symbol:function(o,t,n,a,c){if(o.renderPass!=="translucent")return;const d=gt.disabled,m=o.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(y,_,x,T,w,M,B){const k=_.transform,D=w==="map",U=M==="map";for(const Z of y){const J=T.getTile(Z),O=J.getBucket(x);if(!O||!O.text||!O.text.segments.get().length)continue;const K=h.evaluateSizeForZoom(O.textSizeData,k.zoom),ee=j(J,1,_.transform.zoom),oe=Ne(Z.posMatrix,U,D,_.transform,ee),ce=x.layout.get("icon-text-fit")!=="none"&&O.hasIconData();if(K){const ue=Math.pow(2,k.zoom-J.tileID.overscaledZ);Eo(O,D,U,B,k,oe,Z.posMatrix,ue,K,ce,_.style.map.terrain?(le,be)=>_.style.map.terrain.getElevation(Z,le,be):null)}}}(a,o,n,t,n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),c),n.paint.get("icon-opacity").constantOr(1)!==0&&Ss(o,t,n,a,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),d,m),n.paint.get("text-opacity").constantOr(1)!==0&&Ss(o,t,n,a,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),d,m),t.map.showCollisionBoxes&&(To(o,t,n,a,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),!0),To(o,t,n,a,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),!1))},circle:function(o,t,n,a){if(o.renderPass!=="translucent")return;const c=n.paint.get("circle-opacity"),d=n.paint.get("circle-stroke-width"),m=n.paint.get("circle-stroke-opacity"),y=!n.layout.get("circle-sort-key").isConstant();if(c.constantOr(1)===0&&(d.constantOr(1)===0||m.constantOr(1)===0))return;const _=o.context,x=_.gl,T=o.depthModeForSublayer(0,We.ReadOnly),w=gt.disabled,M=o.colorModeForRenderPass(),B=[];for(let k=0;kk.sortKey-D.sortKey);for(const k of B){const{programConfiguration:D,program:U,layoutVertexBuffer:Z,indexBuffer:J,uniformValues:O,terrainData:K}=k.state;U.draw(_,x.TRIANGLES,T,w,M,ft.disabled,O,K,n.id,Z,J,k.segments,n.paint,o.transform.zoom,D)}},heatmap:function(o,t,n,a){if(n.paint.get("heatmap-opacity")!==0)if(o.renderPass==="offscreen"){const c=o.context,d=c.gl,m=gt.disabled,y=new Tt([d.ONE,d.ONE],h.Color.transparent,[!0,!0,!0,!0]);(function(_,x,T){const w=_.gl;_.activeTexture.set(w.TEXTURE1),_.viewport.set([0,0,x.width/4,x.height/4]);let M=T.heatmapFbo;if(M)w.bindTexture(w.TEXTURE_2D,M.colorAttachment.get()),_.bindFramebuffer.set(M.framebuffer);else{const B=w.createTexture();w.bindTexture(w.TEXTURE_2D,B),w.texParameteri(w.TEXTURE_2D,w.TEXTURE_WRAP_S,w.CLAMP_TO_EDGE),w.texParameteri(w.TEXTURE_2D,w.TEXTURE_WRAP_T,w.CLAMP_TO_EDGE),w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MIN_FILTER,w.LINEAR),w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MAG_FILTER,w.LINEAR),M=T.heatmapFbo=_.createFramebuffer(x.width/4,x.height/4,!1,!1),function(k,D,U,Z){var J,O;const K=k.gl,ee=(J=k.HALF_FLOAT)!==null&&J!==void 0?J:K.UNSIGNED_BYTE,oe=(O=k.RGBA16F)!==null&&O!==void 0?O:K.RGBA;K.texImage2D(K.TEXTURE_2D,0,oe,D.width/4,D.height/4,0,K.RGBA,ee,null),Z.colorAttachment.set(U)}(_,x,B,M)}})(c,o,n),c.clear({color:h.Color.transparent});for(let _=0;_{const k=h.create();h.ortho(k,0,T.width,T.height,0,0,1);const D=T.context.gl;return{u_matrix:k,u_world:[D.drawingBufferWidth,D.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:w.paint.get("heatmap-opacity")}})(c,d),null,d.id,c.viewportBuffer,c.quadTriangleIndexBuffer,c.viewportSegments,d.paint,c.transform.zoom)}(o,n))},line:function(o,t,n,a){if(o.renderPass!=="translucent")return;const c=n.paint.get("line-opacity"),d=n.paint.get("line-width");if(c.constantOr(1)===0||d.constantOr(1)===0)return;const m=o.depthModeForSublayer(0,We.ReadOnly),y=o.colorModeForRenderPass(),_=n.paint.get("line-dasharray"),x=n.paint.get("line-pattern"),T=x.constantOr(1),w=n.paint.get("line-gradient"),M=n.getCrossfadeParameters(),B=T?"linePattern":_?"lineSDF":w?"lineGradient":"line",k=o.context,D=k.gl;let U=!0;for(const Z of a){const J=t.getTile(Z);if(T&&!J.patternsLoaded())continue;const O=J.getBucket(n);if(!O)continue;const K=O.programConfigurations.get(n.id),ee=o.context.program.get(),oe=o.useProgram(B,K),ce=U||oe.program!==ee,ue=o.style.map.terrain&&o.style.map.terrain.getTerrainData(Z),le=x.constantOr(null);if(le&&J.imageAtlas){const Ve=J.imageAtlas,me=Ve.patternPositions[le.to.toString()],Be=Ve.patternPositions[le.from.toString()];me&&Be&&K.setConstantPatternPositions(me,Be)}const be=ue?Z:null,ze=T?Ui(o,J,n,M,be):_?ds(o,J,n,_,M,be):w?ps(o,J,n,O.lineClipsArray.length,be):vr(o,J,n,be);if(T)k.activeTexture.set(D.TEXTURE0),J.imageAtlasTexture.bind(D.LINEAR,D.CLAMP_TO_EDGE),K.updatePaintBuffers(M);else if(_&&(ce||o.lineAtlas.dirty))k.activeTexture.set(D.TEXTURE0),o.lineAtlas.bind(k);else if(w){const Ve=O.gradients[n.id];let me=Ve.texture;if(n.gradientVersion!==Ve.version){let Be=256;if(n.stepInterpolant){const we=t.getSource().maxzoom,it=Z.canonical.z===we?Math.ceil(1<256&&this.clearStencil(),a.setColorMode(Tt.disabled),a.setDepthMode(We.disabled);const d=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const m of n){const y=this._tileClippingMaskIDs[m.key]=this.nextStencilID++,_=this.style.map.terrain&&this.style.map.terrain.getTerrainData(m);d.draw(a,c.TRIANGLES,We.disabled,new gt({func:c.ALWAYS,mask:0},y,255,c.KEEP,c.KEEP,c.REPLACE),Tt.disabled,ft.disabled,ha(m.posMatrix),_,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,n=this.context.gl;return new gt({func:n.NOTEQUAL,mask:255},t,255,n.KEEP,n.KEEP,n.REPLACE)}stencilModeForClipping(t){const n=this.context.gl;return new gt({func:n.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,n.KEEP,n.KEEP,n.REPLACE)}stencilConfigForOverlap(t){const n=this.context.gl,a=t.sort((m,y)=>y.overscaledZ-m.overscaledZ),c=a[a.length-1].overscaledZ,d=a[0].overscaledZ-c+1;if(d>1){this.currentStencilSource=void 0,this.nextStencilID+d>256&&this.clearStencil();const m={};for(let y=0;y=0;this.currentLayer--){const _=this.style._layers[a[this.currentLayer]],x=c[_.source],T=d[_.source];this._renderTileClippingMasks(_,T),this.renderLayer(this,x,_,T)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerU.source&&!U.isHidden(T)?[x.sourceCaches[U.source]]:[]),B=M.filter(U=>U.getSource().type==="vector"),k=M.filter(U=>U.getSource().type!=="vector"),D=U=>{(!w||w.getSource().maxzoomD(U)),w||k.forEach(U=>D(U)),w}(this.style,this.transform.zoom);_&&Aa.debug(this,_,_.getVisibleCoordinates())}this.options.showPadding&&function(_){const x=_.transform.padding;en(_,_.transform.height-(x.top||0),3,Qr),en(_,x.bottom||0,3,Vi),Gn(_,x.left||0,3,Io),Gn(_,_.transform.width-(x.right||0),3,Sa);const T=_.transform.centerPoint;(function(w,M,B,k){In(w,M-1,B-10,2,20,k),In(w,M-10,B-1,20,2,k)})(_,T.x,_.transform.height-T.y,Ao)}(this),this.context.setDefault()}renderLayer(t,n,a,c){a.isHidden(this.transform.zoom)||(a.type==="background"||a.type==="custom"||(c||[]).length)&&(this.id=a.id,Aa[a.type](t,n,a,c,this.style.placement.variableOffsets))}translatePosMatrix(t,n,a,c,d){if(!a[0]&&!a[1])return t;const m=d?c==="map"?this.transform.angle:0:c==="viewport"?-this.transform.angle:0;if(m){const x=Math.sin(m),T=Math.cos(m);a=[a[0]*T-a[1]*x,a[0]*x+a[1]*T]}const y=[d?a[0]:j(n,a[0],this.transform.zoom),d?a[1]:j(n,a[1],this.transform.zoom),0],_=new Float32Array(16);return h.translate(_,t,y),_}saveTileTexture(t){const n=this._tileTextures[t.size[0]];n?n.push(t):this._tileTextures[t.size[0]]=[t]}getTileTexture(t){const n=this._tileTextures[t];return n&&n.length>0?n.pop():null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;const n=this.imageManager.getPattern(t.from.toString()),a=this.imageManager.getPattern(t.to.toString());return!n||!a}useProgram(t,n){this.cache=this.cache||{};const a=t+(n?n.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[a]||(this.cache[a]=new us(this.context,t,Or[t],n,ua[t],this._showOverdrawInspector,this.style.map.terrain)),this.cache[a]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new ct(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}}class Is{constructor(t,n){this.points=t,this.planes=n}static fromInvProjectionMatrix(t,n,a){const c=Math.pow(2,a),d=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(y=>{const _=1/(y=h.transformMat4([],y,t))[3]/n*c;return h.mul$1(y,y,[_,_,1/y[3],_])}),m=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(y=>{const _=function(M,B){var k=B[0],D=B[1],U=B[2],Z=k*k+D*D+U*U;return Z>0&&(Z=1/Math.sqrt(Z)),M[0]=B[0]*Z,M[1]=B[1]*Z,M[2]=B[2]*Z,M}([],function(M,B,k){var D=B[0],U=B[1],Z=B[2],J=k[0],O=k[1],K=k[2];return M[0]=U*K-Z*O,M[1]=Z*J-D*K,M[2]=D*O-U*J,M}([],cn([],d[y[0]],d[y[1]]),cn([],d[y[2]],d[y[1]]))),x=-((T=_)[0]*(w=d[y[1]])[0]+T[1]*w[1]+T[2]*w[2]);var T,w;return _.concat(x)});return new Is(d,m)}}class rr{constructor(t,n){this.min=t,this.max=n,this.center=function(a,c,d){return a[0]=.5*c[0],a[1]=.5*c[1],a[2]=.5*c[2],a}([],function(a,c,d){return a[0]=c[0]+d[0],a[1]=c[1]+d[1],a[2]=c[2]+d[2],a}([],this.min,this.max))}quadrant(t){const n=[t%2==0,t<2],a=gi(this.min),c=gi(this.max);for(let d=0;d=0&&m++;if(m===0)return 0;m!==n.length&&(a=!1)}if(a)return 2;for(let c=0;c<3;c++){let d=Number.MAX_VALUE,m=-Number.MAX_VALUE;for(let y=0;ythis.max[c]-this.min[c])return 0}return 1}}class As{constructor(t=0,n=0,a=0,c=0){if(isNaN(t)||t<0||isNaN(n)||n<0||isNaN(a)||a<0||isNaN(c)||c<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=n,this.left=a,this.right=c}interpolate(t,n,a){return n.top!=null&&t.top!=null&&(this.top=h.interpolate.number(t.top,n.top,a)),n.bottom!=null&&t.bottom!=null&&(this.bottom=h.interpolate.number(t.bottom,n.bottom,a)),n.left!=null&&t.left!=null&&(this.left=h.interpolate.number(t.left,n.left,a)),n.right!=null&&t.right!=null&&(this.right=h.interpolate.number(t.right,n.right,a)),this}getCenter(t,n){const a=h.clamp((this.left+t-this.right)/2,0,t),c=h.clamp((this.top+n-this.bottom)/2,0,n);return new h.Point(a,c)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new As(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class Cs{constructor(t,n,a,c,d){this.tileSize=512,this.maxValidLatitude=85.051129,this.freezeElevation=!1,this._renderWorldCopies=d===void 0||!!d,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=a??0,this._maxPitch=c??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new h.LngLat(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new As,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const t=new Cs(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.apply(this),t}apply(t){this.tileSize=t.tileSize,this.latRange=t.latRange,this.width=t.width,this.height=t.height,this._center=t._center,this._elevation=t._elevation,this.zoom=t.zoom,this.angle=t.angle,this._fov=t._fov,this._pitch=t._pitch,this._unmodified=t._unmodified,this._edgeInsets=t._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))}get maxZoom(){return this._maxZoom}set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))}get minPitch(){return this._minPitch}set minPitch(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))}get maxPitch(){return this._maxPitch}set maxPitch(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(t){t===void 0?t=!0:t===null&&(t=!1),this._renderWorldCopies=t}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new h.Point(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(t){const n=-h.wrap(t,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=function(){var a=new h.ARRAY_TYPE(4);return h.ARRAY_TYPE!=Float32Array&&(a[1]=0,a[2]=0),a[0]=1,a[3]=1,a}(),function(a,c,d){var m=c[0],y=c[1],_=c[2],x=c[3],T=Math.sin(d),w=Math.cos(d);a[0]=m*w+_*T,a[1]=y*w+x*T,a[2]=m*-T+_*w,a[3]=y*-T+x*w}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const n=h.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(t){const n=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==n&&(this._unmodified=!1,this._zoom=n,this.tileZoom=Math.max(0,Math.floor(n)),this.scale=this.zoomScale(n),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(t){t!==this._elevation&&(this._elevation=t,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(t){return this._edgeInsets.equals(t)}interpolatePadding(t,n,a){this._unmodified=!1,this._edgeInsets.interpolate(t,n,a),this._constrain(),this._calcMatrices()}coveringZoomLevel(t){const n=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,n)}getVisibleUnwrappedCoordinates(t){const n=[new h.UnwrappedTileID(0,t)];if(this._renderWorldCopies){const a=this.pointCoordinate(new h.Point(0,0)),c=this.pointCoordinate(new h.Point(this.width,0)),d=this.pointCoordinate(new h.Point(this.width,this.height)),m=this.pointCoordinate(new h.Point(0,this.height)),y=Math.floor(Math.min(a.x,c.x,d.x,m.x)),_=Math.floor(Math.max(a.x,c.x,d.x,m.x)),x=1;for(let T=y-x;T<=_+x;T++)T!==0&&n.push(new h.UnwrappedTileID(T,t))}return n}coveringTiles(t){var n,a;let c=this.coveringZoomLevel(t);const d=c;if(t.minzoom!==void 0&&ct.maxzoom&&(c=t.maxzoom);const m=this.pointCoordinate(this.getCameraPoint()),y=h.MercatorCoordinate.fromLngLat(this.center),_=Math.pow(2,c),x=[_*m.x,_*m.y,0],T=[_*y.x,_*y.y,0],w=Is.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,c);let M=t.minzoom||0;!t.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(M=c);const B=t.terrain?2/Math.min(this.tileSize,t.tileSize)*this.tileSize:3,k=O=>({aabb:new rr([O*_,0,0],[(O+1)*_,_,0]),zoom:0,x:0,y:0,wrap:O,fullyVisible:!1}),D=[],U=[],Z=c,J=t.reparseOverscaled?d:c;if(this._renderWorldCopies)for(let O=1;O<=3;O++)D.push(k(-O)),D.push(k(O));for(D.push(k(0));D.length>0;){const O=D.pop(),K=O.x,ee=O.y;let oe=O.fullyVisible;if(!oe){const ze=O.aabb.intersects(w);if(ze===0)continue;oe=ze===2}const ce=t.terrain?x:T,ue=O.aabb.distanceX(ce),le=O.aabb.distanceY(ce),be=Math.max(Math.abs(ue),Math.abs(le));if(O.zoom===Z||be>B+(1<=M){const ze=Z-O.zoom,Ve=x[0]-.5-(K<>1),Be=O.zoom+1;let we=O.aabb.quadrant(ze);if(t.terrain){const it=new h.OverscaledTileID(Be,O.wrap,Be,Ve,me),Pt=t.terrain.getMinMaxElevation(it),rt=(n=Pt.minElevation)!==null&&n!==void 0?n:this.elevation,$e=(a=Pt.maxElevation)!==null&&a!==void 0?a:this.elevation;we=new rr([we.min[0],we.min[1],rt],[we.max[0],we.max[1],$e])}D.push({aabb:we,zoom:Be,x:Ve,y:me,wrap:O.wrap,fullyVisible:oe})}}return U.sort((O,K)=>O.distanceSq-K.distanceSq).map(O=>O.tileID)}resize(t,n){this.width=t,this.height=n,this.pixelsToGLUnits=[2/t,-2/n],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(t){return Math.pow(2,t)}scaleZoom(t){return Math.log(t)/Math.LN2}project(t){const n=h.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new h.Point(h.mercatorXfromLng(t.lng)*this.worldSize,h.mercatorYfromLat(n)*this.worldSize)}unproject(t){return new h.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}updateElevation(t){this.freezeElevation||(this.elevation=t?this.getElevation(this._center,t):0)}getElevation(t,n){const a=h.MercatorCoordinate.fromLngLat(t.wrap()),c=(1<m&&(c=m-k)}if(this.lngRange){const B=(y+_)/2,k=h.wrap(w.x,B-this.worldSize/2,B+this.worldSize/2),D=x.x/2;k-D_&&(a=_-D)}a===void 0&&c===void 0||(this.center=this.unproject(new h.Point(a!==void 0?a:w.x,c!==void 0?c:w.y)).wrap()),this._unmodified=T,this._constraining=!1}_calcMatrices(){if(!this.height)return;const t=this.centerOffset,n=this.point.x,a=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=h.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let c=h.identity(new Float64Array(16));h.scale(c,c,[this.width/2,-this.height/2,1]),h.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=h.identity(new Float64Array(16)),h.scale(c,c,[1,-1,1]),h.translate(c,c,[-1,-1,0]),h.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.cameraToSeaLevelDistance=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch);const d=this._elevation<0?this.cameraToCenterDistance:this.cameraToSeaLevelDistance,m=Math.PI/2+this._pitch,y=this._fov*(.5+t.y/this.height),_=Math.sin(y)*d/Math.sin(h.clamp(Math.PI-m-y,.01,Math.PI-.01)),x=this.getHorizon(),T=2*Math.atan(x/this.cameraToCenterDistance)*(.5+t.y/(2*x)),w=Math.sin(T)*d/Math.sin(h.clamp(Math.PI-m-T,.01,Math.PI-.01)),M=Math.min(_,w),B=1.01*(Math.cos(Math.PI/2-this._pitch)*M+d),k=this.height/50;c=new Float64Array(16),h.perspective(c,this._fov,this.width/this.height,k,B),c[8]=2*-t.x/this.width,c[9]=2*t.y/this.height,h.scale(c,c,[1,-1,1]),h.translate(c,c,[0,0,-this.cameraToCenterDistance]),h.rotateX(c,c,this._pitch),h.rotateZ(c,c,this.angle),h.translate(c,c,[-n,-a,0]),this.mercatorMatrix=h.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),h.scale(c,c,[1,1,this._pixelPerMeter]),this.pixelMatrix=h.multiply(new Float64Array(16),this.labelPlaneMatrix,c),h.translate(c,c,[0,0,-this.elevation]),this.projMatrix=c,this.invProjMatrix=h.invert([],c),this.pixelMatrix3D=h.multiply(new Float64Array(16),this.labelPlaneMatrix,c);const D=this.width%2/2,U=this.height%2/2,Z=Math.cos(this.angle),J=Math.sin(this.angle),O=n-Math.round(n)+Z*D+J*U,K=a-Math.round(a)+Z*U+J*D,ee=new Float64Array(c);if(h.translate(ee,ee,[O>.5?O-1:O,K>.5?K-1:K,0]),this.alignedProjMatrix=ee,c=h.invert(new Float64Array(16),this.pixelMatrix),!c)throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const t=this.pointCoordinate(new h.Point(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return h.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new h.Point(0,t))}getCameraQueryGeometry(t){const n=this.getCameraPoint();if(t.length===1)return[t[0],n];{let a=n.x,c=n.y,d=n.x,m=n.y;for(const y of t)a=Math.min(a,y.x),c=Math.min(c,y.y),d=Math.max(d,y.x),m=Math.max(m,y.y);return[new h.Point(a,c),new h.Point(d,c),new h.Point(d,m),new h.Point(a,m),new h.Point(a,c)]}}}class Po{constructor(t){this._hashName=t&&encodeURIComponent(t),h.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=function(n,a){let c=!1,d=null;const m=()=>{d=null,c&&(n(),d=setTimeout(m,300),c=!1)};return()=>(c=!0,d||m(),d)}(this._updateHashUnthrottled.bind(this))}addTo(t){return this._map=t,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(t){const n=this._map.getCenter(),a=Math.round(100*this._map.getZoom())/100,c=Math.ceil((a*Math.LN2+Math.log(512/360/.5))/Math.LN10),d=Math.pow(10,c),m=Math.round(n.lng*d)/d,y=Math.round(n.lat*d)/d,_=this._map.getBearing(),x=this._map.getPitch();let T="";if(T+=t?`/${m}/${y}/${a}`:`${a}/${y}/${m}`,(_||x)&&(T+="/"+Math.round(10*_)/10),x&&(T+=`/${Math.round(x)}`),this._hashName){const w=this._hashName;let M=!1;const B=window.location.hash.slice(1).split("&").map(k=>{const D=k.split("=")[0];return D===w?(M=!0,`${D}=${T}`):k}).filter(k=>k);return M||B.push(`${w}=${T}`),`#${B.join("&")}`}return`#${T}`}_getCurrentHash(){const t=window.location.hash.replace("#","");if(this._hashName){let n;return t.split("&").map(a=>a.split("=")).forEach(a=>{a[0]===this._hashName&&(n=a)}),(n&&n[1]||"").split("/")}return t.split("/")}_onHashChange(){const t=this._getCurrentHash();if(t.length>=3&&!t.some(n=>isNaN(n))){const n=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:n,pitch:+(t[4]||0)}),!0}return!1}_updateHashUnthrottled(){const t=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,t)}catch{}}}const Xn={linearity:.3,easing:h.bezier(0,0,.3,1)},zo=h.extend({deceleration:2500,maxSpeed:1400},Xn),ko=h.extend({deceleration:20,maxSpeed:1400},Xn),Wn=h.extend({deceleration:1e3,maxSpeed:360},Xn),Do=h.extend({deceleration:1e3,maxSpeed:90},Xn);class nr{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:h.exported.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,n=h.exported.now();for(;t.length>0&&n-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new h.Point(0,0),pinchAround:void 0,around:void 0};for(const{settings:d}of this._inertiaBuffer)n.zoom+=d.zoomDelta||0,n.bearing+=d.bearingDelta||0,n.pitch+=d.pitchDelta||0,d.panDelta&&n.pan._add(d.panDelta),d.around&&(n.around=d.around),d.pinchAround&&(n.pinchAround=d.pinchAround);const a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,c={};if(n.pan.mag()){const d=Hn(n.pan.mag(),a,h.extend({},zo,t||{}));c.offset=n.pan.mult(d.amount/n.pan.mag()),c.center=this._map.transform.center,Ni(c,d)}if(n.zoom){const d=Hn(n.zoom,a,ko);c.zoom=this._map.transform.zoom+d.amount,Ni(c,d)}if(n.bearing){const d=Hn(n.bearing,a,Wn);c.bearing=this._map.transform.bearing+h.clamp(d.amount,-179,179),Ni(c,d)}if(n.pitch){const d=Hn(n.pitch,a,Do);c.pitch=this._map.transform.pitch+d.amount,Ni(c,d)}if(c.zoom||c.bearing){const d=n.pinchAround===void 0?n.around:n.pinchAround;c.around=d?this._map.unproject(d):this._map.getCenter()}return this.clear(),h.extend(c,{noMoveStart:!0})}}function Ni(o,t){(!o.duration||o.durationn.unproject(_)),y=d.reduce((_,x,T,w)=>_.add(x.div(w.length)),new h.Point(0,0));super(t,{points:d,point:y,lngLats:m,lngLat:n.unproject(y),originalEvent:a}),this._defaultPrevented=!1}}class Il extends h.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,n,a){super(t,{originalEvent:a}),this._defaultPrevented=!1}}class Al{constructor(t,n){this._map=t,this._clickTolerance=n.clickTolerance}reset(){delete this._mousedownPos}wheel(t){return this._firePreventable(new Il(t.type,this._map,t))}mousedown(t,n){return this._mousedownPos=n,this._firePreventable(new Rt(t.type,this._map,t))}mouseup(t){this._map.fire(new Rt(t.type,this._map,t))}click(t,n){this._mousedownPos&&this._mousedownPos.dist(n)>=this._clickTolerance||this._map.fire(new Rt(t.type,this._map,t))}dblclick(t){return this._firePreventable(new Rt(t.type,this._map,t))}mouseover(t){this._map.fire(new Rt(t.type,this._map,t))}mouseout(t){this._map.fire(new Rt(t.type,this._map,t))}touchstart(t){return this._firePreventable(new Vr(t.type,this._map,t))}touchmove(t){this._map.fire(new Vr(t.type,this._map,t))}touchend(t){this._map.fire(new Vr(t.type,this._map,t))}touchcancel(t){this._map.fire(new Vr(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Cl{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(t){this._map.fire(new Rt(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rt("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._ignoreContextMenu||this._map.fire(new Rt(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class An{constructor(t){this._map=t}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(t){return this.transform.pointLocation(h.Point.convert(t),this._map.terrain)}}class Kn{constructor(t,n){this._map=t,this._tr=new An(t),this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=n.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,n){this.isEnabled()&&t.shiftKey&&t.button===0&&(te.disableDrag(),this._startPos=this._lastPos=n,this._active=!0)}mousemoveWindow(t,n){if(!this._active)return;const a=n;if(this._lastPos.equals(a)||!this._box&&a.dist(this._startPos)d.fitScreenCoordinates(a,c,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",t)}keydown(t){this._active&&t.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",t))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(te.remove(this._box),this._box=null),te.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,n){return this._map.fire(new h.Event(t,{originalEvent:n}))}}function sr(o,t){if(o.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${o.length}, points ${t.length}`);const n={};for(let a=0;athis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=t.timeStamp),a.length===this.numTouches&&(this.centroid=function(c){const d=new h.Point(0,0);for(const m of c)d._add(m);return d.div(c.length)}(n),this.touches=sr(a,n)))}touchmove(t,n,a){if(this.aborted||!this.centroid)return;const c=sr(a,n);for(const d in this.touches){const m=c[d];(!m||m.dist(this.touches[d])>30)&&(this.aborted=!0)}}touchend(t,n,a){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),a.length===0){const c=!this.aborted&&this.centroid;if(this.reset(),c)return c}}}class Ms{constructor(t){this.singleTap=new Ee(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(t,n,a){this.singleTap.touchstart(t,n,a)}touchmove(t,n,a){this.singleTap.touchmove(t,n,a)}touchend(t,n,a){const c=this.singleTap.touchend(t,n,a);if(c){const d=t.timeStamp-this.lastTime<500,m=!this.lastTap||this.lastTap.dist(c)<30;if(d&&m||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=c,this.count===this.numTaps)return this.reset(),c}}}class Yn{constructor(t){this._tr=new An(t),this._zoomIn=new Ms({numTouches:1,numTaps:2}),this._zoomOut=new Ms({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,n,a){this._zoomIn.touchstart(t,n,a),this._zoomOut.touchstart(t,n,a)}touchmove(t,n,a){this._zoomIn.touchmove(t,n,a),this._zoomOut.touchmove(t,n,a)}touchend(t,n,a){const c=this._zoomIn.touchend(t,n,a),d=this._zoomOut.touchend(t,n,a),m=this._tr;return c?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:y=>y.easeTo({duration:300,zoom:m.zoom+1,around:m.unproject(c)},{originalEvent:t})}):d?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:y=>y.easeTo({duration:300,zoom:m.zoom-1,around:m.unproject(d)},{originalEvent:t})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class br{constructor(t){this._enabled=!!t.enable,this._moveStateManager=t.moveStateManager,this._clickTolerance=t.clickTolerance||1,this._moveFunction=t.move,this._activateOnStart=!!t.activateOnStart,t.assignEvents(this),this.reset()}reset(t){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(t)}_move(...t){const n=this._moveFunction(...t);if(n.bearingDelta||n.pitchDelta||n.around||n.panDelta)return this._active=!0,n}dragStart(t,n){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(t)&&(this._moveStateManager.startMove(t),this._lastPoint=n.length?n[0]:n,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(t,n){if(!this.isEnabled())return;const a=this._lastPoint;if(!a)return;if(t.preventDefault(),!this._moveStateManager.isValidMoveEvent(t))return void this.reset(t);const c=n.length?n[0]:n;return!this._moved&&c.dist(a){o.mousedown=o.dragStart,o.mousemoveWindow=o.dragMove,o.mouseup=o.dragEnd,o.contextmenu=function(t){t.preventDefault()}},Bo=({enable:o,clickTolerance:t,bearingDegreesPerPixelMoved:n=.8})=>{const a=new ye({checkCorrectEvent:c=>te.mouseButton(c)===0&&c.ctrlKey||te.mouseButton(c)===2});return new br({clickTolerance:t,move:(c,d)=>({bearingDelta:(d.x-c.x)*n}),moveStateManager:a,enable:o,assignEvents:Ca})},zs=({enable:o,clickTolerance:t,pitchDegreesPerPixelMoved:n=-.5})=>{const a=new ye({checkCorrectEvent:c=>te.mouseButton(c)===0&&c.ctrlKey||te.mouseButton(c)===2});return new br({clickTolerance:t,move:(c,d)=>({pitchDelta:(d.y-c.y)*n}),moveStateManager:a,enable:o,assignEvents:Ca})};class Ro{constructor(t,n){this._minTouches=t.cooperativeGestures?2:1,this._clickTolerance=t.clickTolerance||1,this._map=n,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new h.Point(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(t,n,a){return this._calculateTransform(t,n,a)}touchmove(t,n,a){if(this._map._cooperativeGestures&&(this._minTouches===2&&a.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(t,!1,a.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(a.length0&&(this._active=!0);const c=sr(a,n),d=new h.Point(0,0),m=new h.Point(0,0);let y=0;for(const x in c){const T=c[x],w=this._touches[x];w&&(d._add(T),m._add(T.sub(w)),y++,c[x]=T)}if(this._touches=c,yMath.abs(o.x)}class xi extends ks{constructor(t){super(),this._map=t}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(t,n,a){super.touchstart(t,n,a),this._currentTouchCount=a.length}_start(t){this._lastPoints=t,Jn(t[0].sub(t[1]))&&(this._valid=!1)}_move(t,n,a){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const c=t[0].sub(this._lastPoints[0]),d=t[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(c,d,a.timeStamp),this._valid?(this._lastPoints=t,this._active=!0,{pitchDelta:(c.y+d.y)/2*-.5}):void 0}gestureBeginsVertically(t,n,a){if(this._valid!==void 0)return this._valid;const c=t.mag()>=2,d=n.mag()>=2;if(!c&&!d)return;if(!c||!d)return this._firstMove===void 0&&(this._firstMove=a),a-this._firstMove<100&&void 0;const m=t.y>0==n.y>0;return Jn(t)&&Jn(n)&&m}}const Nr={panStep:100,bearingStep:15,pitchStep:10};class Oo{constructor(t){this._tr=new An(t);const n=Nr;this._panStep=n.panStep,this._bearingStep=n.bearingStep,this._pitchStep=n.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let n=0,a=0,c=0,d=0,m=0;switch(t.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:t.shiftKey?a=-1:(t.preventDefault(),d=-1);break;case 39:t.shiftKey?a=1:(t.preventDefault(),d=1);break;case 38:t.shiftKey?c=1:(t.preventDefault(),m=-1);break;case 40:t.shiftKey?c=-1:(t.preventDefault(),m=1);break;default:return}return this._rotationDisabled&&(a=0,c=0),{cameraAnimation:y=>{const _=this._tr;y.easeTo({duration:300,easeId:"keyboardHandler",easing:za,zoom:n?Math.round(_.zoom)+n*(t.shiftKey?2:1):_.zoom,bearing:_.bearing+a*this._bearingStep,pitch:_.pitch+c*this._pitchStep,offset:[-d*this._panStep,-m*this._panStep],center:_.center},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function za(o){return o*(2-o)}const Bs=4.000244140625;class ka{constructor(t,n){this._map=t,this._tr=new An(t),this._el=t.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,h.bindAll(["_onTimeout"],this)}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this._wheelZoomRate=t}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&t.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(t){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!t[this._map._metaKey])return;t.preventDefault()}let n=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const a=h.exported.now(),c=a-(this._lastWheelEventTime||0);this._lastWheelEventTime=a,n!==0&&n%Bs==0?this._type="wheel":n!==0&&Math.abs(n)<4?this._type="trackpad":c>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(c*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}_onTimeout(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)}_start(t){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const n=te.mousePos(this._el,t),a=this._tr;this._around=h.LngLat.convert(this._aroundCenter?a.center:a.unproject(n)),this._aroundPoint=a.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const t=this._tr.transform;if(this._delta!==0){const y=this._type==="wheel"&&Math.abs(this._delta)>Bs?this._wheelZoomRate:this._defaultZoomRate;let _=2/(1+Math.exp(-Math.abs(this._delta*y)));this._delta<0&&_!==0&&(_=1/_);const x=typeof this._targetZoom=="number"?t.zoomScale(this._targetZoom):t.scale;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(x*_))),this._type==="wheel"&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const n=typeof this._targetZoom=="number"?this._targetZoom:t.zoom,a=this._startZoom,c=this._easing;let d,m=!1;if(this._type==="wheel"&&a&&c){const y=Math.min((h.exported.now()-this._lastWheelEventTime)/200,1),_=c(y);d=h.interpolate.number(a,n,_),y<1?this._frameId||(this._frameId=!0):m=!0}else d=n,m=!0;return this._active=!0,m&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!m,zoomDelta:d-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let n=h.ease;if(this._prevEase){const a=this._prevEase,c=(h.exported.now()-a.start)/a.duration,d=a.easing(c+.01)-a.easing(c),m=.27/Math.sqrt(d*d+1e-4)*.01,y=Math.sqrt(.0729-m*m);n=h.bezier(m,y,.25,1)}return this._prevEase={start:h.exported.now(),duration:t,easing:n},n}reset(){this._active=!1}}class Uo{constructor(t,n){this._clickZoom=t,this._tapZoom=n}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class $i{constructor(t){this._tr=new An(t),this.reset()}reset(){this._active=!1}dblclick(t,n){return t.preventDefault(),{cameraAnimation:a=>{a.easeTo({duration:300,zoom:this._tr.zoom+(t.shiftKey?-1:1),around:this._tr.unproject(n)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class bt{constructor(){this._tap=new Ms({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()}touchstart(t,n,a){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?a.length>0&&(this._swipePoint=n[0],this._swipeTouch=a[0].identifier):this._tap.touchstart(t,n,a))}touchmove(t,n,a){if(this._tapTime){if(this._swipePoint){if(a[0].identifier!==this._swipeTouch)return;const c=n[0],d=c.y-this._swipePoint.y;return this._swipePoint=c,t.preventDefault(),this._active=!0,{zoomDelta:d/128}}}else this._tap.touchmove(t,n,a)}touchend(t,n,a){this._tapTime?this._swipePoint&&a.length===0&&this.reset():this._tap.touchend(t,n,a)&&(this._tapTime=t.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Rs{constructor(t,n,a){this._el=t,this._mousePan=n,this._touchPan=a}enable(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Da{constructor(t,n,a){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=n,this._mousePitch=a}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Vo{constructor(t,n,a,c){this._el=t,this._touchZoom=n,this._touchRotate=a,this._tapDragZoom=c,this._rotationDisabled=!1,this._enabled=!0}enable(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const Qn=o=>o.zoom||o.drag||o.pitch||o.rotate;class No extends h.Event{}function La(o){return o.panDelta&&o.panDelta.mag()||o.zoomDelta||o.bearingDelta||o.pitchDelta}class ar{constructor(t,n){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new nr(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),h.bindAll(["handleEvent","handleWindowEvent"],this);const a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[window,"blur",void 0]];for(const[c,d,m]of this._listeners)te.addEventListener(c,d,c===document?this.handleWindowEvent:this.handleEvent,m)}destroy(){for(const[t,n,a]of this._listeners)te.removeEventListener(t,n,t===document?this.handleWindowEvent:this.handleEvent,a)}_addDefaultHandlers(t){const n=this._map,a=n.getCanvasContainer();this._add("mapEvent",new Al(n,t));const c=n.boxZoom=new Kn(n,t);this._add("boxZoom",c);const d=new Yn(n),m=new $i(n);n.doubleClickZoom=new Uo(m,d),this._add("tapZoom",d),this._add("clickZoom",m);const y=new bt;this._add("tapDragZoom",y);const _=n.touchPitch=new xi(n);this._add("touchPitch",_);const x=Bo(t),T=zs(t);n.dragRotate=new Da(t,x,T),this._add("mouseRotate",x,["mousePitch"]),this._add("mousePitch",T,["mouseRotate"]);const w=(({enable:Z,clickTolerance:J})=>{const O=new ye({checkCorrectEvent:K=>te.mouseButton(K)===0&&!K.ctrlKey});return new br({clickTolerance:J,move:(K,ee)=>({around:ee,panDelta:ee.sub(K)}),activateOnStart:!0,moveStateManager:O,enable:Z,assignEvents:Ca})})(t),M=new Ro(t,n);n.dragPan=new Rs(a,w,M),this._add("mousePan",w),this._add("touchPan",M,["touchZoom","touchRotate"]);const B=new Pa,k=new Ma;n.touchZoomRotate=new Vo(a,k,B,y),this._add("touchRotate",B,["touchPan","touchZoom"]),this._add("touchZoom",k,["touchPan","touchRotate"]);const D=n.scrollZoom=new ka(n,this);this._add("scrollZoom",D,["mousePan"]);const U=n.keyboard=new Oo(n);this._add("keyboard",U),this._add("blockableMapEvent",new Cl(n));for(const Z of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])t.interactive&&t[Z]&&n[Z].enable(t[Z])}_add(t,n,a){this._handlers.push({handlerName:t,handler:n,allowed:a}),this._handlersById[t]=n}stop(t){if(!this._updatingCamera){for(const{handler:n}of this._handlers)n.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}}isActive(){for(const{handler:t}of this._handlers)if(t.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Qn(this._eventsInProgress)||this.isZooming()}_blockedByActive(t,n,a){for(const c in t)if(c!==a&&(!n||n.indexOf(c)<0))return!0;return!1}handleWindowEvent(t){this.handleEvent(t,`${t.type}Window`)}_getMapTouches(t){const n=[];for(const a of t)this._el.contains(a.target)&&n.push(a);return n}handleEvent(t,n){if(t.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const a=t.type==="renderFrame"?void 0:t,c={needsRenderFrame:!1},d={},m={},y=t.touches,_=y?this._getMapTouches(y):void 0,x=_?te.touchPos(this._el,_):te.mousePos(this._el,t);for(const{handlerName:M,handler:B,allowed:k}of this._handlers){if(!B.isEnabled())continue;let D;this._blockedByActive(m,k,M)?B.reset():B[n||t.type]&&(D=B[n||t.type](t,x,_),this.mergeHandlerResult(c,d,D,M,a),D&&D.needsRenderFrame&&this._triggerRenderFrame()),(D||B.isActive())&&(m[M]=B)}const T={};for(const M in this._previousActiveHandlers)m[M]||(T[M]=a);this._previousActiveHandlers=m,(Object.keys(T).length||La(c))&&(this._changes.push([c,d,T]),this._triggerRenderFrame()),(Object.keys(m).length||La(c))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:w}=c;w&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],w(this._map))}mergeHandlerResult(t,n,a,c,d){if(!a)return;h.extend(t,a);const m={handlerName:c,originalEvent:a.originalEvent||d};a.zoomDelta!==void 0&&(n.zoom=m),a.panDelta!==void 0&&(n.drag=m),a.pitchDelta!==void 0&&(n.pitch=m),a.bearingDelta!==void 0&&(n.rotate=m)}_applyChanges(){const t={},n={},a={};for(const[c,d,m]of this._changes)c.panDelta&&(t.panDelta=(t.panDelta||new h.Point(0,0))._add(c.panDelta)),c.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+c.zoomDelta),c.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+c.bearingDelta),c.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+c.pitchDelta),c.around!==void 0&&(t.around=c.around),c.pinchAround!==void 0&&(t.pinchAround=c.pinchAround),c.noInertia&&(t.noInertia=c.noInertia),h.extend(n,d),h.extend(a,m);this._updateMapTransform(t,n,a),this._changes=[]}_updateMapTransform(t,n,a){const c=this._map,d=c._getTransformForUpdate(),m=c.terrain;if(!(La(t)||m&&this._terrainMovement))return this._fireEvents(n,a,!0);let{panDelta:y,zoomDelta:_,bearingDelta:x,pitchDelta:T,around:w,pinchAround:M}=t;M!==void 0&&(w=M),c._stop(!0),w=w||c.transform.centerPoint;const B=d.pointLocation(y?w.sub(y):w);x&&(d.bearing+=x),T&&(d.pitch+=T),_&&(d.zoom+=_),m?this._terrainMovement||!n.drag&&!n.zoom?n.drag&&this._terrainMovement?d.center=d.pointLocation(d.centerPoint.sub(y)):d.setLocationAtPoint(B,w):(this._terrainMovement=!0,d.freezeElevation=!0,d.setLocationAtPoint(B,w),this._map.once("moveend",()=>{d.freezeElevation=!1,this._terrainMovement=!1,d.recalculateZoom(c.terrain)})):d.setLocationAtPoint(B,w),c._applyUpdatedTransform(d),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(n,a,!0)}_fireEvents(t,n,a){const c=Qn(this._eventsInProgress),d=Qn(t),m={};for(const T in t){const{originalEvent:w}=t[T];this._eventsInProgress[T]||(m[`${T}start`]=w),this._eventsInProgress[T]=t[T]}!c&&d&&this._fireEvent("movestart",d.originalEvent);for(const T in m)this._fireEvent(T,m[T]);d&&this._fireEvent("move",d.originalEvent);for(const T in t){const{originalEvent:w}=t[T];this._fireEvent(T,w)}const y={};let _;for(const T in this._eventsInProgress){const{handlerName:w,originalEvent:M}=this._eventsInProgress[T];this._handlersById[w].isActive()||(delete this._eventsInProgress[T],_=n[w]||M,y[`${T}end`]=_)}for(const T in y)this._fireEvent(T,y[T]);const x=Qn(this._eventsInProgress);if(a&&(c||d)&&!x){this._updatingCamera=!0;const T=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),w=M=>M!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new No("renderFrame",{timeStamp:t})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}const Fs={extend:(o,...t)=>h.extend(o,...t),run(o){o()},logToElement(o,t=!1,n="log"){const a=window.document.getElementById(n);a&&(t&&(a.innerHTML=""),a.innerHTML+=`
${o}`)}};class Me extends h.Evented{constructor(t,n){super(),this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=n.bearingSnap,h.bindAll(["_renderFrameCallback"],this),this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new h.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(t,n){return this.jumpTo({center:t},n)}panBy(t,n,a){return t=h.Point.convert(t).mult(-1),this.panTo(this.transform.center,h.extend({offset:t},n),a)}panTo(t,n,a){return this.easeTo(h.extend({center:t},n),a)}getZoom(){return this.transform.zoom}setZoom(t,n){return this.jumpTo({zoom:t},n),this}zoomTo(t,n,a){return this.easeTo(h.extend({zoom:t},n),a)}zoomIn(t,n){return this.zoomTo(this.getZoom()+1,t,n),this}zoomOut(t,n){return this.zoomTo(this.getZoom()-1,t,n),this}getBearing(){return this.transform.bearing}setBearing(t,n){return this.jumpTo({bearing:t},n),this}getPadding(){return this.transform.padding}setPadding(t,n){return this.jumpTo({padding:t},n),this}rotateTo(t,n,a){return this.easeTo(h.extend({bearing:t},n),a)}resetNorth(t,n){return this.rotateTo(0,h.extend({duration:1e3},t),n),this}resetNorthPitch(t,n){return this.easeTo(h.extend({bearing:0,pitch:0,duration:1e3},t),n),this}snapToNorth(t,n){return Math.abs(this.getBearing()){if(this._zooming&&(a.zoom=h.interpolate.number(c,_,oe)),this._rotating&&(a.bearing=h.interpolate.number(d,x,oe)),this._pitching&&(a.pitch=h.interpolate.number(m,T,oe)),this._padding&&(a.interpolatePadding(y,w,oe),B=a.centerPoint.add(M)),this.terrain&&!t.freezeElevation&&this._updateElevation(oe),O)a.setLocationAtPoint(O,K);else{const ce=a.zoomScale(a.zoom-c),ue=_>c?Math.min(2,J):Math.max(.5,J),le=Math.pow(ue,1-oe),be=a.unproject(U.add(Z.mult(oe*le)).mult(ce));a.setLocationAtPoint(a.renderWorldCopies?be.wrap():be,B)}this._applyUpdatedTransform(a),this._fireMoveEvents(n)},oe=>{this.terrain&&this._finalizeElevation(),this._afterEase(n,oe)},t),this}_prepareEase(t,n,a={}){this._moving=!0,n||a.moving||this.fire(new h.Event("movestart",t)),this._zooming&&!a.zooming&&this.fire(new h.Event("zoomstart",t)),this._rotating&&!a.rotating&&this.fire(new h.Event("rotatestart",t)),this._pitching&&!a.pitching&&this.fire(new h.Event("pitchstart",t))}_prepareElevation(t){this._elevationCenter=t,this._elevationStart=this.transform.elevation,this._elevationTarget=this.transform.getElevation(t,this.terrain),this.transform.freezeElevation=!0}_updateElevation(t){const n=this.transform.getElevation(this._elevationCenter,this.terrain);if(t<1&&n!==this._elevationTarget){const a=this._elevationTarget-this._elevationStart;this._elevationStart+=t*(a-(n-(a*t+this._elevationStart))/(1-t)),this._elevationTarget=n}this.transform.elevation=h.interpolate.number(this._elevationStart,this._elevationTarget,t)}_finalizeElevation(){this.transform.freezeElevation=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(t){if(!this.transformCameraUpdate)return;const n=t.clone(),{center:a,zoom:c,pitch:d,bearing:m,elevation:y}=this.transformCameraUpdate(n);a&&(n.center=a),c!==void 0&&(n.zoom=c),d!==void 0&&(n.pitch=d),m!==void 0&&(n.bearing=m),y!==void 0&&(n.elevation=y),this.transform.apply(n)}_fireMoveEvents(t){this.fire(new h.Event("move",t)),this._zooming&&this.fire(new h.Event("zoom",t)),this._rotating&&this.fire(new h.Event("rotate",t)),this._pitching&&this.fire(new h.Event("pitch",t))}_afterEase(t,n){if(this._easeId&&n&&this._easeId===n)return;delete this._easeId;const a=this._zooming,c=this._rotating,d=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,a&&this.fire(new h.Event("zoomend",t)),c&&this.fire(new h.Event("rotateend",t)),d&&this.fire(new h.Event("pitchend",t)),this.fire(new h.Event("moveend",t))}flyTo(t,n){if(!t.essential&&h.exported.prefersReducedMotion){const we=h.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(we,n)}this.stop(),t=h.extend({offset:[0,0],speed:1.2,curve:1.42,easing:h.ease},t);const a=this._getTransformForUpdate(),c=this.getZoom(),d=this.getBearing(),m=this.getPitch(),y=this.getPadding(),_="zoom"in t?h.clamp(+t.zoom,a.minZoom,a.maxZoom):c,x="bearing"in t?this._normalizeBearing(t.bearing,d):d,T="pitch"in t?+t.pitch:m,w="padding"in t?t.padding:a.padding,M=a.zoomScale(_-c),B=h.Point.convert(t.offset);let k=a.centerPoint.add(B);const D=a.pointLocation(k),U=h.LngLat.convert(t.center||D);this._normalizeCenter(U);const Z=a.project(D),J=a.project(U).sub(Z);let O=t.curve;const K=Math.max(a.width,a.height),ee=K/M,oe=J.mag();if("minZoom"in t){const we=h.clamp(Math.min(t.minZoom,c,_),a.minZoom,a.maxZoom),it=K/a.zoomScale(we-c);O=Math.sqrt(it/oe*2)}const ce=O*O;function ue(we){const it=(ee*ee-K*K+(we?-1:1)*ce*ce*oe*oe)/(2*(we?ee:K)*ce*oe);return Math.log(Math.sqrt(it*it+1)-it)}function le(we){return(Math.exp(we)-Math.exp(-we))/2}function be(we){return(Math.exp(we)+Math.exp(-we))/2}const ze=ue(0);let Ve=function(we){return be(ze)/be(ze+O*we)},me=function(we){return K*((be(ze)*(le(it=ze+O*we)/be(it))-le(ze))/ce)/oe;var it},Be=(ue(1)-ze)/O;if(Math.abs(oe)<1e-6||!isFinite(Be)){if(Math.abs(K-ee)<1e-6)return this.easeTo(t,n);const we=eet.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=d!==x,this._pitching=T!==m,this._padding=!a.isPaddingEqual(w),this._prepareEase(n,!1),this.terrain&&this._prepareElevation(U),this._ease(we=>{const it=we*Be,Pt=1/Ve(it);a.zoom=we===1?_:c+a.scaleZoom(Pt),this._rotating&&(a.bearing=h.interpolate.number(d,x,we)),this._pitching&&(a.pitch=h.interpolate.number(m,T,we)),this._padding&&(a.interpolatePadding(y,w,we),k=a.centerPoint.add(B)),this.terrain&&!t.freezeElevation&&this._updateElevation(we);const rt=we===1?U:a.unproject(Z.add(J.mult(me(it))).mult(Pt));a.setLocationAtPoint(a.renderWorldCopies?rt.wrap():rt,k),this._applyUpdatedTransform(a),this._fireMoveEvents(n)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(n)},t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,n){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const a=this._onEaseEnd;delete this._onEaseEnd,a.call(this,n)}if(!t){const a=this.handlers;a&&a.stop(!1)}return this}_ease(t,n,a){a.animate===!1||a.duration===0?(t(1),n()):(this._easeStart=h.exported.now(),this._easeOptions=a,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const t=Math.min((h.exported.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(t,n){t=h.wrap(t,-180,180);const a=Math.abs(t-n);return Math.abs(t-360-n)180?-360:a<-180?360:0}queryTerrainElevation(t){return this.terrain?this.transform.getElevation(h.LngLat.convert(t),this.terrain)-this.transform.elevation:null}}class Le{constructor(t={}){this.options=t,h.bindAll(["_toggleAttribution","_updateData","_updateCompact","_updateCompactMinimize"],this)}getDefaultPosition(){return"bottom-right"}onAdd(t){return this._map=t,this._compact=this.options&&this.options.compact,this._container=te.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=te.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=te.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){te.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(t,n){const a=this._map._getUIString(`AttributionControl.${n}`);t.title=a,t.setAttribute("aria-label",a)}_toggleAttribution(){this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))}_updateData(t){!t||t.sourceDataType!=="metadata"&&t.sourceDataType!=="visibility"&&t.dataType!=="style"&&t.type!=="terrain"||this._updateAttributions()}_updateAttributions(){if(!this._map.style)return;let t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(c=>typeof c!="string"?"":c)):typeof this.options.customAttribution=="string"&&t.push(this.options.customAttribution)),this._map.style.stylesheet){const c=this._map.style.stylesheet;this.styleOwner=c.owner,this.styleId=c.id}const n=this._map.style.sourceCaches;for(const c in n){const d=n[c];if(d.used||d.usedForTerrain){const m=d.getSource();m.attribution&&t.indexOf(m.attribution)<0&&t.push(m.attribution)}}t=t.filter(c=>String(c).trim()),t.sort((c,d)=>c.length-d.length),t=t.filter((c,d)=>{for(let m=d+1;m=0)return!1;return!0});const a=t.join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))}_updateCompactMinimize(){this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")}}class es{constructor(t={}){this.options=t,h.bindAll(["_updateCompact"],this)}getDefaultPosition(){return"bottom-left"}onAdd(t){this._map=t,this._compact=this.options&&this.options.compact,this._container=te.create("div","maplibregl-ctrl");const n=te.create("a","maplibregl-ctrl-logo");return n.target="_blank",n.rel="noopener nofollow",n.href="https://maplibre.org/",n.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),n.setAttribute("rel","noopener nofollow"),this._container.appendChild(n),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){te.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}_updateCompact(){const t=this._container.children;if(t.length){const n=t[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&n.classList.add("maplibregl-compact"):n.classList.remove("maplibregl-compact")}}}class Ba{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){const n=++this._id;return this._queue.push({callback:t,id:n,cancelled:!1}),n}remove(t){const n=this._currentlyRunning,a=n?this._queue.concat(n):this._queue;for(const c of a)if(c.id===t)return void(c.cancelled=!0)}run(t=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const n=this._currentlyRunning=this._queue;this._queue=[];for(const a of n)if(!a.cancelled&&(a.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const Ra={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"};var vi=h.createLayout([{name:"a_pos3d",type:"Int16",components:3}]);class $o extends h.Evented{constructor(t){super(),this.sourceCache=t,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,t.usedForTerrain=!0,t.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(t,n){this.sourceCache.update(t,n),this._renderableTilesKeys=[];const a={};for(const c of t.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:n}))a[c.key]=!0,this._renderableTilesKeys.push(c.key),this._tiles[c.key]||(c.posMatrix=new Float64Array(16),h.ortho(c.posMatrix,0,h.EXTENT,0,h.EXTENT,0,1),this._tiles[c.key]=new Wr(c,this.tileSize));for(const c in this._tiles)a[c]||delete this._tiles[c]}freeRtt(t){for(const n in this._tiles){const a=this._tiles[n];(!t||a.tileID.equals(t)||a.tileID.isChildOf(t)||t.isChildOf(a.tileID))&&(a.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(t=>this.getTileByID(t))}getTileByID(t){return this._tiles[t]}getTerrainCoords(t){const n={};for(const a of this._renderableTilesKeys){const c=this._tiles[a].tileID;if(c.canonical.equals(t.canonical)){const d=t.clone();d.posMatrix=new Float64Array(16),h.ortho(d.posMatrix,0,h.EXTENT,0,h.EXTENT,0,1),n[a]=d}else if(c.canonical.isChildOf(t.canonical)){const d=t.clone();d.posMatrix=new Float64Array(16);const m=c.canonical.z-t.canonical.z,y=c.canonical.x-(c.canonical.x>>m<>m<>m;h.ortho(d.posMatrix,0,x,0,x,0,1),h.translate(d.posMatrix,d.posMatrix,[-y*x,-_*x,0]),n[a]=d}else if(t.canonical.isChildOf(c.canonical)){const d=t.clone();d.posMatrix=new Float64Array(16);const m=t.canonical.z-c.canonical.z,y=t.canonical.x-(t.canonical.x>>m<>m<>m;h.ortho(d.posMatrix,0,h.EXTENT,0,h.EXTENT,0,1),h.translate(d.posMatrix,d.posMatrix,[y*x,_*x,0]),h.scale(d.posMatrix,d.posMatrix,[1/2**m,1/2**m,0]),n[a]=d}}return n}getSourceTile(t,n){const a=this.sourceCache._source;let c=t.overscaledZ-this.deltaZoom;if(c>a.maxzoom&&(c=a.maxzoom),c=a.minzoom&&(!d||!d.dem);)d=this.sourceCache.getTileByID(t.scaledTo(c--).key);return d}tilesAfterTime(t=Date.now()){return Object.values(this._tiles).filter(n=>n.timeAdded>=t)}}class or{constructor(t,n,a){this.painter=t,this.sourceCache=new $o(n),this.options=a,this.exaggeration=typeof a.exaggeration=="number"?a.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(t,n,a,c=h.EXTENT){if(!(n>=0&&n=0&&at.canonical.z&&(t.canonical.z>=c?d=t.canonical.z-c:h.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const m=t.canonical.x-(t.canonical.x>>d<>d<>8<<4|d>>8,n[m+3]=0;const a=new h.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(n.buffer)),c=new ct(t,a,t.gl.RGBA,{premultiply:!1});return c.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._coordsTexture=c,c}pointCoordinate(t){const n=new Uint8Array(4),a=this.painter.context,c=a.gl;a.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),c.readPixels(t.x,this.painter.height/devicePixelRatio-t.y-1,1,1,c.RGBA,c.UNSIGNED_BYTE,n),a.bindFramebuffer.set(null);const d=n[0]+(n[2]>>4<<8),m=n[1]+((15&n[2])<<8),y=this.coordsIndex[255-n[3]],_=y&&this.sourceCache.getTileByID(y);if(!_)return null;const x=this._coordsTextureSize,T=(1<<_.tileID.canonical.z)*x;return new h.MercatorCoordinate((_.tileID.canonical.x*x+d)/T,(_.tileID.canonical.y*x+m)/T,this.getElevation(_.tileID,d,m,x))}getTerrainMesh(){if(this._mesh)return this._mesh;const t=this.painter.context,n=new h.Pos3dArray,a=new h.TriangleIndexArray,c=this.meshSize,d=h.EXTENT/c,m=c*c;for(let w=0;w<=c;w++)for(let M=0;M<=c;M++)n.emplaceBack(M*d,w*d,0);for(let w=0;wt.id!==n),this._recentlyUsed.push(t.id)}stampObject(t){t.stamp=++this._stamp}getOrCreateFreeObject(){for(const n of this._recentlyUsed)if(!this._objects[n].inUse)return this._objects[n];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const t=this._createObject(this._objects.length);return this._objects.push(t),t}freeObject(t){t.inUse=!1}freeAllObjects(){for(const t of this._objects)this.freeObject(t)}isFull(){return!(this._objects.length!t.inUse)===!1}}const wr={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class St{constructor(t,n){this.painter=t,this.terrain=n,this.pool=new Ml(t.context,30,n.sourceCache.tileSize*n.qualityFactor)}destruct(){this.pool.destruct()}getTexture(t){return this.pool.getObjectForId(t.rtt[this._stacks.length-1].id).texture}prepareForRender(t,n){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=t._order.filter(a=>!t._layers[a].isHidden(n)),this._coordsDescendingInv={};for(const a in t.sourceCaches){this._coordsDescendingInv[a]={};const c=t.sourceCaches[a].getVisibleCoordinates();for(const d of c){const m=this.terrain.sourceCache.getTerrainCoords(d);for(const y in m)this._coordsDescendingInv[a][y]||(this._coordsDescendingInv[a][y]=[]),this._coordsDescendingInv[a][y].push(m[y])}}this._coordsDescendingInvStr={};for(const a of t._order){const c=t._layers[a],d=c.source;if(wr[c.type]&&!this._coordsDescendingInvStr[d]){this._coordsDescendingInvStr[d]={};for(const m in this._coordsDescendingInv[d])this._coordsDescendingInvStr[d][m]=this._coordsDescendingInv[d][m].map(y=>y.key).sort().join()}}for(const a of this._renderableTiles)for(const c in this._coordsDescendingInvStr){const d=this._coordsDescendingInvStr[c][a.tileID.key];d&&d!==a.rttCoords[c]&&(a.rtt=[])}}renderLayer(t){if(t.isHidden(this.painter.transform.zoom))return!1;const n=t.type,a=this.painter,c=this._renderableLayerIds[this._renderableLayerIds.length-1]===t.id;if(wr[n]&&(this._prevType&&wr[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(t.id),!c))return!0;if(wr[this._prevType]||wr[n]&&c){this._prevType=n;const d=this._stacks.length-1,m=this._stacks[d]||[];for(const y of this._renderableTiles){if(this.pool.isFull()&&(Ia(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(y),y.rtt[d]){const x=this.pool.getObjectForId(y.rtt[d].id);if(x.stamp===y.rtt[d].stamp){this.pool.useObject(x);continue}}const _=this.pool.getOrCreateFreeObject();this.pool.useObject(_),this.pool.stampObject(_),y.rtt[d]={id:_.id,stamp:_.stamp},a.context.bindFramebuffer.set(_.fbo.framebuffer),a.context.clear({color:h.Color.transparent,stencil:0}),a.currentStencilSource=void 0;for(let x=0;x{o.touchstart=o.dragStart,o.touchmoveWindow=o.dragMove,o.touchend=o.dragEnd},Os={showCompass:!0,showZoom:!0,visualizePitch:!1};class Fa{constructor(t,n,a=!1){this._clickTolerance=10;const c=t.dragRotate._mouseRotate.getClickTolerance(),d=t.dragRotate._mousePitch.getClickTolerance();this.element=n,this.mouseRotate=Bo({clickTolerance:c,enable:!0}),this.touchRotate=(({enable:m,clickTolerance:y,bearingDegreesPerPixelMoved:_=.8})=>{const x=new Ps;return new br({clickTolerance:y,move:(T,w)=>({bearingDelta:(w.x-T.x)*_}),moveStateManager:x,enable:m,assignEvents:Cn})})({clickTolerance:c,enable:!0}),this.map=t,a&&(this.mousePitch=zs({clickTolerance:d,enable:!0}),this.touchPitch=(({enable:m,clickTolerance:y,pitchDegreesPerPixelMoved:_=-.5})=>{const x=new Ps;return new br({clickTolerance:y,move:(T,w)=>({pitchDelta:(w.y-T.y)*_}),moveStateManager:x,enable:m,assignEvents:Cn})})({clickTolerance:d,enable:!0})),h.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),te.addEventListener(n,"mousedown",this.mousedown),te.addEventListener(n,"touchstart",this.touchstart,{passive:!1}),te.addEventListener(n,"touchcancel",this.reset)}startMouse(t,n){this.mouseRotate.dragStart(t,n),this.mousePitch&&this.mousePitch.dragStart(t,n),te.disableDrag()}startTouch(t,n){this.touchRotate.dragStart(t,n),this.touchPitch&&this.touchPitch.dragStart(t,n),te.disableDrag()}moveMouse(t,n){const a=this.map,{bearingDelta:c}=this.mouseRotate.dragMove(t,n)||{};if(c&&a.setBearing(a.getBearing()+c),this.mousePitch){const{pitchDelta:d}=this.mousePitch.dragMove(t,n)||{};d&&a.setPitch(a.getPitch()+d)}}moveTouch(t,n){const a=this.map,{bearingDelta:c}=this.touchRotate.dragMove(t,n)||{};if(c&&a.setBearing(a.getBearing()+c),this.touchPitch){const{pitchDelta:d}=this.touchPitch.dragMove(t,n)||{};d&&a.setPitch(a.getPitch()+d)}}off(){const t=this.element;te.removeEventListener(t,"mousedown",this.mousedown),te.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),te.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),te.removeEventListener(window,"touchend",this.touchend),te.removeEventListener(t,"touchcancel",this.reset),this.offTemp()}offTemp(){te.enableDrag(),te.removeEventListener(window,"mousemove",this.mousemove),te.removeEventListener(window,"mouseup",this.mouseup),te.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),te.removeEventListener(window,"touchend",this.touchend)}mousedown(t){this.startMouse(h.extend({},t,{ctrlKey:!0,preventDefault:()=>t.preventDefault()}),te.mousePos(this.element,t)),te.addEventListener(window,"mousemove",this.mousemove),te.addEventListener(window,"mouseup",this.mouseup)}mousemove(t){this.moveMouse(t,te.mousePos(this.element,t))}mouseup(t){this.mouseRotate.dragEnd(t),this.mousePitch&&this.mousePitch.dragEnd(t),this.offTemp()}touchstart(t){t.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=te.touchPos(this.element,t.targetTouches)[0],this.startTouch(t,this._startPos),te.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),te.addEventListener(window,"touchend",this.touchend))}touchmove(t){t.targetTouches.length!==1?this.reset():(this._lastPos=te.touchPos(this.element,t.targetTouches)[0],this.moveTouch(t,this._lastPos))}touchend(t){t.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)180;){const a=n.locationPoint(o);if(a.x>=0&&a.y>=0&&a.x<=n.width&&a.y<=n.height)break;o.lng>n.center.lng?o.lng-=360:o.lng+=360}return o}const tn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Vs(o,t,n){const a=o.classList;for(const c in tn)a.remove(`maplibregl-${n}-anchor-${c}`);a.add(`maplibregl-${n}-anchor-${t}`)}class ts extends h.Evented{constructor(t,n){if(super(),(t instanceof HTMLElement||n)&&(t=h.extend({element:t},n)),h.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&t.pitchAlignment!=="auto"?t.pitchAlignment:this._rotationAlignment,t&&t.element)this._element=t.element,this._offset=h.Point.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=te.create("div"),this._element.setAttribute("aria-label","Map marker");const a=te.createNS("http://www.w3.org/2000/svg","svg"),c=41,d=27;a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height",`${c}px`),a.setAttributeNS(null,"width",`${d}px`),a.setAttributeNS(null,"viewBox",`0 0 ${d} ${c}`);const m=te.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"stroke","none"),m.setAttributeNS(null,"stroke-width","1"),m.setAttributeNS(null,"fill","none"),m.setAttributeNS(null,"fill-rule","evenodd");const y=te.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"fill-rule","nonzero");const _=te.createNS("http://www.w3.org/2000/svg","g");_.setAttributeNS(null,"transform","translate(3.0, 29.0)"),_.setAttributeNS(null,"fill","#000000");const x=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const J of x){const O=te.createNS("http://www.w3.org/2000/svg","ellipse");O.setAttributeNS(null,"opacity","0.04"),O.setAttributeNS(null,"cx","10.5"),O.setAttributeNS(null,"cy","5.80029008"),O.setAttributeNS(null,"rx",J.rx),O.setAttributeNS(null,"ry",J.ry),_.appendChild(O)}const T=te.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"fill",this._color);const w=te.createNS("http://www.w3.org/2000/svg","path");w.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),T.appendChild(w);const M=te.createNS("http://www.w3.org/2000/svg","g");M.setAttributeNS(null,"opacity","0.25"),M.setAttributeNS(null,"fill","#000000");const B=te.createNS("http://www.w3.org/2000/svg","path");B.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),M.appendChild(B);const k=te.createNS("http://www.w3.org/2000/svg","g");k.setAttributeNS(null,"transform","translate(6.0, 7.0)"),k.setAttributeNS(null,"fill","#FFFFFF");const D=te.createNS("http://www.w3.org/2000/svg","g");D.setAttributeNS(null,"transform","translate(8.0, 8.0)");const U=te.createNS("http://www.w3.org/2000/svg","circle");U.setAttributeNS(null,"fill","#000000"),U.setAttributeNS(null,"opacity","0.25"),U.setAttributeNS(null,"cx","5.5"),U.setAttributeNS(null,"cy","5.5"),U.setAttributeNS(null,"r","5.4999962");const Z=te.createNS("http://www.w3.org/2000/svg","circle");Z.setAttributeNS(null,"fill","#FFFFFF"),Z.setAttributeNS(null,"cx","5.5"),Z.setAttributeNS(null,"cy","5.5"),Z.setAttributeNS(null,"r","5.4999962"),D.appendChild(U),D.appendChild(Z),y.appendChild(_),y.appendChild(T),y.appendChild(M),y.appendChild(k),y.appendChild(D),a.appendChild(y),a.setAttributeNS(null,"height",c*this._scale+"px"),a.setAttributeNS(null,"width",d*this._scale+"px"),this._element.appendChild(a),this._offset=h.Point.convert(t&&t.offset||[0,-14])}this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",a=>{a.preventDefault()}),this._element.addEventListener("mousedown",a=>{a.preventDefault()}),Vs(this._element,this._anchor,"marker"),this._popup=null}addTo(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),te.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=h.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){const c=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[c,-1*(38.1-13.5+c)],"bottom-right":[-c,-1*(38.1-13.5+c)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}_onKeyPress(t){const n=t.code,a=t.charCode||t.keyCode;n!=="Space"&&n!=="Enter"&&a!==32&&a!==13||this.togglePopup()}_onMapClick(t){const n=t.originalEvent.target,a=this._element;this._popup&&(n===a||a.contains(n))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this}_update(t){if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=Us(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let n="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?n=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(n=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let a="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?a="rotateX(0deg)":this._pitchAlignment==="map"&&(a=`rotateX(${this._map.getPitch()}deg)`),t&&t.type!=="moveend"||(this._pos=this._pos.round()),te.setTransform(this._element,`${tn[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${a} ${n}`),this._map.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const c=this._map.unproject(this._pos),d=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=c.distanceTo(this._lngLat)>20*d?"0.2":"1.0",this._opacityTimeout=null},100))}getOffset(){return this._offset}setOffset(t){return this._offset=h.Point.convert(t),this._update(),this}_onMove(t){if(!this._isDragging){const n=this._clickTolerance||this._map._clickTolerance;this._isDragging=t.point.dist(this._pointerdownPos)>=n}this._isDragging&&(this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new h.Event("dragstart"))),this.fire(new h.Event("drag")))}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new h.Event("dragend")),this._state="inactive"}_addDragHandler(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))}setDraggable(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(t){return this._rotation=t||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t&&t!=="auto"?t:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const Oa={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Mn=0,rn=!1;const Ua={maxWidth:100,unit:"metric"};function Ns(o,t,n){const a=n&&n.maxWidth||100,c=o._container.clientHeight/2,d=o.unproject([0,c]),m=o.unproject([a,c]),y=d.distanceTo(m);if(n&&n.unit==="imperial"){const _=3.2808*y;_>5280?nn(t,a,_/5280,o._getUIString("ScaleControl.Miles")):nn(t,a,_,o._getUIString("ScaleControl.Feet"))}else n&&n.unit==="nautical"?nn(t,a,y/1852,o._getUIString("ScaleControl.NauticalMiles")):y>=1e3?nn(t,a,y/1e3,o._getUIString("ScaleControl.Kilometers")):nn(t,a,y,o._getUIString("ScaleControl.Meters"))}function nn(o,t,n,a){const c=function(d){const m=Math.pow(10,`${Math.floor(d)}`.length-1);let y=d/m;return y=y>=10?10:y>=5?5:y>=3?3:y>=2?2:y>=1?1:function(_){const x=Math.pow(10,Math.ceil(-Math.log(_)/Math.LN10));return Math.round(_*x)/x}(y),m*y}(n);o.style.width=t*(c/n)+"px",o.innerHTML=`${c} ${a}`}const $s={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Va=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function qs(o){if(o){if(typeof o=="number"){const t=Math.round(Math.sqrt(.5*Math.pow(o,2)));return{center:new h.Point(0,0),top:new h.Point(0,o),"top-left":new h.Point(t,t),"top-right":new h.Point(-t,t),bottom:new h.Point(0,-o),"bottom-left":new h.Point(t,-t),"bottom-right":new h.Point(-t,-t),left:new h.Point(o,0),right:new h.Point(-o,0)}}if(o instanceof h.Point||Array.isArray(o)){const t=h.Point.convert(o);return{center:t,top:t,"top-left":t,"top-right":t,bottom:t,"bottom-left":t,"bottom-right":t,left:t,right:t}}return{center:h.Point.convert(o.center||[0,0]),top:h.Point.convert(o.top||[0,0]),"top-left":h.Point.convert(o["top-left"]||[0,0]),"top-right":h.Point.convert(o["top-right"]||[0,0]),bottom:h.Point.convert(o.bottom||[0,0]),"bottom-left":h.Point.convert(o["bottom-left"]||[0,0]),"bottom-right":h.Point.convert(o["bottom-right"]||[0,0]),left:h.Point.convert(o.left||[0,0]),right:h.Point.convert(o.right||[0,0])}}return qs(new h.Point(0,0))}const js=vt,Zs={setRTLTextPlugin:h.setRTLTextPlugin,getRTLTextPluginStatus:h.getRTLTextPluginStatus,Map:class extends Me{constructor(o){var t;if(h.PerformanceUtils.mark(h.PerformanceMarkers.create),(o=h.extend({},qo,o)).minZoom!=null&&o.maxZoom!=null&&o.minZoom>o.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(o.minPitch!=null&&o.maxPitch!=null&&o.minPitch>o.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(o.minPitch!=null&&o.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(o.maxPitch!=null&&o.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Cs(o.minZoom,o.maxZoom,o.minPitch,o.maxPitch,o.renderWorldCopies),{bearingSnap:o.bearingSnap}),this._interactive=o.interactive,this._cooperativeGestures=o.cooperativeGestures,this._metaKey=navigator.platform.indexOf("Mac")===0?"metaKey":"ctrlKey",this._maxTileCacheSize=o.maxTileCacheSize,this._maxTileCacheZoomLevels=o.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=o.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=o.preserveDrawingBuffer,this._antialias=o.antialias,this._trackResize=o.trackResize,this._bearingSnap=o.bearingSnap,this._refreshExpiredTiles=o.refreshExpiredTiles,this._fadeDuration=o.fadeDuration,this._crossSourceCollisions=o.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=o.collectResourceTiming,this._renderTaskQueue=new Ba,this._controls=[],this._mapId=h.uniqueId(),this._locale=h.extend({},Ra,o.locale),this._clickTolerance=o.clickTolerance,this._pixelRatio=(t=o.pixelRatio)!==null&&t!==void 0?t:devicePixelRatio,this.transformCameraUpdate=o.transformCameraUpdate,this._imageQueueHandle=mi.addThrottleControl(()=>this.isMoving()),this._requestManager=new _t(o.transformRequest),typeof o.container=="string"){if(this._container=document.getElementById(o.container),!this._container)throw new Error(`Container '${o.container}' not found.`)}else{if(!(o.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=o.container}if(o.maxBounds&&this.setMaxBounds(o.maxBounds),h.bindAll(["_onWindowOnline","_onMapScroll","_cooperativeGesturesOnWheel","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let n=!1;this._resizeObserver=new ResizeObserver(a=>{n?this._trackResize&&this.resize(a)._update():n=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ar(this,o),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=o.hash&&new Po(typeof o.hash=="string"&&o.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:o.center,zoom:o.zoom,bearing:o.bearing,pitch:o.pitch}),o.bounds&&(this.resize(),this.fitBounds(o.bounds,h.extend({},o.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=o.localIdeographFontFamily,this._validateStyle=o.validateStyle,o.style&&this.setStyle(o.style,{localIdeographFontFamily:o.localIdeographFontFamily}),o.attributionControl&&this.addControl(new Le({customAttribution:o.customAttribution})),o.maplibreLogo&&this.addControl(new es,o.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",n=>{this._update(n.dataType==="style"),this.fire(new h.Event(`${n.dataType}data`,n))}),this.on("dataloading",n=>{this.fire(new h.Event(`${n.dataType}dataloading`,n))}),this.on("dataabort",n=>{this.fire(new h.Event("sourcedataabort",n))})}_getMapId(){return this._mapId}addControl(o,t){if(t===void 0&&(t=o.getDefaultPosition?o.getDefaultPosition():"top-right"),!o||!o.onAdd)return this.fire(new h.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const n=o.onAdd(this);this._controls.push(o);const a=this._controlPositions[t];return t.indexOf("bottom")!==-1?a.insertBefore(n,a.firstChild):a.appendChild(n),this}removeControl(o){if(!o||!o.onRemove)return this.fire(new h.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const t=this._controls.indexOf(o);return t>-1&&this._controls.splice(t,1),o.onRemove(this),this}hasControl(o){return this._controls.indexOf(o)>-1}calculateCameraOptionsFromTo(o,t,n,a){return a==null&&this.terrain&&(a=this.transform.getElevation(n,this.terrain)),super.calculateCameraOptionsFromTo(o,t,n,a)}resize(o){var t;const n=this._containerDimensions(),a=n[0],c=n[1];this._resizeCanvas(a,c,this.getPixelRatio()),this.transform.resize(a,c),(t=this._requestedCameraState)===null||t===void 0||t.resize(a,c),this.painter.resize(a,c,this.getPixelRatio());const d=!this._moving;return d&&(this.stop(),this.fire(new h.Event("movestart",o)).fire(new h.Event("move",o))),this.fire(new h.Event("resize",o)),d&&this.fire(new h.Event("moveend",o)),this}getPixelRatio(){return this._pixelRatio}setPixelRatio(o){const[t,n]=this._containerDimensions();this._pixelRatio=o,this._resizeCanvas(t,n,o),this.painter.resize(t,n,o)}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(o){return this.transform.setMaxBounds(Yt.convert(o)),this._update()}setMinZoom(o){if((o=o??-2)>=-2&&o<=this.transform.maxZoom)return this.transform.minZoom=o,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=o,this._update(),this.getZoom()>o&&this.setZoom(o),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(o){if((o=o??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(o>=0&&o<=this.transform.maxPitch)return this.transform.minPitch=o,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(o>=this.transform.minPitch)return this.transform.maxPitch=o,this._update(),this.getPitch()>o&&this.setPitch(o),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(o){return this.transform.renderWorldCopies=o,this._update()}getCooperativeGestures(){return this._cooperativeGestures}setCooperativeGestures(o){return this._cooperativeGestures=o,this._cooperativeGestures?this._setupCooperativeGestures():this._destroyCooperativeGestures(),this}project(o){return this.transform.locationPoint(h.LngLat.convert(o),this.style&&this.terrain)}unproject(o){return this.transform.pointLocation(h.Point.convert(o),this.terrain)}isMoving(){var o;return this._moving||((o=this.handlers)===null||o===void 0?void 0:o.isMoving())}isZooming(){var o;return this._zooming||((o=this.handlers)===null||o===void 0?void 0:o.isZooming())}isRotating(){var o;return this._rotating||((o=this.handlers)===null||o===void 0?void 0:o.isRotating())}_createDelegatedListener(o,t,n){if(o==="mouseenter"||o==="mouseover"){let a=!1;return{layer:t,listener:n,delegates:{mousemove:d=>{const m=this.getLayer(t)?this.queryRenderedFeatures(d.point,{layers:[t]}):[];m.length?a||(a=!0,n.call(this,new Rt(o,this,d.originalEvent,{features:m}))):a=!1},mouseout:()=>{a=!1}}}}if(o==="mouseleave"||o==="mouseout"){let a=!1;return{layer:t,listener:n,delegates:{mousemove:m=>{(this.getLayer(t)?this.queryRenderedFeatures(m.point,{layers:[t]}):[]).length?a=!0:a&&(a=!1,n.call(this,new Rt(o,this,m.originalEvent)))},mouseout:m=>{a&&(a=!1,n.call(this,new Rt(o,this,m.originalEvent)))}}}}{const a=c=>{const d=this.getLayer(t)?this.queryRenderedFeatures(c.point,{layers:[t]}):[];d.length&&(c.features=d,n.call(this,c),delete c.features)};return{layer:t,listener:n,delegates:{[o]:a}}}}on(o,t,n){if(n===void 0)return super.on(o,t);const a=this._createDelegatedListener(o,t,n);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[o]=this._delegatedListeners[o]||[],this._delegatedListeners[o].push(a);for(const c in a.delegates)this.on(c,a.delegates[c]);return this}once(o,t,n){if(n===void 0)return super.once(o,t);const a=this._createDelegatedListener(o,t,n);for(const c in a.delegates)this.once(c,a.delegates[c]);return this}off(o,t,n){return n===void 0?super.off(o,t):(this._delegatedListeners&&this._delegatedListeners[o]&&(a=>{const c=this._delegatedListeners[o];for(let d=0;dthis._updateStyle(o,t));const n=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!o)),o?(this.style=new ei(this,t||{}),this.style.setEventedParent(this,{style:this.style}),typeof o=="string"?this.style.loadURL(o,t,n):this.style.loadJSON(o,t,n),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new ei(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(o,t){if(typeof o=="string"){const n=this._requestManager.transformRequest(o,ot.Style);h.getJSON(n,(a,c)=>{a?this.fire(new h.ErrorEvent(a)):c&&this._updateDiff(c,t)})}else typeof o=="object"&&this._updateDiff(o,t)}_updateDiff(o,t){try{this.style.setState(o,t)&&this._update(!0)}catch(n){h.warnOnce(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(o,t)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():h.warnOnce("There is no style added to the map.")}addSource(o,t){return this._lazyInitEmptyStyle(),this.style.addSource(o,t),this._update(!0)}isSourceLoaded(o){const t=this.style&&this.style.sourceCaches[o];if(t!==void 0)return t.loaded();this.fire(new h.ErrorEvent(new Error(`There is no source with ID '${o}'`)))}setTerrain(o){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),o){const t=this.style.sourceCaches[o.source];if(!t)throw new Error(`cannot load terrain, because there exists no source with ID: ${o.source}`);for(const n in this.style._layers){const a=this.style._layers[n];a.type==="hillshade"&&a.source===o.source&&h.warnOnce("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new or(this.painter,t,o),this.painter.renderToTexture=new St(this.painter,this.terrain),this.transform.updateElevation(this.terrain),this._terrainDataCallback=n=>{n.dataType==="style"?this.terrain.sourceCache.freeRtt():n.dataType==="source"&&n.tile&&(n.sourceId===o.source&&this.transform.updateElevation(this.terrain),this.terrain.sourceCache.freeRtt(n.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.updateElevation(this.terrain);return this.fire(new h.Event("terrain",{terrain:o})),this}getTerrain(){return this.terrain&&this.terrain.options}areTilesLoaded(){const o=this.style&&this.style.sourceCaches;for(const t in o){const n=o[t]._tiles;for(const a in n){const c=n[a];if(c.state!=="loaded"&&c.state!=="errored")return!1}}return!0}addSourceType(o,t,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(o,t,n)}removeSource(o){return this.style.removeSource(o),this._update(!0)}getSource(o){return this.style.getSource(o)}addImage(o,t,{pixelRatio:n=1,sdf:a=!1,stretchX:c,stretchY:d,content:m}={}){if(this._lazyInitEmptyStyle(),t instanceof HTMLImageElement||h.isImageBitmap(t)){const{width:y,height:_,data:x}=h.exported.getImageData(t);this.style.addImage(o,{data:new h.RGBAImage({width:y,height:_},x),pixelRatio:n,stretchX:c,stretchY:d,content:m,sdf:a,version:0})}else{if(t.width===void 0||t.height===void 0)return this.fire(new h.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:y,height:_,data:x}=t,T=t;this.style.addImage(o,{data:new h.RGBAImage({width:y,height:_},new Uint8Array(x)),pixelRatio:n,stretchX:c,stretchY:d,content:m,sdf:a,version:0,userImage:T}),T.onAdd&&T.onAdd(this,o)}}}updateImage(o,t){const n=this.style.getImage(o);if(!n)return this.fire(new h.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const a=t instanceof HTMLImageElement||h.isImageBitmap(t)?h.exported.getImageData(t):t,{width:c,height:d,data:m}=a;if(c===void 0||d===void 0)return this.fire(new h.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(c!==n.data.width||d!==n.data.height)return this.fire(new h.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));const y=!(t instanceof HTMLImageElement||h.isImageBitmap(t));n.data.replace(m,y),this.style.updateImage(o,n)}getImage(o){return this.style.getImage(o)}hasImage(o){return o?!!this.style.getImage(o):(this.fire(new h.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(o){this.style.removeImage(o)}loadImage(o,t){mi.getImage(this._requestManager.transformRequest(o,ot.Image),t)}listImages(){return this.style.listImages()}addLayer(o,t){return this._lazyInitEmptyStyle(),this.style.addLayer(o,t),this._update(!0)}moveLayer(o,t){return this.style.moveLayer(o,t),this._update(!0)}removeLayer(o){return this.style.removeLayer(o),this._update(!0)}getLayer(o){return this.style.getLayer(o)}setLayerZoomRange(o,t,n){return this.style.setLayerZoomRange(o,t,n),this._update(!0)}setFilter(o,t,n={}){return this.style.setFilter(o,t,n),this._update(!0)}getFilter(o){return this.style.getFilter(o)}setPaintProperty(o,t,n,a={}){return this.style.setPaintProperty(o,t,n,a),this._update(!0)}getPaintProperty(o,t){return this.style.getPaintProperty(o,t)}setLayoutProperty(o,t,n,a={}){return this.style.setLayoutProperty(o,t,n,a),this._update(!0)}getLayoutProperty(o,t){return this.style.getLayoutProperty(o,t)}setGlyphs(o,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(o,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(o,t,n={}){return this._lazyInitEmptyStyle(),this.style.addSprite(o,t,n,a=>{a||this._update(!0)}),this}removeSprite(o){return this._lazyInitEmptyStyle(),this.style.removeSprite(o),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(o,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(o,t,n=>{n||this._update(!0)}),this}setLight(o,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(o,t),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(o,t){return this.style.setFeatureState(o,t),this._update()}removeFeatureState(o,t){return this.style.removeFeatureState(o,t),this._update()}getFeatureState(o){return this.style.getFeatureState(o)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let o=0,t=0;return this._container&&(o=this._container.clientWidth||400,t=this._container.clientHeight||300),[o,t]}_setupContainer(){const o=this._container;o.classList.add("maplibregl-map");const t=this._canvasContainer=te.create("div","maplibregl-canvas-container",o);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=te.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const n=this._containerDimensions();this._resizeCanvas(n[0],n[1],this.getPixelRatio());const a=this._controlContainer=te.create("div","maplibregl-control-container",o),c=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(d=>{c[d]=te.create("div",`maplibregl-ctrl-${d} `,a)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_cooperativeGesturesOnWheel(o){this._onCooperativeGesture(o,o[this._metaKey],1)}_setupCooperativeGestures(){this._cooperativeGesturesScreen=te.create("div","maplibregl-cooperative-gesture-screen",this._container);let o=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(o=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use ⌘ + scroll to zoom the map"),this._cooperativeGesturesScreen.innerHTML=` -
${o}
-
${typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}
- `,this._canvasContainer.addEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.add("maplibregl-cooperative-gestures")}_destroyCooperativeGestures(){te.remove(this._cooperativeGesturesScreen),this._canvasContainer.removeEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.remove("maplibregl-cooperative-gestures")}_resizeCanvas(o,t,n){this._canvas.width=n*o,this._canvas.height=n*t,this._canvas.style.width=`${o}px`,this._canvas.style.height=`${t}px`}_setupPainter(){const o={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let t=null;this._canvas.addEventListener("webglcontextcreationerror",a=>{t={requestedAttributes:o},a&&(t.statusMessage=a.statusMessage,t.type=a.type)},{once:!0});const n=this._canvas.getContext("webgl2",o)||this._canvas.getContext("webgl",o);if(!n){const a="Failed to initialize WebGL";throw t?(t.message=a,new Error(JSON.stringify(t))):new Error(a)}this.painter=new Mo(n,this.transform),Kt.testSupport(n)}_contextLost(o){o.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new h.Event("webglcontextlost",{originalEvent:o}))}_contextRestored(o){this._setupPainter(),this.resize(),this._update(),this.fire(new h.Event("webglcontextrestored",{originalEvent:o}))}_onMapScroll(o){if(o.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}_onCooperativeGesture(o,t,n){return!t&&n<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout(()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")},100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(o){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||o,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(o){return this._update(),this._renderTaskQueue.add(o)}_cancelRenderFrame(o){this._renderTaskQueue.remove(o)}_render(o){const t=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(o),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const c=this.transform.zoom,d=h.exported.now();this.style.zoomHistory.update(c,d);const m=new h.EvaluationParameters(c,{now:d,fadeDuration:t,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),y=m.crossFadingFactor();y===1&&y===this._crossFadingFactor||(n=!0,this._crossFadingFactor=y),this.style.update(m)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain&&this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.updateElevation(this.terrain),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,t,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:t,showPadding:this.showPadding}),this.fire(new h.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,h.PerformanceUtils.mark(h.PerformanceMarkers.load),this.fire(new h.Event("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const a=this._sourcesDirty||this._styleDirty||this._placementDirty;return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new h.Event("idle")),!this._loaded||this._fullyLoaded||a||(this._fullyLoaded=!0,h.PerformanceUtils.mark(h.PerformanceMarkers.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){var o;this._hash&&this._hash.remove();for(const n of this._controls)n.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),mi.removeThrottleControl(this._imageQueueHandle),(o=this._resizeObserver)===null||o===void 0||o.disconnect();const t=this.painter.context.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),te.remove(this._canvasContainer),te.remove(this._controlContainer),this._cooperativeGestures&&this._destroyCooperativeGestures(),this._container.classList.remove("maplibregl-map"),h.PerformanceUtils.clearMetrics(),this._removed=!0,this.fire(new h.Event("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=h.exported.frame(o=>{h.PerformanceUtils.frame(o),this._frame=null,this._render(o)}))}_onWindowOnline(){this._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(o){this._showTileBoundaries!==o&&(this._showTileBoundaries=o,this._update())}get showPadding(){return!!this._showPadding}set showPadding(o){this._showPadding!==o&&(this._showPadding=o,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(o){this._showCollisionBoxes!==o&&(this._showCollisionBoxes=o,o?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(o){this._showOverdrawInspector!==o&&(this._showOverdrawInspector=o,this._update())}get repaint(){return!!this._repaint}set repaint(o){this._repaint!==o&&(this._repaint=o,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(o){this._vertices=o,this._update()}get version(){return Ft}getCameraTargetElevation(){return this.transform.elevation}},NavigationControl:class{constructor(o){this.options=h.extend({},Os,o),this._container=te.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(h.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",t=>this._map.zoomIn({},{originalEvent:t})),te.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",t=>this._map.zoomOut({},{originalEvent:t})),te.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(h.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("maplibregl-ctrl-compass",t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})}),this._compassIcon=te.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const o=this._map.getZoom(),t=o===this._map.getMaxZoom(),n=o===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())}_rotateCompassArrow(){const o=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=o}onAdd(o){return this._map=o,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Fa(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){te.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(o,t){const n=te.create("button",o,this._container);return n.type="button",n.addEventListener("click",t),n}_setButtonTitle(o,t){const n=this._map._getUIString(`NavigationControl.${t}`);o.title=n,o.setAttribute("aria-label",n)}},GeolocateControl:class extends h.Evented{constructor(o){super(),this.options=h.extend({},Oa,o),h.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}onAdd(o){return this._map=o,this._container=te.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(t,n=!1){lr===void 0||n?window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(a=>{lr=a.state!=="denied",t(lr)}).catch(()=>{lr=!!window.navigator.geolocation,t(lr)}):(lr=!!window.navigator.geolocation,t(lr)):t(lr)}(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),te.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Mn=0,rn=!1}_isOutOfMapMaxBounds(o){const t=this._map.getMaxBounds(),n=o.coords;return t&&(n.longitudet.getEast()||n.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_onSuccess(o){if(this._map){if(this._isOutOfMapMaxBounds(o))return this._setErrorState(),this.fire(new h.Event("outofmaxbounds",o)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=o,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(o),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(o),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new h.Event("geolocate",o)),this._finish()}}_updateCamera(o){const t=new h.LngLat(o.coords.longitude,o.coords.latitude),n=o.coords.accuracy,a=this._map.getBearing(),c=h.extend({bearing:a},this.options.fitBoundsOptions),d=Yt.fromLngLat(t,n);this._map.fitBounds(d,c,{geolocateSource:!0})}_updateMarker(o){if(o){const t=new h.LngLat(o.coords.longitude,o.coords.latitude);this._accuracyCircleMarker.setLngLat(t).addTo(this._map),this._userLocationDotMarker.setLngLat(t).addTo(this._map),this._accuracy=o.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const o=this._map.getBounds(),t=o.getSouthEast(),n=o.getNorthEast(),a=t.distanceTo(n),c=Math.ceil(this._accuracy/(a/this._map._container.clientHeight)*2);this._circleElement.style.width=`${c}px`,this._circleElement.style.height=`${c}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_onError(o){if(this._map){if(this.options.trackUserLocation)if(o.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(o.code===3&&rn)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new h.Event("error",o)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(o){if(this._map){if(this._container.addEventListener("contextmenu",t=>t.preventDefault()),this._geolocateButton=te.create("button","maplibregl-ctrl-geolocate",this._container),te.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",o===!1){h.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}else{const t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=te.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new ts(this._dotElement),this._circleElement=te.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ts({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",t=>{t.geolocateSource||this._watchState!=="ACTIVE_LOCK"||t.originalEvent&&t.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new h.Event("trackuserlocationend")))})}}trigger(){if(!this._setup)return h.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new h.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Mn--,rn=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new h.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new h.Event("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let o;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Mn++,Mn>1?(o={maximumAge:6e5,timeout:0},rn=!0):(o=this.options.positionOptions,rn=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,o)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Le,LogoControl:es,ScaleControl:class{constructor(o){this.options=h.extend({},Ua,o),h.bindAll(["_onMove","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_onMove(){Ns(this._map,this._container,this.options)}onAdd(o){return this._map=o,this._container=te.create("div","maplibregl-ctrl maplibregl-ctrl-scale",o.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){te.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}setUnit(o){this.options.unit=o,Ns(this._map,this._container,this.options)}},FullscreenControl:class extends h.Evented{constructor(o={}){super(),this._onFullscreenChange=()=>{(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,o&&o.container&&(o.container instanceof HTMLElement?this._container=o.container:h.warnOnce("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(o){return this._map=o,this._container||(this._container=this._map.getContainer()),this._controlContainer=te.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){te.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const o=this._fullscreenButton=te.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);te.create("span","maplibregl-ctrl-icon",o).setAttribute("aria-hidden","true"),o.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const o=this._getTitle();this._fullscreenButton.setAttribute("aria-label",o),this._fullscreenButton.title=o}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new h.Event("fullscreenstart")),this._map._cooperativeGestures&&(this._prevCooperativeGestures=this._map._cooperativeGestures,this._map.setCooperativeGestures())):(this.fire(new h.Event("fullscreenend")),this._prevCooperativeGestures&&(this._map.setCooperativeGestures(this._prevCooperativeGestures),delete this._prevCooperativeGestures))}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},TerrainControl:class{constructor(o){this.options=o,h.bindAll(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(o){return this._map=o,this._container=te.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=te.create("button","maplibregl-ctrl-terrain",this._container),te.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){te.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()}_updateTerrainIcon(){this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))}},Popup:class extends h.Evented{constructor(o){super(),this.options=h.extend(Object.create($s),o),h.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}addTo(o){return this._map&&this.remove(),this._map=o,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new h.Event("open")),this}isOpen(){return!!this._map}remove(){return this._content&&te.remove(this._content),this._container&&(te.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new h.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(o){return this._lngLat=h.LngLat.convert(o),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(o){return this.setDOMContent(document.createTextNode(o))}setHTML(o){const t=document.createDocumentFragment(),n=document.createElement("body");let a;for(n.innerHTML=o;a=n.firstChild,a;)t.appendChild(a);return this.setDOMContent(t)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(o){return this.options.maxWidth=o,this._update(),this}setDOMContent(o){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=te.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(o),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(o){this._container&&this._container.classList.add(o)}removeClassName(o){this._container&&this._container.classList.remove(o)}setOffset(o){return this.options.offset=o,this._update(),this}toggleClassName(o){if(this._container)return this._container.classList.toggle(o)}_createCloseButton(){this.options.closeButton&&(this._closeButton=te.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_onMouseUp(o){this._update(o.point)}_onMouseMove(o){this._update(o.point)}_onDrag(o){this._update(o.point)}_update(o){if(!this._map||!this._lngLat&&!this._trackPointer||!this._content||(this._container||(this._container=te.create("div","maplibregl-popup",this._map.getContainer()),this._tip=te.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(d=>this._container.classList.add(d)),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Us(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!o))return;const t=this._pos=this._trackPointer&&o?o:this._map.project(this._lngLat);let n=this.options.anchor;const a=qs(this.options.offset);if(!n){const d=this._container.offsetWidth,m=this._container.offsetHeight;let y;y=t.y+a.bottom.ythis._map.transform.height-m?["bottom"]:[],t.xthis._map.transform.width-d/2&&y.push("right"),n=y.length===0?"bottom":y.join("-")}const c=t.add(a[n]).round();te.setTransform(this._container,`${tn[n]} translate(${c.x}px,${c.y}px)`),Vs(this._container,n,"popup")}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const o=this._container.querySelector(Va);o&&o.focus()}_onClose(){this.remove()}},Marker:ts,Style:ei,LngLat:h.LngLat,LngLatBounds:Yt,Point:h.Point,MercatorCoordinate:h.MercatorCoordinate,Evented:h.Evented,AJAXError:h.AJAXError,config:h.config,CanvasSource:ie,GeoJSONSource:mr,ImageSource:Fi,RasterDEMTileSource:Dr,RasterTileSource:Xr,VectorTileSource:dn,VideoSource:fn,prewarm:function(){gn().acquire(Kr)},clearPrewarmedResources:function(){const o=ii;o&&(o.isPreloaded()&&o.numActive()===1?(o.release(Kr),ii=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get version(){return js},get workerCount(){return de.workerCount},set workerCount(o){de.workerCount=o},get maxParallelImageRequests(){return h.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(o){h.config.MAX_PARALLEL_IMAGE_REQUESTS=o},get workerUrl(){return h.config.WORKER_URL},set workerUrl(o){h.config.WORKER_URL=o},addProtocol(o,t){h.config.REGISTERED_PROTOCOLS[o]=t},removeProtocol(o){delete h.config.REGISTERED_PROTOCOLS[o]}};return Fs.extend(Zs,{isSafari:h.isSafari,getPerformanceMetrics:h.PerformanceUtils.getPerformanceMetrics}),Zs});var Qi=ht;return Qi})})(eu);var qp=eu.exports;const iu=$p(qp);function jp(Je,Ke,Xe){Xe===void 0&&(Xe={});var Ye={type:"Feature"};return(Xe.id===0||Xe.id)&&(Ye.id=Xe.id),Xe.bbox&&(Ye.bbox=Xe.bbox),Ye.properties=Ke||{},Ye.geometry=Je,Ye}function pl(Je,Ke,Xe){if(Xe===void 0&&(Xe={}),!Je)throw new Error("coordinates is required");if(!Array.isArray(Je))throw new Error("coordinates must be an Array");if(Je.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Qh(Je[0])||!Qh(Je[1]))throw new Error("coordinates must contain numbers");var Ye={type:"Point",coordinates:Je};return jp(Ye,Ke,Xe)}function Zp(Je,Ke){Ke===void 0&&(Ke={});var Xe={type:"FeatureCollection"};return Ke.id&&(Xe.id=Ke.id),Ke.bbox&&(Xe.bbox=Ke.bbox),Xe.features=Je,Xe}function Qh(Je){return!isNaN(Je)&&Je!==null&&!Array.isArray(Je)}function ru(Je,Ke,Xe){if(Je!==null)for(var Ye,ht,jt,Qi,h,vt,te,Kt=0,Ae=0,Li,er=Je.type,Cr=er==="FeatureCollection",Mr=er==="Feature",pr=Cr?Je.features.length:1,ot=0;otXe[0]&&(Ke[0]=Xe[0]),Ke[1]>Xe[1]&&(Ke[1]=Xe[1]),Ke[2]MIERUNE, under CC BY. Data by OpenStreetMap contributors, under ODbL."}},layers:[{id:"MIERUNEMAP",type:"raster",source:"MIERUNEMAP",minzoom:0,maxzoom:18}]},center:[139.767,35.681],zoom:11});ra.addControl(new iu.NavigationControl({visualizePitch:!0}));ra.on("load",function(){const Je=Zp([pl([139.7594,35.6865]),pl([139.7692,35.6665]),pl([139.7812,35.6849])]);ra.addSource("FeaturesPoint",{type:"geojson",data:Je}),ra.addLayer({id:"FeaturesPoint",type:"circle",source:"FeaturesPoint",layout:{},paint:{"circle-pitch-alignment":"map","circle-stroke-color":"#1253A4","circle-stroke-width":5,"circle-stroke-opacity":.8,"circle-color":"#1253A4","circle-radius":5,"circle-opacity":.5}});const Ke=Gp(Je);ra.addSource("CenterPoint",{type:"geojson",data:Ke}),ra.addLayer({id:"CenterPoint",type:"circle",source:"CenterPoint",layout:{},paint:{"circle-pitch-alignment":"map","circle-stroke-color":"#8DCF3F","circle-stroke-width":10,"circle-stroke-opacity":.8,"circle-color":"#8DCF3F","circle-radius":10,"circle-opacity":.5}})}); diff --git a/docs/assets/index-ee1dc6cf.js b/docs/assets/index-ee1dc6cf.js new file mode 100644 index 0000000..d777d15 --- /dev/null +++ b/docs/assets/index-ee1dc6cf.js @@ -0,0 +1,580 @@ +(function(){const Ye=document.createElement("link").relList;if(Ye&&Ye.supports&&Ye.supports("modulepreload"))return;for(const ct of document.querySelectorAll('link[rel="modulepreload"]'))Je(ct);new MutationObserver(ct=>{for(const Ht of ct)if(Ht.type==="childList")for(const rr of Ht.addedNodes)rr.tagName==="LINK"&&rr.rel==="modulepreload"&&Je(rr)}).observe(document,{childList:!0,subtree:!0});function He(ct){const Ht={};return ct.integrity&&(Ht.integrity=ct.integrity),ct.referrerPolicy&&(Ht.referrerPolicy=ct.referrerPolicy),ct.crossOrigin==="use-credentials"?Ht.credentials="include":ct.crossOrigin==="anonymous"?Ht.credentials="omit":Ht.credentials="same-origin",Ht}function Je(ct){if(ct.ep)return;ct.ep=!0;const Ht=He(ct);fetch(ct.href,Ht)}})();var rd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nd(et){return et&&et.__esModule&&Object.prototype.hasOwnProperty.call(et,"default")?et.default:et}var au={exports:{}};(function(et,Ye){(function(He,Je){et.exports=Je()})(rd,function(){var He,Je,ct;function Ht(c,xt){if(!He)He=xt;else if(!Je)Je=xt;else{var ie="var sharedChunk = {}; ("+He+")(sharedChunk); ("+Je+")(sharedChunk);",Yt={};He(Yt),ct=xt(Yt),typeof window<"u"&&(ct.workerUrl=window.URL.createObjectURL(new Blob([ie],{type:"text/javascript"})))}}Ht(["exports"],function(c){function xt(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ie=Yt;function Yt(i,e){this.x=i,this.y=e}Yt.prototype={clone:function(){return new Yt(this.x,this.y)},add:function(i){return this.clone()._add(i)},sub:function(i){return this.clone()._sub(i)},multByPoint:function(i){return this.clone()._multByPoint(i)},divByPoint:function(i){return this.clone()._divByPoint(i)},mult:function(i){return this.clone()._mult(i)},div:function(i){return this.clone()._div(i)},rotate:function(i){return this.clone()._rotate(i)},rotateAround:function(i,e){return this.clone()._rotateAround(i,e)},matMult:function(i){return this.clone()._matMult(i)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(i){return this.x===i.x&&this.y===i.y},dist:function(i){return Math.sqrt(this.distSqr(i))},distSqr:function(i){var e=i.x-this.x,r=i.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(i){return Math.atan2(this.y-i.y,this.x-i.x)},angleWith:function(i){return this.angleWithSep(i.x,i.y)},angleWithSep:function(i,e){return Math.atan2(this.x*e-this.y*i,this.x*i+this.y*e)},_matMult:function(i){var e=i[2]*this.x+i[3]*this.y;return this.x=i[0]*this.x+i[1]*this.y,this.y=e,this},_add:function(i){return this.x+=i.x,this.y+=i.y,this},_sub:function(i){return this.x-=i.x,this.y-=i.y,this},_mult:function(i){return this.x*=i,this.y*=i,this},_div:function(i){return this.x/=i,this.y/=i,this},_multByPoint:function(i){return this.x*=i.x,this.y*=i.y,this},_divByPoint:function(i){return this.x/=i.x,this.y/=i.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var i=this.y;return this.y=this.x,this.x=-i,this},_rotate:function(i){var e=Math.cos(i),r=Math.sin(i),s=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=s,this},_rotateAround:function(i,e){var r=Math.cos(i),s=Math.sin(i),o=e.y+s*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-s*(this.y-e.y),this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Yt.convert=function(i){return i instanceof Yt?i:Array.isArray(i)?new Yt(i[0],i[1]):i};var Pe=xt(ie),Fi=nr;function nr(i,e,r,s){this.cx=3*i,this.bx=3*(r-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(s-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=e,this.p2x=r,this.p2y=s}nr.prototype={sampleCurveX:function(i){return((this.ax*i+this.bx)*i+this.cx)*i},sampleCurveY:function(i){return((this.ay*i+this.by)*i+this.cy)*i},sampleCurveDerivativeX:function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},solveCurveX:function(i,e){if(e===void 0&&(e=1e-6),i<0)return 0;if(i>1)return 1;for(var r=i,s=0;s<8;s++){var o=this.sampleCurveX(r)-i;if(Math.abs(o)o?d=r:f=r,r=.5*(f-d)+d;return r},solve:function(i,e){return this.sampleCurveY(this.solveCurveX(i,e))}};var Dr=xt(Fi);function Lr(i,e,r,s){const o=new Dr(i,e,r,s);return function(u){return o.solve(u)}}const ui=Lr(.25,.1,.25,1);function at(i,e,r){return Math.min(r,Math.max(e,i))}function Br(i,e,r){const s=r-e,o=((i-e)%s+s)%s+e;return o===e?r:o}function mt(i,...e){for(const r of e)for(const s in r)i[s]=r[s];return i}let Oi=1;function Jt(i,e,r){const s={};for(const o in i)s[o]=e.call(r||this,i[o],o,i);return s}function jn(i,e,r){const s={};for(const o in i)e.call(r||this,i[o],o,i)&&(s[o]=i[o]);return s}function Ui(i){return Array.isArray(i)?i.map(Ui):typeof i=="object"&&i?Jt(i,Ui):i}const sr={};function pi(i){sr[i]||(typeof console<"u"&&console.warn(i),sr[i]=!0)}function ht(i,e,r){return(r.y-i.y)*(e.x-i.x)>(e.y-i.y)*(r.x-i.x)}function Gn(i){let e=0;for(let r,s,o=0,u=i.length,d=u-1;ocancelAnimationFrame(e)}},getImageData(i,e=0){return this.getImageCanvasContext(i).getImageData(-e,-e,i.width+2*e,i.height+2*e)},getImageCanvasContext(i){const e=window.document.createElement("canvas"),r=e.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("failed to create canvas 2d context");return e.width=i.width,e.height=i.height,r.drawImage(i,0,0,i.width,i.height),r},resolveURL:i=>(bn||(bn=document.createElement("a")),bn.href=i,bn.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(Kr==null&&(Kr=matchMedia("(prefers-reduced-motion: reduce)")),Kr.matches)}},Cs={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};class Yr extends Error{constructor(e,r,s,o){super(`AJAXError: ${r} (${e}): ${s}`),this.status=e,this.statusText=r,this.url=s,this.body=o}}const or=Vi()?()=>self.worker&&self.worker.referrer:()=>(window.location.protocol==="blob:"?window.parent:window).location.href,Ni=i=>Cs.REGISTERED_PROTOCOLS[i.substring(0,i.indexOf("://"))];function It(i,e){const r=new AbortController,s=new Request(i.url,{method:i.method||"GET",body:i.body,credentials:i.credentials,headers:i.headers,cache:i.cache,referrer:or(),signal:r.signal});let o=!1,u=!1;return i.type==="json"&&s.headers.set("Accept","application/json"),u||fetch(s).then(d=>d.ok?(f=>{(i.type==="arrayBuffer"||i.type==="image"?f.arrayBuffer():i.type==="json"?f.json():f.text()).then(_=>{u||(o=!0,e(null,_,f.headers.get("Cache-Control"),f.headers.get("Expires")))}).catch(_=>{u||e(new Error(_.message))})})(d):d.blob().then(f=>e(new Yr(d.status,d.statusText,i.url,f)))).catch(d=>{d.code!==20&&e(new Error(d.message))}),{cancel:()=>{u=!0,o||r.abort()}}}const Jr=function(i,e){if(/:\/\//.test(i.url)&&!/^https?:|^file:/.test(i.url)){if(Vi()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",i,e);if(!Vi())return(Ni(i.url)||It)(i,e)}if(!(/^file:/.test(r=i.url)||/^file:/.test(or())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return It(i,e);if(Vi()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",i,e,void 0,!0)}var r;return function(s,o){const u=new XMLHttpRequest;u.open(s.method||"GET",s.url,!0),s.type!=="arrayBuffer"&&s.type!=="image"||(u.responseType="arraybuffer");for(const d in s.headers)u.setRequestHeader(d,s.headers[d]);return s.type==="json"&&(u.responseType="text",u.setRequestHeader("Accept","application/json")),u.withCredentials=s.credentials==="include",u.onerror=()=>{o(new Error(u.statusText))},u.onload=()=>{if((u.status>=200&&u.status<300||u.status===0)&&u.response!==null){let d=u.response;if(s.type==="json")try{d=JSON.parse(u.response)}catch(f){return o(f)}o(null,d,u.getResponseHeader("Cache-Control"),u.getResponseHeader("Expires"))}else{const d=new Blob([u.response],{type:u.getResponseHeader("Content-Type")});o(new Yr(u.status,u.statusText,s.url,d))}},u.send(s.body),{cancel:()=>u.abort()}}(i,e)},Xn=function(i,e){return Jr(mt(i,{type:"arrayBuffer"}),e)};function Qr(i){if(!i||i.indexOf("://")<=0||i.indexOf("data:image/")===0||i.indexOf("blob:")===0)return!0;const e=new URL(i),r=window.location;return e.protocol===r.protocol&&e.host===r.host}function Tn(i,e,r){r[i]&&r[i].indexOf(e)!==-1||(r[i]=r[i]||[],r[i].push(e))}function vr(i,e,r){if(r&&r[i]){const s=r[i].indexOf(e);s!==-1&&r[i].splice(s,1)}}class $i{constructor(e,r={}){mt(this,r),this.type=e}}class lr extends $i{constructor(e,r={}){super("error",mt({error:e},r))}}class Fr{on(e,r){return this._listeners=this._listeners||{},Tn(e,r,this._listeners),this}off(e,r){return vr(e,r,this._listeners),vr(e,r,this._oneTimeListeners),this}once(e,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},Tn(e,r,this._oneTimeListeners),this):new Promise(s=>this.once(e,s))}fire(e,r){typeof e=="string"&&(e=new $i(e,r||{}));const s=e.type;if(this.listens(s)){e.target=this;const o=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const f of o)f.call(this,e);const u=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const f of u)vr(s,f,this._oneTimeListeners),f.call(this,e);const d=this._eventedParent;d&&(mt(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),d.fire(e))}else e instanceof lr&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,r){return this._eventedParent=e,this._eventedParentData=r,this}}var re={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const br=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function En(i,e){const r={};for(const s in i)s!=="ref"&&(r[s]=i[s]);return br.forEach(s=>{s in e&&(r[s]=e[s])}),r}function ut(i,e){if(Array.isArray(i)){if(!Array.isArray(e)||i.length!==e.length)return!1;for(let r=0;r`:i.itemType.kind==="value"?"array":`array<${e}>`}return i.kind}const Hn=[Or,ge,Ne,$e,ii,hr,Tr,Qt(Fe),Ur,qi,Vr];function ur(i,e){if(e.kind==="error")return null;if(i.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!ur(i.itemType,e.itemType))&&(typeof i.N!="number"||i.N===e.N))return null}else{if(i.kind===e.kind)return null;if(i.kind==="value"){for(const r of Hn)if(!ur(r,e))return null}}return`Expected ${ft(i)} but found ${ft(e)} instead.`}function F(i,e){return e.some(r=>r.kind===i.kind)}function S(i,e){return e.some(r=>r==="null"?i===null:r==="array"?Array.isArray(i):r==="object"?i&&!Array.isArray(i)&&typeof i=="object":r===typeof i)}function A(i,e){return i.kind==="array"&&e.kind==="array"?i.itemType.kind===e.itemType.kind&&typeof i.N=="number":i.kind===e.kind}const z=.96422,U=.82521,$=4/29,W=6/29,Z=3*W*W,q=W*W*W,K=Math.PI/180,ae=180/Math.PI;function oe(i){return(i%=360)<0&&(i+=360),i}function le([i,e,r,s]){let o,u;const d=Ve((.2225045*(i=Be(i))+.7168786*(e=Be(e))+.0606169*(r=Be(r)))/1);i===e&&e===r?o=u=d:(o=Ve((.4360747*i+.3850649*e+.1430804*r)/z),u=Ve((.0139322*i+.0971045*e+.7141733*r)/U));const f=116*d-16;return[f<0?0:f,500*(o-d),200*(d-u),s]}function Be(i){return i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Ve(i){return i>q?Math.pow(i,1/3):i/Z+$}function Se([i,e,r,s]){let o=(i+16)/116,u=isNaN(e)?o:o+e/500,d=isNaN(r)?o:o-r/200;return o=1*Ue(o),u=z*Ue(u),d=U*Ue(d),[ze(3.1338561*u-1.6168667*o-.4906146*d),ze(-.9787684*u+1.9161415*o+.033454*d),ze(.0719453*u-.2289914*o+1.4052427*d),s]}function ze(i){return(i=i<=.00304?12.92*i:1.055*Math.pow(i,1/2.4)-.055)<0?0:i>1?1:i}function Ue(i){return i>W?i*i*i:Z*(i-$)}function tt(i){return parseInt(i.padEnd(2,i),16)/255}function pt(i,e){return Xe(e?i/100:i,0,1)}function Xe(i,e,r){return Math.min(Math.max(e,i),r)}function Qe(i){return!i.some(Number.isNaN)}const _i={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Oe{constructor(e,r,s,o=1,u=!0){this.r=e,this.g=r,this.b=s,this.a=o,u||(this.r*=o,this.g*=o,this.b*=o,o||this.overwriteGetter("rgb",[e,r,s,o]))}static parse(e){if(e instanceof Oe)return e;if(typeof e!="string")return;const r=function(s){if((s=s.toLowerCase().trim())==="transparent")return[0,0,0,0];const o=_i[s];if(o){const[d,f,_]=o;return[d/255,f/255,_/255,1]}if(s.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(s)){const d=s.length<6?1:2;let f=1;return[tt(s.slice(f,f+=d)),tt(s.slice(f,f+=d)),tt(s.slice(f,f+=d)),tt(s.slice(f,f+d)||"ff")]}if(s.startsWith("rgb")){const d=s.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(d){const[f,_,x,w,E,I,P,M,B,O,N,H]=d,j=[w||" ",P||" ",O].join("");if(j===" "||j===" /"||j===",,"||j===",,,"){const Y=[x,I,B].join(""),Q=Y==="%%%"?100:Y===""?255:0;if(Q){const se=[Xe(+_/Q,0,1),Xe(+E/Q,0,1),Xe(+M/Q,0,1),N?pt(+N,H):1];if(Qe(se))return se}}return}}const u=s.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(u){const[d,f,_,x,w,E,I,P,M]=u,B=[_||" ",w||" ",I].join("");if(B===" "||B===" /"||B===",,"||B===",,,"){const O=[+f,Xe(+x,0,100),Xe(+E,0,100),P?pt(+P,M):1];if(Qe(O))return function([N,H,j,Y]){function Q(se){const be=(se+N/30)%12,Ae=H*Math.min(j,1-j);return j-Ae*Math.max(-1,Math.min(be-3,9-be,1))}return N=oe(N),H/=100,j/=100,[Q(0),Q(8),Q(4),Y]}(O)}}}(e);return r?new Oe(...r,!1):void 0}get rgb(){const{r:e,g:r,b:s,a:o}=this,u=o||1/0;return this.overwriteGetter("rgb",[e/u,r/u,s/u,o])}get hcl(){return this.overwriteGetter("hcl",function(e){const[r,s,o,u]=le(e),d=Math.sqrt(s*s+o*o);return[Math.round(1e4*d)?oe(Math.atan2(o,s)*ae):NaN,d,r,u]}(this.rgb))}get lab(){return this.overwriteGetter("lab",le(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){const[e,r,s,o]=this.rgb;return`rgba(${[e,r,s].map(u=>Math.round(255*u)).join(",")},${o})`}}Oe.black=new Oe(0,0,0,1),Oe.white=new Oe(1,1,1,1),Oe.transparent=new Oe(0,0,0,0),Oe.red=new Oe(1,0,0,1);class Ut{constructor(e,r,s){this.sensitivity=e?r?"variant":"case":r?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,r){return this.collator.compare(e,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ei{constructor(e,r,s,o,u){this.text=e,this.image=r,this.scale=s,this.fontStack=o,this.textColor=u}}class kt{constructor(e){this.sections=e}static fromString(e){return new kt([new ei(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof kt?e:kt.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}}class Ii{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Ii)return e;if(typeof e=="number")return new Ii([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Ii(e)}}toString(){return JSON.stringify(this.values)}}const ml=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class ri{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof ri)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let r=0;r=0&&i<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[i,e,r,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[i,e,r,s]:[i,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function zs(i){if(i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"||i instanceof Oe||i instanceof Ut||i instanceof kt||i instanceof Ii||i instanceof ri||i instanceof Zi)return!0;if(Array.isArray(i)){for(const e of i)if(!zs(e))return!1;return!0}if(typeof i=="object"){for(const e in i)if(!zs(i[e]))return!1;return!0}return!1}function Dt(i){if(i===null)return Or;if(typeof i=="string")return Ne;if(typeof i=="boolean")return $e;if(typeof i=="number")return ge;if(i instanceof Oe)return ii;if(i instanceof Ut)return cr;if(i instanceof kt)return hr;if(i instanceof Ii)return Ur;if(i instanceof ri)return Vr;if(i instanceof Zi)return qi;if(Array.isArray(i)){const e=i.length;let r;for(const s of i){const o=Dt(s);if(r){if(r===o)continue;r=Fe;break}r=o}return Qt(r||Fe,e)}return Tr}function Nr(i){const e=typeof i;return i===null?"":e==="string"||e==="number"||e==="boolean"?String(i):i instanceof Oe||i instanceof kt||i instanceof Ii||i instanceof ri||i instanceof Zi?i.toString():JSON.stringify(i)}class rn{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!zs(e[1]))return r.error("invalid value");const s=e[1];let o=Dt(s);const u=r.expectedType;return o.kind!=="array"||o.N!==0||!u||u.kind!=="array"||typeof u.N=="number"&&u.N!==0||(o=u),new rn(o,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Lt{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const ks={string:Ne,number:ge,boolean:$e,object:Tr};class ni{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let s,o=1;const u=e[0];if(u==="array"){let f,_;if(e.length>2){const x=e[1];if(typeof x!="string"||!(x in ks)||x==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);f=ks[x],o++}else f=Fe;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error('The length argument to "array" must be a positive integer literal',2);_=e[2],o++}s=Qt(f,_)}else{if(!ks[u])throw new Error(`Types doesn't contain name = ${u}`);s=ks[u]}const d=[];for(;oe.outputDefined())}}const Ds={"to-boolean":$e,"to-color":ii,"to-number":ge,"to-string":Ne};class pr{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const s=e[0];if(!Ds[s])throw new Error(`Can't parse ${s} as it is not part of the known types`);if((s==="to-boolean"||s==="to-string")&&e.length!==2)return r.error("Expected one argument.");const o=Ds[s],u=[];for(let d=1;d4?`Invalid rbga value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:yo(r[0],r[1],r[2],r[3]),!s))return new Oe(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new Lt(s||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const s of this.args){r=s.evaluate(e);const o=Ii.parse(r);if(o)return o}throw new Lt(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const s of this.args){r=s.evaluate(e);const o=ri.parse(r);if(o)return o}throw new Lt(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const s of this.args){if(r=s.evaluate(e),r===null)return 0;const o=Number(r);if(!isNaN(o))return o}throw new Lt(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return kt.fromString(Nr(this.args[0].evaluate(e)));case"resolvedImage":return Zi.fromString(Nr(this.args[0].evaluate(e)));default:return Nr(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}const Kn=["Unknown","Point","LineString","Polygon"];class ot{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Kn[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let r=this._parseColorCache[e];return r||(r=this._parseColorCache[e]=Oe.parse(e)),r}}class Ls{constructor(e,r,s=[],o,u=new wr,d=[]){this.registry=e,this.path=s,this.key=s.map(f=>`[${f}]`).join(""),this.scope=u,this.errors=d,this.expectedType=o,this._isConstant=r}parse(e,r,s,o,u={}){return r?this.concat(r,s,o)._parse(e,u):this._parse(e,u)}_parse(e,r){function s(o,u,d){return d==="assert"?new ni(u,[o]):d==="coerce"?new pr(u,[o]):o}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const o=e[0];if(typeof o!="string")return this.error(`Expression name must be a string, but found ${typeof o} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const u=this.registry[o];if(u){let d=u.parse(e,this);if(!d)return null;if(this.expectedType){const f=this.expectedType,_=d.type;if(f.kind!=="string"&&f.kind!=="number"&&f.kind!=="boolean"&&f.kind!=="object"&&f.kind!=="array"||_.kind!=="value")if(f.kind!=="color"&&f.kind!=="formatted"&&f.kind!=="resolvedImage"||_.kind!=="value"&&_.kind!=="string")if(f.kind!=="padding"||_.kind!=="value"&&_.kind!=="number"&&_.kind!=="array")if(f.kind!=="variableAnchorOffsetCollection"||_.kind!=="value"&&_.kind!=="array"){if(this.checkSubtype(f,_))return null}else d=s(d,f,r.typeAnnotation||"coerce");else d=s(d,f,r.typeAnnotation||"coerce");else d=s(d,f,r.typeAnnotation||"coerce");else d=s(d,f,r.typeAnnotation||"assert")}if(!(d instanceof rn)&&d.type.kind!=="resolvedImage"&&this._isConstant(d)){const f=new ot;try{d=new rn(d.type,d.evaluate(f))}catch(_){return this.error(_.message),null}}return d}return this.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,r,s){const o=typeof e=="number"?this.path.concat(e):this.path,u=s?this.scope.concat(s):this.scope;return new Ls(this.registry,this._isConstant,o,r||null,u,this.errors)}error(e,...r){const s=`${this.key}${r.map(o=>`[${o}]`).join("")}`;this.errors.push(new gi(s,e))}checkSubtype(e,r){const s=ur(e,r);return s&&this.error(s),s}}class In{constructor(e,r,s){this.type=cr,this.locale=s,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");const s=e[1];if(typeof s!="object"||Array.isArray(s))return r.error("Collator options argument must be an object.");const o=r.parse(s["case-sensitive"]!==void 0&&s["case-sensitive"],1,$e);if(!o)return null;const u=r.parse(s["diacritic-sensitive"]!==void 0&&s["diacritic-sensitive"],1,$e);if(!u)return null;let d=null;return s.locale&&(d=r.parse(s.locale,1,Ne),!d)?null:new In(o,u,d)}evaluate(e){return new Ut(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}const $r=8192;function Bs(i,e){i[0]=Math.min(i[0],e[0]),i[1]=Math.min(i[1],e[1]),i[2]=Math.max(i[2],e[0]),i[3]=Math.max(i[3],e[1])}function Yn(i,e){return!(i[0]<=e[0]||i[2]>=e[2]||i[1]<=e[1]||i[3]>=e[3])}function gl(i,e){const r=(180+i[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i[1]*Math.PI/360)))/360,o=Math.pow(2,e.z);return[Math.round(r*o*$r),Math.round(s*o*$r)]}function xo(i,e,r){const s=i[0]-e[0],o=i[1]-e[1],u=i[0]-r[0],d=i[1]-r[1];return s*d-u*o==0&&s*u<=0&&o*d<=0}function Rs(i,e){let r=!1;for(let d=0,f=e.length;d(s=i)[1]!=(u=_[x+1])[1]>s[1]&&s[0]<(u[0]-o[0])*(s[1]-o[1])/(u[1]-o[1])+o[0]&&(r=!r)}}var s,o,u;return r}function _l(i,e){for(let r=0;r0&&f<0||d<0&&f>0}function yl(i,e,r){for(const x of r)for(let w=0;wr[2]){const o=.5*s;let u=i[0]-r[0]>o?-s:r[0]-i[0]>o?s:0;u===0&&(u=i[0]-r[2]>o?-s:r[2]-i[0]>o?s:0),i[0]+=u}Bs(e,i)}function Os(i,e,r,s){const o=Math.pow(2,s.z)*$r,u=[s.x*$r,s.y*$r],d=[];for(const f of i)for(const _ of f){const x=[_.x+u[0],_.y+u[1]];Eo(x,e,r,o),d.push(x)}return d}function So(i,e,r,s){const o=Math.pow(2,s.z)*$r,u=[s.x*$r,s.y*$r],d=[];for(const _ of i){const x=[];for(const w of _){const E=[w.x+u[0],w.y+u[1]];Bs(e,E),x.push(E)}d.push(x)}if(e[2]-e[0]<=o/2){(f=e)[0]=f[1]=1/0,f[2]=f[3]=-1/0;for(const _ of d)for(const x of _)Eo(x,e,r,o)}var f;return d}class nn{constructor(e,r){this.type=$e,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(zs(e[1])){const s=e[1];if(s.type==="FeatureCollection")for(let o=0;o!Array.isArray(x)||x.length===e.length-1);let _=null;for(const[x,w]of f){_=new Ls(r.registry,Jn,r.path,null,r.scope);const E=[];let I=!1;for(let P=1;P{return I=E,Array.isArray(I)?`(${I.map(ft).join(", ")})`:`(${ft(I.type)}...)`;var I}).join(" | "),w=[];for(let E=1;E{r=e?r&&Jn(s):r&&s instanceof rn}),!!r&&Vs(i)&&es(i,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Vs(i){if(i instanceof Ai&&(i.name==="get"&&i.args.length===1||i.name==="feature-state"||i.name==="has"&&i.args.length===1||i.name==="properties"||i.name==="geometry-type"||i.name==="id"||/^filter-/.test(i.name))||i instanceof nn)return!1;let e=!0;return i.eachChild(r=>{e&&!Vs(r)&&(e=!1)}),e}function Qn(i){if(i instanceof Ai&&i.name==="feature-state")return!1;let e=!0;return i.eachChild(r=>{e&&!Qn(r)&&(e=!1)}),e}function es(i,e){if(i instanceof Ai&&e.indexOf(i.name)>=0)return!1;let r=!0;return i.eachChild(s=>{r&&!es(s,e)&&(r=!1)}),r}function ts(i,e){const r=i.length-1;let s,o,u=0,d=r,f=0;for(;u<=d;)if(f=Math.floor((u+d)/2),s=i[f],o=i[f+1],s<=e){if(f===r||ee))throw new Lt("Input is not a number.");d=f-1}return 0}class is{constructor(e,r,s){this.type=e,this.input=r,this.labels=[],this.outputs=[];for(const[o,u]of s)this.labels.push(o),this.outputs.push(u)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");const s=r.parse(e[1],1,ge);if(!s)return null;const o=[];let u=null;r.expectedType&&r.expectedType.kind!=="value"&&(u=r.expectedType);for(let d=1;d=f)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',x);const E=r.parse(_,w,u);if(!E)return null;u=u||E.type,o.push([f,E])}return new is(u,s,o)}evaluate(e){const r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(e);const o=this.input.evaluate(e);if(o<=r[0])return s[0].evaluate(e);const u=r.length;return o>=r[u-1]?s[u-1].evaluate(e):s[ts(r,o)].evaluate(e)}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function sn(i,e,r){return i+r*(e-i)}function Ns(i,e,r){return i.map((s,o)=>sn(s,e[o],r))}const Ci={number:sn,color:function(i,e,r,s="rgb"){switch(s){case"rgb":{const[o,u,d,f]=Ns(i.rgb,e.rgb,r);return new Oe(o,u,d,f,!1)}case"hcl":{const[o,u,d,f]=i.hcl,[_,x,w,E]=e.hcl;let I,P;if(isNaN(o)||isNaN(_))isNaN(o)?isNaN(_)?I=NaN:(I=_,d!==1&&d!==0||(P=x)):(I=o,w!==1&&w!==0||(P=u));else{let H=_-o;_>o&&H>180?H-=360:_180&&(H+=360),I=o+r*H}const[M,B,O,N]=function([H,j,Y,Q]){return H=isNaN(H)?0:H*K,Se([Y,Math.cos(H)*j,Math.sin(H)*j,Q])}([I,P??sn(u,x,r),sn(d,w,r),sn(f,E,r)]);return new Oe(M,B,O,N,!1)}case"lab":{const[o,u,d,f]=Se(Ns(i.lab,e.lab,r));return new Oe(o,u,d,f,!1)}}},array:Ns,padding:function(i,e,r){return new Ii(Ns(i.values,e.values,r))},variableAnchorOffsetCollection:function(i,e,r){const s=i.values,o=e.values;if(s.length!==o.length)throw new Lt(`Cannot interpolate values of different length. from: ${i.toString()}, to: ${e.toString()}`);const u=[];for(let d=0;dtypeof w!="number"||w<0||w>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);o={name:"cubic-bezier",controlPoints:x}}}if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(u=r.parse(u,2,ge),!u)return null;const f=[];let _=null;s==="interpolate-hcl"||s==="interpolate-lab"?_=ii:r.expectedType&&r.expectedType.kind!=="value"&&(_=r.expectedType);for(let x=0;x=w)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',I);const M=r.parse(E,P,_);if(!M)return null;_=_||M.type,f.push([w,M])}return A(_,ge)||A(_,ii)||A(_,Ur)||A(_,Vr)||A(_,Qt(ge))?new Pi(_,s,o,u,f):r.error(`Type ${ft(_)} is not interpolatable.`)}evaluate(e){const r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(e);const o=this.input.evaluate(e);if(o<=r[0])return s[0].evaluate(e);const u=r.length;if(o>=r[u-1])return s[u-1].evaluate(e);const d=ts(r,o),f=Pi.interpolationFactor(this.interpolation,o,r[d],r[d+1]),_=s[d].evaluate(e),x=s[d+1].evaluate(e);switch(this.operator){case"interpolate":return Ci[this.type.kind](_,x,f);case"interpolate-hcl":return Ci.color(_,x,f,"hcl");case"interpolate-lab":return Ci.color(_,x,f,"lab")}}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function Ta(i,e,r,s){const o=s-r,u=i-r;return o===0?0:e===1?u/o:(Math.pow(e,u)-1)/(Math.pow(e,o)-1)}class $s{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expectected at least one argument.");let s=null;const o=r.expectedType;o&&o.kind!=="value"&&(s=o);const u=[];for(const f of e.slice(1)){const _=r.parse(f,1+u.length,s,void 0,{typeAnnotation:"omit"});if(!_)return null;s=s||_.type,u.push(_)}if(!s)throw new Error("No output type");const d=o&&u.some(f=>ur(o,f.type));return new $s(d?Fe:s,u)}evaluate(e){let r,s=null,o=0;for(const u of this.args)if(o++,s=u.evaluate(e),s&&s instanceof Zi&&!s.available&&(r||(r=s.name),s=null,o===this.args.length&&(s=r)),s!==null)break;return s}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}class An{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const s=[];for(let u=1;u=s.length)throw new Lt(`Array index out of bounds: ${r} > ${s.length-1}.`);if(r!==Math.floor(r))throw new Lt(`Array index must be an integer, but found ${r} instead.`);return s[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class it{constructor(e,r){this.type=$e,this.needle=e,this.haystack=r}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=r.parse(e[1],1,Fe),o=r.parse(e[2],2,Fe);return s&&o?F(s.type,[$e,Ne,ge,Or,Fe])?new it(s,o):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ft(s.type)} instead`):null}evaluate(e){const r=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!s)return!1;if(!S(r,["boolean","string","number","null"]))throw new Lt(`Expected first argument to be of type boolean, string, number or null, but found ${ft(Dt(r))} instead.`);if(!S(s,["string","array"]))throw new Lt(`Expected second argument to be of type array or string, but found ${ft(Dt(s))} instead.`);return s.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class qs{constructor(e,r,s){this.type=ge,this.needle=e,this.haystack=r,this.fromIndex=s}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=r.parse(e[1],1,Fe),o=r.parse(e[2],2,Fe);if(!s||!o)return null;if(!F(s.type,[$e,Ne,ge,Or,Fe]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ft(s.type)} instead`);if(e.length===4){const u=r.parse(e[3],3,ge);return u?new qs(s,o,u):null}return new qs(s,o)}evaluate(e){const r=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!S(r,["boolean","string","number","null"]))throw new Lt(`Expected first argument to be of type boolean, string, number or null, but found ${ft(Dt(r))} instead.`);if(!S(s,["string","array"]))throw new Lt(`Expected second argument to be of type array or string, but found ${ft(Dt(s))} instead.`);if(this.fromIndex){const o=this.fromIndex.evaluate(e);return s.indexOf(r,o)}return s.indexOf(r)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class Ea{constructor(e,r,s,o,u,d){this.inputType=e,this.type=r,this.input=s,this.cases=o,this.outputs=u,this.otherwise=d}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let s,o;r.expectedType&&r.expectedType.kind!=="value"&&(o=r.expectedType);const u={},d=[];for(let x=2;xNumber.MAX_SAFE_INTEGER)return I.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof M=="number"&&Math.floor(M)!==M)return I.error("Numeric branch labels must be integer values.");if(s){if(I.checkSubtype(s,Dt(M)))return null}else s=Dt(M);if(u[String(M)]!==void 0)return I.error("Branch labels must be unique.");u[String(M)]=d.length}const P=r.parse(E,x,o);if(!P)return null;o=o||P.type,d.push(P)}const f=r.parse(e[1],1,Fe);if(!f)return null;const _=r.parse(e[e.length-1],e.length-1,o);return _?f.type.kind!=="value"&&r.concat(1).checkSubtype(s,f.type)?null:new Ea(s,o,f,u,d,_):null}evaluate(e){const r=this.input.evaluate(e);return(Dt(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class Sa{constructor(e,r,s){this.type=e,this.branches=r,this.otherwise=s}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let s;r.expectedType&&r.expectedType.kind!=="value"&&(s=r.expectedType);const o=[];for(let d=1;dr.outputDefined())&&this.otherwise.outputDefined()}}class Zs{constructor(e,r,s,o){this.type=e,this.input=r,this.beginIndex=s,this.endIndex=o}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=r.parse(e[1],1,Fe),o=r.parse(e[2],2,ge);if(!s||!o)return null;if(!F(s.type,[Qt(Fe),Ne,Fe]))return r.error(`Expected first argument to be of type array or string, but found ${ft(s.type)} instead`);if(e.length===4){const u=r.parse(e[3],3,ge);return u?new Zs(s.type,s,o,u):null}return new Zs(s.type,s,o)}evaluate(e){const r=this.input.evaluate(e),s=this.beginIndex.evaluate(e);if(!S(r,["string","array"]))throw new Lt(`Expected first argument to be of type array or string, but found ${ft(Dt(r))} instead.`);if(this.endIndex){const o=this.endIndex.evaluate(e);return r.slice(s,o)}return r.slice(s)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function Io(i,e){return i==="=="||i==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function Ao(i,e,r,s){return s.compare(e,r)===0}function Pn(i,e,r){const s=i!=="=="&&i!=="!=";return class ou{constructor(u,d,f){this.type=$e,this.lhs=u,this.rhs=d,this.collator=f,this.hasUntypedArgument=u.type.kind==="value"||d.type.kind==="value"}static parse(u,d){if(u.length!==3&&u.length!==4)return d.error("Expected two or three arguments.");const f=u[0];let _=d.parse(u[1],1,Fe);if(!_)return null;if(!Io(f,_.type))return d.concat(1).error(`"${f}" comparisons are not supported for type '${ft(_.type)}'.`);let x=d.parse(u[2],2,Fe);if(!x)return null;if(!Io(f,x.type))return d.concat(2).error(`"${f}" comparisons are not supported for type '${ft(x.type)}'.`);if(_.type.kind!==x.type.kind&&_.type.kind!=="value"&&x.type.kind!=="value")return d.error(`Cannot compare types '${ft(_.type)}' and '${ft(x.type)}'.`);s&&(_.type.kind==="value"&&x.type.kind!=="value"?_=new ni(x.type,[_]):_.type.kind!=="value"&&x.type.kind==="value"&&(x=new ni(_.type,[x])));let w=null;if(u.length===4){if(_.type.kind!=="string"&&x.type.kind!=="string"&&_.type.kind!=="value"&&x.type.kind!=="value")return d.error("Cannot use collator to compare non-string types.");if(w=d.parse(u[3],3,cr),!w)return null}return new ou(_,x,w)}evaluate(u){const d=this.lhs.evaluate(u),f=this.rhs.evaluate(u);if(s&&this.hasUntypedArgument){const _=Dt(d),x=Dt(f);if(_.kind!==x.kind||_.kind!=="string"&&_.kind!=="number")throw new Lt(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${_.kind}, ${x.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const _=Dt(d),x=Dt(f);if(_.kind!=="string"||x.kind!=="string")return e(u,d,f)}return this.collator?r(u,d,f,this.collator.evaluate(u)):e(u,d,f)}eachChild(u){u(this.lhs),u(this.rhs),this.collator&&u(this.collator)}outputDefined(){return!0}}}const xl=Pn("==",function(i,e,r){return e===r},Ao),vl=Pn("!=",function(i,e,r){return e!==r},function(i,e,r,s){return!Ao(0,e,r,s)}),bl=Pn("<",function(i,e,r){return e",function(i,e,r){return e>r},function(i,e,r,s){return s.compare(e,r)>0}),Tl=Pn("<=",function(i,e,r){return e<=r},function(i,e,r,s){return s.compare(e,r)<=0}),El=Pn(">=",function(i,e,r){return e>=r},function(i,e,r,s){return s.compare(e,r)>=0});class Ia{constructor(e,r,s,o,u){this.type=Ne,this.number=e,this.locale=r,this.currency=s,this.minFractionDigits=o,this.maxFractionDigits=u}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");const s=r.parse(e[1],1,ge);if(!s)return null;const o=e[2];if(typeof o!="object"||Array.isArray(o))return r.error("NumberFormat options argument must be an object.");let u=null;if(o.locale&&(u=r.parse(o.locale,1,Ne),!u))return null;let d=null;if(o.currency&&(d=r.parse(o.currency,1,Ne),!d))return null;let f=null;if(o["min-fraction-digits"]&&(f=r.parse(o["min-fraction-digits"],1,ge),!f))return null;let _=null;return o["max-fraction-digits"]&&(_=r.parse(o["max-fraction-digits"],1,ge),!_)?null:new Ia(s,u,d,f,_)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class js{constructor(e){this.type=hr,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const s=e[1];if(!Array.isArray(s)&&typeof s=="object")return r.error("First argument must be an image or text section.");const o=[];let u=!1;for(let d=1;d<=e.length-1;++d){const f=e[d];if(u&&typeof f=="object"&&!Array.isArray(f)){u=!1;let _=null;if(f["font-scale"]&&(_=r.parse(f["font-scale"],1,ge),!_))return null;let x=null;if(f["text-font"]&&(x=r.parse(f["text-font"],1,Qt(Ne)),!x))return null;let w=null;if(f["text-color"]&&(w=r.parse(f["text-color"],1,ii),!w))return null;const E=o[o.length-1];E.scale=_,E.font=x,E.textColor=w}else{const _=r.parse(e[d],1,Fe);if(!_)return null;const x=_.type.kind;if(x!=="string"&&x!=="value"&&x!=="null"&&x!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");u=!0,o.push({content:_,scale:null,font:null,textColor:null})}}return new js(o)}evaluate(e){return new kt(this.sections.map(r=>{const s=r.content.evaluate(e);return Dt(s)===qi?new ei("",s,null,null,null):new ei(Nr(s),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null)}))}eachChild(e){for(const r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}outputDefined(){return!1}}class Aa{constructor(e){this.type=qi,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");const s=r.parse(e[1],1,Ne);return s?new Aa(s):r.error("No image name provided.")}evaluate(e){const r=this.input.evaluate(e),s=Zi.fromString(r);return s&&e.availableImages&&(s.available=e.availableImages.indexOf(r)>-1),s}eachChild(e){e(this.input)}outputDefined(){return!1}}class Ca{constructor(e){this.type=ge,this.input=e}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);const s=r.parse(e[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${ft(s.type)} instead.`):new Ca(s):null}evaluate(e){const r=this.input.evaluate(e);if(typeof r=="string"||Array.isArray(r))return r.length;throw new Lt(`Expected value to be of type string or array, but found ${ft(Dt(r))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const Mn={"==":xl,"!=":vl,">":wl,"<":bl,">=":El,"<=":Tl,array:ni,at:Cn,boolean:ni,case:Sa,coalesce:$s,collator:In,format:js,image:Aa,in:it,"index-of":qs,interpolate:Pi,"interpolate-hcl":Pi,"interpolate-lab":Pi,length:Ca,let:An,literal:rn,match:Ea,number:ni,"number-format":Ia,object:ni,slice:Zs,step:is,string:ni,"to-boolean":pr,"to-color":pr,"to-number":pr,"to-string":pr,var:Us,within:nn};function Co(i,[e,r,s,o]){e=e.evaluate(i),r=r.evaluate(i),s=s.evaluate(i);const u=o?o.evaluate(i):1,d=yo(e,r,s,u);if(d)throw new Lt(d);return new Oe(e/255,r/255,s/255,u,!1)}function Po(i,e){return i in e}function Pa(i,e){const r=e[i];return r===void 0?null:r}function an(i){return{type:i}}function Mo(i){return{result:"success",value:i}}function zn(i){return{result:"error",value:i}}function kn(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function zo(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function Ma(i){return!!i.expression&&i.expression.interpolated}function st(i){return i instanceof Number?"number":i instanceof String?"string":i instanceof Boolean?"boolean":Array.isArray(i)?"array":i===null?"null":typeof i}function Gs(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function Sl(i){return i}function ko(i,e){const r=e.type==="color",s=i.stops&&typeof i.stops[0][0]=="object",o=s||!(s||i.property!==void 0),u=i.type||(Ma(e)?"exponential":"interval");if(r||e.type==="padding"){const w=r?Oe.parse:Ii.parse;(i=di({},i)).stops&&(i.stops=i.stops.map(E=>[E[0],w(E[1])])),i.default=w(i.default?i.default:e.default)}if(i.colorSpace&&(d=i.colorSpace)!=="rgb"&&d!=="hcl"&&d!=="lab")throw new Error(`Unknown color space: "${i.colorSpace}"`);var d;let f,_,x;if(u==="exponential")f=Do;else if(u==="interval")f=Al;else if(u==="categorical"){f=Il,_=Object.create(null);for(const w of i.stops)_[w[0]]=w[1];x=typeof i.stops[0][0]}else{if(u!=="identity")throw new Error(`Unknown function type "${u}"`);f=Cl}if(s){const w={},E=[];for(let M=0;MM[0]),evaluate:({zoom:M},B)=>Do({stops:I,base:i.base},e,M).evaluate(M,B)}}if(o){const w=u==="exponential"?{name:"exponential",base:i.base!==void 0?i.base:1}:null;return{kind:"camera",interpolationType:w,interpolationFactor:Pi.interpolationFactor.bind(void 0,w),zoomStops:i.stops.map(E=>E[0]),evaluate:({zoom:E})=>f(i,e,E,_,x)}}return{kind:"source",evaluate(w,E){const I=E&&E.properties?E.properties[i.property]:void 0;return I===void 0?on(i.default,e.default):f(i,e,I,_,x)}}}function on(i,e,r){return i!==void 0?i:e!==void 0?e:r!==void 0?r:void 0}function Il(i,e,r,s,o){return on(typeof r===o?s[r]:void 0,i.default,e.default)}function Al(i,e,r){if(st(r)!=="number")return on(i.default,e.default);const s=i.stops.length;if(s===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[s-1][0])return i.stops[s-1][1];const o=ts(i.stops.map(u=>u[0]),r);return i.stops[o][1]}function Do(i,e,r){const s=i.base!==void 0?i.base:1;if(st(r)!=="number")return on(i.default,e.default);const o=i.stops.length;if(o===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[o-1][0])return i.stops[o-1][1];const u=ts(i.stops.map(w=>w[0]),r),d=function(w,E,I,P){const M=P-I,B=w-I;return M===0?0:E===1?B/M:(Math.pow(E,B)-1)/(Math.pow(E,M)-1)}(r,s,i.stops[u][0],i.stops[u+1][0]),f=i.stops[u][1],_=i.stops[u+1][1],x=Ci[e.type]||Sl;return typeof f.evaluate=="function"?{evaluate(...w){const E=f.evaluate.apply(void 0,w),I=_.evaluate.apply(void 0,w);if(E!==void 0&&I!==void 0)return x(E,I,d,i.colorSpace)}}:x(f,_,d,i.colorSpace)}function Cl(i,e,r){switch(e.type){case"color":r=Oe.parse(r);break;case"formatted":r=kt.fromString(r.toString());break;case"resolvedImage":r=Zi.fromString(r.toString());break;case"padding":r=Ii.parse(r);break;default:st(r)===e.type||e.type==="enum"&&e.values[r]||(r=void 0)}return on(r,i.default,e.default)}Ai.register(Mn,{error:[{kind:"error"},[Ne],(i,[e])=>{throw new Lt(e.evaluate(i))}],typeof:[Ne,[Fe],(i,[e])=>ft(Dt(e.evaluate(i)))],"to-rgba":[Qt(ge,4),[ii],(i,[e])=>{const[r,s,o,u]=e.evaluate(i).rgb;return[255*r,255*s,255*o,u]}],rgb:[ii,[ge,ge,ge],Co],rgba:[ii,[ge,ge,ge,ge],Co],has:{type:$e,overloads:[[[Ne],(i,[e])=>Po(e.evaluate(i),i.properties())],[[Ne,Tr],(i,[e,r])=>Po(e.evaluate(i),r.evaluate(i))]]},get:{type:Fe,overloads:[[[Ne],(i,[e])=>Pa(e.evaluate(i),i.properties())],[[Ne,Tr],(i,[e,r])=>Pa(e.evaluate(i),r.evaluate(i))]]},"feature-state":[Fe,[Ne],(i,[e])=>Pa(e.evaluate(i),i.featureState||{})],properties:[Tr,[],i=>i.properties()],"geometry-type":[Ne,[],i=>i.geometryType()],id:[Fe,[],i=>i.id()],zoom:[ge,[],i=>i.globals.zoom],"heatmap-density":[ge,[],i=>i.globals.heatmapDensity||0],"line-progress":[ge,[],i=>i.globals.lineProgress||0],accumulated:[Fe,[],i=>i.globals.accumulated===void 0?null:i.globals.accumulated],"+":[ge,an(ge),(i,e)=>{let r=0;for(const s of e)r+=s.evaluate(i);return r}],"*":[ge,an(ge),(i,e)=>{let r=1;for(const s of e)r*=s.evaluate(i);return r}],"-":{type:ge,overloads:[[[ge,ge],(i,[e,r])=>e.evaluate(i)-r.evaluate(i)],[[ge],(i,[e])=>-e.evaluate(i)]]},"/":[ge,[ge,ge],(i,[e,r])=>e.evaluate(i)/r.evaluate(i)],"%":[ge,[ge,ge],(i,[e,r])=>e.evaluate(i)%r.evaluate(i)],ln2:[ge,[],()=>Math.LN2],pi:[ge,[],()=>Math.PI],e:[ge,[],()=>Math.E],"^":[ge,[ge,ge],(i,[e,r])=>Math.pow(e.evaluate(i),r.evaluate(i))],sqrt:[ge,[ge],(i,[e])=>Math.sqrt(e.evaluate(i))],log10:[ge,[ge],(i,[e])=>Math.log(e.evaluate(i))/Math.LN10],ln:[ge,[ge],(i,[e])=>Math.log(e.evaluate(i))],log2:[ge,[ge],(i,[e])=>Math.log(e.evaluate(i))/Math.LN2],sin:[ge,[ge],(i,[e])=>Math.sin(e.evaluate(i))],cos:[ge,[ge],(i,[e])=>Math.cos(e.evaluate(i))],tan:[ge,[ge],(i,[e])=>Math.tan(e.evaluate(i))],asin:[ge,[ge],(i,[e])=>Math.asin(e.evaluate(i))],acos:[ge,[ge],(i,[e])=>Math.acos(e.evaluate(i))],atan:[ge,[ge],(i,[e])=>Math.atan(e.evaluate(i))],min:[ge,an(ge),(i,e)=>Math.min(...e.map(r=>r.evaluate(i)))],max:[ge,an(ge),(i,e)=>Math.max(...e.map(r=>r.evaluate(i)))],abs:[ge,[ge],(i,[e])=>Math.abs(e.evaluate(i))],round:[ge,[ge],(i,[e])=>{const r=e.evaluate(i);return r<0?-Math.round(-r):Math.round(r)}],floor:[ge,[ge],(i,[e])=>Math.floor(e.evaluate(i))],ceil:[ge,[ge],(i,[e])=>Math.ceil(e.evaluate(i))],"filter-==":[$e,[Ne,Fe],(i,[e,r])=>i.properties()[e.value]===r.value],"filter-id-==":[$e,[Fe],(i,[e])=>i.id()===e.value],"filter-type-==":[$e,[Ne],(i,[e])=>i.geometryType()===e.value],"filter-<":[$e,[Ne,Fe],(i,[e,r])=>{const s=i.properties()[e.value],o=r.value;return typeof s==typeof o&&s{const r=i.id(),s=e.value;return typeof r==typeof s&&r":[$e,[Ne,Fe],(i,[e,r])=>{const s=i.properties()[e.value],o=r.value;return typeof s==typeof o&&s>o}],"filter-id->":[$e,[Fe],(i,[e])=>{const r=i.id(),s=e.value;return typeof r==typeof s&&r>s}],"filter-<=":[$e,[Ne,Fe],(i,[e,r])=>{const s=i.properties()[e.value],o=r.value;return typeof s==typeof o&&s<=o}],"filter-id-<=":[$e,[Fe],(i,[e])=>{const r=i.id(),s=e.value;return typeof r==typeof s&&r<=s}],"filter->=":[$e,[Ne,Fe],(i,[e,r])=>{const s=i.properties()[e.value],o=r.value;return typeof s==typeof o&&s>=o}],"filter-id->=":[$e,[Fe],(i,[e])=>{const r=i.id(),s=e.value;return typeof r==typeof s&&r>=s}],"filter-has":[$e,[Fe],(i,[e])=>e.value in i.properties()],"filter-has-id":[$e,[],i=>i.id()!==null&&i.id()!==void 0],"filter-type-in":[$e,[Qt(Ne)],(i,[e])=>e.value.indexOf(i.geometryType())>=0],"filter-id-in":[$e,[Qt(Fe)],(i,[e])=>e.value.indexOf(i.id())>=0],"filter-in-small":[$e,[Ne,Qt(Fe)],(i,[e,r])=>r.value.indexOf(i.properties()[e.value])>=0],"filter-in-large":[$e,[Ne,Qt(Fe)],(i,[e,r])=>function(s,o,u,d){for(;u<=d;){const f=u+d>>1;if(o[f]===s)return!0;o[f]>s?d=f-1:u=f+1}return!1}(i.properties()[e.value],r.value,0,r.value.length-1)],all:{type:$e,overloads:[[[$e,$e],(i,[e,r])=>e.evaluate(i)&&r.evaluate(i)],[an($e),(i,e)=>{for(const r of e)if(!r.evaluate(i))return!1;return!0}]]},any:{type:$e,overloads:[[[$e,$e],(i,[e,r])=>e.evaluate(i)||r.evaluate(i)],[an($e),(i,e)=>{for(const r of e)if(r.evaluate(i))return!0;return!1}]]},"!":[$e,[$e],(i,[e])=>!e.evaluate(i)],"is-supported-script":[$e,[Ne],(i,[e])=>{const r=i.globals&&i.globals.isSupportedScript;return!r||r(e.evaluate(i))}],upcase:[Ne,[Ne],(i,[e])=>e.evaluate(i).toUpperCase()],downcase:[Ne,[Ne],(i,[e])=>e.evaluate(i).toLowerCase()],concat:[Ne,an(Fe),(i,e)=>e.map(r=>Nr(r.evaluate(i))).join("")],"resolved-locale":[Ne,[cr],(i,[e])=>e.evaluate(i).resolvedLocale()]});class Ct{constructor(e,r){var s;this.expression=e,this._warningHistory={},this._evaluator=new ot,this._defaultValue=r?(s=r).type==="color"&&Gs(s.default)?new Oe(0,0,0,0):s.type==="color"?Oe.parse(s.default)||null:s.type==="padding"?Ii.parse(s.default)||null:s.type==="variableAnchorOffsetCollection"?ri.parse(s.default)||null:s.default===void 0?null:s.default:null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(e,r,s,o,u,d){return this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=s,this._evaluator.canonical=o,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=d,this.expression.evaluate(this._evaluator)}evaluate(e,r,s,o,u,d){this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=s||null,this._evaluator.canonical=o,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=d||null;try{const f=this.expression.evaluate(this._evaluator);if(f==null||typeof f=="number"&&f!=f)return this._defaultValue;if(this._enumValues&&!(f in this._enumValues))throw new Lt(`Expected value to be one of ${Object.keys(this._enumValues).map(_=>JSON.stringify(_)).join(", ")}, but found ${JSON.stringify(f)} instead.`);return f}catch(f){return this._warningHistory[f.message]||(this._warningHistory[f.message]=!0,typeof console<"u"&&console.warn(f.message)),this._defaultValue}}}function Xs(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Mn}function We(i,e){const r=new Ls(Mn,Jn,[],e?function(o){const u={color:ii,string:Ne,number:ge,enum:Ne,boolean:$e,formatted:hr,padding:Ur,resolvedImage:qi,variableAnchorOffsetCollection:Vr};return o.type==="array"?Qt(u[o.value]||Fe,o.length):u[o.type]}(e):void 0),s=r.parse(i,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return s?Mo(new Ct(s,e)):zn(r.errors)}class rs{constructor(e,r){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!Qn(r.expression)}evaluateWithoutErrorHandling(e,r,s,o,u,d){return this._styleExpression.evaluateWithoutErrorHandling(e,r,s,o,u,d)}evaluate(e,r,s,o,u,d){return this._styleExpression.evaluate(e,r,s,o,u,d)}}class gt{constructor(e,r,s,o){this.kind=e,this.zoomStops=s,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!Qn(r.expression),this.interpolationType=o}evaluateWithoutErrorHandling(e,r,s,o,u,d){return this._styleExpression.evaluateWithoutErrorHandling(e,r,s,o,u,d)}evaluate(e,r,s,o,u,d){return this._styleExpression.evaluate(e,r,s,o,u,d)}interpolationFactor(e,r,s){return this.interpolationType?Pi.interpolationFactor(this.interpolationType,e,r,s):0}}function _t(i,e){const r=We(i,e);if(r.result==="error")return r;const s=r.value.expression,o=Vs(s);if(!o&&!kn(e))return zn([new gi("","data expressions not supported")]);const u=es(s,["zoom"]);if(!u&&!zo(e))return zn([new gi("","zoom expressions not supported")]);const d=ns(s);return d||u?d instanceof gi?zn([d]):d instanceof Pi&&!Ma(e)?zn([new gi("",'"interpolate" expressions cannot be used with this property')]):Mo(d?new gt(o?"camera":"composite",r.value,d.labels,d instanceof Pi?d.interpolation:void 0):new rs(o?"constant":"source",r.value)):zn([new gi("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class ln{constructor(e,r){this._parameters=e,this._specification=r,di(this,ko(this._parameters,this._specification))}static deserialize(e){return new ln(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function ns(i){let e=null;if(i instanceof An)e=ns(i.result);else if(i instanceof $s){for(const r of i.args)if(e=ns(r),e)break}else(i instanceof is||i instanceof Pi)&&i.input instanceof Ai&&i.input.name==="zoom"&&(e=i);return e instanceof gi||i.eachChild(r=>{const s=ns(r);s instanceof gi?e=s:!e&&s?e=new gi("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&s&&e!==s&&(e=new gi("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function za(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(const e of i.slice(1))if(!za(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}const Pl={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ka(i){if(i==null)return{filter:()=>!0,needGeometry:!1};za(i)||(i=ss(i));const e=We(i,Pl);if(e.result==="error")throw new Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));return{filter:(r,s,o)=>e.value.evaluate(r,s,{},o),needGeometry:Da(i)}}function Ml(i,e){return ie?1:0}function Da(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(let e=1;e"||e==="<="||e===">="?Ws(i[1],i[2],e):e==="any"?(r=i.slice(1),["any"].concat(r.map(ss))):e==="all"?["all"].concat(i.slice(1).map(ss)):e==="none"?["all"].concat(i.slice(1).map(ss).map(Ks)):e==="in"?La(i[1],i.slice(2)):e==="!in"?Ks(La(i[1],i.slice(2))):e==="has"?Hs(i[1]):e==="!has"?Ks(Hs(i[1])):e!=="within"||i;var r}function Ws(i,e,r){switch(i){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,i,e]}}function La(i,e){if(e.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",i,["literal",e.sort(Ml)]]:["filter-in-small",i,["literal",e]]}}function Hs(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function Ks(i){return["!",i]}function Ba(i){const e=typeof i;if(e==="number"||e==="boolean"||e==="string"||i==null)return JSON.stringify(i);if(Array.isArray(i)){let o="[";for(const u of i)o+=`${Ba(u)},`;return`${o}]`}const r=Object.keys(i).sort();let s="{";for(let o=0;os.maximum?[new me(e,r,`${r} is greater than the maximum value ${s.maximum}`)]:[]}function Fa(i){const e=i.valueSpec,r=Bt(i.value.type);let s,o,u,d={};const f=r!=="categorical"&&i.value.property===void 0,_=!f,x=st(i.value.stops)==="array"&&st(i.value.stops[0])==="array"&&st(i.value.stops[0][0])==="object",w=ji({key:i.key,value:i.value,valueSpec:i.styleSpec.function,validateSpec:i.validateSpec,style:i.style,styleSpec:i.styleSpec,objectElementValidators:{stops:function(P){if(r==="identity")return[new me(P.key,P.value,'identity function may not have a "stops" property')];let M=[];const B=P.value;return M=M.concat(Ra({key:P.key,value:B,valueSpec:P.valueSpec,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec,arrayElementValidator:E})),st(B)==="array"&&B.length===0&&M.push(new me(P.key,B,"array must have at least one stop")),M},default:function(P){return P.validateSpec({key:P.key,value:P.value,valueSpec:e,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec})}}});return r==="identity"&&f&&w.push(new me(i.key,i.value,'missing required property "property"')),r==="identity"||i.value.stops||w.push(new me(i.key,i.value,'missing required property "stops"')),r==="exponential"&&i.valueSpec.expression&&!Ma(i.valueSpec)&&w.push(new me(i.key,i.value,"exponential functions not supported")),i.styleSpec.$version>=8&&(_&&!kn(i.valueSpec)?w.push(new me(i.key,i.value,"property functions not supported")):f&&!zo(i.valueSpec)&&w.push(new me(i.key,i.value,"zoom functions not supported"))),r!=="categorical"&&!x||i.value.property!==void 0||w.push(new me(i.key,i.value,'"property" property is required')),w;function E(P){let M=[];const B=P.value,O=P.key;if(st(B)!=="array")return[new me(O,B,`array expected, ${st(B)} found`)];if(B.length!==2)return[new me(O,B,`array length 2 expected, length ${B.length} found`)];if(x){if(st(B[0])!=="object")return[new me(O,B,`object expected, ${st(B[0])} found`)];if(B[0].zoom===void 0)return[new me(O,B,"object stop key must have zoom")];if(B[0].value===void 0)return[new me(O,B,"object stop key must have value")];if(u&&u>Bt(B[0].zoom))return[new me(O,B[0].zoom,"stop zoom values must appear in ascending order")];Bt(B[0].zoom)!==u&&(u=Bt(B[0].zoom),o=void 0,d={}),M=M.concat(ji({key:`${O}[0]`,value:B[0],valueSpec:{zoom:{}},validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec,objectElementValidators:{zoom:Ys,value:I}}))}else M=M.concat(I({key:`${O}[0]`,value:B[0],valueSpec:{},validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec},B));return Xs(cn(B[1]))?M.concat([new me(`${O}[1]`,B[1],"expressions are not allowed in function stops.")]):M.concat(P.validateSpec({key:`${O}[1]`,value:B[1],valueSpec:e,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec}))}function I(P,M){const B=st(P.value),O=Bt(P.value),N=P.value!==null?P.value:M;if(s){if(B!==s)return[new me(P.key,N,`${B} stop domain type must match previous stop domain type ${s}`)]}else s=B;if(B!=="number"&&B!=="string"&&B!=="boolean")return[new me(P.key,N,"stop domain value must be a number, string, or boolean")];if(B!=="number"&&r!=="categorical"){let H=`number expected, ${B} found`;return kn(e)&&r===void 0&&(H+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new me(P.key,N,H)]}return r!=="categorical"||B!=="number"||isFinite(O)&&Math.floor(O)===O?r!=="categorical"&&B==="number"&&o!==void 0&&Onew me(`${i.key}${s.key}`,i.value,s.message));const r=e.value.expression||e.value._styleExpression.expression;if(i.expressionContext==="property"&&i.propertyKey==="text-font"&&!r.outputDefined())return[new me(i.key,i.value,`Invalid data expression for "${i.propertyKey}". Output values must be contained as literals within the expression.`)];if(i.expressionContext==="property"&&i.propertyType==="layout"&&!Qn(r))return[new me(i.key,i.value,'"feature-state" data expressions are not supported with layout properties.')];if(i.expressionContext==="filter"&&!Qn(r))return[new me(i.key,i.value,'"feature-state" data expressions are not supported with filters.')];if(i.expressionContext&&i.expressionContext.indexOf("cluster")===0){if(!es(r,["zoom","feature-state"]))return[new me(i.key,i.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(i.expressionContext==="cluster-initial"&&!Vs(r))return[new me(i.key,i.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function as(i){const e=i.key,r=i.value,s=i.valueSpec,o=[];return Array.isArray(s.values)?s.values.indexOf(Bt(r))===-1&&o.push(new me(e,r,`expected one of [${s.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(s.values).indexOf(Bt(r))===-1&&o.push(new me(e,r,`expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(r)} found`)),o}function Js(i){return za(cn(i.value))?Er(di({},i,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Bo(i)}function Bo(i){const e=i.value,r=i.key;if(st(e)!=="array")return[new me(r,e,`array expected, ${st(e)} found`)];const s=i.styleSpec;let o,u=[];if(e.length<1)return[new me(r,e,"filter array must have at least 1 element")];switch(u=u.concat(as({key:`${r}[0]`,value:e[0],valueSpec:s.filter_operator,style:i.style,styleSpec:i.styleSpec})),Bt(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Bt(e[1])==="$type"&&u.push(new me(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&u.push(new me(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(o=st(e[1]),o!=="string"&&u.push(new me(`${r}[1]`,e[1],`string expected, ${o} found`)));for(let d=2;d{x in r&&e.push(new me(s,r[x],`"${x}" is prohibited for ref layers`))}),o.layers.forEach(x=>{Bt(x.id)===f&&(_=x)}),_?_.ref?e.push(new me(s,r.ref,"ref cannot reference another ref layer")):d=Bt(_.type):e.push(new me(s,r.ref,`ref layer "${f}" not found`))}else if(d!=="background")if(r.source){const _=o.sources&&o.sources[r.source],x=_&&Bt(_.type);_?x==="vector"&&d==="raster"?e.push(new me(s,r.source,`layer "${r.id}" requires a raster source`)):x==="raster"&&d!=="raster"?e.push(new me(s,r.source,`layer "${r.id}" requires a vector source`)):x!=="vector"||r["source-layer"]?x==="raster-dem"&&d!=="hillshade"?e.push(new me(s,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):d!=="line"||!r.paint||!r.paint["line-gradient"]||x==="geojson"&&_.lineMetrics||e.push(new me(s,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new me(s,r,`layer "${r.id}" must specify a "source-layer"`)):e.push(new me(s,r.source,`source "${r.source}" not found`))}else e.push(new me(s,r,'missing required property "source"'));return e=e.concat(ji({key:s,value:r,valueSpec:u.layer,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,objectElementValidators:{"*":()=>[],type:()=>i.validateSpec({key:`${s}.type`,value:r.type,valueSpec:u.layer.type,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,object:r,objectKey:"type"}),filter:Js,layout:_=>ji({layer:r,key:_.key,value:_.value,style:_.style,styleSpec:_.styleSpec,validateSpec:_.validateSpec,objectElementValidators:{"*":x=>ea(di({layerType:d},x))}}),paint:_=>ji({layer:r,key:_.key,value:_.value,style:_.style,styleSpec:_.styleSpec,validateSpec:_.validateSpec,objectElementValidators:{"*":x=>os(di({layerType:d},x))}})}})),e}function qr(i){const e=i.value,r=i.key,s=st(e);return s!=="string"?[new me(r,e,`string expected, ${s} found`)]:[]}const Ro={promoteId:function({key:i,value:e}){if(st(e)==="string")return qr({key:i,value:e});{const r=[];for(const s in e)r.push(...qr({key:`${i}.${s}`,value:e[s]}));return r}}};function ls(i){const e=i.value,r=i.key,s=i.styleSpec,o=i.style,u=i.validateSpec;if(!e.type)return[new me(r,e,'"type" is required')];const d=Bt(e.type);let f;switch(d){case"vector":case"raster":case"raster-dem":return f=ji({key:r,value:e,valueSpec:s[`source_${d.replace("-","_")}`],style:i.style,styleSpec:s,objectElementValidators:Ro,validateSpec:u}),f;case"geojson":if(f=ji({key:r,value:e,valueSpec:s.source_geojson,style:o,styleSpec:s,validateSpec:u,objectElementValidators:Ro}),e.cluster)for(const _ in e.clusterProperties){const[x,w]=e.clusterProperties[_],E=typeof x=="string"?[x,["accumulated"],["get",_]]:x;f.push(...Er({key:`${r}.${_}.map`,value:w,validateSpec:u,expressionContext:"cluster-map"})),f.push(...Er({key:`${r}.${_}.reduce`,value:E,validateSpec:u,expressionContext:"cluster-reduce"}))}return f;case"video":return ji({key:r,value:e,valueSpec:s.source_video,style:o,validateSpec:u,styleSpec:s});case"image":return ji({key:r,value:e,valueSpec:s.source_image,style:o,validateSpec:u,styleSpec:s});case"canvas":return[new me(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return as({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:o,validateSpec:u,styleSpec:s})}}function Fo(i){const e=i.value,r=i.styleSpec,s=r.light,o=i.style;let u=[];const d=st(e);if(e===void 0)return u;if(d!=="object")return u=u.concat([new me("light",e,`object expected, ${d} found`)]),u;for(const f in e){const _=f.match(/^(.*)-transition$/);u=u.concat(_&&s[_[1]]&&s[_[1]].transition?i.validateSpec({key:f,value:e[f],valueSpec:r.transition,validateSpec:i.validateSpec,style:o,styleSpec:r}):s[f]?i.validateSpec({key:f,value:e[f],valueSpec:s[f],validateSpec:i.validateSpec,style:o,styleSpec:r}):[new me(f,e[f],`unknown property "${f}"`)])}return u}function Oo(i){const e=i.value,r=i.styleSpec,s=r.terrain,o=i.style;let u=[];const d=st(e);if(e===void 0)return u;if(d!=="object")return u=u.concat([new me("terrain",e,`object expected, ${d} found`)]),u;for(const f in e)u=u.concat(s[f]?i.validateSpec({key:f,value:e[f],valueSpec:s[f],validateSpec:i.validateSpec,style:o,styleSpec:r}):[new me(f,e[f],`unknown property "${f}"`)]);return u}function Uo(i){let e=[];const r=i.value,s=i.key;if(Array.isArray(r)){const o=[],u=[];for(const d in r)r[d].id&&o.includes(r[d].id)&&e.push(new me(s,r,`all the sprites' ids must be unique, but ${r[d].id} is duplicated`)),o.push(r[d].id),r[d].url&&u.includes(r[d].url)&&e.push(new me(s,r,`all the sprites' URLs must be unique, but ${r[d].url} is duplicated`)),u.push(r[d].url),e=e.concat(ji({key:`${s}[${d}]`,value:r[d],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:i.validateSpec}));return e}return qr({key:s,value:r})}const Vo={"*":()=>[],array:Ra,boolean:function(i){const e=i.value,r=i.key,s=st(e);return s!=="boolean"?[new me(r,e,`boolean expected, ${s} found`)]:[]},number:Ys,color:function(i){const e=i.key,r=i.value,s=st(r);return s!=="string"?[new me(e,r,`color expected, ${s} found`)]:Oe.parse(String(r))?[]:[new me(e,r,`color expected, "${r}" found`)]},constants:Lo,enum:as,filter:Js,function:Fa,layer:ta,object:ji,source:ls,light:Fo,terrain:Oo,string:qr,formatted:function(i){return qr(i).length===0?[]:Er(i)},resolvedImage:function(i){return qr(i).length===0?[]:Er(i)},padding:function(i){const e=i.key,r=i.value;if(st(r)==="array"){if(r.length<1||r.length>4)return[new me(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];const s={type:"number"};let o=[];for(let u=0;u[]}})),i.constants&&(r=r.concat(Lo({key:"constants",value:i.constants,style:i,styleSpec:e,validateSpec:cs}))),us(r)}function Vt(i){return function(e){return i({...e,validateSpec:cs})}}function us(i){return[].concat(i).sort((e,r)=>e.line-r.line)}function Sr(i){return function(...e){return us(i.apply(this,e))}}Mi.source=Sr(Vt(ls)),Mi.sprite=Sr(Vt(Uo)),Mi.glyphs=Sr(Vt(hs)),Mi.light=Sr(Vt(Fo)),Mi.terrain=Sr(Vt(Oo)),Mi.layer=Sr(Vt(ta)),Mi.filter=Sr(Vt(Js)),Mi.paintProperty=Sr(Vt(os)),Mi.layoutProperty=Sr(Vt(ea));const ps=Mi,kl=ps.light,ds=ps.paintProperty,Dl=ps.layoutProperty;function ia(i,e){let r=!1;if(e&&e.length)for(const s of e)i.fire(new lr(new Error(s.message))),r=!0;return r}class fs{constructor(e,r,s){const o=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;const d=new Int32Array(this.arrayBuffer);e=d[0],this.d=(r=d[1])+2*(s=d[2]);for(let _=0;_=E[M+0]&&o>=E[M+1])?(f[P]=!0,d.push(w[P])):f[P]=!1}}}}_forEachCell(e,r,s,o,u,d,f,_){const x=this._convertToCellCoord(e),w=this._convertToCellCoord(r),E=this._convertToCellCoord(s),I=this._convertToCellCoord(o);for(let P=x;P<=E;P++)for(let M=w;M<=I;M++){const B=this.d*M+P;if((!_||_(this._convertFromCellCoord(P),this._convertFromCellCoord(M),this._convertFromCellCoord(P+1),this._convertFromCellCoord(M+1)))&&u.call(this,e,r,s,o,B,d,f,_))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const e=this.cells,r=3+this.cells.length+1+1;let s=0;for(let d=0;d=0)continue;const d=i[u];o[u]=dr[s].shallow.indexOf(u)>=0?d:ms(d,e)}i instanceof Error&&(o.message=i.message)}if(o.$name)throw new Error("$name property is reserved for worker serialization logic.");return s!=="Object"&&(o.$name=s),o}throw new Error("can't serialize object of type "+typeof i)}function hn(i){if(i==null||typeof i=="boolean"||typeof i=="number"||typeof i=="string"||i instanceof Boolean||i instanceof Number||i instanceof String||i instanceof Date||i instanceof RegExp||i instanceof Blob||Dn(i)||Rr(i)||ArrayBuffer.isView(i)||i instanceof ImageData)return i;if(Array.isArray(i))return i.map(hn);if(typeof i=="object"){const e=i.$name||"Object";if(!dr[e])throw new Error(`can't deserialize unregistered class ${e}`);const{klass:r}=dr[e];if(!r)throw new Error(`can't deserialize unregistered class ${e}`);if(r.deserialize)return r.deserialize(i);const s=Object.create(r.prototype);for(const o of Object.keys(i)){if(o==="$name")continue;const u=i[o];s[o]=dr[e].shallow.indexOf(o)>=0?u:hn(u)}return s}throw new Error("can't deserialize object of type "+typeof i)}class Oa{constructor(){this.first=!0}update(e,r){const s=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=s,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=s,!0):(this.lastFloorZoom>s?(this.lastIntegerZoom=s+1,this.lastIntegerZoomTime=r):this.lastFloorZoomi>=128&&i<=255,Arabic:i=>i>=1536&&i<=1791,"Arabic Supplement":i=>i>=1872&&i<=1919,"Arabic Extended-A":i=>i>=2208&&i<=2303,"Hangul Jamo":i=>i>=4352&&i<=4607,"Unified Canadian Aboriginal Syllabics":i=>i>=5120&&i<=5759,Khmer:i=>i>=6016&&i<=6143,"Unified Canadian Aboriginal Syllabics Extended":i=>i>=6320&&i<=6399,"General Punctuation":i=>i>=8192&&i<=8303,"Letterlike Symbols":i=>i>=8448&&i<=8527,"Number Forms":i=>i>=8528&&i<=8591,"Miscellaneous Technical":i=>i>=8960&&i<=9215,"Control Pictures":i=>i>=9216&&i<=9279,"Optical Character Recognition":i=>i>=9280&&i<=9311,"Enclosed Alphanumerics":i=>i>=9312&&i<=9471,"Geometric Shapes":i=>i>=9632&&i<=9727,"Miscellaneous Symbols":i=>i>=9728&&i<=9983,"Miscellaneous Symbols and Arrows":i=>i>=11008&&i<=11263,"CJK Radicals Supplement":i=>i>=11904&&i<=12031,"Kangxi Radicals":i=>i>=12032&&i<=12255,"Ideographic Description Characters":i=>i>=12272&&i<=12287,"CJK Symbols and Punctuation":i=>i>=12288&&i<=12351,Hiragana:i=>i>=12352&&i<=12447,Katakana:i=>i>=12448&&i<=12543,Bopomofo:i=>i>=12544&&i<=12591,"Hangul Compatibility Jamo":i=>i>=12592&&i<=12687,Kanbun:i=>i>=12688&&i<=12703,"Bopomofo Extended":i=>i>=12704&&i<=12735,"CJK Strokes":i=>i>=12736&&i<=12783,"Katakana Phonetic Extensions":i=>i>=12784&&i<=12799,"Enclosed CJK Letters and Months":i=>i>=12800&&i<=13055,"CJK Compatibility":i=>i>=13056&&i<=13311,"CJK Unified Ideographs Extension A":i=>i>=13312&&i<=19903,"Yijing Hexagram Symbols":i=>i>=19904&&i<=19967,"CJK Unified Ideographs":i=>i>=19968&&i<=40959,"Yi Syllables":i=>i>=40960&&i<=42127,"Yi Radicals":i=>i>=42128&&i<=42191,"Hangul Jamo Extended-A":i=>i>=43360&&i<=43391,"Hangul Syllables":i=>i>=44032&&i<=55215,"Hangul Jamo Extended-B":i=>i>=55216&&i<=55295,"Private Use Area":i=>i>=57344&&i<=63743,"CJK Compatibility Ideographs":i=>i>=63744&&i<=64255,"Arabic Presentation Forms-A":i=>i>=64336&&i<=65023,"Vertical Forms":i=>i>=65040&&i<=65055,"CJK Compatibility Forms":i=>i>=65072&&i<=65103,"Small Form Variants":i=>i>=65104&&i<=65135,"Arabic Presentation Forms-B":i=>i>=65136&&i<=65279,"Halfwidth and Fullwidth Forms":i=>i>=65280&&i<=65519};function ra(i){for(const e of i)if(gs(e.charCodeAt(0)))return!0;return!1}function No(i){for(const e of i)if(!Ll(e.charCodeAt(0)))return!1;return!0}function Ll(i){return!(xe.Arabic(i)||xe["Arabic Supplement"](i)||xe["Arabic Extended-A"](i)||xe["Arabic Presentation Forms-A"](i)||xe["Arabic Presentation Forms-B"](i))}function gs(i){return!(i!==746&&i!==747&&(i<4352||!(xe["Bopomofo Extended"](i)||xe.Bopomofo(i)||xe["CJK Compatibility Forms"](i)&&!(i>=65097&&i<=65103)||xe["CJK Compatibility Ideographs"](i)||xe["CJK Compatibility"](i)||xe["CJK Radicals Supplement"](i)||xe["CJK Strokes"](i)||!(!xe["CJK Symbols and Punctuation"](i)||i>=12296&&i<=12305||i>=12308&&i<=12319||i===12336)||xe["CJK Unified Ideographs Extension A"](i)||xe["CJK Unified Ideographs"](i)||xe["Enclosed CJK Letters and Months"](i)||xe["Hangul Compatibility Jamo"](i)||xe["Hangul Jamo Extended-A"](i)||xe["Hangul Jamo Extended-B"](i)||xe["Hangul Jamo"](i)||xe["Hangul Syllables"](i)||xe.Hiragana(i)||xe["Ideographic Description Characters"](i)||xe.Kanbun(i)||xe["Kangxi Radicals"](i)||xe["Katakana Phonetic Extensions"](i)||xe.Katakana(i)&&i!==12540||!(!xe["Halfwidth and Fullwidth Forms"](i)||i===65288||i===65289||i===65293||i>=65306&&i<=65310||i===65339||i===65341||i===65343||i>=65371&&i<=65503||i===65507||i>=65512&&i<=65519)||!(!xe["Small Form Variants"](i)||i>=65112&&i<=65118||i>=65123&&i<=65126)||xe["Unified Canadian Aboriginal Syllabics"](i)||xe["Unified Canadian Aboriginal Syllabics Extended"](i)||xe["Vertical Forms"](i)||xe["Yijing Hexagram Symbols"](i)||xe["Yi Syllables"](i)||xe["Yi Radicals"](i))))}function _s(i){return!(gs(i)||function(e){return!!(xe["Latin-1 Supplement"](e)&&(e===167||e===169||e===174||e===177||e===188||e===189||e===190||e===215||e===247)||xe["General Punctuation"](e)&&(e===8214||e===8224||e===8225||e===8240||e===8241||e===8251||e===8252||e===8258||e===8263||e===8264||e===8265||e===8273)||xe["Letterlike Symbols"](e)||xe["Number Forms"](e)||xe["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||e===9003||e>=9085&&e<=9114||e>=9150&&e<=9165||e===9167||e>=9169&&e<=9179||e>=9186&&e<=9215)||xe["Control Pictures"](e)&&e!==9251||xe["Optical Character Recognition"](e)||xe["Enclosed Alphanumerics"](e)||xe["Geometric Shapes"](e)||xe["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||xe["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||xe["CJK Symbols and Punctuation"](e)||xe.Katakana(e)||xe["Private Use Area"](e)||xe["CJK Compatibility Forms"](e)||xe["Small Form Variants"](e)||xe["Halfwidth and Fullwidth Forms"](e)||e===8734||e===8756||e===8757||e>=9984&&e<=10087||e>=10102&&e<=10131||e===65532||e===65533)}(i))}function Ua(i){return i>=1424&&i<=2303||xe["Arabic Presentation Forms-A"](i)||xe["Arabic Presentation Forms-B"](i)}function Bl(i,e){return!(!e&&Ua(i)||i>=2304&&i<=3583||i>=3840&&i<=4255||xe.Khmer(i))}function $o(i){for(const e of i)if(Ua(e.charCodeAt(0)))return!0;return!1}const Va="deferred",ys="loading",Na="loaded";let $a=null,yi="unavailable",Zr=null;const qa=function(i){i&&typeof i=="string"&&i.indexOf("NetworkError")>-1&&(yi="error"),$a&&$a(i)};function Za(){ja.fire(new $i("pluginStateChange",{pluginStatus:yi,pluginURL:Zr}))}const ja=new Fr,Ga=function(){return yi},qo=function(){if(yi!==Va||!Zr)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");yi=ys,Za(),Zr&&Xn({url:Zr},i=>{i?qa(i):(yi=Na,Za())})},Gi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>yi===Na||Gi.applyArabicShaping!=null,isLoading:()=>yi===ys,setState(i){if(!Vi())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");yi=i.pluginStatus,Zr=i.pluginURL},isParsed(){if(!Vi())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return Gi.applyArabicShaping!=null&&Gi.processBidirectionalText!=null&&Gi.processStyledBidirectionalText!=null},getPluginURL(){if(!Vi())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return Zr}};class vt{constructor(e,r){this.zoom=e,r?(this.now=r.now,this.fadeDuration=r.fadeDuration,this.zoomHistory=r.zoomHistory,this.transition=r.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Oa,this.transition={})}isSupportedScript(e){return function(r,s){for(const o of r)if(!Bl(o.charCodeAt(0),s))return!1;return!0}(e,Gi.isLoaded())}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const e=this.zoom,r=e-Math.floor(e),s=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*s}:{fromScale:.5,toScale:1,t:1-(1-s)*r}}}class na{constructor(e,r){this.property=e,this.value=r,this.expression=function(s,o){if(Gs(s))return new ln(s,o);if(Xs(s)){const u=_t(s,o);if(u.result==="error")throw new Error(u.value.map(d=>`${d.key}: ${d.message}`).join(", "));return u.value}{let u=s;return o.type==="color"&&typeof s=="string"?u=Oe.parse(s):o.type!=="padding"||typeof s!="number"&&!Array.isArray(s)?o.type==="variableAnchorOffsetCollection"&&Array.isArray(s)&&(u=ri.parse(s)):u=Ii.parse(s),{kind:"constant",evaluate:()=>u}}}(r===void 0?e.specification.default:r,e.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(e,r,s){return this.property.possiblyEvaluate(this,e,r,s)}}class Ln{constructor(e){this.property=e,this.value=new na(e,void 0)}transitioned(e,r){return new sa(this.property,this.value,r,mt({},e.transition,this.transition),e.now)}untransitioned(){return new sa(this.property,this.value,null,{},0)}}class Zo{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return Ui(this._values[e].value.value)}setValue(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new Ln(this._values[e].property)),this._values[e].value=new na(this._values[e].property,r===null?void 0:Ui(r))}getTransition(e){return Ui(this._values[e].transition)}setTransition(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new Ln(this._values[e].property)),this._values[e].transition=Ui(r)||void 0}serialize(){const e={};for(const r of Object.keys(this._values)){const s=this.getValue(r);s!==void 0&&(e[r]=s);const o=this.getTransition(r);o!==void 0&&(e[`${r}-transition`]=o)}return e}transitioned(e,r){const s=new jo(this._properties);for(const o of Object.keys(this._values))s._values[o]=this._values[o].transitioned(e,r._values[o]);return s}untransitioned(){const e=new jo(this._properties);for(const r of Object.keys(this._values))e._values[r]=this._values[r].untransitioned();return e}}class sa{constructor(e,r,s,o,u){this.property=e,this.value=r,this.begin=u+o.delay||0,this.end=this.begin+o.duration||0,e.specification.transition&&(o.delay||o.duration)&&(this.prior=s)}possiblyEvaluate(e,r,s){const o=e.now||0,u=this.value.possiblyEvaluate(e,r,s),d=this.prior;if(d){if(o>this.end)return this.prior=null,u;if(this.value.isDataDriven())return this.prior=null,u;if(o=1)return 1;const x=_*_,w=x*_;return 4*(_<.5?w:3*(_-x)+w-.75)}(f))}}return u}}class jo{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,r,s){const o=new xs(this._properties);for(const u of Object.keys(this._values))o._values[u]=this._values[u].possiblyEvaluate(e,r,s);return o}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class Rl{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}hasValue(e){return this._values[e].value!==void 0}getValue(e){return Ui(this._values[e].value)}setValue(e,r){this._values[e]=new na(this._values[e].property,r===null?void 0:Ui(r))}serialize(){const e={};for(const r of Object.keys(this._values)){const s=this.getValue(r);s!==void 0&&(e[r]=s)}return e}possiblyEvaluate(e,r,s){const o=new xs(this._properties);for(const u of Object.keys(this._values))o._values[u]=this._values[u].possiblyEvaluate(e,r,s);return o}}class Ki{constructor(e,r,s){this.property=e,this.value=r,this.parameters=s}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,r,s,o){return this.property.evaluate(this.value,this.parameters,e,r,s,o)}}class xs{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class Me{constructor(e){this.specification=e}possiblyEvaluate(e,r){if(e.isDataDriven())throw new Error("Value should not be data driven");return e.expression.evaluate(r)}interpolate(e,r,s){const o=Ci[this.specification.type];return o?o(e,r,s):e}}class Re{constructor(e,r){this.specification=e,this.overrides=r}possiblyEvaluate(e,r,s,o){return new Ki(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(r,null,{},s,o)}:e.expression,r)}interpolate(e,r,s){if(e.value.kind!=="constant"||r.value.kind!=="constant")return e;if(e.value.value===void 0||r.value.value===void 0)return new Ki(this,{kind:"constant",value:void 0},e.parameters);const o=Ci[this.specification.type];if(o){const u=o(e.value.value,r.value.value,s);return new Ki(this,{kind:"constant",value:u},e.parameters)}return e}evaluate(e,r,s,o,u,d){return e.kind==="constant"?e.value:e.evaluate(r,s,o,u,d)}}class aa extends Re{possiblyEvaluate(e,r,s,o){if(e.value===void 0)return new Ki(this,{kind:"constant",value:void 0},r);if(e.expression.kind==="constant"){const u=e.expression.evaluate(r,null,{},s,o),d=e.property.specification.type==="resolvedImage"&&typeof u!="string"?u.name:u,f=this._calculate(d,d,d,r);return new Ki(this,{kind:"constant",value:f},r)}if(e.expression.kind==="camera"){const u=this._calculate(e.expression.evaluate({zoom:r.zoom-1}),e.expression.evaluate({zoom:r.zoom}),e.expression.evaluate({zoom:r.zoom+1}),r);return new Ki(this,{kind:"constant",value:u},r)}return new Ki(this,e.expression,r)}evaluate(e,r,s,o,u,d){if(e.kind==="source"){const f=e.evaluate(r,s,o,u,d);return this._calculate(f,f,f,r)}return e.kind==="composite"?this._calculate(e.evaluate({zoom:Math.floor(r.zoom)-1},s,o),e.evaluate({zoom:Math.floor(r.zoom)},s,o),e.evaluate({zoom:Math.floor(r.zoom)+1},s,o),r):e.value}_calculate(e,r,s,o){return o.zoom>o.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:s,to:r}}interpolate(e){return e}}class Xa{constructor(e){this.specification=e}possiblyEvaluate(e,r,s,o){if(e.value!==void 0){if(e.expression.kind==="constant"){const u=e.expression.evaluate(r,null,{},s,o);return this._calculate(u,u,u,r)}return this._calculate(e.expression.evaluate(new vt(Math.floor(r.zoom-1),r)),e.expression.evaluate(new vt(Math.floor(r.zoom),r)),e.expression.evaluate(new vt(Math.floor(r.zoom+1),r)),r)}}_calculate(e,r,s,o){return o.zoom>o.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:s,to:r}}interpolate(e){return e}}class Wa{constructor(e){this.specification=e}possiblyEvaluate(e,r,s,o){return!!e.expression.evaluate(r,null,{},s,o)}interpolate(){return!1}}class xi{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const r in e){const s=e[r];s.specification.overridable&&this.overridableProperties.push(r);const o=this.defaultPropertyValues[r]=new na(s,void 0),u=this.defaultTransitionablePropertyValues[r]=new Ln(s);this.defaultTransitioningPropertyValues[r]=u.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=o.possiblyEvaluate({})}}}we("DataDrivenProperty",Re),we("DataConstantProperty",Me),we("CrossFadedDataDrivenProperty",aa),we("CrossFadedProperty",Xa),we("ColorRampProperty",Wa);const un="-transition";class fr extends Fr{constructor(e,r){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new Rl(r.layout)),r.paint)){this._transitionablePaint=new Zo(r.paint);for(const s in e.paint)this.setPaintProperty(s,e.paint[s],{validate:!1});for(const s in e.layout)this.setLayoutProperty(s,e.layout[s],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new xs(r.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return e==="visibility"?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,r,s={}){r!=null&&this._validate(Dl,`layers.${this.id}.layout.${e}`,e,r,s)||(e!=="visibility"?this._unevaluatedLayout.setValue(e,r):this.visibility=r)}getPaintProperty(e){return e.endsWith(un)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,r,s={}){if(r!=null&&this._validate(ds,`layers.${this.id}.paint.${e}`,e,r,s))return!1;if(e.endsWith(un))return this._transitionablePaint.setTransition(e.slice(0,-11),r||void 0),!1;{const o=this._transitionablePaint._values[e],u=o.property.specification["property-type"]==="cross-faded-data-driven",d=o.value.isDataDriven(),f=o.value;this._transitionablePaint.setValue(e,r),this._handleSpecialPaintPropertyUpdate(e);const _=this._transitionablePaint._values[e].value;return _.isDataDriven()||d||u||this._handleOverridablePaintPropertyUpdate(e,f,_)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,r,s){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||this.visibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,r){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,r)}serialize(){const e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),jn(e,(r,s)=>!(r===void 0||s==="layout"&&!Object.keys(r).length||s==="paint"&&!Object.keys(r).length))}_validate(e,r,s,o,u={}){return(!u||u.validate!==!1)&&ia(this,e.call(ps,{key:r,layerType:this.type,objectKey:s,value:o,styleSpec:re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const e in this.paint._values){const r=this.paint.get(e);if(r instanceof Ki&&kn(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}}const Fl={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class vs{constructor(e,r){this._structArray=e,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Tt{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,r){return e._trim(),r&&(e.isTransferred=!0,r.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){const r=Object.create(this.prototype);return r.arrayBuffer=e.arrayBuffer,r.length=e.length,r.capacity=e.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Rt(i,e=1){let r=0,s=0;return{members:i.map(o=>{const u=Fl[o.type].BYTES_PER_ELEMENT,d=r=Go(r,Math.max(e,u)),f=o.components||1;return s=Math.max(s,u),r+=u*f,{name:o.name,type:o.type,components:f,offset:d}}),size:Go(r,Math.max(s,e)),alignment:e}}function Go(i,e){return Math.ceil(i/e)*e}class Xi extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r){const s=this.length;return this.resize(s+1),this.emplace(s,e,r)}emplace(e,r,s){const o=2*e;return this.int16[o+0]=r,this.int16[o+1]=s,e}}Xi.prototype.bytesPerElement=4,we("StructArrayLayout2i4",Xi);class bs extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s){const o=this.length;return this.resize(o+1),this.emplace(o,e,r,s)}emplace(e,r,s,o){const u=3*e;return this.int16[u+0]=r,this.int16[u+1]=s,this.int16[u+2]=o,e}}bs.prototype.bytesPerElement=6,we("StructArrayLayout3i6",bs);class ws extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,o){const u=this.length;return this.resize(u+1),this.emplace(u,e,r,s,o)}emplace(e,r,s,o,u){const d=4*e;return this.int16[d+0]=r,this.int16[d+1]=s,this.int16[d+2]=o,this.int16[d+3]=u,e}}ws.prototype.bytesPerElement=8,we("StructArrayLayout4i8",ws);class oa extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,o,u,d){const f=this.length;return this.resize(f+1),this.emplace(f,e,r,s,o,u,d)}emplace(e,r,s,o,u,d,f){const _=6*e;return this.int16[_+0]=r,this.int16[_+1]=s,this.int16[_+2]=o,this.int16[_+3]=u,this.int16[_+4]=d,this.int16[_+5]=f,e}}oa.prototype.bytesPerElement=12,we("StructArrayLayout2i4i12",oa);class Ts extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,o,u,d){const f=this.length;return this.resize(f+1),this.emplace(f,e,r,s,o,u,d)}emplace(e,r,s,o,u,d,f){const _=4*e,x=8*e;return this.int16[_+0]=r,this.int16[_+1]=s,this.uint8[x+4]=o,this.uint8[x+5]=u,this.uint8[x+6]=d,this.uint8[x+7]=f,e}}Ts.prototype.bytesPerElement=8,we("StructArrayLayout2i4ub8",Ts);class Es extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r){const s=this.length;return this.resize(s+1),this.emplace(s,e,r)}emplace(e,r,s){const o=2*e;return this.float32[o+0]=r,this.float32[o+1]=s,e}}Es.prototype.bytesPerElement=8,we("StructArrayLayout2f8",Es);class Bn extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s,o,u,d,f,_,x,w){const E=this.length;return this.resize(E+1),this.emplace(E,e,r,s,o,u,d,f,_,x,w)}emplace(e,r,s,o,u,d,f,_,x,w,E){const I=10*e;return this.uint16[I+0]=r,this.uint16[I+1]=s,this.uint16[I+2]=o,this.uint16[I+3]=u,this.uint16[I+4]=d,this.uint16[I+5]=f,this.uint16[I+6]=_,this.uint16[I+7]=x,this.uint16[I+8]=w,this.uint16[I+9]=E,e}}Bn.prototype.bytesPerElement=20,we("StructArrayLayout10ui20",Bn);class pn extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s,o,u,d,f,_,x,w,E,I){const P=this.length;return this.resize(P+1),this.emplace(P,e,r,s,o,u,d,f,_,x,w,E,I)}emplace(e,r,s,o,u,d,f,_,x,w,E,I,P){const M=12*e;return this.int16[M+0]=r,this.int16[M+1]=s,this.int16[M+2]=o,this.int16[M+3]=u,this.uint16[M+4]=d,this.uint16[M+5]=f,this.uint16[M+6]=_,this.uint16[M+7]=x,this.int16[M+8]=w,this.int16[M+9]=E,this.int16[M+10]=I,this.int16[M+11]=P,e}}pn.prototype.bytesPerElement=24,we("StructArrayLayout4i4ui4i24",pn);class Ha extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s){const o=this.length;return this.resize(o+1),this.emplace(o,e,r,s)}emplace(e,r,s,o){const u=3*e;return this.float32[u+0]=r,this.float32[u+1]=s,this.float32[u+2]=o,e}}Ha.prototype.bytesPerElement=12,we("StructArrayLayout3f12",Ha);class la extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint32[1*e+0]=r,e}}la.prototype.bytesPerElement=4,we("StructArrayLayout1ul4",la);class dn extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s,o,u,d,f,_,x){const w=this.length;return this.resize(w+1),this.emplace(w,e,r,s,o,u,d,f,_,x)}emplace(e,r,s,o,u,d,f,_,x,w){const E=10*e,I=5*e;return this.int16[E+0]=r,this.int16[E+1]=s,this.int16[E+2]=o,this.int16[E+3]=u,this.int16[E+4]=d,this.int16[E+5]=f,this.uint32[I+3]=_,this.uint16[E+8]=x,this.uint16[E+9]=w,e}}dn.prototype.bytesPerElement=20,we("StructArrayLayout6i1ul2ui20",dn);class Ka extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,o,u,d){const f=this.length;return this.resize(f+1),this.emplace(f,e,r,s,o,u,d)}emplace(e,r,s,o,u,d,f){const _=6*e;return this.int16[_+0]=r,this.int16[_+1]=s,this.int16[_+2]=o,this.int16[_+3]=u,this.int16[_+4]=d,this.int16[_+5]=f,e}}Ka.prototype.bytesPerElement=12,we("StructArrayLayout2i2i2i12",Ka);class Ya extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,s,o,u){const d=this.length;return this.resize(d+1),this.emplace(d,e,r,s,o,u)}emplace(e,r,s,o,u,d){const f=4*e,_=8*e;return this.float32[f+0]=r,this.float32[f+1]=s,this.float32[f+2]=o,this.int16[_+6]=u,this.int16[_+7]=d,e}}Ya.prototype.bytesPerElement=16,we("StructArrayLayout2f1f2i16",Ya);class ca extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s,o){const u=this.length;return this.resize(u+1),this.emplace(u,e,r,s,o)}emplace(e,r,s,o,u){const d=12*e,f=3*e;return this.uint8[d+0]=r,this.uint8[d+1]=s,this.float32[f+1]=o,this.float32[f+2]=u,e}}ca.prototype.bytesPerElement=12,we("StructArrayLayout2ub2f12",ca);class ha extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s){const o=this.length;return this.resize(o+1),this.emplace(o,e,r,s)}emplace(e,r,s,o){const u=3*e;return this.uint16[u+0]=r,this.uint16[u+1]=s,this.uint16[u+2]=o,e}}ha.prototype.bytesPerElement=6,we("StructArrayLayout3ui6",ha);class Ja extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s,o,u,d,f,_,x,w,E,I,P,M,B,O,N){const H=this.length;return this.resize(H+1),this.emplace(H,e,r,s,o,u,d,f,_,x,w,E,I,P,M,B,O,N)}emplace(e,r,s,o,u,d,f,_,x,w,E,I,P,M,B,O,N,H){const j=24*e,Y=12*e,Q=48*e;return this.int16[j+0]=r,this.int16[j+1]=s,this.uint16[j+2]=o,this.uint16[j+3]=u,this.uint32[Y+2]=d,this.uint32[Y+3]=f,this.uint32[Y+4]=_,this.uint16[j+10]=x,this.uint16[j+11]=w,this.uint16[j+12]=E,this.float32[Y+7]=I,this.float32[Y+8]=P,this.uint8[Q+36]=M,this.uint8[Q+37]=B,this.uint8[Q+38]=O,this.uint32[Y+10]=N,this.int16[j+22]=H,e}}Ja.prototype.bytesPerElement=48,we("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ja);class rt extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s,o,u,d,f,_,x,w,E,I,P,M,B,O,N,H,j,Y,Q,se,be,Ae,ve,ye,de,Te){const fe=this.length;return this.resize(fe+1),this.emplace(fe,e,r,s,o,u,d,f,_,x,w,E,I,P,M,B,O,N,H,j,Y,Q,se,be,Ae,ve,ye,de,Te)}emplace(e,r,s,o,u,d,f,_,x,w,E,I,P,M,B,O,N,H,j,Y,Q,se,be,Ae,ve,ye,de,Te,fe){const ue=32*e,Le=16*e;return this.int16[ue+0]=r,this.int16[ue+1]=s,this.int16[ue+2]=o,this.int16[ue+3]=u,this.int16[ue+4]=d,this.int16[ue+5]=f,this.int16[ue+6]=_,this.int16[ue+7]=x,this.uint16[ue+8]=w,this.uint16[ue+9]=E,this.uint16[ue+10]=I,this.uint16[ue+11]=P,this.uint16[ue+12]=M,this.uint16[ue+13]=B,this.uint16[ue+14]=O,this.uint16[ue+15]=N,this.uint16[ue+16]=H,this.uint16[ue+17]=j,this.uint16[ue+18]=Y,this.uint16[ue+19]=Q,this.uint16[ue+20]=se,this.uint16[ue+21]=be,this.uint16[ue+22]=Ae,this.uint32[Le+12]=ve,this.float32[Le+13]=ye,this.float32[Le+14]=de,this.uint16[ue+30]=Te,this.uint16[ue+31]=fe,e}}rt.prototype.bytesPerElement=64,we("StructArrayLayout8i15ui1ul2f2ui64",rt);class h extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.float32[1*e+0]=r,e}}h.prototype.bytesPerElement=4,we("StructArrayLayout1f4",h);class t extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s){const o=this.length;return this.resize(o+1),this.emplace(o,e,r,s)}emplace(e,r,s,o){const u=3*e;return this.uint16[6*e+0]=r,this.float32[u+1]=s,this.float32[u+2]=o,e}}t.prototype.bytesPerElement=12,we("StructArrayLayout1ui2f12",t);class n extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,s){const o=this.length;return this.resize(o+1),this.emplace(o,e,r,s)}emplace(e,r,s,o){const u=4*e;return this.uint32[2*e+0]=r,this.uint16[u+2]=s,this.uint16[u+3]=o,e}}n.prototype.bytesPerElement=8,we("StructArrayLayout1ul2ui8",n);class a extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r){const s=this.length;return this.resize(s+1),this.emplace(s,e,r)}emplace(e,r,s){const o=2*e;return this.uint16[o+0]=r,this.uint16[o+1]=s,e}}a.prototype.bytesPerElement=4,we("StructArrayLayout2ui4",a);class l extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint16[1*e+0]=r,e}}l.prototype.bytesPerElement=2,we("StructArrayLayout1ui2",l);class p extends Tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,s,o){const u=this.length;return this.resize(u+1),this.emplace(u,e,r,s,o)}emplace(e,r,s,o,u){const d=4*e;return this.float32[d+0]=r,this.float32[d+1]=s,this.float32[d+2]=o,this.float32[d+3]=u,e}}p.prototype.bytesPerElement=16,we("StructArrayLayout4f16",p);class m extends vs{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new Pe(this.anchorPointX,this.anchorPointY)}}m.prototype.size=20;class g extends dn{get(e){return new m(this,e)}}we("CollisionBoxArray",g);class y extends vs{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}y.prototype.size=48;class v extends Ja{get(e){return new y(this,e)}}we("PlacedSymbolArray",v);class b extends vs{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}b.prototype.size=64;class T extends rt{get(e){return new b(this,e)}}we("SymbolInstanceArray",T);class C extends h{getoffsetX(e){return this.float32[1*e+0]}}we("GlyphOffsetArray",C);class L extends bs{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}we("SymbolLineVertexArray",L);class D extends vs{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}D.prototype.size=12;class R extends t{get(e){return new D(this,e)}}we("TextAnchorOffsetArray",R);class k extends vs{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}k.prototype.size=8;class G extends n{get(e){return new k(this,e)}}we("FeatureIndexArray",G);class J extends Xi{}class V extends Xi{}class X extends Xi{}class ee extends oa{}class te extends Ts{}class ne extends Es{}class he extends Bn{}class ce extends pn{}class pe extends Ha{}class Ie extends la{}class Ze extends Ka{}class _e extends ca{}class ke extends ha{}class Ee extends a{}const bt=Rt([{name:"a_pos",components:2,type:"Int16"}],4),{members:je}=bt;class De{constructor(e=[]){this.segments=e}prepareSegment(e,r,s,o){let u=this.segments[this.segments.length-1];return e>De.MAX_VERTEX_ARRAY_LENGTH&&pi(`Max vertices per segment is ${De.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!u||u.vertexLength+e>De.MAX_VERTEX_ARRAY_LENGTH||u.sortKey!==o)&&(u={vertexOffset:r.length,primitiveOffset:s.length,vertexLength:0,primitiveLength:0},o!==void 0&&(u.sortKey=o),this.segments.push(u)),u}get(){return this.segments}destroy(){for(const e of this.segments)for(const r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,s,o){return new De([{vertexOffset:e,primitiveOffset:r,vertexLength:s,primitiveLength:o,vaos:{},sortKey:0}])}}function Ge(i,e){return 256*(i=at(Math.floor(i),0,255))+at(Math.floor(e),0,255)}De.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,we("SegmentVector",De);const Et=Rt([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var lt={exports:{}},zi={exports:{}};zi.exports=function(i,e){var r,s,o,u,d,f,_,x;for(s=i.length-(r=3&i.length),o=e,d=3432918353,f=461845907,x=0;x>>16)*d&65535)<<16)&4294967295)<<15|_>>>17))*f+(((_>>>16)*f&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(u>>>16)&65535)<<16);switch(_=0,r){case 3:_^=(255&i.charCodeAt(x+2))<<16;case 2:_^=(255&i.charCodeAt(x+1))<<8;case 1:o^=_=(65535&(_=(_=(65535&(_^=255&i.charCodeAt(x)))*d+(((_>>>16)*d&65535)<<16)&4294967295)<<15|_>>>17))*f+(((_>>>16)*f&65535)<<16)&4294967295}return o^=i.length,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,(o^=o>>>16)>>>0};var ti=zi.exports,Mt={exports:{}};Mt.exports=function(i,e){for(var r,s=i.length,o=e^s,u=0;s>=4;)r=1540483477*(65535&(r=255&i.charCodeAt(u)|(255&i.charCodeAt(++u))<<8|(255&i.charCodeAt(++u))<<16|(255&i.charCodeAt(++u))<<24))+((1540483477*(r>>>16)&65535)<<16),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),s-=4,++u;switch(s){case 3:o^=(255&i.charCodeAt(u+2))<<16;case 2:o^=(255&i.charCodeAt(u+1))<<8;case 1:o=1540483477*(65535&(o^=255&i.charCodeAt(u)))+((1540483477*(o>>>16)&65535)<<16)}return o=1540483477*(65535&(o^=o>>>13))+((1540483477*(o>>>16)&65535)<<16),(o^=o>>>15)>>>0};var vi=ti,mr=Mt.exports;lt.exports=vi,lt.exports.murmur3=vi,lt.exports.murmur2=mr;var Yi=xt(lt.exports);class gr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,s,o){this.ids.push(Rn(e)),this.positions.push(r,s,o)}getPositions(e){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const r=Rn(e);let s=0,o=this.ids.length-1;for(;s>1;this.ids[d]>=r?o=d:s=d+1}const u=[];for(;this.ids[s]===r;)u.push({index:this.positions[3*s],start:this.positions[3*s+1],end:this.positions[3*s+2]}),s++;return u}static serialize(e,r){const s=new Float64Array(e.ids),o=new Uint32Array(e.positions);return jr(s,o,0,s.length-1),r&&r.push(s.buffer,o.buffer),{ids:s,positions:o}}static deserialize(e){const r=new gr;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}}function Rn(i){const e=+i;return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e:Yi(String(i))}function jr(i,e,r,s){for(;r>1];let u=r-1,d=s+1;for(;;){do u++;while(i[u]o);if(u>=d)break;Ir(i,u,d),Ir(e,3*u,3*d),Ir(e,3*u+1,3*d+1),Ir(e,3*u+2,3*d+2)}d-r`u_${o}`),this.type=s}setUniform(e,r,s){e.set(s.constantOr(this.value))}getBinding(e,r,s){return this.type==="color"?new Fn(e,r):new Zt(e,r)}}class St{constructor(e,r){this.uniformNames=r.map(s=>`u_${s}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=e.tlbr}setUniform(e,r,s,o){const u=o==="u_pattern_to"?this.patternTo:o==="u_pattern_from"?this.patternFrom:o==="u_pixel_ratio_to"?this.pixelRatioTo:o==="u_pixel_ratio_from"?this.pixelRatioFrom:null;u&&e.set(u)}getBinding(e,r,s){return s.substr(0,9)==="u_pattern"?new si(e,r):new Zt(e,r)}}class Ar{constructor(e,r,s,o){this.expression=e,this.type=s,this.maxValue=0,this.paintVertexAttributes=r.map(u=>({name:`a_${u}`,type:"Float32",components:s==="color"?2:1,offset:0})),this.paintVertexArray=new o}populatePaintArray(e,r,s,o,u){const d=this.paintVertexArray.length,f=this.expression.evaluate(new vt(0),r,{},o,[],u);this.paintVertexArray.resize(e),this._setPaintValue(d,e,f)}updatePaintArray(e,r,s,o){const u=this.expression.evaluate({zoom:0},s,o);this._setPaintValue(e,r,u)}_setPaintValue(e,r,s){if(this.type==="color"){const o=Nt(s);for(let u=e;u`u_${f}_t`),this.type=s,this.useIntegerZoom=o,this.zoom=u,this.maxValue=0,this.paintVertexAttributes=r.map(f=>({name:`a_${f}`,type:"Float32",components:s==="color"?4:2,offset:0})),this.paintVertexArray=new d}populatePaintArray(e,r,s,o,u){const d=this.expression.evaluate(new vt(this.zoom),r,{},o,[],u),f=this.expression.evaluate(new vt(this.zoom+1),r,{},o,[],u),_=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(_,e,d,f)}updatePaintArray(e,r,s,o){const u=this.expression.evaluate({zoom:this.zoom},s,o),d=this.expression.evaluate({zoom:this.zoom+1},s,o);this._setPaintValue(e,r,u,d)}_setPaintValue(e,r,s,o){if(this.type==="color"){const u=Nt(s),d=Nt(o);for(let f=e;f`#define HAS_UNIFORM_${o}`))}return e}getBinderAttributes(){const e=[];for(const r in this.binders){const s=this.binders[r];if(s instanceof Ar||s instanceof Ji)for(let o=0;o!0){this.programConfigurations={};for(const o of e)this.programConfigurations[o.id]=new Xo(o,r,s);this.needsUpload=!1,this._featureMap=new gr,this._bufferOffset=0}populatePaintArrays(e,r,s,o,u,d){for(const f in this.programConfigurations)this.programConfigurations[f].populatePaintArrays(e,r,o,u,d);r.id!==void 0&&this._featureMap.add(r.id,s,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,r,s,o){for(const u of s)this.needsUpload=this.programConfigurations[u.id].updatePaintArrays(e,this._featureMap,r,u,o)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const r in this.programConfigurations)this.programConfigurations[r].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function Ol(i,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[i]||[i.replace(`${e}-`,"").replace(/-/g,"_")]}function mn(i,e,r){const s={color:{source:Es,composite:p},number:{source:h,composite:Es}},o=function(u){return{"line-pattern":{source:he,composite:he},"fill-pattern":{source:he,composite:he},"fill-extrusion-pattern":{source:he,composite:he}}[u]}(i);return o&&o[r]||s[e][r]}we("ConstantBinder",ai),we("CrossFadedConstantBinder",St),we("SourceExpressionBinder",Ar),we("CrossFadedCompositeBinder",Gr),we("CompositeExpressionBinder",Ji),we("ProgramConfiguration",Xo,{omit:["_buffers"]}),we("ProgramConfigurationSet",fn);const Pt=8192,ua=Math.pow(2,14)-1,Qa=-ua-1;function Cr(i){const e=Pt/i.extent,r=i.loadGeometry();for(let s=0;sd.x+1||_d.y+1)&&pi("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function Xr(i,e){return{type:i.type,id:i.id,properties:i.properties,geometry:e?Cr(i):[]}}function On(i,e,r,s,o){i.emplaceBack(2*e+(s+1)/2,2*r+(o+1)/2)}class Ul{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new V,this.indexArray=new ke,this.segments=new De,this.programConfigurations=new fn(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){const o=this.layers[0],u=[];let d=null,f=!1;o.type==="circle"&&(d=o.layout.get("circle-sort-key"),f=!d.isConstant());for(const{feature:_,id:x,index:w,sourceLayerIndex:E}of e){const I=this.layers[0]._featureFilter.needGeometry,P=Xr(_,I);if(!this.layers[0]._featureFilter.filter(new vt(this.zoom),P,s))continue;const M=f?d.evaluate(P,{},s):void 0,B={id:x,properties:_.properties,type:_.type,sourceLayerIndex:E,index:w,geometry:I?P.geometry:Cr(_),patterns:{},sortKey:M};u.push(B)}f&&u.sort((_,x)=>_.sortKey-x.sortKey);for(const _ of u){const{geometry:x,index:w,sourceLayerIndex:E}=_,I=e[w].feature;this.addFeature(_,x,w,s),r.featureIndex.insert(I,x,w,E,this.index)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,je),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,r,s,o){for(const u of r)for(const d of u){const f=d.x,_=d.y;if(f<0||f>=Pt||_<0||_>=Pt)continue;const x=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),w=x.vertexLength;On(this.layoutVertexArray,f,_,-1,-1),On(this.layoutVertexArray,f,_,1,-1),On(this.layoutVertexArray,f,_,1,1),On(this.layoutVertexArray,f,_,-1,1),this.indexArray.emplaceBack(w,w+1,w+2),this.indexArray.emplaceBack(w,w+3,w+2),x.vertexLength+=4,x.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,s,{},o)}}function Cc(i,e){for(let r=0;r1){if(Vl(i,e))return!0;for(let s=0;s1?r:r.sub(e)._mult(o)._add(e))}function zc(i,e){let r,s,o,u=!1;for(let d=0;de.y!=o.y>e.y&&e.x<(o.x-s.x)*(e.y-s.y)/(o.y-s.y)+s.x&&(u=!u)}return u}function pa(i,e){let r=!1;for(let s=0,o=i.length-1;se.y!=d.y>e.y&&e.x<(d.x-u.x)*(e.y-u.y)/(d.y-u.y)+u.x&&(r=!r)}return r}function du(i,e,r){const s=r[0],o=r[2];if(i.xo.x&&e.x>o.x||i.yo.y&&e.y>o.y)return!1;const u=ht(i,e,r[0]);return u!==ht(i,e,r[1])||u!==ht(i,e,r[2])||u!==ht(i,e,r[3])}function eo(i,e,r){const s=e.paint.get(i).value;return s.kind==="constant"?s.value:r.programConfigurations.get(e.id).getMaxValue(i)}function Wo(i){return Math.sqrt(i[0]*i[0]+i[1]*i[1])}function Ho(i,e,r,s,o){if(!e[0]&&!e[1])return i;const u=Pe.convert(e)._mult(o);r==="viewport"&&u._rotate(-s);const d=[];for(let f=0;fBc(O,B))}(x,_),P=E?w*f:w;for(const M of o)for(const B of M){const O=E?B:Bc(B,_);let N=P;const H=Ko([],[B.x,B.y,0,1],_);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?N*=H[3]/d.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(N*=d.cameraToCenterDistance/H[3]),hu(I,O,N))return!0}return!1}}function Bc(i,e){const r=Ko([],[i.x,i.y,0,1],e);return new Pe(r[0]/r[3],r[1]/r[3])}class Rc extends Ul{}let Fc;we("HeatmapBucket",Rc,{omit:["layers"]});var _u={get paint(){return Fc=Fc||new xi({"heatmap-radius":new Re(re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Re(re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Me(re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Wa(re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Me(re.paint_heatmap["heatmap-opacity"])})}};function ql(i,{width:e,height:r},s,o){if(o){if(o instanceof Uint8ClampedArray)o=new Uint8Array(o.buffer);else if(o.length!==e*r*s)throw new RangeError(`mismatched image size. expected: ${o.length} but got: ${e*r*s}`)}else o=new Uint8Array(e*r*s);return i.width=e,i.height=r,i.data=o,i}function Oc(i,{width:e,height:r},s){if(e===i.width&&r===i.height)return;const o=ql({},{width:e,height:r},s);Zl(i,o,{x:0,y:0},{x:0,y:0},{width:Math.min(i.width,e),height:Math.min(i.height,r)},s),i.width=e,i.height=r,i.data=o.data}function Zl(i,e,r,s,o,u){if(o.width===0||o.height===0)return e;if(o.width>i.width||o.height>i.height||r.x>i.width-o.width||r.y>i.height-o.height)throw new RangeError("out of range source coordinates for image copy");if(o.width>e.width||o.height>e.height||s.x>e.width-o.width||s.y>e.height-o.height)throw new RangeError("out of range destination coordinates for image copy");const d=i.data,f=e.data;if(d===f)throw new Error("srcData equals dstData, so image is already copied");for(let _=0;_{e[i.evaluationKey]=_;const x=i.expression.evaluate(e);o.data[d+f+0]=Math.floor(255*x.r/x.a),o.data[d+f+1]=Math.floor(255*x.g/x.a),o.data[d+f+2]=Math.floor(255*x.b/x.a),o.data[d+f+3]=Math.floor(255*x.a)};if(i.clips)for(let d=0,f=0;d80*r){s=u=i[0],o=d=i[1];for(var M=r;Mu&&(u=f),_>d&&(d=_);x=(x=Math.max(u-s,d-o))!==0?32767/x:0}return ro(I,P,r,s,o,x,0),P}function Nc(i,e,r,s,o){var u,d;if(o===Wl(i,e,r,s)>0)for(u=e;u=e;u-=s)d=Zc(u,i[u],i[u+1],d);return d&&Jo(d,d.next)&&(so(d),d=d.next),d}function Ss(i,e){if(!i)return i;e||(e=i);var r,s=i;do if(r=!1,s.steiner||!Jo(s,s.next)&&Ot(s.prev,s,s.next)!==0)s=s.next;else{if(so(s),(s=e=s.prev)===s.next)break;r=!0}while(r||s!==e);return e}function ro(i,e,r,s,o,u,d){if(i){!d&&u&&function(w,E,I,P){var M=w;do M.z===0&&(M.z=Gl(M.x,M.y,E,I,P)),M.prevZ=M.prev,M.nextZ=M.next,M=M.next;while(M!==w);M.prevZ.nextZ=null,M.prevZ=null,function(B){var O,N,H,j,Y,Q,se,be,Ae=1;do{for(N=B,B=null,Y=null,Q=0;N;){for(Q++,H=N,se=0,O=0;O0||be>0&&H;)se!==0&&(be===0||!H||N.z<=H.z)?(j=N,N=N.nextZ,se--):(j=H,H=H.nextZ,be--),Y?Y.nextZ=j:B=j,j.prevZ=Y,Y=j;N=H}Y.nextZ=null,Ae*=2}while(Q>1)}(M)}(i,s,o,u);for(var f,_,x=i;i.prev!==i.next;)if(f=i.prev,_=i.next,u?Eu(i,s,o,u):Tu(i))e.push(f.i/r|0),e.push(i.i/r|0),e.push(_.i/r|0),so(i),i=_.next,x=_.next;else if((i=_)===x){d?d===1?ro(i=Su(Ss(i),e,r),e,r,s,o,u,2):d===2&&Iu(i,e,r,s,o,u):ro(Ss(i),e,r,s,o,u,1);break}}}function Tu(i){var e=i.prev,r=i,s=i.next;if(Ot(e,r,s)>=0)return!1;for(var o=e.x,u=r.x,d=s.x,f=e.y,_=r.y,x=s.y,w=ou?o>d?o:d:u>d?u:d,P=f>_?f>x?f:x:_>x?_:x,M=s.next;M!==e;){if(M.x>=w&&M.x<=I&&M.y>=E&&M.y<=P&&fa(o,f,u,_,d,x,M.x,M.y)&&Ot(M.prev,M,M.next)>=0)return!1;M=M.next}return!0}function Eu(i,e,r,s){var o=i.prev,u=i,d=i.next;if(Ot(o,u,d)>=0)return!1;for(var f=o.x,_=u.x,x=d.x,w=o.y,E=u.y,I=d.y,P=f<_?f_?f>x?f:x:_>x?_:x,O=w>E?w>I?w:I:E>I?E:I,N=Gl(P,M,e,r,s),H=Gl(B,O,e,r,s),j=i.prevZ,Y=i.nextZ;j&&j.z>=N&&Y&&Y.z<=H;){if(j.x>=P&&j.x<=B&&j.y>=M&&j.y<=O&&j!==o&&j!==d&&fa(f,w,_,E,x,I,j.x,j.y)&&Ot(j.prev,j,j.next)>=0||(j=j.prevZ,Y.x>=P&&Y.x<=B&&Y.y>=M&&Y.y<=O&&Y!==o&&Y!==d&&fa(f,w,_,E,x,I,Y.x,Y.y)&&Ot(Y.prev,Y,Y.next)>=0))return!1;Y=Y.nextZ}for(;j&&j.z>=N;){if(j.x>=P&&j.x<=B&&j.y>=M&&j.y<=O&&j!==o&&j!==d&&fa(f,w,_,E,x,I,j.x,j.y)&&Ot(j.prev,j,j.next)>=0)return!1;j=j.prevZ}for(;Y&&Y.z<=H;){if(Y.x>=P&&Y.x<=B&&Y.y>=M&&Y.y<=O&&Y!==o&&Y!==d&&fa(f,w,_,E,x,I,Y.x,Y.y)&&Ot(Y.prev,Y,Y.next)>=0)return!1;Y=Y.nextZ}return!0}function Su(i,e,r){var s=i;do{var o=s.prev,u=s.next.next;!Jo(o,u)&&$c(o,s,s.next,u)&&no(o,u)&&no(u,o)&&(e.push(o.i/r|0),e.push(s.i/r|0),e.push(u.i/r|0),so(s),so(s.next),s=i=u),s=s.next}while(s!==i);return Ss(s)}function Iu(i,e,r,s,o,u){var d=i;do{for(var f=d.next.next;f!==d.prev;){if(d.i!==f.i&&zu(d,f)){var _=qc(d,f);return d=Ss(d,d.next),_=Ss(_,_.next),ro(d,e,r,s,o,u,0),void ro(_,e,r,s,o,u,0)}f=f.next}d=d.next}while(d!==i)}function Au(i,e){return i.x-e.x}function Cu(i,e){var r=function(o,u){var d,f=u,_=o.x,x=o.y,w=-1/0;do{if(x<=f.y&&x>=f.next.y&&f.next.y!==f.y){var E=f.x+(x-f.y)*(f.next.x-f.x)/(f.next.y-f.y);if(E<=_&&E>w&&(w=E,d=f.x=f.x&&f.x>=M&&_!==f.x&&fa(xd.x||f.x===d.x&&Pu(d,f)))&&(d=f,O=I)),f=f.next;while(f!==P);return d}(i,e);if(!r)return e;var s=qc(r,i);return Ss(s,s.next),Ss(r,r.next)}function Pu(i,e){return Ot(i.prev,i,e.prev)<0&&Ot(e.next,i,i.next)<0}function Gl(i,e,r,s,o){return(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=(i-r)*o|0)|i<<8))|i<<4))|i<<2))|i<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Mu(i){var e=i,r=i;do(e.x=(i-d)*(u-f)&&(i-d)*(s-f)>=(r-d)*(e-f)&&(r-d)*(u-f)>=(o-d)*(s-f)}function zu(i,e){return i.next.i!==e.i&&i.prev.i!==e.i&&!function(r,s){var o=r;do{if(o.i!==r.i&&o.next.i!==r.i&&o.i!==s.i&&o.next.i!==s.i&&$c(o,o.next,r,s))return!0;o=o.next}while(o!==r);return!1}(i,e)&&(no(i,e)&&no(e,i)&&function(r,s){var o=r,u=!1,d=(r.x+s.x)/2,f=(r.y+s.y)/2;do o.y>f!=o.next.y>f&&o.next.y!==o.y&&d<(o.next.x-o.x)*(f-o.y)/(o.next.y-o.y)+o.x&&(u=!u),o=o.next;while(o!==r);return u}(i,e)&&(Ot(i.prev,i,e.prev)||Ot(i,e.prev,e))||Jo(i,e)&&Ot(i.prev,i,i.next)>0&&Ot(e.prev,e,e.next)>0)}function Ot(i,e,r){return(e.y-i.y)*(r.x-e.x)-(e.x-i.x)*(r.y-e.y)}function Jo(i,e){return i.x===e.x&&i.y===e.y}function $c(i,e,r,s){var o=el(Ot(i,e,r)),u=el(Ot(i,e,s)),d=el(Ot(r,s,i)),f=el(Ot(r,s,e));return o!==u&&d!==f||!(o!==0||!Qo(i,r,e))||!(u!==0||!Qo(i,s,e))||!(d!==0||!Qo(r,i,s))||!(f!==0||!Qo(r,e,s))}function Qo(i,e,r){return e.x<=Math.max(i.x,r.x)&&e.x>=Math.min(i.x,r.x)&&e.y<=Math.max(i.y,r.y)&&e.y>=Math.min(i.y,r.y)}function el(i){return i>0?1:i<0?-1:0}function no(i,e){return Ot(i.prev,i,i.next)<0?Ot(i,e,i.next)>=0&&Ot(i,i.prev,e)>=0:Ot(i,e,i.prev)<0||Ot(i,i.next,e)<0}function qc(i,e){var r=new Xl(i.i,i.x,i.y),s=new Xl(e.i,e.x,e.y),o=i.next,u=e.prev;return i.next=e,e.prev=i,r.next=o,o.prev=r,s.next=r,r.prev=s,u.next=s,s.prev=u,s}function Zc(i,e,r,s){var o=new Xl(i,e,r);return s?(o.next=s.next,o.prev=s,s.next.prev=o,s.next=o):(o.prev=o,o.next=o),o}function so(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function Xl(i,e,r){this.i=i,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Wl(i,e,r,s){for(var o=0,u=e,d=r-s;u0&&r.holes.push(s+=i[o-1].length)}return r};var jc=xt(jl.exports);function ku(i,e,r,s,o){Gc(i,e,r||0,s||i.length-1,o||Du)}function Gc(i,e,r,s,o){for(;s>r;){if(s-r>600){var u=s-r+1,d=e-r+1,f=Math.log(u),_=.5*Math.exp(2*f/3),x=.5*Math.sqrt(f*_*(u-_)/u)*(d-u/2<0?-1:1);Gc(i,e,Math.max(r,Math.floor(e-d*_/u+x)),Math.min(s,Math.floor(e+(u-d)*_/u+x)),o)}var w=i[e],E=r,I=s;for(ao(i,r,e),o(i[s],w)>0&&ao(i,r,s);E0;)I--}o(i[r],w)===0?ao(i,r,I):ao(i,++I,s),I<=e&&(r=I+1),e<=I&&(s=I-1)}}function ao(i,e,r){var s=i[e];i[e]=i[r],i[r]=s}function Du(i,e){return ie?1:0}function Hl(i,e){const r=i.length;if(r<=1)return[i];const s=[];let o,u;for(let d=0;d1)for(let d=0;dr.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new X,this.indexArray=new ke,this.indexArray2=new Ee,this.programConfigurations=new fn(e.layers,e.zoom),this.segments=new De,this.segments2=new De,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){this.hasPattern=Kl("fill",this.layers,r);const o=this.layers[0].layout.get("fill-sort-key"),u=!o.isConstant(),d=[];for(const{feature:f,id:_,index:x,sourceLayerIndex:w}of e){const E=this.layers[0]._featureFilter.needGeometry,I=Xr(f,E);if(!this.layers[0]._featureFilter.filter(new vt(this.zoom),I,s))continue;const P=u?o.evaluate(I,{},s,r.availableImages):void 0,M={id:_,properties:f.properties,type:f.type,sourceLayerIndex:w,index:x,geometry:E?I.geometry:Cr(f),patterns:{},sortKey:P};d.push(M)}u&&d.sort((f,_)=>f.sortKey-_.sortKey);for(const f of d){const{geometry:_,index:x,sourceLayerIndex:w}=f;if(this.hasPattern){const E=Yl("fill",this.layers,f,this.zoom,r);this.patternFeatures.push(E)}else this.addFeature(f,_,x,s,{});r.featureIndex.insert(e[x].feature,_,x,w,this.index)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}addFeatures(e,r,s){for(const o of this.patternFeatures)this.addFeature(o,o.geometry,o.index,r,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,wu),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,r,s,o,u){for(const d of Hl(r,500)){let f=0;for(const P of d)f+=P.length;const _=this.segments.prepareSegment(f,this.layoutVertexArray,this.indexArray),x=_.vertexLength,w=[],E=[];for(const P of d){if(P.length===0)continue;P!==d[0]&&E.push(w.length/2);const M=this.segments2.prepareSegment(P.length,this.layoutVertexArray,this.indexArray2),B=M.vertexLength;this.layoutVertexArray.emplaceBack(P[0].x,P[0].y),this.indexArray2.emplaceBack(B+P.length-1,B),w.push(P[0].x),w.push(P[0].y);for(let O=1;O>3}if(o--,s===1||s===2)u+=i.readSVarint(),d+=i.readSVarint(),s===1&&(e&&f.push(e),e=[]),e.push(new Vu(u,d));else{if(s!==7)throw new Error("unknown command "+s);e&&e.push(e[0].clone())}}return e&&f.push(e),f},ma.prototype.bbox=function(){var i=this._pbf;i.pos=this._geometry;for(var e=i.readVarint()+i.pos,r=1,s=0,o=0,u=0,d=1/0,f=-1/0,_=1/0,x=-1/0;i.pos>3}if(s--,r===1||r===2)(o+=i.readSVarint())f&&(f=o),(u+=i.readSVarint())<_&&(_=u),u>x&&(x=u);else if(r!==7)throw new Error("unknown command "+r)}return[d,_,f,x]},ma.prototype.toGeoJSON=function(i,e,r){var s,o,u=this.extent*Math.pow(2,r),d=this.extent*i,f=this.extent*e,_=this.loadGeometry(),x=ma.types[this.type];function w(P){for(var M=0;M>3;o=d===1?s.readString():d===2?s.readFloat():d===3?s.readDouble():d===4?s.readVarint64():d===5?s.readVarint():d===6?s.readSVarint():d===7?s.readBoolean():null}return o}(r))}Yc.prototype.feature=function(i){if(i<0||i>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[i];var e=this._pbf.readVarint()+this._pbf.pos;return new qu(this._pbf,e,this.extent,this._keys,this._values)};var ju=Kc;function Gu(i,e,r){if(i===3){var s=new ju(r,r.readVarint()+r.pos);s.length&&(e[s.name]=s)}}Un.VectorTile=function(i,e){this.layers=i.readFields(Gu,{},e)},Un.VectorTileFeature=Hc,Un.VectorTileLayer=Kc;const Xu=Un.VectorTileFeature.types,Ql=Math.pow(2,13);function oo(i,e,r,s,o,u,d,f){i.emplaceBack(e,r,2*Math.floor(s*Ql)+d,o*Ql*2,u*Ql*2,Math.round(f))}class ec{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ee,this.centroidVertexArray=new J,this.indexArray=new ke,this.programConfigurations=new fn(e.layers,e.zoom),this.segments=new De,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){this.features=[],this.hasPattern=Kl("fill-extrusion",this.layers,r);for(const{feature:o,id:u,index:d,sourceLayerIndex:f}of e){const _=this.layers[0]._featureFilter.needGeometry,x=Xr(o,_);if(!this.layers[0]._featureFilter.filter(new vt(this.zoom),x,s))continue;const w={id:u,sourceLayerIndex:f,index:d,geometry:_?x.geometry:Cr(o),properties:o.properties,type:o.type,patterns:{}};this.hasPattern?this.features.push(Yl("fill-extrusion",this.layers,w,this.zoom,r)):this.addFeature(w,w.geometry,d,s,{}),r.featureIndex.insert(o,w.geometry,d,f,this.index,!0)}}addFeatures(e,r,s){for(const o of this.features){const{geometry:u}=o;this.addFeature(o,u,o.index,r,s)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Uu),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,Ou.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,r,s,o,u){const d={x:0,y:0,vertexCount:0};for(const f of Hl(r,500)){let _=0;for(const M of f)_+=M.length;let x=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const M of f){if(M.length===0||Hu(M))continue;let B=0;for(let O=0;O=1){const H=M[O-1];if(!Wu(N,H)){x.vertexLength+4>De.MAX_VERTEX_ARRAY_LENGTH&&(x=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const j=N.sub(H)._perp()._unit(),Y=H.dist(N);B+Y>32768&&(B=0),oo(this.layoutVertexArray,N.x,N.y,j.x,j.y,0,0,B),oo(this.layoutVertexArray,N.x,N.y,j.x,j.y,0,1,B),d.x+=2*N.x,d.y+=2*N.y,d.vertexCount+=2,B+=Y,oo(this.layoutVertexArray,H.x,H.y,j.x,j.y,0,0,B),oo(this.layoutVertexArray,H.x,H.y,j.x,j.y,0,1,B),d.x+=2*H.x,d.y+=2*H.y,d.vertexCount+=2;const Q=x.vertexLength;this.indexArray.emplaceBack(Q,Q+2,Q+1),this.indexArray.emplaceBack(Q+1,Q+2,Q+3),x.vertexLength+=4,x.primitiveLength+=2}}}}if(x.vertexLength+_>De.MAX_VERTEX_ARRAY_LENGTH&&(x=this.segments.prepareSegment(_,this.layoutVertexArray,this.indexArray)),Xu[e.type]!=="Polygon")continue;const w=[],E=[],I=x.vertexLength;for(const M of f)if(M.length!==0){M!==f[0]&&E.push(w.length/2);for(let B=0;BPt)||i.y===e.y&&(i.y<0||i.y>Pt)}function Hu(i){return i.every(e=>e.x<0)||i.every(e=>e.x>Pt)||i.every(e=>e.y<0)||i.every(e=>e.y>Pt)}let Jc;we("FillExtrusionBucket",ec,{omit:["layers","features"]});var Ku={get paint(){return Jc=Jc||new xi({"fill-extrusion-opacity":new Me(re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Re(re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Me(re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Me(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new aa(re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Re(re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Re(re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Me(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Yu extends fr{constructor(e){super(e,Ku)}createBucket(e){return new ec(e)}queryRadius(){return Wo(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(e,r,s,o,u,d,f,_){const x=Ho(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),d.angle,f),w=this.paint.get("fill-extrusion-height").evaluate(r,s),E=this.paint.get("fill-extrusion-base").evaluate(r,s),I=function(M,B,O,N){const H=[];for(const j of M){const Y=[j.x,j.y,0,1];Ko(Y,Y,B),H.push(new Pe(Y[0]/Y[3],Y[1]/Y[3]))}return H}(x,_),P=function(M,B,O,N){const H=[],j=[],Y=N[8]*B,Q=N[9]*B,se=N[10]*B,be=N[11]*B,Ae=N[8]*O,ve=N[9]*O,ye=N[10]*O,de=N[11]*O;for(const Te of M){const fe=[],ue=[];for(const Le of Te){const Ce=Le.x,qe=Le.y,yt=N[0]*Ce+N[4]*qe+N[12],wt=N[1]*Ce+N[5]*qe+N[13],Xt=N[2]*Ce+N[6]*qe+N[14],Wi=N[3]*Ce+N[7]*qe+N[15],wi=Xt+se,$t=Wi+be,Kt=yt+Ae,li=wt+ve,Di=Xt+ye,Ti=Wi+de,qt=new Pe((yt+Y)/$t,(wt+Q)/$t);qt.z=wi/$t,fe.push(qt);const Wt=new Pe(Kt/Ti,li/Ti);Wt.z=Di/Ti,ue.push(Wt)}H.push(fe),j.push(ue)}return[H,j]}(o,E,w,_);return function(M,B,O){let N=1/0;Pc(O,B)&&(N=Qc(O,B[0]));for(let H=0;Hr.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(r=>{this.gradients[r.id]={}}),this.layoutVertexArray=new te,this.layoutVertexArray2=new ne,this.indexArray=new ke,this.programConfigurations=new fn(e.layers,e.zoom),this.segments=new De,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,s){this.hasPattern=Kl("line",this.layers,r);const o=this.layers[0].layout.get("line-sort-key"),u=!o.isConstant(),d=[];for(const{feature:f,id:_,index:x,sourceLayerIndex:w}of e){const E=this.layers[0]._featureFilter.needGeometry,I=Xr(f,E);if(!this.layers[0]._featureFilter.filter(new vt(this.zoom),I,s))continue;const P=u?o.evaluate(I,{},s):void 0,M={id:_,properties:f.properties,type:f.type,sourceLayerIndex:w,index:x,geometry:E?I.geometry:Cr(f),patterns:{},sortKey:P};d.push(M)}u&&d.sort((f,_)=>f.sortKey-_.sortKey);for(const f of d){const{geometry:_,index:x,sourceLayerIndex:w}=f;if(this.hasPattern){const E=Yl("line",this.layers,f,this.zoom,r);this.patternFeatures.push(E)}else this.addFeature(f,_,x,s,{});r.featureIndex.insert(e[x].feature,_,x,w,this.index)}}update(e,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,s)}addFeatures(e,r,s){for(const o of this.patternFeatures)this.addFeature(o,o.geometry,o.index,r,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,tp)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Qu),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,r,s,o,u){const d=this.layers[0].layout,f=d.get("line-join").evaluate(e,{}),_=d.get("line-cap"),x=d.get("line-miter-limit"),w=d.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(const E of r)this.addLine(E,e,f,_,x,w);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,s,u,o)}addLine(e,r,s,o,u,d){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let N=0;N=2&&e[_-1].equals(e[_-2]);)_--;let x=0;for(;x<_-1&&e[x].equals(e[x+1]);)x++;if(_<(f?3:2))return;s==="bevel"&&(u=1.05);const w=this.overscaling<=16?15*Pt/(512*this.overscaling):0,E=this.segments.prepareSegment(10*_,this.layoutVertexArray,this.indexArray);let I,P,M,B,O;this.e1=this.e2=-1,f&&(I=e[_-2],O=e[x].sub(I)._unit()._perp());for(let N=x;N<_;N++){if(M=N===_-1?f?e[x+1]:void 0:e[N+1],M&&e[N].equals(M))continue;O&&(B=O),I&&(P=I),I=e[N],O=M?M.sub(I)._unit()._perp():B,B=B||O;let H=B.add(O);H.x===0&&H.y===0||H._unit();const j=B.x*O.x+B.y*O.y,Y=H.x*O.x+H.y*O.y,Q=Y!==0?1/Y:1/0,se=2*Math.sqrt(2-2*Y),be=Y0;if(be&&N>x){const de=I.dist(P);if(de>2*w){const Te=I.sub(I.sub(P)._mult(w/de)._round());this.updateDistance(P,Te),this.addCurrentVertex(Te,B,0,0,E),P=Te}}const ve=P&&M;let ye=ve?s:f?"butt":o;if(ve&&ye==="round"&&(Qu&&(ye="bevel"),ye==="bevel"&&(Q>2&&(ye="flipbevel"),Q100)H=O.mult(-1);else{const de=Q*B.add(O).mag()/B.sub(O).mag();H._perp()._mult(de*(Ae?-1:1))}this.addCurrentVertex(I,H,0,0,E),this.addCurrentVertex(I,H.mult(-1),0,0,E)}else if(ye==="bevel"||ye==="fakeround"){const de=-Math.sqrt(Q*Q-1),Te=Ae?de:0,fe=Ae?0:de;if(P&&this.addCurrentVertex(I,B,Te,fe,E),ye==="fakeround"){const ue=Math.round(180*se/Math.PI/20);for(let Le=1;Le2*w){const Te=I.add(M.sub(I)._mult(w/de)._round());this.updateDistance(I,Te),this.addCurrentVertex(Te,O,0,0,E),I=Te}}}}addCurrentVertex(e,r,s,o,u,d=!1){const f=r.y*o-r.x,_=-r.y-r.x*o;this.addHalfVertex(e,r.x+r.y*s,r.y-r.x*s,d,!1,s,u),this.addHalfVertex(e,f,_,d,!0,-o,u),this.distance>eh/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,r,s,o,u,d))}addHalfVertex({x:e,y:r},s,o,u,d,f,_){const x=.5*(this.lineClips?this.scaledDistance*(eh-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+(u?1:0),(r<<1)+(d?1:0),Math.round(63*s)+128,Math.round(63*o)+128,1+(f===0?0:f<0?-1:1)|(63&x)<<2,x>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const w=_.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,w),_.primitiveLength++),d?this.e2=w:this.e1=w}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,r){this.distance+=e.dist(r),this.updateScaledDistance()}}let th,ih;we("LineBucket",tc,{omit:["layers","patternFeatures"]});var rh={get paint(){return ih=ih||new xi({"line-opacity":new Re(re.paint_line["line-opacity"]),"line-color":new Re(re.paint_line["line-color"]),"line-translate":new Me(re.paint_line["line-translate"]),"line-translate-anchor":new Me(re.paint_line["line-translate-anchor"]),"line-width":new Re(re.paint_line["line-width"]),"line-gap-width":new Re(re.paint_line["line-gap-width"]),"line-offset":new Re(re.paint_line["line-offset"]),"line-blur":new Re(re.paint_line["line-blur"]),"line-dasharray":new Xa(re.paint_line["line-dasharray"]),"line-pattern":new aa(re.paint_line["line-pattern"]),"line-gradient":new Wa(re.paint_line["line-gradient"])})},get layout(){return th=th||new xi({"line-cap":new Me(re.layout_line["line-cap"]),"line-join":new Re(re.layout_line["line-join"]),"line-miter-limit":new Me(re.layout_line["line-miter-limit"]),"line-round-limit":new Me(re.layout_line["line-round-limit"]),"line-sort-key":new Re(re.layout_line["line-sort-key"])})}};class np extends Re{possiblyEvaluate(e,r){return r=new vt(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(e,r)}evaluate(e,r,s,o){return r=mt({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(e,r,s,o)}}let tl;class sp extends fr{constructor(e){super(e,rh),this.gradientVersion=0,tl||(tl=new np(rh.paint.properties["line-width"].specification),tl.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){e==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof is,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER)}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,r){super.recalculate(e,r),this.paint._values["line-floorwidth"]=tl.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new tc(e)}queryRadius(e){const r=e,s=nh(eo("line-width",this,r),eo("line-gap-width",this,r)),o=eo("line-offset",this,r);return s/2+Math.abs(o)+Wo(this.paint.get("line-translate"))}queryIntersectsFeature(e,r,s,o,u,d,f){const _=Ho(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),d.angle,f),x=f/2*nh(this.paint.get("line-width").evaluate(r,s),this.paint.get("line-gap-width").evaluate(r,s)),w=this.paint.get("line-offset").evaluate(r,s);return w&&(o=function(E,I){const P=[];for(let M=0;M=3){for(let O=0;O0?e+2*i:i}const ap=Rt([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),op=Rt([{name:"a_projected_pos",components:3,type:"Float32"}],4);Rt([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const lp=Rt([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);Rt([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const sh=Rt([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),cp=Rt([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function hp(i,e,r){return i.sections.forEach(s=>{s.text=function(o,u,d){const f=u.layout.get("text-transform").evaluate(d,{});return f==="uppercase"?o=o.toLocaleUpperCase():f==="lowercase"&&(o=o.toLocaleLowerCase()),Gi.applyArabicShaping&&(o=Gi.applyArabicShaping(o)),o}(s.text,e,r)}),i}Rt([{name:"triangle",components:3,type:"Uint16"}]),Rt([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Rt([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Rt([{type:"Float32",name:"offsetX"}]),Rt([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Rt([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const co={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Gt=24,ah=dt,oh=function(i,e,r,s,o){var u,d,f=8*o-s-1,_=(1<>1,w=-7,E=r?o-1:0,I=r?-1:1,P=i[e+E];for(E+=I,u=P&(1<<-w)-1,P>>=-w,w+=f;w>0;u=256*u+i[e+E],E+=I,w-=8);for(d=u&(1<<-w)-1,u>>=-w,w+=s;w>0;d=256*d+i[e+E],E+=I,w-=8);if(u===0)u=1-x;else{if(u===_)return d?NaN:1/0*(P?-1:1);d+=Math.pow(2,s),u-=x}return(P?-1:1)*d*Math.pow(2,u-s)},lh=function(i,e,r,s,o,u){var d,f,_,x=8*u-o-1,w=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=s?0:u-1,M=s?1:-1,B=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,d=w):(d=Math.floor(Math.log(e)/Math.LN2),e*(_=Math.pow(2,-d))<1&&(d--,_*=2),(e+=d+E>=1?I/_:I*Math.pow(2,1-E))*_>=2&&(d++,_/=2),d+E>=w?(f=0,d=w):d+E>=1?(f=(e*_-1)*Math.pow(2,o),d+=E):(f=e*Math.pow(2,E-1)*Math.pow(2,o),d=0));o>=8;i[r+P]=255&f,P+=M,f/=256,o-=8);for(d=d<0;i[r+P]=255&d,P+=M,d/=256,x-=8);i[r+P-M]|=128*B};function dt(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}dt.Varint=0,dt.Fixed64=1,dt.Bytes=2,dt.Fixed32=5;var ic=4294967296,ch=1/ic,hh=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function gn(i){return i.type===dt.Bytes?i.readVarint()+i.pos:i.pos+1}function ga(i,e,r){return r?4294967296*e+(i>>>0):4294967296*(e>>>0)+(i>>>0)}function uh(i,e,r){var s=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(s);for(var o=r.pos-1;o>=i;o--)r.buf[o+s]=r.buf[o]}function up(i,e){for(var r=0;r>>8,i[r+2]=e>>>16,i[r+3]=e>>>24}function ph(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16)+(i[e+3]<<24)}dt.prototype={destroy:function(){this.buf=null},readFields:function(i,e,r){for(r=r||this.length;this.pos>3,u=this.pos;this.type=7&s,i(o,e,this),this.pos===u&&this.skip(s)}return e},readMessage:function(i,e){return this.readFields(i,e,this.readVarint()+this.pos)},readFixed32:function(){var i=il(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=ph(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=il(this.buf,this.pos)+il(this.buf,this.pos+4)*ic;return this.pos+=8,i},readSFixed64:function(){var i=il(this.buf,this.pos)+ph(this.buf,this.pos+4)*ic;return this.pos+=8,i},readFloat:function(){var i=oh(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=oh(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var e,r,s=this.buf;return e=127&(r=s[this.pos++]),r<128?e:(e|=(127&(r=s[this.pos++]))<<7,r<128?e:(e|=(127&(r=s[this.pos++]))<<14,r<128?e:(e|=(127&(r=s[this.pos++]))<<21,r<128?e:function(o,u,d){var f,_,x=d.buf;if(f=(112&(_=x[d.pos++]))>>4,_<128||(f|=(127&(_=x[d.pos++]))<<3,_<128)||(f|=(127&(_=x[d.pos++]))<<10,_<128)||(f|=(127&(_=x[d.pos++]))<<17,_<128)||(f|=(127&(_=x[d.pos++]))<<24,_<128)||(f|=(1&(_=x[d.pos++]))<<31,_<128))return ga(o,f,u);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=s[this.pos]))<<28,i,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2==1?(i+1)/-2:i/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var i=this.readVarint()+this.pos,e=this.pos;return this.pos=i,i-e>=12&&hh?function(r,s,o){return hh.decode(r.subarray(s,o))}(this.buf,e,i):function(r,s,o){for(var u="",d=s;d239?4:w>223?3:w>191?2:1;if(d+I>o)break;I===1?w<128&&(E=w):I===2?(192&(f=r[d+1]))==128&&(E=(31&w)<<6|63&f)<=127&&(E=null):I===3?(_=r[d+2],(192&(f=r[d+1]))==128&&(192&_)==128&&((E=(15&w)<<12|(63&f)<<6|63&_)<=2047||E>=55296&&E<=57343)&&(E=null)):I===4&&(_=r[d+2],x=r[d+3],(192&(f=r[d+1]))==128&&(192&_)==128&&(192&x)==128&&((E=(15&w)<<18|(63&f)<<12|(63&_)<<6|63&x)<=65535||E>=1114112)&&(E=null)),E===null?(E=65533,I=1):E>65535&&(E-=65536,u+=String.fromCharCode(E>>>10&1023|55296),E=56320|1023&E),u+=String.fromCharCode(E),d+=I}return u}(this.buf,e,i)},readBytes:function(){var i=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,i);return this.pos=i,e},readPackedVarint:function(i,e){if(this.type!==dt.Bytes)return i.push(this.readVarint(e));var r=gn(this);for(i=i||[];this.pos127;);else if(e===dt.Bytes)this.pos=this.readVarint()+this.pos;else if(e===dt.Fixed32)this.pos+=4;else{if(e!==dt.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(i,e){this.writeVarint(i<<3|e)},realloc:function(i){for(var e=this.length||16;e268435455||i<0?function(e,r){var s,o;if(e>=0?(s=e%4294967296|0,o=e/4294967296|0):(o=~(-e/4294967296),4294967295^(s=~(-e%4294967296))?s=s+1|0:(s=0,o=o+1|0)),e>=18446744073709552e3||e<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");r.realloc(10),function(u,d,f){f.buf[f.pos++]=127&u|128,u>>>=7,f.buf[f.pos++]=127&u|128,u>>>=7,f.buf[f.pos++]=127&u|128,u>>>=7,f.buf[f.pos++]=127&u|128,f.buf[f.pos]=127&(u>>>=7)}(s,0,r),function(u,d){var f=(7&u)<<4;d.buf[d.pos++]|=f|((u>>>=3)?128:0),u&&(d.buf[d.pos++]=127&u|((u>>>=7)?128:0),u&&(d.buf[d.pos++]=127&u|((u>>>=7)?128:0),u&&(d.buf[d.pos++]=127&u|((u>>>=7)?128:0),u&&(d.buf[d.pos++]=127&u|((u>>>=7)?128:0),u&&(d.buf[d.pos++]=127&u)))))}(o,r)}(i,this):(this.realloc(4),this.buf[this.pos++]=127&i|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=i>>>7&127))))},writeSVarint:function(i){this.writeVarint(i<0?2*-i-1:2*i)},writeBoolean:function(i){this.writeVarint(!!i)},writeString:function(i){i=String(i),this.realloc(4*i.length),this.pos++;var e=this.pos;this.pos=function(s,o,u){for(var d,f,_=0;_55295&&d<57344){if(!f){d>56319||_+1===o.length?(s[u++]=239,s[u++]=191,s[u++]=189):f=d;continue}if(d<56320){s[u++]=239,s[u++]=191,s[u++]=189,f=d;continue}d=f-55296<<10|d-56320|65536,f=null}else f&&(s[u++]=239,s[u++]=191,s[u++]=189,f=null);d<128?s[u++]=d:(d<2048?s[u++]=d>>6|192:(d<65536?s[u++]=d>>12|224:(s[u++]=d>>18|240,s[u++]=d>>12&63|128),s[u++]=d>>6&63|128),s[u++]=63&d|128)}return u}(this.buf,i,this.pos);var r=this.pos-e;r>=128&&uh(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(i){this.realloc(4),lh(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),lh(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var e=i.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&uh(r,s,this),this.pos=r-1,this.writeVarint(s),this.pos+=s},writeMessage:function(i,e,r){this.writeTag(i,dt.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(i,e){e.length&&this.writeMessage(i,up,e)},writePackedSVarint:function(i,e){e.length&&this.writeMessage(i,pp,e)},writePackedBoolean:function(i,e){e.length&&this.writeMessage(i,mp,e)},writePackedFloat:function(i,e){e.length&&this.writeMessage(i,dp,e)},writePackedDouble:function(i,e){e.length&&this.writeMessage(i,fp,e)},writePackedFixed32:function(i,e){e.length&&this.writeMessage(i,gp,e)},writePackedSFixed32:function(i,e){e.length&&this.writeMessage(i,_p,e)},writePackedFixed64:function(i,e){e.length&&this.writeMessage(i,yp,e)},writePackedSFixed64:function(i,e){e.length&&this.writeMessage(i,xp,e)},writeBytesField:function(i,e){this.writeTag(i,dt.Bytes),this.writeBytes(e)},writeFixed32Field:function(i,e){this.writeTag(i,dt.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(i,e){this.writeTag(i,dt.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(i,e){this.writeTag(i,dt.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(i,e){this.writeTag(i,dt.Fixed64),this.writeSFixed64(e)},writeVarintField:function(i,e){this.writeTag(i,dt.Varint),this.writeVarint(e)},writeSVarintField:function(i,e){this.writeTag(i,dt.Varint),this.writeSVarint(e)},writeStringField:function(i,e){this.writeTag(i,dt.Bytes),this.writeString(e)},writeFloatField:function(i,e){this.writeTag(i,dt.Fixed32),this.writeFloat(e)},writeDoubleField:function(i,e){this.writeTag(i,dt.Fixed64),this.writeDouble(e)},writeBooleanField:function(i,e){this.writeVarintField(i,!!e)}};var rc=xt(ah);const nc=3;function vp(i,e,r){i===1&&r.readMessage(bp,e)}function bp(i,e,r){if(i===3){const{id:s,bitmap:o,width:u,height:d,left:f,top:_,advance:x}=r.readMessage(wp,{});e.push({id:s,bitmap:new io({width:u+2*nc,height:d+2*nc},o),metrics:{width:u,height:d,left:f,top:_,advance:x}})}}function wp(i,e,r){i===1?e.id=r.readVarint():i===2?e.bitmap=r.readBytes():i===3?e.width=r.readVarint():i===4?e.height=r.readVarint():i===5?e.left=r.readSVarint():i===6?e.top=r.readSVarint():i===7&&(e.advance=r.readVarint())}const dh=nc;function fh(i){let e=0,r=0;for(const d of i)e+=d.w*d.h,r=Math.max(r,d.w);i.sort((d,f)=>f.h-d.h);const s=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}];let o=0,u=0;for(const d of i)for(let f=s.length-1;f>=0;f--){const _=s[f];if(!(d.w>_.w||d.h>_.h)){if(d.x=_.x,d.y=_.y,u=Math.max(u,d.y+d.h),o=Math.max(o,d.x+d.w),d.w===_.w&&d.h===_.h){const x=s.pop();f=0&&s>=e&&nl[this.text.charCodeAt(s)];s--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)}substring(e,r){const s=new ya;return s.text=this.text.substring(e,r),s.sectionIndex=this.sectionIndex.slice(e,r),s.sections=this.sections,s}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>Math.max(e,this.sections[r].scale),0)}addTextSection(e,r){this.text+=e.text,this.sections.push(uo.forText(e.scale,e.fontStack||r));const s=this.sections.length-1;for(let o=0;o=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function rl(i,e,r,s,o,u,d,f,_,x,w,E,I,P,M,B){const O=ya.fromFeature(i,o);let N;E===c.WritingMode.vertical&&O.verticalizePunctuation();const{processBidirectionalText:H,processStyledBidirectionalText:j}=Gi;if(H&&O.sections.length===1){N=[];const se=H(O.toString(),ac(O,x,u,e,s,P,M));for(const be of se){const Ae=new ya;Ae.text=be,Ae.sections=O.sections;for(let ve=0;ve0&&yn>Bi&&(Bi=yn)}else{const tr=Ae[Ke.fontStack],Ri=tr&&tr[hi];if(Ri&&Ri.rect)Pr=Ri.rect,_r=Ri.metrics;else{const yn=be[Ke.fontStack],_o=yn&&yn[hi];if(!_o)continue;_r=_o.metrics}Si=(Wt-Ke.scale)*Gt}yr?(se.verticalizable=!0,Li.push({glyph:hi,imageName:Mr,x:yt,y:wt+Si,vertical:yr,scale:Ke.scale,fontStack:Ke.fontStack,sectionIndex:Hi,metrics:_r,rect:Pr}),yt+=_n*Ke.scale+Le):(Li.push({glyph:hi,imageName:Mr,x:yt,y:wt+Si,vertical:yr,scale:Ke.scale,fontStack:Ke.fontStack,sectionIndex:Hi,metrics:_r,rect:Pr}),yt+=_r.advance*Ke.scale+Le)}Li.length!==0&&(Xt=Math.max(yt-Le,Xt),Sp(Li,0,Li.length-1,wi,Bi)),yt=0;const zt=de*Wt+Bi;Ei.lineOffset=Math.max(Bi,fi),wt+=zt,Wi=Math.max(zt,Wi),++$t}var Kt;const li=wt-ho,{horizontalAlign:Di,verticalAlign:Ti}=oc(Te);(function(qt,Wt,fi,Ei,Li,Bi,zt,ci,Ke){const Hi=(Wt-fi)*Li;let hi=0;hi=Bi!==zt?-ci*Ei-ho:(-Ei*Ke+.5)*zt;for(const Si of qt)for(const _r of Si.positionedGlyphs)_r.x+=Hi,_r.y+=hi})(se.positionedLines,wi,Di,Ti,Xt,Wi,de,li,ye.length),se.top+=-Ti*li,se.bottom=se.top+li,se.left+=-Di*Xt,se.right=se.left+Xt}(Q,e,r,s,N,d,f,_,E,x,I,B),!function(se){for(const be of se)if(be.positionedGlyphs.length!==0)return!1;return!0}(Y)&&Q}const nl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Tp={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function gh(i,e,r,s,o,u){if(e.imageName){const d=s[e.imageName];return d?d.displaySize[0]*e.scale*Gt/u+o:0}{const d=r[e.fontStack],f=d&&d[i];return f?f.metrics.advance*e.scale+o:0}}function _h(i,e,r,s){const o=Math.pow(i-e,2);return s?i=0;let w=0;for(let I=0;Id.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=$l([]),this.placementViewportMatrix=$l([]);const r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=bh(this.zoom,r["text-size"]),this.iconSizeData=bh(this.zoom,r["icon-size"]);const s=this.layers[0].layout,o=s.get("symbol-sort-key"),u=s.get("symbol-z-order");this.canOverlap=lc(s,"text-overlap","text-allow-overlap")!=="never"||lc(s,"icon-overlap","icon-allow-overlap")!=="never"||s.get("text-ignore-placement")||s.get("icon-ignore-placement"),this.sortFeaturesByKey=u!=="viewport-y"&&!o.isConstant(),this.sortFeaturesByY=(u==="viewport-y"||u==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,s.get("symbol-placement")==="point"&&(this.writingModes=s.get("text-writing-mode").map(d=>c.WritingMode[d])),this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id),this.sourceID=e.sourceID}createArrays(){this.text=new hc(new fn(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new hc(new fn(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new C,this.lineVertexArray=new L,this.symbolInstances=new T,this.textAnchorOffsets=new R}calculateGlyphDependencies(e,r,s,o,u){for(let d=0;d0)&&(d.value.kind!=="constant"||d.value.value.length>0),w=_.value.kind!=="constant"||!!_.value.value||Object.keys(_.parameters).length>0,E=u.get("symbol-sort-key");if(this.features=[],!x&&!w)return;const I=r.iconDependencies,P=r.glyphDependencies,M=r.availableImages,B=new vt(this.zoom);for(const{feature:O,id:N,index:H,sourceLayerIndex:j}of e){const Y=o._featureFilter.needGeometry,Q=Xr(O,Y);if(!o._featureFilter.filter(B,Q,s))continue;let se,be;if(Y||(Q.geometry=Cr(O)),x){const ve=o.getValueAndResolveTokens("text-field",Q,s,M),ye=kt.factory(ve);Pp(ye)&&(this.hasRTLText=!0),(!this.hasRTLText||Ga()==="unavailable"||this.hasRTLText&&Gi.isParsed())&&(se=hp(ye,o,Q))}if(w){const ve=o.getValueAndResolveTokens("icon-image",Q,s,M);be=ve instanceof Zi?ve:Zi.fromString(ve)}if(!se&&!be)continue;const Ae=this.sortFeaturesByKey?E.evaluate(Q,{},s):void 0;if(this.features.push({id:N,text:se,icon:be,index:H,sourceLayerIndex:j,geometry:Q.geometry,properties:O.properties,type:Ap[O.type],sortKey:Ae}),be&&(I[be.name]=!0),se){const ve=d.evaluate(Q,{},s).join(","),ye=u.get("text-rotation-alignment")!=="viewport"&&u.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(c.WritingMode.vertical)>=0;for(const de of se.sections)if(de.image)I[de.image.name]=!0;else{const Te=ra(se.toString()),fe=de.fontStack||ve,ue=P[fe]=P[fe]||{};this.calculateGlyphDependencies(de.text,ue,ye,this.allowVerticalPlacement,Te)}}}u.get("symbol-placement")==="line"&&(this.features=function(O){const N={},H={},j=[];let Y=0;function Q(ve){j.push(O[ve]),Y++}function se(ve,ye,de){const Te=H[ve];return delete H[ve],H[ye]=Te,j[Te].geometry[0].pop(),j[Te].geometry[0]=j[Te].geometry[0].concat(de[0]),Te}function be(ve,ye,de){const Te=N[ye];return delete N[ye],N[ve]=Te,j[Te].geometry[0].shift(),j[Te].geometry[0]=de[0].concat(j[Te].geometry[0]),Te}function Ae(ve,ye,de){const Te=de?ye[0][ye[0].length-1]:ye[0][0];return`${ve}:${Te.x}:${Te.y}`}for(let ve=0;veve.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((O,N)=>O.sortKey-N.sortKey)}update(e,r,s){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,r,this.layers,s),this.icon.programConfigurations.updatePaintArrays(e,r,this.layers,s))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,r){const s=this.lineVertexArray.length;if(e.segment!==void 0){let o=e.dist(r[e.segment+1]),u=e.dist(r[e.segment]);const d={};for(let f=e.segment+1;f=0;f--)d[f]={x:r[f].x,y:r[f].y,tileUnitDistanceFromAnchor:u},f>0&&(u+=r[f-1].dist(r[f]));for(let f=0;f0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,r){const s=e.placedSymbolArray.get(r),o=s.vertexStartIndex+4*s.numGlyphs;for(let u=s.vertexStartIndex;uo[f]-o[_]||u[_]-u[f]),d}addToSortKeyRanges(e,r){const s=this.sortKeyRanges[this.sortKeyRanges.length-1];s&&s.sortKey===r?s.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:r,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const r of this.symbolInstanceIndexes){const s=this.symbolInstances.get(r);this.featureSortOrder.push(s.featureIndex),[s.rightJustifiedTextSymbolIndex,s.centerJustifiedTextSymbolIndex,s.leftJustifiedTextSymbolIndex].forEach((o,u,d)=>{o>=0&&d.indexOf(o)===u&&this.addIndicesForPlacedSymbol(this.text,o)}),s.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,s.verticalPlacedTextSymbolIndex),s.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.placedIconSymbolIndex),s.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let wh,Th;we("SymbolBucket",xa,{omit:["layers","collisionBoxArray","features","compareText"]}),xa.MAX_GLYPHS=65535,xa.addDynamicAttributes=cc;var pc={get paint(){return Th=Th||new xi({"icon-opacity":new Re(re.paint_symbol["icon-opacity"]),"icon-color":new Re(re.paint_symbol["icon-color"]),"icon-halo-color":new Re(re.paint_symbol["icon-halo-color"]),"icon-halo-width":new Re(re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Re(re.paint_symbol["icon-halo-blur"]),"icon-translate":new Me(re.paint_symbol["icon-translate"]),"icon-translate-anchor":new Me(re.paint_symbol["icon-translate-anchor"]),"text-opacity":new Re(re.paint_symbol["text-opacity"]),"text-color":new Re(re.paint_symbol["text-color"],{runtimeType:ii,getOverride:i=>i.textColor,hasOverride:i=>!!i.textColor}),"text-halo-color":new Re(re.paint_symbol["text-halo-color"]),"text-halo-width":new Re(re.paint_symbol["text-halo-width"]),"text-halo-blur":new Re(re.paint_symbol["text-halo-blur"]),"text-translate":new Me(re.paint_symbol["text-translate"]),"text-translate-anchor":new Me(re.paint_symbol["text-translate-anchor"])})},get layout(){return wh=wh||new xi({"symbol-placement":new Me(re.layout_symbol["symbol-placement"]),"symbol-spacing":new Me(re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Me(re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Re(re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Me(re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Me(re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Me(re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Me(re.layout_symbol["icon-ignore-placement"]),"icon-optional":new Me(re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Me(re.layout_symbol["icon-rotation-alignment"]),"icon-size":new Re(re.layout_symbol["icon-size"]),"icon-text-fit":new Me(re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Me(re.layout_symbol["icon-text-fit-padding"]),"icon-image":new Re(re.layout_symbol["icon-image"]),"icon-rotate":new Re(re.layout_symbol["icon-rotate"]),"icon-padding":new Re(re.layout_symbol["icon-padding"]),"icon-keep-upright":new Me(re.layout_symbol["icon-keep-upright"]),"icon-offset":new Re(re.layout_symbol["icon-offset"]),"icon-anchor":new Re(re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Me(re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Me(re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Me(re.layout_symbol["text-rotation-alignment"]),"text-field":new Re(re.layout_symbol["text-field"]),"text-font":new Re(re.layout_symbol["text-font"]),"text-size":new Re(re.layout_symbol["text-size"]),"text-max-width":new Re(re.layout_symbol["text-max-width"]),"text-line-height":new Me(re.layout_symbol["text-line-height"]),"text-letter-spacing":new Re(re.layout_symbol["text-letter-spacing"]),"text-justify":new Re(re.layout_symbol["text-justify"]),"text-radial-offset":new Re(re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Me(re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Re(re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Re(re.layout_symbol["text-anchor"]),"text-max-angle":new Me(re.layout_symbol["text-max-angle"]),"text-writing-mode":new Me(re.layout_symbol["text-writing-mode"]),"text-rotate":new Re(re.layout_symbol["text-rotate"]),"text-padding":new Me(re.layout_symbol["text-padding"]),"text-keep-upright":new Me(re.layout_symbol["text-keep-upright"]),"text-transform":new Re(re.layout_symbol["text-transform"]),"text-offset":new Re(re.layout_symbol["text-offset"]),"text-allow-overlap":new Me(re.layout_symbol["text-allow-overlap"]),"text-overlap":new Me(re.layout_symbol["text-overlap"]),"text-ignore-placement":new Me(re.layout_symbol["text-ignore-placement"]),"text-optional":new Me(re.layout_symbol["text-optional"])})}};class Eh{constructor(e){if(e.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:Or,this.defaultValue=e}evaluate(e){if(e.formattedSection){const r=this.defaultValue.property.overrides;if(r&&r.hasOverride(e.formattedSection))return r.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}we("FormatSectionOverride",Eh,{omit:["defaultValue"]});class al extends fr{constructor(e){super(e,pc)}recalculate(e,r){if(super.recalculate(e,r),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const s=this.layout.get("text-writing-mode");if(s){const o=[];for(const u of s)o.indexOf(u)<0&&o.push(u);this.layout._values["text-writing-mode"]=o}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,s,o){const u=this.layout.get(e).evaluate(r,{},s,o),d=this._unevaluatedLayout._values[e];return d.isDataDriven()||Xs(d.value)||!u?u:function(f,_){return _.replace(/{([^{}]+)}/g,(x,w)=>w in f?String(f[w]):"")}(r.properties,u)}createBucket(e){return new xa(e)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const e of pc.paint.overridableProperties){if(!al.hasPaintOverride(this.layout,e))continue;const r=this.paint.get(e),s=new Eh(r),o=new Ct(s,r.property.specification);let u=null;u=r.value.kind==="constant"||r.value.kind==="source"?new rs("source",o):new gt("composite",o,r.value.zoomStops),this.paint._values[e]=new Ki(r.property,u,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,s){return!(!this.layout||r.isDataDriven()||s.isDataDriven())&&al.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){const s=e.get("text-field"),o=pc.paint.properties[r];let u=!1;const d=f=>{for(const _ of f)if(o.overrides&&o.overrides.hasOverride(_))return void(u=!0)};if(s.value.kind==="constant"&&s.value.value instanceof kt)d(s.value.value.sections);else if(s.value.kind==="source"){const f=x=>{u||(x instanceof rn&&Dt(x.value)===hr?d(x.value.sections):x instanceof js?d(x.sections):x.eachChild(f))},_=s.value;_._styleExpression&&f(_._styleExpression.expression)}return u}}let Sh;var Mp={get paint(){return Sh=Sh||new xi({"background-color":new Me(re.paint_background["background-color"]),"background-pattern":new Xa(re.paint_background["background-pattern"]),"background-opacity":new Me(re.paint_background["background-opacity"])})}};class zp extends fr{constructor(e){super(e,Mp)}}let Ih;var kp={get paint(){return Ih=Ih||new xi({"raster-opacity":new Me(re.paint_raster["raster-opacity"]),"raster-hue-rotate":new Me(re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Me(re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Me(re.paint_raster["raster-brightness-max"]),"raster-saturation":new Me(re.paint_raster["raster-saturation"]),"raster-contrast":new Me(re.paint_raster["raster-contrast"]),"raster-resampling":new Me(re.paint_raster["raster-resampling"]),"raster-fade-duration":new Me(re.paint_raster["raster-fade-duration"])})}};class Dp extends fr{constructor(e){super(e,kp)}}class Lp extends fr{constructor(e){super(e,{}),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=e}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Bp{constructor(e){this._callback=e,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){delete this._channel,this._callback=()=>{}}}const dc=63710088e-1;class $n{constructor(e,r){if(isNaN(e)||isNaN(r))throw new Error(`Invalid LngLat object: (${e}, ${r})`);if(this.lng=+e,this.lat=+r,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new $n(Br(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){const r=Math.PI/180,s=this.lat*r,o=e.lat*r,u=Math.sin(s)*Math.sin(o)+Math.cos(s)*Math.cos(o)*Math.cos((e.lng-this.lng)*r);return dc*Math.acos(Math.min(u,1))}static convert(e){if(e instanceof $n)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new $n(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e!==null)return new $n(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const Ah=2*Math.PI*dc;function Ch(i){return Ah*Math.cos(i*Math.PI/180)}function Ph(i){return(180+i)/360}function Mh(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function zh(i,e){return i/Ch(e)}function fc(i){return 360/Math.PI*Math.atan(Math.exp((180-360*i)*Math.PI/180))-90}class ol{constructor(e,r,s=0){this.x=+e,this.y=+r,this.z=+s}static fromLngLat(e,r=0){const s=$n.convert(e);return new ol(Ph(s.lng),Mh(s.lat),zh(r,s.lat))}toLngLat(){return new $n(360*this.x-180,fc(this.y))}toAltitude(){return this.z*Ch(fc(this.y))}meterInMercatorCoordinateUnits(){return 1/Ah*(e=fc(this.y),1/Math.cos(e*Math.PI/180));var e}}function kh(i,e,r){var s=2*Math.PI*6378137/256/Math.pow(2,r);return[i*s-2*Math.PI*6378137/2,e*s-2*Math.PI*6378137/2]}class mc{constructor(e,r,s){if(e<0||e>25||s<0||s>=Math.pow(2,e)||r<0||r>=Math.pow(2,e))throw new Error(`x=${r}, y=${s}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=r,this.y=s,this.key=fo(0,e,e,r,s)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,r,s){const o=(d=this.y,f=this.z,_=kh(256*(u=this.x),256*(d=Math.pow(2,f)-d-1),f),x=kh(256*(u+1),256*(d+1),f),_[0]+","+_[1]+","+x[0]+","+x[1]);var u,d,f,_,x;const w=function(E,I,P){let M,B="";for(let O=E;O>0;O--)M=1<1?"@2x":"").replace(/{quadkey}/g,w).replace(/{bbox-epsg-3857}/g,o)}isChildOf(e){const r=this.z-e.z;return r>0&&e.x===this.x>>r&&e.y===this.y>>r}getTilePoint(e){const r=Math.pow(2,this.z);return new Pe((e.x*r-this.x)*Pt,(e.y*r-this.y)*Pt)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Dh{constructor(e,r){this.wrap=e,this.canonical=r,this.key=fo(e,r.z,r.z,r.x,r.y)}}class er{constructor(e,r,s,o,u){if(e= z; overscaledZ = ${e}; z = ${s}`);this.overscaledZ=e,this.wrap=r,this.canonical=new mc(s,+o,+u),this.key=fo(r,e,s,o,u)}clone(){return new er(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const r=this.canonical.z-e;return e>this.canonical.z?new er(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new er(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}calculateScaledKey(e,r){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const s=this.canonical.z-e;return e>this.canonical.z?fo(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):fo(this.wrap*+r,e,e,this.canonical.x>>s,this.canonical.y>>s)}isChildOf(e){if(e.wrap!==this.wrap)return!1;const r=this.canonical.z-e.canonical.z;return e.overscaledZ===0||e.overscaledZ>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new er(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const r=this.canonical.z+1,s=2*this.canonical.x,o=2*this.canonical.y;return[new er(r,this.wrap,r,s,o),new er(r,this.wrap,r,s+1,o),new er(r,this.wrap,r,s,o+1),new er(r,this.wrap,r,s+1,o+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ythis.max&&(this.max=f),f=this.dim+1||r<-1||r>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(r+1)*this.stride+(e+1)}_unpackMapbox(e,r,s){return(256*e*256+256*r+s)/10-1e4}_unpackTerrarium(e,r,s){return 256*e+r+s/256-32768}getPixels(){return new Qi({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,r,s){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let o=r*this.dim,u=r*this.dim+this.dim,d=s*this.dim,f=s*this.dim+this.dim;switch(r){case-1:o=u-1;break;case 1:u=o+1}switch(s){case-1:d=f-1;break;case 1:f=d+1}const _=-r*this.dim,x=-s*this.dim;for(let w=d;w=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class Rh{constructor(e,r,s,o,u){this.type="Feature",this._vectorTileFeature=e,e._z=r,e._x=s,e._y=o,this.properties=e.properties,this.id=u}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(e){this._geometry=e}toJSON(){const e={geometry:this.geometry};for(const r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&(e[r]=this[r]);return e}}class Fh{constructor(e,r){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new fs(Pt,16,0),this.grid3D=new fs(Pt,16,0),this.featureIndexArray=new G,this.promoteId=r}insert(e,r,s,o,u,d){const f=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(s,o,u);const _=d?this.grid3D:this.grid;for(let x=0;x=0&&E[3]>=0&&_.insert(f,E[0],E[1],E[2],E[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Un.VectorTile(new rc(this.rawTileData)).layers,this.sourceLayerCoder=new Bh(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,r,s,o){this.loadVTLayers();const u=e.params||{},d=Pt/e.tileSize/e.scale,f=ka(u.filter),_=e.queryGeometry,x=e.queryPadding*d,w=Uh(_),E=this.grid.query(w.minX-x,w.minY-x,w.maxX+x,w.maxY+x),I=Uh(e.cameraQueryGeometry),P=this.grid3D.query(I.minX-x,I.minY-x,I.maxX+x,I.maxY+x,(O,N,H,j)=>function(Y,Q,se,be,Ae){for(const ye of Y)if(Q<=ye.x&&se<=ye.y&&be>=ye.x&&Ae>=ye.y)return!0;const ve=[new Pe(Q,se),new Pe(Q,Ae),new Pe(be,Ae),new Pe(be,se)];if(Y.length>2){for(const ye of ve)if(pa(Y,ye))return!0}for(let ye=0;ye(j||(j=Cr(Y)),Q.queryIntersectsFeature(_,Y,se,j,this.z,e.transform,d,e.pixelPosMatrix)))}return M}loadMatchingFeature(e,r,s,o,u,d,f,_,x,w,E){const I=this.bucketLayerIDs[r];if(d&&!function(O,N){for(let H=0;H=0)return!0;return!1}(d,I))return;const P=this.sourceLayerCoder.decode(s),M=this.vtLayers[P].feature(o);if(u.needGeometry){const O=Xr(M,!0);if(!u.filter(new vt(this.tileID.overscaledZ),O,this.tileID.canonical))return}else if(!u.filter(new vt(this.tileID.overscaledZ),M))return;const B=this.getId(M,P);for(let O=0;O{const f=e instanceof xs?e.get(d):null;return f&&f.evaluate?f.evaluate(r,s,o):f})}function Uh(i){let e=1/0,r=1/0,s=-1/0,o=-1/0;for(const u of i)e=Math.min(e,u.x),r=Math.min(r,u.y),s=Math.max(s,u.x),o=Math.max(o,u.y);return{minX:e,minY:r,maxX:s,maxY:o}}function Rp(i,e){return e-i}function Vh(i,e,r,s,o){const u=[];for(let d=0;d=s&&E.x>=s||(w.x>=s?w=new Pe(s,w.y+(s-w.x)/(E.x-w.x)*(E.y-w.y))._round():E.x>=s&&(E=new Pe(s,w.y+(s-w.x)/(E.x-w.x)*(E.y-w.y))._round()),w.y>=o&&E.y>=o||(w.y>=o?w=new Pe(w.x+(o-w.y)/(E.y-w.y)*(E.x-w.x),o)._round():E.y>=o&&(E=new Pe(w.x+(o-w.y)/(E.y-w.y)*(E.x-w.x),o)._round()),_&&w.equals(_[_.length-1])||(_=[w],u.push(_)),_.push(E)))))}}return u}we("FeatureIndex",Fh,{omit:["rawTileData","sourceLayerCoder"]});class qn extends Pe{constructor(e,r,s,o){super(e,r),this.angle=s,o!==void 0&&(this.segment=o)}clone(){return new qn(this.x,this.y,this.angle,this.segment)}}function Nh(i,e,r,s,o){if(e.segment===void 0||r===0)return!0;let u=e,d=e.segment+1,f=0;for(;f>-r/2;){if(d--,d<0)return!1;f-=i[d].dist(u),u=i[d]}f+=i[d].dist(i[d+1]),d++;const _=[];let x=0;for(;fs;)x-=_.shift().angleDelta;if(x>o)return!1;d++,f+=w.dist(E)}return!0}function $h(i){let e=0;for(let r=0;rx){const M=(x-_)/P,B=Ci.number(E.x,I.x,M),O=Ci.number(E.y,I.y,M),N=new qn(B,O,I.angleTo(E),w);return N._round(),!d||Nh(i,N,f,d,e)?N:void 0}_+=P}}function Op(i,e,r,s,o,u,d,f,_){const x=qh(s,u,d),w=Zh(s,o),E=w*d,I=i[0].x===0||i[0].x===_||i[0].y===0||i[0].y===_;return e-E=0&&Y<_&&Q>=0&&Q<_&&I-x>=0&&I+x<=w){const se=new qn(Y,Q,H,M);se._round(),s&&!Nh(i,se,u,s,o)||P.push(se)}}E+=N}return f||P.length||d||(P=jh(i,E/2,r,s,o,u,d,!0,_)),P}we("Anchor",qn);const va=ki;function Gh(i,e,r,s){const o=[],u=i.image,d=u.pixelRatio,f=u.paddedRect.w-2*va,_=u.paddedRect.h-2*va,x=i.right-i.left,w=i.bottom-i.top,E=u.stretchX||[[0,f]],I=u.stretchY||[[0,_]],P=(de,Te)=>de+Te[1]-Te[0],M=E.reduce(P,0),B=I.reduce(P,0),O=f-M,N=_-B;let H=0,j=M,Y=0,Q=B,se=0,be=O,Ae=0,ve=N;if(u.content&&s){const de=u.content;H=ll(E,0,de[0]),Y=ll(I,0,de[1]),j=ll(E,de[0],de[2]),Q=ll(I,de[1],de[3]),se=de[0]-H,Ae=de[1]-Y,be=de[2]-de[0]-j,ve=de[3]-de[1]-Q}const ye=(de,Te,fe,ue)=>{const Le=cl(de.stretch-H,j,x,i.left),Ce=hl(de.fixed-se,be,de.stretch,M),qe=cl(Te.stretch-Y,Q,w,i.top),yt=hl(Te.fixed-Ae,ve,Te.stretch,B),wt=cl(fe.stretch-H,j,x,i.left),Xt=hl(fe.fixed-se,be,fe.stretch,M),Wi=cl(ue.stretch-Y,Q,w,i.top),wi=hl(ue.fixed-Ae,ve,ue.stretch,B),$t=new Pe(Le,qe),Kt=new Pe(wt,qe),li=new Pe(wt,Wi),Di=new Pe(Le,Wi),Ti=new Pe(Ce/d,yt/d),qt=new Pe(Xt/d,wi/d),Wt=e*Math.PI/180;if(Wt){const Li=Math.sin(Wt),Bi=Math.cos(Wt),zt=[Bi,-Li,Li,Bi];$t._matMult(zt),Kt._matMult(zt),Di._matMult(zt),li._matMult(zt)}const fi=de.stretch+de.fixed,Ei=Te.stretch+Te.fixed;return{tl:$t,tr:Kt,bl:Di,br:li,tex:{x:u.paddedRect.x+va+fi,y:u.paddedRect.y+va+Ei,w:fe.stretch+fe.fixed-fi,h:ue.stretch+ue.fixed-Ei},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ti,pixelOffsetBR:qt,minFontScaleX:be/d/x,minFontScaleY:ve/d/w,isSDF:r}};if(s&&(u.stretchX||u.stretchY)){const de=Xh(E,O,M),Te=Xh(I,N,B);for(let fe=0;fe0&&(M=Math.max(10,M),this.circleDiameter=M)}else{let E=d.top*f-_[0],I=d.bottom*f+_[2],P=d.left*f-_[3],M=d.right*f+_[1];const B=d.collisionPadding;if(B&&(P-=B[0]*f,E-=B[1]*f,M+=B[2]*f,I+=B[3]*f),w){const O=new Pe(P,E),N=new Pe(M,E),H=new Pe(P,I),j=new Pe(M,I),Y=w*Math.PI/180;O._rotate(Y),N._rotate(Y),H._rotate(Y),j._rotate(Y),P=Math.min(O.x,N.x,H.x,j.x),M=Math.max(O.x,N.x,H.x,j.x),E=Math.min(O.y,N.y,H.y,j.y),I=Math.max(O.y,N.y,H.y,j.y)}e.emplaceBack(r.x,r.y,P,E,M,I,s,o,u)}this.boxEndIndex=e.length}}class Up{constructor(e=[],r=Vp){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:r,compare:s}=this,o=r[e];for(;e>0;){const u=e-1>>1,d=r[u];if(s(o,d)>=0)break;r[e]=d,e=u}r[e]=o}_down(e){const{data:r,compare:s}=this,o=this.length>>1,u=r[e];for(;e=0)break;r[e]=f,e=d}r[e]=u}}function Vp(i,e){return ie?1:0}function Np(i,e=1,r=!1){let s=1/0,o=1/0,u=-1/0,d=-1/0;const f=i[0];for(let P=0;Pu)&&(u=M.x),(!P||M.y>d)&&(d=M.y)}const _=Math.min(u-s,d-o);let x=_/2;const w=new Up([],$p);if(_===0)return new Pe(s,o);for(let P=s;PE.d||!E.d)&&(E=P,r&&console.log("found best %d after %d probes",Math.round(1e4*P.d)/1e4,I)),P.max-E.d<=e||(x=P.h/2,w.push(new ba(P.p.x-x,P.p.y-x,x,i)),w.push(new ba(P.p.x+x,P.p.y-x,x,i)),w.push(new ba(P.p.x-x,P.p.y+x,x,i)),w.push(new ba(P.p.x+x,P.p.y+x,x,i)),I+=4)}return r&&(console.log(`num probes: ${I}`),console.log(`best distance: ${E.d}`)),E.p}function $p(i,e){return e.max-i.max}function ba(i,e,r,s){this.p=new Pe(i,e),this.h=r,this.d=function(o,u){let d=!1,f=1/0;for(let _=0;_o.y!=M.y>o.y&&o.x<(M.x-P.x)*(o.y-P.y)/(M.y-P.y)+P.x&&(d=!d),f=Math.min(f,Mc(o,P,M))}}return(d?1:-1)*Math.sqrt(f)}(this.p,s),this.max=this.d+this.h*Math.SQRT2}var oi;c.TextAnchorEnum=void 0,(oi=c.TextAnchorEnum||(c.TextAnchorEnum={}))[oi.center=1]="center",oi[oi.left=2]="left",oi[oi.right=3]="right",oi[oi.top=4]="top",oi[oi.bottom=5]="bottom",oi[oi["top-left"]=6]="top-left",oi[oi["top-right"]=7]="top-right",oi[oi["bottom-left"]=8]="bottom-left",oi[oi["bottom-right"]=9]="bottom-right";const Zn=7,gc=Number.POSITIVE_INFINITY;function Wh(i,e){return e[1]!==gc?function(r,s,o){let u=0,d=0;switch(s=Math.abs(s),o=Math.abs(o),r){case"top-right":case"top-left":case"top":d=o-Zn;break;case"bottom-right":case"bottom-left":case"bottom":d=-o+Zn}switch(r){case"top-right":case"bottom-right":case"right":u=-s;break;case"top-left":case"bottom-left":case"left":u=s}return[u,d]}(i,e[0],e[1]):function(r,s){let o=0,u=0;s<0&&(s=0);const d=s/Math.SQRT2;switch(r){case"top-right":case"top-left":u=d-Zn;break;case"bottom-right":case"bottom-left":u=-d+Zn;break;case"bottom":u=-s+Zn;break;case"top":u=s-Zn}switch(r){case"top-right":case"bottom-right":o=-d;break;case"top-left":case"bottom-left":o=d;break;case"left":o=s;break;case"right":o=-s}return[o,u]}(i,e[0])}function Hh(i,e,r){var s;const o=i.layout,u=(s=o.get("text-variable-anchor-offset"))===null||s===void 0?void 0:s.evaluate(e,{},r);if(u){const f=u.values,_=[];for(let x=0;xI*Gt);w.startsWith("top")?E[1]-=Zn:w.startsWith("bottom")&&(E[1]+=Zn),_[x+1]=E}return new ri(_)}const d=o.get("text-variable-anchor");if(d){let f;f=i._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[o.get("text-radial-offset").evaluate(e,{},r)*Gt,gc]:o.get("text-offset").evaluate(e,{},r).map(x=>x*Gt);const _=[];for(const x of d)_.push(x,Wh(x,f));return new ri(_)}return null}function _c(i){switch(i){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function qp(i,e,r,s,o,u,d,f,_,x,w){let E=u.textMaxSize.evaluate(e,{});E===void 0&&(E=d);const I=i.layers[0].layout,P=I.get("icon-offset").evaluate(e,{},w),M=Yh(r.horizontal),B=d/24,O=i.tilePixelRatio*B,N=i.tilePixelRatio*E/24,H=i.tilePixelRatio*f,j=i.tilePixelRatio*I.get("symbol-spacing"),Y=I.get("text-padding")*i.tilePixelRatio,Q=function(ue,Le,Ce,qe=1){const yt=ue.get("icon-padding").evaluate(Le,{},Ce),wt=yt&&yt.values;return[wt[0]*qe,wt[1]*qe,wt[2]*qe,wt[3]*qe]}(I,e,w,i.tilePixelRatio),se=I.get("text-max-angle")/180*Math.PI,be=I.get("text-rotation-alignment")!=="viewport"&&I.get("symbol-placement")!=="point",Ae=I.get("icon-rotation-alignment")==="map"&&I.get("symbol-placement")!=="point",ve=I.get("symbol-placement"),ye=j/2,de=I.get("icon-text-fit");let Te;s&&de!=="none"&&(i.allowVerticalPlacement&&r.vertical&&(Te=vh(s,r.vertical,de,I.get("icon-text-fit-padding"),P,B)),M&&(s=vh(s,M,de,I.get("icon-text-fit-padding"),P,B)));const fe=(ue,Le)=>{Le.x<0||Le.x>=Pt||Le.y<0||Le.y>=Pt||function(Ce,qe,yt,wt,Xt,Wi,wi,$t,Kt,li,Di,Ti,qt,Wt,fi,Ei,Li,Bi,zt,ci,Ke,Hi,hi,Si,_r){const Pr=Ce.addToLineVertexArray(qe,yt);let Mr,_n,yr,tr,Ri=0,yn=0,_o=0,tu=0,Sc=-1,Ic=-1;const xn={};let iu=Yi("");if(Ce.allowVerticalPlacement&&wt.vertical){const mi=$t.layout.get("text-rotate").evaluate(Ke,{},Si)+90;yr=new ul(Kt,qe,li,Di,Ti,wt.vertical,qt,Wt,fi,mi),wi&&(tr=new ul(Kt,qe,li,Di,Ti,wi,Li,Bi,fi,mi))}if(Xt){const mi=$t.layout.get("icon-rotate").evaluate(Ke,{}),ir=$t.layout.get("icon-text-fit")!=="none",Is=Gh(Xt,mi,hi,ir),kr=wi?Gh(wi,mi,hi,ir):void 0;_n=new ul(Kt,qe,li,Di,Ti,Xt,Li,Bi,!1,mi),Ri=4*Is.length;const As=Ce.iconSizeData;let Hr=null;As.kind==="source"?(Hr=[Wr*$t.layout.get("icon-size").evaluate(Ke,{})],Hr[0]>Nn&&pi(`${Ce.layerIds[0]}: Value for "icon-size" is >= ${po}. Reduce your "icon-size".`)):As.kind==="composite"&&(Hr=[Wr*Hi.compositeIconSizes[0].evaluate(Ke,{},Si),Wr*Hi.compositeIconSizes[1].evaluate(Ke,{},Si)],(Hr[0]>Nn||Hr[1]>Nn)&&pi(`${Ce.layerIds[0]}: Value for "icon-size" is >= ${po}. Reduce your "icon-size".`)),Ce.addSymbols(Ce.icon,Is,Hr,ci,zt,Ke,c.WritingMode.none,qe,Pr.lineStartIndex,Pr.lineLength,-1,Si),Sc=Ce.icon.placedSymbolArray.length-1,kr&&(yn=4*kr.length,Ce.addSymbols(Ce.icon,kr,Hr,ci,zt,Ke,c.WritingMode.vertical,qe,Pr.lineStartIndex,Pr.lineLength,-1,Si),Ic=Ce.icon.placedSymbolArray.length-1)}const ru=Object.keys(wt.horizontal);for(const mi of ru){const ir=wt.horizontal[mi];if(!Mr){iu=Yi(ir.text);const kr=$t.layout.get("text-rotate").evaluate(Ke,{},Si);Mr=new ul(Kt,qe,li,Di,Ti,ir,qt,Wt,fi,kr)}const Is=ir.positionedLines.length===1;if(_o+=Kh(Ce,qe,ir,Wi,$t,fi,Ke,Ei,Pr,wt.vertical?c.WritingMode.horizontal:c.WritingMode.horizontalOnly,Is?ru:[mi],xn,Sc,Hi,Si),Is)break}wt.vertical&&(tu+=Kh(Ce,qe,wt.vertical,Wi,$t,fi,Ke,Ei,Pr,c.WritingMode.vertical,["vertical"],xn,Ic,Hi,Si));const Gp=Mr?Mr.boxStartIndex:Ce.collisionBoxArray.length,Xp=Mr?Mr.boxEndIndex:Ce.collisionBoxArray.length,Wp=yr?yr.boxStartIndex:Ce.collisionBoxArray.length,Hp=yr?yr.boxEndIndex:Ce.collisionBoxArray.length,Kp=_n?_n.boxStartIndex:Ce.collisionBoxArray.length,Yp=_n?_n.boxEndIndex:Ce.collisionBoxArray.length,Jp=tr?tr.boxStartIndex:Ce.collisionBoxArray.length,Qp=tr?tr.boxEndIndex:Ce.collisionBoxArray.length;let zr=-1;const dl=(mi,ir)=>mi&&mi.circleDiameter?Math.max(mi.circleDiameter,ir):ir;zr=dl(Mr,zr),zr=dl(yr,zr),zr=dl(_n,zr),zr=dl(tr,zr);const nu=zr>-1?1:0;nu&&(zr*=_r/Gt),Ce.glyphOffsetArray.length>=xa.MAX_GLYPHS&&pi("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ke.sortKey!==void 0&&Ce.addToSortKeyRanges(Ce.symbolInstances.length,Ke.sortKey);const ed=Hh($t,Ke,Si),[td,id]=function(mi,ir){const Is=mi.length,kr=ir==null?void 0:ir.values;if((kr==null?void 0:kr.length)>0)for(let As=0;As=0?xn.right:-1,xn.center>=0?xn.center:-1,xn.left>=0?xn.left:-1,xn.vertical||-1,Sc,Ic,iu,Gp,Xp,Wp,Hp,Kp,Yp,Jp,Qp,li,_o,tu,Ri,yn,nu,0,qt,zr,td,id)}(i,Le,ue,r,s,o,Te,i.layers[0],i.collisionBoxArray,e.index,e.sourceLayerIndex,i.index,O,[Y,Y,Y,Y],be,_,H,Q,Ae,P,e,u,x,w,d)};if(ve==="line")for(const ue of Vh(e.geometry,0,0,Pt,Pt)){const Le=Op(ue,j,se,r.vertical||M,s,24,N,i.overscaling,Pt);for(const Ce of Le)M&&Zp(i,M.text,ye,Ce)||fe(ue,Ce)}else if(ve==="line-center"){for(const ue of e.geometry)if(ue.length>1){const Le=Fp(ue,se,r.vertical||M,s,24,N);Le&&fe(ue,Le)}}else if(e.type==="Polygon")for(const ue of Hl(e.geometry,0)){const Le=Np(ue,16);fe(ue[0],new qn(Le.x,Le.y,0))}else if(e.type==="LineString")for(const ue of e.geometry)fe(ue,new qn(ue[0].x,ue[0].y,0));else if(e.type==="Point")for(const ue of e.geometry)for(const Le of ue)fe([Le],new qn(Le.x,Le.y,0))}function Kh(i,e,r,s,o,u,d,f,_,x,w,E,I,P,M){const B=function(H,j,Y,Q,se,be,Ae,ve){const ye=Q.layout.get("text-rotate").evaluate(be,{})*Math.PI/180,de=[];for(const Te of j.positionedLines)for(const fe of Te.positionedGlyphs){if(!fe.rect)continue;const ue=fe.rect||{};let Le=dh+1,Ce=!0,qe=1,yt=0;const wt=(se||ve)&&fe.vertical,Xt=fe.metrics.advance*fe.scale/2;if(ve&&j.verticalizable&&(yt=Te.lineOffset/2-(fe.imageName?-(Gt-fe.metrics.width*fe.scale)/2:(fe.scale-1)*Gt)),fe.imageName){const zt=Ae[fe.imageName];Ce=zt.sdf,qe=zt.pixelRatio,Le=ki/qe}const Wi=se?[fe.x+Xt,fe.y]:[0,0];let wi=se?[0,0]:[fe.x+Xt+Y[0],fe.y+Y[1]-yt],$t=[0,0];wt&&($t=wi,wi=[0,0]);const Kt=(fe.metrics.left-Le)*fe.scale-Xt+wi[0],li=(-fe.metrics.top-Le)*fe.scale+wi[1],Di=Kt+ue.w*fe.scale/qe,Ti=li+ue.h*fe.scale/qe,qt=new Pe(Kt,li),Wt=new Pe(Di,li),fi=new Pe(Kt,Ti),Ei=new Pe(Di,Ti);if(wt){const zt=new Pe(-Xt,Xt-ho),ci=-Math.PI/2,Ke=Gt/2-Xt,Hi=new Pe(5-ho-Ke,-(fe.imageName?Ke:0)),hi=new Pe(...$t);qt._rotateAround(ci,zt)._add(Hi)._add(hi),Wt._rotateAround(ci,zt)._add(Hi)._add(hi),fi._rotateAround(ci,zt)._add(Hi)._add(hi),Ei._rotateAround(ci,zt)._add(Hi)._add(hi)}if(ye){const zt=Math.sin(ye),ci=Math.cos(ye),Ke=[ci,-zt,zt,ci];qt._matMult(Ke),Wt._matMult(Ke),fi._matMult(Ke),Ei._matMult(Ke)}const Li=new Pe(0,0),Bi=new Pe(0,0);de.push({tl:qt,tr:Wt,bl:fi,br:Ei,tex:ue,writingMode:j.writingMode,glyphOffset:Wi,sectionIndex:fe.sectionIndex,isSDF:Ce,pixelOffsetTL:Li,pixelOffsetBR:Bi,minFontScaleX:0,minFontScaleY:0})}return de}(0,r,f,o,u,d,s,i.allowVerticalPlacement),O=i.textSizeData;let N=null;O.kind==="source"?(N=[Wr*o.layout.get("text-size").evaluate(d,{})],N[0]>Nn&&pi(`${i.layerIds[0]}: Value for "text-size" is >= ${po}. Reduce your "text-size".`)):O.kind==="composite"&&(N=[Wr*P.compositeTextSizes[0].evaluate(d,{},M),Wr*P.compositeTextSizes[1].evaluate(d,{},M)],(N[0]>Nn||N[1]>Nn)&&pi(`${i.layerIds[0]}: Value for "text-size" is >= ${po}. Reduce your "text-size".`)),i.addSymbols(i.text,B,N,f,u,d,x,e,_.lineStartIndex,_.lineLength,I,M);for(const H of w)E[H]=i.text.placedSymbolArray.length-1;return 4*B.length}function Yh(i){for(const e in i)return i[e];return null}function Zp(i,e,r,s){const o=i.compareText;if(e in o){const u=o[e];for(let d=u.length-1;d>=0;d--)if(s.dist(u[d])>4;if(o!==1)throw new Error(`Got v${o} data when expected v1.`);const u=Jh[15&s];if(!u)throw new Error("Unrecognized array type.");const[d]=new Uint16Array(e,2,1),[f]=new Uint32Array(e,4,1);return new yc(f,d,u,e)}constructor(e,r=64,s=Float64Array,o){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=s,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const u=Jh.indexOf(this.ArrayType),d=2*e*this.ArrayType.BYTES_PER_ELEMENT,f=e*this.IndexArrayType.BYTES_PER_ELEMENT,_=(8-f%8)%8;if(u<0)throw new Error(`Unexpected typed array class: ${s}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+f+_,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+d+f+_),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+f+_,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+u]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=e,this.coords[this._pos++]=r,s}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return xc(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,s,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:u,coords:d,nodeSize:f}=this,_=[0,u.length-1,0],x=[];for(;_.length;){const w=_.pop()||0,E=_.pop()||0,I=_.pop()||0;if(E-I<=f){for(let O=I;O<=E;O++){const N=d[2*O],H=d[2*O+1];N>=e&&N<=s&&H>=r&&H<=o&&x.push(u[O])}continue}const P=I+E>>1,M=d[2*P],B=d[2*P+1];M>=e&&M<=s&&B>=r&&B<=o&&x.push(u[P]),(w===0?e<=M:r<=B)&&(_.push(I),_.push(P-1),_.push(1-w)),(w===0?s>=M:o>=B)&&(_.push(P+1),_.push(E),_.push(1-w))}return x}within(e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:u,nodeSize:d}=this,f=[0,o.length-1,0],_=[],x=s*s;for(;f.length;){const w=f.pop()||0,E=f.pop()||0,I=f.pop()||0;if(E-I<=d){for(let O=I;O<=E;O++)eu(u[2*O],u[2*O+1],e,r)<=x&&_.push(o[O]);continue}const P=I+E>>1,M=u[2*P],B=u[2*P+1];eu(M,B,e,r)<=x&&_.push(o[P]),(w===0?e-s<=M:r-s<=B)&&(f.push(I),f.push(P-1),f.push(1-w)),(w===0?e+s>=M:r+s>=B)&&(f.push(P+1),f.push(E),f.push(1-w))}return _}}function xc(i,e,r,s,o,u){if(o-s<=r)return;const d=s+o>>1;Qh(i,e,d,s,o,u),xc(i,e,r,s,d-1,1-u),xc(i,e,r,d+1,o,1-u)}function Qh(i,e,r,s,o,u){for(;o>s;){if(o-s>600){const x=o-s+1,w=r-s+1,E=Math.log(x),I=.5*Math.exp(2*E/3),P=.5*Math.sqrt(E*I*(x-I)/x)*(w-x/2<0?-1:1);Qh(i,e,r,Math.max(s,Math.floor(r-w*I/x+P)),Math.min(o,Math.floor(r+(x-w)*I/x+P)),u)}const d=e[2*r+u];let f=s,_=o;for(mo(i,e,s,r),e[2*o+u]>d&&mo(i,e,s,o);f<_;){for(mo(i,e,f,_),f++,_--;e[2*f+u]d;)_--}e[2*s+u]===d?mo(i,e,s,_):(_++,mo(i,e,_,o)),_<=r&&(s=_+1),r<=_&&(o=_-1)}}function mo(i,e,r,s){vc(i,r,s),vc(e,2*r,2*s),vc(e,2*r+1,2*s+1)}function vc(i,e,r){const s=i[e];i[e]=i[r],i[r]=s}function eu(i,e,r,s){const o=i-r,u=e-s;return o*o+u*u}var bc;c.PerformanceMarkers=void 0,(bc=c.PerformanceMarkers||(c.PerformanceMarkers={})).create="create",bc.load="load",bc.fullLoad="fullLoad";let pl=null,go=[];const wc=1e3/60,Tc="loadTime",Ec="fullLoadTime",jp={mark(i){performance.mark(i)},frame(i){const e=i;pl!=null&&go.push(e-pl),pl=e},clearMetrics(){pl=null,go=[],performance.clearMeasures(Tc),performance.clearMeasures(Ec);for(const i in c.PerformanceMarkers)performance.clearMarks(c.PerformanceMarkers[i])},getPerformanceMetrics(){performance.measure(Tc,c.PerformanceMarkers.create,c.PerformanceMarkers.load),performance.measure(Ec,c.PerformanceMarkers.create,c.PerformanceMarkers.fullLoad);const i=performance.getEntriesByName(Tc)[0].duration,e=performance.getEntriesByName(Ec)[0].duration,r=go.length,s=1/(go.reduce((u,d)=>u+d,0)/r/1e3),o=go.filter(u=>u>wc).reduce((u,d)=>u+(d-wc)/wc,0);return{loadTime:i,fullLoadTime:e,fps:s,percentDroppedFrames:o/(r+o)*100,totalFrames:r}}};c.AJAXError=Yr,c.ARRAY_TYPE=da,c.Actor=class{constructor(i,e,r){this.receive=s=>{const o=s.data,u=o.id;if(u&&(!o.targetMapId||this.mapId===o.targetMapId))if(o.type===""){delete this.tasks[u];const d=this.cancelCallbacks[u];delete this.cancelCallbacks[u],d&&d()}else Vi()||o.mustQueue?(this.tasks[u]=o,this.taskQueue.push(u),this.invoker.trigger()):this.processTask(u,o)},this.process=()=>{if(!this.taskQueue.length)return;const s=this.taskQueue.shift(),o=this.tasks[s];delete this.tasks[s],this.taskQueue.length&&this.invoker.trigger(),o&&this.processTask(s,o)},this.target=i,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},this.invoker=new Bp(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=Vi()?i:window}send(i,e,r,s,o=!1){const u=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[u]=r);const d=vn(this.globalScope)?void 0:[];return this.target.postMessage({id:u,type:i,hasCallback:!!r,targetMapId:s,mustQueue:o,sourceMapId:this.mapId,data:ms(e,d)},d),{cancel:()=>{r&&delete this.callbacks[u],this.target.postMessage({id:u,type:"",targetMapId:s,sourceMapId:this.mapId})}}}processTask(i,e){if(e.type===""){const r=this.callbacks[i];delete this.callbacks[i],r&&(e.error?r(hn(e.error)):r(null,hn(e.data)))}else{let r=!1;const s=vn(this.globalScope)?void 0:[],o=e.hasCallback?(f,_)=>{r=!0,delete this.cancelCallbacks[i],this.target.postMessage({id:i,type:"",sourceMapId:this.mapId,error:f?ms(f):null,data:ms(_,s)},s)}:f=>{r=!0};let u=null;const d=hn(e.data);if(this.parent[e.type])u=this.parent[e.type](e.sourceMapId,d,o);else if(this.parent.getWorkerSource){const f=e.type.split(".");u=this.parent.getWorkerSource(e.sourceMapId,f[0],d.source)[f[1]](d,o)}else o(new Error(`Could not find function ${e.type}`));!r&&u&&u.cancel&&(this.cancelCallbacks[i]=u.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},c.AlphaImage=io,c.CanonicalTileID=mc,c.CollisionBoxArray=g,c.CollisionCircleLayoutArray=class extends Ya{},c.Color=Oe,c.DEMData=Lh,c.DataConstantProperty=Me,c.DictionaryCoder=Bh,c.EXTENT=Pt,c.ErrorEvent=lr,c.EvaluationParameters=vt,c.Event=$i,c.Evented=Fr,c.FeatureIndex=Fh,c.FillBucket=Jl,c.FillExtrusionBucket=ec,c.GeoJSONFeature=Rh,c.ImageAtlas=mh,c.ImagePosition=sc,c.KDBush=yc,c.LineBucket=tc,c.LineStripIndexArray=class extends l{},c.LngLat=$n,c.MercatorCoordinate=ol,c.ONE_EM=Gt,c.OverscaledTileID=er,c.PerformanceUtils=jp,c.Point=Pe,c.Pos3dArray=class extends bs{},c.PosArray=J,c.Properties=xi,c.Protobuf=rc,c.QuadTriangleArray=class extends ha{},c.RGBAImage=Qi,c.RasterBoundsArray=class extends ws{},c.RequestPerformance=class{constructor(i){this._marks={start:[i.url,"start"].join("#"),end:[i.url,"end"].join("#"),measure:i.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let i=performance.getEntriesByName(this._marks.measure);return i.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),i=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),i}},c.SegmentVector=De,c.SymbolBucket=xa,c.Transitionable=Zo,c.TriangleIndexArray=ke,c.Uniform1f=Zt,c.Uniform1i=class extends Ft{constructor(i,e){super(i,e),this.current=0}set(i){this.current!==i&&(this.current=i,this.gl.uniform1i(this.location,i))}},c.Uniform2f=class extends Ft{constructor(i,e){super(i,e),this.current=[0,0]}set(i){i[0]===this.current[0]&&i[1]===this.current[1]||(this.current=i,this.gl.uniform2f(this.location,i[0],i[1]))}},c.Uniform3f=class extends Ft{constructor(i,e){super(i,e),this.current=[0,0,0]}set(i){i[0]===this.current[0]&&i[1]===this.current[1]&&i[2]===this.current[2]||(this.current=i,this.gl.uniform3f(this.location,i[0],i[1],i[2]))}},c.Uniform4f=si,c.UniformColor=Fn,c.UniformMatrix4f=class extends Ft{constructor(i,e){super(i,e),this.current=jt}set(i){if(i[12]!==this.current[12]||i[0]!==this.current[0])return this.current=i,void this.gl.uniformMatrix4fv(this.location,!1,i);for(let e=1;e<16;e++)if(i[e]!==this.current[e]){this.current=i,this.gl.uniformMatrix4fv(this.location,!1,i);break}}},c.UnwrappedTileID=Dh,c.ValidationError=me,c.ZoomHistory=Oa,c.addDynamicAttributes=cc,c.arrayBufferToImage=function(i,e){const r=new Image;r.onload=()=>{e(null,r),URL.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame(()=>{r.src=ar})},r.onerror=()=>e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const s=new Blob([new Uint8Array(i)],{type:"image/png"});r.src=i.byteLength?URL.createObjectURL(s):ar},c.arrayBufferToImageBitmap=function(i,e){const r=new Blob([new Uint8Array(i)],{type:"image/png"});createImageBitmap(r).then(s=>{e(null,s)}).catch(s=>{e(new Error(`Could not load image because of ${s.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})},c.asyncAll=function(i,e,r){if(!i.length)return r(null,[]);let s=i.length;const o=new Array(i.length);let u=null;i.forEach((d,f)=>{e(d,(_,x)=>{_&&(u=_),o[f]=x,--s==0&&r(u,o)})})},c.bezier=Lr,c.browser=wn,c.clamp=at,c.clipLine=Vh,c.clone=function(i){var e=new da(16);return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],e},c.clone$1=Ui,c.collisionCircleLayout=cp,c.config=Cs,c.copy=function(i,e){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},c.create=function(){var i=new da(16);return da!=Float32Array&&(i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0),i[0]=1,i[5]=1,i[10]=1,i[15]=1,i},c.createExpression=We,c.createFilter=ka,c.createLayout=Rt,c.createStyleLayer=function(i){if(i.type==="custom")return new Lp(i);switch(i.type){case"background":return new zp(i);case"circle":return new gu(i);case"fill":return new Ru(i);case"fill-extrusion":return new Yu(i);case"heatmap":return new yu(i);case"hillshade":return new vu(i);case"line":return new sp(i);case"raster":return new Dp(i);case"symbol":return new al(i)}},c.deepEqual=function i(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(let s=0;s{s[d.source]?r.push({command:nt.removeLayer,args:[d.id]}):u.push(d)}),r=r.concat(o),function(d,f,_){f=f||[];const x=(d=d||[]).map(Wn),w=f.map(Wn),E=d.reduce(Sn,{}),I=f.reduce(Sn,{}),P=x.slice(),M=Object.create(null);let B,O,N,H,j,Y,Q;for(B=0,O=0;B{}}},c.groupByLayout=function(i,e){const r={};for(let o=0;o@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(r,s,o,u)=>{const d=o||u;return e[s]=!d||d.toLowerCase(),""}),e["max-age"]){const r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e},c.parseGlyphPbf=function(i){return new rc(i).readFields(vp,[])},c.pbf=ah,c.performSymbolLayout=function(i){i.bucket.createArrays(),i.bucket.tilePixelRatio=Pt/(512*i.bucket.overscaling),i.bucket.compareText={},i.bucket.iconsNeedLinear=!1;const e=i.bucket.layers[0],r=e.layout,s=e._unevaluatedLayout._values,o={layoutIconSize:s["icon-size"].possiblyEvaluate(new vt(i.bucket.zoom+1),i.canonical),layoutTextSize:s["text-size"].possiblyEvaluate(new vt(i.bucket.zoom+1),i.canonical),textMaxSize:s["text-size"].possiblyEvaluate(new vt(18))};if(i.bucket.textSizeData.kind==="composite"){const{minZoom:x,maxZoom:w}=i.bucket.textSizeData;o.compositeTextSizes=[s["text-size"].possiblyEvaluate(new vt(x),i.canonical),s["text-size"].possiblyEvaluate(new vt(w),i.canonical)]}if(i.bucket.iconSizeData.kind==="composite"){const{minZoom:x,maxZoom:w}=i.bucket.iconSizeData;o.compositeIconSizes=[s["icon-size"].possiblyEvaluate(new vt(x),i.canonical),s["icon-size"].possiblyEvaluate(new vt(w),i.canonical)]}const u=r.get("text-line-height")*Gt,d=r.get("text-rotation-alignment")!=="viewport"&&r.get("symbol-placement")!=="point",f=r.get("text-keep-upright"),_=r.get("text-size");for(const x of i.bucket.features){const w=r.get("text-font").evaluate(x,{},i.canonical).join(","),E=_.evaluate(x,{},i.canonical),I=o.layoutTextSize.evaluate(x,{},i.canonical),P=o.layoutIconSize.evaluate(x,{},i.canonical),M={horizontal:{},vertical:void 0},B=x.text;let O,N=[0,0];if(B){const Y=B.toString(),Q=r.get("text-letter-spacing").evaluate(x,{},i.canonical)*Gt,se=No(Y)?Q:0,be=r.get("text-anchor").evaluate(x,{},i.canonical),Ae=Hh(e,x,i.canonical);if(!Ae){const fe=r.get("text-radial-offset").evaluate(x,{},i.canonical);N=fe?Wh(be,[fe*Gt,gc]):r.get("text-offset").evaluate(x,{},i.canonical).map(ue=>ue*Gt)}let ve=d?"center":r.get("text-justify").evaluate(x,{},i.canonical);const ye=r.get("symbol-placement"),de=ye==="point"?r.get("text-max-width").evaluate(x,{},i.canonical)*Gt:0,Te=()=>{i.bucket.allowVerticalPlacement&&ra(Y)&&(M.vertical=rl(B,i.glyphMap,i.glyphPositions,i.imagePositions,w,de,u,be,"left",se,N,c.WritingMode.vertical,!0,ye,I,E))};if(!d&&Ae){const fe=new Set;if(ve==="auto")for(let Le=0;Lethis._layers[oe.id]),W=$[0];if(W.visibility==="none")continue;const Z=W.source||"";let q=this.familiesBySource[Z];q||(q=this.familiesBySource[Z]={});const K=W.sourceLayer||"_geojsonTileLayer";let ae=q[K];ae||(ae=q[K]=[]),ae.push($)}}}class ie{constructor(S){const A={},z=[];for(const Z in S){const q=S[Z],K=A[Z]={};for(const ae in q){const oe=q[+ae];if(!oe||oe.bitmap.width===0||oe.bitmap.height===0)continue;const le={x:0,y:0,w:oe.bitmap.width+2,h:oe.bitmap.height+2};z.push(le),K[ae]={rect:le,metrics:oe.metrics}}}const{w:U,h:$}=c.potpack(z),W=new c.AlphaImage({width:U||1,height:$||1});for(const Z in S){const q=S[Z];for(const K in q){const ae=q[+K];if(!ae||ae.bitmap.width===0||ae.bitmap.height===0)continue;const oe=A[Z][K].rect;c.AlphaImage.copy(ae.bitmap,W,{x:0,y:0},{x:oe.x+1,y:oe.y+1},ae.bitmap)}}this.image=W,this.positions=A}}c.register("GlyphAtlas",ie);class Yt{constructor(S){this.tileID=new c.OverscaledTileID(S.tileID.overscaledZ,S.tileID.wrap,S.tileID.canonical.z,S.tileID.canonical.x,S.tileID.canonical.y),this.uid=S.uid,this.zoom=S.zoom,this.pixelRatio=S.pixelRatio,this.tileSize=S.tileSize,this.source=S.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=S.showCollisionBoxes,this.collectResourceTiming=!!S.collectResourceTiming,this.returnDependencies=!!S.returnDependencies,this.promoteId=S.promoteId,this.inFlightDependencies=[],this.dependencySentinel=-1}parse(S,A,z,U,$){this.status="parsing",this.data=S,this.collisionBoxArray=new c.CollisionBoxArray;const W=new c.DictionaryCoder(Object.keys(S.layers).sort()),Z=new c.FeatureIndex(this.tileID,this.promoteId);Z.bucketLayerIDs=[];const q={},K={featureIndex:Z,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:z},ae=A.familiesBySource[this.source];for(const Xe in ae){const Qe=S.layers[Xe];if(!Qe)continue;Qe.version===1&&c.warnOnce(`Vector tile source "${this.source}" layer "${Xe}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const _i=W.encode(Xe),Oe=[];for(let Ut=0;Ut=ei.maxzoom||ei.visibility!=="none"&&(Pe(Ut,this.zoom,z),(q[ei.id]=ei.createBucket({index:Z.bucketLayerIDs.length,layers:Ut,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_i,sourceID:this.source})).populate(Oe,K,this.tileID.canonical),Z.bucketLayerIDs.push(Ut.map(kt=>kt.id)))}}let oe,le,Be,Ve;const Se=c.mapObject(K.glyphDependencies,Xe=>Object.keys(Xe).map(Number));this.inFlightDependencies.forEach(Xe=>Xe==null?void 0:Xe.cancel()),this.inFlightDependencies=[];const ze=++this.dependencySentinel;Object.keys(Se).length?this.inFlightDependencies.push(U.send("getGlyphs",{uid:this.uid,stacks:Se,source:this.source,tileID:this.tileID,type:"glyphs"},(Xe,Qe)=>{ze===this.dependencySentinel&&(oe||(oe=Xe,le=Qe,pt.call(this)))})):le={};const Ue=Object.keys(K.iconDependencies);Ue.length?this.inFlightDependencies.push(U.send("getImages",{icons:Ue,source:this.source,tileID:this.tileID,type:"icons"},(Xe,Qe)=>{ze===this.dependencySentinel&&(oe||(oe=Xe,Be=Qe,pt.call(this)))})):Be={};const tt=Object.keys(K.patternDependencies);function pt(){if(oe)return $(oe);if(le&&Be&&Ve){const Xe=new ie(le),Qe=new c.ImageAtlas(Be,Ve);for(const _i in q){const Oe=q[_i];Oe instanceof c.SymbolBucket?(Pe(Oe.layers,this.zoom,z),c.performSymbolLayout({bucket:Oe,glyphMap:le,glyphPositions:Xe.positions,imageMap:Be,imagePositions:Qe.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Oe.hasPattern&&(Oe instanceof c.LineBucket||Oe instanceof c.FillBucket||Oe instanceof c.FillExtrusionBucket)&&(Pe(Oe.layers,this.zoom,z),Oe.addFeatures(K,this.tileID.canonical,Qe.patternPositions))}this.status="done",$(null,{buckets:Object.values(q).filter(_i=>!_i.isEmpty()),featureIndex:Z,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Xe.image,imageAtlas:Qe,glyphMap:this.returnDependencies?le:null,iconMap:this.returnDependencies?Be:null,glyphPositions:this.returnDependencies?Xe.positions:null})}}tt.length?this.inFlightDependencies.push(U.send("getImages",{icons:tt,source:this.source,tileID:this.tileID,type:"patterns"},(Xe,Qe)=>{ze===this.dependencySentinel&&(oe||(oe=Xe,Ve=Qe,pt.call(this)))})):Ve={},pt.call(this)}}function Pe(F,S,A){const z=new c.EvaluationParameters(S);for(const U of F)U.recalculate(z,A)}function Fi(F,S){const A=c.getArrayBuffer(F.request,(z,U,$,W)=>{z?S(z):U&&S(null,{vectorTile:new c.vectorTile.VectorTile(new c.Protobuf(U)),rawData:U,cacheControl:$,expires:W})});return()=>{A.cancel(),S()}}class nr{constructor(S,A,z,U){this.actor=S,this.layerIndex=A,this.availableImages=z,this.loadVectorData=U||Fi,this.fetching={},this.loading={},this.loaded={}}loadTile(S,A){const z=S.uid;this.loading||(this.loading={});const U=!!(S&&S.request&&S.request.collectResourceTiming)&&new c.RequestPerformance(S.request),$=this.loading[z]=new Yt(S);$.abort=this.loadVectorData(S,(W,Z)=>{if(delete this.loading[z],W||!Z)return $.status="done",this.loaded[z]=$,A(W);const q=Z.rawData,K={};Z.expires&&(K.expires=Z.expires),Z.cacheControl&&(K.cacheControl=Z.cacheControl);const ae={};if(U){const oe=U.finish();oe&&(ae.resourceTiming=JSON.parse(JSON.stringify(oe)))}$.vectorTile=Z.vectorTile,$.parse(Z.vectorTile,this.layerIndex,this.availableImages,this.actor,(oe,le)=>{if(delete this.fetching[z],oe||!le)return A(oe);A(null,c.extend({rawTileData:q.slice(0)},le,K,ae))}),this.loaded=this.loaded||{},this.loaded[z]=$,this.fetching[z]={rawTileData:q,cacheControl:K,resourceTiming:ae}})}reloadTile(S,A){const z=this.loaded,U=S.uid;if(z&&z[U]){const $=z[U];$.showCollisionBoxes=S.showCollisionBoxes,$.status==="parsing"?$.parse($.vectorTile,this.layerIndex,this.availableImages,this.actor,(W,Z)=>{if(W||!Z)return A(W,Z);let q;if(this.fetching[U]){const{rawTileData:K,cacheControl:ae,resourceTiming:oe}=this.fetching[U];delete this.fetching[U],q=c.extend({rawTileData:K.slice(0)},Z,ae,oe)}else q=Z;A(null,q)}):$.status==="done"&&($.vectorTile?$.parse($.vectorTile,this.layerIndex,this.availableImages,this.actor,A):A())}}abortTile(S,A){const z=this.loading,U=S.uid;z&&z[U]&&z[U].abort&&(z[U].abort(),delete z[U]),A()}removeTile(S,A){const z=this.loaded,U=S.uid;z&&z[U]&&delete z[U],A()}}class Dr{constructor(){this.loaded={}}loadTile(S,A){const{uid:z,encoding:U,rawImageData:$}=S,W=c.isImageBitmap($)?this.getImageData($):$,Z=new c.DEMData(z,W,U);this.loaded=this.loaded||{},this.loaded[z]=Z,A(null,Z)}getImageData(S){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(S.width,S.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=S.width,this.offscreenCanvas.height=S.height,this.offscreenCanvasContext.drawImage(S,0,0,S.width,S.height);const A=this.offscreenCanvasContext.getImageData(-1,-1,S.width+2,S.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new c.RGBAImage({width:A.width,height:A.height},A.data)}removeTile(S){const A=this.loaded,z=S.uid;A&&A[z]&&delete A[z]}}function Lr(F,S){if(F.length!==0){ui(F[0],S);for(var A=1;A=Math.abs(Z)?A-q+Z:Z-q+A,A=q}A+z>=0!=!!S&&F.reverse()}var at=c.getDefaultExportFromCjs(function F(S,A){var z,U=S&&S.type;if(U==="FeatureCollection")for(z=0;z>31}function bn(F,S){for(var A=F.loadGeometry(),z=F.type,U=0,$=0,W=A.length,Z=0;ZF},Yr=Math.fround||(or=new Float32Array(1),F=>(or[0]=+F,or[0]));var or;const Ni=3,It=5,Jr=6;class Xn{constructor(S){this.options=Object.assign(Object.create(Cs),S),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(S){const{log:A,minZoom:z,maxZoom:U}=this.options;A&&console.time("total time");const $=`prepare ${S.length} points`;A&&console.time($),this.points=S;const W=[];for(let q=0;q=z;q--){const K=+Date.now();Z=this.trees[q]=this._createTree(this._cluster(Z,q)),A&&console.log("z%d: %d clusters in %dms",q,Z.numItems,+Date.now()-K)}return A&&console.timeEnd("total time"),this}getClusters(S,A){let z=((S[0]+180)%360+360)%360-180;const U=Math.max(-90,Math.min(90,S[1]));let $=S[2]===180?180:((S[2]+180)%360+360)%360-180;const W=Math.max(-90,Math.min(90,S[3]));if(S[2]-S[0]>=360)z=-180,$=180;else if(z>$){const oe=this.getClusters([z,U,180,W],A),le=this.getClusters([-180,U,$,W],A);return oe.concat(le)}const Z=this.trees[this._limitZoom(A)],q=Z.range(vr(z),$i(W),vr($),$i(U)),K=Z.data,ae=[];for(const oe of q){const le=this.stride*oe;ae.push(K[le+It]>1?Qr(K,le,this.clusterProps):this.points[K[le+Ni]])}return ae}getChildren(S){const A=this._getOriginId(S),z=this._getOriginZoom(S),U="No cluster with the specified id.",$=this.trees[z];if(!$)throw new Error(U);const W=$.data;if(A*this.stride>=W.length)throw new Error(U);const Z=this.options.radius/(this.options.extent*Math.pow(2,z-1)),q=$.within(W[A*this.stride],W[A*this.stride+1],Z),K=[];for(const ae of q){const oe=ae*this.stride;W[oe+4]===S&&K.push(W[oe+It]>1?Qr(W,oe,this.clusterProps):this.points[W[oe+Ni]])}if(K.length===0)throw new Error(U);return K}getLeaves(S,A,z){const U=[];return this._appendLeaves(U,S,A=A||10,z=z||0,0),U}getTile(S,A,z){const U=this.trees[this._limitZoom(S)],$=Math.pow(2,S),{extent:W,radius:Z}=this.options,q=Z/W,K=(z-q)/$,ae=(z+1+q)/$,oe={features:[]};return this._addTileFeatures(U.range((A-q)/$,K,(A+1+q)/$,ae),U.data,A,z,$,oe),A===0&&this._addTileFeatures(U.range(1-q/$,K,1,ae),U.data,$,z,$,oe),A===$-1&&this._addTileFeatures(U.range(0,K,q/$,ae),U.data,-1,z,$,oe),oe.features.length?oe:null}getClusterExpansionZoom(S){let A=this._getOriginZoom(S)-1;for(;A<=this.options.maxZoom;){const z=this.getChildren(S);if(A++,z.length!==1)break;S=z[0].properties.cluster_id}return A}_appendLeaves(S,A,z,U,$){const W=this.getChildren(A);for(const Z of W){const q=Z.properties;if(q&&q.cluster?$+q.point_count<=U?$+=q.point_count:$=this._appendLeaves(S,q.cluster_id,z,U,$):$1;let ae,oe,le;if(K)ae=Tn(A,q,this.clusterProps),oe=A[q],le=A[q+1];else{const Se=this.points[A[q+Ni]];ae=Se.properties;const[ze,Ue]=Se.geometry.coordinates;oe=vr(ze),le=$i(Ue)}const Be={type:1,geometry:[[Math.round(this.options.extent*(oe*$-z)),Math.round(this.options.extent*(le*$-U))]],tags:ae};let Ve;Ve=K||this.options.generateId?A[q+Ni]:this.points[A[q+Ni]].id,Ve!==void 0&&(Be.id=Ve),W.features.push(Be)}}_limitZoom(S){return Math.max(this.options.minZoom,Math.min(Math.floor(+S),this.options.maxZoom+1))}_cluster(S,A){const{radius:z,extent:U,reduce:$,minPoints:W}=this.options,Z=z/(U*Math.pow(2,A)),q=S.data,K=[],ae=this.stride;for(let oe=0;oeA&&(ze+=q[tt+It])}if(ze>Se&&ze>=W){let Ue,tt=le*Se,pt=Be*Se,Xe=-1;const Qe=((oe/ae|0)<<5)+(A+1)+this.points.length;for(const _i of Ve){const Oe=_i*ae;if(q[Oe+2]<=A)continue;q[Oe+2]=A;const Ut=q[Oe+It];tt+=q[Oe]*Ut,pt+=q[Oe+1]*Ut,q[Oe+4]=Qe,$&&(Ue||(Ue=this._map(q,oe,!0),Xe=this.clusterProps.length,this.clusterProps.push(Ue)),$(Ue,this._map(q,Oe)))}q[oe+4]=Qe,K.push(tt/ze,pt/ze,1/0,Qe,-1,ze),$&&K.push(Xe)}else{for(let Ue=0;Ue1)for(const Ue of Ve){const tt=Ue*ae;if(!(q[tt+2]<=A)){q[tt+2]=A;for(let pt=0;pt>5}_getOriginZoom(S){return(S-this.points.length)%32}_map(S,A,z){if(S[A+It]>1){const W=this.clusterProps[S[A+Jr]];return z?Object.assign({},W):W}const U=this.points[S[A+Ni]].properties,$=this.options.map(U);return z&&$===U?Object.assign({},$):$}}function Qr(F,S,A){return{type:"Feature",id:F[S+Ni],properties:Tn(F,S,A),geometry:{type:"Point",coordinates:[(z=F[S],360*(z-.5)),lr(F[S+1])]}};var z}function Tn(F,S,A){const z=F[S+It],U=z>=1e4?`${Math.round(z/1e3)}k`:z>=1e3?Math.round(z/100)/10+"k":z,$=F[S+Jr],W=$===-1?{}:Object.assign({},A[$]);return Object.assign(W,{cluster:!0,cluster_id:F[S+Ni],point_count:z,point_count_abbreviated:U})}function vr(F){return F/360+.5}function $i(F){const S=Math.sin(F*Math.PI/180),A=.5-.25*Math.log((1+S)/(1-S))/Math.PI;return A<0?0:A>1?1:A}function lr(F){const S=(180-360*F)*Math.PI/180;return 360*Math.atan(Math.exp(S))/Math.PI-90}function Fr(F,S,A,z){for(var U,$=z,W=A-S>>1,Z=A-S,q=F[S],K=F[S+1],ae=F[A],oe=F[A+1],le=S+3;le$)U=le,$=Be;else if(Be===$){var Ve=Math.abs(le-W);Vez&&(U-S>3&&Fr(F,S,U,z),F[U+2]=$,A-U>3&&Fr(F,U,A,z))}function re(F,S,A,z,U,$){var W=U-A,Z=$-z;if(W!==0||Z!==0){var q=((F-A)*W+(S-z)*Z)/(W*W+Z*Z);q>1?(A=U,z=$):q>0&&(A+=W*q,z+=Z*q)}return(W=F-A)*W+(Z=S-z)*Z}function br(F,S,A,z){var U={id:F===void 0?null:F,type:S,geometry:A,tags:z,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function($){var W=$.geometry,Z=$.type;if(Z==="Point"||Z==="MultiPoint"||Z==="LineString")En($,W);else if(Z==="Polygon"||Z==="MultiLineString")for(var q=0;q0&&(W+=z?(U*K-q*$)/2:Math.sqrt(Math.pow(q-U,2)+Math.pow(K-$,2))),U=q,$=K}var ae=S.length-3;S[2]=1,Fr(S,0,ae,A),S[ae+2]=1,S.size=Math.abs(W),S.start=0,S.end=S.size}function tn(F,S,A,z){for(var U=0;U1?1:A}function At(F,S,A,z,U,$,W,Z){if(z/=S,$>=(A/=S)&&W=z)return null;for(var q=[],K=0;K=A&&Ve=z)){var Se=[];if(le==="Point"||le==="MultiPoint")Wn(oe,Se,A,z,U);else if(le==="LineString")Sn(oe,Se,A,z,U,!1,Z.lineMetrics);else if(le==="MultiLineString")di(oe,Se,A,z,U,!1);else if(le==="Polygon")di(oe,Se,A,z,U,!0);else if(le==="MultiPolygon")for(var ze=0;ze=A&&W<=z&&(S.push(F[$]),S.push(F[$+1]),S.push(F[$+2]))}}function Sn(F,S,A,z,U,$,W){for(var Z,q,K=me(F),ae=U===0?wr:Or,oe=F.start,le=0;leA&&(q=ae(K,Be,Ve,ze,Ue,A),W&&(K.start=oe+Z*q)):tt>z?pt=A&&(q=ae(K,Be,Ve,ze,Ue,A),Xe=!0),pt>z&&tt<=z&&(q=ae(K,Be,Ve,ze,Ue,z),Xe=!0),!$&&Xe&&(W&&(K.end=oe+Z*q),S.push(K),K=me(F)),W&&(oe+=Z)}var Qe=F.length-3;Be=F[Qe],Ve=F[Qe+1],Se=F[Qe+2],(tt=U===0?Be:Ve)>=A&&tt<=z&&gi(K,Be,Ve,Se),Qe=K.length-3,$&&Qe>=3&&(K[Qe]!==K[0]||K[Qe+1]!==K[1])&&gi(K,K[0],K[1],K[2]),K.length&&S.push(K)}function me(F){var S=[];return S.size=F.size,S.start=F.start,S.end=F.end,S}function di(F,S,A,z,U,$){for(var W=0;WW.maxX&&(W.maxX=ae),oe>W.maxY&&(W.maxY=oe)}return W}function Fe(F,S,A,z){var U=S.geometry,$=S.type,W=[];if($==="Point"||$==="MultiPoint")for(var Z=0;Z0&&S.size<(U?W:z))A.numPoints+=S.length/3;else{for(var Z=[],q=0;qW)&&(A.numSimplified++,Z.push(S[q]),Z.push(S[q+1])),A.numPoints++;U&&function(K,ae){for(var oe=0,le=0,Be=K.length,Ve=Be-2;le0===ae)for(le=0,Be=K.length;le24)throw new Error("maxZoom should be in the 0-24 range");if(S.promoteId&&S.generateId)throw new Error("promoteId and generateId cannot be used together.");var z=function(U,$){var W=[];if(U.type==="FeatureCollection")for(var Z=0;Z1&&console.time("creation"),le=this.tiles[oe]=Tr(F,S,A,z,q),this.tileCoords.push({z:S,x:A,y:z}),K)){K>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",S,A,z,le.numFeatures,le.numPoints,le.numSimplified),console.timeEnd("creation"));var Be="z"+S;this.stats[Be]=(this.stats[Be]||0)+1,this.total++}if(le.source=F,U){if(S===q.maxZoom||S===U)continue;var Ve=1<1&&console.time("clipping");var Se,ze,Ue,tt,pt,Xe,Qe=.5*q.buffer/q.extent,_i=.5-Qe,Oe=.5+Qe,Ut=1+Qe;Se=ze=Ue=tt=null,pt=At(F,ae,A-Qe,A+Oe,0,le.minX,le.maxX,q),Xe=At(F,ae,A+_i,A+Ut,0,le.minX,le.maxX,q),F=null,pt&&(Se=At(pt,ae,z-Qe,z+Oe,1,le.minY,le.maxY,q),ze=At(pt,ae,z+_i,z+Ut,1,le.minY,le.maxY,q),pt=null),Xe&&(Ue=At(Xe,ae,z-Qe,z+Oe,1,le.minY,le.maxY,q),tt=At(Xe,ae,z+_i,z+Ut,1,le.minY,le.maxY,q),Xe=null),K>1&&console.timeEnd("clipping"),Z.push(Se||[],S+1,2*A,2*z),Z.push(ze||[],S+1,2*A,2*z+1),Z.push(Ue||[],S+1,2*A+1,2*z),Z.push(tt||[],S+1,2*A+1,2*z+1)}}},hr.prototype.getTile=function(F,S,A){var z=this.options,U=z.extent,$=z.debug;if(F<0||F>24)return null;var W=1<1&&console.log("drilling down to z%d-%d-%d",F,S,A);for(var q,K=F,ae=S,oe=A;!q&&K>0;)K--,ae=Math.floor(ae/2),oe=Math.floor(oe/2),q=this.tiles[Ur(K,ae,oe)];return q&&q.source?($>1&&console.log("found parent tile z%d-%d-%d",K,ae,oe),$>1&&console.time("drilling down"),this.splitTile(q.source,K,ae,oe,F,S,A),$>1&&console.timeEnd("drilling down"),this.tiles[Z]?$e(this.tiles[Z],U):null):null};class Hn extends nr{constructor(S,A,z,U){super(S,A,z,ft),this._dataUpdateable=new Map,this.loadGeoJSON=($,W)=>{const{promoteId:Z}=$;if($.request)return c.getJSON($.request,(q,K,ae,oe)=>{this._dataUpdateable=Vr(K,Z)?Qt(K,Z):void 0,W(q,K,ae,oe)});if(typeof $.data=="string")try{const q=JSON.parse($.data);this._dataUpdateable=Vr(q,Z)?Qt(q,Z):void 0,W(null,q)}catch{W(new Error(`Input data given to '${$.source}' is not a valid GeoJSON object.`))}else $.dataDiff?this._dataUpdateable?(function(q,K,ae){var oe,le,Be,Ve;if(K.removeAll&&q.clear(),K.remove)for(const Se of K.remove)q.delete(Se);if(K.add)for(const Se of K.add){const ze=qi(Se,ae);ze!=null&&q.set(ze,Se)}if(K.update)for(const Se of K.update){let ze=q.get(Se.id);if(ze==null)continue;const Ue=!Se.removeAllProperties&&(((oe=Se.removeProperties)===null||oe===void 0?void 0:oe.length)>0||((le=Se.addOrUpdateProperties)===null||le===void 0?void 0:le.length)>0);if((Se.newGeometry||Se.removeAllProperties||Ue)&&(ze={...ze},q.set(Se.id,ze),Ue&&(ze.properties={...ze.properties})),Se.newGeometry&&(ze.geometry=Se.newGeometry),Se.removeAllProperties)ze.properties={};else if(((Be=Se.removeProperties)===null||Be===void 0?void 0:Be.length)>0)for(const tt of Se.removeProperties)Object.prototype.hasOwnProperty.call(ze.properties,tt)&&delete ze.properties[tt];if(((Ve=Se.addOrUpdateProperties)===null||Ve===void 0?void 0:Ve.length)>0)for(const{key:tt,value:pt}of Se.addOrUpdateProperties)ze.properties[tt]=pt}}(this._dataUpdateable,$.dataDiff,Z),W(null,{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())})):W(new Error(`Cannot update existing geojson data in ${$.source}`)):W(new Error(`Input data given to '${$.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}},U&&(this.loadGeoJSON=U)}loadData(S,A){var z;(z=this._pendingRequest)===null||z===void 0||z.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const U=!!(S&&S.request&&S.request.collectResourceTiming)&&new c.RequestPerformance(S.request);this._pendingCallback=A,this._pendingRequest=this.loadGeoJSON(S,($,W)=>{if(delete this._pendingCallback,delete this._pendingRequest,$||!W)return A($);if(typeof W!="object")return A(new Error(`Input data given to '${S.source}' is not a valid GeoJSON object.`));{at(W,!0);try{if(S.filter){const q=c.createExpression(S.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(q.result==="error")throw new Error(q.value.map(ae=>`${ae.key}: ${ae.message}`).join(", "));W={type:"FeatureCollection",features:W.features.filter(ae=>q.value.evaluate({zoom:0},ae))}}this._geoJSONIndex=S.cluster?new Xn(function({superclusterOptions:q,clusterProperties:K}){if(!K||!q)return q;const ae={},oe={},le={accumulated:null,zoom:0},Be={properties:null},Ve=Object.keys(K);for(const Se of Ve){const[ze,Ue]=K[Se],tt=c.createExpression(Ue),pt=c.createExpression(typeof ze=="string"?[ze,["accumulated"],["get",Se]]:ze);ae[Se]=tt.value,oe[Se]=pt.value}return q.map=Se=>{Be.properties=Se;const ze={};for(const Ue of Ve)ze[Ue]=ae[Ue].evaluate(le,Be);return ze},q.reduce=(Se,ze)=>{Be.properties=ze;for(const Ue of Ve)le.accumulated=Se[Ue],Se[Ue]=oe[Ue].evaluate(le,Be)},q}(S)).load(W.features):function(q,K){return new hr(q,K)}(W,S.geojsonVtOptions)}catch(q){return A(q)}this.loaded={};const Z={};if(U){const q=U.finish();q&&(Z.resourceTiming={},Z.resourceTiming[S.source]=JSON.parse(JSON.stringify(q)))}A(null,Z)}})}reloadTile(S,A){const z=this.loaded;return z&&z[S.uid]?super.reloadTile(S,A):this.loadTile(S,A)}removeSource(S,A){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),A()}getClusterExpansionZoom(S,A){try{A(null,this._geoJSONIndex.getClusterExpansionZoom(S.clusterId))}catch(z){A(z)}}getClusterChildren(S,A){try{A(null,this._geoJSONIndex.getChildren(S.clusterId))}catch(z){A(z)}}getClusterLeaves(S,A){try{A(null,this._geoJSONIndex.getLeaves(S.clusterId,S.limit,S.offset))}catch(z){A(z)}}}class ur{constructor(S){this.self=S,this.actor=new c.Actor(S,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:nr,geojson:Hn},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(A,z)=>{if(this.workerSourceTypes[A])throw new Error(`Worker source with name "${A}" already registered.`);this.workerSourceTypes[A]=z},this.self.registerRTLTextPlugin=A=>{if(c.plugin.isParsed())throw new Error("RTL text plugin already registered.");c.plugin.applyArabicShaping=A.applyArabicShaping,c.plugin.processBidirectionalText=A.processBidirectionalText,c.plugin.processStyledBidirectionalText=A.processStyledBidirectionalText}}setReferrer(S,A){this.referrer=A}setImages(S,A,z){this.availableImages[S]=A;for(const U in this.workerSources[S]){const $=this.workerSources[S][U];for(const W in $)$[W].availableImages=A}z()}setLayers(S,A,z){this.getLayerIndex(S).replace(A),z()}updateLayers(S,A,z){this.getLayerIndex(S).update(A.layers,A.removedIds),z()}loadTile(S,A,z){this.getWorkerSource(S,A.type,A.source).loadTile(A,z)}loadDEMTile(S,A,z){this.getDEMWorkerSource(S,A.source).loadTile(A,z)}reloadTile(S,A,z){this.getWorkerSource(S,A.type,A.source).reloadTile(A,z)}abortTile(S,A,z){this.getWorkerSource(S,A.type,A.source).abortTile(A,z)}removeTile(S,A,z){this.getWorkerSource(S,A.type,A.source).removeTile(A,z)}removeDEMTile(S,A){this.getDEMWorkerSource(S,A.source).removeTile(A)}removeSource(S,A,z){if(!this.workerSources[S]||!this.workerSources[S][A.type]||!this.workerSources[S][A.type][A.source])return;const U=this.workerSources[S][A.type][A.source];delete this.workerSources[S][A.type][A.source],U.removeSource!==void 0?U.removeSource(A,z):z()}loadWorkerSource(S,A,z){try{this.self.importScripts(A.url),z()}catch(U){z(U.toString())}}syncRTLPluginState(S,A,z){try{c.plugin.setState(A);const U=c.plugin.getPluginURL();if(c.plugin.isLoaded()&&!c.plugin.isParsed()&&U!=null){this.self.importScripts(U);const $=c.plugin.isParsed();z($?void 0:new Error(`RTL Text Plugin failed to import scripts from ${U}`),$)}}catch(U){z(U.toString())}}getAvailableImages(S){let A=this.availableImages[S];return A||(A=[]),A}getLayerIndex(S){let A=this.layerIndexes[S];return A||(A=this.layerIndexes[S]=new xt),A}getWorkerSource(S,A,z){if(this.workerSources[S]||(this.workerSources[S]={}),this.workerSources[S][A]||(this.workerSources[S][A]={}),!this.workerSources[S][A][z]){const U={send:($,W,Z)=>{this.actor.send($,W,Z,S)}};this.workerSources[S][A][z]=new this.workerSourceTypes[A](U,this.getLayerIndex(S),this.getAvailableImages(S))}return this.workerSources[S][A][z]}getDEMWorkerSource(S,A){return this.demWorkerSources[S]||(this.demWorkerSources[S]={}),this.demWorkerSources[S][A]||(this.demWorkerSources[S][A]=new Dr),this.demWorkerSources[S][A]}}return c.isWorker()&&(self.worker=new ur(self)),ur}),Ht(["./shared"],function(c){var xt="3.3.1";class ie{static testProp(t){if(!ie.docStyle)return t[0];for(let n=0;n{window.removeEventListener("click",ie.suppressClickInternal,!0)},0)}static mousePos(t,n){const a=t.getBoundingClientRect();return new c.Point(n.clientX-a.left-t.clientLeft,n.clientY-a.top-t.clientTop)}static touchPos(t,n){const a=t.getBoundingClientRect(),l=[];for(let p=0;p{t=[],n=0,a=0,l={}},h.addThrottleControl=v=>{const b=a++;return l[b]=v,b},h.removeThrottleControl=v=>{delete l[v],g()},h.getImage=(v,b,T=!0)=>{Yt.supported&&(v.headers||(v.headers={}),v.headers.accept="image/webp,*/*");const C={requestParameters:v,supportImageRefresh:T,callback:b,cancelled:!1,completed:!1,cancel:()=>{C.completed||C.cancelled||(C.cancelled=!0,C.innerRequest&&(C.innerRequest.cancel(),n--),g())}};return t.push(C),g(),C};const p=v=>{const{requestParameters:b,supportImageRefresh:T,callback:C}=v;return c.extend(b,{type:"image"}),(T!==!1||c.isWorker()||c.getProtocolAction(b.url)||b.headers&&!Object.keys(b.headers).reduce((L,D)=>L&&D==="accept",!0)?c.makeRequest:y)(b,(L,D,R,k)=>{m(v,C,L,D,R,k)})},m=(v,b,T,C,L,D)=>{T?b(T):C instanceof HTMLImageElement||c.isImageBitmap(C)?b(null,C):C&&((R,k)=>{typeof createImageBitmap=="function"?c.arrayBufferToImageBitmap(R,k):c.arrayBufferToImage(R,k)})(C,(R,k)=>{R!=null?b(R):k!=null&&b(null,k,{cacheControl:L,expires:D})}),v.cancelled||(v.completed=!0,n--,g())},g=()=>{const v=(()=>{const b=Object.keys(l);let T=!1;if(b.length>0){for(const C of b)if(T=l[C](),T)break}return T})()?c.config.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:c.config.MAX_PARALLEL_IMAGE_REQUESTS;for(let b=n;b0;b++){const T=t.shift();if(T.cancelled){b--;continue}const C=p(T);n++,T.innerRequest=C}},y=(v,b)=>{const T=new Image,C=v.url;let L=!1;const D=v.credentials;return D&&D==="include"?T.crossOrigin="use-credentials":(D&&D==="same-origin"||!c.sameOrigin(C))&&(T.crossOrigin="anonymous"),T.fetchPriority="high",T.onload=()=>{b(null,T),T.onerror=T.onload=null},T.onerror=()=>{L||b(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")),T.onerror=T.onload=null},T.src=C,{cancel:()=>{L=!0,T.src=""}}}}(ui||(ui={})),ui.resetRequestQueue(),function(h){h.Glyphs="Glyphs",h.Image="Image",h.Source="Source",h.SpriteImage="SpriteImage",h.SpriteJSON="SpriteJSON",h.Style="Style",h.Tile="Tile",h.Unknown="Unknown"}(at||(at={}));class Br{constructor(t){this._transformRequestFn=t}transformRequest(t,n){return this._transformRequestFn&&this._transformRequestFn(t,n)||{url:t}}normalizeSpriteURL(t,n,a){const l=function(p){const m=p.match(mt);if(!m)throw new Error(`Unable to parse URL "${p}"`);return{protocol:m[1],authority:m[2],path:m[3]||"/",params:m[4]?m[4].split("&"):[]}}(t);return l.path+=`${n}${a}`,function(p){const m=p.params.length?`?${p.params.join("&")}`:"";return`${p.protocol}://${p.authority}${p.path}${m}`}(l)}setTransformRequest(t){this._transformRequestFn=t}}const mt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Oi(h){var t=new c.ARRAY_TYPE(3);return t[0]=h[0],t[1]=h[1],t[2]=h[2],t}var Jt,jn=function(h,t,n){return h[0]=t[0]-n[0],h[1]=t[1]-n[1],h[2]=t[2]-n[2],h};Jt=new c.ARRAY_TYPE(3),c.ARRAY_TYPE!=Float32Array&&(Jt[0]=0,Jt[1]=0,Jt[2]=0);var Ui=function(h){var t=h[0],n=h[1];return t*t+n*n};function sr(h){const t=[];if(typeof h=="string")t.push({id:"default",url:h});else if(h&&h.length>0){const n=[];for(const{id:a,url:l}of h){const p=`${a}${l}`;n.indexOf(p)===-1&&(n.push(p),t.push({id:a,url:l}))}}return t}function pi(h,t,n,a,l){if(a)return void h(a);if(l!==Object.values(t).length||l!==Object.values(n).length)return;const p={};for(const m in t){p[m]={};const g=c.browser.getImageCanvasContext(n[m]),y=t[m];for(const v in y){const{width:b,height:T,x:C,y:L,sdf:D,pixelRatio:R,stretchX:k,stretchY:G,content:J}=y[v];p[m][v]={data:null,pixelRatio:R,sdf:D,stretchX:k,stretchY:G,content:J,spriteData:{width:b,height:T,x:C,y:L,context:g}}}}h(null,p)}(function(){var h=new c.ARRAY_TYPE(2);c.ARRAY_TYPE!=Float32Array&&(h[0]=0,h[1]=0)})();class ht{constructor(t,n,a,l){this.context=t,this.format=a,this.texture=t.gl.createTexture(),this.update(n,l)}update(t,n,a){const{width:l,height:p}=t,m=!(this.size&&this.size[0]===l&&this.size[1]===p||a),{context:g}=this,{gl:y}=g;if(this.useMipmap=!!(n&&n.useMipmap),y.bindTexture(y.TEXTURE_2D,this.texture),g.pixelStoreUnpackFlipY.set(!1),g.pixelStoreUnpack.set(1),g.pixelStoreUnpackPremultiplyAlpha.set(this.format===y.RGBA&&(!n||n.premultiply!==!1)),m)this.size=[l,p],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||c.isImageBitmap(t)?y.texImage2D(y.TEXTURE_2D,0,this.format,this.format,y.UNSIGNED_BYTE,t):y.texImage2D(y.TEXTURE_2D,0,this.format,l,p,0,this.format,y.UNSIGNED_BYTE,t.data);else{const{x:v,y:b}=a||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||c.isImageBitmap(t)?y.texSubImage2D(y.TEXTURE_2D,0,v,b,y.RGBA,y.UNSIGNED_BYTE,t):y.texSubImage2D(y.TEXTURE_2D,0,v,b,l,p,y.RGBA,y.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&y.generateMipmap(y.TEXTURE_2D)}bind(t,n,a){const{context:l}=this,{gl:p}=l;p.bindTexture(p.TEXTURE_2D,this.texture),a!==p.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(a=p.LINEAR),t!==this.filter&&(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,t),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,a||t),this.filter=t),n!==this.wrap&&(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,n),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,n),this.wrap=n)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}function Gn(h){const{userImage:t}=h;return!!(t&&t.render&&t.render())&&(h.data.replace(new Uint8Array(t.data.buffer)),!0)}class Vi extends c.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new c.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(t){if(this.loaded!==t&&(this.loaded=t,t)){for(const{ids:n,callback:a}of this.requestors)this._notify(n,a);this.requestors=[]}}getImage(t){const n=this.images[t];if(n&&!n.data&&n.spriteData){const a=n.spriteData;n.data=new c.RGBAImage({width:a.width,height:a.height},a.context.getImageData(a.x,a.y,a.width,a.height).data),n.spriteData=null}return n}addImage(t,n){if(this.images[t])throw new Error(`Image id ${t} already exist, use updateImage instead`);this._validate(t,n)&&(this.images[t]=n)}_validate(t,n){let a=!0;const l=n.data||n.spriteData;return this._validateStretch(n.stretchX,l&&l.width)||(this.fire(new c.ErrorEvent(new Error(`Image "${t}" has invalid "stretchX" value`))),a=!1),this._validateStretch(n.stretchY,l&&l.height)||(this.fire(new c.ErrorEvent(new Error(`Image "${t}" has invalid "stretchY" value`))),a=!1),this._validateContent(n.content,n)||(this.fire(new c.ErrorEvent(new Error(`Image "${t}" has invalid "content" value`))),a=!1),a}_validateStretch(t,n){if(!t)return!0;let a=0;for(const l of t){if(l[0]-1);y++,p[y]=g,m[y]=v,m[y+1]=xr}for(let g=0,y=0;g{let g=this.entries[l];g||(g=this.entries[l]={glyphs:{},requests:{},ranges:{}});let y=g.glyphs[p];if(y!==void 0)return void m(null,{stack:l,id:p,glyph:y});if(y=this._tinySDF(g,l,p),y)return g.glyphs[p]=y,void m(null,{stack:l,id:p,glyph:y});const v=Math.floor(p/256);if(256*v>65535)return void m(new Error("glyphs > 65535 not supported"));if(g.ranges[v])return void m(null,{stack:l,id:p,glyph:y});if(!this.url)return void m(new Error("glyphsUrl is not set"));let b=g.requests[v];b||(b=g.requests[v]=[],ar.loadGlyphRange(l,v,this.url,this.requestManager,(T,C)=>{if(C){for(const L in C)this._doesCharSupportLocalGlyph(+L)||(g.glyphs[+L]=C[+L]);g.ranges[v]=!0}for(const L of b)L(T,C);delete g.requests[v]})),b.push((T,C)=>{T?m(T):C&&m(null,{stack:l,id:p,glyph:C[p]||null})})},(l,p)=>{if(l)n(l);else if(p){const m={};for(const{stack:g,id:y,glyph:v}of p)(m[g]||(m[g]={}))[y]=v&&{id:v.id,bitmap:v.bitmap.clone(),metrics:v.metrics};n(null,m)}})}_doesCharSupportLocalGlyph(t){return!!this.localIdeographFontFamily&&(c.unicodeBlockLookup["CJK Unified Ideographs"](t)||c.unicodeBlockLookup["Hangul Syllables"](t)||c.unicodeBlockLookup.Hiragana(t)||c.unicodeBlockLookup.Katakana(t))}_tinySDF(t,n,a){const l=this.localIdeographFontFamily;if(!l||!this._doesCharSupportLocalGlyph(a))return;let p=t.tinySDF;if(!p){let g="400";/bold/i.test(n)?g="900":/medium/i.test(n)?g="500":/light/i.test(n)&&(g="200"),p=t.tinySDF=new ar.TinySDF({fontSize:24,buffer:3,radius:8,cutoff:.25,fontFamily:l,fontWeight:g})}const m=p.draw(String.fromCharCode(a));return{id:a,bitmap:new c.AlphaImage({width:m.width||30,height:m.height||30},m.data),metrics:{width:m.glyphWidth||24,height:m.glyphHeight||24,left:m.glyphLeft||0,top:m.glyphTop-27||-8,advance:m.glyphAdvance||24}}}}ar.loadGlyphRange=function(h,t,n,a,l){const p=256*t,m=p+255,g=a.transformRequest(n.replace("{fontstack}",h).replace("{range}",`${p}-${m}`),at.Glyphs);c.getArrayBuffer(g,(y,v)=>{if(y)l(y);else if(v){const b={};for(const T of c.parseGlyphPbf(v))b[T.id]=T;l(null,b)}})},ar.TinySDF=class{constructor({fontSize:h=24,buffer:t=3,radius:n=8,cutoff:a=.25,fontFamily:l="sans-serif",fontWeight:p="normal",fontStyle:m="normal"}={}){this.buffer=t,this.cutoff=a,this.radius=n;const g=this.size=h+4*t,y=this._createCanvas(g),v=this.ctx=y.getContext("2d",{willReadFrequently:!0});v.font=`${m} ${p} ${h}px ${l}`,v.textBaseline="alphabetic",v.textAlign="left",v.fillStyle="black",this.gridOuter=new Float64Array(g*g),this.gridInner=new Float64Array(g*g),this.f=new Float64Array(g),this.z=new Float64Array(g+1),this.v=new Uint16Array(g)}_createCanvas(h){const t=document.createElement("canvas");return t.width=t.height=h,t}draw(h){const{width:t,actualBoundingBoxAscent:n,actualBoundingBoxDescent:a,actualBoundingBoxLeft:l,actualBoundingBoxRight:p}=this.ctx.measureText(h),m=Math.ceil(n),g=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(p-l))),y=Math.min(this.size-this.buffer,m+Math.ceil(a)),v=g+2*this.buffer,b=y+2*this.buffer,T=Math.max(v*b,0),C=new Uint8ClampedArray(T),L={data:C,width:v,height:b,glyphWidth:g,glyphHeight:y,glyphTop:m,glyphLeft:0,glyphAdvance:t};if(g===0||y===0)return L;const{ctx:D,buffer:R,gridInner:k,gridOuter:G}=this;D.clearRect(R,R,g,y),D.fillText(h,R,R+m);const J=D.getImageData(R,R,g,y);G.fill(xr,0,T),k.fill(0,0,T);for(let V=0;V0?ne*ne:0,k[te]=ne<0?ne*ne:0}}vn(G,0,0,v,b,v,this.f,this.v,this.z),vn(k,R,R,g,y,v,this.f,this.v,this.z);for(let V=0;V1&&(y=t[++g]);const b=Math.abs(v-y.left),T=Math.abs(v-y.right),C=Math.min(b,T);let L;const D=p/a*(l+1);if(y.isDash){const R=l-Math.abs(D);L=Math.sqrt(C*C+R*R)}else L=l-Math.sqrt(C*C+D*D);this.data[m+v]=Math.max(0,Math.min(255,L+128))}}}addRegularDash(t){for(let g=t.length-1;g>=0;--g){const y=t[g],v=t[g+1];y.zeroLength?t.splice(g,1):v&&v.isDash===y.isDash&&(v.left=y.left,t.splice(g,1))}const n=t[0],a=t[t.length-1];n.isDash===a.isDash&&(n.left=a.left-this.width,a.right=n.right+this.width);const l=this.width*this.nextRow;let p=0,m=t[p];for(let g=0;g1&&(m=t[++p]);const y=Math.abs(g-m.left),v=Math.abs(g-m.right),b=Math.min(y,v);this.data[l+g]=Math.max(0,Math.min(255,(m.isDash?b:-b)+128))}}addDash(t,n){const a=n?7:0,l=2*a+1;if(this.nextRow+l>this.height)return c.warnOnce("LineAtlas out of space"),null;let p=0;for(let g=0;g{l.send(t,n,p)},a=a||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(t=!0){this.actors.forEach(n=>{n.remove()}),this.actors=[],t&&this.workerPool.release(this.id)}}function Ni(h,t,n){const a=function(l,p){if(l)return n(l);if(p){const m=c.pick(c.extend(p,h),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);p.vector_layers&&(m.vectorLayers=p.vector_layers,m.vectorLayerIds=m.vectorLayers.map(g=>g.id)),n(null,m)}};return h.url?c.getJSON(t.transformRequest(h.url,at.Source),a):c.browser.frame(()=>a(null,h))}or.Actor=c.Actor;class It{constructor(t,n){t&&(n?this.setSouthWest(t).setNorthEast(n):Array.isArray(t)&&(t.length===4?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1])))}setNorthEast(t){return this._ne=t instanceof c.LngLat?new c.LngLat(t.lng,t.lat):c.LngLat.convert(t),this}setSouthWest(t){return this._sw=t instanceof c.LngLat?new c.LngLat(t.lng,t.lat):c.LngLat.convert(t),this}extend(t){const n=this._sw,a=this._ne;let l,p;if(t instanceof c.LngLat)l=t,p=t;else{if(!(t instanceof It))return Array.isArray(t)?t.length===4||t.every(Array.isArray)?this.extend(It.convert(t)):this.extend(c.LngLat.convert(t)):t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(c.LngLat.convert(t)):this;if(l=t._sw,p=t._ne,!l||!p)return this}return n||a?(n.lng=Math.min(l.lng,n.lng),n.lat=Math.min(l.lat,n.lat),a.lng=Math.max(p.lng,a.lng),a.lat=Math.max(p.lat,a.lat)):(this._sw=new c.LngLat(l.lng,l.lat),this._ne=new c.LngLat(p.lng,p.lat)),this}getCenter(){return new c.LngLat((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new c.LngLat(this.getWest(),this.getNorth())}getSouthEast(){return new c.LngLat(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(t){const{lng:n,lat:a}=c.LngLat.convert(t);let l=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(l=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&l}static convert(t){return t instanceof It?t:t&&new It(t)}static fromLngLat(t,n=0){const a=360*n/40075017,l=a/Math.cos(Math.PI/180*t.lat);return new It(new c.LngLat(t.lng-l,t.lat-a),new c.LngLat(t.lng+l,t.lat+a))}}class Jr{constructor(t,n,a){this.bounds=It.convert(this.validateBounds(t)),this.minzoom=n||0,this.maxzoom=a||24}validateBounds(t){return Array.isArray(t)&&t.length===4?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]}contains(t){const n=Math.pow(2,t.z),a=Math.floor(c.mercatorXfromLng(this.bounds.getWest())*n),l=Math.floor(c.mercatorYfromLat(this.bounds.getNorth())*n),p=Math.ceil(c.mercatorXfromLng(this.bounds.getEast())*n),m=Math.ceil(c.mercatorYfromLat(this.bounds.getSouth())*n);return t.x>=a&&t.x=l&&t.y{this._loaded=!1,this.fire(new c.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=Ni(this._options,this.map._requestManager,(p,m)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),p?this.fire(new c.ErrorEvent(p)):m&&(c.extend(this,m),m.bounds&&(this.tileBounds=new Jr(m.bounds,this.minzoom,this.maxzoom)),this.fire(new c.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new c.Event("data",{dataType:"source",sourceDataType:"content"})))})},this.serialize=()=>c.extend({},this._options),this.id=t,this.dispatcher=a,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,c.extend(this,c.pick(n,["url","scheme","tileSize","promoteId"])),this._options=c.extend({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(l)}loaded(){return this._loaded}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}onAdd(t){this.map=t,this.load()}setSourceProperty(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.load()}setTiles(t){return this.setSourceProperty(()=>{this._options.tiles=t}),this}setUrl(t){return this.setSourceProperty(()=>{this.url=t,this._options.url=t}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),l={request:this.map._requestManager.transformRequest(a,at.Tile),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function p(m,g){return delete t.request,t.aborted?n(null):m&&m.status!==404?n(m):(g&&g.resourceTiming&&(t.resourceTiming=g.resourceTiming),this.map._refreshExpiredTiles&&g&&t.setExpiryData(g),t.loadVectorData(g,this.map.painter),n(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}l.request.collectResourceTiming=this._collectResourceTiming,t.actor&&t.state!=="expired"?t.state==="loading"?t.reloadCallback=n:t.request=t.actor.send("reloadTile",l,p.bind(this)):(t.actor=this.dispatcher.getActor(),t.request=t.actor.send("loadTile",l,p.bind(this)))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)}unloadTile(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class Qr extends c.Evented{constructor(t,n,a,l){super(),this.id=t,this.dispatcher=a,this.setEventedParent(l),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=c.extend({type:"raster"},n),c.extend(this,c.pick(n,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new c.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=Ni(this._options,this.map._requestManager,(t,n)=>{this._tileJSONRequest=null,this._loaded=!0,t?this.fire(new c.ErrorEvent(t)):n&&(c.extend(this,n),n.bounds&&(this.tileBounds=new Jr(n.bounds,this.minzoom,this.maxzoom)),this.fire(new c.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new c.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return c.extend({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);t.request=ui.getImage(this.map._requestManager.transformRequest(a,at.Tile),(l,p,m)=>{if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(l)t.state="errored",n(l);else if(p){this.map._refreshExpiredTiles&&m&&t.setExpiryData(m);const g=this.map.painter.context,y=g.gl;t.texture=this.map.painter.getTileTexture(p.width),t.texture?t.texture.update(p,{useMipmap:!0}):(t.texture=new ht(g,p,y.RGBA,{useMipmap:!0}),t.texture.bind(y.LINEAR,y.CLAMP_TO_EDGE,y.LINEAR_MIPMAP_NEAREST),g.extTextureFilterAnisotropic&&y.texParameterf(y.TEXTURE_2D,g.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,g.extTextureFilterAnisotropicMax)),t.state="loaded",n(null)}},this.map._refreshExpiredTiles)}abortTile(t,n){t.request&&(t.request.cancel(),delete t.request),n()}unloadTile(t,n){t.texture&&this.map.painter.saveTileTexture(t.texture),n()}hasTransition(){return!1}}class Tn extends Qr{constructor(t,n,a,l){super(t,n,a,l),this.type="raster-dem",this.maxzoom=22,this._options=c.extend({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox"}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);function l(p,m){p&&(t.state="errored",n(p)),m&&(t.dem=m,t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0,t.state="loaded",n(null))}t.request=ui.getImage(this.map._requestManager.transformRequest(a,at.Tile),(function(p,m){if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(p)t.state="errored",n(p);else if(m){this.map._refreshExpiredTiles&&t.setExpiryData(m),delete m.cacheControl,delete m.expires;const g=c.isImageBitmap(m)&&(wn==null&&(wn=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),wn)?m:c.browser.getImageData(m,1),y={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:g,encoding:this.encoding};t.actor&&t.state!=="expired"||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",y,l.bind(this)))}}).bind(this),this.map._refreshExpiredTiles),t.neighboringTiles=this._getNeighboringTiles(t.tileID)}_getNeighboringTiles(t){const n=t.canonical,a=Math.pow(2,n.z),l=(n.x-1+a)%a,p=n.x===0?t.wrap-1:t.wrap,m=(n.x+1+a)%a,g=n.x+1===a?t.wrap+1:t.wrap,y={};return y[new c.OverscaledTileID(t.overscaledZ,p,n.z,l,n.y).key]={backfilled:!1},y[new c.OverscaledTileID(t.overscaledZ,g,n.z,m,n.y).key]={backfilled:!1},n.y>0&&(y[new c.OverscaledTileID(t.overscaledZ,p,n.z,l,n.y-1).key]={backfilled:!1},y[new c.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},y[new c.OverscaledTileID(t.overscaledZ,g,n.z,m,n.y-1).key]={backfilled:!1}),n.y+1{this._updateWorkerData()},this.serialize=()=>c.extend({},this._options,{type:this.type,data:this._data}),this.id=t,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=a.getActor(),this.setEventedParent(l),this._data=n.data,this._options=c.extend({},n),this._collectResourceTiming=n.collectResourceTiming,n.maxzoom!==void 0&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;const p=c.EXTENT/this.tileSize;this.workerOptions=c.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(n.buffer!==void 0?n.buffer:128)*p,tolerance:(n.tolerance!==void 0?n.tolerance:.375)*p,extent:c.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:n.clusterMaxZoom!==void 0?n.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:c.EXTENT,radius:(n.clusterRadius||50)*p,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}onAdd(t){this.map=t,this.load()}setData(t){return this._data=t,this._updateWorkerData(),this}updateData(t){return this._updateWorkerData(t),this}setClusterOptions(t){return this.workerOptions.cluster=t.cluster,t&&(t.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=t.clusterRadius),t.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=t.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(t,n){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},n),this}getClusterChildren(t,n){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},n),this}getClusterLeaves(t,n,a,l){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:n,offset:a},l),this}_updateWorkerData(t){const n=c.extend({},this.workerOptions);t?n.dataDiff=t:typeof this._data=="string"?(n.request=this.map._requestManager.transformRequest(c.browser.resolveURL(this._data),at.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new c.Event("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,n,(a,l)=>{if(this._pendingLoads--,this._removed||l&&l.abandoned)return void this.fire(new c.Event("dataabort",{dataType:"source"}));let p=null;if(l&&l.resourceTiming&&l.resourceTiming[this.id]&&(p=l.resourceTiming[this.id].slice(0)),a)return void this.fire(new c.ErrorEvent(a));const m={dataType:"source"};this._collectResourceTiming&&p&&p.length>0&&c.extend(m,{resourceTiming:p}),this.fire(new c.Event("data",{...m,sourceDataType:"metadata"})),this.fire(new c.Event("data",{...m,sourceDataType:"content"}))})}loaded(){return this._pendingLoads===0}loadTile(t,n){const a=t.actor?"reloadTile":"loadTile";t.actor=this.actor;const l={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(a,l,(p,m)=>(delete t.request,t.unloadVectorData(),t.aborted?n(null):p?n(p):(t.loadVectorData(m,this.map.painter,a==="reloadTile"),n(null))))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0}unloadTile(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}hasTransition(){return!1}}var $i=c.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class lr extends c.Evented{constructor(t,n,a,l){super(),this.load=(p,m)=>{this._loaded=!1,this.fire(new c.Event("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=ui.getImage(this.map._requestManager.transformRequest(this.url,at.Image),(g,y)=>{this._request=null,this._loaded=!0,g?this.fire(new c.ErrorEvent(g)):y&&(this.image=y,p&&(this.coordinates=p),m&&m(),this._finishLoading())})},this.prepare=()=>{if(Object.keys(this.tiles).length===0||!this.image)return;const p=this.map.painter.context,m=p.gl;this.boundsBuffer||(this.boundsBuffer=p.createVertexBuffer(this._boundsArray,$i.members)),this.boundsSegments||(this.boundsSegments=c.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new ht(p,this.image,m.RGBA),this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE));let g=!1;for(const y in this.tiles){const v=this.tiles[y];v.state!=="loaded"&&(v.state="loaded",v.texture=this.texture,g=!0)}g&&this.fire(new c.Event("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"image",url:this.options.url,coordinates:this.coordinates}),this.id=t,this.dispatcher=a,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(l),this.options=n}loaded(){return this._loaded}updateImage(t){return t.url?(this._request&&(this._request.cancel(),this._request=null),this.options.url=t.url,this.load(t.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new c.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}onRemove(){this._request&&(this._request.cancel(),this._request=null)}setCoordinates(t){this.coordinates=t;const n=t.map(c.MercatorCoordinate.fromLngLat);this.tileID=function(l){let p=1/0,m=1/0,g=-1/0,y=-1/0;for(const C of l)p=Math.min(p,C.x),m=Math.min(m,C.y),g=Math.max(g,C.x),y=Math.max(y,C.y);const v=Math.max(g-p,y-m),b=Math.max(0,Math.floor(-Math.log(v)/Math.LN2)),T=Math.pow(2,b);return new c.CanonicalTileID(b,Math.floor((p+g)/2*T),Math.floor((m+y)/2*T))}(n),this.minzoom=this.maxzoom=this.tileID.z;const a=n.map(l=>this.tileID.getTilePoint(l)._round());return this._boundsArray=new c.RasterBoundsArray,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,c.EXTENT,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,c.EXTENT),this._boundsArray.emplaceBack(a[2].x,a[2].y,c.EXTENT,c.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new c.Event("data",{dataType:"source",sourceDataType:"content"})),this}loadTile(t,n){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},n(null)):(t.state="errored",n(null))}hasTransition(){return!1}}class Fr extends lr{constructor(t,n,a,l){super(t,n,a,l),this.load=()=>{this._loaded=!1;const p=this.options;this.urls=[];for(const m of p.urls)this.urls.push(this.map._requestManager.transformRequest(m,at.Source).url);c.getVideo(this.urls,(m,g)=>{this._loaded=!0,m?this.fire(new c.ErrorEvent(m)):g&&(this.video=g,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})},this.prepare=()=>{if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const p=this.map.painter.context,m=p.gl;this.boundsBuffer||(this.boundsBuffer=p.createVertexBuffer(this._boundsArray,$i.members)),this.boundsSegments||(this.boundsSegments=c.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE),m.texSubImage2D(m.TEXTURE_2D,0,0,0,m.RGBA,m.UNSIGNED_BYTE,this.video)):(this.texture=new ht(p,this.video,m.RGBA),this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE));let g=!1;for(const y in this.tiles){const v=this.tiles[y];v.state!=="loaded"&&(v.state="loaded",v.texture=this.texture,g=!0)}g&&this.fire(new c.Event("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"video",urls:this.urls,coordinates:this.coordinates}),this.roundZoom=!0,this.type="video",this.options=n}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const n=this.video.seekable;tn.end(0)?this.fire(new c.ErrorEvent(new c.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}hasTransition(){return this.video&&!this.video.paused}}class re extends lr{constructor(t,n,a,l){super(t,n,a,l),this.load=()=>{this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new c.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},this.prepare=()=>{let p=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,p=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,p=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const m=this.map.painter.context,g=m.gl;this.boundsBuffer||(this.boundsBuffer=m.createVertexBuffer(this._boundsArray,$i.members)),this.boundsSegments||(this.boundsSegments=c.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(p||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new ht(m,this.canvas,g.RGBA,{premultiply:!0});let y=!1;for(const v in this.tiles){const b=this.tiles[v];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,y=!0)}y&&this.fire(new c.Event("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"canvas",coordinates:this.coordinates}),n.coordinates?Array.isArray(n.coordinates)&&n.coordinates.length===4&&!n.coordinates.some(p=>!Array.isArray(p)||p.length!==2||p.some(m=>typeof m!="number"))||this.fire(new c.ErrorEvent(new c.ValidationError(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new c.ErrorEvent(new c.ValidationError(`sources.${t}`,null,'missing required property "coordinates"'))),n.animate&&typeof n.animate!="boolean"&&this.fire(new c.ErrorEvent(new c.ValidationError(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),n.canvas?typeof n.canvas=="string"||n.canvas instanceof HTMLCanvasElement||this.fire(new c.ErrorEvent(new c.ValidationError(`sources.${t}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new c.ErrorEvent(new c.ValidationError(`sources.${t}`,null,'missing required property "canvas"'))),this.options=n,this.animate=n.animate===void 0||n.animate}getCanvas(){return this.canvas}onAdd(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const t of[this.canvas.width,this.canvas.height])if(isNaN(t)||t<=0)return!0;return!1}}const br={},En=h=>{switch(h){case"geojson":return vr;case"image":return lr;case"raster":return Qr;case"raster-dem":return Tn;case"vector":return Xn;case"video":return Fr;case"canvas":return re}return br[h]};function ut(h,t){const n=c.create();return c.translate(n,n,[1,1,0]),c.scale(n,n,[.5*h.width,.5*h.height,1]),c.multiply(n,n,h.calculatePosMatrix(t.toUnwrapped()))}function nt(h,t,n,a,l,p){const m=function(T,C,L){if(T)for(const D of T){const R=C[D];if(R&&R.source===L&&R.type==="fill-extrusion")return!0}else for(const D in C){const R=C[D];if(R.source===L&&R.type==="fill-extrusion")return!0}return!1}(l&&l.layers,t,h.id),g=p.maxPitchScaleFactor(),y=h.tilesIn(a,g,m);y.sort(en);const v=[];for(const T of y)v.push({wrappedTileID:T.tileID.wrapped().key,queryResults:T.tile.queryRenderedFeatures(t,n,h._state,T.queryGeometry,T.cameraQueryGeometry,T.scale,l,p,g,ut(h.transform,T.tileID))});const b=function(T){const C={},L={};for(const D of T){const R=D.queryResults,k=D.wrappedTileID,G=L[k]=L[k]||{};for(const J in R){const V=R[J],X=G[J]=G[J]||{},ee=C[J]=C[J]||[];for(const te of V)X[te.featureIndex]||(X[te.featureIndex]=!0,ee.push(te))}}return C}(v);for(const T in b)b[T].forEach(C=>{const L=C.feature,D=h.getFeatureState(L.layer["source-layer"],L.id);L.source=L.layer.source,L.layer["source-layer"]&&(L.sourceLayer=L.layer["source-layer"]),L.state=D});return b}function en(h,t){const n=h.tileID,a=t.tileID;return n.overscaledZ-a.overscaledZ||n.canonical.y-a.canonical.y||n.wrap-a.wrap||n.canonical.x-a.canonical.x}class tn{constructor(t,n){this.timeAdded=0,this.fadeEndTime=0,this.tileID=t,this.uid=c.uniqueId(),this.uses=0,this.tileSize=n,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(t){const n=t+this.timeAdded;np.getLayer(v)).filter(Boolean);if(y.length!==0){g.layers=y,g.stateDependentLayerIds&&(g.stateDependentLayers=g.stateDependentLayerIds.map(v=>y.filter(b=>b.id===v)[0]));for(const v of y)m[v.id]=g}}return m}(t.buckets,n.style),this.hasSymbolBuckets=!1;for(const l in this.buckets){const p=this.buckets[l];if(p instanceof c.SymbolBucket){if(this.hasSymbolBuckets=!0,!a)break;p.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const l in this.buckets){const p=this.buckets[l];if(p instanceof c.SymbolBucket&&p.hasRTLText){this.hasRTLText=!0,c.lazyLoadRTLTextPlugin();break}}this.queryPadding=0;for(const l in this.buckets){const p=this.buckets[l];this.queryPadding=Math.max(this.queryPadding,n.style.getLayer(l).queryRadius(p))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new c.CollisionBoxArray}unloadVectorData(){for(const t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(t){return this.buckets[t.id]}upload(t){for(const a in this.buckets){const l=this.buckets[a];l.uploadPending()&&l.upload(t)}const n=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new ht(t,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new ht(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)}prepare(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}queryRenderedFeatures(t,n,a,l,p,m,g,y,v,b){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:l,cameraQueryGeometry:p,scale:m,tileSize:this.tileSize,pixelPosMatrix:b,transform:y,params:g,queryPadding:this.queryPadding*v},t,n,a):{}}querySourceFeatures(t,n){const a=this.latestFeatureIndex;if(!a||!a.rawTileData)return;const l=a.loadVTLayers(),p=n&&n.sourceLayer?n.sourceLayer:"",m=l._geojsonTileLayer||l[p];if(!m)return;const g=c.createFilter(n&&n.filter),{z:y,x:v,y:b}=this.tileID.canonical,T={z:y,x:v,y:b};for(let C=0;Ca)l=!1;else if(n)if(this.expirationTime{this.remove(t,p)},a)),this.data[l].push(p),this.order.push(l),this.order.length>this.max){const m=this._getAndRemoveByKey(this.order[0]);m&&this.onRemove(m)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const n=this.data[t].shift();return n.timeout&&clearTimeout(n.timeout),this.data[t].length===0&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),n.value}getByKey(t){const n=this.data[t];return n?n[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,n){if(!this.has(t))return this;const a=t.wrapped().key,l=n===void 0?0:this.data[a].indexOf(n),p=this.data[a][l];return this.data[a].splice(l,1),p.timeout&&clearTimeout(p.timeout),this.data[a].length===0&&delete this.data[a],this.onRemove(p.value),this.order.splice(this.order.indexOf(a),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const n=this._getAndRemoveByKey(this.order[0]);n&&this.onRemove(n)}return this}filter(t){const n=[];for(const a in this.data)for(const l of this.data[a])t(l.value)||n.push(l);for(const a of n)this.remove(a.value.tileID,a)}}class Ms{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,n,a){const l=String(n);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][l]=this.stateChanges[t][l]||{},c.extend(this.stateChanges[t][l],a),this.deletedStates[t]===null){this.deletedStates[t]={};for(const p in this.state[t])p!==l&&(this.deletedStates[t][p]=null)}else if(this.deletedStates[t]&&this.deletedStates[t][l]===null){this.deletedStates[t][l]={};for(const p in this.state[t][l])a[p]||(this.deletedStates[t][l][p]=null)}else for(const p in a)this.deletedStates[t]&&this.deletedStates[t][l]&&this.deletedStates[t][l][p]===null&&delete this.deletedStates[t][l][p]}removeFeatureState(t,n,a){if(this.deletedStates[t]===null)return;const l=String(n);if(this.deletedStates[t]=this.deletedStates[t]||{},a&&n!==void 0)this.deletedStates[t][l]!==null&&(this.deletedStates[t][l]=this.deletedStates[t][l]||{},this.deletedStates[t][l][a]=null);else if(n!==void 0)if(this.stateChanges[t]&&this.stateChanges[t][l])for(a in this.deletedStates[t][l]={},this.stateChanges[t][l])this.deletedStates[t][l][a]=null;else this.deletedStates[t][l]=null;else this.deletedStates[t]=null}getState(t,n){const a=String(n),l=c.extend({},(this.state[t]||{})[a],(this.stateChanges[t]||{})[a]);if(this.deletedStates[t]===null)return{};if(this.deletedStates[t]){const p=this.deletedStates[t][n];if(p===null)return{};for(const m in p)delete l[m]}return l}initializeTileState(t,n){t.setFeatureState(this.state,n)}coalesceChanges(t,n){const a={};for(const l in this.stateChanges){this.state[l]=this.state[l]||{};const p={};for(const m in this.stateChanges[l])this.state[l][m]||(this.state[l][m]={}),c.extend(this.state[l][m],this.stateChanges[l][m]),p[m]=this.state[l][m];a[l]=p}for(const l in this.deletedStates){this.state[l]=this.state[l]||{};const p={};if(this.deletedStates[l]===null)for(const m in this.state[l])p[m]={},this.state[l][m]={};else for(const m in this.deletedStates[l]){if(this.deletedStates[l][m]===null)this.state[l][m]={};else for(const g of Object.keys(this.deletedStates[l][m]))delete this.state[l][m][g];p[m]=this.state[l][m]}a[l]=a[l]||{},c.extend(a[l],p)}if(this.stateChanges={},this.deletedStates={},Object.keys(a).length!==0)for(const l in t)t[l].setFeatureState(a,n)}}class At extends c.Evented{constructor(t,n,a){super(),this.id=t,this.dispatcher=a,this.on("data",l=>{l.dataType==="source"&&l.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&l.dataType==="source"&&l.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((l,p,m,g)=>{const y=new(En(p.type))(l,p,m,g);if(y.id!==l)throw new Error(`Expected Source id to be ${l} instead of ${y.id}`);return y})(t,n,a,this),this._tiles={},this._cache=new Ps(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Ms,this._didEmitContent=!1,this._updated=!1}onAdd(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(t)}onRemove(t){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(t)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const t in this._tiles){const n=this._tiles[t];if(n.state!=="loaded"&&n.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,n){return this._source.loadTile(t,n)}_unloadTile(t){if(this._source.unloadTile)return this._source.unloadTile(t,()=>{})}_abortTile(t){this._source.abortTile&&this._source.abortTile(t,()=>{}),this._source.fire(new c.Event("dataabort",{tile:t,coord:t.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const n in this._tiles){const a=this._tiles[n];a.upload(t),a.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(t=>t.tileID).sort(Wn).map(t=>t.key)}getRenderableIds(t){const n=[];for(const a in this._tiles)this._isIdRenderable(a,t)&&n.push(this._tiles[a]);return t?n.sort((a,l)=>{const p=a.tileID,m=l.tileID,g=new c.Point(p.canonical.x,p.canonical.y)._rotate(this.transform.angle),y=new c.Point(m.canonical.x,m.canonical.y)._rotate(this.transform.angle);return p.overscaledZ-m.overscaledZ||y.y-g.y||y.x-g.x}).map(a=>a.tileID.key):n.map(a=>a.tileID).sort(Wn).map(a=>a.key)}hasRenderableParent(t){const n=this.findLoadedParent(t,0);return!!n&&this._isIdRenderable(n.tileID.key)}_isIdRenderable(t,n){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(n||!this._tiles[t].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const t in this._tiles)this._tiles[t].state!=="errored"&&this._reloadTile(t,"reloading")}}_reloadTile(t,n){const a=this._tiles[t];a&&(a.state!=="loading"&&(a.state=n),this._loadTile(a,this._tileLoaded.bind(this,a,t,n)))}_tileLoaded(t,n,a,l){if(l)return t.state="errored",void(l.status!==404?this._source.fire(new c.ErrorEvent(l,{tile:t})):this.update(this.transform,this.terrain));t.timeAdded=c.browser.now(),a==="expired"&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(n,t),this.getSource().type==="raster-dem"&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new c.Event("data",{dataType:"source",tile:t,coord:t.tileID}))}_backfillDEM(t){const n=this.getRenderableIds();for(let l=0;l1||(Math.abs(m)>1&&(Math.abs(m+y)===1?m+=y:Math.abs(m-y)===1&&(m-=y)),p.dem&&l.dem&&(l.dem.backfillBorder(p.dem,m,g),l.neighboringTiles&&l.neighboringTiles[v]&&(l.neighboringTiles[v].backfilled=!0)))}}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._tiles[t]}_retainLoadedChildren(t,n,a,l){for(const p in this._tiles){let m=this._tiles[p];if(l[p]||!m.hasData()||m.tileID.overscaledZ<=n||m.tileID.overscaledZ>a)continue;let g=m.tileID;for(;m&&m.tileID.overscaledZ>n+1;){const v=m.tileID.scaledTo(m.tileID.overscaledZ-1);m=this._tiles[v.key],m&&m.hasData()&&(g=v)}let y=g;for(;y.overscaledZ>n;)if(y=y.scaledTo(y.overscaledZ-1),t[y.key]){l[g.key]=g;break}}}findLoadedParent(t,n){if(t.key in this._loadedParentTiles){const a=this._loadedParentTiles[t.key];return a&&a.tileID.overscaledZ>=n?a:null}for(let a=t.overscaledZ-1;a>=n;a--){const l=t.scaledTo(a),p=this._getLoadedTile(l);if(p)return p}}_getLoadedTile(t){const n=this._tiles[t.key];return n&&n.hasData()?n:this._cache.getByKey(t.wrapped().key)}updateCacheSize(t){const n=Math.ceil(t.width/this._source.tileSize)+1,a=Math.ceil(t.height/this._source.tileSize)+1,l=Math.floor(n*a*(this._maxTileCacheZoomLevels===null?c.config.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),p=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,l):l;this._cache.setMaxSize(p)}handleWrapJump(t){const n=Math.round((t-(this._prevLng===void 0?t:this._prevLng))/360);if(this._prevLng=t,n){const a={};for(const l in this._tiles){const p=this._tiles[l];p.tileID=p.tileID.unwrapTo(p.tileID.wrap+n),a[p.tileID.key]=p}this._tiles=a;for(const l in this._timers)clearTimeout(this._timers[l]),delete this._timers[l];for(const l in this._tiles)this._setTileReloadTimer(l,this._tiles[l])}}update(t,n){if(this.transform=t,this.terrain=n,!this._sourceLoaded||this._paused)return;let a;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?a=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(b=>new c.OverscaledTileID(b.canonical.z,b.wrap,b.canonical.z,b.canonical.x,b.canonical.y)):(a=t.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:n}),this._source.hasTile&&(a=a.filter(b=>this._source.hasTile(b)))):a=[];const l=t.coveringZoomLevel(this._source),p=Math.max(l-At.maxOverzooming,this._source.minzoom),m=Math.max(l+At.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const b={};for(const T of a)if(T.canonical.z>this._source.minzoom){const C=T.scaledTo(T.canonical.z-1);b[C.key]=C;const L=T.scaledTo(Math.max(this._source.minzoom,Math.min(T.canonical.z,5)));b[L.key]=L}a=a.concat(Object.values(b))}const g=a.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,g&&this.fire(new c.Event("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const y=this._updateRetainedTiles(a,l);if(Sn(this._source.type)){const b={},T={},C=Object.keys(y),L=c.browser.now();for(const D of C){const R=y[D],k=this._tiles[D];if(!k||k.fadeEndTime!==0&&k.fadeEndTime<=L)continue;const G=this.findLoadedParent(R,p);G&&(this._addTile(G.tileID),b[G.tileID.key]=G.tileID),T[D]=R}this._retainLoadedChildren(T,l,m,y);for(const D in b)y[D]||(this._coveredTiles[D]=!0,y[D]=b[D]);if(n){const D={},R={};for(const k of a)this._tiles[k.key].hasData()?D[k.key]=k:R[k.key]=k;for(const k in R){const G=R[k].children(this._source.maxzoom);this._tiles[G[0].key]&&this._tiles[G[1].key]&&this._tiles[G[2].key]&&this._tiles[G[3].key]&&(D[G[0].key]=y[G[0].key]=G[0],D[G[1].key]=y[G[1].key]=G[1],D[G[2].key]=y[G[2].key]=G[2],D[G[3].key]=y[G[3].key]=G[3],delete R[k])}for(const k in R){const G=this.findLoadedParent(R[k],this._source.minzoom);if(G){D[G.tileID.key]=y[G.tileID.key]=G.tileID;for(const J in D)D[J].isChildOf(G.tileID)&&delete D[J]}}for(const k in this._tiles)D[k]||(this._coveredTiles[k]=!0)}}for(const b in y)this._tiles[b].clearFadeHold();const v=c.keysDifference(this._tiles,y);for(const b of v){const T=this._tiles[b];T.hasSymbolBuckets&&!T.holdingForFade()?T.setHoldDuration(this.map._fadeDuration):T.hasSymbolBuckets&&!T.symbolFadeFinished()||this._removeTile(b)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)}_updateRetainedTiles(t,n){const a={},l={},p=Math.max(n-At.maxOverzooming,this._source.minzoom),m=Math.max(n+At.maxUnderzooming,this._source.minzoom),g={};for(const y of t){const v=this._addTile(y);a[y.key]=y,v.hasData()||nthis._source.maxzoom){const T=y.children(this._source.maxzoom)[0],C=this.getTile(T);if(C&&C.hasData()){a[T.key]=T;continue}}else{const T=y.children(this._source.maxzoom);if(a[T[0].key]&&a[T[1].key]&&a[T[2].key]&&a[T[3].key])continue}let b=v.wasRequested();for(let T=y.overscaledZ-1;T>=p;--T){const C=y.scaledTo(T);if(l[C.key])break;if(l[C.key]=!0,v=this.getTile(C),!v&&b&&(v=this._addTile(C)),v){const L=v.hasData();if((b||L)&&(a[C.key]=C),b=v.wasRequested(),L)break}}}return a}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const t in this._tiles){const n=[];let a,l=this._tiles[t].tileID;for(;l.overscaledZ>0;){if(l.key in this._loadedParentTiles){a=this._loadedParentTiles[l.key];break}n.push(l.key);const p=l.scaledTo(l.overscaledZ-1);if(a=this._getLoadedTile(p),a)break;l=p}for(const p of n)this._loadedParentTiles[p]=a}}_addTile(t){let n=this._tiles[t.key];if(n)return n;n=this._cache.getAndRemove(t),n&&(this._setTileReloadTimer(t.key,n),n.tileID=t,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,n)));const a=n;return n||(n=new tn(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,t.key,n.state))),n.uses++,this._tiles[t.key]=n,a||this._source.fire(new c.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n}_setTileReloadTimer(t,n){t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);const a=n.getExpiryTimeout();a&&(this._timers[t]=setTimeout(()=>{this._reloadTile(t,"expired"),delete this._timers[t]},a))}_removeTile(t){const n=this._tiles[t];n&&(n.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),n.uses>0||(n.hasData()&&n.state!=="reloading"?this._cache.add(n.tileID,n,n.getExpiryTimeout()):(n.aborted=!0,this._abortTile(n),this._unloadTile(n))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const t in this._tiles)this._removeTile(t);this._cache.reset()}tilesIn(t,n,a){const l=[],p=this.transform;if(!p)return l;const m=a?p.getCameraQueryGeometry(t):t,g=t.map(D=>p.pointCoordinate(D,this.terrain)),y=m.map(D=>p.pointCoordinate(D,this.terrain)),v=this.getIds();let b=1/0,T=1/0,C=-1/0,L=-1/0;for(const D of y)b=Math.min(b,D.x),T=Math.min(T,D.y),C=Math.max(C,D.x),L=Math.max(L,D.y);for(let D=0;D=0&&V[1].y+J>=0){const X=g.map(te=>k.getTilePoint(te)),ee=y.map(te=>k.getTilePoint(te));l.push({tile:R,tileID:k,queryGeometry:X,cameraQueryGeometry:ee,scale:G})}}return l}getVisibleCoordinates(t){const n=this.getRenderableIds(t).map(a=>this._tiles[a].tileID);for(const a of n)a.posMatrix=this.transform.calculatePosMatrix(a.toUnwrapped());return n}hasTransition(){if(this._source.hasTransition())return!0;if(Sn(this._source.type)){const t=c.browser.now();for(const n in this._tiles)if(this._tiles[n].fadeEndTime>=t)return!0}return!1}setFeatureState(t,n,a){this._state.updateState(t=t||"_geojsonTileLayer",n,a)}removeFeatureState(t,n,a){this._state.removeFeatureState(t=t||"_geojsonTileLayer",n,a)}getFeatureState(t,n){return this._state.getState(t=t||"_geojsonTileLayer",n)}setDependencies(t,n,a){const l=this._tiles[t];l&&l.setDependencies(n,a)}reloadTilesForDependencies(t,n){for(const a in this._tiles)this._tiles[a].hasDependency(t,n)&&this._reloadTile(a,"reloading");this._cache.filter(a=>!a.hasDependency(t,n))}}function Wn(h,t){const n=Math.abs(2*h.wrap)-+(h.wrap<0),a=Math.abs(2*t.wrap)-+(t.wrap<0);return h.overscaledZ-t.overscaledZ||a-n||t.canonical.y-h.canonical.y||t.canonical.x-h.canonical.x}function Sn(h){return h==="raster"||h==="image"||h==="video"}At.maxOverzooming=10,At.maxUnderzooming=3;const me="mapboxgl_preloaded_worker_pool";class di{constructor(){this.active={}}acquire(t){if(!this.workers)for(this.workers=[];this.workers.length{n.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[me]}numActive(){return Object.keys(this.active).length}}const gi=Math.floor(c.browser.hardwareConcurrency/2);let wr;function Or(){return wr||(wr=new di),wr}di.workerCount=c.isSafari(globalThis)?Math.max(Math.min(gi,3),1):1;class ge{constructor(t,n){this.reset(t,n)}reset(t,n){this.points=t||[],this._distances=[0];for(let a=1;a0?(l-m)/g:0;return this.points[p].mult(1-y).add(this.points[n].mult(y))}}function Ne(h,t){let n=!0;return h==="always"||h!=="never"&&t!=="never"||(n=!1),n}class $e{constructor(t,n,a){const l=this.boxCells=[],p=this.circleCells=[];this.xCellCount=Math.ceil(t/a),this.yCellCount=Math.ceil(n/a);for(let m=0;mthis.width||l<0||n>this.height)return[];const y=[];if(t<=0&&n<=0&&this.width<=a&&this.height<=l){if(p)return[{key:null,x1:t,y1:n,x2:a,y2:l}];for(let v=0;v0}hitTestCircle(t,n,a,l,p){const m=t-a,g=t+a,y=n-a,v=n+a;if(g<0||m>this.width||v<0||y>this.height)return!1;const b=[];return this._forEachCell(m,y,g,v,this._queryCellCircle,b,{hitTest:!0,overlapMode:l,circle:{x:t,y:n,radius:a},seenUids:{box:{},circle:{}}},p),b.length>0}_queryCell(t,n,a,l,p,m,g,y){const{seenUids:v,hitTest:b,overlapMode:T}=g,C=this.boxCells[p];if(C!==null){const D=this.bboxes;for(const R of C)if(!v.box[R]){v.box[R]=!0;const k=4*R,G=this.boxKeys[R];if(t<=D[k+2]&&n<=D[k+3]&&a>=D[k+0]&&l>=D[k+1]&&(!y||y(G))&&(!b||!Ne(T,G.overlapMode))&&(m.push({key:G,x1:D[k],y1:D[k+1],x2:D[k+2],y2:D[k+3]}),b))return!0}}const L=this.circleCells[p];if(L!==null){const D=this.circles;for(const R of L)if(!v.circle[R]){v.circle[R]=!0;const k=3*R,G=this.circleKeys[R];if(this._circleAndRectCollide(D[k],D[k+1],D[k+2],t,n,a,l)&&(!y||y(G))&&(!b||!Ne(T,G.overlapMode))){const J=D[k],V=D[k+1],X=D[k+2];if(m.push({key:G,x1:J-X,y1:V-X,x2:J+X,y2:V+X}),b)return!0}}}return!1}_queryCellCircle(t,n,a,l,p,m,g,y){const{circle:v,seenUids:b,overlapMode:T}=g,C=this.boxCells[p];if(C!==null){const D=this.bboxes;for(const R of C)if(!b.box[R]){b.box[R]=!0;const k=4*R,G=this.boxKeys[R];if(this._circleAndRectCollide(v.x,v.y,v.radius,D[k+0],D[k+1],D[k+2],D[k+3])&&(!y||y(G))&&!Ne(T,G.overlapMode))return m.push(!0),!0}}const L=this.circleCells[p];if(L!==null){const D=this.circles;for(const R of L)if(!b.circle[R]){b.circle[R]=!0;const k=3*R,G=this.circleKeys[R];if(this._circlesCollide(D[k],D[k+1],D[k+2],v.x,v.y,v.radius)&&(!y||y(G))&&!Ne(T,G.overlapMode))return m.push(!0),!0}}}_forEachCell(t,n,a,l,p,m,g,y){const v=this._convertToXCellCoord(t),b=this._convertToYCellCoord(n),T=this._convertToXCellCoord(a),C=this._convertToYCellCoord(l);for(let L=v;L<=T;L++)for(let D=b;D<=C;D++)if(p.call(this,t,n,a,l,this.xCellCount*D+L,m,g,y))return}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}_convertToYCellCoord(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}_circlesCollide(t,n,a,l,p,m){const g=l-t,y=p-n,v=a+m;return v*v>g*g+y*y}_circleAndRectCollide(t,n,a,l,p,m,g){const y=(m-l)/2,v=Math.abs(t-(l+y));if(v>y+a)return!1;const b=(g-p)/2,T=Math.abs(n-(p+b));if(T>b+a)return!1;if(v<=y||T<=b)return!0;const C=v-y,L=T-b;return C*C+L*L<=a*a}}function ii(h,t,n,a,l){const p=c.create();return t?(c.scale(p,p,[1/l,1/l,1]),n||c.rotateZ(p,p,a.angle)):c.multiply(p,a.labelPlaneMatrix,h),p}function Tr(h,t,n,a,l){if(t){const p=c.clone(h);return c.scale(p,p,[l,l,1]),n||c.rotateZ(p,p,-a.angle),p}return a.glCoordMatrix}function Fe(h,t,n){let a;n?(a=[h.x,h.y,n(h.x,h.y),1],c.transformMat4(a,a,t)):(a=[h.x,h.y,0,1],U(a,a,t));const l=a[3];return{point:new c.Point(a[0]/l,a[1]/l),signedDistanceFromCamera:l}}function cr(h,t){return .5+h/t*.5}function hr(h,t){const n=h[0]/h[3],a=h[1]/h[3];return n>=-t[0]&&n<=t[0]&&a>=-t[1]&&a<=t[1]}function Ur(h,t,n,a,l,p,m,g,y,v){const b=a?h.textSizeData:h.iconSizeData,T=c.evaluateSizeForZoom(b,n.transform.zoom),C=[256/n.width*2+1,256/n.height*2+1],L=a?h.text.dynamicLayoutVertexArray:h.icon.dynamicLayoutVertexArray;L.clear();const D=h.lineVertexArray,R=a?h.text.placedSymbolArray:h.icon.placedSymbolArray,k=n.transform.width/n.transform.height;let G=!1;for(let J=0;JMath.abs(n.x-t.x)*a?{useVertical:!0}:(h===c.WritingMode.vertical?t.yn.x)?{needsFlipping:!0}:null}function Qt(h,t,n,a,l,p,m,g,y,v,b,T,C,L,D,R){const k=t/24,G=h.lineOffsetX*k,J=h.lineOffsetY*k;let V;if(h.numGlyphs>1){const X=h.glyphStartIndex+h.numGlyphs,ee=h.lineStartIndex,te=h.lineStartIndex+h.lineLength,ne=qi(k,g,G,J,n,b,T,h,y,p,C,D,R);if(!ne)return{notEnoughRoom:!0};const he=Fe(ne.first.point,m,R).point,ce=Fe(ne.last.point,m,R).point;if(a&&!n){const pe=Vr(h.writingMode,he,ce,L);if(pe)return pe}V=[ne.first];for(let pe=h.glyphStartIndex+1;pe0?he.point:ft(T,ne,ee,1,l,R),pe=Vr(h.writingMode,ee,ce,L);if(pe)return pe}const X=S(k*g.getoffsetX(h.glyphStartIndex),G,J,n,b,T,h.segment,h.lineStartIndex,h.lineStartIndex+h.lineLength,y,p,C,D,R);if(!X)return{notEnoughRoom:!0};V=[X]}for(const X of V)c.addDynamicAttributes(v,X.point,X.angle);return{}}function ft(h,t,n,a,l,p){const m=Fe(h.add(h.sub(t)._unit()),l,p).point,g=n.sub(m);return n.add(g._mult(a/g.mag()))}function Hn(h,t){const{projectionCache:n,lineVertexArray:a,labelPlaneMatrix:l,tileAnchorPoint:p,distanceFromAnchor:m,getElevation:g,previousVertex:y,direction:v,absOffsetX:b}=t;if(n.projections[h])return n.projections[h];const T=new c.Point(a.getx(h),a.gety(h)),C=Fe(T,l,g);if(C.signedDistanceFromCamera>0)return n.projections[h]=C.point,C.point;const L=h-v;return ft(m===0?p:new c.Point(a.getx(L),a.gety(L)),T,y,b-m+1,l,g)}function ur(h,t,n){return h._unit()._perp()._mult(t*n)}function F(h,t,n,a,l,p,m,g){const{projectionCache:y,direction:v}=g;if(y.offsets[h])return y.offsets[h];const b=n.add(t);if(h+v=l)return y.offsets[h]=b,b;const T=Hn(h+v,g),C=ur(T.sub(n),m,v),L=n.add(C),D=T.add(C);return y.offsets[h]=c.findLineIntersection(p,b,L,D)||b,y.offsets[h]}function S(h,t,n,a,l,p,m,g,y,v,b,T,C,L){const D=a?h-t:h+t;let R=D>0?1:-1,k=0;a&&(R*=-1,k=Math.PI),R<0&&(k+=Math.PI);let G,J,V=R>0?g+m:g+m+1,X=l,ee=l,te=0,ne=0;const he=Math.abs(D),ce=[];let pe;for(;te+ne<=he;){if(V+=R,V=y)return null;te+=ne,ee=X,J=G;const _e={projectionCache:T,lineVertexArray:v,labelPlaneMatrix:b,tileAnchorPoint:p,distanceFromAnchor:te,getElevation:L,previousVertex:ee,direction:R,absOffsetX:he};if(X=Hn(V,_e),n===0)ce.push(ee),pe=X.sub(ee);else{let ke;const Ee=X.sub(ee);ke=Ee.mag()===0?ur(Hn(V+R,_e).sub(X),n,R):ur(Ee,n,R),J||(J=ee.add(ke)),G=F(V,ke,X,g,y,J,n,_e),ce.push(J),pe=G.sub(J)}ne=pe.mag()}const Ie=pe._mult((he-te)/ne)._add(J||ee),Ze=k+Math.atan2(X.y-ee.y,X.x-ee.x);return ce.push(Ie),{point:Ie,angle:C?Ze:0,path:ce}}const A=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function z(h,t){for(let n=0;n=1;De--)Ee.push(_e.path[De]);for(let De=1;DeFe(Ge,y,D));Ee=De.some(Ge=>Ge.signedDistanceFromCamera<=0)?[]:De.map(Ge=>Ge.point)}let je=[];if(Ee.length>0){const De=Ee[0].clone(),Ge=Ee[0].clone();for(let Et=1;Et=pe.x&&Ge.x<=Ie.x&&De.y>=pe.y&&Ge.y<=Ie.y?[Ee]:Ge.xIe.x||Ge.yIe.y?[]:c.clipLine([Ee],pe.x,pe.y,Ie.x,Ie.y)}for(const De of je){Ze.reset(De,.25*ce);let Ge=0;Ge=Ze.length<=.5*ce?1:Math.ceil(Ze.paddedLength/bt)+1;for(let Et=0;Et=this.screenRightBoundary||l<$||n>this.screenBottomBoundary}isInsideGrid(t,n,a,l){return a>=0&&t=0&&na.collisionGroupID===n}}return this.collisionGroups[t]}}function Ve(h,t,n,a,l){const{horizontalAlign:p,verticalAlign:m}=c.getAnchorAlignment(h);return new c.Point(-(p-.5)*t+a[0]*l,-(m-.5)*n+a[1]*l)}function Se(h,t,n,a,l,p){const{x1:m,x2:g,y1:y,y2:v,anchorPointX:b,anchorPointY:T}=h,C=new c.Point(t,n);return a&&C._rotate(l?p:-p),{x1:m+C.x,y1:y+C.y,x2:g+C.x,y2:v+C.y,anchorPointX:b,anchorPointY:T}}class ze{constructor(t,n,a,l,p){this.transform=t.clone(),this.terrain=n,this.collisionIndex=new W(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=a,this.retainedQueryData={},this.collisionGroups=new Be(l),this.collisionCircleArrays={},this.prevPlacement=p,p&&(p.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,n,a,l){const p=a.getBucket(n),m=a.latestFeatureIndex;if(!p||!m||n.id!==p.layerIds[0])return;const g=a.collisionBoxArray,y=p.layers[0].layout,v=Math.pow(2,this.transform.zoom-a.tileID.overscaledZ),b=a.tileSize/c.EXTENT,T=this.transform.calculatePosMatrix(a.tileID.toUnwrapped()),C=y.get("text-pitch-alignment")==="map",L=y.get("text-rotation-alignment")==="map",D=Z(a,1,this.transform.zoom),R=ii(T,C,L,this.transform,D);let k=null;if(C){const J=Tr(T,C,L,this.transform,D);k=c.multiply([],this.transform.labelPlaneMatrix,J)}this.retainedQueryData[p.bucketInstanceId]=new le(p.bucketInstanceId,m,p.sourceLayerIndex,p.index,a.tileID);const G={bucket:p,layout:y,posMatrix:T,textLabelPlaneMatrix:R,labelToScreenMatrix:k,scale:v,textPixelRatio:b,holdingForFade:a.holdingForFade(),collisionBoxArray:g,partiallyEvaluatedTextSize:c.evaluateSizeForZoom(p.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(p.sourceID)};if(l)for(const J of p.sortKeyRanges){const{sortKey:V,symbolInstanceStart:X,symbolInstanceEnd:ee}=J;t.push({sortKey:V,symbolInstanceStart:X,symbolInstanceEnd:ee,parameters:G})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:p.symbolInstances.length,parameters:G})}attemptAnchorPlacement(t,n,a,l,p,m,g,y,v,b,T,C,L,D,R,k){const G=c.TextAnchorEnum[t.textAnchor],J=[t.textOffset0,t.textOffset1],V=Ve(G,a,l,J,p),X=this.collisionIndex.placeCollisionBox(Se(n,V.x,V.y,m,g,this.transform.angle),T,y,v,b.predicate,k);if((!R||this.collisionIndex.placeCollisionBox(Se(R,V.x,V.y,m,g,this.transform.angle),T,y,v,b.predicate,k).box.length!==0)&&X.box.length>0){let ee;if(this.prevPlacement&&this.prevPlacement.variableOffsets[C.crossTileID]&&this.prevPlacement.placements[C.crossTileID]&&this.prevPlacement.placements[C.crossTileID].text&&(ee=this.prevPlacement.variableOffsets[C.crossTileID].anchor),C.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[C.crossTileID]={textOffset:J,width:a,height:l,anchor:G,textBoxScale:p,prevAnchor:ee},this.markUsedJustification(L,G,C,D),L.allowVerticalPlacement&&(this.markUsedOrientation(L,D,C),this.placedOrientations[C.crossTileID]=D),{shift:V,placedGlyphBoxes:X}}}placeLayerBucketPart(t,n,a){const{bucket:l,layout:p,posMatrix:m,textLabelPlaneMatrix:g,labelToScreenMatrix:y,textPixelRatio:v,holdingForFade:b,collisionBoxArray:T,partiallyEvaluatedTextSize:C,collisionGroup:L}=t.parameters,D=p.get("text-optional"),R=p.get("icon-optional"),k=c.getOverlapMode(p,"text-overlap","text-allow-overlap"),G=k==="always",J=c.getOverlapMode(p,"icon-overlap","icon-allow-overlap"),V=J==="always",X=p.get("text-rotation-alignment")==="map",ee=p.get("text-pitch-alignment")==="map",te=p.get("icon-text-fit")!=="none",ne=p.get("symbol-z-order")==="viewport-y",he=G&&(V||!l.hasIconData()||R),ce=V&&(G||!l.hasTextData()||D);!l.collisionArrays&&T&&l.deserializeCollisionBoxes(T);const pe=this.retainedQueryData[l.bucketInstanceId].tileID,Ie=this.terrain?(_e,ke)=>this.terrain.getElevation(pe,_e,ke):null,Ze=(_e,ke)=>{var Ee,bt;if(n[_e.crossTileID])return;if(b)return void(this.placements[_e.crossTileID]=new ae(!1,!1,!1));let je=!1,De=!1,Ge=!0,Et=null,lt={box:null,offscreen:null},zi={box:null,offscreen:null},ti=null,Mt=null,vi=null,mr=0,Yi=0,gr=0;ke.textFeatureIndex?mr=ke.textFeatureIndex:_e.useRuntimeCollisionCircles&&(mr=_e.featureIndex),ke.verticalTextFeatureIndex&&(Yi=ke.verticalTextFeatureIndex);const Rn=ke.textBox;if(Rn){const Ft=jt=>{let Nt=c.WritingMode.horizontal;if(l.allowVerticalPlacement&&!jt&&this.prevPlacement){const ai=this.prevPlacement.placedOrientations[_e.crossTileID];ai&&(this.placedOrientations[_e.crossTileID]=ai,Nt=ai,this.markUsedOrientation(l,Nt,_e))}return Nt},Zt=(jt,Nt)=>{if(l.allowVerticalPlacement&&_e.numVerticalGlyphVertices>0&&ke.verticalTextBox){for(const ai of l.writingModes)if(ai===c.WritingMode.vertical?(lt=Nt(),zi=lt):lt=jt(),lt&<.box&<.box.length)break}else lt=jt()},si=_e.textAnchorOffsetStartIndex,Fn=_e.textAnchorOffsetEndIndex;if(Fn===si){const jt=(Nt,ai)=>{const St=this.collisionIndex.placeCollisionBox(Nt,k,v,m,L.predicate,Ie);return St&&St.box&&St.box.length&&(this.markUsedOrientation(l,ai,_e),this.placedOrientations[_e.crossTileID]=ai),St};Zt(()=>jt(Rn,c.WritingMode.horizontal),()=>{const Nt=ke.verticalTextBox;return l.allowVerticalPlacement&&_e.numVerticalGlyphVertices>0&&Nt?jt(Nt,c.WritingMode.vertical):{box:null,offscreen:null}}),Ft(lt&<.box&<.box.length)}else{let jt=c.TextAnchorEnum[(bt=(Ee=this.prevPlacement)===null||Ee===void 0?void 0:Ee.variableOffsets[_e.crossTileID])===null||bt===void 0?void 0:bt.anchor];const Nt=(St,Ar,Ji)=>{const Gr=St.x2-St.x1,Xo=St.y2-St.y1,fn=_e.textBoxScale,Ol=te&&J==="never"?Ar:null;let mn={box:[],offscreen:!1},Pt=k==="never"?1:2,ua="never";jt&&Pt++;for(let Qa=0;QaNt(Rn,ke.iconBox,c.WritingMode.horizontal),()=>{const St=ke.verticalTextBox;return l.allowVerticalPlacement&&!(lt&<.box&<.box.length)&&_e.numVerticalGlyphVertices>0&&St?Nt(St,ke.verticalIconBox,c.WritingMode.vertical):{box:null,offscreen:null}}),lt&&(je=lt.box,Ge=lt.offscreen);const ai=Ft(lt&<.box);if(!je&&this.prevPlacement){const St=this.prevPlacement.variableOffsets[_e.crossTileID];St&&(this.variableOffsets[_e.crossTileID]=St,this.markUsedJustification(l,St.anchor,_e,ai))}}}if(ti=lt,je=ti&&ti.box&&ti.box.length>0,Ge=ti&&ti.offscreen,_e.useRuntimeCollisionCircles){const Ft=l.text.placedSymbolArray.get(_e.centerJustifiedTextSymbolIndex),Zt=c.evaluateSizeForFeature(l.textSizeData,C,Ft),si=p.get("text-padding");Mt=this.collisionIndex.placeCollisionCircles(k,Ft,l.lineVertexArray,l.glyphOffsetArray,Zt,m,g,y,a,ee,L.predicate,_e.collisionCircleDiameter,si,Ie),Mt.circles.length&&Mt.collisionDetected&&!a&&c.warnOnce("Collisions detected, but collision boxes are not shown"),je=G||Mt.circles.length>0&&!Mt.collisionDetected,Ge=Ge&&Mt.offscreen}if(ke.iconFeatureIndex&&(gr=ke.iconFeatureIndex),ke.iconBox){const Ft=Zt=>{const si=te&&Et?Se(Zt,Et.x,Et.y,X,ee,this.transform.angle):Zt;return this.collisionIndex.placeCollisionBox(si,J,v,m,L.predicate,Ie)};zi&&zi.box&&zi.box.length&&ke.verticalIconBox?(vi=Ft(ke.verticalIconBox),De=vi.box.length>0):(vi=Ft(ke.iconBox),De=vi.box.length>0),Ge=Ge&&vi.offscreen}const jr=D||_e.numHorizontalGlyphVertices===0&&_e.numVerticalGlyphVertices===0,Ir=R||_e.numIconVertices===0;if(jr||Ir?Ir?jr||(De=De&&je):je=De&&je:De=je=De&&je,je&&ti&&ti.box&&this.collisionIndex.insertCollisionBox(ti.box,k,p.get("text-ignore-placement"),l.bucketInstanceId,zi&&zi.box&&Yi?Yi:mr,L.ID),De&&vi&&this.collisionIndex.insertCollisionBox(vi.box,J,p.get("icon-ignore-placement"),l.bucketInstanceId,gr,L.ID),Mt&&(je&&this.collisionIndex.insertCollisionCircles(Mt.circles,k,p.get("text-ignore-placement"),l.bucketInstanceId,mr,L.ID),a)){const Ft=l.bucketInstanceId;let Zt=this.collisionCircleArrays[Ft];Zt===void 0&&(Zt=this.collisionCircleArrays[Ft]=new oe);for(let si=0;si=0;--ke){const Ee=_e[ke];Ze(l.symbolInstances.get(Ee),l.collisionArrays[Ee])}}else for(let _e=t.symbolInstanceStart;_e=0&&(t.text.placedSymbolArray.get(g).crossTileID=p>=0&&g!==p?0:a.crossTileID)}markUsedOrientation(t,n,a){const l=n===c.WritingMode.horizontal||n===c.WritingMode.horizontalOnly?n:0,p=n===c.WritingMode.vertical?n:0,m=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex];for(const g of m)t.text.placedSymbolArray.get(g).placedOrientation=l;a.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).placedOrientation=p)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;const n=this.prevPlacement;let a=!1;this.prevZoomAdjustment=n?n.zoomAdjustment(this.transform.zoom):0;const l=n?n.symbolFadeChange(t):1,p=n?n.opacities:{},m=n?n.variableOffsets:{},g=n?n.placedOrientations:{};for(const y in this.placements){const v=this.placements[y],b=p[y];b?(this.opacities[y]=new K(b,l,v.text,v.icon),a=a||v.text!==b.text.placed||v.icon!==b.icon.placed):(this.opacities[y]=new K(null,l,v.text,v.icon,v.skipFade),a=a||v.text||v.icon)}for(const y in p){const v=p[y];if(!this.opacities[y]){const b=new K(v,l,!1,!1);b.isHidden()||(this.opacities[y]=b,a=a||v.text.placed||v.icon.placed)}}for(const y in m)this.variableOffsets[y]||!this.opacities[y]||this.opacities[y].isHidden()||(this.variableOffsets[y]=m[y]);for(const y in g)this.placedOrientations[y]||!this.opacities[y]||this.opacities[y].isHidden()||(this.placedOrientations[y]=g[y]);if(n&&n.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");a?this.lastPlacementChangeTime=t:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=n?n.lastPlacementChangeTime:t)}updateLayerOpacities(t,n){const a={};for(const l of n){const p=l.getBucket(t);p&&l.latestFeatureIndex&&t.id===p.layerIds[0]&&this.updateBucketOpacities(p,a,l.collisionBoxArray)}}updateBucketOpacities(t,n,a){t.hasTextData()&&(t.text.opacityVertexArray.clear(),t.text.hasVisibleVertices=!1),t.hasIconData()&&(t.icon.opacityVertexArray.clear(),t.icon.hasVisibleVertices=!1),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const l=t.layers[0],p=l.layout,m=new K(null,0,!1,!1,!0),g=p.get("text-allow-overlap"),y=p.get("icon-allow-overlap"),v=l._unevaluatedLayout.hasValue("text-variable-anchor")||l._unevaluatedLayout.hasValue("text-variable-anchor-offset"),b=p.get("text-rotation-alignment")==="map",T=p.get("text-pitch-alignment")==="map",C=p.get("icon-text-fit")!=="none",L=new K(null,0,g&&(y||!t.hasIconData()||p.get("icon-optional")),y&&(g||!t.hasTextData()||p.get("text-optional")),!0);!t.collisionArrays&&a&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(a);const D=(R,k,G)=>{for(let J=0;J0,te=this.placedOrientations[k.crossTileID],ne=te===c.WritingMode.vertical,he=te===c.WritingMode.horizontal||te===c.WritingMode.horizontalOnly;if(G>0||J>0){const ce=ei(X.text);D(t.text,G,ne?kt:ce),D(t.text,J,he?kt:ce);const pe=X.text.isHidden();[k.rightJustifiedTextSymbolIndex,k.centerJustifiedTextSymbolIndex,k.leftJustifiedTextSymbolIndex].forEach(_e=>{_e>=0&&(t.text.placedSymbolArray.get(_e).hidden=pe||ne?1:0)}),k.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(k.verticalPlacedTextSymbolIndex).hidden=pe||he?1:0);const Ie=this.variableOffsets[k.crossTileID];Ie&&this.markUsedJustification(t,Ie.anchor,k,te);const Ze=this.placedOrientations[k.crossTileID];Ze&&(this.markUsedJustification(t,"left",k,Ze),this.markUsedOrientation(t,Ze,k))}if(ee){const ce=ei(X.icon),pe=!(C&&k.verticalPlacedIconSymbolIndex&&ne);k.placedIconSymbolIndex>=0&&(D(t.icon,k.numIconVertices,pe?ce:kt),t.icon.placedSymbolArray.get(k.placedIconSymbolIndex).hidden=X.icon.isHidden()),k.verticalPlacedIconSymbolIndex>=0&&(D(t.icon,k.numVerticalIconVertices,pe?kt:ce),t.icon.placedSymbolArray.get(k.verticalPlacedIconSymbolIndex).hidden=X.icon.isHidden())}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const ce=t.collisionArrays[R];if(ce){let pe=new c.Point(0,0);if(ce.textBox||ce.verticalTextBox){let Ze=!0;if(v){const _e=this.variableOffsets[V];_e?(pe=Ve(_e.anchor,_e.width,_e.height,_e.textOffset,_e.textBoxScale),b&&pe._rotate(T?this.transform.angle:-this.transform.angle)):Ze=!1}ce.textBox&&Ue(t.textCollisionBox.collisionVertexArray,X.text.placed,!Ze||ne,pe.x,pe.y),ce.verticalTextBox&&Ue(t.textCollisionBox.collisionVertexArray,X.text.placed,!Ze||he,pe.x,pe.y)}const Ie=!!(!he&&ce.verticalIconBox);ce.iconBox&&Ue(t.iconCollisionBox.collisionVertexArray,X.icon.placed,Ie,C?pe.x:0,C?pe.y:0),ce.verticalIconBox&&Ue(t.iconCollisionBox.collisionVertexArray,X.icon.placed,!Ie,C?pe.x:0,C?pe.y:0)}}}if(t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.text.opacityVertexArray.length!==t.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${t.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${t.text.layoutVertexArray.length}) / 4`);if(t.icon.opacityVertexArray.length!==t.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${t.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${t.icon.layoutVertexArray.length}) / 4`);if(t.bucketInstanceId in this.collisionCircleArrays){const R=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=R.invProjMatrix,t.placementViewportMatrix=R.viewportMatrix,t.collisionCircleArray=R.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(t){return this.fadeDuration===0?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform.zoom-t)/1.5)}hasTransitions(t){return this.stale||t-this.lastPlacementChangeTimet}setStale(){this.stale=!0}}function Ue(h,t,n,a,l){h.emplaceBack(t?1:0,n?1:0,a||0,l||0),h.emplaceBack(t?1:0,n?1:0,a||0,l||0),h.emplaceBack(t?1:0,n?1:0,a||0,l||0),h.emplaceBack(t?1:0,n?1:0,a||0,l||0)}const tt=Math.pow(2,25),pt=Math.pow(2,24),Xe=Math.pow(2,17),Qe=Math.pow(2,16),_i=Math.pow(2,9),Oe=Math.pow(2,8),Ut=Math.pow(2,1);function ei(h){if(h.opacity===0&&!h.placed)return 0;if(h.opacity===1&&h.placed)return 4294967295;const t=h.placed?1:0,n=Math.floor(127*h.opacity);return n*tt+t*pt+n*Xe+t*Qe+n*_i+t*Oe+n*Ut+t}const kt=0;class Ii{constructor(t){this._sortAcrossTiles=t.layout.get("symbol-z-order")!=="viewport-y"&&!t.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(t,n,a,l,p){const m=this._bucketParts;for(;this._currentTileIndexg.sortKey-y.sortKey));this._currentPartIndex!this._forceFullPlacement&&c.browser.now()-l>2;for(;this._currentPlacementIndex>=0;){const m=n[t[this._currentPlacementIndex]],g=this.placement.collisionIndex.transform.zoom;if(m.type==="symbol"&&(!m.minzoom||m.minzoom<=g)&&(!m.maxzoom||m.maxzoom>g)){if(this._inProgressLayer||(this._inProgressLayer=new Ii(m)),this._inProgressLayer.continuePlacement(a[m.source],this.placement,this._showCollisionBoxes,m,p))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const ri=512/c.EXTENT/2;class Zi{constructor(t,n,a){this.tileID=t,this.bucketInstanceId=a,this._symbolsByKey={};const l=new Map;for(let p=0;p({x:Math.floor(y.anchorX*ri),y:Math.floor(y.anchorY*ri)})),crossTileIDs:m.map(y=>y.crossTileID)};if(g.positions.length>128){const y=new c.KDBush(g.positions.length,16,Uint16Array);for(const{x:v,y:b}of g.positions)y.add(v,b);y.finish(),delete g.positions,g.index=y}this._symbolsByKey[p]=g}}getScaledCoordinates(t,n){const{x:a,y:l,z:p}=this.tileID.canonical,{x:m,y:g,z:y}=n.canonical,v=ri/Math.pow(2,y-p),b=(g*c.EXTENT+t.anchorY)*v,T=l*c.EXTENT*ri;return{x:Math.floor((m*c.EXTENT+t.anchorX)*v-a*c.EXTENT*ri),y:Math.floor(b-T)}}findMatches(t,n,a){const l=this.tileID.canonical.zt)}}class yo{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class zs{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){const n=Math.round((t-this.lng)/360);if(n!==0)for(const a in this.indexes){const l=this.indexes[a],p={};for(const m in l){const g=l[m];g.tileID=g.tileID.unwrapTo(g.tileID.wrap+n),p[g.tileID.key]=g}this.indexes[a]=p}this.lng=t}addBucket(t,n,a){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===n.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(let p=0;pt.overscaledZ)for(const g in m){const y=m[g];y.tileID.isChildOf(t)&&y.findMatches(n.symbolInstances,t,l)}else{const g=m[t.scaledTo(Number(p)).key];g&&g.findMatches(n.symbolInstances,t,l)}}for(let p=0;p{n[a]=!0});for(const a in this.layerIndexes)n[a]||delete this.layerIndexes[a]}}const Nr=(h,t)=>c.emitValidationErrors(h,t&&t.filter(n=>n.identifier!=="source.canvas")),rn=c.pick(c.operations,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setGlyphs","setSprite"]),Lt=c.pick(c.operations,["setCenter","setZoom","setBearing","setPitch"]),ks=c.emptyStyle();class ni extends c.Evented{constructor(t,n={}){super(),this.map=t,this.dispatcher=new or(Or(),this,t._getMapId()),this.imageManager=new Vi,this.imageManager.setEventedParent(this),this.glyphManager=new ar(t._requestManager,n.localIdeographFontFamily),this.lineAtlas=new Yr(256,512),this.crossTileSymbolIndex=new Dt,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new c.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",c.getReferrer());const a=this;this._rtlTextPluginCallback=ni.registerForPluginStateChange(l=>{a.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:l.pluginStatus,pluginURL:l.pluginURL},(p,m)=>{if(c.triggerPluginCompletionEvent(p),m&&m.every(g=>g))for(const g in a.sourceCaches){const y=a.sourceCaches[g].getSource().type;y!=="vector"&&y!=="geojson"||a.sourceCaches[g].reload()}})}),this.on("data",l=>{if(l.dataType!=="source"||l.sourceDataType!=="metadata")return;const p=this.sourceCaches[l.sourceId];if(!p)return;const m=p.getSource();if(m&&m.vectorLayerIds)for(const g in this._layers){const y=this._layers[g];y.source===m.id&&this._validateLayer(y)}})}loadURL(t,n={},a){this.fire(new c.Event("dataloading",{dataType:"style"})),n.validate=typeof n.validate!="boolean"||n.validate;const l=this.map._requestManager.transformRequest(t,at.Style);this._request=c.getJSON(l,(p,m)=>{this._request=null,p?this.fire(new c.ErrorEvent(p)):m&&this._load(m,n,a)})}loadJSON(t,n={},a){this.fire(new c.Event("dataloading",{dataType:"style"})),this._request=c.browser.frame(()=>{this._request=null,n.validate=n.validate!==!1,this._load(t,n,a)})}loadEmpty(){this.fire(new c.Event("dataloading",{dataType:"style"})),this._load(ks,{validate:!1})}_load(t,n,a){var l;const p=n.transformStyle?n.transformStyle(a,t):t;if(!n.validate||!Nr(this,c.validateStyle(p))){this._loaded=!0,this.stylesheet=p;for(const m in p.sources)this.addSource(m,p.sources[m],{validate:!1});p.sprite?this._loadSprite(p.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(p.glyphs),this._createLayers(),this.light=new Cs(this.stylesheet.light),this.map.setTerrain((l=this.stylesheet.terrain)!==null&&l!==void 0?l:null),this.fire(new c.Event("data",{dataType:"style"})),this.fire(new c.Event("style.load"))}}_createLayers(){const t=c.derefLayers(this.stylesheet.layers);this.dispatcher.broadcast("setLayers",t),this._order=t.map(n=>n.id),this._layers={},this._serializedLayers=null;for(const n of t){const a=c.createStyleLayer(n);a.setEventedParent(this,{layer:{id:n.id}}),this._layers[n.id]=a}}_loadSprite(t,n=!1,a=void 0){this.imageManager.setLoaded(!1),this._spriteRequest=function(l,p,m,g){const y=sr(l),v=y.length,b=m>1?"@2x":"",T={},C={},L={};for(const{id:D,url:R}of y){const k=p.transformRequest(p.normalizeSpriteURL(R,b,".json"),at.SpriteJSON),G=`${D}_${k.url}`;T[G]=c.getJSON(k,(X,ee)=>{delete T[G],C[D]=ee,pi(g,C,L,X,v)});const J=p.transformRequest(p.normalizeSpriteURL(R,b,".png"),at.SpriteImage),V=`${D}_${J.url}`;T[V]=ui.getImage(J,(X,ee)=>{delete T[V],L[D]=ee,pi(g,C,L,X,v)})}return{cancel(){for(const D of Object.values(T))D.cancel()}}}(t,this.map._requestManager,this.map.getPixelRatio(),(l,p)=>{if(this._spriteRequest=null,l)this.fire(new c.ErrorEvent(l));else if(p)for(const m in p){this._spritesImagesIds[m]=[];const g=this._spritesImagesIds[m]?this._spritesImagesIds[m].filter(y=>!(y in p)):[];for(const y of g)this.imageManager.removeImage(y),this._changedImages[y]=!0;for(const y in p[m]){const v=m==="default"?y:`${m}:${y}`;this._spritesImagesIds[m].push(v),v in this.imageManager.images?this.imageManager.updateImage(v,p[m][y],!1):this.imageManager.addImage(v,p[m][y]),n&&(this._changedImages[v]=!0)}}this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),n&&(this._changed=!0),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new c.Event("data",{dataType:"style"})),a&&a(l)})}_unloadSprite(){for(const t of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(t),this._changedImages[t]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new c.Event("data",{dataType:"style"}))}_validateLayer(t){const n=this.sourceCaches[t.source];if(!n)return;const a=t.sourceLayer;if(!a)return;const l=n.getSource();(l.type==="geojson"||l.vectorLayerIds&&l.vectorLayerIds.indexOf(a)===-1)&&this.fire(new c.ErrorEvent(new Error(`Source layer "${a}" does not exist on source "${l.id}" as specified by style layer "${t.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(t){const n=this._serializedAllLayers();if(!t||t.length===0)return Object.values(n);const a=[];for(const l of t)n[l]&&a.push(n[l]);return a}_serializedAllLayers(){let t=this._serializedLayers;if(t)return t;t=this._serializedLayers={};const n=Object.keys(this._layers);for(const a of n){const l=this._layers[a];l.type!=="custom"&&(t[a]=l.serialize())}return t}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(const t in this._layers)if(this._layers[t].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(t){if(!this._loaded)return;const n=this._changed;if(this._changed){const l=Object.keys(this._updatedLayers),p=Object.keys(this._removedLayers);(l.length||p.length)&&this._updateWorkerLayers(l,p);for(const m in this._updatedSources){const g=this._updatedSources[m];if(g==="reload")this._reloadSource(m);else{if(g!=="clear")throw new Error(`Invalid action ${g}`);this._clearSource(m)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const m in this._updatedPaintProps)this._layers[m].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates()}const a={};for(const l in this.sourceCaches){const p=this.sourceCaches[l];a[l]=p.used,p.used=!1}for(const l of this._order){const p=this._layers[l];p.recalculate(t,this._availableImages),!p.isHidden(t.zoom)&&p.source&&(this.sourceCaches[p.source].used=!0)}for(const l in a){const p=this.sourceCaches[l];a[l]!==p.used&&p.fire(new c.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:l}))}this.light.recalculate(t),this.z=t.zoom,n&&this.fire(new c.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const t=Object.keys(this._changedImages);if(t.length){for(const n in this.sourceCaches)this.sourceCaches[n].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(t,n){this.dispatcher.broadcast("updateLayers",{layers:this._serializeByIds(t),removedIds:n})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(t,n={}){this._checkLoaded();const a=this.serialize();if(t=n.transformStyle?n.transformStyle(a,t):t,Nr(this,c.validateStyle(t)))return!1;(t=c.clone$1(t)).layers=c.derefLayers(t.layers);const l=c.diffStyles(a,t).filter(m=>!(m.command in Lt));if(l.length===0)return!1;const p=l.filter(m=>!(m.command in rn));if(p.length>0)throw new Error(`Unimplemented: ${p.map(m=>m.command).join(", ")}.`);for(const m of l)m.command!=="setTransition"&&this[m.command].apply(this,m.args);return this.stylesheet=t,!0}addImage(t,n){if(this.getImage(t))return this.fire(new c.ErrorEvent(new Error(`An image named "${t}" already exists.`)));this.imageManager.addImage(t,n),this._afterImageUpdated(t)}updateImage(t,n){this.imageManager.updateImage(t,n)}getImage(t){return this.imageManager.getImage(t)}removeImage(t){if(!this.getImage(t))return this.fire(new c.ErrorEvent(new Error(`An image named "${t}" does not exist.`)));this.imageManager.removeImage(t),this._afterImageUpdated(t)}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new c.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,n,a={}){if(this._checkLoaded(),this.sourceCaches[t]!==void 0)throw new Error(`Source "${t}" already exists.`);if(!n.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(c.validateStyle.source,`sources.${t}`,n,null,a))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const l=this.sourceCaches[t]=new At(t,n,this.dispatcher);l.style=this,l.setEventedParent(this,()=>({isSourceLoaded:l.loaded(),source:l.serialize(),sourceId:t})),l.onAdd(this.map),this._changed=!0}removeSource(t){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error("There is no source with this ID");for(const a in this._layers)if(this._layers[a].source===t)return this.fire(new c.ErrorEvent(new Error(`Source "${t}" cannot be removed while layer "${a}" is using it.`)));const n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new c.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(t,n){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error(`There is no source with this ID=${t}`);const a=this.sourceCaches[t].getSource();if(a.type!=="geojson")throw new Error(`geojsonSource.type is ${a.type}, which is !== 'geojson`);a.setData(n),this._changed=!0}getSource(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()}addLayer(t,n,a={}){this._checkLoaded();const l=t.id;if(this.getLayer(l))return void this.fire(new c.ErrorEvent(new Error(`Layer "${l}" already exists on this map.`)));let p;if(t.type==="custom"){if(Nr(this,c.validateCustomStyleLayer(t)))return;p=c.createStyleLayer(t)}else{if("source"in t&&typeof t.source=="object"&&(this.addSource(l,t.source),t=c.clone$1(t),t=c.extend(t,{source:l})),this._validate(c.validateStyle.layer,`layers.${l}`,t,{arrayIndex:-1},a))return;p=c.createStyleLayer(t),this._validateLayer(p),p.setEventedParent(this,{layer:{id:l}})}const m=n?this._order.indexOf(n):this._order.length;if(n&&m===-1)this.fire(new c.ErrorEvent(new Error(`Cannot add layer "${l}" before non-existing layer "${n}".`)));else{if(this._order.splice(m,0,l),this._layerOrderChanged=!0,this._layers[l]=p,this._removedLayers[l]&&p.source&&p.type!=="custom"){const g=this._removedLayers[l];delete this._removedLayers[l],g.type!==p.type?this._updatedSources[p.source]="clear":(this._updatedSources[p.source]="reload",this.sourceCaches[p.source].pause())}this._updateLayer(p),p.onAdd&&p.onAdd(this.map)}}moveLayer(t,n){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new c.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===n)return;const a=this._order.indexOf(t);this._order.splice(a,1);const l=n?this._order.indexOf(n):this._order.length;n&&l===-1?this.fire(new c.ErrorEvent(new Error(`Cannot move layer "${t}" before non-existing layer "${n}".`))):(this._order.splice(l,0,t),this._layerOrderChanged=!0)}removeLayer(t){this._checkLoaded();const n=this._layers[t];if(!n)return void this.fire(new c.ErrorEvent(new Error(`Cannot remove non-existing layer "${t}".`)));n.setEventedParent(null);const a=this._order.indexOf(t);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],this._serializedLayers&&delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}getLayer(t){return this._layers[t]}hasLayer(t){return t in this._layers}setLayerZoomRange(t,n,a){this._checkLoaded();const l=this.getLayer(t);l?l.minzoom===n&&l.maxzoom===a||(n!=null&&(l.minzoom=n),a!=null&&(l.maxzoom=a),this._updateLayer(l)):this.fire(new c.ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer "${t}".`)))}setFilter(t,n,a={}){this._checkLoaded();const l=this.getLayer(t);if(l){if(!c.deepEqual(l.filter,n))return n==null?(l.filter=void 0,void this._updateLayer(l)):void(this._validate(c.validateStyle.filter,`layers.${l.id}.filter`,n,null,a)||(l.filter=c.clone$1(n),this._updateLayer(l)))}else this.fire(new c.ErrorEvent(new Error(`Cannot filter non-existing layer "${t}".`)))}getFilter(t){return c.clone$1(this.getLayer(t).filter)}setLayoutProperty(t,n,a,l={}){this._checkLoaded();const p=this.getLayer(t);p?c.deepEqual(p.getLayoutProperty(n),a)||(p.setLayoutProperty(n,a,l),this._updateLayer(p)):this.fire(new c.ErrorEvent(new Error(`Cannot style non-existing layer "${t}".`)))}getLayoutProperty(t,n){const a=this.getLayer(t);if(a)return a.getLayoutProperty(n);this.fire(new c.ErrorEvent(new Error(`Cannot get style of non-existing layer "${t}".`)))}setPaintProperty(t,n,a,l={}){this._checkLoaded();const p=this.getLayer(t);p?c.deepEqual(p.getPaintProperty(n),a)||(p.setPaintProperty(n,a,l)&&this._updateLayer(p),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new c.ErrorEvent(new Error(`Cannot style non-existing layer "${t}".`)))}getPaintProperty(t,n){return this.getLayer(t).getPaintProperty(n)}setFeatureState(t,n){this._checkLoaded();const a=t.source,l=t.sourceLayer,p=this.sourceCaches[a];if(p===void 0)return void this.fire(new c.ErrorEvent(new Error(`The source '${a}' does not exist in the map's style.`)));const m=p.getSource().type;m==="geojson"&&l?this.fire(new c.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):m!=="vector"||l?(t.id===void 0&&this.fire(new c.ErrorEvent(new Error("The feature id parameter must be provided."))),p.setFeatureState(l,t.id,n)):this.fire(new c.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(t,n){this._checkLoaded();const a=t.source,l=this.sourceCaches[a];if(l===void 0)return void this.fire(new c.ErrorEvent(new Error(`The source '${a}' does not exist in the map's style.`)));const p=l.getSource().type,m=p==="vector"?t.sourceLayer:void 0;p!=="vector"||m?n&&typeof t.id!="string"&&typeof t.id!="number"?this.fire(new c.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):l.removeFeatureState(m,t.id,n):this.fire(new c.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){this._checkLoaded();const n=t.source,a=t.sourceLayer,l=this.sourceCaches[n];if(l!==void 0)return l.getSource().type!=="vector"||a?(t.id===void 0&&this.fire(new c.ErrorEvent(new Error("The feature id parameter must be provided."))),l.getFeatureState(a,t.id)):void this.fire(new c.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new c.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return c.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const t=c.mapObject(this.sourceCaches,l=>l.serialize()),n=this._serializeByIds(this._order),a=this.stylesheet;return c.filterObject({version:a.version,name:a.name,metadata:a.metadata,light:a.light,center:a.center,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,sprite:a.sprite,glyphs:a.glyphs,transition:a.transition,sources:t,layers:n},l=>l!==void 0)}_updateLayer(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&this.sourceCaches[t.source].getSource().type!=="raster"&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(t){const n=m=>this._layers[m].type==="fill-extrusion",a={},l=[];for(let m=this._order.length-1;m>=0;m--){const g=this._order[m];if(n(g)){a[g]=m;for(const y of t){const v=y[g];if(v)for(const b of v)l.push(b)}}}l.sort((m,g)=>g.intersectionZ-m.intersectionZ);const p=[];for(let m=this._order.length-1;m>=0;m--){const g=this._order[m];if(n(g))for(let y=l.length-1;y>=0;y--){const v=l[y].feature;if(a[v.layer.id]{const he=G.featureSortOrder;if(he){const ce=he.indexOf(te.featureIndex);return he.indexOf(ne.featureIndex)-ce}return ne.featureIndex-te.featureIndex});for(const te of ee)X.push(te)}}for(const G in D)D[G].forEach(J=>{const V=J.feature,X=v[g[G].source].getFeatureState(V.layer["source-layer"],V.id);V.source=V.layer.source,V.layer["source-layer"]&&(V.sourceLayer=V.layer["source-layer"]),V.state=X});return D}(this._layers,m,this.sourceCaches,t,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(p)}querySourceFeatures(t,n){n&&n.filter&&this._validate(c.validateStyle.filter,"querySourceFeatures.filter",n.filter,null,n);const a=this.sourceCaches[t];return a?function(l,p){const m=l.getRenderableIds().map(v=>l.getTileByID(v)),g=[],y={};for(let v=0;v{br[l]=p})(t,n),n.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:n.workerSourceURL},a):a(null,null))}getLight(){return this.light.getLight()}setLight(t,n={}){this._checkLoaded();const a=this.light.getLight();let l=!1;for(const m in t)if(!c.deepEqual(t[m],a[m])){l=!0;break}if(!l)return;const p={now:c.browser.now(),transition:c.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,n),this.light.updateTransitions(p)}_validate(t,n,a,l,p={}){return(!p||p.validate!==!1)&&Nr(this,t.call(c.validateStyle,c.extend({key:n,style:this.serialize(),value:a,styleSpec:c.v8Spec},l)))}_remove(t=!0){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),c.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const n in this._layers)this._layers[n].setEventedParent(null);for(const n in this.sourceCaches){const a=this.sourceCaches[n];a.setEventedParent(null),a.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove(t)}_clearSource(t){this.sourceCaches[t].clearTiles()}_reloadSource(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()}_updateSources(t){for(const n in this.sourceCaches)this.sourceCaches[n].update(t,this.map.terrain)}_generateCollisionBoxes(){for(const t in this.sourceCaches)this._reloadSource(t)}_updatePlacement(t,n,a,l,p=!1){let m=!1,g=!1;const y={};for(const v of this._order){const b=this._layers[v];if(b.type!=="symbol")continue;if(!y[b.source]){const C=this.sourceCaches[b.source];y[b.source]=C.getRenderableIds(!0).map(L=>C.getTileByID(L)).sort((L,D)=>D.tileID.overscaledZ-L.tileID.overscaledZ||(L.tileID.isLessThan(D.tileID)?-1:1))}const T=this.crossTileSymbolIndex.addLayer(b,y[b.source],t.center.lng);m=m||T}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((p=p||this._layerOrderChanged||a===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(c.browser.now(),t.zoom))&&(this.pauseablePlacement=new ml(t,this.map.terrain,this._order,p,n,a,l,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,y),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(c.browser.now()),g=!0),m&&this.pauseablePlacement.placement.setStale()),g||m)for(const v of this._order){const b=this._layers[v];b.type==="symbol"&&this.placement.updateLayerOpacities(b,y[b.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(c.browser.now())}_releaseSymbolFadeTiles(){for(const t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()}getImages(t,n,a){this.imageManager.getImages(n.icons,a),this._updateTilesForChangedImages();const l=this.sourceCaches[n.source];l&&l.setDependencies(n.tileID.key,n.type,n.icons)}getGlyphs(t,n,a){this.glyphManager.getGlyphs(n.stacks,a);const l=this.sourceCaches[n.source];l&&l.setDependencies(n.tileID.key,n.type,[""])}getResource(t,n,a){return c.makeRequest(n,a)}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(t,n={}){this._checkLoaded(),t&&this._validate(c.validateStyle.glyphs,"glyphs",t,null,n)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=t,this.glyphManager.entries={},this.glyphManager.setURL(t))}addSprite(t,n,a={},l){this._checkLoaded();const p=[{id:t,url:n}],m=[...sr(this.stylesheet.sprite),...p];this._validate(c.validateStyle.sprite,"sprite",m,null,a)||(this.stylesheet.sprite=m,this._loadSprite(p,!0,l))}removeSprite(t){this._checkLoaded();const n=sr(this.stylesheet.sprite);if(n.find(a=>a.id===t)){if(this._spritesImagesIds[t])for(const a of this._spritesImagesIds[t])this.imageManager.removeImage(a),this._changedImages[a]=!0;n.splice(n.findIndex(a=>a.id===t),1),this.stylesheet.sprite=n.length>0?n:void 0,delete this._spritesImagesIds[t],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new c.Event("data",{dataType:"style"}))}else this.fire(new c.ErrorEvent(new Error(`Sprite "${t}" doesn't exists on this map.`)))}getSprite(){return sr(this.stylesheet.sprite)}setSprite(t,n={},a){this._checkLoaded(),t&&this._validate(c.validateStyle.sprite,"sprite",t,null,n)||(this.stylesheet.sprite=t,t?this._loadSprite(t,!0,a):(this._unloadSprite(),a&&a(null)))}}ni.registerForPluginStateChange=c.registerForPluginStateChange;var Ds=c.createLayout([{name:"a_pos",type:"Int16",components:2}]),pr="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const Kn={prelude:ot(`#ifdef GL_ES +precision mediump float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +`,`#ifdef GL_ES +precision highp float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 +);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} +#ifdef TERRAIN3D +uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; +#endif +const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { +#ifdef TERRAIN3D +highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); +#else +return 1.0; +#endif +}float calculate_visibility(vec4 pos) { +#ifdef TERRAIN3D +vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; +#else +return 1.0; +#endif +}float ele(vec2 pos) { +#ifdef TERRAIN3D +vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +#else +return 0.0; +#endif +}float get_elevation(vec2 pos) { +#ifdef TERRAIN3D +vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; +#else +return 0.0; +#endif +}`),background:ot(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:ot(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:ot(`varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main(void) { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:ot("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:ot(`uniform highp float u_intensity;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#define GAUSS_COEF 0.3989422804014327 +void main() { +#pragma mapbox: initialize highp float weight +float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#pragma mapbox: define mediump float radius +const highp float ZERO=1.0/255.0/16.0; +#define GAUSS_COEF 0.3989422804014327 +void main(void) { +#pragma mapbox: initialize highp float weight +#pragma mapbox: initialize mediump float radius +vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),heatmapTexture:ot(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(0.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:ot("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:ot("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:ot("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:ot(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_FragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:ot(`varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:ot(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:ot(`#ifdef GL_ES +precision highp float; +#endif +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:ot(`varying vec4 v_color;void main() {gl_FragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:ot(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:ot(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:ot(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:ot(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:ot(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),linePattern:ot(`#ifdef GL_ES +precision highp float; +#endif +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:ot(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:ot(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:ot(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),z,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:ot(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:ot(`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:ot("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",pr),terrainDepth:ot("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",pr),terrainCoords:ot("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",pr)};function ot(h,t){const n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=t.match(/attribute ([\w]+) ([\w]+)/g),l=h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),p=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),m=p?p.concat(l):l,g={};return{fragmentSource:h=h.replace(n,(y,v,b,T,C)=>(g[C]=!0,v==="define"?` +#ifndef HAS_UNIFORM_u_${C} +varying ${b} ${T} ${C}; +#else +uniform ${b} ${T} u_${C}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${C} + ${b} ${T} ${C} = u_${C}; +#endif +`)),vertexSource:t=t.replace(n,(y,v,b,T,C)=>{const L=T==="float"?"vec2":"vec4",D=C.match(/color/)?"color":L;return g[C]?v==="define"?` +#ifndef HAS_UNIFORM_u_${C} +uniform lowp float u_${C}_t; +attribute ${b} ${L} a_${C}; +varying ${b} ${T} ${C}; +#else +uniform ${b} ${T} u_${C}; +#endif +`:D==="vec4"?` +#ifndef HAS_UNIFORM_u_${C} + ${C} = a_${C}; +#else + ${b} ${T} ${C} = u_${C}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${C} + ${C} = unpack_mix_${D}(a_${C}, u_${C}_t); +#else + ${b} ${T} ${C} = u_${C}; +#endif +`:v==="define"?` +#ifndef HAS_UNIFORM_u_${C} +uniform lowp float u_${C}_t; +attribute ${b} ${L} a_${C}; +#else +uniform ${b} ${T} u_${C}; +#endif +`:D==="vec4"?` +#ifndef HAS_UNIFORM_u_${C} + ${b} ${T} ${C} = a_${C}; +#else + ${b} ${T} ${C} = u_${C}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${C} + ${b} ${T} ${C} = unpack_mix_${D}(a_${C}, u_${C}_t); +#else + ${b} ${T} ${C} = u_${C}; +#endif +`}),staticAttributes:a,staticUniforms:m}}class Ls{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(t,n,a,l,p,m,g,y,v){this.context=t;let b=this.boundPaintVertexBuffers.length!==l.length;for(let T=0;!b&&T({u_depth:new c.Uniform1i(te,ne.u_depth),u_terrain:new c.Uniform1i(te,ne.u_terrain),u_terrain_dim:new c.Uniform1f(te,ne.u_terrain_dim),u_terrain_matrix:new c.UniformMatrix4f(te,ne.u_terrain_matrix),u_terrain_unpack:new c.Uniform4f(te,ne.u_terrain_unpack),u_terrain_exaggeration:new c.Uniform1f(te,ne.u_terrain_exaggeration)}))(t,ee),this.binderUniforms=a?a.getUniforms(t,ee):[]}draw(t,n,a,l,p,m,g,y,v,b,T,C,L,D,R,k,G,J){const V=t.gl;if(this.failedToCreate)return;if(t.program.set(this.program),t.setDepthMode(a),t.setStencilMode(l),t.setColorMode(p),t.setCullFace(m),y){t.activeTexture.set(V.TEXTURE2),V.bindTexture(V.TEXTURE_2D,y.depthTexture),t.activeTexture.set(V.TEXTURE3),V.bindTexture(V.TEXTURE_2D,y.texture);for(const ee in this.terrainUniforms)this.terrainUniforms[ee].set(y[ee])}for(const ee in this.fixedUniforms)this.fixedUniforms[ee].set(g[ee]);R&&R.setUniforms(t,this.binderUniforms,L,{zoom:D});let X=0;switch(n){case V.LINES:X=2;break;case V.TRIANGLES:X=3;break;case V.LINE_STRIP:X=1}for(const ee of C.get()){const te=ee.vaos||(ee.vaos={});(te[v]||(te[v]=new Ls)).bind(t,this,b,R?R.getPaintVertexBuffers():[],T,ee.vertexOffset,k,G,J),V.drawElements(n,ee.primitiveLength*X,V.UNSIGNED_SHORT,ee.primitiveOffset*X*2)}}}function Bs(h,t,n){const a=1/Z(n,1,t.transform.tileZoom),l=Math.pow(2,n.tileID.overscaledZ),p=n.tileSize*Math.pow(2,t.transform.tileZoom)/l,m=p*(n.tileID.canonical.x+n.tileID.wrap*l),g=p*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[a,h.fromScale,h.toScale],u_fade:h.t,u_pixel_coord_upper:[m>>16,g>>16],u_pixel_coord_lower:[65535&m,65535&g]}}const Yn=(h,t,n,a)=>{const l=t.style.light,p=l.properties.get("position"),m=[p.x,p.y,p.z],g=function(){var v=new c.ARRAY_TYPE(9);return c.ARRAY_TYPE!=Float32Array&&(v[1]=0,v[2]=0,v[3]=0,v[5]=0,v[6]=0,v[7]=0),v[0]=1,v[4]=1,v[8]=1,v}();l.properties.get("anchor")==="viewport"&&function(v,b){var T=Math.sin(b),C=Math.cos(b);v[0]=C,v[1]=T,v[2]=0,v[3]=-T,v[4]=C,v[5]=0,v[6]=0,v[7]=0,v[8]=1}(g,-t.transform.angle),function(v,b,T){var C=b[0],L=b[1],D=b[2];v[0]=C*T[0]+L*T[3]+D*T[6],v[1]=C*T[1]+L*T[4]+D*T[7],v[2]=C*T[2]+L*T[5]+D*T[8]}(m,m,g);const y=l.properties.get("color");return{u_matrix:h,u_lightpos:m,u_lightintensity:l.properties.get("intensity"),u_lightcolor:[y.r,y.g,y.b],u_vertical_gradient:+n,u_opacity:a}},gl=(h,t,n,a,l,p,m)=>c.extend(Yn(h,t,n,a),Bs(p,t,m),{u_height_factor:-Math.pow(2,l.overscaledZ)/m.tileSize/8}),xo=h=>({u_matrix:h}),Rs=(h,t,n,a)=>c.extend(xo(h),Bs(n,t,a)),_l=(h,t)=>({u_matrix:h,u_world:t}),vo=(h,t,n,a,l)=>c.extend(Rs(h,t,n,a),{u_world:l}),yl=(h,t,n,a)=>{const l=h.transform;let p,m;if(a.paint.get("circle-pitch-alignment")==="map"){const g=Z(n,1,l.zoom);p=!0,m=[g,g]}else p=!1,m=l.pixelsToGLUnits;return{u_camera_to_center_distance:l.cameraToCenterDistance,u_scale_with_map:+(a.paint.get("circle-pitch-scale")==="map"),u_matrix:h.translatePosMatrix(t.posMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_pitch_with_map:+p,u_device_pixel_ratio:h.pixelRatio,u_extrude_scale:m}},bo=(h,t,n)=>{const a=Z(n,1,t.zoom),l=Math.pow(2,t.zoom-n.tileID.overscaledZ),p=n.tileID.overscaleFactor();return{u_matrix:h,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:a,u_extrude_scale:[t.pixelsToGLUnits[0]/(a*l),t.pixelsToGLUnits[1]/(a*l)],u_overscale_factor:p}},wo=(h,t,n=1)=>({u_matrix:h,u_color:t,u_overlay:0,u_overlay_scale:n}),Fs=h=>({u_matrix:h}),To=(h,t,n,a)=>({u_matrix:h,u_extrude_scale:Z(t,1,n),u_intensity:a});function Eo(h,t){const n=Math.pow(2,t.canonical.z),a=t.canonical.y;return[new c.MercatorCoordinate(0,a/n).toLngLat().lat,new c.MercatorCoordinate(0,(a+1)/n).toLngLat().lat]}const Os=(h,t,n,a)=>{const l=h.transform;return{u_matrix:Jn(h,t,n,a),u_ratio:1/Z(t,1,l.zoom),u_device_pixel_ratio:h.pixelRatio,u_units_to_pixels:[1/l.pixelsToGLUnits[0],1/l.pixelsToGLUnits[1]]}},So=(h,t,n,a,l)=>c.extend(Os(h,t,n,l),{u_image:0,u_image_height:a}),nn=(h,t,n,a,l)=>{const p=h.transform,m=Ai(t,p);return{u_matrix:Jn(h,t,n,l),u_texsize:t.imageAtlasTexture.size,u_ratio:1/Z(t,1,p.zoom),u_device_pixel_ratio:h.pixelRatio,u_image:0,u_scale:[m,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/p.pixelsToGLUnits[0],1/p.pixelsToGLUnits[1]]}},Us=(h,t,n,a,l,p)=>{const m=h.lineAtlas,g=Ai(t,h.transform),y=n.layout.get("line-cap")==="round",v=m.getDash(a.from,y),b=m.getDash(a.to,y),T=v.width*l.fromScale,C=b.width*l.toScale;return c.extend(Os(h,t,n,p),{u_patternscale_a:[g/T,-v.height/2],u_patternscale_b:[g/C,-b.height/2],u_sdfgamma:m.width/(256*Math.min(T,C)*h.pixelRatio)/2,u_image:0,u_tex_y_a:v.y,u_tex_y_b:b.y,u_mix:l.t})};function Ai(h,t){return 1/Z(h,1,t.tileZoom)}function Jn(h,t,n,a){return h.translatePosMatrix(a?a.posMatrix:t.tileID.posMatrix,t,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}const Vs=(h,t,n,a,l)=>{return{u_matrix:h,u_tl_parent:t,u_scale_parent:n,u_buffer_scale:1,u_fade_t:a.mix,u_opacity:a.opacity*l.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:l.paint.get("raster-brightness-min"),u_brightness_high:l.paint.get("raster-brightness-max"),u_saturation_factor:(m=l.paint.get("raster-saturation"),m>0?1-1/(1.001-m):-m),u_contrast_factor:(p=l.paint.get("raster-contrast"),p>0?1/(1-p):1+p),u_spin_weights:Qn(l.paint.get("raster-hue-rotate"))};var p,m};function Qn(h){h*=Math.PI/180;const t=Math.sin(h),n=Math.cos(h);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}const es=(h,t,n,a,l,p,m,g,y,v)=>{const b=l.transform;return{u_is_size_zoom_constant:+(h==="constant"||h==="source"),u_is_size_feature_constant:+(h==="constant"||h==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:b.cameraToCenterDistance,u_pitch:b.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:b.width/b.height,u_fade_change:l.options.fadeDuration?l.symbolFadeChange:1,u_matrix:p,u_label_plane_matrix:m,u_coord_matrix:g,u_is_text:+y,u_pitch_with_map:+a,u_texsize:v,u_texture:0}},ts=(h,t,n,a,l,p,m,g,y,v,b)=>{const T=l.transform;return c.extend(es(h,t,n,a,l,p,m,g,y,v),{u_gamma_scale:a?Math.cos(T._pitch)*T.cameraToCenterDistance:1,u_device_pixel_ratio:l.pixelRatio,u_is_halo:+b})},is=(h,t,n,a,l,p,m,g,y,v)=>c.extend(ts(h,t,n,a,l,p,m,g,!0,y,!0),{u_texsize_icon:v,u_texture_icon:1}),sn=(h,t,n)=>({u_matrix:h,u_opacity:t,u_color:n}),Ns=(h,t,n,a,l,p)=>c.extend(function(m,g,y,v){const b=y.imageManager.getPattern(m.from.toString()),T=y.imageManager.getPattern(m.to.toString()),{width:C,height:L}=y.imageManager.getPixelSize(),D=Math.pow(2,v.tileID.overscaledZ),R=v.tileSize*Math.pow(2,y.transform.tileZoom)/D,k=R*(v.tileID.canonical.x+v.tileID.wrap*D),G=R*v.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:b.tl,u_pattern_br_a:b.br,u_pattern_tl_b:T.tl,u_pattern_br_b:T.br,u_texsize:[C,L],u_mix:g.t,u_pattern_size_a:b.displaySize,u_pattern_size_b:T.displaySize,u_scale_a:g.fromScale,u_scale_b:g.toScale,u_tile_units_to_pixels:1/Z(v,1,y.transform.tileZoom),u_pixel_coord_upper:[k>>16,G>>16],u_pixel_coord_lower:[65535&k,65535&G]}}(a,p,n,l),{u_matrix:h,u_opacity:t}),Ci={fillExtrusion:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_lightpos:new c.Uniform3f(h,t.u_lightpos),u_lightintensity:new c.Uniform1f(h,t.u_lightintensity),u_lightcolor:new c.Uniform3f(h,t.u_lightcolor),u_vertical_gradient:new c.Uniform1f(h,t.u_vertical_gradient),u_opacity:new c.Uniform1f(h,t.u_opacity)}),fillExtrusionPattern:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_lightpos:new c.Uniform3f(h,t.u_lightpos),u_lightintensity:new c.Uniform1f(h,t.u_lightintensity),u_lightcolor:new c.Uniform3f(h,t.u_lightcolor),u_vertical_gradient:new c.Uniform1f(h,t.u_vertical_gradient),u_height_factor:new c.Uniform1f(h,t.u_height_factor),u_image:new c.Uniform1i(h,t.u_image),u_texsize:new c.Uniform2f(h,t.u_texsize),u_pixel_coord_upper:new c.Uniform2f(h,t.u_pixel_coord_upper),u_pixel_coord_lower:new c.Uniform2f(h,t.u_pixel_coord_lower),u_scale:new c.Uniform3f(h,t.u_scale),u_fade:new c.Uniform1f(h,t.u_fade),u_opacity:new c.Uniform1f(h,t.u_opacity)}),fill:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix)}),fillPattern:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_image:new c.Uniform1i(h,t.u_image),u_texsize:new c.Uniform2f(h,t.u_texsize),u_pixel_coord_upper:new c.Uniform2f(h,t.u_pixel_coord_upper),u_pixel_coord_lower:new c.Uniform2f(h,t.u_pixel_coord_lower),u_scale:new c.Uniform3f(h,t.u_scale),u_fade:new c.Uniform1f(h,t.u_fade)}),fillOutline:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_world:new c.Uniform2f(h,t.u_world)}),fillOutlinePattern:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_world:new c.Uniform2f(h,t.u_world),u_image:new c.Uniform1i(h,t.u_image),u_texsize:new c.Uniform2f(h,t.u_texsize),u_pixel_coord_upper:new c.Uniform2f(h,t.u_pixel_coord_upper),u_pixel_coord_lower:new c.Uniform2f(h,t.u_pixel_coord_lower),u_scale:new c.Uniform3f(h,t.u_scale),u_fade:new c.Uniform1f(h,t.u_fade)}),circle:(h,t)=>({u_camera_to_center_distance:new c.Uniform1f(h,t.u_camera_to_center_distance),u_scale_with_map:new c.Uniform1i(h,t.u_scale_with_map),u_pitch_with_map:new c.Uniform1i(h,t.u_pitch_with_map),u_extrude_scale:new c.Uniform2f(h,t.u_extrude_scale),u_device_pixel_ratio:new c.Uniform1f(h,t.u_device_pixel_ratio),u_matrix:new c.UniformMatrix4f(h,t.u_matrix)}),collisionBox:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_camera_to_center_distance:new c.Uniform1f(h,t.u_camera_to_center_distance),u_pixels_to_tile_units:new c.Uniform1f(h,t.u_pixels_to_tile_units),u_extrude_scale:new c.Uniform2f(h,t.u_extrude_scale),u_overscale_factor:new c.Uniform1f(h,t.u_overscale_factor)}),collisionCircle:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_inv_matrix:new c.UniformMatrix4f(h,t.u_inv_matrix),u_camera_to_center_distance:new c.Uniform1f(h,t.u_camera_to_center_distance),u_viewport_size:new c.Uniform2f(h,t.u_viewport_size)}),debug:(h,t)=>({u_color:new c.UniformColor(h,t.u_color),u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_overlay:new c.Uniform1i(h,t.u_overlay),u_overlay_scale:new c.Uniform1f(h,t.u_overlay_scale)}),clippingMask:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix)}),heatmap:(h,t)=>({u_extrude_scale:new c.Uniform1f(h,t.u_extrude_scale),u_intensity:new c.Uniform1f(h,t.u_intensity),u_matrix:new c.UniformMatrix4f(h,t.u_matrix)}),heatmapTexture:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_world:new c.Uniform2f(h,t.u_world),u_image:new c.Uniform1i(h,t.u_image),u_color_ramp:new c.Uniform1i(h,t.u_color_ramp),u_opacity:new c.Uniform1f(h,t.u_opacity)}),hillshade:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_image:new c.Uniform1i(h,t.u_image),u_latrange:new c.Uniform2f(h,t.u_latrange),u_light:new c.Uniform2f(h,t.u_light),u_shadow:new c.UniformColor(h,t.u_shadow),u_highlight:new c.UniformColor(h,t.u_highlight),u_accent:new c.UniformColor(h,t.u_accent)}),hillshadePrepare:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_image:new c.Uniform1i(h,t.u_image),u_dimension:new c.Uniform2f(h,t.u_dimension),u_zoom:new c.Uniform1f(h,t.u_zoom),u_unpack:new c.Uniform4f(h,t.u_unpack)}),line:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_ratio:new c.Uniform1f(h,t.u_ratio),u_device_pixel_ratio:new c.Uniform1f(h,t.u_device_pixel_ratio),u_units_to_pixels:new c.Uniform2f(h,t.u_units_to_pixels)}),lineGradient:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_ratio:new c.Uniform1f(h,t.u_ratio),u_device_pixel_ratio:new c.Uniform1f(h,t.u_device_pixel_ratio),u_units_to_pixels:new c.Uniform2f(h,t.u_units_to_pixels),u_image:new c.Uniform1i(h,t.u_image),u_image_height:new c.Uniform1f(h,t.u_image_height)}),linePattern:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_texsize:new c.Uniform2f(h,t.u_texsize),u_ratio:new c.Uniform1f(h,t.u_ratio),u_device_pixel_ratio:new c.Uniform1f(h,t.u_device_pixel_ratio),u_image:new c.Uniform1i(h,t.u_image),u_units_to_pixels:new c.Uniform2f(h,t.u_units_to_pixels),u_scale:new c.Uniform3f(h,t.u_scale),u_fade:new c.Uniform1f(h,t.u_fade)}),lineSDF:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_ratio:new c.Uniform1f(h,t.u_ratio),u_device_pixel_ratio:new c.Uniform1f(h,t.u_device_pixel_ratio),u_units_to_pixels:new c.Uniform2f(h,t.u_units_to_pixels),u_patternscale_a:new c.Uniform2f(h,t.u_patternscale_a),u_patternscale_b:new c.Uniform2f(h,t.u_patternscale_b),u_sdfgamma:new c.Uniform1f(h,t.u_sdfgamma),u_image:new c.Uniform1i(h,t.u_image),u_tex_y_a:new c.Uniform1f(h,t.u_tex_y_a),u_tex_y_b:new c.Uniform1f(h,t.u_tex_y_b),u_mix:new c.Uniform1f(h,t.u_mix)}),raster:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_tl_parent:new c.Uniform2f(h,t.u_tl_parent),u_scale_parent:new c.Uniform1f(h,t.u_scale_parent),u_buffer_scale:new c.Uniform1f(h,t.u_buffer_scale),u_fade_t:new c.Uniform1f(h,t.u_fade_t),u_opacity:new c.Uniform1f(h,t.u_opacity),u_image0:new c.Uniform1i(h,t.u_image0),u_image1:new c.Uniform1i(h,t.u_image1),u_brightness_low:new c.Uniform1f(h,t.u_brightness_low),u_brightness_high:new c.Uniform1f(h,t.u_brightness_high),u_saturation_factor:new c.Uniform1f(h,t.u_saturation_factor),u_contrast_factor:new c.Uniform1f(h,t.u_contrast_factor),u_spin_weights:new c.Uniform3f(h,t.u_spin_weights)}),symbolIcon:(h,t)=>({u_is_size_zoom_constant:new c.Uniform1i(h,t.u_is_size_zoom_constant),u_is_size_feature_constant:new c.Uniform1i(h,t.u_is_size_feature_constant),u_size_t:new c.Uniform1f(h,t.u_size_t),u_size:new c.Uniform1f(h,t.u_size),u_camera_to_center_distance:new c.Uniform1f(h,t.u_camera_to_center_distance),u_pitch:new c.Uniform1f(h,t.u_pitch),u_rotate_symbol:new c.Uniform1i(h,t.u_rotate_symbol),u_aspect_ratio:new c.Uniform1f(h,t.u_aspect_ratio),u_fade_change:new c.Uniform1f(h,t.u_fade_change),u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_label_plane_matrix:new c.UniformMatrix4f(h,t.u_label_plane_matrix),u_coord_matrix:new c.UniformMatrix4f(h,t.u_coord_matrix),u_is_text:new c.Uniform1i(h,t.u_is_text),u_pitch_with_map:new c.Uniform1i(h,t.u_pitch_with_map),u_texsize:new c.Uniform2f(h,t.u_texsize),u_texture:new c.Uniform1i(h,t.u_texture)}),symbolSDF:(h,t)=>({u_is_size_zoom_constant:new c.Uniform1i(h,t.u_is_size_zoom_constant),u_is_size_feature_constant:new c.Uniform1i(h,t.u_is_size_feature_constant),u_size_t:new c.Uniform1f(h,t.u_size_t),u_size:new c.Uniform1f(h,t.u_size),u_camera_to_center_distance:new c.Uniform1f(h,t.u_camera_to_center_distance),u_pitch:new c.Uniform1f(h,t.u_pitch),u_rotate_symbol:new c.Uniform1i(h,t.u_rotate_symbol),u_aspect_ratio:new c.Uniform1f(h,t.u_aspect_ratio),u_fade_change:new c.Uniform1f(h,t.u_fade_change),u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_label_plane_matrix:new c.UniformMatrix4f(h,t.u_label_plane_matrix),u_coord_matrix:new c.UniformMatrix4f(h,t.u_coord_matrix),u_is_text:new c.Uniform1i(h,t.u_is_text),u_pitch_with_map:new c.Uniform1i(h,t.u_pitch_with_map),u_texsize:new c.Uniform2f(h,t.u_texsize),u_texture:new c.Uniform1i(h,t.u_texture),u_gamma_scale:new c.Uniform1f(h,t.u_gamma_scale),u_device_pixel_ratio:new c.Uniform1f(h,t.u_device_pixel_ratio),u_is_halo:new c.Uniform1i(h,t.u_is_halo)}),symbolTextAndIcon:(h,t)=>({u_is_size_zoom_constant:new c.Uniform1i(h,t.u_is_size_zoom_constant),u_is_size_feature_constant:new c.Uniform1i(h,t.u_is_size_feature_constant),u_size_t:new c.Uniform1f(h,t.u_size_t),u_size:new c.Uniform1f(h,t.u_size),u_camera_to_center_distance:new c.Uniform1f(h,t.u_camera_to_center_distance),u_pitch:new c.Uniform1f(h,t.u_pitch),u_rotate_symbol:new c.Uniform1i(h,t.u_rotate_symbol),u_aspect_ratio:new c.Uniform1f(h,t.u_aspect_ratio),u_fade_change:new c.Uniform1f(h,t.u_fade_change),u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_label_plane_matrix:new c.UniformMatrix4f(h,t.u_label_plane_matrix),u_coord_matrix:new c.UniformMatrix4f(h,t.u_coord_matrix),u_is_text:new c.Uniform1i(h,t.u_is_text),u_pitch_with_map:new c.Uniform1i(h,t.u_pitch_with_map),u_texsize:new c.Uniform2f(h,t.u_texsize),u_texsize_icon:new c.Uniform2f(h,t.u_texsize_icon),u_texture:new c.Uniform1i(h,t.u_texture),u_texture_icon:new c.Uniform1i(h,t.u_texture_icon),u_gamma_scale:new c.Uniform1f(h,t.u_gamma_scale),u_device_pixel_ratio:new c.Uniform1f(h,t.u_device_pixel_ratio),u_is_halo:new c.Uniform1i(h,t.u_is_halo)}),background:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_opacity:new c.Uniform1f(h,t.u_opacity),u_color:new c.UniformColor(h,t.u_color)}),backgroundPattern:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_opacity:new c.Uniform1f(h,t.u_opacity),u_image:new c.Uniform1i(h,t.u_image),u_pattern_tl_a:new c.Uniform2f(h,t.u_pattern_tl_a),u_pattern_br_a:new c.Uniform2f(h,t.u_pattern_br_a),u_pattern_tl_b:new c.Uniform2f(h,t.u_pattern_tl_b),u_pattern_br_b:new c.Uniform2f(h,t.u_pattern_br_b),u_texsize:new c.Uniform2f(h,t.u_texsize),u_mix:new c.Uniform1f(h,t.u_mix),u_pattern_size_a:new c.Uniform2f(h,t.u_pattern_size_a),u_pattern_size_b:new c.Uniform2f(h,t.u_pattern_size_b),u_scale_a:new c.Uniform1f(h,t.u_scale_a),u_scale_b:new c.Uniform1f(h,t.u_scale_b),u_pixel_coord_upper:new c.Uniform2f(h,t.u_pixel_coord_upper),u_pixel_coord_lower:new c.Uniform2f(h,t.u_pixel_coord_lower),u_tile_units_to_pixels:new c.Uniform1f(h,t.u_tile_units_to_pixels)}),terrain:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_texture:new c.Uniform1i(h,t.u_texture),u_ele_delta:new c.Uniform1f(h,t.u_ele_delta)}),terrainDepth:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_ele_delta:new c.Uniform1f(h,t.u_ele_delta)}),terrainCoords:(h,t)=>({u_matrix:new c.UniformMatrix4f(h,t.u_matrix),u_texture:new c.Uniform1i(h,t.u_texture),u_terrain_coords_id:new c.Uniform1f(h,t.u_terrain_coords_id),u_ele_delta:new c.Uniform1f(h,t.u_ele_delta)})};class Pi{constructor(t,n,a){this.context=t;const l=t.gl;this.buffer=l.createBuffer(),this.dynamicDraw=!!a,this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),l.bufferData(l.ELEMENT_ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?l.DYNAMIC_DRAW:l.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){const n=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),n.bufferSubData(n.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Ta={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class $s{constructor(t,n,a,l){this.length=n.length,this.attributes=a,this.itemSize=n.bytesPerElement,this.dynamicDraw=l,this.context=t;const p=t.gl;this.buffer=p.createBuffer(),t.bindVertexBuffer.set(this.buffer),p.bufferData(p.ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?p.DYNAMIC_DRAW:p.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(t){if(t.length!==this.length)throw new Error(`Length of new data is ${t.length}, which doesn't match current length of ${this.length}`);const n=this.context.gl;this.bind(),n.bufferSubData(n.ARRAY_BUFFER,0,t.arrayBuffer)}enableAttributes(t,n){for(let a=0;a0){const pe=c.create(),Ie=ne;c.mul(pe,te.placementInvProjMatrix,h.transform.glCoordMatrix),c.mul(pe,pe,te.placementViewportMatrix),b.push({circleArray:ce,circleOffset:C,transform:Ie,invTransform:pe,coord:X}),T+=ce.length/4,C=T}he&&v.draw(g,y.LINES,We.disabled,gt.disabled,h.colorModeForRenderPass(),_t.disabled,bo(ne,h.transform,ee),h.style.map.terrain&&h.style.map.terrain.getTerrainData(X),n.id,he.layoutVertexBuffer,he.indexBuffer,he.segments,null,h.transform.zoom,null,null,he.collisionVertexBuffer)}if(!m||!b.length)return;const L=h.useProgram("collisionCircle"),D=new c.CollisionCircleLayoutArray;D.resize(4*T),D._trim();let R=0;for(const V of b)for(let X=0;X=0&&(D[k.associatedIconIndex]={shiftedAnchor:Ze,angle:_e})}else z(k.numGlyphs,C)}if(v){L.clear();const R=h.icon.placedSymbolArray;for(let k=0;kh.style.map.terrain.getElevation(he,ai,St):null,Nt=n.layout.get("text-rotation-alignment")==="map";Ur(pe,he.posMatrix,h,l,mr,Yi,k,v,Nt,jt)}const jr=h.translatePosMatrix(he.posMatrix,ce,p,m),Ir=G||l&&te||Rn?za:mr,Ft=h.translatePosMatrix(Yi,ce,p,m,!0),Zt=_e&&n.paint.get(l?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let si;si=_e?pe.iconsInText?is(ke.kind,je,J,k,h,jr,Ir,Ft,Ge,ti):ts(ke.kind,je,J,k,h,jr,Ir,Ft,l,Ge,!0):es(ke.kind,je,J,k,h,jr,Ir,Ft,l,Ge);const Fn={program:bt,buffers:Ie,uniformValues:si,atlasTexture:Et,atlasTextureIcon:Mt,atlasInterpolation:lt,atlasInterpolationIcon:zi,isSDF:_e,hasHalo:Zt};if(V&&pe.canOverlap){X=!0;const jt=Ie.segments.get();for(const Nt of jt)ne.push({segments:new c.SegmentVector([Nt]),sortKey:Nt.sortKey,state:Fn,terrainData:De})}else ne.push({segments:Ie.segments,sortKey:0,state:Fn,terrainData:De})}X&&ne.sort((he,ce)=>he.sortKey-ce.sortKey);for(const he of ne){const ce=he.state;if(C.activeTexture.set(L.TEXTURE0),ce.atlasTexture.bind(ce.atlasInterpolation,L.CLAMP_TO_EDGE),ce.atlasTextureIcon&&(C.activeTexture.set(L.TEXTURE1),ce.atlasTextureIcon&&ce.atlasTextureIcon.bind(ce.atlasInterpolationIcon,L.CLAMP_TO_EDGE)),ce.isSDF){const pe=ce.uniformValues;ce.hasHalo&&(pe.u_is_halo=1,ss(ce.buffers,he.segments,n,h,ce.program,ee,b,T,pe,he.terrainData)),pe.u_is_halo=0}ss(ce.buffers,he.segments,n,h,ce.program,ee,b,T,ce.uniformValues,he.terrainData)}}function ss(h,t,n,a,l,p,m,g,y,v){const b=a.context;l.draw(b,b.gl.TRIANGLES,p,m,g,_t.disabled,y,v,n.id,h.layoutVertexBuffer,h.indexBuffer,t,n.paint,a.transform.zoom,h.programConfigurations.get(n.id),h.dynamicLayoutVertexBuffer,h.opacityVertexBuffer)}function Ws(h,t,n,a,l){if(!n||!a||!a.imageAtlas)return;const p=a.imageAtlas.patternPositions;let m=p[n.to.toString()],g=p[n.from.toString()];if(!m||!g){const y=l.getPaintProperty(t);m=p[y],g=p[y]}m&&g&&h.setConstantPatternPositions(m,g)}function La(h,t,n,a,l,p,m){const g=h.context.gl,y="fill-pattern",v=n.paint.get(y),b=v&&v.constantOr(1),T=n.getCrossfadeParameters();let C,L,D,R,k;m?(L=b&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",C=g.LINES):(L=b?"fillPattern":"fill",C=g.TRIANGLES);const G=v.constantOr(null);for(const J of a){const V=t.getTile(J);if(b&&!V.patternsLoaded())continue;const X=V.getBucket(n);if(!X)continue;const ee=X.programConfigurations.get(n.id),te=h.useProgram(L,ee),ne=h.style.map.terrain&&h.style.map.terrain.getTerrainData(J);b&&(h.context.activeTexture.set(g.TEXTURE0),V.imageAtlasTexture.bind(g.LINEAR,g.CLAMP_TO_EDGE),ee.updatePaintBuffers(T)),Ws(ee,y,G,V,n);const he=ne?J:null,ce=h.translatePosMatrix(he?he.posMatrix:J.posMatrix,V,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(m){R=X.indexBuffer2,k=X.segments2;const pe=[g.drawingBufferWidth,g.drawingBufferHeight];D=L==="fillOutlinePattern"&&b?vo(ce,h,T,V,pe):_l(ce,pe)}else R=X.indexBuffer,k=X.segments,D=b?Rs(ce,h,T,V):xo(ce);te.draw(h.context,C,l,h.stencilModeForClipping(J),p,_t.disabled,D,ne,n.id,X.layoutVertexBuffer,R,k,n.paint,h.transform.zoom,ee)}}function Hs(h,t,n,a,l,p,m){const g=h.context,y=g.gl,v="fill-extrusion-pattern",b=n.paint.get(v),T=b.constantOr(1),C=n.getCrossfadeParameters(),L=n.paint.get("fill-extrusion-opacity"),D=b.constantOr(null);for(const R of a){const k=t.getTile(R),G=k.getBucket(n);if(!G)continue;const J=h.style.map.terrain&&h.style.map.terrain.getTerrainData(R),V=G.programConfigurations.get(n.id),X=h.useProgram(T?"fillExtrusionPattern":"fillExtrusion",V);T&&(h.context.activeTexture.set(y.TEXTURE0),k.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),V.updatePaintBuffers(C)),Ws(V,v,D,k,n);const ee=h.translatePosMatrix(R.posMatrix,k,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),te=n.paint.get("fill-extrusion-vertical-gradient"),ne=T?gl(ee,h,te,L,R,C,k):Yn(ee,h,te,L);X.draw(g,g.gl.TRIANGLES,l,p,m,_t.backCCW,ne,J,n.id,G.layoutVertexBuffer,G.indexBuffer,G.segments,n.paint,h.transform.zoom,V,h.style.map.terrain&&G.centroidVertexBuffer)}}function Ks(h,t,n,a,l,p,m){const g=h.context,y=g.gl,v=n.fbo;if(!v)return;const b=h.useProgram("hillshade"),T=h.style.map.terrain&&h.style.map.terrain.getTerrainData(t);g.activeTexture.set(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,v.colorAttachment.get()),b.draw(g,y.TRIANGLES,l,p,m,_t.disabled,((C,L,D,R)=>{const k=D.paint.get("hillshade-shadow-color"),G=D.paint.get("hillshade-highlight-color"),J=D.paint.get("hillshade-accent-color");let V=D.paint.get("hillshade-illumination-direction")*(Math.PI/180);D.paint.get("hillshade-illumination-anchor")==="viewport"&&(V-=C.transform.angle);const X=!C.options.moving;return{u_matrix:R?R.posMatrix:C.transform.calculatePosMatrix(L.tileID.toUnwrapped(),X),u_image:0,u_latrange:Eo(0,L.tileID),u_light:[D.paint.get("hillshade-exaggeration"),V],u_shadow:k,u_highlight:G,u_accent:J}})(h,n,a,T?t:null),T,a.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments)}function Ba(h,t,n,a,l,p){const m=h.context,g=m.gl,y=t.dem;if(y&&y.data){const v=y.dim,b=y.stride,T=y.getPixels();if(m.activeTexture.set(g.TEXTURE1),m.pixelStoreUnpackPremultiplyAlpha.set(!1),t.demTexture=t.demTexture||h.getTileTexture(b),t.demTexture){const L=t.demTexture;L.update(T,{premultiply:!1}),L.bind(g.NEAREST,g.CLAMP_TO_EDGE)}else t.demTexture=new ht(m,T,g.RGBA,{premultiply:!1}),t.demTexture.bind(g.NEAREST,g.CLAMP_TO_EDGE);m.activeTexture.set(g.TEXTURE0);let C=t.fbo;if(!C){const L=new ht(m,{width:v,height:v,data:null},g.RGBA);L.bind(g.LINEAR,g.CLAMP_TO_EDGE),C=t.fbo=m.createFramebuffer(v,v,!0,!1),C.colorAttachment.set(L.texture)}m.bindFramebuffer.set(C.framebuffer),m.viewport.set([0,0,v,v]),h.useProgram("hillshadePrepare").draw(m,g.TRIANGLES,a,l,p,_t.disabled,((L,D)=>{const R=D.stride,k=c.create();return c.ortho(k,0,c.EXTENT,-c.EXTENT,0,0,1),c.translate(k,k,[0,-c.EXTENT,0]),{u_matrix:k,u_image:1,u_dimension:[R,R],u_zoom:L.overscaledZ,u_unpack:D.getUnpackVector()}})(t.tileID,y),null,n.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments),t.needsHillshadePrepare=!1}}function zl(h,t,n,a,l,p){const m=a.paint.get("raster-fade-duration");if(!p&&m>0){const g=c.browser.now(),y=(g-h.timeAdded)/m,v=t?(g-t.timeAdded)/m:-1,b=n.getSource(),T=l.coveringZoomLevel({tileSize:b.tileSize,roundZoom:b.roundZoom}),C=!t||Math.abs(t.tileID.overscaledZ-T)>Math.abs(h.tileID.overscaledZ-T),L=C&&h.refreshedUponExpiration?1:c.clamp(C?y:1-v,0,1);return h.refreshedUponExpiration&&y>=1&&(h.refreshedUponExpiration=!1),t?{opacity:1,mix:1-L}:{opacity:L,mix:0}}return{opacity:1,mix:0}}const Lo=new c.Color(1,0,0,1),Bt=new c.Color(0,1,0,1),cn=new c.Color(0,0,1,1),ji=new c.Color(1,0,1,1),Ra=new c.Color(0,1,1,1);function Ys(h,t,n,a){Er(h,0,t+n/2,h.transform.width,n,a)}function Fa(h,t,n,a){Er(h,t-n/2,0,n,h.transform.height,a)}function Er(h,t,n,a,l,p){const m=h.context,g=m.gl;g.enable(g.SCISSOR_TEST),g.scissor(t*h.pixelRatio,n*h.pixelRatio,a*h.pixelRatio,l*h.pixelRatio),m.clear({color:p}),g.disable(g.SCISSOR_TEST)}function as(h,t,n){const a=h.context,l=a.gl,p=n.posMatrix,m=h.useProgram("debug"),g=We.disabled,y=gt.disabled,v=h.colorModeForRenderPass(),b="$debug",T=h.style.map.terrain&&h.style.map.terrain.getTerrainData(n);a.activeTexture.set(l.TEXTURE0);const C=t.getTileByID(n.key).latestRawTileData,L=Math.floor((C&&C.byteLength||0)/1024),D=t.getTile(n).tileSize,R=512/Math.min(D,512)*(n.overscaledZ/h.transform.zoom)*.5;let k=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(k+=` => ${n.overscaledZ}`),function(G,J){G.initDebugOverlayCanvas();const V=G.debugOverlayCanvas,X=G.context.gl,ee=G.debugOverlayCanvas.getContext("2d");ee.clearRect(0,0,V.width,V.height),ee.shadowColor="white",ee.shadowBlur=2,ee.lineWidth=1.5,ee.strokeStyle="white",ee.textBaseline="top",ee.font="bold 36px Open Sans, sans-serif",ee.fillText(J,5,5),ee.strokeText(J,5,5),G.debugOverlayTexture.update(V),G.debugOverlayTexture.bind(X.LINEAR,X.CLAMP_TO_EDGE)}(h,`${k} ${L}kB`),m.draw(a,l.TRIANGLES,g,y,Ct.alphaBlended,_t.disabled,wo(p,c.Color.transparent,R),null,b,h.debugBuffer,h.quadTriangleIndexBuffer,h.debugSegments),m.draw(a,l.LINE_STRIP,g,y,v,_t.disabled,wo(p,c.Color.red),T,b,h.debugBuffer,h.tileBorderIndexBuffer,h.debugSegments)}function Js(h,t,n){const a=h.context,l=a.gl,p=h.colorModeForRenderPass(),m=new We(l.LEQUAL,We.ReadWrite,h.depthRangeFor3D),g=h.useProgram("terrain"),y=t.getTerrainMesh();a.bindFramebuffer.set(null),a.viewport.set([0,0,h.width,h.height]);for(const v of n){const b=h.renderToTexture.getTexture(v),T=t.getTerrainData(v.tileID);a.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,b.texture);const C={u_matrix:h.transform.calculatePosMatrix(v.tileID.toUnwrapped()),u_texture:0,u_ele_delta:t.getMeshFrameDelta(h.transform.zoom)};g.draw(a,l.TRIANGLES,m,gt.disabled,p,_t.backCCW,C,T,"terrain",y.vertexBuffer,y.indexBuffer,y.segments)}}class Bo{constructor(t,n){this.context=new Xs(t),this.transform=n,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:c.create(),renderTime:0},this.setup(),this.numSublayers=At.maxUnderzooming+At.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Dt}resize(t,n,a){if(this.width=Math.floor(t*a),this.height=Math.floor(n*a),this.pixelRatio=a,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const l of this.style._order)this.style._layers[l].resize()}setup(){const t=this.context,n=new c.PosArray;n.emplaceBack(0,0),n.emplaceBack(c.EXTENT,0),n.emplaceBack(0,c.EXTENT),n.emplaceBack(c.EXTENT,c.EXTENT),this.tileExtentBuffer=t.createVertexBuffer(n,Ds.members),this.tileExtentSegments=c.SegmentVector.simpleSegment(0,0,4,2);const a=new c.PosArray;a.emplaceBack(0,0),a.emplaceBack(c.EXTENT,0),a.emplaceBack(0,c.EXTENT),a.emplaceBack(c.EXTENT,c.EXTENT),this.debugBuffer=t.createVertexBuffer(a,Ds.members),this.debugSegments=c.SegmentVector.simpleSegment(0,0,4,5);const l=new c.RasterBoundsArray;l.emplaceBack(0,0,0,0),l.emplaceBack(c.EXTENT,0,c.EXTENT,0),l.emplaceBack(0,c.EXTENT,0,c.EXTENT),l.emplaceBack(c.EXTENT,c.EXTENT,c.EXTENT,c.EXTENT),this.rasterBoundsBuffer=t.createVertexBuffer(l,$i.members),this.rasterBoundsSegments=c.SegmentVector.simpleSegment(0,0,4,2);const p=new c.PosArray;p.emplaceBack(0,0),p.emplaceBack(1,0),p.emplaceBack(0,1),p.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(p,Ds.members),this.viewportSegments=c.SegmentVector.simpleSegment(0,0,4,2);const m=new c.LineStripIndexArray;m.emplaceBack(0),m.emplaceBack(1),m.emplaceBack(3),m.emplaceBack(2),m.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(m);const g=new c.TriangleIndexArray;g.emplaceBack(0,1,2),g.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(g);const y=this.context.gl;this.stencilClearMode=new gt({func:y.ALWAYS,mask:0},0,255,y.ZERO,y.ZERO,y.ZERO)}clearStencil(){const t=this.context,n=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const a=c.create();c.ortho(a,0,this.width,this.height,0,0,1),c.scale(a,a,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,n.TRIANGLES,We.disabled,this.stencilClearMode,Ct.disabled,_t.disabled,Fs(a),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(t,n){if(this.currentStencilSource===t.source||!t.isTileClipped()||!n||!n.length)return;this.currentStencilSource=t.source;const a=this.context,l=a.gl;this.nextStencilID+n.length>256&&this.clearStencil(),a.setColorMode(Ct.disabled),a.setDepthMode(We.disabled);const p=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const m of n){const g=this._tileClippingMaskIDs[m.key]=this.nextStencilID++,y=this.style.map.terrain&&this.style.map.terrain.getTerrainData(m);p.draw(a,l.TRIANGLES,We.disabled,new gt({func:l.ALWAYS,mask:0},g,255,l.KEEP,l.KEEP,l.REPLACE),Ct.disabled,_t.disabled,Fs(m.posMatrix),y,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,n=this.context.gl;return new gt({func:n.NOTEQUAL,mask:255},t,255,n.KEEP,n.KEEP,n.REPLACE)}stencilModeForClipping(t){const n=this.context.gl;return new gt({func:n.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,n.KEEP,n.KEEP,n.REPLACE)}stencilConfigForOverlap(t){const n=this.context.gl,a=t.sort((m,g)=>g.overscaledZ-m.overscaledZ),l=a[a.length-1].overscaledZ,p=a[0].overscaledZ-l+1;if(p>1){this.currentStencilSource=void 0,this.nextStencilID+p>256&&this.clearStencil();const m={};for(let g=0;g=0;this.currentLayer--){const y=this.style._layers[a[this.currentLayer]],v=l[y.source],b=p[y.source];this._renderTileClippingMasks(y,b),this.renderLayer(this,v,y,b)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerk.source&&!k.isHidden(b)?[v.sourceCaches[k.source]]:[]),L=C.filter(k=>k.getSource().type==="vector"),D=C.filter(k=>k.getSource().type!=="vector"),R=k=>{(!T||T.getSource().maxzoomR(k)),T||D.forEach(k=>R(k)),T}(this.style,this.transform.zoom);y&&function(v,b,T){for(let C=0;CL.style.map.terrain.getElevation(te,ke,Ee):null)}}}(y,p,g,m,g.layout.get("text-rotation-alignment"),g.layout.get("text-pitch-alignment"),v),g.paint.get("icon-opacity").constantOr(1)!==0&&Da(p,m,g,y,!1,g.paint.get("icon-translate"),g.paint.get("icon-translate-anchor"),g.layout.get("icon-rotation-alignment"),g.layout.get("icon-pitch-alignment"),g.layout.get("icon-keep-upright"),b,T),g.paint.get("text-opacity").constantOr(1)!==0&&Da(p,m,g,y,!0,g.paint.get("text-translate"),g.paint.get("text-translate-anchor"),g.layout.get("text-rotation-alignment"),g.layout.get("text-pitch-alignment"),g.layout.get("text-keep-upright"),b,T),m.map.showCollisionBoxes&&(ns(p,m,g,y,g.paint.get("text-translate"),g.paint.get("text-translate-anchor"),!0),ns(p,m,g,y,g.paint.get("icon-translate"),g.paint.get("icon-translate-anchor"),!1))})(t,n,a,l,this.style.placement.variableOffsets);break;case"circle":(function(p,m,g,y){if(p.renderPass!=="translucent")return;const v=g.paint.get("circle-opacity"),b=g.paint.get("circle-stroke-width"),T=g.paint.get("circle-stroke-opacity"),C=!g.layout.get("circle-sort-key").isConstant();if(v.constantOr(1)===0&&(b.constantOr(1)===0||T.constantOr(1)===0))return;const L=p.context,D=L.gl,R=p.depthModeForSublayer(0,We.ReadOnly),k=gt.disabled,G=p.colorModeForRenderPass(),J=[];for(let V=0;VV.sortKey-X.sortKey);for(const V of J){const{programConfiguration:X,program:ee,layoutVertexBuffer:te,indexBuffer:ne,uniformValues:he,terrainData:ce}=V.state;ee.draw(L,D.TRIANGLES,R,k,G,_t.disabled,he,ce,g.id,te,ne,V.segments,g.paint,p.transform.zoom,X)}})(t,n,a,l);break;case"heatmap":(function(p,m,g,y){if(g.paint.get("heatmap-opacity")!==0)if(p.renderPass==="offscreen"){const v=p.context,b=v.gl,T=gt.disabled,C=new Ct([b.ONE,b.ONE],c.Color.transparent,[!0,!0,!0,!0]);(function(L,D,R){const k=L.gl;L.activeTexture.set(k.TEXTURE1),L.viewport.set([0,0,D.width/4,D.height/4]);let G=R.heatmapFbo;if(G)k.bindTexture(k.TEXTURE_2D,G.colorAttachment.get()),L.bindFramebuffer.set(G.framebuffer);else{const J=k.createTexture();k.bindTexture(k.TEXTURE_2D,J),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.LINEAR),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.LINEAR),G=R.heatmapFbo=L.createFramebuffer(D.width/4,D.height/4,!1,!1),function(V,X,ee,te){var ne,he;const ce=V.gl,pe=(ne=V.HALF_FLOAT)!==null&&ne!==void 0?ne:ce.UNSIGNED_BYTE,Ie=(he=V.RGBA16F)!==null&&he!==void 0?he:ce.RGBA;ce.texImage2D(ce.TEXTURE_2D,0,Ie,X.width/4,X.height/4,0,ce.RGBA,pe,null),te.colorAttachment.set(ee)}(L,D,J,G)}})(v,p,g),v.clear({color:c.Color.transparent});for(let L=0;L{const V=c.create();c.ortho(V,0,R.width,R.height,0,0,1);const X=R.context.gl;return{u_matrix:V,u_world:[X.drawingBufferWidth,X.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:k.paint.get("heatmap-opacity")}})(v,b),null,b.id,v.viewportBuffer,v.quadTriangleIndexBuffer,v.viewportSegments,b.paint,v.transform.zoom)}(p,g))})(t,n,a,l);break;case"line":(function(p,m,g,y){if(p.renderPass!=="translucent")return;const v=g.paint.get("line-opacity"),b=g.paint.get("line-width");if(v.constantOr(1)===0||b.constantOr(1)===0)return;const T=p.depthModeForSublayer(0,We.ReadOnly),C=p.colorModeForRenderPass(),L=g.paint.get("line-dasharray"),D=g.paint.get("line-pattern"),R=D.constantOr(1),k=g.paint.get("line-gradient"),G=g.getCrossfadeParameters(),J=R?"linePattern":L?"lineSDF":k?"lineGradient":"line",V=p.context,X=V.gl;let ee=!0;for(const te of y){const ne=m.getTile(te);if(R&&!ne.patternsLoaded())continue;const he=ne.getBucket(g);if(!he)continue;const ce=he.programConfigurations.get(g.id),pe=p.context.program.get(),Ie=p.useProgram(J,ce),Ze=ee||Ie.program!==pe,_e=p.style.map.terrain&&p.style.map.terrain.getTerrainData(te),ke=D.constantOr(null);if(ke&&ne.imageAtlas){const je=ne.imageAtlas,De=je.patternPositions[ke.to.toString()],Ge=je.patternPositions[ke.from.toString()];De&&Ge&&ce.setConstantPatternPositions(De,Ge)}const Ee=_e?te:null,bt=R?nn(p,ne,g,G,Ee):L?Us(p,ne,g,L,G,Ee):k?So(p,ne,g,he.lineClipsArray.length,Ee):Os(p,ne,g,Ee);if(R)V.activeTexture.set(X.TEXTURE0),ne.imageAtlasTexture.bind(X.LINEAR,X.CLAMP_TO_EDGE),ce.updatePaintBuffers(G);else if(L&&(Ze||p.lineAtlas.dirty))V.activeTexture.set(X.TEXTURE0),p.lineAtlas.bind(V);else if(k){const je=he.gradients[g.id];let De=je.texture;if(g.gradientVersion!==je.version){let Ge=256;if(g.stepInterpolant){const Et=m.getSource().maxzoom,lt=te.canonical.z===Et?Math.ceil(1<0?n.pop():null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;const n=this.imageManager.getPattern(t.from.toString()),a=this.imageManager.getPattern(t.to.toString());return!n||!a}useProgram(t,n){this.cache=this.cache||{};const a=t+(n?n.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[a]||(this.cache[a]=new $r(this.context,Kn[t],n,Ci[t],this._showOverdrawInspector,this.style.map.terrain)),this.cache[a]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new ht(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:t,drawingBufferHeight:n}=this.context.gl;return this.width!==t||this.height!==n}}class Qs{constructor(t,n){this.points=t,this.planes=n}static fromInvProjectionMatrix(t,n,a){const l=Math.pow(2,a),p=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(g=>{const y=1/(g=c.transformMat4([],g,t))[3]/n*l;return c.mul$1(g,g,[y,y,1/g[3],y])}),m=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(g=>{const y=function(C,L){var D=L[0],R=L[1],k=L[2],G=D*D+R*R+k*k;return G>0&&(G=1/Math.sqrt(G)),C[0]=L[0]*G,C[1]=L[1]*G,C[2]=L[2]*G,C}([],function(C,L,D){var R=L[0],k=L[1],G=L[2],J=D[0],V=D[1],X=D[2];return C[0]=k*X-G*V,C[1]=G*J-R*X,C[2]=R*V-k*J,C}([],jn([],p[g[0]],p[g[1]]),jn([],p[g[2]],p[g[1]]))),v=-((b=y)[0]*(T=p[g[1]])[0]+b[1]*T[1]+b[2]*T[2]);var b,T;return y.concat(v)});return new Qs(p,m)}}class os{constructor(t,n){this.min=t,this.max=n,this.center=function(a,l,p){return a[0]=.5*l[0],a[1]=.5*l[1],a[2]=.5*l[2],a}([],function(a,l,p){return a[0]=l[0]+p[0],a[1]=l[1]+p[1],a[2]=l[2]+p[2],a}([],this.min,this.max))}quadrant(t){const n=[t%2==0,t<2],a=Oi(this.min),l=Oi(this.max);for(let p=0;p=0&&m++;if(m===0)return 0;m!==n.length&&(a=!1)}if(a)return 2;for(let l=0;l<3;l++){let p=Number.MAX_VALUE,m=-Number.MAX_VALUE;for(let g=0;gthis.max[l]-this.min[l])return 0}return 1}}class ea{constructor(t=0,n=0,a=0,l=0){if(isNaN(t)||t<0||isNaN(n)||n<0||isNaN(a)||a<0||isNaN(l)||l<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=n,this.left=a,this.right=l}interpolate(t,n,a){return n.top!=null&&t.top!=null&&(this.top=c.interpolate.number(t.top,n.top,a)),n.bottom!=null&&t.bottom!=null&&(this.bottom=c.interpolate.number(t.bottom,n.bottom,a)),n.left!=null&&t.left!=null&&(this.left=c.interpolate.number(t.left,n.left,a)),n.right!=null&&t.right!=null&&(this.right=c.interpolate.number(t.right,n.right,a)),this}getCenter(t,n){const a=c.clamp((this.left+t-this.right)/2,0,t),l=c.clamp((this.top+n-this.bottom)/2,0,n);return new c.Point(a,l)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new ea(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class ta{constructor(t,n,a,l,p){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=p===void 0||!!p,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=a??0,this._maxPitch=l??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new c.LngLat(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ea,this._posMatrixCache={},this._alignedPosMatrixCache={},this._minEleveationForCurrentTile=0}clone(){const t=new ta(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.apply(this),t}apply(t){this.tileSize=t.tileSize,this.latRange=t.latRange,this.width=t.width,this.height=t.height,this._center=t._center,this._elevation=t._elevation,this._minEleveationForCurrentTile=t._minEleveationForCurrentTile,this.zoom=t.zoom,this.angle=t.angle,this._fov=t._fov,this._pitch=t._pitch,this._unmodified=t._unmodified,this._edgeInsets=t._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))}get maxZoom(){return this._maxZoom}set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))}get minPitch(){return this._minPitch}set minPitch(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))}get maxPitch(){return this._maxPitch}set maxPitch(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(t){t===void 0?t=!0:t===null&&(t=!1),this._renderWorldCopies=t}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new c.Point(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(t){const n=-c.wrap(t,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=function(){var a=new c.ARRAY_TYPE(4);return c.ARRAY_TYPE!=Float32Array&&(a[1]=0,a[2]=0),a[0]=1,a[3]=1,a}(),function(a,l,p){var m=l[0],g=l[1],y=l[2],v=l[3],b=Math.sin(p),T=Math.cos(p);a[0]=m*T+y*b,a[1]=g*T+v*b,a[2]=m*-b+y*T,a[3]=g*-b+v*T}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const n=c.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(t){const n=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==n&&(this._unmodified=!1,this._zoom=n,this.tileZoom=Math.max(0,Math.floor(n)),this.scale=this.zoomScale(n),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(t){t!==this._elevation&&(this._elevation=t,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(t){return this._edgeInsets.equals(t)}interpolatePadding(t,n,a){this._unmodified=!1,this._edgeInsets.interpolate(t,n,a),this._constrain(),this._calcMatrices()}coveringZoomLevel(t){const n=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,n)}getVisibleUnwrappedCoordinates(t){const n=[new c.UnwrappedTileID(0,t)];if(this._renderWorldCopies){const a=this.pointCoordinate(new c.Point(0,0)),l=this.pointCoordinate(new c.Point(this.width,0)),p=this.pointCoordinate(new c.Point(this.width,this.height)),m=this.pointCoordinate(new c.Point(0,this.height)),g=Math.floor(Math.min(a.x,l.x,p.x,m.x)),y=Math.floor(Math.max(a.x,l.x,p.x,m.x)),v=1;for(let b=g-v;b<=y+v;b++)b!==0&&n.push(new c.UnwrappedTileID(b,t))}return n}coveringTiles(t){var n,a;let l=this.coveringZoomLevel(t);const p=l;if(t.minzoom!==void 0&&lt.maxzoom&&(l=t.maxzoom);const m=this.pointCoordinate(this.getCameraPoint()),g=c.MercatorCoordinate.fromLngLat(this.center),y=Math.pow(2,l),v=[y*m.x,y*m.y,0],b=[y*g.x,y*g.y,0],T=Qs.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,l);let C=t.minzoom||0;!t.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(C=l);const L=t.terrain?2/Math.min(this.tileSize,t.tileSize)*this.tileSize:3,D=V=>({aabb:new os([V*y,0,0],[(V+1)*y,y,0]),zoom:0,x:0,y:0,wrap:V,fullyVisible:!1}),R=[],k=[],G=l,J=t.reparseOverscaled?p:l;if(this._renderWorldCopies)for(let V=1;V<=3;V++)R.push(D(-V)),R.push(D(V));for(R.push(D(0));R.length>0;){const V=R.pop(),X=V.x,ee=V.y;let te=V.fullyVisible;if(!te){const Ie=V.aabb.intersects(T);if(Ie===0)continue;te=Ie===2}const ne=t.terrain?v:b,he=V.aabb.distanceX(ne),ce=V.aabb.distanceY(ne),pe=Math.max(Math.abs(he),Math.abs(ce));if(V.zoom===G||pe>L+(1<=C){const Ie=G-V.zoom,Ze=v[0]-.5-(X<>1),ke=V.zoom+1;let Ee=V.aabb.quadrant(Ie);if(t.terrain){const bt=new c.OverscaledTileID(ke,V.wrap,ke,Ze,_e),je=t.terrain.getMinMaxElevation(bt),De=(n=je.minElevation)!==null&&n!==void 0?n:this.elevation,Ge=(a=je.maxElevation)!==null&&a!==void 0?a:this.elevation;Ee=new os([Ee.min[0],Ee.min[1],De],[Ee.max[0],Ee.max[1],Ge])}R.push({aabb:Ee,zoom:ke,x:Ze,y:_e,wrap:V.wrap,fullyVisible:te})}}return k.sort((V,X)=>V.distanceSq-X.distanceSq).map(V=>V.tileID)}resize(t,n){this.width=t,this.height=n,this.pixelsToGLUnits=[2/t,-2/n],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(t){return Math.pow(2,t)}scaleZoom(t){return Math.log(t)/Math.LN2}project(t){const n=c.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new c.Point(c.mercatorXfromLng(t.lng)*this.worldSize,c.mercatorYfromLat(n)*this.worldSize)}unproject(t){return new c.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(t){const n=this.pointLocation(this.centerPoint,t),a=t.getElevationForLngLatZoom(n,this.tileZoom);if(!(this.elevation-a))return;const l=this.getCameraPosition(),p=c.MercatorCoordinate.fromLngLat(l.lngLat,l.altitude),m=c.MercatorCoordinate.fromLngLat(n,a),g=p.x-m.x,y=p.y-m.y,v=p.z-m.z,b=Math.sqrt(g*g+y*y+v*v),T=this.scaleZoom(this.cameraToCenterDistance/b/this.tileSize);this._elevation=a,this._center=n,this.zoom=T}setLocationAtPoint(t,n){const a=this.pointCoordinate(n),l=this.pointCoordinate(this.centerPoint),p=this.locationCoordinate(t),m=new c.MercatorCoordinate(p.x-(a.x-l.x),p.y-(a.y-l.y));this.center=this.coordinateLocation(m),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(t,n){return n?this.coordinatePoint(this.locationCoordinate(t),n.getElevationForLngLatZoom(t,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(t))}pointLocation(t,n){return this.coordinateLocation(this.pointCoordinate(t,n))}locationCoordinate(t){return c.MercatorCoordinate.fromLngLat(t)}coordinateLocation(t){return t&&t.toLngLat()}pointCoordinate(t,n){if(n){const C=n.pointCoordinate(t);if(C!=null)return C}const a=[t.x,t.y,0,1],l=[t.x,t.y,1,1];c.transformMat4(a,a,this.pixelMatrixInverse),c.transformMat4(l,l,this.pixelMatrixInverse);const p=a[3],m=l[3],g=a[1]/p,y=l[1]/m,v=a[2]/p,b=l[2]/m,T=v===b?0:(0-v)/(b-v);return new c.MercatorCoordinate(c.interpolate.number(a[0]/p,l[0]/m,T)/this.worldSize,c.interpolate.number(g,y,T)/this.worldSize)}coordinatePoint(t,n=0,a=this.pixelMatrix){const l=[t.x*this.worldSize,t.y*this.worldSize,n,1];return c.transformMat4(l,l,a),new c.Point(l[0]/l[3],l[1]/l[3])}getBounds(){const t=Math.max(0,this.height/2-this.getHorizon());return new It().extend(this.pointLocation(new c.Point(0,t))).extend(this.pointLocation(new c.Point(this.width,t))).extend(this.pointLocation(new c.Point(this.width,this.height))).extend(this.pointLocation(new c.Point(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new It([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(t,n=!1){const a=t.key,l=n?this._alignedPosMatrixCache:this._posMatrixCache;if(l[a])return l[a];const p=t.canonical,m=this.worldSize/this.zoomScale(p.z),g=p.x+Math.pow(2,p.z)*t.wrap,y=c.identity(new Float64Array(16));return c.translate(y,y,[g*m,p.y*m,0]),c.scale(y,y,[m/c.EXTENT,m/c.EXTENT,1]),c.multiply(y,n?this.alignedProjMatrix:this.projMatrix,y),l[a]=new Float32Array(y),l[a]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let t,n,a,l,p=-90,m=90,g=-180,y=180;const v=this.size,b=this._unmodified;if(this.latRange){const L=this.latRange;p=c.mercatorYfromLat(L[1])*this.worldSize,m=c.mercatorYfromLat(L[0])*this.worldSize,t=m-pm&&(l=m-D)}if(this.lngRange){const L=(g+y)/2,D=c.wrap(T.x,L-this.worldSize/2,L+this.worldSize/2),R=v.x/2;D-Ry&&(a=y-R)}a===void 0&&l===void 0||(this.center=this.unproject(new c.Point(a!==void 0?a:T.x,l!==void 0?l:T.y)).wrap()),this._unmodified=b,this._constraining=!1}_calcMatrices(){if(!this.height)return;const t=this.centerOffset,n=this.point.x,a=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=c.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let l=c.identity(new Float64Array(16));c.scale(l,l,[this.width/2,-this.height/2,1]),c.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=c.identity(new Float64Array(16)),c.scale(l,l,[1,-1,1]),c.translate(l,l,[-1,-1,0]),c.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l;const p=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),m=Math.min(this.elevation,this._minEleveationForCurrentTile),g=p-m*this._pixelPerMeter/Math.cos(this._pitch),y=m<0?g:p,v=Math.PI/2+this._pitch,b=this._fov*(.5+t.y/this.height),T=Math.sin(b)*y/Math.sin(c.clamp(Math.PI-v-b,.01,Math.PI-.01)),C=this.getHorizon(),L=2*Math.atan(C/this.cameraToCenterDistance)*(.5+t.y/(2*C)),D=Math.sin(L)*y/Math.sin(c.clamp(Math.PI-v-L,.01,Math.PI-.01)),R=Math.min(T,D),k=1.01*(Math.cos(Math.PI/2-this._pitch)*R+y),G=this.height/50;l=new Float64Array(16),c.perspective(l,this._fov,this.width/this.height,G,k),l[8]=2*-t.x/this.width,l[9]=2*t.y/this.height,c.scale(l,l,[1,-1,1]),c.translate(l,l,[0,0,-this.cameraToCenterDistance]),c.rotateX(l,l,this._pitch),c.rotateZ(l,l,this.angle),c.translate(l,l,[-n,-a,0]),this.mercatorMatrix=c.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),c.scale(l,l,[1,1,this._pixelPerMeter]),this.pixelMatrix=c.multiply(new Float64Array(16),this.labelPlaneMatrix,l),c.translate(l,l,[0,0,-this.elevation]),this.projMatrix=l,this.invProjMatrix=c.invert([],l),this.pixelMatrix3D=c.multiply(new Float64Array(16),this.labelPlaneMatrix,l);const J=this.width%2/2,V=this.height%2/2,X=Math.cos(this.angle),ee=Math.sin(this.angle),te=n-Math.round(n)+X*J+ee*V,ne=a-Math.round(a)+X*V+ee*J,he=new Float64Array(l);if(c.translate(he,he,[te>.5?te-1:te,ne>.5?ne-1:ne,0]),this.alignedProjMatrix=he,l=c.invert(new Float64Array(16),this.pixelMatrix),!l)throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const t=this.pointCoordinate(new c.Point(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return c.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new c.Point(0,t))}getCameraQueryGeometry(t){const n=this.getCameraPoint();if(t.length===1)return[t[0],n];{let a=n.x,l=n.y,p=n.x,m=n.y;for(const g of t)a=Math.min(a,g.x),l=Math.min(l,g.y),p=Math.max(p,g.x),m=Math.max(m,g.y);return[new c.Point(a,l),new c.Point(p,l),new c.Point(p,m),new c.Point(a,m),new c.Point(a,l)]}}}function qr(h,t){let n,a=!1,l=null,p=null;const m=()=>{l=null,a&&(h.apply(p,n),l=setTimeout(m,t),a=!1)};return(...g)=>(a=!0,p=this,n=g,l||m(),l)}class Ro{constructor(t){this._getCurrentHash=()=>{const n=window.location.hash.replace("#","");if(this._hashName){let a;return n.split("&").map(l=>l.split("=")).forEach(l=>{l[0]===this._hashName&&(a=l)}),(a&&a[1]||"").split("/")}return n.split("/")},this._onHashChange=()=>{const n=this._getCurrentHash();if(n.length>=3&&!n.some(a=>isNaN(a))){const a=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(n[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+n[2],+n[1]],zoom:+n[0],bearing:a,pitch:+(n[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const n=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,n)}catch{}},this._updateHash=qr(this._updateHashUnthrottled,300),this._hashName=t&&encodeURIComponent(t)}addTo(t){return this._map=t,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(t){const n=this._map.getCenter(),a=Math.round(100*this._map.getZoom())/100,l=Math.ceil((a*Math.LN2+Math.log(512/360/.5))/Math.LN10),p=Math.pow(10,l),m=Math.round(n.lng*p)/p,g=Math.round(n.lat*p)/p,y=this._map.getBearing(),v=this._map.getPitch();let b="";if(b+=t?`/${m}/${g}/${a}`:`${a}/${g}/${m}`,(y||v)&&(b+="/"+Math.round(10*y)/10),v&&(b+=`/${Math.round(v)}`),this._hashName){const T=this._hashName;let C=!1;const L=window.location.hash.slice(1).split("&").map(D=>{const R=D.split("=")[0];return R===T?(C=!0,`${R}=${b}`):D}).filter(D=>D);return C||L.push(`${T}=${b}`),`#${L.join("&")}`}return`#${b}`}}const ls={linearity:.3,easing:c.bezier(0,0,.3,1)},Fo=c.extend({deceleration:2500,maxSpeed:1400},ls),Oo=c.extend({deceleration:20,maxSpeed:1400},ls),Uo=c.extend({deceleration:1e3,maxSpeed:360},ls),Vo=c.extend({deceleration:1e3,maxSpeed:90},ls);class cs{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:c.browser.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,n=c.browser.now();for(;t.length>0&&n-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new c.Point(0,0),pinchAround:void 0,around:void 0};for(const{settings:p}of this._inertiaBuffer)n.zoom+=p.zoomDelta||0,n.bearing+=p.bearingDelta||0,n.pitch+=p.pitchDelta||0,p.panDelta&&n.pan._add(p.panDelta),p.around&&(n.around=p.around),p.pinchAround&&(n.pinchAround=p.pinchAround);const a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,l={};if(n.pan.mag()){const p=Mi(n.pan.mag(),a,c.extend({},Fo,t||{}));l.offset=n.pan.mult(p.amount/n.pan.mag()),l.center=this._map.transform.center,hs(l,p)}if(n.zoom){const p=Mi(n.zoom,a,Oo);l.zoom=this._map.transform.zoom+p.amount,hs(l,p)}if(n.bearing){const p=Mi(n.bearing,a,Uo);l.bearing=this._map.transform.bearing+c.clamp(p.amount,-179,179),hs(l,p)}if(n.pitch){const p=Mi(n.pitch,a,Vo);l.pitch=this._map.transform.pitch+p.amount,hs(l,p)}if(l.zoom||l.bearing){const p=n.pinchAround===void 0?n.around:n.pinchAround;l.around=p?this._map.unproject(p):this._map.getCenter()}return this.clear(),c.extend(l,{noMoveStart:!0})}}function hs(h,t){(!h.duration||h.durationn.unproject(y)),g=p.reduce((y,v,b,T)=>y.add(v.div(T.length)),new c.Point(0,0));super(t,{points:p,point:g,lngLats:m,lngLat:n.unproject(g),originalEvent:a}),this._defaultPrevented=!1}}class Sr extends c.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,n,a){super(t,{originalEvent:a}),this._defaultPrevented=!1}}class ps{constructor(t,n){this._map=t,this._clickTolerance=n.clickTolerance}reset(){delete this._mousedownPos}wheel(t){return this._firePreventable(new Sr(t.type,this._map,t))}mousedown(t,n){return this._mousedownPos=n,this._firePreventable(new Vt(t.type,this._map,t))}mouseup(t){this._map.fire(new Vt(t.type,this._map,t))}click(t,n){this._mousedownPos&&this._mousedownPos.dist(n)>=this._clickTolerance||this._map.fire(new Vt(t.type,this._map,t))}dblclick(t){return this._firePreventable(new Vt(t.type,this._map,t))}mouseover(t){this._map.fire(new Vt(t.type,this._map,t))}mouseout(t){this._map.fire(new Vt(t.type,this._map,t))}touchstart(t){return this._firePreventable(new us(t.type,this._map,t))}touchmove(t){this._map.fire(new us(t.type,this._map,t))}touchend(t){this._map.fire(new us(t.type,this._map,t))}touchcancel(t){this._map.fire(new us(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class kl{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(t){this._map.fire(new Vt(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Vt("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._ignoreContextMenu||this._map.fire(new Vt(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ds{constructor(t){this._map=t}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(t){return this.transform.pointLocation(c.Point.convert(t),this._map.terrain)}}class Dl{constructor(t,n){this._map=t,this._tr=new ds(t),this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=n.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,n){this.isEnabled()&&t.shiftKey&&t.button===0&&(ie.disableDrag(),this._startPos=this._lastPos=n,this._active=!0)}mousemoveWindow(t,n){if(!this._active)return;const a=n;if(this._lastPos.equals(a)||!this._box&&a.dist(this._startPos)p.fitScreenCoordinates(a,l,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",t)}keydown(t){this._active&&t.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",t))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(ie.remove(this._box),this._box=null),ie.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,n){return this._map.fire(new c.Event(t,{originalEvent:n}))}}function ia(h,t){if(h.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${h.length}, points ${t.length}`);const n={};for(let a=0;athis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=t.timeStamp),a.length===this.numTouches&&(this.centroid=function(l){const p=new c.Point(0,0);for(const m of l)p._add(m);return p.div(l.length)}(n),this.touches=ia(a,n)))}touchmove(t,n,a){if(this.aborted||!this.centroid)return;const l=ia(a,n);for(const p in this.touches){const m=l[p];(!m||m.dist(this.touches[p])>30)&&(this.aborted=!0)}}touchend(t,n,a){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),a.length===0){const l=!this.aborted&&this.centroid;if(this.reset(),l)return l}}}class dr{constructor(t){this.singleTap=new fs(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(t,n,a){this.singleTap.touchstart(t,n,a)}touchmove(t,n,a){this.singleTap.touchmove(t,n,a)}touchend(t,n,a){const l=this.singleTap.touchend(t,n,a);if(l){const p=t.timeStamp-this.lastTime<500,m=!this.lastTap||this.lastTap.dist(l)<30;if(p&&m||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=l,this.count===this.numTaps)return this.reset(),l}}}class we{constructor(t){this._tr=new ds(t),this._zoomIn=new dr({numTouches:1,numTaps:2}),this._zoomOut=new dr({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,n,a){this._zoomIn.touchstart(t,n,a),this._zoomOut.touchstart(t,n,a)}touchmove(t,n,a){this._zoomIn.touchmove(t,n,a),this._zoomOut.touchmove(t,n,a)}touchend(t,n,a){const l=this._zoomIn.touchend(t,n,a),p=this._zoomOut.touchend(t,n,a),m=this._tr;return l?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:g=>g.easeTo({duration:300,zoom:m.zoom+1,around:m.unproject(l)},{originalEvent:t})}):p?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:g=>g.easeTo({duration:300,zoom:m.zoom-1,around:m.unproject(p)},{originalEvent:t})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Dn{constructor(t){this._enabled=!!t.enable,this._moveStateManager=t.moveStateManager,this._clickTolerance=t.clickTolerance||1,this._moveFunction=t.move,this._activateOnStart=!!t.activateOnStart,t.assignEvents(this),this.reset()}reset(t){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(t)}_move(...t){const n=this._moveFunction(...t);if(n.bearingDelta||n.pitchDelta||n.around||n.panDelta)return this._active=!0,n}dragStart(t,n){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(t)&&(this._moveStateManager.startMove(t),this._lastPoint=n.length?n[0]:n,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(t,n){if(!this.isEnabled())return;const a=this._lastPoint;if(!a)return;if(t.preventDefault(),!this._moveStateManager.isValidMoveEvent(t))return void this.reset(t);const l=n.length?n[0]:n;return!this._moved&&l.dist(a){h.mousedown=h.dragStart,h.mousemoveWindow=h.dragMove,h.mouseup=h.dragEnd,h.contextmenu=function(t){t.preventDefault()}},ra=({enable:h,clickTolerance:t,bearingDegreesPerPixelMoved:n=.8})=>{const a=new hn({checkCorrectEvent:l=>ie.mouseButton(l)===0&&l.ctrlKey||ie.mouseButton(l)===2});return new Dn({clickTolerance:t,move:(l,p)=>({bearingDelta:(p.x-l.x)*n}),moveStateManager:a,enable:h,assignEvents:xe})},No=({enable:h,clickTolerance:t,pitchDegreesPerPixelMoved:n=-.5})=>{const a=new hn({checkCorrectEvent:l=>ie.mouseButton(l)===0&&l.ctrlKey||ie.mouseButton(l)===2});return new Dn({clickTolerance:t,move:(l,p)=>({pitchDelta:(p.y-l.y)*n}),moveStateManager:a,enable:h,assignEvents:xe})};class Ll{constructor(t,n){this._minTouches=t.cooperativeGestures?2:1,this._clickTolerance=t.clickTolerance||1,this._map=n,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new c.Point(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(t,n,a){return this._calculateTransform(t,n,a)}touchmove(t,n,a){if(this._map._cooperativeGestures&&(this._minTouches===2&&a.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(t,!1,a.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(a.length0&&(this._active=!0);const l=ia(a,n),p=new c.Point(0,0),m=new c.Point(0,0);let g=0;for(const v in l){const b=l[v],T=this._touches[v];T&&(p._add(b),m._add(b.sub(T)),g++,l[v]=b)}if(this._touches=l,gMath.abs(h.x)}class Na extends gs{constructor(t){super(),this._map=t}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(t,n,a){super.touchstart(t,n,a),this._currentTouchCount=a.length}_start(t){this._lastPoints=t,ys(t[0].sub(t[1]))&&(this._valid=!1)}_move(t,n,a){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const l=t[0].sub(this._lastPoints[0]),p=t[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(l,p,a.timeStamp),this._valid?(this._lastPoints=t,this._active=!0,{pitchDelta:(l.y+p.y)/2*-.5}):void 0}gestureBeginsVertically(t,n,a){if(this._valid!==void 0)return this._valid;const l=t.mag()>=2,p=n.mag()>=2;if(!l&&!p)return;if(!l||!p)return this._firstMove===void 0&&(this._firstMove=a),a-this._firstMove<100&&void 0;const m=t.y>0==n.y>0;return ys(t)&&ys(n)&&m}}const $a={panStep:100,bearingStep:15,pitchStep:10};class yi{constructor(t){this._tr=new ds(t);const n=$a;this._panStep=n.panStep,this._bearingStep=n.bearingStep,this._pitchStep=n.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let n=0,a=0,l=0,p=0,m=0;switch(t.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:t.shiftKey?a=-1:(t.preventDefault(),p=-1);break;case 39:t.shiftKey?a=1:(t.preventDefault(),p=1);break;case 38:t.shiftKey?l=1:(t.preventDefault(),m=-1);break;case 40:t.shiftKey?l=-1:(t.preventDefault(),m=1);break;default:return}return this._rotationDisabled&&(a=0,l=0),{cameraAnimation:g=>{const y=this._tr;g.easeTo({duration:300,easeId:"keyboardHandler",easing:Zr,zoom:n?Math.round(y.zoom)+n*(t.shiftKey?2:1):y.zoom,bearing:y.bearing+a*this._bearingStep,pitch:y.pitch+l*this._pitchStep,offset:[-p*this._panStep,-m*this._panStep],center:y.center},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Zr(h){return h*(2-h)}const qa=4.000244140625;class Za{constructor(t,n){this._onTimeout=a=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(a)},this._map=t,this._tr=new ds(t),this._el=t.getCanvasContainer(),this._triggerRenderFrame=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this._wheelZoomRate=t}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!t&&t.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(t){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!t[this._map._metaKey])return;t.preventDefault()}let n=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const a=c.browser.now(),l=a-(this._lastWheelEventTime||0);this._lastWheelEventTime=a,n!==0&&n%qa==0?this._type="wheel":n!==0&&Math.abs(n)<4?this._type="trackpad":l>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(l*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}_start(t){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const n=ie.mousePos(this._el,t),a=this._tr;this._around=c.LngLat.convert(this._aroundCenter?a.center:a.unproject(n)),this._aroundPoint=a.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const t=this._tr.transform;if(this._delta!==0){const g=this._type==="wheel"&&Math.abs(this._delta)>qa?this._wheelZoomRate:this._defaultZoomRate;let y=2/(1+Math.exp(-Math.abs(this._delta*g)));this._delta<0&&y!==0&&(y=1/y);const v=typeof this._targetZoom=="number"?t.zoomScale(this._targetZoom):t.scale;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(v*y))),this._type==="wheel"&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const n=typeof this._targetZoom=="number"?this._targetZoom:t.zoom,a=this._startZoom,l=this._easing;let p,m=!1;if(this._type==="wheel"&&a&&l){const g=Math.min((c.browser.now()-this._lastWheelEventTime)/200,1),y=l(g);p=c.interpolate.number(a,n,y),g<1?this._frameId||(this._frameId=!0):m=!0}else p=n,m=!0;return this._active=!0,m&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!m,zoomDelta:p-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let n=c.defaultEasing;if(this._prevEase){const a=this._prevEase,l=(c.browser.now()-a.start)/a.duration,p=a.easing(l+.01)-a.easing(l),m=.27/Math.sqrt(p*p+1e-4)*.01,g=Math.sqrt(.0729-m*m);n=c.bezier(m,g,.25,1)}return this._prevEase={start:c.browser.now(),duration:t,easing:n},n}reset(){this._active=!1}}class ja{constructor(t,n){this._clickZoom=t,this._tapZoom=n}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ga{constructor(t){this._tr=new ds(t),this.reset()}reset(){this._active=!1}dblclick(t,n){return t.preventDefault(),{cameraAnimation:a=>{a.easeTo({duration:300,zoom:this._tr.zoom+(t.shiftKey?-1:1),around:this._tr.unproject(n)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class qo{constructor(){this._tap=new dr({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(t,n,a){if(!this._swipePoint)if(this._tapTime){const l=n[0],p=t.timeStamp-this._tapTime<500,m=this._tapPoint.dist(l)<30;p&&m?a.length>0&&(this._swipePoint=l,this._swipeTouch=a[0].identifier):this.reset()}else this._tap.touchstart(t,n,a)}touchmove(t,n,a){if(this._tapTime){if(this._swipePoint){if(a[0].identifier!==this._swipeTouch)return;const l=n[0],p=l.y-this._swipePoint.y;return this._swipePoint=l,t.preventDefault(),this._active=!0,{zoomDelta:p/128}}}else this._tap.touchmove(t,n,a)}touchend(t,n,a){if(this._tapTime)this._swipePoint&&a.length===0&&this.reset();else{const l=this._tap.touchend(t,n,a);l&&(this._tapTime=t.timeStamp,this._tapPoint=l)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Gi{constructor(t,n,a){this._el=t,this._mousePan=n,this._touchPan=a}enable(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class vt{constructor(t,n,a){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=n,this._mousePitch=a}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class na{constructor(t,n,a,l){this._el=t,this._touchZoom=n,this._touchRotate=a,this._tapDragZoom=l,this._rotationDisabled=!1,this._enabled=!0}enable(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const Ln=h=>h.zoom||h.drag||h.pitch||h.rotate;class Zo extends c.Event{}function sa(h){return h.panDelta&&h.panDelta.mag()||h.zoomDelta||h.bearingDelta||h.pitchDelta}class jo{constructor(t,n){this.handleWindowEvent=l=>{this.handleEvent(l,`${l.type}Window`)},this.handleEvent=(l,p)=>{if(l.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const m=l.type==="renderFrame"?void 0:l,g={needsRenderFrame:!1},y={},v={},b=l.touches,T=b?this._getMapTouches(b):void 0,C=T?ie.touchPos(this._el,T):ie.mousePos(this._el,l);for(const{handlerName:R,handler:k,allowed:G}of this._handlers){if(!k.isEnabled())continue;let J;this._blockedByActive(v,G,R)?k.reset():k[p||l.type]&&(J=k[p||l.type](l,C,T),this.mergeHandlerResult(g,y,J,R,m),J&&J.needsRenderFrame&&this._triggerRenderFrame()),(J||k.isActive())&&(v[R]=k)}const L={};for(const R in this._previousActiveHandlers)v[R]||(L[R]=m);this._previousActiveHandlers=v,(Object.keys(L).length||sa(g))&&(this._changes.push([g,y,L]),this._triggerRenderFrame()),(Object.keys(v).length||sa(g))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:D}=g;D&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],D(this._map))},this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new cs(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n);const a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[window,"blur",void 0]];for(const[l,p,m]of this._listeners)ie.addEventListener(l,p,l===document?this.handleWindowEvent:this.handleEvent,m)}destroy(){for(const[t,n,a]of this._listeners)ie.removeEventListener(t,n,t===document?this.handleWindowEvent:this.handleEvent,a)}_addDefaultHandlers(t){const n=this._map,a=n.getCanvasContainer();this._add("mapEvent",new ps(n,t));const l=n.boxZoom=new Dl(n,t);this._add("boxZoom",l),t.interactive&&t.boxZoom&&l.enable();const p=new we(n),m=new Ga(n);n.doubleClickZoom=new ja(m,p),this._add("tapZoom",p),this._add("clickZoom",m),t.interactive&&t.doubleClickZoom&&n.doubleClickZoom.enable();const g=new qo;this._add("tapDragZoom",g);const y=n.touchPitch=new Na(n);this._add("touchPitch",y),t.interactive&&t.touchPitch&&n.touchPitch.enable(t.touchPitch);const v=ra(t),b=No(t);n.dragRotate=new vt(t,v,b),this._add("mouseRotate",v,["mousePitch"]),this._add("mousePitch",b,["mouseRotate"]),t.interactive&&t.dragRotate&&n.dragRotate.enable();const T=(({enable:G,clickTolerance:J})=>{const V=new hn({checkCorrectEvent:X=>ie.mouseButton(X)===0&&!X.ctrlKey});return new Dn({clickTolerance:J,move:(X,ee)=>({around:ee,panDelta:ee.sub(X)}),activateOnStart:!0,moveStateManager:V,enable:G,assignEvents:xe})})(t),C=new Ll(t,n);n.dragPan=new Gi(a,T,C),this._add("mousePan",T),this._add("touchPan",C,["touchZoom","touchRotate"]),t.interactive&&t.dragPan&&n.dragPan.enable(t.dragPan);const L=new Va,D=new Bl;n.touchZoomRotate=new na(a,D,L,g),this._add("touchRotate",L,["touchPan","touchZoom"]),this._add("touchZoom",D,["touchPan","touchRotate"]),t.interactive&&t.touchZoomRotate&&n.touchZoomRotate.enable(t.touchZoomRotate);const R=n.scrollZoom=new Za(n,()=>this._triggerRenderFrame());this._add("scrollZoom",R,["mousePan"]),t.interactive&&t.scrollZoom&&n.scrollZoom.enable(t.scrollZoom);const k=n.keyboard=new yi(n);this._add("keyboard",k),t.interactive&&t.keyboard&&n.keyboard.enable(),this._add("blockableMapEvent",new kl(n))}_add(t,n,a){this._handlers.push({handlerName:t,handler:n,allowed:a}),this._handlersById[t]=n}stop(t){if(!this._updatingCamera){for(const{handler:n}of this._handlers)n.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}}isActive(){for(const{handler:t}of this._handlers)if(t.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ln(this._eventsInProgress)||this.isZooming()}_blockedByActive(t,n,a){for(const l in t)if(l!==a&&(!n||n.indexOf(l)<0))return!0;return!1}_getMapTouches(t){const n=[];for(const a of t)this._el.contains(a.target)&&n.push(a);return n}mergeHandlerResult(t,n,a,l,p){if(!a)return;c.extend(t,a);const m={handlerName:l,originalEvent:a.originalEvent||p};a.zoomDelta!==void 0&&(n.zoom=m),a.panDelta!==void 0&&(n.drag=m),a.pitchDelta!==void 0&&(n.pitch=m),a.bearingDelta!==void 0&&(n.rotate=m)}_applyChanges(){const t={},n={},a={};for(const[l,p,m]of this._changes)l.panDelta&&(t.panDelta=(t.panDelta||new c.Point(0,0))._add(l.panDelta)),l.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+l.zoomDelta),l.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+l.bearingDelta),l.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+l.pitchDelta),l.around!==void 0&&(t.around=l.around),l.pinchAround!==void 0&&(t.pinchAround=l.pinchAround),l.noInertia&&(t.noInertia=l.noInertia),c.extend(n,p),c.extend(a,m);this._updateMapTransform(t,n,a),this._changes=[]}_updateMapTransform(t,n,a){const l=this._map,p=l._getTransformForUpdate(),m=l.terrain;if(!(sa(t)||m&&this._terrainMovement))return this._fireEvents(n,a,!0);let{panDelta:g,zoomDelta:y,bearingDelta:v,pitchDelta:b,around:T,pinchAround:C}=t;C!==void 0&&(T=C),l._stop(!0),T=T||l.transform.centerPoint;const L=p.pointLocation(g?T.sub(g):T);v&&(p.bearing+=v),b&&(p.pitch+=b),y&&(p.zoom+=y),m?this._terrainMovement||!n.drag&&!n.zoom?n.drag&&this._terrainMovement?p.center=p.pointLocation(p.centerPoint.sub(g)):p.setLocationAtPoint(L,T):(this._terrainMovement=!0,this._map._elevationFreeze=!0,p.setLocationAtPoint(L,T),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,p.recalculateZoom(l.terrain)})):p.setLocationAtPoint(L,T),l._applyUpdatedTransform(p),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(n,a,!0)}_fireEvents(t,n,a){const l=Ln(this._eventsInProgress),p=Ln(t),m={};for(const b in t){const{originalEvent:T}=t[b];this._eventsInProgress[b]||(m[`${b}start`]=T),this._eventsInProgress[b]=t[b]}!l&&p&&this._fireEvent("movestart",p.originalEvent);for(const b in m)this._fireEvent(b,m[b]);p&&this._fireEvent("move",p.originalEvent);for(const b in t){const{originalEvent:T}=t[b];this._fireEvent(b,T)}const g={};let y;for(const b in this._eventsInProgress){const{handlerName:T,originalEvent:C}=this._eventsInProgress[b];this._handlersById[T].isActive()||(delete this._eventsInProgress[b],y=n[T]||C,g[`${b}end`]=y)}for(const b in g)this._fireEvent(b,g[b]);const v=Ln(this._eventsInProgress);if(a&&(l||p)&&!v){this._updatingCamera=!0;const b=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),T=C=>C!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Zo("renderFrame",{timeStamp:t})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Rl extends c.Evented{constructor(t,n){super(),this._renderFrameCallback=()=>{const a=Math.min((c.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(a)),a<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=n.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new c.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(t,n){return this.jumpTo({center:t},n)}panBy(t,n,a){return t=c.Point.convert(t).mult(-1),this.panTo(this.transform.center,c.extend({offset:t},n),a)}panTo(t,n,a){return this.easeTo(c.extend({center:t},n),a)}getZoom(){return this.transform.zoom}setZoom(t,n){return this.jumpTo({zoom:t},n),this}zoomTo(t,n,a){return this.easeTo(c.extend({zoom:t},n),a)}zoomIn(t,n){return this.zoomTo(this.getZoom()+1,t,n),this}zoomOut(t,n){return this.zoomTo(this.getZoom()-1,t,n),this}getBearing(){return this.transform.bearing}setBearing(t,n){return this.jumpTo({bearing:t},n),this}getPadding(){return this.transform.padding}setPadding(t,n){return this.jumpTo({padding:t},n),this}rotateTo(t,n,a){return this.easeTo(c.extend({bearing:t},n),a)}resetNorth(t,n){return this.rotateTo(0,c.extend({duration:1e3},t),n),this}resetNorthPitch(t,n){return this.easeTo(c.extend({bearing:0,pitch:0,duration:1e3},t),n),this}snapToNorth(t,n){return Math.abs(this.getBearing()){if(this._zooming&&(a.zoom=c.interpolate.number(l,y,te)),this._rotating&&(a.bearing=c.interpolate.number(p,v,te)),this._pitching&&(a.pitch=c.interpolate.number(m,b,te)),this._padding&&(a.interpolatePadding(g,T,te),L=a.centerPoint.add(C)),this.terrain&&!t.freezeElevation&&this._updateElevation(te),V)a.setLocationAtPoint(V,X);else{const ne=a.zoomScale(a.zoom-l),he=y>l?Math.min(2,J):Math.max(.5,J),ce=Math.pow(he,1-te),pe=a.unproject(k.add(G.mult(te*ce)).mult(ne));a.setLocationAtPoint(a.renderWorldCopies?pe.wrap():pe,L)}this._applyUpdatedTransform(a),this._fireMoveEvents(n)},te=>{this.terrain&&this._finalizeElevation(),this._afterEase(n,te)},t),this}_prepareEase(t,n,a={}){this._moving=!0,n||a.moving||this.fire(new c.Event("movestart",t)),this._zooming&&!a.zooming&&this.fire(new c.Event("zoomstart",t)),this._rotating&&!a.rotating&&this.fire(new c.Event("rotatestart",t)),this._pitching&&!a.pitching&&this.fire(new c.Event("pitchstart",t))}_prepareElevation(t){this._elevationCenter=t,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(t,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(t){this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const n=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(t<1&&n!==this._elevationTarget){const a=this._elevationTarget-this._elevationStart;this._elevationStart+=t*(a-(n-(a*t+this._elevationStart))/(1-t)),this._elevationTarget=n}this.transform.elevation=c.interpolate.number(this._elevationStart,this._elevationTarget,t)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(t){if(!this.transformCameraUpdate)return;const n=t.clone(),{center:a,zoom:l,pitch:p,bearing:m,elevation:g}=this.transformCameraUpdate(n);a&&(n.center=a),l!==void 0&&(n.zoom=l),p!==void 0&&(n.pitch=p),m!==void 0&&(n.bearing=m),g!==void 0&&(n.elevation=g),this.transform.apply(n)}_fireMoveEvents(t){this.fire(new c.Event("move",t)),this._zooming&&this.fire(new c.Event("zoom",t)),this._rotating&&this.fire(new c.Event("rotate",t)),this._pitching&&this.fire(new c.Event("pitch",t))}_afterEase(t,n){if(this._easeId&&n&&this._easeId===n)return;delete this._easeId;const a=this._zooming,l=this._rotating,p=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,a&&this.fire(new c.Event("zoomend",t)),l&&this.fire(new c.Event("rotateend",t)),p&&this.fire(new c.Event("pitchend",t)),this.fire(new c.Event("moveend",t))}flyTo(t,n){if(!t.essential&&c.browser.prefersReducedMotion){const Ee=c.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ee,n)}this.stop(),t=c.extend({offset:[0,0],speed:1.2,curve:1.42,easing:c.defaultEasing},t);const a=this._getTransformForUpdate(),l=this.getZoom(),p=this.getBearing(),m=this.getPitch(),g=this.getPadding(),y="zoom"in t?c.clamp(+t.zoom,a.minZoom,a.maxZoom):l,v="bearing"in t?this._normalizeBearing(t.bearing,p):p,b="pitch"in t?+t.pitch:m,T="padding"in t?t.padding:a.padding,C=a.zoomScale(y-l),L=c.Point.convert(t.offset);let D=a.centerPoint.add(L);const R=a.pointLocation(D),k=c.LngLat.convert(t.center||R);this._normalizeCenter(k);const G=a.project(R),J=a.project(k).sub(G);let V=t.curve;const X=Math.max(a.width,a.height),ee=X/C,te=J.mag();if("minZoom"in t){const Ee=c.clamp(Math.min(t.minZoom,l,y),a.minZoom,a.maxZoom),bt=X/a.zoomScale(Ee-l);V=Math.sqrt(bt/te*2)}const ne=V*V;function he(Ee){const bt=(ee*ee-X*X+(Ee?-1:1)*ne*ne*te*te)/(2*(Ee?ee:X)*ne*te);return Math.log(Math.sqrt(bt*bt+1)-bt)}function ce(Ee){return(Math.exp(Ee)-Math.exp(-Ee))/2}function pe(Ee){return(Math.exp(Ee)+Math.exp(-Ee))/2}const Ie=he(!1);let Ze=function(Ee){return pe(Ie)/pe(Ie+V*Ee)},_e=function(Ee){return X*((pe(Ie)*(ce(bt=Ie+V*Ee)/pe(bt))-ce(Ie))/ne)/te;var bt},ke=(he(!0)-Ie)/V;if(Math.abs(te)<1e-6||!isFinite(ke)){if(Math.abs(X-ee)<1e-6)return this.easeTo(t,n);const Ee=eet.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=p!==v,this._pitching=b!==m,this._padding=!a.isPaddingEqual(T),this._prepareEase(n,!1),this.terrain&&this._prepareElevation(k),this._ease(Ee=>{const bt=Ee*ke,je=1/Ze(bt);a.zoom=Ee===1?y:l+a.scaleZoom(je),this._rotating&&(a.bearing=c.interpolate.number(p,v,Ee)),this._pitching&&(a.pitch=c.interpolate.number(m,b,Ee)),this._padding&&(a.interpolatePadding(g,T,Ee),D=a.centerPoint.add(L)),this.terrain&&!t.freezeElevation&&this._updateElevation(Ee);const De=Ee===1?k:a.unproject(G.add(J.mult(_e(bt))).mult(je));a.setLocationAtPoint(a.renderWorldCopies?De.wrap():De,D),this._applyUpdatedTransform(a),this._fireMoveEvents(n)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(n)},t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,n){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const a=this._onEaseEnd;delete this._onEaseEnd,a.call(this,n)}if(!t){const a=this.handlers;a&&a.stop(!1)}return this}_ease(t,n,a){a.animate===!1||a.duration===0?(t(1),n()):(this._easeStart=c.browser.now(),this._easeOptions=a,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(t,n){t=c.wrap(t,-180,180);const a=Math.abs(t-n);return Math.abs(t-360-n)180?-360:a<-180?360:0}queryTerrainElevation(t){return this.terrain?this.terrain.getElevationForLngLatZoom(c.LngLat.convert(t),this.transform.tileZoom)-this.transform.elevation:null}}class Ki{constructor(t={}){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=n=>{!n||n.sourceDataType!=="metadata"&&n.sourceDataType!=="visibility"&&n.dataType!=="style"&&n.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=t}getDefaultPosition(){return"bottom-right"}onAdd(t){return this._map=t,this._compact=this.options&&this.options.compact,this._container=ie.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=ie.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=ie.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){ie.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(t,n){const a=this._map._getUIString(`AttributionControl.${n}`);t.title=a,t.setAttribute("aria-label",a)}_updateAttributions(){if(!this._map.style)return;let t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(l=>typeof l!="string"?"":l)):typeof this.options.customAttribution=="string"&&t.push(this.options.customAttribution)),this._map.style.stylesheet){const l=this._map.style.stylesheet;this.styleOwner=l.owner,this.styleId=l.id}const n=this._map.style.sourceCaches;for(const l in n){const p=n[l];if(p.used||p.usedForTerrain){const m=p.getSource();m.attribution&&t.indexOf(m.attribution)<0&&t.push(m.attribution)}}t=t.filter(l=>String(l).trim()),t.sort((l,p)=>l.length-p.length),t=t.filter((l,p)=>{for(let m=p+1;m=0)return!1;return!0});const a=t.join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class xs{constructor(t={}){this._updateCompact=()=>{const n=this._container.children;if(n.length){const a=n[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&a.classList.add("maplibregl-compact"):a.classList.remove("maplibregl-compact")}},this.options=t}getDefaultPosition(){return"bottom-left"}onAdd(t){this._map=t,this._compact=this.options&&this.options.compact,this._container=ie.create("div","maplibregl-ctrl");const n=ie.create("a","maplibregl-ctrl-logo");return n.target="_blank",n.rel="noopener nofollow",n.href="https://maplibre.org/",n.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),n.setAttribute("rel","noopener nofollow"),this._container.appendChild(n),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){ie.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Me{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){const n=++this._id;return this._queue.push({callback:t,id:n,cancelled:!1}),n}remove(t){const n=this._currentlyRunning,a=n?this._queue.concat(n):this._queue;for(const l of a)if(l.id===t)return void(l.cancelled=!0)}run(t=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const n=this._currentlyRunning=this._queue;this._queue=[];for(const a of n)if(!a.cancelled&&(a.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const Re={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"};var aa=c.createLayout([{name:"a_pos3d",type:"Int16",components:3}]);class Xa extends c.Evented{constructor(t){super(),this.sourceCache=t,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,t.usedForTerrain=!0,t.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(t,n){this.sourceCache.update(t,n),this._renderableTilesKeys=[];const a={};for(const l of t.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:n}))a[l.key]=!0,this._renderableTilesKeys.push(l.key),this._tiles[l.key]||(l.posMatrix=new Float64Array(16),c.ortho(l.posMatrix,0,c.EXTENT,0,c.EXTENT,0,1),this._tiles[l.key]=new tn(l,this.tileSize));for(const l in this._tiles)a[l]||delete this._tiles[l]}freeRtt(t){for(const n in this._tiles){const a=this._tiles[n];(!t||a.tileID.equals(t)||a.tileID.isChildOf(t)||t.isChildOf(a.tileID))&&(a.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(t=>this.getTileByID(t))}getTileByID(t){return this._tiles[t]}getTerrainCoords(t){const n={};for(const a of this._renderableTilesKeys){const l=this._tiles[a].tileID;if(l.canonical.equals(t.canonical)){const p=t.clone();p.posMatrix=new Float64Array(16),c.ortho(p.posMatrix,0,c.EXTENT,0,c.EXTENT,0,1),n[a]=p}else if(l.canonical.isChildOf(t.canonical)){const p=t.clone();p.posMatrix=new Float64Array(16);const m=l.canonical.z-t.canonical.z,g=l.canonical.x-(l.canonical.x>>m<>m<>m;c.ortho(p.posMatrix,0,v,0,v,0,1),c.translate(p.posMatrix,p.posMatrix,[-g*v,-y*v,0]),n[a]=p}else if(t.canonical.isChildOf(l.canonical)){const p=t.clone();p.posMatrix=new Float64Array(16);const m=t.canonical.z-l.canonical.z,g=t.canonical.x-(t.canonical.x>>m<>m<>m;c.ortho(p.posMatrix,0,c.EXTENT,0,c.EXTENT,0,1),c.translate(p.posMatrix,p.posMatrix,[g*v,y*v,0]),c.scale(p.posMatrix,p.posMatrix,[1/2**m,1/2**m,0]),n[a]=p}}return n}getSourceTile(t,n){const a=this.sourceCache._source;let l=t.overscaledZ-this.deltaZoom;if(l>a.maxzoom&&(l=a.maxzoom),l=a.minzoom&&(!p||!p.dem);)p=this.sourceCache.getTileByID(t.scaledTo(l--).key);return p}tilesAfterTime(t=Date.now()){return Object.values(this._tiles).filter(n=>n.timeAdded>=t)}}class Wa{constructor(t,n,a){this.painter=t,this.sourceCache=new Xa(n),this.options=a,this.exaggeration=typeof a.exaggeration=="number"?a.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(t,n,a,l=c.EXTENT){var p;if(!(n>=0&&n=0&&at.canonical.z&&(t.canonical.z>=l?p=t.canonical.z-l:c.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const m=t.canonical.x-(t.canonical.x>>p<>p<>8<<4|p>>8,n[m+3]=0;const a=new c.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(n.buffer)),l=new ht(t,a,t.gl.RGBA,{premultiply:!1});return l.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._coordsTexture=l,l}pointCoordinate(t){const n=new Uint8Array(4),a=this.painter.context,l=a.gl;a.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),l.readPixels(t.x,this.painter.height/devicePixelRatio-t.y-1,1,1,l.RGBA,l.UNSIGNED_BYTE,n),a.bindFramebuffer.set(null);const p=n[0]+(n[2]>>4<<8),m=n[1]+((15&n[2])<<8),g=this.coordsIndex[255-n[3]],y=g&&this.sourceCache.getTileByID(g);if(!y)return null;const v=this._coordsTextureSize,b=(1<t.id!==n),this._recentlyUsed.push(t.id)}stampObject(t){t.stamp=++this._stamp}getOrCreateFreeObject(){for(const n of this._recentlyUsed)if(!this._objects[n].inUse)return this._objects[n];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const t=this._createObject(this._objects.length);return this._objects.push(t),t}freeObject(t){t.inUse=!1}freeAllObjects(){for(const t of this._objects)this.freeObject(t)}isFull(){return!(this._objects.length!t.inUse)===!1}}const un={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class fr{constructor(t,n){this.painter=t,this.terrain=n,this.pool=new xi(t.context,30,n.sourceCache.tileSize*n.qualityFactor)}destruct(){this.pool.destruct()}getTexture(t){return this.pool.getObjectForId(t.rtt[this._stacks.length-1].id).texture}prepareForRender(t,n){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=t._order.filter(a=>!t._layers[a].isHidden(n)),this._coordsDescendingInv={};for(const a in t.sourceCaches){this._coordsDescendingInv[a]={};const l=t.sourceCaches[a].getVisibleCoordinates();for(const p of l){const m=this.terrain.sourceCache.getTerrainCoords(p);for(const g in m)this._coordsDescendingInv[a][g]||(this._coordsDescendingInv[a][g]=[]),this._coordsDescendingInv[a][g].push(m[g])}}this._coordsDescendingInvStr={};for(const a of t._order){const l=t._layers[a],p=l.source;if(un[l.type]&&!this._coordsDescendingInvStr[p]){this._coordsDescendingInvStr[p]={};for(const m in this._coordsDescendingInv[p])this._coordsDescendingInvStr[p][m]=this._coordsDescendingInv[p][m].map(g=>g.key).sort().join()}}for(const a of this._renderableTiles)for(const l in this._coordsDescendingInvStr){const p=this._coordsDescendingInvStr[l][a.tileID.key];p&&p!==a.rttCoords[l]&&(a.rtt=[])}}renderLayer(t){if(t.isHidden(this.painter.transform.zoom))return!1;const n=t.type,a=this.painter,l=this._renderableLayerIds[this._renderableLayerIds.length-1]===t.id;if(un[n]&&(this._prevType&&un[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(t.id),!l))return!0;if(un[this._prevType]||un[n]&&l){this._prevType=n;const p=this._stacks.length-1,m=this._stacks[p]||[];for(const g of this._renderableTiles){if(this.pool.isFull()&&(Js(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(g),g.rtt[p]){const v=this.pool.getObjectForId(g.rtt[p].id);if(v.stamp===g.rtt[p].stamp){this.pool.useObject(v);continue}}const y=this.pool.getOrCreateFreeObject();this.pool.useObject(y),this.pool.stampObject(y),g.rtt[p]={id:y.id,stamp:y.stamp},a.context.bindFramebuffer.set(y.fbo.framebuffer),a.context.clear({color:c.Color.transparent,stencil:0}),a.currentStencilSource=void 0;for(let v=0;v{h.touchstart=h.dragStart,h.touchmoveWindow=h.dragMove,h.touchend=h.dragEnd},Rt={showCompass:!0,showZoom:!0,visualizePitch:!1};class Go{constructor(t,n,a=!1){this.mousedown=m=>{this.startMouse(c.extend({},m,{ctrlKey:!0,preventDefault:()=>m.preventDefault()}),ie.mousePos(this.element,m)),ie.addEventListener(window,"mousemove",this.mousemove),ie.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=m=>{this.moveMouse(m,ie.mousePos(this.element,m))},this.mouseup=m=>{this.mouseRotate.dragEnd(m),this.mousePitch&&this.mousePitch.dragEnd(m),this.offTemp()},this.touchstart=m=>{m.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=ie.touchPos(this.element,m.targetTouches)[0],this.startTouch(m,this._startPos),ie.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),ie.addEventListener(window,"touchend",this.touchend))},this.touchmove=m=>{m.targetTouches.length!==1?this.reset():(this._lastPos=ie.touchPos(this.element,m.targetTouches)[0],this.moveTouch(m,this._lastPos))},this.touchend=m=>{m.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const l=t.dragRotate._mouseRotate.getClickTolerance(),p=t.dragRotate._mousePitch.getClickTolerance();this.element=n,this.mouseRotate=ra({clickTolerance:l,enable:!0}),this.touchRotate=(({enable:m,clickTolerance:g,bearingDegreesPerPixelMoved:y=.8})=>{const v=new Oa;return new Dn({clickTolerance:g,move:(b,T)=>({bearingDelta:(T.x-b.x)*y}),moveStateManager:v,enable:m,assignEvents:Tt})})({clickTolerance:l,enable:!0}),this.map=t,a&&(this.mousePitch=No({clickTolerance:p,enable:!0}),this.touchPitch=(({enable:m,clickTolerance:g,pitchDegreesPerPixelMoved:y=-.5})=>{const v=new Oa;return new Dn({clickTolerance:g,move:(b,T)=>({pitchDelta:(T.y-b.y)*y}),moveStateManager:v,enable:m,assignEvents:Tt})})({clickTolerance:p,enable:!0})),ie.addEventListener(n,"mousedown",this.mousedown),ie.addEventListener(n,"touchstart",this.touchstart,{passive:!1}),ie.addEventListener(n,"touchcancel",this.reset)}startMouse(t,n){this.mouseRotate.dragStart(t,n),this.mousePitch&&this.mousePitch.dragStart(t,n),ie.disableDrag()}startTouch(t,n){this.touchRotate.dragStart(t,n),this.touchPitch&&this.touchPitch.dragStart(t,n),ie.disableDrag()}moveMouse(t,n){const a=this.map,{bearingDelta:l}=this.mouseRotate.dragMove(t,n)||{};if(l&&a.setBearing(a.getBearing()+l),this.mousePitch){const{pitchDelta:p}=this.mousePitch.dragMove(t,n)||{};p&&a.setPitch(a.getPitch()+p)}}moveTouch(t,n){const a=this.map,{bearingDelta:l}=this.touchRotate.dragMove(t,n)||{};if(l&&a.setBearing(a.getBearing()+l),this.touchPitch){const{pitchDelta:p}=this.touchPitch.dragMove(t,n)||{};p&&a.setPitch(a.getPitch()+p)}}off(){const t=this.element;ie.removeEventListener(t,"mousedown",this.mousedown),ie.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),ie.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),ie.removeEventListener(window,"touchend",this.touchend),ie.removeEventListener(t,"touchcancel",this.reset),this.offTemp()}offTemp(){ie.enableDrag(),ie.removeEventListener(window,"mousemove",this.mousemove),ie.removeEventListener(window,"mouseup",this.mouseup),ie.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),ie.removeEventListener(window,"touchend",this.touchend)}}let Xi;function bs(h,t,n){if(h=new c.LngLat(h.lng,h.lat),t){const a=new c.LngLat(h.lng-360,h.lat),l=new c.LngLat(h.lng+360,h.lat),p=n.locationPoint(h).distSqr(t);n.locationPoint(a).distSqr(t)180;){const a=n.locationPoint(h);if(a.x>=0&&a.y>=0&&a.x<=n.width&&a.y<=n.height)break;h.lng>n.center.lng?h.lng-=360:h.lng+=360}return h}const ws={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function oa(h,t,n){const a=h.classList;for(const l in ws)a.remove(`maplibregl-${n}-anchor-${l}`);a.add(`maplibregl-${n}-anchor-${t}`)}class Ts extends c.Evented{constructor(t){if(super(),this._onKeyPress=n=>{const a=n.code,l=n.charCode||n.keyCode;a!=="Space"&&a!=="Enter"&&l!==32&&l!==13||this.togglePopup()},this._onMapClick=n=>{const a=n.originalEvent.target,l=this._element;this._popup&&(a===l||l.contains(a))&&this.togglePopup()},this._update=n=>{if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=bs(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let a="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?a=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(a=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let l="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?l="rotateX(0deg)":this._pitchAlignment==="map"&&(l=`rotateX(${this._map.getPitch()}deg)`),n&&n.type!=="moveend"||(this._pos=this._pos.round()),ie.setTransform(this._element,`${ws[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${l} ${a}`),this._map.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const p=this._map.unproject(this._pos),m=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=p.distanceTo(this._lngLat)>20*m?"0.2":"1.0",this._opacityTimeout=null},100))},this._onMove=n=>{if(!this._isDragging){const a=this._clickTolerance||this._map._clickTolerance;this._isDragging=n.point.dist(this._pointerdownPos)>=a}this._isDragging&&(this._pos=n.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new c.Event("dragstart"))),this.fire(new c.Event("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new c.Event("dragend")),this._state="inactive"},this._addDragHandler=n=>{this._element.contains(n.originalEvent.target)&&(n.preventDefault(),this._positionDelta=n.point.sub(this._pos).add(this._offset),this._pointerdownPos=n.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&t.pitchAlignment!=="auto"?t.pitchAlignment:this._rotationAlignment,t&&t.element)this._element=t.element,this._offset=c.Point.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=ie.create("div"),this._element.setAttribute("aria-label","Map marker");const n=ie.createNS("http://www.w3.org/2000/svg","svg"),a=41,l=27;n.setAttributeNS(null,"display","block"),n.setAttributeNS(null,"height",`${a}px`),n.setAttributeNS(null,"width",`${l}px`),n.setAttributeNS(null,"viewBox",`0 0 ${l} ${a}`);const p=ie.createNS("http://www.w3.org/2000/svg","g");p.setAttributeNS(null,"stroke","none"),p.setAttributeNS(null,"stroke-width","1"),p.setAttributeNS(null,"fill","none"),p.setAttributeNS(null,"fill-rule","evenodd");const m=ie.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"fill-rule","nonzero");const g=ie.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"transform","translate(3.0, 29.0)"),g.setAttributeNS(null,"fill","#000000");const y=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const G of y){const J=ie.createNS("http://www.w3.org/2000/svg","ellipse");J.setAttributeNS(null,"opacity","0.04"),J.setAttributeNS(null,"cx","10.5"),J.setAttributeNS(null,"cy","5.80029008"),J.setAttributeNS(null,"rx",G.rx),J.setAttributeNS(null,"ry",G.ry),g.appendChild(J)}const v=ie.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"fill",this._color);const b=ie.createNS("http://www.w3.org/2000/svg","path");b.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),v.appendChild(b);const T=ie.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"opacity","0.25"),T.setAttributeNS(null,"fill","#000000");const C=ie.createNS("http://www.w3.org/2000/svg","path");C.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),T.appendChild(C);const L=ie.createNS("http://www.w3.org/2000/svg","g");L.setAttributeNS(null,"transform","translate(6.0, 7.0)"),L.setAttributeNS(null,"fill","#FFFFFF");const D=ie.createNS("http://www.w3.org/2000/svg","g");D.setAttributeNS(null,"transform","translate(8.0, 8.0)");const R=ie.createNS("http://www.w3.org/2000/svg","circle");R.setAttributeNS(null,"fill","#000000"),R.setAttributeNS(null,"opacity","0.25"),R.setAttributeNS(null,"cx","5.5"),R.setAttributeNS(null,"cy","5.5"),R.setAttributeNS(null,"r","5.4999962");const k=ie.createNS("http://www.w3.org/2000/svg","circle");k.setAttributeNS(null,"fill","#FFFFFF"),k.setAttributeNS(null,"cx","5.5"),k.setAttributeNS(null,"cy","5.5"),k.setAttributeNS(null,"r","5.4999962"),D.appendChild(R),D.appendChild(k),m.appendChild(g),m.appendChild(v),m.appendChild(T),m.appendChild(L),m.appendChild(D),n.appendChild(m),n.setAttributeNS(null,"height",a*this._scale+"px"),n.setAttributeNS(null,"width",l*this._scale+"px"),this._element.appendChild(n),this._offset=c.Point.convert(t&&t.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",n=>{n.preventDefault()}),this._element.addEventListener("mousedown",n=>{n.preventDefault()}),oa(this._element,this._anchor,"marker"),t&&t.className)for(const n of t.className.split(" "))this._element.classList.add(n);this._popup=null}addTo(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),ie.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=c.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){const l=Math.abs(13.5)/Math.SQRT2;t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[l,-1*(38.1-13.5+l)],"bottom-right":[-l,-1*(38.1-13.5+l)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}getPopup(){return this._popup}togglePopup(){const t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this}getOffset(){return this._offset}setOffset(t){return this._offset=c.Point.convert(t),this._update(),this}addClassName(t){this._element.classList.add(t)}removeClassName(t){this._element.classList.remove(t)}toggleClassName(t){return this._element.classList.toggle(t)}setDraggable(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(t){return this._rotation=t||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t&&t!=="auto"?t:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const Es={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Bn=0,pn=!1;const Ha={maxWidth:100,unit:"metric"};function la(h,t,n){const a=n&&n.maxWidth||100,l=h._container.clientHeight/2,p=h.unproject([0,l]),m=h.unproject([a,l]),g=p.distanceTo(m);if(n&&n.unit==="imperial"){const y=3.2808*g;y>5280?dn(t,a,y/5280,h._getUIString("ScaleControl.Miles")):dn(t,a,y,h._getUIString("ScaleControl.Feet"))}else n&&n.unit==="nautical"?dn(t,a,g/1852,h._getUIString("ScaleControl.NauticalMiles")):g>=1e3?dn(t,a,g/1e3,h._getUIString("ScaleControl.Kilometers")):dn(t,a,g,h._getUIString("ScaleControl.Meters"))}function dn(h,t,n,a){const l=function(p){const m=Math.pow(10,`${Math.floor(p)}`.length-1);let g=p/m;return g=g>=10?10:g>=5?5:g>=3?3:g>=2?2:g>=1?1:function(y){const v=Math.pow(10,Math.ceil(-Math.log(y)/Math.LN10));return Math.round(y*v)/v}(g),m*g}(n);h.style.width=t*(l/n)+"px",h.innerHTML=`${l} ${a}`}const Ka={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Ya=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function ca(h){if(h){if(typeof h=="number"){const t=Math.round(Math.abs(h)/Math.SQRT2);return{center:new c.Point(0,0),top:new c.Point(0,h),"top-left":new c.Point(t,t),"top-right":new c.Point(-t,t),bottom:new c.Point(0,-h),"bottom-left":new c.Point(t,-t),"bottom-right":new c.Point(-t,-t),left:new c.Point(h,0),right:new c.Point(-h,0)}}if(h instanceof c.Point||Array.isArray(h)){const t=c.Point.convert(h);return{center:t,top:t,"top-left":t,"top-right":t,bottom:t,"bottom-left":t,"bottom-right":t,left:t,right:t}}return{center:c.Point.convert(h.center||[0,0]),top:c.Point.convert(h.top||[0,0]),"top-left":c.Point.convert(h["top-left"]||[0,0]),"top-right":c.Point.convert(h["top-right"]||[0,0]),bottom:c.Point.convert(h.bottom||[0,0]),"bottom-left":c.Point.convert(h["bottom-left"]||[0,0]),"bottom-right":c.Point.convert(h["bottom-right"]||[0,0]),left:c.Point.convert(h.left||[0,0]),right:c.Point.convert(h.right||[0,0])}}return ca(new c.Point(0,0))}const ha={extend:(h,...t)=>c.extend(h,...t),run(h){h()},logToElement(h,t=!1,n="log"){const a=window.document.getElementById(n);a&&(t&&(a.innerHTML=""),a.innerHTML+=`
${h}`)}},Ja=xt;class rt{static get version(){return Ja}static get workerCount(){return di.workerCount}static set workerCount(t){di.workerCount=t}static get maxParallelImageRequests(){return c.config.MAX_PARALLEL_IMAGE_REQUESTS}static set maxParallelImageRequests(t){c.config.MAX_PARALLEL_IMAGE_REQUESTS=t}static get workerUrl(){return c.config.WORKER_URL}static set workerUrl(t){c.config.WORKER_URL=t}static addProtocol(t,n){c.config.REGISTERED_PROTOCOLS[t]=n}static removeProtocol(t){delete c.config.REGISTERED_PROTOCOLS[t]}}return rt.Map=class extends Rl{constructor(h){if(c.PerformanceUtils.mark(c.PerformanceMarkers.create),(h=c.extend({},vs,h)).minZoom!=null&&h.maxZoom!=null&&h.minZoom>h.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(h.minPitch!=null&&h.maxPitch!=null&&h.minPitch>h.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(h.minPitch!=null&&h.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(h.maxPitch!=null&&h.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new ta(h.minZoom,h.maxZoom,h.minPitch,h.maxPitch,h.renderWorldCopies),{bearingSnap:h.bearingSnap}),this._cooperativeGesturesOnWheel=t=>{this._onCooperativeGesture(t,t[this._metaKey],1)},this._contextLost=t=>{t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new c.Event("webglcontextlost",{originalEvent:t}))},this._contextRestored=t=>{this._setupPainter(),this.resize(),this._update(),this.fire(new c.Event("webglcontextrestored",{originalEvent:t}))},this._onMapScroll=t=>{if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=h.interactive,this._cooperativeGestures=h.cooperativeGestures,this._metaKey=navigator.platform.indexOf("Mac")===0?"metaKey":"ctrlKey",this._maxTileCacheSize=h.maxTileCacheSize,this._maxTileCacheZoomLevels=h.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=h.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=h.preserveDrawingBuffer,this._antialias=h.antialias,this._trackResize=h.trackResize,this._bearingSnap=h.bearingSnap,this._refreshExpiredTiles=h.refreshExpiredTiles,this._fadeDuration=h.fadeDuration,this._crossSourceCollisions=h.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=h.collectResourceTiming,this._renderTaskQueue=new Me,this._controls=[],this._mapId=c.uniqueId(),this._locale=c.extend({},Re,h.locale),this._clickTolerance=h.clickTolerance,this._overridePixelRatio=h.pixelRatio,this._maxCanvasSize=h.maxCanvasSize,this.transformCameraUpdate=h.transformCameraUpdate,this._imageQueueHandle=ui.addThrottleControl(()=>this.isMoving()),this._requestManager=new Br(h.transformRequest),typeof h.container=="string"){if(this._container=document.getElementById(h.container),!this._container)throw new Error(`Container '${h.container}' not found.`)}else{if(!(h.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=h.container}if(h.maxBounds&&this.setMaxBounds(h.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let t=!1;const n=qr(a=>{this._trackResize&&!this._removed&&this.resize(a)._update()},50);this._resizeObserver=new ResizeObserver(a=>{t?n(a):t=!0}),this._resizeObserver.observe(this._container)}this.handlers=new jo(this,h),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=h.hash&&new Ro(typeof h.hash=="string"&&h.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:h.center,zoom:h.zoom,bearing:h.bearing,pitch:h.pitch}),h.bounds&&(this.resize(),this.fitBounds(h.bounds,c.extend({},h.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=h.localIdeographFontFamily,this._validateStyle=h.validateStyle,h.style&&this.setStyle(h.style,{localIdeographFontFamily:h.localIdeographFontFamily}),h.attributionControl&&this.addControl(new Ki({customAttribution:h.customAttribution})),h.maplibreLogo&&this.addControl(new xs,h.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",t=>{this._update(t.dataType==="style"),this.fire(new c.Event(`${t.dataType}data`,t))}),this.on("dataloading",t=>{this.fire(new c.Event(`${t.dataType}dataloading`,t))}),this.on("dataabort",t=>{this.fire(new c.Event("sourcedataabort",t))})}_getMapId(){return this._mapId}addControl(h,t){if(t===void 0&&(t=h.getDefaultPosition?h.getDefaultPosition():"top-right"),!h||!h.onAdd)return this.fire(new c.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const n=h.onAdd(this);this._controls.push(h);const a=this._controlPositions[t];return t.indexOf("bottom")!==-1?a.insertBefore(n,a.firstChild):a.appendChild(n),this}removeControl(h){if(!h||!h.onRemove)return this.fire(new c.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const t=this._controls.indexOf(h);return t>-1&&this._controls.splice(t,1),h.onRemove(this),this}hasControl(h){return this._controls.indexOf(h)>-1}calculateCameraOptionsFromTo(h,t,n,a){return a==null&&this.terrain&&(a=this.terrain.getElevationForLngLatZoom(n,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(h,t,n,a)}resize(h){var t;const n=this._containerDimensions(),a=n[0],l=n[1],p=this._getClampedPixelRatio(a,l);if(this._resizeCanvas(a,l,p),this.painter.resize(a,l,p),this.painter.overLimit()){const g=this.painter.context.gl;this._maxCanvasSize=[g.drawingBufferWidth,g.drawingBufferHeight];const y=this._getClampedPixelRatio(a,l);this._resizeCanvas(a,l,y),this.painter.resize(a,l,y)}this.transform.resize(a,l),(t=this._requestedCameraState)===null||t===void 0||t.resize(a,l);const m=!this._moving;return m&&(this.stop(),this.fire(new c.Event("movestart",h)).fire(new c.Event("move",h))),this.fire(new c.Event("resize",h)),m&&this.fire(new c.Event("moveend",h)),this}_getClampedPixelRatio(h,t){const{0:n,1:a}=this._maxCanvasSize,l=this.getPixelRatio(),p=h*l,m=t*l;return Math.min(p>n?n/p:1,m>a?a/m:1)*l}getPixelRatio(){var h;return(h=this._overridePixelRatio)!==null&&h!==void 0?h:devicePixelRatio}setPixelRatio(h){this._overridePixelRatio=h,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(h){return this.transform.setMaxBounds(It.convert(h)),this._update()}setMinZoom(h){if((h=h??-2)>=-2&&h<=this.transform.maxZoom)return this.transform.minZoom=h,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=h,this._update(),this.getZoom()>h&&this.setZoom(h),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(h){if((h=h??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(h>=0&&h<=this.transform.maxPitch)return this.transform.minPitch=h,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(h>=this.transform.minPitch)return this.transform.maxPitch=h,this._update(),this.getPitch()>h&&this.setPitch(h),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(h){return this.transform.renderWorldCopies=h,this._update()}getCooperativeGestures(){return this._cooperativeGestures}setCooperativeGestures(h){return this._cooperativeGestures=h,this._cooperativeGestures?this._setupCooperativeGestures():this._destroyCooperativeGestures(),this}project(h){return this.transform.locationPoint(c.LngLat.convert(h),this.style&&this.terrain)}unproject(h){return this.transform.pointLocation(c.Point.convert(h),this.terrain)}isMoving(){var h;return this._moving||((h=this.handlers)===null||h===void 0?void 0:h.isMoving())}isZooming(){var h;return this._zooming||((h=this.handlers)===null||h===void 0?void 0:h.isZooming())}isRotating(){var h;return this._rotating||((h=this.handlers)===null||h===void 0?void 0:h.isRotating())}_createDelegatedListener(h,t,n){if(h==="mouseenter"||h==="mouseover"){let a=!1;return{layer:t,listener:n,delegates:{mousemove:p=>{const m=this.getLayer(t)?this.queryRenderedFeatures(p.point,{layers:[t]}):[];m.length?a||(a=!0,n.call(this,new Vt(h,this,p.originalEvent,{features:m}))):a=!1},mouseout:()=>{a=!1}}}}if(h==="mouseleave"||h==="mouseout"){let a=!1;return{layer:t,listener:n,delegates:{mousemove:m=>{(this.getLayer(t)?this.queryRenderedFeatures(m.point,{layers:[t]}):[]).length?a=!0:a&&(a=!1,n.call(this,new Vt(h,this,m.originalEvent)))},mouseout:m=>{a&&(a=!1,n.call(this,new Vt(h,this,m.originalEvent)))}}}}{const a=l=>{const p=this.getLayer(t)?this.queryRenderedFeatures(l.point,{layers:[t]}):[];p.length&&(l.features=p,n.call(this,l),delete l.features)};return{layer:t,listener:n,delegates:{[h]:a}}}}on(h,t,n){if(n===void 0)return super.on(h,t);const a=this._createDelegatedListener(h,t,n);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[h]=this._delegatedListeners[h]||[],this._delegatedListeners[h].push(a);for(const l in a.delegates)this.on(l,a.delegates[l]);return this}once(h,t,n){if(n===void 0)return super.once(h,t);const a=this._createDelegatedListener(h,t,n);for(const l in a.delegates)this.once(l,a.delegates[l]);return this}off(h,t,n){return n===void 0?super.off(h,t):(this._delegatedListeners&&this._delegatedListeners[h]&&(a=>{const l=this._delegatedListeners[h];for(let p=0;pthis._updateStyle(h,t));const n=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!h)),h?(this.style=new ni(this,t||{}),this.style.setEventedParent(this,{style:this.style}),typeof h=="string"?this.style.loadURL(h,t,n):this.style.loadJSON(h,t,n),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new ni(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(h,t){if(typeof h=="string"){const n=this._requestManager.transformRequest(h,at.Style);c.getJSON(n,(a,l)=>{a?this.fire(new c.ErrorEvent(a)):l&&this._updateDiff(l,t)})}else typeof h=="object"&&this._updateDiff(h,t)}_updateDiff(h,t){try{this.style.setState(h,t)&&this._update(!0)}catch(n){c.warnOnce(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(h,t)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():c.warnOnce("There is no style added to the map.")}addSource(h,t){return this._lazyInitEmptyStyle(),this.style.addSource(h,t),this._update(!0)}isSourceLoaded(h){const t=this.style&&this.style.sourceCaches[h];if(t!==void 0)return t.loaded();this.fire(new c.ErrorEvent(new Error(`There is no source with ID '${h}'`)))}setTerrain(h){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),h){const t=this.style.sourceCaches[h.source];if(!t)throw new Error(`cannot load terrain, because there exists no source with ID: ${h.source}`);for(const n in this.style._layers){const a=this.style._layers[n];a.type==="hillshade"&&a.source===h.source&&c.warnOnce("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Wa(this.painter,t,h),this.painter.renderToTexture=new fr(this.painter,this.terrain),this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=n=>{n.dataType==="style"?this.terrain.sourceCache.freeRtt():n.dataType==="source"&&n.tile&&(n.sourceId!==h.source||this._elevationFreeze||(this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(n.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform._minEleveationForCurrentTile=0,this.transform.elevation=0;return this.fire(new c.Event("terrain",{terrain:h})),this}getTerrain(){var h,t;return(t=(h=this.terrain)===null||h===void 0?void 0:h.options)!==null&&t!==void 0?t:null}areTilesLoaded(){const h=this.style&&this.style.sourceCaches;for(const t in h){const n=h[t]._tiles;for(const a in n){const l=n[a];if(l.state!=="loaded"&&l.state!=="errored")return!1}}return!0}addSourceType(h,t,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(h,t,n)}removeSource(h){return this.style.removeSource(h),this._update(!0)}getSource(h){return this.style.getSource(h)}addImage(h,t,n={}){const{pixelRatio:a=1,sdf:l=!1,stretchX:p,stretchY:m,content:g}=n;if(this._lazyInitEmptyStyle(),!(t instanceof HTMLImageElement||c.isImageBitmap(t))){if(t.width===void 0||t.height===void 0)return this.fire(new c.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:y,height:v,data:b}=t,T=t;return this.style.addImage(h,{data:new c.RGBAImage({width:y,height:v},new Uint8Array(b)),pixelRatio:a,stretchX:p,stretchY:m,content:g,sdf:l,version:0,userImage:T}),T.onAdd&&T.onAdd(this,h),this}}{const{width:y,height:v,data:b}=c.browser.getImageData(t);this.style.addImage(h,{data:new c.RGBAImage({width:y,height:v},b),pixelRatio:a,stretchX:p,stretchY:m,content:g,sdf:l,version:0})}}updateImage(h,t){const n=this.style.getImage(h);if(!n)return this.fire(new c.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const a=t instanceof HTMLImageElement||c.isImageBitmap(t)?c.browser.getImageData(t):t,{width:l,height:p,data:m}=a;if(l===void 0||p===void 0)return this.fire(new c.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(l!==n.data.width||p!==n.data.height)return this.fire(new c.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));const g=!(t instanceof HTMLImageElement||c.isImageBitmap(t));return n.data.replace(m,g),this.style.updateImage(h,n),this}getImage(h){return this.style.getImage(h)}hasImage(h){return h?!!this.style.getImage(h):(this.fire(new c.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(h){this.style.removeImage(h)}loadImage(h,t){ui.getImage(this._requestManager.transformRequest(h,at.Image),t)}listImages(){return this.style.listImages()}addLayer(h,t){return this._lazyInitEmptyStyle(),this.style.addLayer(h,t),this._update(!0)}moveLayer(h,t){return this.style.moveLayer(h,t),this._update(!0)}removeLayer(h){return this.style.removeLayer(h),this._update(!0)}getLayer(h){return this.style.getLayer(h)}setLayerZoomRange(h,t,n){return this.style.setLayerZoomRange(h,t,n),this._update(!0)}setFilter(h,t,n={}){return this.style.setFilter(h,t,n),this._update(!0)}getFilter(h){return this.style.getFilter(h)}setPaintProperty(h,t,n,a={}){return this.style.setPaintProperty(h,t,n,a),this._update(!0)}getPaintProperty(h,t){return this.style.getPaintProperty(h,t)}setLayoutProperty(h,t,n,a={}){return this.style.setLayoutProperty(h,t,n,a),this._update(!0)}getLayoutProperty(h,t){return this.style.getLayoutProperty(h,t)}setGlyphs(h,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(h,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(h,t,n={}){return this._lazyInitEmptyStyle(),this.style.addSprite(h,t,n,a=>{a||this._update(!0)}),this}removeSprite(h){return this._lazyInitEmptyStyle(),this.style.removeSprite(h),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(h,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(h,t,n=>{n||this._update(!0)}),this}setLight(h,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(h,t),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(h,t){return this.style.setFeatureState(h,t),this._update()}removeFeatureState(h,t){return this.style.removeFeatureState(h,t),this._update()}getFeatureState(h){return this.style.getFeatureState(h)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let h=0,t=0;return this._container&&(h=this._container.clientWidth||400,t=this._container.clientHeight||300),[h,t]}_setupContainer(){const h=this._container;h.classList.add("maplibregl-map");const t=this._canvasContainer=ie.create("div","maplibregl-canvas-container",h);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=ie.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const n=this._containerDimensions(),a=this._getClampedPixelRatio(n[0],n[1]);this._resizeCanvas(n[0],n[1],a);const l=this._controlContainer=ie.create("div","maplibregl-control-container",h),p=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(m=>{p[m]=ie.create("div",`maplibregl-ctrl-${m} `,l)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){this._cooperativeGesturesScreen=ie.create("div","maplibregl-cooperative-gesture-screen",this._container);let h=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(h=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use ⌘ + scroll to zoom the map"),this._cooperativeGesturesScreen.innerHTML=` +
${h}
+
${typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}
+ `,this._cooperativeGesturesScreen.setAttribute("aria-hidden","true"),this._canvasContainer.addEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.add("maplibregl-cooperative-gestures")}_destroyCooperativeGestures(){ie.remove(this._cooperativeGesturesScreen),this._canvasContainer.removeEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.remove("maplibregl-cooperative-gestures")}_resizeCanvas(h,t,n){this._canvas.width=Math.floor(n*h),this._canvas.height=Math.floor(n*t),this._canvas.style.width=`${h}px`,this._canvas.style.height=`${t}px`}_setupPainter(){const h={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let t=null;this._canvas.addEventListener("webglcontextcreationerror",a=>{t={requestedAttributes:h},a&&(t.statusMessage=a.statusMessage,t.type=a.type)},{once:!0});const n=this._canvas.getContext("webgl2",h)||this._canvas.getContext("webgl",h);if(!n){const a="Failed to initialize WebGL";throw t?(t.message=a,new Error(JSON.stringify(t))):new Error(a)}this.painter=new Bo(n,this.transform),Yt.testSupport(n)}_onCooperativeGesture(h,t,n){return!t&&n<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout(()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")},100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(h){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||h,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(h){return this._update(),this._renderTaskQueue.add(h)}_cancelRenderFrame(h){this._renderTaskQueue.remove(h)}_render(h){const t=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(h),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const l=this.transform.zoom,p=c.browser.now();this.style.zoomHistory.update(l,p);const m=new c.EvaluationParameters(l,{now:p,fadeDuration:t,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),g=m.crossFadingFactor();g===1&&g===this._crossFadingFactor||(n=!0,this._crossFadingFactor=g),this.style.update(m)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform._minEleveationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,t,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:t,showPadding:this.showPadding}),this.fire(new c.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,c.PerformanceUtils.mark(c.PerformanceMarkers.load),this.fire(new c.Event("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const a=this._sourcesDirty||this._styleDirty||this._placementDirty;return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new c.Event("idle")),!this._loaded||this._fullyLoaded||a||(this._fullyLoaded=!0,c.PerformanceUtils.mark(c.PerformanceMarkers.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){var h;this._hash&&this._hash.remove();for(const n of this._controls)n.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),ui.removeThrottleControl(this._imageQueueHandle),(h=this._resizeObserver)===null||h===void 0||h.disconnect();const t=this.painter.context.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),ie.remove(this._canvasContainer),ie.remove(this._controlContainer),this._cooperativeGestures&&this._destroyCooperativeGestures(),this._container.classList.remove("maplibregl-map"),c.PerformanceUtils.clearMetrics(),this._removed=!0,this.fire(new c.Event("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=c.browser.frame(h=>{c.PerformanceUtils.frame(h),this._frame=null,this._render(h)}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(h){this._showTileBoundaries!==h&&(this._showTileBoundaries=h,this._update())}get showPadding(){return!!this._showPadding}set showPadding(h){this._showPadding!==h&&(this._showPadding=h,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(h){this._showCollisionBoxes!==h&&(this._showCollisionBoxes=h,h?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(h){this._showOverdrawInspector!==h&&(this._showOverdrawInspector=h,this._update())}get repaint(){return!!this._repaint}set repaint(h){this._repaint!==h&&(this._repaint=h,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(h){this._vertices=h,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},rt.NavigationControl=class{constructor(h){this._updateZoomButtons=()=>{const t=this._map.getZoom(),n=t===this._map.getMaxZoom(),a=t===this._map.getMinZoom();this._zoomInButton.disabled=n,this._zoomOutButton.disabled=a,this._zoomInButton.setAttribute("aria-disabled",n.toString()),this._zoomOutButton.setAttribute("aria-disabled",a.toString())},this._rotateCompassArrow=()=>{const t=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=t},this._setButtonTitle=(t,n)=>{const a=this._map._getUIString(`NavigationControl.${n}`);t.title=a,t.setAttribute("aria-label",a)},this.options=c.extend({},Rt,h),this._container=ie.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",t=>this._map.zoomIn({},{originalEvent:t})),ie.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",t=>this._map.zoomOut({},{originalEvent:t})),ie.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})}),this._compassIcon=ie.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(h){return this._map=h,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Go(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){ie.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(h,t){const n=ie.create("button",h,this._container);return n.type="button",n.addEventListener("click",t),n}},rt.GeolocateControl=class extends c.Evented{constructor(h){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new c.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(t),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new c.Event("geolocate",t)),this._finish()}},this._updateCamera=t=>{const n=new c.LngLat(t.coords.longitude,t.coords.latitude),a=t.coords.accuracy,l=this._map.getBearing(),p=c.extend({bearing:l},this.options.fitBoundsOptions),m=It.fromLngLat(n,a);this._map.fitBounds(m,p,{geolocateSource:!0})},this._updateMarker=t=>{if(t){const n=new c.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=t=>{if(this._map){if(this.options.trackUserLocation)if(t.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(t.code===3&&pn)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new c.Event("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=t=>{if(this._map){if(this._container.addEventListener("contextmenu",n=>n.preventDefault()),this._geolocateButton=ie.create("button","maplibregl-ctrl-geolocate",this._container),ie.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",t===!1){c.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{const n=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=ie.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ts({element:this._dotElement}),this._circleElement=ie.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ts({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",n=>{n.geolocateSource||this._watchState!=="ACTIVE_LOCK"||n.originalEvent&&n.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new c.Event("trackuserlocationend")))})}},this.options=c.extend({},Es,h)}onAdd(h){return this._map=h,this._container=ie.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(t,n=!1){Xi===void 0||n?window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(a=>{Xi=a.state!=="denied",t(Xi)}).catch(()=>{Xi=!!window.navigator.geolocation,t(Xi)}):(Xi=!!window.navigator.geolocation,t(Xi)):t(Xi)}(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),ie.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Bn=0,pn=!1}_isOutOfMapMaxBounds(h){const t=this._map.getMaxBounds(),n=h.coords;return t&&(n.longitudet.getEast()||n.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const h=this._map.getBounds(),t=h.getSouthEast(),n=h.getNorthEast(),a=t.distanceTo(n),l=Math.ceil(this._accuracy/(a/this._map._container.clientHeight)*2);this._circleElement.style.width=`${l}px`,this._circleElement.style.height=`${l}px`}trigger(){if(!this._setup)return c.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new c.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Bn--,pn=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new c.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new c.Event("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let h;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Bn++,Bn>1?(h={maximumAge:6e5,timeout:0},pn=!0):(h=this.options.positionOptions,pn=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,h)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},rt.AttributionControl=Ki,rt.LogoControl=xs,rt.ScaleControl=class{constructor(h){this._onMove=()=>{la(this._map,this._container,this.options)},this.setUnit=t=>{this.options.unit=t,la(this._map,this._container,this.options)},this.options=c.extend({},Ha,h)}getDefaultPosition(){return"bottom-left"}onAdd(h){return this._map=h,this._container=ie.create("div","maplibregl-ctrl maplibregl-ctrl-scale",h.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){ie.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},rt.FullscreenControl=class extends c.Evented{constructor(h={}){super(),this._onFullscreenChange=()=>{(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,h&&h.container&&(h.container instanceof HTMLElement?this._container=h.container:c.warnOnce("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=ie.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){ie.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const h=this._fullscreenButton=ie.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);ie.create("span","maplibregl-ctrl-icon",h).setAttribute("aria-hidden","true"),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.title=h}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new c.Event("fullscreenstart")),this._map._cooperativeGestures&&(this._prevCooperativeGestures=this._map._cooperativeGestures,this._map.setCooperativeGestures())):(this.fire(new c.Event("fullscreenend")),this._prevCooperativeGestures&&(this._map.setCooperativeGestures(this._prevCooperativeGestures),delete this._prevCooperativeGestures))}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},rt.TerrainControl=class{constructor(h){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))},this.options=h}onAdd(h){return this._map=h,this._container=ie.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=ie.create("button","maplibregl-ctrl-terrain",this._container),ie.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){ie.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},rt.Popup=class extends c.Evented{constructor(h){super(),this.remove=()=>(this._content&&ie.remove(this._content),this._container&&(ie.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new c.Event("close")),this),this._onMouseUp=t=>{this._update(t.point)},this._onMouseMove=t=>{this._update(t.point)},this._onDrag=t=>{this._update(t.point)},this._update=t=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=ie.create("div","maplibregl-popup",this._map.getContainer()),this._tip=ie.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const m of this.options.className.split(" "))this._container.classList.add(m);this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=bs(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!t)return;const n=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat);let a=this.options.anchor;const l=ca(this.options.offset);if(!a){const m=this._container.offsetWidth,g=this._container.offsetHeight;let y;y=n.y+l.bottom.ythis._map.transform.height-g?["bottom"]:[],n.xthis._map.transform.width-m/2&&y.push("right"),a=y.length===0?"bottom":y.join("-")}const p=n.add(l[a]).round();ie.setTransform(this._container,`${ws[a]} translate(${p.x}px,${p.y}px)`),oa(this._container,a,"popup")},this._onClose=()=>{this.remove()},this.options=c.extend(Object.create(Ka),h)}addTo(h){return this._map&&this.remove(),this._map=h,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new c.Event("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(h){return this._lngLat=c.LngLat.convert(h),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(h){return this.setDOMContent(document.createTextNode(h))}setHTML(h){const t=document.createDocumentFragment(),n=document.createElement("body");let a;for(n.innerHTML=h;a=n.firstChild,a;)t.appendChild(a);return this.setDOMContent(t)}getMaxWidth(){var h;return(h=this._container)===null||h===void 0?void 0:h.style.maxWidth}setMaxWidth(h){return this.options.maxWidth=h,this._update(),this}setDOMContent(h){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=ie.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(h),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(h){this._container&&this._container.classList.add(h)}removeClassName(h){this._container&&this._container.classList.remove(h)}setOffset(h){return this.options.offset=h,this._update(),this}toggleClassName(h){if(this._container)return this._container.classList.toggle(h)}_createCloseButton(){this.options.closeButton&&(this._closeButton=ie.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const h=this._container.querySelector(Ya);h&&h.focus()}},rt.Marker=Ts,rt.Style=ni,rt.LngLat=c.LngLat,rt.LngLatBounds=It,rt.Point=c.Point,rt.MercatorCoordinate=c.MercatorCoordinate,rt.Evented=c.Evented,rt.AJAXError=c.AJAXError,rt.config=c.config,rt.CanvasSource=re,rt.GeoJSONSource=vr,rt.ImageSource=lr,rt.RasterDEMTileSource=Tn,rt.RasterTileSource=Qr,rt.VectorTileSource=Xn,rt.VideoSource=Fr,rt.setRTLTextPlugin=c.setRTLTextPlugin,rt.getRTLTextPluginStatus=c.getRTLTextPluginStatus,rt.prewarm=function(){Or().acquire(me)},rt.clearPrewarmedResources=function(){const h=wr;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(me),wr=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},ha.extend(rt,{isSafari:c.isSafari,getPerformanceMetrics:c.PerformanceUtils.getPerformanceMetrics}),rt});var rr=ct;return rr})})(au);var sd=au.exports;const lu=nd(sd);function ad(et,Ye,He){He===void 0&&(He={});var Je={type:"Feature"};return(He.id===0||He.id)&&(Je.id=He.id),He.bbox&&(Je.bbox=He.bbox),Je.properties=Ye||{},Je.geometry=et,Je}function fl(et,Ye,He){if(He===void 0&&(He={}),!et)throw new Error("coordinates is required");if(!Array.isArray(et))throw new Error("coordinates must be an Array");if(et.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!su(et[0])||!su(et[1]))throw new Error("coordinates must contain numbers");var Je={type:"Point",coordinates:et};return ad(Je,Ye,He)}function od(et,Ye){Ye===void 0&&(Ye={});var He={type:"FeatureCollection"};return Ye.id&&(He.id=Ye.id),Ye.bbox&&(He.bbox=Ye.bbox),He.features=et,He}function su(et){return!isNaN(et)&&et!==null&&!Array.isArray(et)}function cu(et,Ye,He){if(et!==null)for(var Je,ct,Ht,rr,c,xt,ie,Yt=0,Pe=0,Fi,nr=et.type,Dr=nr==="FeatureCollection",Lr=nr==="Feature",ui=Dr?et.features.length:1,at=0;atHe[0]&&(Ye[0]=He[0]),Ye[1]>He[1]&&(Ye[1]=He[1]),Ye[2]MIERUNE, under CC BY. Data by OpenStreetMap contributors, under ODbL."}},layers:[{id:"MIERUNEMAP",type:"raster",source:"MIERUNEMAP",minzoom:0,maxzoom:18}]},center:[139.767,35.681],zoom:11});wa.addControl(new lu.NavigationControl({visualizePitch:!0}));wa.on("load",function(){const et=od([fl([139.7594,35.6865]),fl([139.7692,35.6665]),fl([139.7812,35.6849])]);wa.addSource("FeaturesPoint",{type:"geojson",data:et}),wa.addLayer({id:"FeaturesPoint",type:"circle",source:"FeaturesPoint",layout:{},paint:{"circle-pitch-alignment":"map","circle-stroke-color":"#1253A4","circle-stroke-width":5,"circle-stroke-opacity":.8,"circle-color":"#1253A4","circle-radius":5,"circle-opacity":.5}});const Ye=ld(et);wa.addSource("CenterPoint",{type:"geojson",data:Ye}),wa.addLayer({id:"CenterPoint",type:"circle",source:"CenterPoint",layout:{},paint:{"circle-pitch-alignment":"map","circle-stroke-color":"#8DCF3F","circle-stroke-width":10,"circle-stroke-opacity":.8,"circle-color":"#8DCF3F","circle-radius":10,"circle-opacity":.5}})}); diff --git a/docs/index.html b/docs/index.html index a54f0e0..e276c3a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,8 +5,8 @@ Turf.js Starter - - + +
diff --git a/img/README02.png b/img/README02.png index 78dfe6aae80ad3e64d6c92664dddc2c40631df56..539cd57d34256821921568cb49dfb7c0b6d8bdc7 100644 GIT binary patch literal 50701 zcmeFZWmuiN)-H^-xVyW%6ebSEy|~Ln3KWNlySr;CQrz9$9g4d{ad)R5U3=}l*Spqx zuJ70RcbM0l$&+Lx8OfcIF-Gzb`bk~_5e^Ry3=9lWN>Wq_3=FdGEj|eI{_VF*RD}60 zfHD=969xmTiiUp%zI%HnF_Ki00|RrT0t53200Vn`OY+$V19M~n13NST1LH{n1H-mW zYgXiY%SbZOkoqhq2S)c6hXH#Bjs^z#76X6#fPv$I{jTjT1||)T|DU)LI4c;$TN>)y zS1Z^Y4C>D^mT%$jD8uice}~S_&P?Xk77j*0TN5T5d(*c($nW6)ZR0z{zv&_SzC->y z4mS9^rd-x|^|t`lR#MXe42+5V_ZQqHPtfVD4j6M44UmSMERT_m6%)|d#?XYx#me?K z6&Rlj&s)^W1Oy~;v9h#w;Bnz6`=bQUTl{x2Ga1PrML-t(WEygxNJMPxO-MMISeRJI z1mH+WNcilHKl3PwivLOe_QX$S1_IggFf;#V$C>>%Bh0Ma+}zA8Y|LzIjBh0v9bBzJ zKo>@92l9Va^6z>?O&pBu&22&EHr6D+>jfIxID+`e$bL8UpTB?g)5OL6zb#oi{K?iE zgUr8km|2-vnEy92koo8T1KIDK|0CJk82yK>|IwHW(Dq+Me+fP16-H_8Rza&oc) z!N7#Tq(p^PT)>Y#p?wJY5}h1Vzv`MK#K@wMU4Gwc?eFL8g7OVPlZJxLsx{AVIr^n1H(yxLKs|mMm8(8w z>8ReOzFCry@p!0;;zvl{3Bv*r0rvlb|La2#8RFyN{lm8D%MYeVjrt6l_(}9o`_%t+ z=p!S265tuC9)`LMYY3Pby#3C{UIJpEVMHQO^J7u0ABn1f+jkK|@Y9jH@k`PJxs9C9 z8sAV2pm4y&ef|>o21y7FV`-PZn5D!RDr`PM!_gLOuxsMbUXU`{nnQjC)u!uqurfh*1w~z^ESdKVVbeZ zZGuL_gW9JnYQR*mN=p`%tma$gPa5Hfai}56%aXFr^Z-dAuTZd~XtKU8e$B9!XSt6W z{o}PGGdS&CQykW7%uo9JqIJ72!@g5 zrlu7*#$n{chQjHcM_GV6iig!WYN0M|hZL0_vkJPIAB!^}Ydm57$te*~XOcoECfbz3 zu!R_7IBxMF0!wM7oG^atq}jE}{vS}7*oPTx5c2u9+;8x5s&V|-N<6slYd99f->G{S zpz2a7>GORG^ttVQ3XB!+m@kz*{-bDF8->KhYIhDW^-c*;PFo?bg)~+5SXHvBpCLbkV64(S zm`YR9w~0hW2QNlP>r zWAFv@Qs;_4x#Gm5P|)EhB;=nKTUPWbzqKs8fs=oTvRf)2r&`m}#M$lP@)-Ny> z@TOw~S%*^s`0z8Am<_3g6I^_t)dIYz3wF$U0?&3b4E4!tY1BsuyU271LaN%q__?bu z-T1c-qRCrB@9e{lrZNFjGQchzDbh=fk++&VP_(JYH?uS$5H6)8NKha0qIn=_Nyb1Ri#(6ape2+SHO6>9K_(fg^iCwvq-eQCn_S}{V7wtT|)2Gn}G$2P0NK01~Jt<80XQy zmcZI@hlz#-dSFnq1v)TGIDAV4Dz%Pr5@M(QMS}fnX59$D6;8=VM`5$u;B{gpOQ|Z) zjfR*LX~-maxHZF=ySeB|D-%=}W{YJ^(Vg8E9%KYi<(=F+J}b4hHL%P_|D(QQ36klc zoVdz~B!-?<7&{8tSp8vX^gXlsR0MyIIcb9&sbqJ327UO@M#H9kn|2jz`(=NEH{P=_ zn~?s&`-BJ#2(eeQo1|)iLk4x2WpkE-E6$O1t4I`nUr|SDRZ?$rSMl@LZ9Em`Af2D29lSnq2WoDA1`MNCMTgyvnmE@s5o)gqYJ;GUP{FN!{1~*xcGMo z6r5bnh2o?TwGs){11nv1FS3YUBnOOmFRc^|3yKBPe+bBG6u>2JQ}Rv-Yd0!!0bkXZ ztIt)Nq2@u_NtgB1P)a)AC)(t+99iAS)}cx_&3|!M-RaNmTjDKtTzhc$nq%cuzIVe( za<6!Oo$cqHO-h!ss~fB$`Wq}O{Yh<~;q3vRQT5-;JHZvN>F2()Qf=j&Wmpq<)qLRW zPJ&TrHC!-kN=H5Wb(Yn?djggXUW_!0Hu>d-W?FByZ^m4|))4YA#dXVbKJ02d@y9N> zVeMI{E`#zhIik0|NXm9D^8ju;jtNeX)nfKZ^7`fL_~q!?SW|yt$_zX0Y0K?S+J8mF zAN!-P)q7w6jQBBw&IaC>-YPxlu=G{>;rF3K=F5{z5TI$XsLIazr?Tvz?jg~l9%gG3TE>2vKIAP5 zvU3KZ(76ufHd2T({8KUOL9`2tMH^^dNX9W1i{D}p?&=@qiMYqSm-eoNo`ExCPtRM zK5MA4p%V7$!%%UITcqrV)jy?0G&1O}wH(ff@}+8o{UVzv&T$GcSXUv*g6Wq*eRA~K zSE1P@C`tq)-mp9Pp9=B}DmZOi*e02joKgZY8BKz=URpafE*bN^PlIJ*mIZ05aNK}F z*bNTKjuC69`hBfQGP6Ke*w4HCU&8JFw2KuarzQbR4h57uPl{W;)wT!F0M2d6>fM3w!Viz$Kf z#%i&895npsOi{j5;|QCj74Q#vCdSiqY>Cc&Nn4k;hP3}fBLo*W7!dEo_VyP$qYu+Z zbtUC6^ngTckq>U%=YH0Zq5k>FwjhDRaEX7=;UDfP0YSy5I4`I}FzbX5?Q3k0!XbB=RT zm^w5#>rN<~P&2sn+~zcT&hLE9ou&IRTQ-_-%$MI2VRj?@8iJ4|Mma-Z=xpLdTGHj0 zC|-N8!@x+&t8ESpG^WX5_(8JeJtm#>>rKi$XjD=BUCL~e8HDq`AhBX&t*%mx`u@C> zl(}w)3Y}~g{e1115pA35R~AQ#E3F@bF?fk{Y|Z~3YX7Pc%bGeQhLRJ(t`Az@{ZqRy z$6B{(Q8ewsD^`_Z=jW=|$3^i^hIEea$`Rw+0=W%Z^ps`emvpzejn0zQ#bPxpg|wL4 z8%+vcU!Kkmn+^3j-aC0E#n;0eKc}IRBlO_KNTM9{J?c}4{7kOAtkh1j7jD6{FpBdp z{<7bCI}cn!j$@!O+5+0LU!s#6t;o_PHd;kt$k0YwWSZfd!GcY@UZw?A1ykC00Q>#6?7wp5AfD}lthCU`M^SwNCAk9Mah zN_{@0Y)mQZmu<(&#?4QNeM`&sF<@Ws-6rzbJ*7kdTxM4#9deMWD}*Mz`D5LIp;1My z#`;$bo3Uo~cF3yv@6TugG!X$jJfqfKKyl+;Mpgmfc)w`QK!!zUJb&c^vat0Oy0?z>7u;XU^x)A_TfUJ5w z>E$4uAID@K*-l^J8Ld)-Q5rEe))cjFI;T@9)`F+o+6w+C7ww{S8l43toF^%7MV&)w z?eUO?r)T5&^Ee(!56u9~h|}Zre$1CUuu6tUFz8L|_mCfzJOU_Rhz+&+*!G{_Mc%2X zt3O#Jd)Q4pwim+h4gFU{@e)BOXS8VCsW`O`J4Cu;`X(c{XG=WY4G54ualiB_S7s6w zmiAp6Z|ATvZY5Lt=VEk)N(Bqe{4B_gmw8N36rHBF7K%srB6 z#-NI`;16>%##Bky?|W%EqtM{cOHja-peR8K*>stoG`MgH)kW0`M4EdMLujTyJOG%& zqS|zW*~+?t8HOuBCcWSE7hmx1dKI}=DPb3ZF^OYV`Alsa#q3pKf z?~K}*g%l}p47v~MX9eo8Hxu_v#jbkD*g)FVFJXhAY2=|p0JL%^JFfR>+QZx|hFXzD zNesEay0 ziGu;gEeF9{gZ24CL=Pmr#sq}m)q)TK-0nIUKlNXYzwCzRSl2UVCQ+26DphOi(oQw0 zvb`2-y?nVT!~p7!vU=OB`ev6whAZ3Y#gVn9?tiTP#H++cxm_D^>ksN_+?y&A4N52+ z^Sj>Xqb{ZNA|)OBMpKM8&yssz+;{L&DYb|!WTfCkP%`B3QXFE-P2yrrB@t&e@W25Q zI7xk7vCwWi%DunuhcAd+P?G0i==m@7{}3F zxka2Ee+`UmwOLg~wjvTZ3mqLNnAWnSF8%70PaFTk;DJTc#eHqE*{JSzfn}h}%_Gnp z$@B7Xpyjn{&taF~Z@RFr6}s;_@n=3{Hjns&fDk#MfRKFvMHrKeJt)}|>cK1T&6Plh3e7t@FAkoUGgp`_PqwCN^pf~>@7s)!W z)Jv1)kX;X+e%oZ2>5;~AcCy_-nQT=zF>B5;=wlzfs`8m~(UGF3kq5Awqo${Ufgl=! zqtNwr7Aeaw#J)A2cEq*8w;z~*9i@PugmbX^$vOJv2u@MmyIR@P&b`Q{3^S3r^m<>{ zsdHUkJq~ng09VXG+kA$p{l4Zgn`_kw$$k==k%5&217DADUx?E0TvGGZYyRn=L4iP4 zU{~`!e@3>_5)&2YCQ}2U-ZRB-`z0y!{LozR)NX+?wV^QgKEb z1xjqc^{=dy)oBU5qDZvG=XN>u81Hz>cJ0@vDaV?BTOY-yJ3`KuyKdCLUr_EMT+kG? zNjx*U$)&T#b@dEaVAHJL-Zxw2%10Tn)PsLpK$hDuAjc5==USH`xO_#6xcI9Nuzu@| z5r^`d6e3IvIcK!;-XM*c`HNg)oxMxAq1`R%At8w)dZjda63X`lu%J##U&a7j_m!>fOcE6_ zOnInIDORmsBd3NZ{Z$YJxR|}^DxfFF9zv<0ZIw$5te-hsWNdWu!RCU4Nn`|r2q&?;tc@M!Z9>jGp~;w6_PCdIWtI#cx1iGcvUS~PuVdb)Dbs}Prmqm7@`fvRtD5wbU!%P&u zx(Oz(5o09u*W3!Qi7{NR{Fyk<_@fl?OL7mDu%YaJTfW61 z#bi0TNBYqhCNWhgaCyGQG`;zzbL6VGSSoCk3c-&9n>)?Om1i zWR8>E!k&Krq$4-)w)4T>aYT_{44A5mr(_itiAI$rJ>FXbEP?CxkBbcZ2-CG~5zgaj zMsatT7+Wy^vU7a(gbg+o`}KbvAYUTU)3%2a79~zYg<4-%Xw4v_7n-HDtFtXqwB+S@ z(faAbGZNo8JjT%DNw~(yZp7zl$Ymm3GVP;2l+N9RmNPH$28VtCgh?r+=Wp!+(Yv#> zbs{WTaRbf46!nO*K=zHnZ&swndKao}Iki3u;}z#{jb8bH)CJ407~%z3Q#BslYC(+( zo*NAwW7hXYmLJ!hUMn&Z2GX1ZF4Uq;<{)9e)jOix&I;%@e`WRo2vi$yM%?hn$YoL= zaD^Mmvb$Dg9=O1fyKxx-T@Y=G1uBrR4e%wve%?-~)ZFZVCWL9!2=TuqG+J4A5WjxX zdEZ2M*_2rAS%`9bAWsKOKfHc0JhV3mZy6#~zF+7+DpaE-w3Oqj0E&i?Zd} zw;Kf<#w$Nc-NWuw89{js2uIHJswiT_?8=9E9iqJD@f2Vb+?_Vzbz`8Dg`{npr^kN3ppHHMcDM(A8-|xjOUL04tl+`>LPv2W`OoM8 zH&+bByo9U=&B??BVkvi&30ARVhWgBLPn7*YgtvBOQ(3k9Z(kO@t&WAFV##mZb#g zyKgu;X+hEW4G5$YZ$uq6LgDm_YARiQyw;tAae66OO+xaTG>?TTjpgW7J9*7*cz{3E zl$m;MjrAI*GK}0KdafK_WF;UiB;3@k2`BA;_&|6mAigHtCr*;eL$hZ5G+JPj4Z)Zs zRT1(S-03@bLZPLjL62jk%DJSEQ6B=cP;eR&e3Zc;NCg zKb7!KVyolh)1M}i>yq%OgtD;GVL>a(MI;dK?;HdhOUE&#Gbe&GF`rEE$9}B#SmN*v z2Mtr!?F=jKD$ZLplRVviHW8|wz%v%iEj7pEAaqQyUlQ$@;b8@J@{)Ag_<}KGlD}^w zef;1}qZArR(y4(?MJma7(DU(N8xP<4gn#!}?|QPAZmGrqCTu<%?wAEM&MaNS z%%i#k&4e(ar!Ov0@b(nAUtYEK+D{Uq@vb z$7Xjjn*`KrG=!YZ0VJ~w8;%hw0!a`4Jiv}oWlO*`lbt#pjN4*}lrZR=lWb6$7itdr zimH6~@Q!o&vC8ZShxCzhp8n`;u&biSTN#0{5kYP9F3_s3OGjStLe#BGIuvHQRY!2P z?H1;Ch2maIxm?cCeRq>csBpWs!Y(?#&HyJ+4n$bEnzzbct{@p5V`z?xy~VfH#WB{X zCNT$;?Fw>S@I)ecIeMpjG7$4wQ^7dgH>Wp{g#L7=!z{6Zv*om*GVq$9nqb~Yy5XDf zWj^cGutf8&=TYO&lDfG%>KlGu{&(wpUQNvGrG1r!r;|H*<3jC%XG5*-%t!D34cJ5JtjS zVq{BV*vtzSJy3Zq*AwKqoptSDs79;))an;DQC$pEH-C5t)f>d^Zf;0RiGg4eSxCD- zY$Ygr0g$r77|g#m0vK~%(Ab*T%pPJYhVyPv%Z=?aS$J6cTzG3SdWw173b1>*^3$n! zru>D&=KbDqd!#vphM|ZCD?ZXF7a$2N7!oKQpr4n;Brf{~Gs+_7bKYA(WFGgmbyM+2jwHK_F}=)7 z%XEYzwyeYJD#q&tNiVa}s+|dJuVj4RqSS)F)p8>XRdbhL1SI10kc~|>7X0?JXZyp( z;Cp(@zP`mcuR9vqOhKiot;EjQ4+PfF)ahqYQ@~?(hzKDQ7@g(R_KE7!zM)(PrYJ$2 z$jBZvoKg<+Ry418bIo81v>$RqQP+_342KJC)iau@|MIvPxQlI^dUL!&ML8CT>7M$K zDC%AfqQ&MnHj>E3n_MR9%pe~m$4x%;=H-AKmxNPQ0&LbOyn7zeo0Ji1shh$6>UOwnK<(UESqKW`5Ynh)1|-{4 zo40@~px&!wHJxkrp=SS#Ah>7&*$Dd}75$oRW_T;X0&8g1LcVkljm1OcR7UNtGJaSq z4JZEK@bNRiL%SuPu;5~<4NCd;B#knS&X<|_edFVDyX!{18Z{F$`2-Bi1nvlqW%GLz zT+zMJX(19xyS3oYtH!oJ^~e$dSk-rWcM$}WFeZC!f8JiX=7(5-+ouN9xDZ;+h#J$J ziUiOy>BO(FgoedWKQ1AU?6aI;hldZtEU2M6Y-)TGpUgX$7$zf7 z?l5bDPr^k_F>JHH*{sCyRx6{N14yvWZUQ@U5#l6hz1=3u#G|c|bkvpjDpYSJf)7*< zIcB#oTyu)H%kR>!qNQg%RW`cEafm^%PbC@_&n{(HM#M={)H@L@V!QWRhb!^T%JLm` zxXekRqJAyhmaTz}SN-E2wxEVaD~j)BM(43XKsk8r&>FGijUia{ zh4%9Xw!{^p8 zOWo9GnoKy$Vb-fRljVWzdsV?K%-fNCMM$GTkk9(!~O&oFGqIM+O5Qo#82K~ z1V>xp)#5JHBw;kfTPid+#~CU&KLO?T60{2Br|}GBzrJRMyZNA4urT-kaA8a5hPOyu z&wl=5$038Q+v%<3Z6Q?{4C3XtpvWj`+bX^Dt#iTdIpr$|u0C5dE~r=9)?FEsPD?JS zvdO8J(_?)ILN!By($dN`Z|rv_82Cab7t(;mjt&Q59zJ$~32Jg~8C$nS z*auXK4g%~XWPKZj=1R1VhDVrVz>BNKtRkyWyoKP(u5AI2GJ!Dm;6&Z4=ypgh1e+H2 zLk_!5|JEsylOtsx4gugty}2LMY(3AOL9#h>ylX#h!hOY|5{>>*_jaoKSnbGdnBC5*jrUy1h1b4U|FFxbms%Htn?Sey79RMFCR zz!TRx2k!x`W+*%O@^Z+!g{)Od{c`x#AXkNPfgC?kfCEiul2PuP6Msby=32)Ofd#V) z$tLN|@TikJ6b4df9@x}*#q=Db41$5RAq+huqF>~F!VAVF20ICL3$hXYF8xjK0`XW4 zA0cE?0m*>oB!J4?@uaf7`l9725!|lK8?!WiLh7b&I9{3Js)m$5D51p|vKD!r$FcwP z67cdt6zTTydx`Uj%^Aw+$UKC}f^#z#3?-6PiDsX}1|PUXXzK@iddl%=DLi2m2=YWc zQ^9NF1%`gfvKZ$0ffp^-n~sDG4dUP_r!T-sZ^%>l&fS1`i6DO#AUJm;6| zzU5nFiWrU7(wZ^<82Cl2;k-F^D>l53hG72#7G`0yEvMSH%y@^*X{?-rTDl}=SUxk; zxbceI7l#VE>!O<~+u2S=hg7UoLLA3nPDddEMaL91HPY8NNVAn^Qme27GgN#;A|Gq0 zlMG6Xo3r&>E-u%SNkd^a957$cLHDl)1XV>?kQckjQw8u2(LoD>2OU0K);m~B@ev2y zHmY+eF^KLer}*(T(~UqB7nSyEY|vY62N6{`QuxD1$+t%Yx%6g>R2GA3gE5JMg0v+X z_L|_K4J#I4aja;x*d0A$cOs-=jGPp^#6x>iC2Hp=yR%s(UKqoe(~7XFVAd?@iHML) zpqfcHw7q!W(<~Qjs`)L-yJUVNc9cng{L^9VWCmp|Fy`{nWs8U>J5&-iwvca16!?f9 zIejPWk)cN;?+n|LNBCw68;9kJkTny~R$~OO)=L{~4-=NFXB`3f;m9S_wmt-JUU6H7 zB=$x487(J~ftJ7M2M2mg<*^e_m+M#zUXRlhH|X3juqb`pU`NGQ)11}7qM@yx%0|Ck z;_;rN{{;OdzxXmK#pO(tV%$xGyq&6`ecQFKa-5tv)L*vt(Yh`}c}UQ8W)JEoVhuHubfI*t z3vn6qRI(uG+ILjG$IItNZq)*QBgkwZLeD3ZTApS0}i@Oi-=9l)}YYC_SWTg0SmZ5z0 z$640E4qCMw8zuusP(L+OA#6PhF>%Tt1(?{TzxnawX?BvaC44d7Cx=h7oh#qwTjsuM zhcq7E8@}G=hUXMl@1c1MYld#KAZ~wcq4MytXsFL;@vuZFH`TewpERF)kz6yB6R~q7 z@2hk?Q#*O+)jaZB>S~(bjg;`!yaRoqbc)rBN(4<7UY<_In2qJmGrUhOnBY}vHzA1l zP-kK)-U8^^^1N*~U2QO3lx}0Vx0fdHmAKP5$Qv2KHT^8rgJb<+#BPVS664L7grT=X zjMDI{Yiu22z9woof9*wx8rdaSwm~HSkB_>SbRrE!y-TZ=!8ABqfP?#WnXFcSeu-7?&a_%|{KiXJKw>s$#;2)=qst+h~UhQ|Oa zFqTMlBqJel`PFGLm}$Ri3We&AI*((4{g1~cXD?;Mv`N)&^aMQ03tdgq=WUp6>Nn46 zW~S_=f$qG5wa>gCuC(9=#*J;S75y8Nu$1rZ*(9wW-a+^V)VUNMJ?r2n2` zG+);O9O9fUK}Cv$L8VAyxs2_pNxMH(z%Nj6^LLM_l1fwAk zwvyHT^wS>V64`14Sug47w$NsK#xWOeo)L}2f0CciZX?OFdM_HPrauKZ|i~cU+ zO~4sL8m3+Ovm_$)i5W|lYo{f_KI>=!-%hJiYH1fg5v=k8U7GaoV)H(*%*$N2gQF+Y=YIT9sJa7&+-|N#4SM#_?FbcB_GE*g*B(+qwQ1!$;l9;)1{TexLzt>BH`oT0QPeHD#mfxHM%}st@7k@&*=YUB`CR%> zwooZ&puLOhPsK;VkfwH}KOczS_|}l}imeW#%XO5x_b}UB=*SulFCmt60EdIB;&80@ zz%{VV;&&R9Busy8E%LjcRjhbUYu}A}v?;x0#1PLL%lX&c71}$cMeSzRC4JjoZn!3n zYP`$7@c8W%2}Ditl%0m_eLZSbb2V=sAxx6~`jRJU{4D$QSx-<0hbs#Bue*RW5uJ$o z>_mcloUWPMAzzv5Lt*3f4g=`0MRIBQB$}@sQT0)43=cl}g+%Y3;h3i-%jBkP`9n$8 zqp6n>?M&J>Ytmn=C#RLnp_LR((|jhf-gH-mepD8s@=0K*1vF)kT}BZ5E2zTO4(I0! zI+ACZHK^tuQ!%Ey}G|VL= zHoDFGu?&QWo&J3SBs2yCPjmup~I!hxh`Sx5UoUwfL^Vnu2=hl3Hnas>vt>kh1{Bv z8*hiX)!pzalhZsQvOPyTm#Fo8_JLx1&F(47k(vGC>!W<*W6WBGKHB23(%kinO@pc| z!<~#zV4+ZmX*x1fi;gY!y9+ien#w$N3BpHF-p*a93$wR4nuw%xp(zW_viF&@4ZnQ~ ze|bIOnh;|C2b>nFTC9Swp1XzT)$eNs$-R5jaf-C2|3h8-old z3L|X@d>SI$sOMtPO8#`&{b|?FK!S_tgp#MODO;$B{0xgb6>kRN485xrdFb-I=P6dW zE0G`{ZM-jH5k{CZm})4k(86MlsDJb(&3|(%D=`qb(=-2e07m>~ybT;^m{)xn zLtU`rd1ILkuYzwBw&l&KkIaI6w74H@be1z>y8fl~Q<&#{fpsp9#9HYEpAF=RxK`v9 z>(LU+bJ6VnoX9{8J38yEOGI>AXNg^y&DX8SFCh1i)bSV2@4mOFG+%*g8H^dp zRT-?C>Da6)Xb3#mB5)I^$0w%1$+Xzw8?LnLzj%tIQ?6;?WhyBv5B9jPWBQ1VW+ zW%tTz;V7Ab zK-DW#VaQnZtq#rNxVycdl_0;uG3}OiMcltf`q^#iLj^OGuuaf>B!)9Cz5qw=uXbPB z;#t7BznC&!u>8tUXI6NF@C{rshi5|{{8HRpKjybb=nVsjC_3&N{z(7UMD(1@J&aw zgFj{&&;EsH;Y)#*2aBo7@1Y>77VXt2`Su?X<6B7%1bzT@=7NwmMK78b$6(;e2o$C@yk5phD=M zw z-3I*Wg8B0`obSviX57>J9DEn#D2(dpnqr@dScLCd@eii#z%R0wt=T34D|0b6@2~k6v-!`?zrli3egb7i@+Ym=2DvU6@eQT2dqZNR1z-0?GIs{!EjNqVHOYZ!9W z=dl_LYFLbA_t2;f^`!%4bO8OG*jmHmm{=P)|Jq{zd_M1UG4ly7L5e-j%(<)Sj*%4fT7?29ptFeM#otfIHBOtk}GB)%<~&EXh!+(7^0S$6NHp}J+jH1f zQI{=UZ3-qAVXwuQ(W(FA-BaUB2Hf$cpt|4^=Mu-snX2N7&X8<`Q|EB&wYEfo+AhS? zc{V+}t*LQ`MA=bjk1B};YwFF+MZvn`4SqxVtq!2Pp#041X{{#^mfmhoNw>gqAK&7b z*YQjEOD{U(Y^2{z5e3iJ-v>cj`1KL}p`V}drU)z~ZLmE;gTCj=xnynd(y>=2HEhGz zV*y9_dhS~e02OT)NAcz`4#A)&ubU`R^PY@c7WDqpP7{Fmy{%Ju<%Qivsnb@lB|OoR zYNzd2%9rGLxtBHf*T?uJXUWdSDegBvR~|p#D(kTGC?rEqY6v;Fa~C_C#-ljgIJ#G* z3Eud`XG^dqtQ`BZ#~_z68z;TYCvGEUrdX@zt>WOHoub1pwc)GxRmg*Z!X_&)>`XZ!+fv(mh)9-aU2S#(evgX6dvHb*XR`K6>|YjTfGny#Zk{z&Yzcru9kI z_v+Iq<2}FoI?5c~`ni6*+>dX|%I?=Ft!WJ8m55|Mj250!5*(hWx<{|Q5;>x(tJ{=v zOq@|pWIOx;}V@m0BQ+QaHQ z2_A)8ickC3IP>+NUq_ru`PmNWezYUPNw|l9#Wh0Z*_f=5Q^4vlSi)UjK_nzN)WJw7 z0{FEL)=wkTZ*{y|ou;3wQ1OjQa5LR(U@?d-boDQ@U32NlrgHae9BJpk-+ZxEvC*R^ zYqh%~-M=R!=d2|R{V0c(F*#l-+tYbz?v^!Ce!MgZK))>;n8H%`*~nwn_r3|xgeMjo zJVUF_x!GC%TxY%r@V>l$2g^*W(CxJaiCEK{^b@eL#F<{8-?lSy)|;m)zp$WrM`Yl- z2F@~S#3~P@_MAoi)#!aijV$Q>a-6N-J!HzfFr^HVc;tvmxLoDKTJ!KJai>RbfZE54miSmI`zVLcDS zRu~EKT(oEo;EH7q*iV%-jD84jp~~^0PVMGb8ev`RB$Q3OQB|q_I%oZC7x^XushIgko1z)BFcC`Ti2x7cC-Ovk0+0R zOQHdox$fkoyDukQAohSv4TvN82}(7U)`g^)lS^|dkOm9(4`sbs&K>6}$n(ZPhJ+N?Lcyd++KUFI2Q&NG!?#;zSJ8*tI$N{!(dZ>=gsF9C@dR}u zK7^~gn^<4S!<2E3SmOGi&ull{?8A5P1&0(uF&^h;6EQNqSA3$&H52;DTp@ECo5Q4@ ztH0GRuHUsCRd{L_S1U`axeB(QM->cyi!Jp7u)m!4vvZ=c&U|I=SuuH-7Xwmts9XOCFKvJHY0S zT%*(|OK3BU-Zhmq#OHY5MdS4moe<`eDcAz$R#>QqAM-YXb@Q42X0G@*0$*#XjAE{K z?T00P(#79$SysP0;h(U`#c_xFKA^OqJD>VB%q|0-#K|un^r-mj{ZA}7jmD%dAE{$y z>|AK^pkJ^fmCikP7FcWEH4O7w4r5!_tM$w_JZJkqEdm|N`Nbb~pQuygJDk`J!YOsw zXhqdqo@7GaJUCZcCf=I`%-wf;yz)~-yPwZjyWBe&S#T_QaZ=bL?)o}?0pYm<)_N9h z-a-N+m}{UB7UwDgnMUh+f*IxP>I9EBso3e_AKRnLxV)mOH3y2dO=x(mN+v$j376y9FHREVSmzsxS7-*pm zVl%2Sl!aKaDdYN#d+cTp4>*cvnY9(*h}8_+k{0THM0^l2NhKm2H5LXONpV{r#g;yJ zc|LyJPApZ~eiq}(Z%4XqgAQ|6l-}FRO7=6K*?yMYEq7I@Khx66u@7|(pRSQze#QM@ zyFjLHE^Ykzod4HYJ=0U5w4=K;QRL&-%PBSeUz~i49eqeDd8+&2#!D{~tiAFx{4R6M zPHDGtcC0)CQXKLZ_9i23a7qfvs?fQg4QBeQ#vsF~b=DV(7|U+&HSaQZTp%-oE}p*3 zoREN^t%!TRhe4INB^6qfONzd);uq*QoPi&%%uo4zNVonWGvhuouqIzYf1(W9sd<_-(@C?gz>A(WB1qcc$aRD^vnq%A3PzUwwjjSq_YE?p_?Uh&1*smpC}w=$i%#1kpi0%pkPvJ!Ir`-Eou z4gFXbEowi!t1Z@D6&mk0+Rh8Dw5KnguSY zyh3fhdiO@;XX@Mz?xOOmX`|~qu=G`*4>Z6qPFMx(^EhUU?0ToGY$?TT0S|seNY`q- z4Dp1kKM#isDkvvgI9zG(n{mMZ`+otnP#K_Xs=HhXq)T#R8#PTb5uM9IDijkW=4fbM z+9NkW$C}krwvYOs1l%A_I}t%&ypGLAgN|bhdbr+fipnw4^N~fIgsa|h;V8@pGKhS^ z;&t@q`M2ZDl!&+Mv>FQf$^=QJp%`+R`S7joa9(g(+Ool0VNFWSf!8Io(bfdlSEc1=#`oZxPJv2?{ZS86jEKP=W2Vo`m z+~$czyHeAIc4V6#{TM^gK+ke~->e(s{lRBJ5R!H0Czq*;*sf_1GlF-rb5oe zxVZe*L{O)Xv04_KU|+JA9Cxl#+1ZDPcvi#Iice`xRBL|!ptt`?8=5515HR!je+vr z1V`F>Qn>I`qpcRQfP-42WsL%(B5Y4Uws6Ir;C6#Qbw>M!_{2P~@MkJx)}y)git1}k zzX-<&j%j~}@hc^-U(f^IFZCCyRE_B+?>az-o3wV3s}yd?2oaY)I>1WmGn(L}Ig=vS z@MbTcgL(z-s1J~kG)RomLrA$ZT0D5%<7hm5yduZBFU&9TW8vj)rB}UL%1q_@5O)xj zPz%^$hL2Fom#b*#@L;Ho zVouQ#L_Gk7#J#2Sh{sxNn`bu(wmW~j{@iW#u^Jbs7>F$v%t-L_eSDV~8ng;(*G!me&%H7eEbADHS(ywbs3N1ZO zeGU!yZsB<~;txPnjk=$6xZWcAx4zYqlyOolx#P-Fo zNSC$}lP{~z5i(X;&EZvCsOAvONOJR zsn0#7P1aCYKu-|~=h5-A?wh7lHcgM_L!!M<^9Fa5&seZ?r=Ph`Sjn@|z&QTAz{qpfGBZrG!?sAgKDmqw^ zrE)t8I*~GcZ9T?Hm3=@u@0<5T=HF@1wM_LM7n|4GIo5EJcVmUd`0Sn;<$w2SiaACb z-mA8dly@pU>H*|^DPB9nlvTK#-=u0Yq~fB`ln?q0dkVw3_o_wdb81L#n^UE)0}Tzd z0f#osH?7BK3)1Ptk3EJFb9kt)oyx}(6i@k(uZAUZQsrGxTKLuKR#pm&bK$%x-}WH? zVs&i?9v#vZo%nP?z6<6@45h^-9~(w_l6(hnD3(vTaa1=-lU->9uAgnR!$A2%K(FQ> zX|kn!Qb#i?EWV%1vKqNy>6UV5ZjV=6Fy-=xpO2!MC z(t`vm`CZcTQNM7G*_f!jzAvRm@vsuFUNsG86CVmIG42V^91gf984A-r#p#a@i}++E z#-y_)NeQE5gSsC10mlX&x4UWY48Vm!0gYmH2+;H>Y`irLU|#DtWu}AJUg3Vc_VG(* z>{|9(Cz?Ly3-cS8HF-X!(T&Wc>tm%uS|Xjv{CVUC=f&!3SAQ+9E4>GfPa3Y)sFstw zlr*Ow<_~!jHeEdv#Hp#&msMGCP4i2WXH7a}$*tm#vx>iFz4nqc$4*6@#x1Gzww?lq_PxW@o>kOgl*sBB<#dK30A+mlFYZ@Zw+kaA4x8cf?ZE;=%CeQ%ecFY?1q-J%Jn7Y;On zjT&n#gzD@f4I+dt-j6OwC3S&`otWs_4Yiu#o4CvN@iG$A*|G6MB|Sb$+cs=50At|l z`y7-xjdVPumrYxj1Vf~#qlKMKqj?vqDu&FUgXJICo6^P1GaBo`ri=KCeJPMEtxzvj zUdq!(U!&PdK&!NTp|WJ_XNXSp1-$HO9)(0XJcPiYwc__1hl+=>&B2Lk{|DV*@YRz+ zeh{X8YSdgDrB$v>NS2bMsdZUWjMVTPl;xBhWr(K@hb{{P-y1(AI?_9dO&z<4Cg&3| zu=zct7olI}reCNKwdi-##W&C2Y9+R?mRMt}{Wwf@oc8l%sN9r~;s5uHg?8TTu0mDn zi||OR)Tam|N7#Q_`(ftK*sSAF`hlv|Wp}bRXr1vitj?Zh4IBA9Hc$CK>A8z7nR>6u z7ayN~tZ1jHUac6ZU*d^D_+1!*jYXyyzVRhY!8{7n=tg7A81uw=RNYZy{M6HA)OSd%cSI6wMv~*5~(iMEr)D$-Mfeo(-hs_ zc4`_o-Yb|Ue6HwBH{qzEvu7V{^nO987Xp`Bm;N565l^j@5Nq79tSEzb>oR>`u7CC7 z&f_qh{SM1ChxP>_*5#x=gN0oMG0W@<45Tl|?$nR!xb4lS&OZ^=4YE_r8T5H^Gk5FkDnL6-?T&wG9B@;-z7fRG)8=X^p`}+PN5HhqclO1A6fr* z@vHTJ63w_r&$nd8HpuBa-X`&l0aL^oqmEHTo2IT&$N7%6e?)$-3QN6{vuP0_{Qz}5 zA~jZgchm{O!6^+M@={x`708VS#?Z@AWV#C^d!4&ktms-V{@VVYSlqS@hiSBn5oSt} z-MAzO$9Mg9@%8@uic?1%Du!77kY07aqCwTf@7F#nE?@sgv8zfeE>{iLzArlNRk689dLFd8|V?7Rjo~%7pvAEEI!z{uUNZzl4$E3hFu#siDUQq4>4&MjJtz)mgNfOTSB{9Ju5BN ztUOk%SrhCyP1O!C$@4WFadA{M3J+u)j6z{!#i!baS_?~*x=*8fgcQ%1Y^3KcO2hIf z53OJAFj|S})HI51+s;Ao4#FeY;`-?|n@!`xYg>)Y*Dg-`OZ-d{@9`mqXMD!%tr|Su8!+9-3*AzFRIRgW|)|^ zm~h^!M1S6*3}*R=+p#=pXw8G+^utZA+D;u*JtD@o-E8@C{=7%p55MrZ=9MbV?d*@T zcB11+mfSs?b`}Q>8dujE4oMFYFK&KUO&=bJFB@5KhuY0z|ABjn1T4JTE$#eBw5`WB z|I`rmlOZ82Q(J14A1ILMhSUFa!TLLUG zD-ZPy@Z}IDl+-H(ZXRdajJ%KGJ&j0OY6a> zSC0vMmt(fmgBN-iQ6lsK10j1Dj*4@={$l->2_U``#HtMki;qBp*SGB{+Pa2fg&)L_ z9?eXkj&*xxsQAm<7m2+`K8%4Kq^+Ow8s2qCBvd|iSJ|JuyfN(KCd4bRo`(${EkQd@ z=V6Shlha{QKinp{I3Pet>Ljz9MitkfvuQz|pL(Oyd|gYLQvL;nxJciZ^sRDt=`NX4PGIlT@17{J zaTBJ1r>eIQqq{)Q7e;sJqm}~aa=;5qJ>;+r&^i_R6me>*yJ1a$*1u6Fq!Ase+L=kp z6JTBXjw)}dLTXHuPr})HX}SDlSAz6Wtx1?#eR!fcD{#-6$0n74m3V{M!qhxIiA z^c|5~@XUPCuxfz^(o5 z>sq^BJbzm9j&4Fd7yv6RC`;zzWWpI#t)&)ga?#22S9chKwp}gD&3^_&Jni0$-+LVQ zRL-F0)@12jr`iMy_|P=!m8K>-;bl(yC{kO|a%AdUDvNvtYm=$(;Ut_f*xK+%$ni{k zYW|(tTJpxZqQ{ut@7VGmD;9m>=#F+Bis-^xOBPw`&}SViKFB8xBAF1_`U8QKKap~p zOkJ5X1ZHeuYO@CmT6T4hOZWJMzM5N;#Iu4k1fYWf57e>}N52YW6W%#7NPYGhFh)!n zw3pZ=xs&+GI&@*&PLaZIO1ByyjLJinW=v3zFISlbp{dwiz%5IJy5&@6Dm$haxY^G! zi~m%R%h9^qqkElsegLa}e)8f7I>f6u^0jQ>Z;eC$7BADZn-Z%w9w0^x`fK(jM1vTZ z3f-9=EY`J+6(4Te2k{5N5iiVK`{mNll3<$dzqP$6KWsRdeG4Idbx~l=>oDu`$oSY+u^}<#_qcU#`o*#@IOzC9O}kT#132 zQDsg4?glQtEg<{!K!cclh`HpbkGBL{O|8PoENxhWf*Fn8AR)~$DEvXF=iXR9j^Sn{ z-z~LV0Cg}7<50z>%Y8BClza9fOJwCR{80P|4^uO?IV_N2fDOtI%lCS0TDBZ-lqCrL z2xE{P(1lfA>;zo)!24!z_@gilJ3)gx)mZCk34viJ_p{y3e@B7l7AO=4_dNpCGyX2R z7wF9v{*A$s3=maxa?);_m&v^A8uA6`yaSz2XwC>GSfW2{4a0LY7Vm}q@rBtfk#w3| ziYaF)N(cw_ObZDErTKHLbAIOHMpLs`+^+6Q$y*v;VmR+hszi27!Mqq5`3 zDVjyI4978bU7{n3_?ItO+2nR*euXoj_pW5RHj!bPaRuu-#vt5xu)OIn_#VGv`2HGc zVh<&J)h*vjx`r_vWOzJ^`8gDJ0-ZHYR`7C9j==h8BHdrTZc)dr=O5Kn)9+Lf82UC! zwV@%}uy%GMrUWMfdP>3iTS3=Y>j&B5^_ToA7$24XQ{( z$C0m}8y!X})wpW(qdJ|acPEinUD==@>KQ{{CyDiRPN>ehoFfxM#3>^W#nf|G-0{(q zVk6QR3|U(1T+C4{5qS(3K$7n8Jt77C$&~@uLX9Wt{?(G zpKGl8?iKPf+YwjjK{EnZ;U42tLW-bO6o>a8DXK=x65~a0|Ep+E4;4e3-&RwgS8v)c zI~BTXIEY?$_=&z7M1s*n%YH9Hc~Ww!9Dz?=&z<_ci@`c{JF&ZS&gCAQTu5aXwdiYI z6jZuNSc%WiT8Xiqk(|aPTn`lys%JD#-@~kfHS}^L-Z?*3It~7($4D{N+wE{}lc~)4 z^|luGHKsJuW?K=e@bA03n*pcAoY z>2&A?;3R}he-~%tKDiK6u)}GUe~qnjM+KCX4}i_aVHNZo`lGQ!n3o z3QfU`cP-MK@Yce~QlwABV8Yp0zdTm8mmWfmYGq$~>fIKN>eG94w&3@~ zLsnT6(~8Mrj^AjY;9>U~ycqB@Hw`;si&V1^ZE52@q?7mC5SJQ-C58>Z2>XW|O`DsQ z>n!wa@s-BDOzs27`G&TP^GvB@4Hqns*2hCKQ!*m`Rg4avgFFY7W0fYN?>M&Odh%lI z4*pcJwlBB*jU<;PWoQSGxtH3O3+E$Dd8GGgULmtX-tFa3s&BS<8>N+?Z45sO1yw+$>>O+PomdT!%Bzx3^0>w z+VfCrfEeiX6GM_i#2`%n*7exQ87NL0_IdH#rZ+`v#|kmHjLMMZ{EhZiVnxS?A_J03 z`Q+o>JrP1S4HCVy^L-F>B15G#x~H+DhxAW~8{50Y8JJYCU#`0V7*$)6A3z%Q3F=%J zff%}1*D4IpPBadY9aui__?!PvkzVzRg$%|G)%PVqq><9ndJ&&)RlXq^k{>znW$593 zt;r|}mg}m~(P@{`rE`f_ei3IAla+WY9;BYb59QC@>+5V#HyNs{gWs97FK_tTeP(v4 zW+2|>?mhFO-4k$z}yXV|M zA#r3Lof~X?MV9j?(1HK)YkR!bx^+{x(+U>;jbEQk(>|Z3&pxL;coh!fxBw}A2Xis| zRfG-7WLk+P>2`e|zh2X~{wx&Cnj`uE0Xpg|&Si-gY?x{HO6)`N%h`t;@5jkS!|=OB zX0yN0=Z04KtFCnBV!Tu4;yq_qVl~E|6ZCGJiM6&jTzHi8r)WMsaZiLeYpL#@I!L7I zgJDYXhce^;5k0x*F`%{*w(w1`*}CZHB|-joN_SZMq09Gd_Y}H^{OU=$HwIC^?|ak+ zK@X|BSY8N~!}I(%q4MoHM>%-|n|Xqfn_xprI_crXs}`qkml^je3|Jgq&gPk9ErtdB z*kOL=Am~%uZa0olr%w4mSb!IAUMe2n{6@BujxZgko(YU`?AA0|?9;rfBE>pxZO6yr zvQ_uvQ6Q@qmL=)lFCj!zJaLbHtw`Z_m+}d^$`sq@js^tCM*H&S<>Jy09ug^3ibAMv z*5w{2-cC=0>TumN7kT{Xyh8%s};ml=FuR<*QN%v|MOx`TiBM1>Lv% zA*&i%KdwWo^?=z17q!_h++@F&b`5ade0dEZ3TWj-=}v=Bsh-VVnM~IKJRp zupD5jZhVJxs~$c5*pgCs7mMi&7K@6l#q_JY@FM)EB(X|qYqCYIU`_T6Ut;UN?hbFs zm+(zKp?gex2u795)69pJJ8hZ>F$n6*Mwd5Z&haU%x~b01 zJu>mq{8o7?2>zWomExFEeGAnV2|FRX@r{U zQ|~h!Oj5)vq*#xQpUBY);k>EC5TRY7Q|S8;xy*Lsqp2&^KK;{)a({rS&%@E3pweY) z7F?t5^bgBy#CvV;i6!kTL;?a|-uW;!m7EHmvXbK9{(FgsK6z2B%4`q=%9uh;YoRw| z+V%$Q#_gy{6#*`RrvS;j&Z5_(rgLY@reyd}MF=!+6u)clCmu;S;)`@dlR`DXS-;Wp z{9(vtCaH(Iv^VFv>40RIP<7KrrIUKnS zUDJC4-LDOX=by3k)~~cwONhf&UV6*)N3mY{%NR6TRqk_5`ZUO7*iN(U_|%zZw+$em zh?nOr^Gxp_Y9Ykos?Iq&dApx+&qUZ3+7zl>N7Jq`+u_8aUr0|bSErtG7>ouLkjq>t z&-zHNJmUOm*8B^n85n%iUA*|*$|3NV|Dkg%w7*vFF4wdd2V_@Z@zIP6Y9PeA#IvUv z>#)=HH!+3!Jy_&*a6z9oP{a56_}{e3a%RXDOs7#J=+}%+`=vFpL!uvyTla%?(t<@Z z=(6UjK~%R1@^rrOV94d^;(h@73q*(;(dklA9ccRaAW(QZkCQMMgt`vKX9()B6RhY% zFpYXBu4#j?zqY+AmUYs2Y1TQY<8Ih+i*&IBO9vP9DPNkRJ_wtA4Faw^5pF6E%BRqW zWE`w-W|mfEgiWpv zIs78^5AY#5s=tHh99H62I{kIOE>z4$4DS_|dcm~BvuK0sokZy$u0{lj%0wM??5^34 zw*I%dC+xj-SBeHH@PHK76HBpkY0EAOOpD2cc!qke8cj7i8Y)XX{~2TM_(|Q zP(Ur`V0vpA3b_;w936cTcAQQXeL3XB@m-_cRSa?Yl7%y3&C0Mqybe;h1uYiRDsTzH zgOcwte&*ey3P_X{?4^ujF*SE$={49}lT#LAFY`CEQ=Yfx`jcp1{<^rOx6XVM6UL@v z%JB+p98{Mydo>Z7jbRuV_)nkz`W-Xwsb}7=-#+sN{HmRehiD7(C_CxwdSr3xl+$nR zSGE!h_6Y)H6?HK^*w6SgE;>9>^RkF=B`!ER`2d!|{wt>8;vH1p^FxCwSkv6!vdo#` zw0h$j7F3+W>OItz$s9drs{NamX?t|mGvB79@wG(48C=eWSG3L(E`zn0-@V|->Mg|4 z^3OihSb^5~A5+h3j0%MAY3e)PiR0R2W_&1kySl{h84ZHOezNvblIZRV>FDt88jTSW zu8l5hVV}xuU~s^JHF%R)pP^MYTipPhSDaFPBeE)&cEzwRTn1_dcC{jK>GzDkz)*h+ z#@Vt&6$xrG){VUBxWHF!i#}^up30;2LOwN=eh$L2S^fO{l&o%8trzww4j<|&59|LL z&QNcoobZ98z_?E~w)o#TJqjzwg>|u(`2E#W#p+c@4;7~4qCRDfkHS)o zK^i|f`+tY$f6*Y)$gUCsQ&T5#bm;=;zB`M^YsNPVe%D>04Y z`j0lJKKWf-dK6|2HP@gZZqbGI5&qK|m2N3{Hcj&6#s-qT7B6^~h!2Q_eNmz4`%c+*EdQ**=Oqao!Tyzig!% z1&I)28>@xwgRL1CADw!)#^k!G&uf+a!S^xqqPz}RFw5!>`2D=MTVgc^B$Lj4ZaTfD zl(m@3ir;Yy&&gpmX36T?Fal&%_Hn)}mR6`*XqrlEsc}9%_3728+$!pC0Hss>U%4r= zTv-VC;%C^G^+OuR$dNZv3>qYsywUp#pV&C4>U1a#eVr#8gzH{aURPmkQl zL0C^r`#c6^fp}@BWuty+&8_(q)WuWlC&ZE^*&V0VHy~Vo%7g9$pS--fMPw;1f$726 zGh$KONVWExRJIw{Yoz#MY;uA#+Wwi?z_vDxnx^Ary1HKOG7|sYs4a`H`F>dWaG1$}%~eb>X##AVN4 zKfB;u>m}FD*n%%Gb{Z+;(Z)*xQ)6wEd7pyWmWUYpwc7{cjd57XbDcx!sDTFQ-SEb3 zr}aq3ow9oU_8GqiVApR;)2L}Wx%AV|CXB9Mgy5?CWu`-3CEd&`WfNn1POL-%+s++Y z_rh?3bwhxNm+NNknsZdL$CkIyv|_wr{{z)jh|aNj4XUToNz|H$U))0t$fu%He@#0U_a1BBz4-`Kv$u z{Z;`%5s~{)Lk1cV>1s`zo2O z?y6VUx2vn`)qC}dL=r`JuGMxhUWxtlYGUVoHcJ!-?Enbm>s;#Dqm4Mk6Kdj>qROmLEhZ+J+*YRzM^jOMF5HiZ zp3WRjotaGMCcEnFW;(w)+mH5h6BABMGrQs-aQ#o@azJ_`?ORn$8$pX7jWF4Mni!0V%c-=8q`kzeQc_}N zaXKe{*>UaCep+;LVZFfbh|RPe=Pv_Ejhc?Hz@(-H zR*JuOtLb8z~`yM<^|s<`5wu+rkx8N>1`2VKxuP(5wz z1rP3uk)U4fM=n$m#HaS(x=$?_^ZpBk$kD0a26t76OvMvsI6pAdxy;!!jO>RoWRI}e z6SM9($@QjT+?+kX;)O;m_XZdRS|4hGpm@dhFeiK@Tn|T*%4_CMn^KaAysp@?nf0_S z;8uMf#`mA^e}|!En(`w+qGuQMsR7HgQP$4Ej(N?FNyIn8!zAA-GWFNqdPs+n(npBQJHMh;EU>mc*NRrhnP%ZQ^Oou(qXT@0_m4mTH?Mt;30 zzM#{znSQ~9AjnLk?^RkX)L<|1g87$#&!N41cJXTE0Yh*>HqSZ8Dj>2xLFVM+#F3 zQ^4r%9Lh>E?ML&RglotfuxGg-w~KwsZyIz4To^|Kgp`MfhS?F(Frl#6BO^~t3qOZN z12ZghkF%IzY^ME@1=G%0k&#u=Z|6UB*2-}>V;6h2uj;N z3y>Bi+O^|1I#5M!7@7b2$k#!}XfaKLx<#n~I`F66i5dN2F>_(8orkp3DQ*s$T_;7BY>x=Ci3KyDgqfCp-(zF z--Fd{2hw2=mbqQg1Pj&sRqiG}KXkkpiSvoIOW4{P4#oqA{1e@D6h^^axq|6J!?jYm5p zlUYkKcwmO9v3NAvr`znb6ywKb`u?L;=`!Oe5#^tc25}^(8B)0d3n(z~mdm)m?!1&| zcU@1?VlVM0t4Qc1q)v_WgDRF-*r%9Ruwq6REcCHAf>xztyTO1S>vQ<#o#P zr7JN>w=G)T@6V1bciIX2`DknGcm27ZUZt@wdgiE5lQY6x%Ebq^*`cJ~^Y8oGO0@m1 zu&RO(_7PNP9`NnI?UW0%y(cx|s3&o5`sEtQm{Y8 zah;b!5cilwM!a=;?v^hT8t*ZA9cFmRjzenmCE&O$2;}~jBiQ`8cDoz^tS#jdX!|*#i>+b}_(eKD%`-$PPT9F95V4tr79G6C5 zkKy7GjIXoE%tM;lrN;**Q9WV(C{?AG|JudF>;2)IkIJ$vPE%Ei?ZSQ0i(Kj@$3>pH{kg=o(Ri%EP5MX|xs2XsM+U)c z+gSrefJ>&H7A=}};NI3NTY50VW2F(RhPCKy(VfGT)YV-)bLJVLrZkk;vz)tehVX@u zGJmSzu|s(Cu}^nbJCQsGNwZ2tVlnS)*v~mGlysHE3?8h0OF{cgsk0Px5y#vJ?UY3@ z@i&@w`{#8uNs{JpOmIo%`-8l+8IhAFHJbB;w`V9xBhu2|I^eg_bDWaxCC;d#NNip| zH!^DH575Q~3qHHd#O1mtTpVk=Vak$DoHLu_dd|zRxH2U(Jo`Pmp66AX4lKM2u{1jk zhxP>mv|tCOYn^Pj-zr!6B=x-g1?yFG-NV9^sm2H?M<<#SWa<9HFlo9=LpZ>g2W6_lE`+?b(g+#?pg|aSk0c|TKQ!}()XOcvne`~=vLy0q{;}6 zNdnV6wrUqqjs3(ymqfpLciV^J{gxFNM=V(1tw1ilt5-08eNFp{(-qT!?DrahsZ*uZ zaJ~0`ID-3VEUZ^xt7DpRqs%p9rx`chYxR9j8ovv4N}naaF6jd_X=V~(n8}J!LueSJ zc{+^7W^=mZW{WEn*4?z&OZ>^Ilf+TO<;g!wLpn(NLVcFgaSz%$>=%v(}88^6(vyh+YeZE*O>lTD_d!`C~8m+dYf_^wn)aqP@<$4__Sl zozxIfI4@-k$w@xCWLo{3!F=*v({WAXr!->pkzdS5r{kc;EnU0)VBF`lYOQI5KFlRl zV*k-jVbs=DI>q373zs}tkG+213T9QZ>!r_Jkr+4m;g=v0Jy0DjRI-wKo^eX0-(Hol zlFNFYOZQWHu7Sk~d`czhvgr{%M?MrSaUf;X8{S*@^lk1t0VC3DyXwX+$GRfOLDB)w!(B#*gcw%r0o zTF*&~S3fc)EakrVXw%fKVE*VYWEz#3;vPQ%8VvCxFW?M7UrEORs=gkG$a@J^A z8L`4yzmsc;-oYL;XzoiH;tKe%LXm=xsZHf^5I@Iqy;{ksKe1 z#`@9zVsu{Y%StAaH(Yjn{PChUyc8K4-eF-G9_hNaVYme?PiIy$=0*RQbd%o!W4u?P zvPc39y8R6&`4!|dJ(ySAu09r)SU(p=s;yRhU27|Z4c%5>N7}bA0lPR@cCKq`59qsX zM9HeND~z_t@K9>&C|s#odlq=<^stkwN<|GfggL*c85TRU)I??F(&^`HEq2!V@`LK@ zN_-i%;Ng!d{E<@o<%P7`iK$`Nj}V}FxMz8*rcN!7>b-6{w$?6%+BPv{Mxil);;|hk z>b527boyfZ^cs<^h%5G$IEt-w4$b{k*xa#A3ZxQS4&(!PN*MY{UQ!yDny+Qf+Om|T zNZgt%F&tC?ffTx~+NYZ-O&tPj&byn{VuQUIaxlDtM`lEAJ=Hfm3gT(VMPwEbnW0h9lH?4A9dvExM)x zf<8SI-*t(ja6ew<5lrXD=`?hki$=#0A6pr15_Q#3Ms#!c6{1hOVlcny%rY+2Ug8sR zF7dHl&m{(_#!a`2Qmgi6#!&>?7R7r5De=3qQvR8O2D0ljrkFsx_;|Vc&gZQQ9LN2e zX+}mk>I2%ha6)p84%*6*J16pwV!~g_dpk`o z3n%%|fr%k?bMT#+Q3a&F3mPO;Z%rqcrUOYKSY0|_s4*4 z9lQR80J=1K_PTOc3i9bD2*tLVhB++E)&$fM3$C(cOtEUeEd6`rNq1Cwh7=Zbj63~l zJ^-K4@7fHef&T2x5p) zT1U#xZO*(S3G8gJ5anV;@$GH+{CrJgkFC7`y!k(MuQ50Ik!9djyR-E!S#@LoOx&)Dl zooldf!|PtT9-cS5euaR)o>BIXv1huic%QcuM;^w}oXHgsrIpfor8$>4SY@0cQQ9^H z3oF&N1P8^gM+iXPFWNB6-(t6_y|-#ojGSoC?yhF7XjAN;&mrU~p&c*oo<_B(gYl_M z*KW6AO9Y1Jknh&g)-~d(jcgCT5FDo7L?6b{DoeIsZ_|>L zc=ZIaX4M2R#C|)Fr)oFlO&Dljw~fN|FC#7nVyLV?=f%a}C~Ba)zU4xF^e#I-HVsnZ zUz*U9C1F-yI2;ir?4-3qdeO-jA0^lKMICxlCXOi@C(T$z&SlC#rnKlFJ#WzqJve%Z zvRQJ^X&bS&dutd*lin;?ji%+|i*byS>Svy1O%-OeDpXxfC^2}({R^j^IX}>Z(3dMd z^FcF+-w$Oq8v_q8tj4%CK6C*fj4GxW-_x*;1{jHxAlS?x zh=(Rt;*pc8X~;20eIQ(Bii?1KF|$yQ#WOI2F0ZSqtVEfv6|(oJ%3+}p+9f4)&|)iL z?ka28q$q70O5FhD4}Pp)8_z5Q1U)K(7LcQmyf%T+T++5isSfLm_Nm-O98t5kXhDFL zOKj>BldN<#n8hP;JksH{`#^;=^%cBMn$CqI!}JXc=ZiLs;N@QjJ6BR_bpo<=Z^XvtAnhOfi3ruS*d)8(Xn z3d3*ou=gmstINjthV7KyPK!5&q{Qb^iTpz z`cT={Ch3Y>3KWq$n$9zpUdXnBDMp!iu@B9iVb_?5tfWDpFz|t-7?R5V&N&`zv#Qxc zdEcu*vkPAK;Y3>tIttd22s}fUoaqQv5hm(D0Non@%dXbGy{Q%Na`$Gr5Kv+vW?(xU zp4P1~uiv#+^%swLH+J1bfI4rDVv1YE{MJ<>iSvEQQHO{_g?PW(y~P)+J`L4sGC+mz zD#C+5q9tczRbnWPOggk?jMx{l@3yTL)7QT!K5p%7`)Akq2yy)IL&f3Mdt(&|s@EjS>!zbNQyWS88|Fu} z1N+74CO~~ejv3a&uI)V^#b&)UW14zc>YlGF;&>FxAwEOAzvIxiP7@u^-s!Ia#dxZg_nJTo(rG` zDcy}S{(T(f^GFmXB68XLk2J~XffwuMTh&>YGh7q< z6&1cZ1Na@lh8(OBLThSkzXEjtRi+Z#u$H^6V$Swuq7`b+{l{qst@gLJe<+sQO-ce==-txg#=un9 z8F8eEiCP%%s=@V8n186oEBbEhN-<-@%VLX_+9^YMQo8-B_YfD1`U14X;-U@p>elLL zy25YrD^CUkWZ($jP$BZ%o3}y zmv~6k3Z%=za%E$7DJ+cZW?IjUiiHaneZNhBzImYX)%~mV0=E-NUx&fpb9$rKsxqXVLP`M zq%A<;2@3|gNFtzK>%7!HhGX|Rf9A-%gn>vGM#_;jCRc^?SIKCRz?Gu|S(N3{F{3po zxu2^%mLHdh6@?WSIU+1mtQMafmnYL@>9yS`1g{@dAx3p0MR7=_0Sm@*XsGcQCDJHi zdPeze3KXZc>0G4aHPPfKtfMVaW(4+#`@t^?O*EWJV8bdCt51i0fEjco|Bd4;*p;x@ z{0=e3kkV>LX97>CJ4oEH>uKWnA!D(>*cMGthu-S6D9PcmfWI!;`;(*&_w zMaOGPU20vj83wGDiFKf_z+9k^Y*lwd@`>ptiLL%evT9OUCU$pb)4SrOruo=koLa*s z`WPhJM+_Y=F0A{U+H*kC?S3^O)}XTAZ3KRHt$fLKy$7*@FFRvLIieFNrce7iEZ_&@ z6@4Hsn4W^wERgcbpdr4swsNJYu7HhIvOJy1$P#@amzhT27fMI*n$~C+>#&b_^~%&< z;x6?^J;^DiSNj?piu12EO_Uny$~#YgS}vim9mSPTBpVX3sfWwvTb|x_o-isN24g&- zRA(5gy{1yymTmv=^5bKF30b{bz3StG7NTbVQD&j z>b<(CYtp`Am!PQ>&v#c*f3+Ycpjr^DplB_cQ`PuCcI6BX_=y&2tdgL@0HxMae)`B z-@kl&=b`dBQbx>b*ABDThof;Jp|m}3z%#|L?7uD`+spf?i6O?g*Y4QXa!jhoMpK_U zn1Mi*_#yEeQic8%AGLx${|Vg}Hz;gAxaGU^DiPt~Wy z=`E{76OJL;40Y%#Fw7$nH#|OE99;WpMHhr&o82NF+wdCpDz6qpu}_zn-0nDx<*E)k z72Q*ps|I7-hOJz;ee#?b6&)u2d)QcD@}@U6t^R} ze#aCOxL2H9yWtPBytA;^VqGG2c_k&RT}YiZ7t0O)8xyqw{hN3NbB2Ocm1n%y!aY-<(FKwPD z9@_MVSmCsa-M~PTq_-Fj3ufxv#DtAt2y=&Dd@$H?C5g#Sii+T9% zj&jTPaZcBQFN%%8Pp^|puKlTZTf`7Qw`k$i?@rneGJTm$V6SNcU6=A2J?vdH4_}Iq zb780yqQdBf>i8xsL55A24Ma*C!CvB(UxLNy<6+be_kR6!J3IOL;*dYKPhx2iS-A50 z)Biefj1p&qCR%a4!Z%-sR( zq;X(M0$jKaYR|0aEhtPGj$-b#DJ|p9efUODPsgt~6CF}#cicM{-+yk=7!SO_@1gBy zhiMg!1+H+z8{3*$?}*7Wmxq1^G&p(Q-fMT?use$SC`_GtP2=HI(J3>JGDw`(PaUbB zN;5hF3lg7270bpHV~_n&G7>dHEh?dlWB>71S>63JzWXWcJ505p4vPgXbEkMDas(Rn zc)1#8c*c=o2R?P&pyRAhTJ2?H+DnClbRz3**V>H5c&&5OnLpFATrLe+X_ETrUPh}CDbBYD9qDw8Zln~*+FZ+=@GP_dIZ zbJybqsd|%(p~eT*>?O__@p*B_`hSVdR*M*dJ;~HY?dU31cO63a?D{(b@r1a=ih5_6 zhTI2xjMI!UJv`M1gTDVjHG`OsCjIb(=?M%!4}}X|gMo~imKa{UP+hC=tbZsY;@nA_ z5Bu`kM~iLS_Y^f%D@D9=9nxlBOzMLPXbLto6+GKn38&H#8tFT%y+CeI85W%{p#G6?>*DhQCihN%OL(}U_X|V##$udi{-P`NT z?S1uETus(44uQt4akmiM-Q6t^+}#>?3GS{zg1ZHW;4~0IaM$1t!7ae;%*^}Ed^2;` z{Rb|KwazbaPSuvD_O9Bs9~c5J%m+MLOU`9Daaa9h>V=g2wLo>VgXh-7prAvv_FBcU zeCTI371FFC1S$0Oz{@c<>&F6Rf;WzUPMx;fokfsZeWjdOVU z#vrFKu}pmDCX2yX8B+`|Vy&RmB85oN=%nk=kakhPQQr=y9idu_7Cp7T5v{z7q(K;{ zfzW%sZPOd{V{~{hhG+x(7)x&!Q+7~NouDH}Gpa&hxu^5ZQv|-llg?_ZW%~WgXax9Z z2d_DS_q>%5RgSHV0X`s?=LgxZoAKjF4YF3m=tr?EL z9~q5?;Rk-(DVi0~?&x#uF6CBi3FI*T);iv%HF_vHYOe9v`o!AJ#Rvx8+20qKWlRQR z{X}DFKWSSGS_tvnHk1BY)JQffA|Xg|gUkbVs47=)+YN+twxHf|q5usXPwUCh<$YTb z&fzX8x0399V<&vMR@`j}Us+C_E`D;VDbR^Wej0g8`HG-n{~)0x<5kOOFB)F5I^!yZ zFF@=;((MSGDmb_Uk9U+mFeo8x<~F@P#6971Z4+nJ=yjZtyR}V3u)l;0`k|(13kXy3 zvG4s97VGWnz~4hOYTveSI(O0hTqDFsffeIN$XLA@T|}{n{fZ{D+EWn#;qML3jeHoy z2nBIo8(+G=g+j`rRIF8;A%Q#iFf{?kA@A$gO4AypWNg?3_)rI=p-W zlkt3oVw^v%Csqnqxe{1Lm_^e%rrqhJ3GNz=vYg6Uq+O)X!8yJ6-cTU(U;%#^)FsVJ8 z#4BcSZ(CysSP?H>sJA0aIj`g=CSMuC6G<(}-)ZY7N*h@{&PG_H*Tp=4Wnf_K#>Ya$ z$UG3x`D|mmZ1hgYE$x0-AtAa)_$fQ{X4Gh~up~w5YQBqnt_I^1cLMGeegOK7SeP~W zoT4)~r<*<<*&`Y?O`a$GWswxgXjxHLhr{v$XnA4t$Uw9M81Lh(e@@Ukk(St zJ1zC8OiCij*5Wc9kJC zaYQmK%RI44-^|}VA`{VgYc91y_NN+2rMX5Q;jV%F8Etgq8CWdw5V}*}WMQLh8oLb6 zxE24NJJq2#@CisI%rq9w&QwixUf$h)?)q9<_G)&Y8a07K_pIu^C6$c3a@*q$g7#BJ zNBakU@|)*@Cfm+_-&u~%0S&eS2!2#pM79D^3Lur9Wd4Oje6t2}Qfc>WOCeUB7^h&A z(oBOu$zFGZU?+)OhYuM=0ov(b;_q*Po@2^}a5k7Y>&P5n&ZLNElbVWSPQ2bR6zK}~I5g9n+$S0uH!-5ldmyJQ7)^D2ExfHWZ<8X@Cw z`sz9`_z5L|IiB~Yl^6Q5)XY4{bgpB2@W>r|u#^cgM)HgNT=4DT+g+lsGTCov)RIig zIRrd(UWP+cz2@W+v1SanG;=kH%AW&BnpIjm{B1-;CCoyqows`c93N{6 z!wA%L4?{Z!0td(Bq|QeaoVq9*&fDX7jNuPp%hg{eJHh2I8v~ps<3eT4@t>yeiCM$vj#z&c0;qIR6(&U_U#!9y zipn_ScMXCY3+~>4?{AtCDNBpG-%0KKzR)0jIqrX&$kZCF7O>#*xTK2MmT;EVY4&Wk zT5Z;T?_lR&qap1#Q-=Yy9Yrzndz_@PdYCy2=-;lH*6Hf8rO81kkd9|Hz`NW6Yw2%d zA$Xh5dJP*aJygh2proW@PyF7RE%BCQcx!6ed^+!A%T(KNEjq?$J`h&yVO3N!??)sv zCbpz|t01xUwcbJE3!w)e4Gnsd3NG|MGz0!m_pnt2Z%00b%IHz|MR;X~$R@j~wd?e< zJBz?o~LyW_)p z2`Tc=4lMt|rV?avDlc1O0-UH*B3?LN@k|s<_WWM> z^%I#_0+@0OK-e;)n7?7dStMICLMVeNNmPtJdE|VlU(P7q$(;Dr- zcNtX^8AT4PlvFRwTP%S^1>z>&+*+z# zoN|t}$_}`GP6q%i(mQ39*C7!|F6k)a&Z&$B^qfoTY_0KSb4lB!t_!}N;hL4MS)Gg6 z33?a6%td^6ypaoB3kI6nHhKnaiMjIhP=yyet9l+I(VuBmYyC!H8Ml{vd$i_uRBa~P z0G_{xT~j2?Ta6q;Wdb9-xBgyGSU_>z85{*RGZwTdN7bSO$I4w@KTp{FRxgJWA}18s zoqEH{7nALxAN&h}QA_Br#~1*gdT#H%MDH zjyIldks&(TLkPGjqZ;_l4bXP@eAz#rj|Vd%yO?LG1clgNs63Z-D`yv;`BwCX=wrv3 z0~)-gCTTrKgxD7G^0jP+hqLGdX7B!{ZBE{T;*DnDLWRX*DHUkoxz z5+rOKWTvrtx}J~?K%g7F23t91=#-0M;`_PSX(|yH&W`wMUqqYB*hbETZ@()Bn=-sU z>NHMgU}zJ6jr(b~Vi>$WBF&*XU~QTpwf-#5CU`H}H>n8|0~@0-w+_#7oU)kU z3wxO9(F5=+EWUdJtN1mWV@n?rUiC({6!qZLlGecauA7)`ED5cu35_(A79QfpQnP%o zkAaDP;4r=aweHgUkZ^9;roL9R=y_?j-S9S$1y8B>eyYjrC$BDR5cRXD3jZC+ea)de zxYpYt>`p`WMgS{=2pBH!j@v`qF$w*Pg0^=%sG(XmNGeVAwE!$j+A6MCB{Y>ETBX&yVmFz=PRIohi zc_iCePQ*}%%lT1xZPxV?Lucu3;!ALEf>SceB<^{n={3ck%IiV!O!KX~7po#zjRWS8 zGZ$^98*M_-i99GEc`q>d(vAOABPZI^1czmrG8~oS`&_vj?RM39V}A^3eAiga-ji?C zGrRk`m{CU6vvE#0ZOlw2?ArTRm3B@$kbvsXAhT$$+YF`HHAk8nA3ytr#ONlE;(2i_ zQvsWaYF4T;|JU!hG-e3yS-ZE}miE+!)&Bj2OE4)5C+%7^U=y{@9QYxx_nz<67#SLl zzqU7jvGrkKtFBzF2Mml6{zk?tDi%>c!Ky`OVpg0rlL)f%9qA=jqD{z@-{oQ*Z|rb+~>IBl?%?IqCSu>U6r8(#6bF3I#vHeODMhe7qO7 z37{sqpnx=vl@}A}K)K^OE~D26iGwvfh4KXn%1l>Dsv=3n&=*@kx2o(9pAHgr2H+#U zJAZ$8Zt`!h#EtuaxJ^@0dW+{`D^lz%qQmZ?Y?A=fm({htGelHuN0vYVRfQAAh=`DC zIAK)R*S#u!dY~kjIo|@>=j^6Zay{=KYEh-J|Kd{O$vf)DW8ZEmE_|rD$P%0-Kzl-J zSP1((rAiQBxypxb`1K&T(WlwU{e+KWLi#i?1{|I{Fi&CsG^!+X!!vg9X4?IQ?dsf^4b4;VFciS8KaF;rLp#6uOK(tu23YCUdPzz; znsG0pzfd;P;no5>!v3v-#A7vv3I=RAc!~p1=8>^6A+P`P9CblTtMFdE3Z!_COUSSg^smV%GwFoQ!NfZ6EzQ2TV6w(iba z=+{aJelE}tT$>qV+)QRco63%&o>o4*>3UH#|4s+ldGg_(v9LZx)cFaXU8B(Q&!u3# z;-BnWzS(-%P&lRG1|_^MjjBSJSPbC&^;3#Cdy%CtS2uEQi`&_7JIr25CKcI)vd>BJ zea~Ay=&3YdrHKs8tV}fLJTZR)23ki1*w^wZO4n0SgeEaL8yqa&2G+~8>?D_gXJ~(r zig?o&r#5gPSCqYt`eN2)>hOD~f?bf2o#B!j52^dG=h!@C-WeIO)igG4L@d!*n8VR!n?#l6_dv3UKZHo?*4ybW_xA`UCPS_GO1B)I zsQ69HSH9Z>Sqrc4ktgUkk90#y0oMV;kOHU>k$e)L0@KyhVF*pmONT=wnJA5K4*Br` z1p%Qr)HCpzoX_mrvr%BPekAYWHQa6`i)2yKLW7R@vGkFzR_tXiy-N#YI;YQi#?fxP zoshao*gims(loXQ=)St|l<%-++m<9^==W8h1n+z2>n^I2{PCw!hCryfjf*wm8z>(i zL%qvVMwLkX8^8Pd8y3V|`-InT+{yU8zZL^{NeYdVn$C%CMFBY=zng<8GZEkKJ-T(B zTcMSOK*#po_FFbglbj%e^>*pOd*bzC$R)9t>)AIhs)~EaA1B}-%~l~TS#a;1mbP;7 zxpwwJnknMN*aHVDSOQ_e@@rJg&tj#=#7z&Gs=2gesNgB5!C!oB^sE_UIWzPzGj!2h zjLHYBTe#&_Z!>h2ObCS65LO7njC(!4@>H7)aYhpX93k8M*NJ}LWaJVy4`gzopMlaX z{DwciYH8?F<}H{p$gPicN`6$yi0k3dKdv$!Kd262#;Jg!36?1K9GJGMmE9qK>sXI- zrB4?%1^;+sJNPYEsA9o1?JQ`3xkI2*v&c2YBl?3&;4|Ykt%zR=X4EU(BXaK6oFa7sQ{3X9*4?~?{0?2-455ABlrjlT{uQPeigkC;#*0TdL(y5J9f{f%E=y)ZA{ zwEVCiF0^K!CykO+EE;uRmgbM=8)E&sEi@5+rfN<`c#py~ZQi0;aVsz{zrbC4A%dMn zP18=d`vwTE3e7$w1v5j9k-U$WT6tm#B^Hb}2*%o#kr|)TDZ)`S zDnvQ+qIf_DGI_)BODQOo-J~=pb>Jx0^*Hi3*ESF@v3Z(_)v46(?#;Ukc6#f?K8An+v%c_^hJK0)vx=YAmM|QB% zld#e}Z?RVV<*zypf3BM`%rYA-5>W}OApqH)%34Ky0daQ-HH~57vVwj87cRaz?n{nQ zv=$zY`07ft%pseIBcxL9v?=oYMhRAM$WOkKPrSE`ck{;m+-Qxz-E_uLoCk{)&v*-q zpQ1u`L)iSV71xS*mk&<#W06j0+#HS{4Bp2DSgNst80vCIU?$vJOt-idQ9pW*7IrNI zC5L$Q+y_KkD9~*(=uZ;5OIvDAkp^N(AQ6TEmKs#%heDZWkMPh-`_LSw9CH+p;W}KU zl~2P;0n`-cMG?oyf)D(^ZXw}*xH2m0$HXXd2WFX}fZhY_S*k=woV2+*;+oaO?_9sA zh*1cEQ*pZ2xhc+|*i@tP6rYAMT%k&y6dyUBDCju?)i?Z`qd4&CZshk@GSt;}K#072ISY5~5YG_RDs zzL@jF+$)wpmXm7dTvo2+?1HVNEG#UToXITu$#E{0%q5Y1Ej#1Vqo^`f*YSXs-PbuO zyYr4#ti4$J9`+{}die^!3kum^*35ku8)#_04S$rz&D@>|zBz1hs3CHXZ9a+LPbM2E zUV8hr`$weHaC!#NPaUQj{E3e^oj^t+fNeR(OTc8hMTQf3El(DZS$266gub0eLAP<) z%?s#QGxK8}HISTj&1ubu{LA&0(z8@I$yWU832ik@0oT5H6CrVMemtlyr>O`5Q`Wz`#Sunp>!F=9jP79G9T zU)!hK(ELp`hp-tkrR3gBGG9;sxJLrsC&0%Drr6F|k|emPp8*<<#$T+Y+2#(;b;u8d zsj%&-@Q5b;SDf?&pJNYs$9aL^g=YY??5xR9ucIUnKip6=ZQr!(IN`K7te4p?xezHD z&HCn1bKwVMLuA6rR2=MB=SZ62>fIpEfuoKHisk2Z3v5#-E1Km^n1Vf{)8`&@JC}27 zK@ZbztHdR@{uN4iQr>s8C!tnfu=Bp{&jCvi-wG-8xfaSuG2c|n#%?CMpKBTq84*>P z1F6tbE(Sr7KD1QXP7p#j<3!4!r4Y}U>)IjBP05q2ni87`LOs?!YlNikH;1hK49+U8 z4_lG%rxM9z%Vu_Bs0eivYijkGDyy{3t)e;h=Ta$42t-(KrhMn=l2fiHi4L#Dd+t_;M7*xJ5gBKE+z>bAM$_6X8uwt{f zPiaMu1zF!et3IF*&OC4OOOiZ?LC2wQiZ5e-5W%DPawSJit(-V1(o$3TSVoc`_3JR} z3p$2#mnDbo>!dP&)sJ2|xCdMDF&w$zLu(qMLYT|Lynf%KNQzRlgN}6-3Lz3s-+H7v zMq#>EQ_z-Q)tV1u_zaoPmTb1lM6l-E4Tsu9L|)Qs4!tsX=Bl4khWkg5+Y%7PS_S^y z55vg%0Pf2YyKjG3WG4}k^g&gA=-IS)K^F>ap`1_TLz8!hy031TkfdyK0>A9Ae|nO8 ztD~cR@o}c`sA!LivvsP+-YZK^HYy17DeNhvH4~FD>wR3oqWR)yNZY z5_5OB3Ug2?K@-W3AYu0pw zyE;!e9*2|^<`a)VWX7b0@VxPLrG<}qr!@|pgh>Yp3Wais2!2-DlNft{2rU8b+Zg@cWQX>XD2q zK}DzDH#)p4Br#dG%LVTzoU;zGk!)y_9bq^R+gLgINv71rR~h%8G!f)#WoDldOY=b~ zO3DfwUCL;8@hmhgl#>w71+0+w3%SWQj*K&99X~PT`9Iop(bR0Xy){i-y?&!17%*Cd z-C%c>U@Uyc`EA{^L;D(kR!bYV)Xd*AAnfUvu$74O6r{xd`gxtzbg^tKG^xfJtBX-n2ht`<*0q8)VRI&$?;ok;|8&>@-_p|^ehDK@+xmRU+44c8U73xybaP%#BY~m zx>#GjES!qesz0{$)2 z24mp`v8pgaQ-WlnRof!+G|{22(~8{Dl9w_YZTR{l3A`={wY(zPs0R;^F&j5%A3$yoL%fyjcLQXPA!B*&Ur4D!BC zk=*=*7O-rwVZ;^mW@W27!~_Bz7!KX{VD#C6kq;|2iK6S!{Pv%iPWf?m(Tnx^FkY?I zIz2Bcvu;LhjeVc+P(qAbxQ6}aSTu5QR#rYyp;(^fS641x3K4_dn2?9?tkq?hYKqJ< zer6Z=_=C6DQkZqe03aJ^7MHVV25xmlHVglU!TW7q@hwK3n|!i3vsS1$0UDRZ3`GFG zrtj%e`gV@jLulU*47*I0PxL%ewnZtYq0bWbF4nZMzsTL(KKQHK42NcnzW!cwg=-;c zF#AIi`56|vN`4jb3f7gfn~;kw=CLf(&=d%3!ms@F=QqcXr1aSjlpX$Cr|AQL| zGnL*TeOX}U{3bA-=Bjp(GsR=1q_0{#@$)6o>$4GDp z(CZ0}!YtN>eCz;aBXgrkB*KS_!%wOAo(o50HhMYg7Wag2@a@krlbBJ0@a%qE7Ece|DH^R1D#nw1#^autKg za$YN6Nu;87bbN1r-bubmkT8+iiwn3ZTxamWu>|L(DSt^$7=1>zjJYFlx~9;?nIQFm z+44Ew@P;sUYFZ=N)S%~kLQJ=9b5kI}{+_Tbii?||I$N%3c%QSG`WL)mo@bFpZkHom z$X+O;B>}8ZT}6b#@pRM_QOS0mHBHLIbP?rVTWSmrNv0fYznT_l-qes}l{?+LZ~4Ac zCgMyO9+MZi5GG)N2V8B3+;rP7ly~)S3!vE|2I*}r)gIuml-_Xs7U$%zV-~(FU>#Kf zC!Oyr6~-)QTTqf3C9q>=TLvVF8e!LXlrnKw^GQRtA^N5czf8Ns8gu|`GrG&{Dkb<8 zw~UF9lNWLyQ&+{^LZ;Gk8HQjt^55SfMh~RMRO&9|*%QqyxO10)=z(t|TYeQ{6eaGL z(LU$3TAn#x&0kw|l{l=yG;h*IuCMeZi^;FHqQUm+4W{l5C=X*wAXLmGfh#YzY*H*~ z8CQ!w+j-*-ZM17DJ7o#`j7JlsyTo0e7-g$D!DNo^a~yyD48kHYjg_-`2`D;(BeXuM zV&mt?pI+TQs6R?q-et<+KBTbrC4;TFI9J;%ofU^+Dv>kk?LLbz_ahN& zP)*h@{&8L?{^k>!JQ!iwG|eE^k6BpwcCS3HA*I0Z#ho$9kI=itjyUEUc@-GlN0>To z=pfAViRAm2K!hha8GRT1ljQHT@85}e!&+^r0ehh4qFT3~Jn;2@+_m@UeaG zl`XI&T=FB7q8HR7PTL!1n5RIGs{}$WziQH+t`c#(LC4x}Hi|2P3}wn3MCAovpKKT! zM$v8Dp0CTxev7Wr?;8^nEcE-`-RNoyrnZid2!3hm$XV*W%Heg`C1s80XSyND(zMFI zg(&hkE*Rm&$L|W|NX3i{zh&8%B`O@D`EgGB#*laW1brxf<{t56zeZ26sC$BGNlv>P zxuVb9;v2aTwYdx;2O}T}q4qTrg zYcwUyv4yiAY4Y-P1?AmEQ|n$BJc5CG)y%;r#UWlBeFUrtAKqUEqm%L5S&aKkhW^SK z;(~DNjPN?;i;@jI$a;LEeKa_d_1$gcWvybw@Y@x(5_J1S;5so_e2WuwWu$`?iG5W| z%mvT;5TlJm`IWsv9C$E!qVjqCl|A<0hqa@lkH?P`4ZZK6AfChx`;{}F9Le{;x|Fyo zB?EKm**@jF(Rsczr}^w%&#g#!tql`UWOscpNu?EQ<0WU_ybL1dpH}LDTB;O%4kxvL z?~5*seLac#dYxAtP16(pZHUjhzB@Ba zt(}9W&8ZppuBngr@nm*R>>`r+V^KhhO2J`dTs`mex6zbT@S(A=Ce9k-fb}9^eTHc+ zA>ba_G{>VZ@0WOSZa-obqlhP=ZS(uUo6!rMNun?AEn|f=USq-@(&FoRkNfjy&7iVb!8TNqU3mX!s?X=~vOn?AB4?}P08iTYQU zKy~h7IugbnnmIPS%8Jt4@GAzL?sgBeRybdq41_!N9)D$#QSL26?&O{i$(Om1S(6Y$ zTW&TQ>)i%r-5aoeUNC{&7O4Snj=`G!{NPp6YW8d6V;fiRp?|#{3)R^v&CHRu6-$X* z0sHb}<6z68yNj$v-(8DaGZcRmH-p2lEiVJ!qn~pb(`7m_B^tU03(CWAoV?YJbOQyz zpP8_TyG5rdnx#p{L7LMrtFca3Z+S9}u}f)6>yzuQ)TRi(9F{95$@ye#ry8-8kM zY4JP>^=v_dP@ApK$pcWRZ%ZaP2#_T6Z?M|d;)iDexf!&A)wo`!3an|q6QEqFsS=cV zx{2J)dkbjsNM%zw;%Xlt6e_-sVp}TiP157Vf6>^gcMb50T>?KcrkkbHf6+UcqUsS&U<`-QpU#24^0}Ou( zMf7IGe`&yL;k#91w9Hv^kS4~u)1|UmKx!4T1WuKQ%*@&|5EIKyLI_t+pZjh70s~Y- z+8pEJ^4cv@%Ntj3k0PnexSM(krap!+ZJip=wx|e+-Ns0P`z|9Ly_aK%*wnCjq)K*; z^YCy>9cauohjNS8&V1M=*mFi(%+sv9j%1tBoqNSxCs(u|XXc@`-D`hANf@7P^6X~L zpw)+`HgtFfEIg&!csp%s)GItjmI9nYwyITb4f2Nc_`OIwGQAnU(Fo^62vZ}r zj8t-1K<5k74S7v5GpVG|Mn|2PG*bx%WK_=JZ^_hs*Ji^IB#ISX!fd-|Zhx%3%H5Dc z^@b(U%dzzFmwvy2NMH;JJ;gzlYQhrPaxuB&g)JTovG!t1qaiL9v{X6LaF>EQr7y<9 z#e=HQn)_H!pxh%d6TVUPoyeGiOplePD;pMq^ZO3~+qw-laFa)Hpc0v)KuY`sLp#xH zjm&3yHLnE6Z;bu$tS})!=mpzdty8hzzuONXx&9xBj1@JaQneuRY#~}-Qqv$c4H1x4 z2&*vt031^`$wqM7aa*qDloWk_-EX4Q_ek*1R^YJ3q+}xS_JbpzL%P1$&dDQ##u$1yBr!w4 zg~8H;pIa0z*ZmP^@ptBUW60KYKv?gj#|00u$~C&XWQryAw+Ib@W%x!I8|w5{_Ox5! zw`{{`q;XaflT0V(-&pIr!{mlp_>qrTfE&pZ`e<@&tLRCbAzux^aaB+L35}<~u zk+oe`(v-WU<_;EoviUM~P~VjBJgAjsC+U78Ly}(BoXUH;{gZlGLGT>0zlEIU{ieZj z`Z$M7uKQZz<+6qm!Mp=(ng5-+yphZ6iiRR0Ix?T-YHGwp7(sP1Wsqy2kX~D7L88|g z>M2bPjMX^A3V2_KnwRIq--h)4F^RthW<=?{$@y^GWhHR88Cj~p^ok(?R#Y$PwXY-- zBuPJH97?s`WZ%B_&knzYJ=V~;N{ZC3m09O2l`xLtuH#d$)_d4x-p8uK5yq}YF0tzv z*&2qlFVR28{Xj*8%k(NoHF=(CI#IGtmk?yh6Hww_k^3DZea1HCY_o(Z+0_c78D^xN zdnmVpZ74{z2+`EvxtZk?M7755-F^F?N-1`gA$7;&{l@A{oGB~c=vpYXiKSExp$YL7 zL2J&ypm3ii{w#y3dpI{GG`bd+Tu+*J$};K*E%fiG$dIQWJSyv$QL5RqO?_*B?=no# z$GoP7<|c^tXy(6H`A`A>IU{kW&0ORf3yk3!_&=Zj$0#5V(a6TL6vhJ8$0z!l73?dy z&v1SnbAa+o1~d_+83u^ia^lE5l=$l}%srG*GQ32vBlF5e@ze0ZLKRg2b@LBr7i?%bsr1=O19WIni(4r19PlN=yX$7l8(WAu z74~1D)VF|{HpIATNr9GmSr=|9Pen{J_MWI9CB&+n<|Z*Boq*Cs*49lE0C8_cWqnZm zg2{1j1?NKQKlShrLHI=X^3AZ_d9K-gb_FPtrztQaWSDB{my#J9H%_T`Uqs&&`i!X4 zEYV~uE6YXokk9-3vCoz^W{6csTZZC>oLFI0s{kbFk5tOOQt!Ku<~vOzrRFoFuOA;y zBld=+9>j&~oDIDd0Yc5~zGa7jMTgeCZd#h0@AY-oH~Y&hjE5m5%BXuqwREpiGMpt@ zini=*ozNmA5ze?}{`uiwt2ud{tPbkEDG9?);-<}c(F@nmZCDywc;oJs9}av)YN7|+ z6Nfa1ng?~MC;~nu32h)?&){f0H-amyv%4* zZ2rxWOT<2xaxS^l{^d7++~*o2I2^wi)qU#KUB6D~Dza30tZpI_i(@&8?FZ7rMRs@# z1|yZ8F<%F7sDoijG8SVxwTxj0Y2Vk71#_(>(BQeUk3#KG z)E#kVl3U{0lS$`RB2-wgJSYAi4c&IP{PBL%!~u=|z_}V`Z%0Zsvu%71!QTP?@7@d+ zGai+=L>*4zC>-PpX46un7X&ZbZdmDrfT$n8t5BtFRu{Otie-VP3{7(sPITCSrKKMQ zE@y63cS{O8Ql&tcNaQK;t>oD_fg|cLi0~K(DO6c_>k67b_y4MPB8D8NvppDQ05K3RZ6 zeoeWiK+YllhAF|&!M)xI+J3yxZu^!xh28v7gm!P7vk!j^0jU(*i9v2#_H&82g}Iuk==4-kjz z#qzxf)tw~{t=XsL_#a^Hg%bTd%Hjo^!_mk1p&d-!g&VJaG4CuP#7|h z4~TxlG!Adu!ElBCr!h_v!F9j1*~2t?$0=5{l>p5~6EiiuvSKT;SMNdDYVQF|Q;$6b z0~=ImEh$tnGvD_NY4lHM=Dkzua?TM6wiOAZi>NY*C;YF!*GXA=j^;SIP$pggU8X^B zf3q(diQeW9>iX=?eE;K)L74Q&Fh7bUsowGR6vtZ^688mpn5w$#aFdxpxWo{*`Q2uT z(-4yw5g9Jhn`PcIG(a;mjp!UV9bTsfU83CM$f%pHT(l5O-)jwvslWAnNkN3RjJ^sQ zP=icL6%DQ)B(0fNM9v)Ymks?{#7U`GZ%A$0^R9a0w`ounjXGE>g=dHWDjW@wGm1^2 z7Kb|apUO!(>NzxGe_5QrsJ6-FjKP}bCMcKrljLRbfKyTzuXfhxe(Q}NgCr15#4V!{ zHzock?HL97#J3^EwxBU^F2-))U)M(~xb7SCYpI1BQhBl|$*Dnr)gxr7BUmCwC8)3c z7+e!w*-WC?u&nS~N;azJouWP>fuVcc@6J>)6U~;_n2#_|c?({cAZ)D&122dQ(GqYq zAOzq4SbYES=p~nddJ3p(c5vc|x0Yus4vm<|EcJ(Du+$oc_cL`&aTt(dXCsbyvyGrw zpHht#W7uPON<+&4V$HwiN-MbPaXqd@)s1rD3^EJCjNwEKM>9Yi;4>$Z z?7NI~TC4H2e-$MqmGj<=OO*4jgW8s={}3nBj}l*A|2m*9vS=G}h||x~E{mqjyDcHp z??+VNdDMtVZmg)!MaT#`MpKx8Pu45Nc?A)zO5w!NDUiH!a}T>)|!Y4z3QSYInhyx~u>Aff;~ogJ&c?PLWD zqq6lJ3k$2+>$(#cck&8;i$;Mp`7nbS0AYC)h9p-Q;k+zI->MP-`bZ;7%u3KWQYGJFkVx^DF-S$er%|*v&JeS_;891TNP-tm)8ID zBj+H{*HO|-*(yBKniF;vT*muc1OSl?`+Wz2uN3qzfbb2+!Z7a`&V(&DVAnUM8<8F@)`&3zs-Fh_*qWuXTj7GEF1@)}jq>h*d$%fr zO=V$gbx=i&G6+Y^yVwTD<}q(8HADr%OyZlS?hVU2_#v?FCqI*{doVFhP-bZ$fD4?m zuk_fhJ|72~a(d@!|GWrk(FhEO z2-F1wo*TlHh-y#p^5Fo%lrjdDlRK#(%zxT;}JF)eZu1 z^^uEB+lE#LazO{Wl&1_XYudbYK&ahXUjBEj8snKl*sqOs%3ei~6XwqKzhS}O(j;IO z>)G)7)`FR_Zd3sc14}z+isIcMhQ?>IGJh$Frhpt}iB|sjTK|3i#bLos_;v%t`V9dH zx}1>&;jk7$3B5^Nh8`E%{v37)g<5dW+F{v*JKT6rs^GE(KRup+&W#5k1cd_l1Nxk)F& z#t0m&$@c9-eQdC+Yq1xS3~N_1O?HS+@E?goC8YcZazasINd8RC*b&?u^_A1DF6mvS zL(t*NmzxJPTrwyRKbbEVaU`bHE|_<0`H&0+TwoZNwt4BeDF27hdy$Y#nqFu(qj53W zJ9arbclMulLzpVtxV;gJ2V*X$K>8DZ{@1Dv^!D!|#lJ|#814(@uab}Y2xF{Vk z5;iUyIIDYtRl}JXLT=xG^Ik^|U(g zAP|vy*Z|AoO;DeWY~HSuN;czyRn*>RN^*!$F-3RY{THDkQK}}mhW4TJ^j@Z?oJN+C zJJcT2^P0*=ZP>UEcC}mce!W9t)mZff@FD(}DRhwkIXJ+OFCPDQZukmM@L{(|_u z;GY17G(89VKd^=sCKrSEqGqu(@$QAKvfAD~deob$!1L70@YCkEa36}?oKRvl9Jr1P z>u7aStN#C#UGHac<6F#i$N1AOOtzg`V-J)TAv6Y1=kcn*#py^Z3KoZ09j37ysE%R> z@LvQs64x8bv-4Iq(1}$dk{XqGHTC-Ij}|+ld;ytw23m;9@UfM~|0kCHXO0;B4#_^j z=_}8s_j!`kp&v6c+7Il@c$O}W22L`PVO(?wg2hD8><|9ufJNWKbw3`JJM_B~=}%la zyMW#kV*5sc;AYqdaCxj~e)cB+(X*WKuHt`j#Dm!0i?S@0#k_kNK}3A%qq)3a0URdr ztBZUz8);a<#0f>IQZDQNW?p~8bYVF25VtUfKmga#4X$cY>GQz#L{MlOGBI1c@#E8I z+>j9h8N2_Asb%yNULbSse*g&rCJgpQqN{^mo~ifx)z7e2F?Ra_@|&U1<8>3M!S;QY zjMEUL_<*U|lS^xDEhs4H3OPwJ&C!$RLRUoih);z0`OeMQ8ruBc#SdWQ=I`H_=SmaG*w{`h|Y D*Js|0 literal 31958 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 V^@Ur4%75o{f0I;{s1Y*?{(osf2G#%o diff --git a/package-lock.json b/package-lock.json index ce43749..1925a3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,26 +1,26 @@ { - "name": "turfjs-starter", + "name": "maplibregljs-turfjs-starter", "version": "6.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "turfjs-starter", + "name": "maplibregljs-turfjs-starter", "version": "6.5.0", "license": "ISC", "dependencies": { "@turf/turf": "^6.5.0", - "maplibre-gl": "^3.1.0" + "maplibre-gl": "^3.3.1" }, "devDependencies": { - "typescript": "^5.1.6", - "vite": "^4.3.9" + "typescript": "^5.2.2", + "vite": "^4.4.9" } }, "node_modules/@esbuild/android-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", - "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", "cpu": [ "arm" ], @@ -34,9 +34,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", - "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", "cpu": [ "arm64" ], @@ -50,9 +50,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", - "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", "cpu": [ "x64" ], @@ -66,9 +66,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", - "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", "cpu": [ "arm64" ], @@ -82,9 +82,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", - "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", "cpu": [ "x64" ], @@ -98,9 +98,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", - "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", "cpu": [ "arm64" ], @@ -114,9 +114,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", - "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", "cpu": [ "x64" ], @@ -130,9 +130,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", - "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", "cpu": [ "arm" ], @@ -146,9 +146,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", - "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", "cpu": [ "arm64" ], @@ -162,9 +162,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", - "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", "cpu": [ "ia32" ], @@ -178,9 +178,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", - "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", "cpu": [ "loong64" ], @@ -194,9 +194,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", - "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", "cpu": [ "mips64el" ], @@ -210,9 +210,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", - "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", "cpu": [ "ppc64" ], @@ -226,9 +226,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", - "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", "cpu": [ "riscv64" ], @@ -242,9 +242,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", - "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", "cpu": [ "s390x" ], @@ -258,9 +258,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", - "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", "cpu": [ "x64" ], @@ -274,9 +274,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", - "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", "cpu": [ "x64" ], @@ -290,9 +290,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", - "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", "cpu": [ "x64" ], @@ -306,9 +306,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", - "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", "cpu": [ "x64" ], @@ -322,9 +322,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", - "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", "cpu": [ "arm64" ], @@ -338,9 +338,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", - "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", "cpu": [ "ia32" ], @@ -354,9 +354,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", - "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", "cpu": [ "x64" ], @@ -421,14 +421,12 @@ } }, "node_modules/@maplibre/maplibre-gl-style-spec": { - "version": "19.2.1", - "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-19.2.1.tgz", - "integrity": "sha512-ZVT5QlkVhlxlPav+ca0NO3Moc7EzbHDO2FXW4ic3Q0Vm+TDUw9I8A2EBws7xUUQZf7HQB3kQ+3Jsh5mFLRD4GQ==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-19.3.0.tgz", + "integrity": "sha512-ZbhX9CTV+Z7vHwkRIasDOwTSzr76e8Q6a55RMsAibjyX6+P0ZNL1qAKNzOjjBDP3+aEfNMl7hHo5knuY6pTAUQ==", "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", - "@mapbox/point-geometry": "^0.1.0", "@mapbox/unitbezier": "^0.0.1", - "@types/mapbox__point-geometry": "^0.1.2", "json-stringify-pretty-compact": "^3.0.0", "minimist": "^1.2.8", "rw": "^1.3.3", @@ -2029,6 +2027,14 @@ "resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.2.tgz", "integrity": "sha512-EDrLIPaPXOZqDjrkzxxbX7UlJSeQVgah3i0aA4pOSzmK9zq3BIh7/MZIQxED7slJByvKM4Gc6Hypyu2lJzh3SQ==" }, + "node_modules/@types/supercluster": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@types/supercluster/-/supercluster-7.1.0.tgz", + "integrity": "sha512-6JapQ2GmEkH66r23BK49I+u6zczVDGTtiJEVvKDYZVSm/vepWaJuTq6BXzJ6I4agG5s8vA1KM7m/gXWDg03O4Q==", + "dependencies": { + "@types/geojson": "*" + } + }, "node_modules/arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", @@ -2133,9 +2139,9 @@ } }, "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "dependencies": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -2158,9 +2164,9 @@ "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" }, "node_modules/esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "dev": true, "hasInstallScript": true, "bin": { @@ -2170,28 +2176,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" } }, "node_modules/extend-shallow": { @@ -2206,9 +2212,9 @@ } }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -2266,12 +2272,13 @@ "integrity": "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg==" }, "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { @@ -2337,6 +2344,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -2481,9 +2499,9 @@ } }, "node_modules/maplibre-gl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-3.1.0.tgz", - "integrity": "sha512-KFarVUUszCEucPwnGsFJtPMQBg/F6lg+SPDmTztKUD/n0YShETjIOdNmm5jpxacEX3+dq50MzlqDr6VH+RtDDA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-3.3.1.tgz", + "integrity": "sha512-SfRq9bT68GytDzCOG0IoTGg2rASbgdYunW/6xhnp55QuLmwG1M/YOlXxqHaphwia7kZbMvBOocvY0fp5yfTjZA==", "dependencies": { "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", @@ -2492,11 +2510,12 @@ "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", - "@maplibre/maplibre-gl-style-spec": "^19.2.1", + "@maplibre/maplibre-gl-style-spec": "^19.3.0", "@types/geojson": "^7946.0.10", "@types/mapbox__point-geometry": "^0.1.2", "@types/mapbox__vector-tile": "^1.3.0", "@types/pbf": "^3.0.2", + "@types/supercluster": "^7.1.0", "earcut": "^2.2.4", "geojson-vt": "^3.2.1", "gl-matrix": "^3.4.3", @@ -2617,9 +2636,9 @@ } }, "node_modules/postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", + "version": "8.4.29", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", + "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", "dev": true, "funding": [ { @@ -2673,13 +2692,13 @@ "integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==" }, "node_modules/regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -2702,9 +2721,9 @@ "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==" }, "node_modules/rollup": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.0.tgz", - "integrity": "sha512-YzJH0eunH2hr3knvF3i6IkLO/jTjAEwU4HoMUbQl4//Tnl3ou0e7P5SjxdDr8HQJdeUJShlbEHXrrnEHy1l7Yg==", + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.0.tgz", + "integrity": "sha512-nszM8DINnx1vSS+TpbWKMkxem0CDWk3cSit/WWCBVs9/JZ1I/XLwOsiUglYuYReaeWWSsW9kge5zE5NZtf/a4w==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -2783,9 +2802,9 @@ } }, "node_modules/splaytree": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.1.tgz", - "integrity": "sha512-9FaQ18FF0+sZc/ieEeXHt+Jw2eSpUgUtTLDYB/HXKWvhYVyOc7h1hzkn5MMO3GPib9MmXG1go8+OsBBzs/NMww==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.2.tgz", + "integrity": "sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==" }, "node_modules/split-string": { "version": "3.1.0", @@ -2864,9 +2883,9 @@ "integrity": "sha512-Ja03QIJlPuHt4IQ2FfGex4F4JAr8m3jpaHbFbQrgwr7s7L6U8ocrHiF3J1+wf9jzhGKxvDeaCAnGDot8OjGFyA==" }, "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2904,14 +2923,14 @@ } }, "node_modules/vite": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", - "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", "dev": true, "dependencies": { - "esbuild": "^0.17.5", - "postcss": "^8.4.23", - "rollup": "^3.21.0" + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" }, "bin": { "vite": "bin/vite.js" @@ -2919,12 +2938,16 @@ "engines": { "node": "^14.18.0 || >=16.0.0" }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@types/node": ">= 14", "less": "*", + "lightningcss": "^1.21.0", "sass": "*", "stylus": "*", "sugarss": "*", @@ -2937,6 +2960,9 @@ "less": { "optional": true }, + "lightningcss": { + "optional": true + }, "sass": { "optional": true }, @@ -2975,156 +3001,156 @@ }, "dependencies": { "@esbuild/android-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", - "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", - "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", - "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", - "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", - "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", - "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", - "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", - "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", - "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", - "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", - "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", - "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", - "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", - "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", - "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", - "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", - "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", - "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", - "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", - "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", - "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", - "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", "dev": true, "optional": true }, @@ -3171,14 +3197,12 @@ "integrity": "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==" }, "@maplibre/maplibre-gl-style-spec": { - "version": "19.2.1", - "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-19.2.1.tgz", - "integrity": "sha512-ZVT5QlkVhlxlPav+ca0NO3Moc7EzbHDO2FXW4ic3Q0Vm+TDUw9I8A2EBws7xUUQZf7HQB3kQ+3Jsh5mFLRD4GQ==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-19.3.0.tgz", + "integrity": "sha512-ZbhX9CTV+Z7vHwkRIasDOwTSzr76e8Q6a55RMsAibjyX6+P0ZNL1qAKNzOjjBDP3+aEfNMl7hHo5knuY6pTAUQ==", "requires": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", - "@mapbox/point-geometry": "^0.1.0", "@mapbox/unitbezier": "^0.0.1", - "@types/mapbox__point-geometry": "^0.1.2", "json-stringify-pretty-compact": "^3.0.0", "minimist": "^1.2.8", "rw": "^1.3.3", @@ -4453,6 +4477,14 @@ "resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.2.tgz", "integrity": "sha512-EDrLIPaPXOZqDjrkzxxbX7UlJSeQVgah3i0aA4pOSzmK9zq3BIh7/MZIQxED7slJByvKM4Gc6Hypyu2lJzh3SQ==" }, + "@types/supercluster": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@types/supercluster/-/supercluster-7.1.0.tgz", + "integrity": "sha512-6JapQ2GmEkH66r23BK49I+u6zczVDGTtiJEVvKDYZVSm/vepWaJuTq6BXzJ6I4agG5s8vA1KM7m/gXWDg03O4Q==", + "requires": { + "@types/geojson": "*" + } + }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", @@ -4547,9 +4579,9 @@ } }, "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "requires": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -4566,33 +4598,33 @@ "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" }, "esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "dev": true, "requires": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" } }, "extend-shallow": { @@ -4604,9 +4636,9 @@ } }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "optional": true }, @@ -4656,12 +4688,13 @@ "integrity": "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg==" }, "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -4706,6 +4739,11 @@ "get-intrinsic": "^1.1.1" } }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -4794,9 +4832,9 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" }, "maplibre-gl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-3.1.0.tgz", - "integrity": "sha512-KFarVUUszCEucPwnGsFJtPMQBg/F6lg+SPDmTztKUD/n0YShETjIOdNmm5jpxacEX3+dq50MzlqDr6VH+RtDDA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-3.3.1.tgz", + "integrity": "sha512-SfRq9bT68GytDzCOG0IoTGg2rASbgdYunW/6xhnp55QuLmwG1M/YOlXxqHaphwia7kZbMvBOocvY0fp5yfTjZA==", "requires": { "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", @@ -4805,11 +4843,12 @@ "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", - "@maplibre/maplibre-gl-style-spec": "^19.2.1", + "@maplibre/maplibre-gl-style-spec": "^19.3.0", "@types/geojson": "^7946.0.10", "@types/mapbox__point-geometry": "^0.1.2", "@types/mapbox__vector-tile": "^1.3.0", "@types/pbf": "^3.0.2", + "@types/supercluster": "^7.1.0", "earcut": "^2.2.4", "geojson-vt": "^3.2.1", "gl-matrix": "^3.4.3", @@ -4895,9 +4934,9 @@ } }, "postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", + "version": "8.4.29", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", + "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", "dev": true, "requires": { "nanoid": "^3.3.6", @@ -4936,13 +4975,13 @@ } }, "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" } }, "resolve-protobuf-schema": { @@ -4959,9 +4998,9 @@ "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==" }, "rollup": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.0.tgz", - "integrity": "sha512-YzJH0eunH2hr3knvF3i6IkLO/jTjAEwU4HoMUbQl4//Tnl3ou0e7P5SjxdDr8HQJdeUJShlbEHXrrnEHy1l7Yg==", + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.0.tgz", + "integrity": "sha512-nszM8DINnx1vSS+TpbWKMkxem0CDWk3cSit/WWCBVs9/JZ1I/XLwOsiUglYuYReaeWWSsW9kge5zE5NZtf/a4w==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -5018,9 +5057,9 @@ "dev": true }, "splaytree": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.1.tgz", - "integrity": "sha512-9FaQ18FF0+sZc/ieEeXHt+Jw2eSpUgUtTLDYB/HXKWvhYVyOc7h1hzkn5MMO3GPib9MmXG1go8+OsBBzs/NMww==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.2.tgz", + "integrity": "sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==" }, "split-string": { "version": "3.1.0", @@ -5084,9 +5123,9 @@ "integrity": "sha512-Ja03QIJlPuHt4IQ2FfGex4F4JAr8m3jpaHbFbQrgwr7s7L6U8ocrHiF3J1+wf9jzhGKxvDeaCAnGDot8OjGFyA==" }, "typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true }, "typewise": { @@ -5114,15 +5153,15 @@ } }, "vite": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", - "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", "dev": true, "requires": { - "esbuild": "^0.17.5", + "esbuild": "^0.18.10", "fsevents": "~2.3.2", - "postcss": "^8.4.23", - "rollup": "^3.21.0" + "postcss": "^8.4.27", + "rollup": "^3.27.1" } }, "vt-pbf": { diff --git a/package.json b/package.json index 9cefed3..d550832 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "turfjs-starter", + "name": "maplibregljs-turfjs-starter", "version": "6.5.0", "description": "", "scripts": { @@ -11,11 +11,11 @@ "author": "Yasunori Kirimoto", "license": "ISC", "devDependencies": { - "typescript": "^5.1.6", - "vite": "^4.3.9" + "typescript": "^5.2.2", + "vite": "^4.4.9" }, "dependencies": { "@turf/turf": "^6.5.0", - "maplibre-gl": "^3.1.0" + "maplibre-gl": "^3.3.1" } }